Merge branch 'positec' into dms
| | |
| | | "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", |
| | | "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==" |
| | | }, |
| | | "@types/hast": { |
| | | "version": "2.3.10", |
| | | "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz", |
| | | "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==", |
| | | "requires": { |
| | | "@types/unist": "^2" |
| | | } |
| | | }, |
| | | "@types/hoist-non-react-statics": { |
| | | "version": "3.3.1", |
| | | "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz", |
| | |
| | | "version": "1.0.1", |
| | | "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", |
| | | "integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==" |
| | | }, |
| | | "@types/unist": { |
| | | "version": "2.0.11", |
| | | "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", |
| | | "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==" |
| | | }, |
| | | "@types/yargs": { |
| | | "version": "13.0.2", |
| | |
| | | "supports-color": "^5.3.0" |
| | | } |
| | | }, |
| | | "character-entities": { |
| | | "version": "1.2.4", |
| | | "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", |
| | | "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==" |
| | | }, |
| | | "character-entities-legacy": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", |
| | | "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==" |
| | | }, |
| | | "character-reference-invalid": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", |
| | | "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==" |
| | | }, |
| | | "chardet": { |
| | | "version": "0.7.0", |
| | | "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", |
| | |
| | | "requires": { |
| | | "delayed-stream": "~1.0.0" |
| | | } |
| | | }, |
| | | "comma-separated-tokens": { |
| | | "version": "1.0.8", |
| | | "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz", |
| | | "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==" |
| | | }, |
| | | "command-exists": { |
| | | "version": "1.2.9", |
| | |
| | | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", |
| | | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" |
| | | }, |
| | | "fault": { |
| | | "version": "1.0.4", |
| | | "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", |
| | | "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", |
| | | "requires": { |
| | | "format": "^0.2.0" |
| | | } |
| | | }, |
| | | "faye-websocket": { |
| | | "version": "0.11.3", |
| | | "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", |
| | |
| | | "combined-stream": "^1.0.6", |
| | | "mime-types": "^2.1.12" |
| | | } |
| | | }, |
| | | "format": { |
| | | "version": "0.2.2", |
| | | "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", |
| | | "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==" |
| | | }, |
| | | "forwarded": { |
| | | "version": "0.1.2", |
| | |
| | | "minimalistic-assert": "^1.0.1" |
| | | } |
| | | }, |
| | | "hast-util-parse-selector": { |
| | | "version": "2.2.5", |
| | | "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz", |
| | | "integrity": "sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==" |
| | | }, |
| | | "hastscript": { |
| | | "version": "6.0.0", |
| | | "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz", |
| | | "integrity": "sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==", |
| | | "requires": { |
| | | "@types/hast": "^2.0.0", |
| | | "comma-separated-tokens": "^1.0.0", |
| | | "hast-util-parse-selector": "^2.0.0", |
| | | "property-information": "^5.0.0", |
| | | "space-separated-tokens": "^1.0.0" |
| | | } |
| | | }, |
| | | "he": { |
| | | "version": "1.2.0", |
| | | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", |
| | |
| | | "resolved": "https://registry.npmjs.org/highlight-words-core/-/highlight-words-core-1.2.2.tgz", |
| | | "integrity": "sha512-BXUKIkUuh6cmmxzi5OIbUJxrG8OAk2MqoL1DtO3Wo9D2faJg2ph5ntyuQeLqaHJmzER6H5tllCDA9ZnNe9BVGg==" |
| | | }, |
| | | "highlight.js": { |
| | | "version": "10.7.3", |
| | | "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", |
| | | "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==" |
| | | }, |
| | | "highlightjs": { |
| | | "version": "9.12.0", |
| | | "resolved": "https://registry.npmjs.org/highlightjs/-/highlightjs-9.12.0.tgz", |
| | | "integrity": "sha512-eAhWMtDZaOZIQdxIP4UEB1vNp/CVXQPdMSihTSuaExhFIRC0BVpXbtP3mTP1hDoGOyh7nbB3cuC3sOPhG5wGDA==" |
| | | }, |
| | | "highlightjs-vue": { |
| | | "version": "1.0.0", |
| | | "resolved": "https://registry.npmjs.org/highlightjs-vue/-/highlightjs-vue-1.0.0.tgz", |
| | | "integrity": "sha512-PDEfEF102G23vHmPhLyPboFCD+BkMGu+GuJe2d9/eH4FsCwvgBpnc9n0pGE+ffKdph38s6foEZiEjdgHdzp+IA==" |
| | | }, |
| | | "history": { |
| | | "version": "4.9.0", |
| | |
| | | "kind-of": "^3.0.2" |
| | | } |
| | | }, |
| | | "is-alphabetical": { |
| | | "version": "1.0.4", |
| | | "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", |
| | | "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==" |
| | | }, |
| | | "is-alphanumerical": { |
| | | "version": "1.0.4", |
| | | "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", |
| | | "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", |
| | | "requires": { |
| | | "is-alphabetical": "^1.0.0", |
| | | "is-decimal": "^1.0.0" |
| | | } |
| | | }, |
| | | "is-any-array": { |
| | | "version": "2.0.0", |
| | | "resolved": "https://registry.npmjs.org/is-any-array/-/is-any-array-2.0.0.tgz", |
| | |
| | | "version": "1.0.1", |
| | | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", |
| | | "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" |
| | | }, |
| | | "is-decimal": { |
| | | "version": "1.0.4", |
| | | "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", |
| | | "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==" |
| | | }, |
| | | "is-descriptor": { |
| | | "version": "0.1.6", |
| | |
| | | "requires": { |
| | | "is-extglob": "^2.1.1" |
| | | } |
| | | }, |
| | | "is-hexadecimal": { |
| | | "version": "1.0.4", |
| | | "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", |
| | | "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==" |
| | | }, |
| | | "is-mobile": { |
| | | "version": "2.2.2", |
| | |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", |
| | | "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" |
| | | }, |
| | | "lowlight": { |
| | | "version": "1.20.0", |
| | | "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-1.20.0.tgz", |
| | | "integrity": "sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw==", |
| | | "requires": { |
| | | "fault": "^1.0.0", |
| | | "highlight.js": "~10.7.0" |
| | | } |
| | | }, |
| | | "lru-cache": { |
| | | "version": "4.1.5", |
| | |
| | | "safe-buffer": "^5.1.1" |
| | | } |
| | | }, |
| | | "parse-entities": { |
| | | "version": "2.0.0", |
| | | "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", |
| | | "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", |
| | | "requires": { |
| | | "character-entities": "^1.0.0", |
| | | "character-entities-legacy": "^1.0.0", |
| | | "character-reference-invalid": "^1.0.0", |
| | | "is-alphanumerical": "^1.0.0", |
| | | "is-decimal": "^1.0.0", |
| | | "is-hexadecimal": "^1.0.0" |
| | | } |
| | | }, |
| | | "parse-glob": { |
| | | "version": "3.0.4", |
| | | "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", |
| | |
| | | "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz", |
| | | "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==" |
| | | }, |
| | | "prismjs": { |
| | | "version": "1.29.0", |
| | | "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", |
| | | "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==" |
| | | }, |
| | | "private": { |
| | | "version": "0.1.8", |
| | | "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", |
| | |
| | | "loose-envify": "^1.4.0", |
| | | "object-assign": "^4.1.1", |
| | | "react-is": "^16.8.1" |
| | | } |
| | | }, |
| | | "property-information": { |
| | | "version": "5.6.0", |
| | | "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz", |
| | | "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==", |
| | | "requires": { |
| | | "xtend": "^4.0.0" |
| | | } |
| | | }, |
| | | "proxy-addr": { |
| | |
| | | "resize-observer-polyfill": "^1.5.0" |
| | | } |
| | | }, |
| | | "react-syntax-highlighter": { |
| | | "version": "15.6.1", |
| | | "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-15.6.1.tgz", |
| | | "integrity": "sha512-OqJ2/vL7lEeV5zTJyG7kmARppUjiB9h9udl4qHQjjgEos66z00Ia0OckwYfRxCSFrW8RJIBnsBwQsHZbVPspqg==", |
| | | "requires": { |
| | | "@babel/runtime": "^7.3.1", |
| | | "highlight.js": "^10.4.1", |
| | | "highlightjs-vue": "^1.0.0", |
| | | "lowlight": "^1.17.0", |
| | | "prismjs": "^1.27.0", |
| | | "refractor": "^3.6.0" |
| | | } |
| | | }, |
| | | "reactcss": { |
| | | "version": "1.2.3", |
| | | "resolved": "https://registry.npmjs.org/reactcss/-/reactcss-1.2.3.tgz", |
| | |
| | | "version": "0.1.13", |
| | | "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", |
| | | "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" |
| | | }, |
| | | "refractor": { |
| | | "version": "3.6.0", |
| | | "resolved": "https://registry.npmjs.org/refractor/-/refractor-3.6.0.tgz", |
| | | "integrity": "sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA==", |
| | | "requires": { |
| | | "hastscript": "^6.0.0", |
| | | "parse-entities": "^2.0.0", |
| | | "prismjs": "~1.27.0" |
| | | }, |
| | | "dependencies": { |
| | | "prismjs": { |
| | | "version": "1.27.0", |
| | | "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz", |
| | | "integrity": "sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA==" |
| | | } |
| | | } |
| | | }, |
| | | "regenerate": { |
| | | "version": "1.4.0", |
| | |
| | | "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", |
| | | "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" |
| | | }, |
| | | "space-separated-tokens": { |
| | | "version": "1.1.5", |
| | | "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz", |
| | | "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==" |
| | | }, |
| | | "spark-md5": { |
| | | "version": "3.0.1", |
| | | "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.1.tgz", |
| | |
| | | "react-native": "^0.63.2", |
| | | "react-redux": "^7.1.1", |
| | | "react-router-dom": "^5.0.1", |
| | | "react-syntax-highlighter": "^15.6.1", |
| | | "redux": "^4.0.4", |
| | | "redux-thunk": "^2.3.0", |
| | | "resolve": "1.12.0", |
| | |
| | | "display": "standalone", |
| | | "theme_color": "#000000", |
| | | "background_color": "#ffffff", |
| | | "mk_version": "20250205" |
| | | "mk_version": "20250301" |
| | | } |
New file |
| | |
| | | /** |
| | | * marked v15.0.7 - a markdown parser |
| | | * Copyright (c) 2011-2025, Christopher Jeffrey. (MIT Licensed) |
| | | * https://github.com/markedjs/marked |
| | | */ |
| | | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).marked={})}(this,(function(e){"use strict";function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(t){e.defaults=t}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const s={exec:()=>null};function r(e,t=""){let n="string"==typeof e?e:e.source;const s={replace:(e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(i.caret,"$1"),n=n.replace(e,r),s},getRegex:()=>new RegExp(n,t)};return s}const i={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},l=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,o=/(?:[*+-]|\d{1,9}[.)])/,a=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,c=r(a).replace(/bull/g,o).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),h=r(a).replace(/bull/g,o).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),p=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,u=/(?!\s*\])(?:\\.|[^\[\]\\])+/,g=r(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",u).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),k=r(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,o).getRegex(),d="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",f=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,x=r("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",f).replace("tag",d).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),b=r(p).replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",d).getRegex(),w={blockquote:r(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",b).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:g,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:l,html:x,lheading:c,list:k,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:b,table:s,text:/^[^\n]+/},m=r("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",d).getRegex(),y={...w,lheading:h,table:m,paragraph:r(p).replace("hr",l).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",m).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",d).getRegex()},$={...w,html:r("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",f).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:s,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:r(p).replace("hr",l).replace("heading"," *#{1,6} *[^\n]").replace("lheading",c).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},R=/^( {2,}|\\)\n(?!\s*$)/,S=/[\p{P}\p{S}]/u,T=/[\s\p{P}\p{S}]/u,z=/[^\s\p{P}\p{S}]/u,A=r(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,T).getRegex(),_=/(?!~)[\p{P}\p{S}]/u,P=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,I=r(P,"u").replace(/punct/g,S).getRegex(),L=r(P,"u").replace(/punct/g,_).getRegex(),B="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",C=r(B,"gu").replace(/notPunctSpace/g,z).replace(/punctSpace/g,T).replace(/punct/g,S).getRegex(),q=r(B,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,_).getRegex(),E=r("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,z).replace(/punctSpace/g,T).replace(/punct/g,S).getRegex(),Z=r(/\\(punct)/,"gu").replace(/punct/g,S).getRegex(),v=r(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),D=r(f).replace("(?:--\x3e|$)","--\x3e").getRegex(),M=r("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",D).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),O=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Q=r(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",O).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),j=r(/^!?\[(label)\]\[(ref)\]/).replace("label",O).replace("ref",u).getRegex(),N=r(/^!?\[(ref)\](?:\[\])?/).replace("ref",u).getRegex(),G={_backpedal:s,anyPunctuation:Z,autolink:v,blockSkip:/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,br:R,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:s,emStrongLDelim:I,emStrongRDelimAst:C,emStrongRDelimUnd:E,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:Q,nolink:N,punctuation:A,reflink:j,reflinkSearch:r("reflink|nolink(?!\\()","g").replace("reflink",j).replace("nolink",N).getRegex(),tag:M,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:s},H={...G,link:r(/^!?\[(label)\]\((.*?)\)/).replace("label",O).getRegex(),reflink:r(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",O).getRegex()},X={...G,emStrongRDelimAst:q,emStrongLDelim:L,url:r(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},F={...X,br:r(R).replace("{2,}","*").getRegex(),text:r(X.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},U={normal:w,gfm:y,pedantic:$},J={normal:G,gfm:X,breaks:F,pedantic:H},K={"&":"&","<":"<",">":">",'"':""","'":"'"},V=e=>K[e];function W(e,t){if(t){if(i.escapeTest.test(e))return e.replace(i.escapeReplace,V)}else if(i.escapeTestNoEncode.test(e))return e.replace(i.escapeReplaceNoEncode,V);return e}function Y(e){try{e=encodeURI(e).replace(i.percentDecode,"%")}catch{return null}return e}function ee(e,t){const n=e.replace(i.findPipe,((e,t,n)=>{let s=!1,r=t;for(;--r>=0&&"\\"===n[r];)s=!s;return s?"|":" |"})).split(i.splitPipe);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(i.slashPipe,"|");return n}function te(e,t,n){const s=e.length;if(0===s)return"";let r=0;for(;r<s;){if(e.charAt(s-r-1)!==t)break;r++}return e.slice(0,s-r)}function ne(e,t,n,s,r){const i=t.href,l=t.title||null,o=e[1].replace(r.other.outputLinkReplace,"$1");if("!"!==e[0].charAt(0)){s.state.inLink=!0;const e={type:"link",raw:n,href:i,title:l,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:l,text:o}}class se{options;rules;lexer;constructor(t){this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:te(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t,n){const s=e.match(n.other.indentCodeCompensation);if(null===s)return t;const r=s[1];return t.split("\n").map((e=>{const t=e.match(n.other.beginningSpace);if(null===t)return e;const[s]=t;return s.length>=r.length?e.slice(r.length):e})).join("\n")}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=te(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:te(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=te(t[0],"\n").split("\n"),n="",s="";const r=[];for(;e.length>0;){let t=!1;const i=[];let l;for(l=0;l<e.length;l++)if(this.rules.other.blockquoteStart.test(e[l]))i.push(e[l]),t=!0;else{if(t)break;i.push(e[l])}e=e.slice(l);const o=i.join("\n"),a=o.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${o}`:o,s=s?`${s}\n${a}`:a;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(a,r,!0),this.lexer.state.top=c,0===e.length)break;const h=r.at(-1);if("code"===h?.type)break;if("blockquote"===h?.type){const t=h,i=t.raw+"\n"+e.join("\n"),l=this.blockquote(i);r[r.length-1]=l,n=n.substring(0,n.length-t.raw.length)+l.raw,s=s.substring(0,s.length-t.text.length)+l.text;break}if("list"!==h?.type);else{const t=h,i=t.raw+"\n"+e.join("\n"),l=this.list(i);r[r.length-1]=l,n=n.substring(0,n.length-h.raw.length)+l.raw,s=s.substring(0,s.length-t.raw.length)+l.raw,e=i.substring(r.at(-1).raw.length).split("\n")}}return{type:"blockquote",raw:n,tokens:r,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const i=this.rules.other.listItemRegex(n);let l=!1;for(;e;){let n=!1,s="",o="";if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let a=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],h=!a.trim(),p=0;if(this.options.pedantic?(p=2,o=a.trimStart()):h?p=t[1].length+1:(p=t[2].search(this.rules.other.nonSpaceChar),p=p>4?1:p,o=a.slice(p),p+=t[1].length),h&&this.rules.other.blankLine.test(c)&&(s+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),r=this.rules.other.fencesBeginRegex(p),i=this.rules.other.headingBeginRegex(p),l=this.rules.other.htmlBeginRegex(p);for(;e;){const u=e.split("\n",1)[0];let g;if(c=u,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),g=c):g=c.replace(this.rules.other.tabCharGlobal," "),r.test(c))break;if(i.test(c))break;if(l.test(c))break;if(t.test(c))break;if(n.test(c))break;if(g.search(this.rules.other.nonSpaceChar)>=p||!c.trim())o+="\n"+g.slice(p);else{if(h)break;if(a.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(r.test(a))break;if(i.test(a))break;if(n.test(a))break;o+="\n"+c}h||c.trim()||(h=!0),s+=u+"\n",e=e.substring(u.length+1),a=g.slice(p)}}r.loose||(l?r.loose=!0:this.rules.other.doubleBlankLine.test(s)&&(l=!0));let u,g=null;this.options.gfm&&(g=this.rules.other.listIsTask.exec(o),g&&(u="[ ] "!==g[0],o=o.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:s,task:!!g,checked:u,loose:!1,text:o,tokens:[]}),r.raw+=s}const o=r.items.at(-1);if(!o)return;o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd(),r.raw=r.raw.trimEnd();for(let e=0;e<r.items.length;e++)if(this.lexer.state.top=!1,r.items[e].tokens=this.lexer.blockTokens(r.items[e].text,[]),!r.loose){const t=r.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>this.rules.other.anyLine.test(e.raw)));r.loose=n}if(r.loose)for(let e=0;e<r.items.length;e++)r.items[e].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:s}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!this.rules.other.tableDelimiter.test(t[2]))return;const n=ee(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const e of s)this.rules.other.tableAlignRight.test(e)?i.align.push("right"):this.rules.other.tableAlignCenter.test(e)?i.align.push("center"):this.rules.other.tableAlignLeft.test(e)?i.align.push("left"):i.align.push(null);for(let e=0;e<n.length;e++)i.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:i.align[e]});for(const e of r)i.rows.push(ee(e,i.header.length).map(((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]}))));return i}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=te(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let s=0;s<e.length;s++)if("\\"===e[s])s++;else if(e[s]===t[0])n++;else if(e[s]===t[1]&&(n--,n<0))return s;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],s=e[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),ne(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:s?s.replace(this.rules.inline.anyPunctuation,"$1"):s},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return ne(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s)return;if(s[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...s[0]].length-1;let r,i,l=n,o=0;const a="*"===s[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,t=t.slice(-1*e.length+n);null!=(s=a.exec(t));){if(r=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!r)continue;if(i=[...r].length,s[3]||s[4]){l+=i;continue}if((s[5]||s[6])&&n%3&&!((n+i)%3)){o+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+o);const t=[...s[0]][0].length,a=e.slice(0,n+s.index+t+i);if(Math.min(n,i)%2){const e=a.slice(1,-1);return{type:"em",raw:a,text:e,tokens:this.lexer.inlineTokens(e)}}const c=a.slice(2,-2);return{type:"strong",raw:a,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(e),s=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&s&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=t[0],n="mailto:"+e;else{let s;do{s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(s!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}}class re{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new se,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:i,block:U.normal,inline:J.normal};this.options.pedantic?(n.block=U.pedantic,n.inline=J.pedantic):this.options.gfm&&(n.block=U.gfm,this.options.breaks?n.inline=J.breaks:n.inline=J.gfm),this.tokenizer.rules=n}static get rules(){return{block:U,inline:J}}static lex(e,t){return new re(t).lex(e)}static lexInline(e,t){return new re(t).inlineTokens(e)}lex(e){e=e.replace(i.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(i.tabCharGlobal," ").replace(i.spaceLine,""));e;){let s;if(this.options.extensions?.block?.some((n=>!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0))))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);const n=t.at(-1);1===s.raw.length&&void 0!==n?n.raw+="\n":t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.text,this.inlineQueue.at(-1).src=n.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);const n=t.at(-1);"paragraph"===n?.type||"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title});continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let r=e;if(this.options.extensions?.startBlock){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startBlock.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}if(this.state.top&&(s=this.tokenizer.paragraph(r))){const i=t.at(-1);n&&"paragraph"===i?.type?(i.raw+="\n"+s.raw,i.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(s),n=r.length!==e.length,e=e.substring(s.raw.length)}else if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);const n=t.at(-1);"text"===n?.type?(n.raw+="\n"+s.raw,n.text+="\n"+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(s)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,s=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(n));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,s.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let r=!1,i="";for(;e;){let s;if(r||(i=""),r=!1,this.options.extensions?.inline?.some((n=>!!(s=n.call({lexer:this},e,t))&&(e=e.substring(s.raw.length),t.push(s),!0))))continue;if(s=this.tokenizer.escape(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.tag(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.link(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(s.raw.length);const n=t.at(-1);"text"===s.type&&"text"===n?.type?(n.raw+=s.raw,n.text+=s.text):t.push(s);continue}if(s=this.tokenizer.emStrong(e,n,i)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.codespan(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.br(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.del(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.autolink(e)){e=e.substring(s.raw.length),t.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(e))){e=e.substring(s.raw.length),t.push(s);continue}let l=e;if(this.options.extensions?.startInline){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startInline.forEach((e=>{s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(l=e.substring(0,t+1))}if(s=this.tokenizer.inlineText(l)){e=e.substring(s.raw.length),"_"!==s.raw.slice(-1)&&(i=s.raw.slice(-1)),r=!0;const n=t.at(-1);"text"===n?.type?(n.raw+=s.raw,n.text+=s.text):t.push(s)}else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}}class ie{options;parser;constructor(t){this.options=t||e.defaults}space(e){return""}code({text:e,lang:t,escaped:n}){const s=(t||"").match(i.notSpaceStart)?.[0],r=e.replace(i.endingNewline,"")+"\n";return s?'<pre><code class="language-'+W(s)+'">'+(n?r:W(r,!0))+"</code></pre>\n":"<pre><code>"+(n?r:W(r,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,n=e.start;let s="";for(let t=0;t<e.items.length;t++){const n=e.items[t];s+=this.listitem(n)}const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+s+"</"+r+">\n"}listitem(e){let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+W(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let s="";for(let t=0;t<e.rows.length;t++){const r=e.rows[t];n="";for(let e=0;e<r.length;e++)n+=this.tablecell(r[e]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+s+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${W(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),r=Y(e);if(null===r)return s;let i='<a href="'+(e=r)+'"';return t&&(i+=' title="'+W(t)+'"'),i+=">"+s+"</a>",i}image({href:e,title:t,text:n}){const s=Y(e);if(null===s)return W(n);let r=`<img src="${e=s}" alt="${n}"`;return t&&(r+=` title="${W(t)}"`),r+=">",r}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:W(e.text)}}class le{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class oe{options;renderer;textRenderer;constructor(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new ie,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new le}static parse(e,t){return new oe(t).parse(e)}static parseInline(e,t){return new oe(t).parseInline(e)}parse(e,t=!0){let n="";for(let s=0;s<e.length;s++){const r=e[s];if(this.options.extensions?.renderers?.[r.type]){const e=r,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}const i=r;switch(i.type){case"space":n+=this.renderer.space(i);continue;case"hr":n+=this.renderer.hr(i);continue;case"heading":n+=this.renderer.heading(i);continue;case"code":n+=this.renderer.code(i);continue;case"table":n+=this.renderer.table(i);continue;case"blockquote":n+=this.renderer.blockquote(i);continue;case"list":n+=this.renderer.list(i);continue;case"html":n+=this.renderer.html(i);continue;case"paragraph":n+=this.renderer.paragraph(i);continue;case"text":{let r=i,l=this.renderer.text(r);for(;s+1<e.length&&"text"===e[s+1].type;)r=e[++s],l+="\n"+this.renderer.text(r);n+=t?this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):l;continue}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t=this.renderer){let n="";for(let s=0;s<e.length;s++){const r=e[s];if(this.options.extensions?.renderers?.[r.type]){const e=this.options.extensions.renderers[r.type].call({parser:this},r);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){n+=e||"";continue}}const i=r;switch(i.type){case"escape":case"text":n+=t.text(i);break;case"html":n+=t.html(i);break;case"link":n+=t.link(i);break;case"image":n+=t.image(i);break;case"strong":n+=t.strong(i);break;case"em":n+=t.em(i);break;case"codespan":n+=t.codespan(i);break;case"br":n+=t.br(i);break;case"del":n+=t.del(i);break;default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class ae{options;block;constructor(t){this.options=t||e.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?re.lex:re.lexInline}provideParser(){return this.block?oe.parse:oe.parseInline}}class ce{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=oe;Renderer=ie;TextRenderer=le;Lexer=re;Tokenizer=se;Hooks=ae;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const s of e)switch(n=n.concat(t.call(this,s)),s.type){case"table":{const e=s;for(const s of e.header)n=n.concat(this.walkTokens(s.tokens,t));for(const s of e.rows)for(const e of s)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=s;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=s;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((s=>{const r=e[s].flat(1/0);n=n.concat(this.walkTokens(r,t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let s=e.renderer.apply(this,t);return!1===s&&(s=n.apply(this,t)),s}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new ie(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const s=n,r=e.renderer[s],i=t[s];t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new se(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const s=n,r=e.tokenizer[s],i=t[s];t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new ae;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const s=n,r=e.hooks[s],i=t[s];ae.passThroughHooks.has(n)?t[s]=e=>{if(this.defaults.async)return Promise.resolve(r.call(t,e)).then((e=>i.call(t,e)));const n=r.call(t,e);return i.call(t,n)}:t[s]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,s=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(s.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return re.lex(e,t??this.defaults)}parser(e,t){return oe.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{const s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(!0===this.defaults.async&&!1===s.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));r.hooks&&(r.hooks.options=r,r.hooks.block=e);const l=r.hooks?r.hooks.provideLexer():e?re.lex:re.lexInline,o=r.hooks?r.hooks.provideParser():e?oe.parse:oe.parseInline;if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(t):t).then((e=>l(e,r))).then((e=>r.hooks?r.hooks.processAllTokens(e):e)).then((e=>r.walkTokens?Promise.all(this.walkTokens(e,r.walkTokens)).then((()=>e)):e)).then((e=>o(e,r))).then((e=>r.hooks?r.hooks.postprocess(e):e)).catch(i);try{r.hooks&&(t=r.hooks.preprocess(t));let e=l(t,r);r.hooks&&(e=r.hooks.processAllTokens(e)),r.walkTokens&&this.walkTokens(e,r.walkTokens);let n=o(e,r);return r.hooks&&(n=r.hooks.postprocess(n)),n}catch(e){return i(e)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+W(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}}const he=new ce;function pe(e,t){return he.parse(e,t)}pe.options=pe.setOptions=function(e){return he.setOptions(e),pe.defaults=he.defaults,n(pe.defaults),pe},pe.getDefaults=t,pe.defaults=e.defaults,pe.use=function(...e){return he.use(...e),pe.defaults=he.defaults,n(pe.defaults),pe},pe.walkTokens=function(e,t){return he.walkTokens(e,t)},pe.parseInline=he.parseInline,pe.Parser=oe,pe.parser=oe.parse,pe.Renderer=ie,pe.TextRenderer=le,pe.Lexer=re,pe.lexer=re.lex,pe.Tokenizer=se,pe.Hooks=ae,pe.parse=pe;const ue=pe.options,ge=pe.setOptions,ke=pe.use,de=pe.walkTokens,fe=pe.parseInline,xe=pe,be=oe.parse,we=re.lex;e.Hooks=ae,e.Lexer=re,e.Marked=ce,e.Parser=oe,e.Renderer=ie,e.TextRenderer=le,e.Tokenizer=se,e.getDefaults=t,e.lexer=we,e.marked=pe,e.options=ue,e.parse=xe,e.parseInline=fe,e.parser=be,e.setOptions=ge,e.use=ke,e.walkTokens=de})); |
| | |
| | | // } |
| | | |
| | | /** |
| | | * @description 微信业务请求 |
| | | * 39上 qingqiumarket.cn|cloud.mk9h.cn|sso.mk9h.cn |
| | | * @description 快递查询 |
| | | */ |
| | | wxNginxRequest (url, method, param) { |
| | | let _url = url |
| | | |
| | | if (!/^http/.test(url)) { |
| | | _url = window.GLOB.location + '/' + url |
| | | if (process.env.NODE_ENV === 'production') { |
| | | _url = document.location.origin + '/' + url |
| | | } |
| | | } |
| | | if (/qingqiumarket.cn|cloud.mk9h.cn/.test(_url)) { |
| | | _url = _url.replace('http://qingqiumarket.cn/', 'http://qingqiumarket.cn:8080/') |
| | | _url = _url.replace('http://cloud.mk9h.cn/', 'http://cloud.mk9h.cn:8080/') |
| | | _url = _url.replace('https://qingqiumarket.cn/', 'https://qingqiumarket.cn:8443/') |
| | | _url = _url.replace('https://cloud.mk9h.cn/', 'https://cloud.mk9h.cn:8443/') |
| | | } |
| | | |
| | | if (param) { |
| | | return axios({ |
| | | url: _url, |
| | | method, |
| | | data: param |
| | | }) |
| | | } |
| | | |
| | | expressRequest (url) { |
| | | return axios({ |
| | | url: _url, |
| | | method |
| | | url: window.GLOB.location + '/' + url, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | |
| | | } else { |
| | | param.linkurl = window.GLOB.linkurl |
| | | } |
| | | } else if (binding_type === 'cloud') { // 登录云端 |
| | | delete param.rduri |
| | | url = window.atob('aHR0cHM6Ly9jbG91$mkZC5tazloLmNu'.replace('$mk', '')) + '/webapi/dologon/s_visitor_login' |
| | | } |
| | | |
| | | param.LText = md5(window.btoa(_SessionUid + param.timestamp + (param.linkurl || ''))) |
| | |
| | | * @description oss文件上传 |
| | | */ |
| | | fileOssUpload (param) { |
| | | let _url = window.GLOB.location + '/file/oss/upload' |
| | | if (process.env.NODE_ENV === 'production') { |
| | | _url = document.location.origin + '/file/oss/upload' |
| | | } |
| | | if (/qingqiumarket.cn|cloud.mk9h.cn/.test(_url)) { |
| | | _url = _url.replace('http://qingqiumarket.cn/', 'http://qingqiumarket.cn:8080/') |
| | | _url = _url.replace('http://cloud.mk9h.cn/', 'http://cloud.mk9h.cn:8080/') |
| | | _url = _url.replace('https://qingqiumarket.cn/', 'https://qingqiumarket.cn:8443/') |
| | | _url = _url.replace('https://cloud.mk9h.cn/', 'https://cloud.mk9h.cn:8443/') |
| | | } |
| | | |
| | | return axios({ |
| | | url: _url, |
| | | url: window.GLOB.location + '/file/oss/upload', |
| | | method: 'post', |
| | | headers: { 'Content-Type': 'multipart/form-data' }, |
| | | data: param |
| | |
| | | GLOB.host = window.location.host + (_service ? '_' + _service : '') |
| | | GLOB.baseurl = document.location.origin + '/' + GLOB.service |
| | | GLOB.linkurl = GLOB.baseurl + 'index.html' |
| | | GLOB.location = document.location.origin |
| | | } else { |
| | | GLOB.location = config.host |
| | | GLOB.service = config.service |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | delete card.$c_el |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | |
| | | changeStyle = () => { |
| | | const { card } = this.state |
| | | let options = ['width', 'height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight', 'position', 'transform'] |
| | | |
| | | MKEmitter.emit('changeStyle', ['width', 'height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight', 'position', 'transform'], card.style, this.getStyle) |
| | | if (card.style && !card.style.width) { |
| | | if (card.style.height) { |
| | | options = ['height', 'width', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight', 'position', 'transform'] |
| | | } else if (card.style.position && ['fixed', 'absolute'].includes(card.style.position)) { |
| | | options = ['position', 'width', 'height', 'background', 'border', 'padding', 'margin', 'shadow', 'clear', 'minHeight', 'transform'] |
| | | } |
| | | } |
| | | |
| | | MKEmitter.emit('changeStyle', options, card.style, this.getStyle) |
| | | } |
| | | |
| | | getStyle = (style) => { |
| | |
| | | let _style = resetStyle(card.style) |
| | | |
| | | return ( |
| | | <div className="menu-balcony-edit-box" style={_style} id={card.uuid}> |
| | | <div className={'menu-balcony-edit-box' + (['fixed', 'absolute'].includes(_style.position) ? ' ctrl-position' : '')} style={_style} id={card.uuid}> |
| | | {card.style.height ? <ColumnHeightOutlined className="fixed-height" title="定高" /> : null} |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | |
| | | color: orange; |
| | | } |
| | | } |
| | | .menu-balcony-edit-box.ctrl-position { |
| | | width: auto!important; |
| | | height: auto!important; |
| | | } |
| | | .menu-balcony-edit-box::after { |
| | | display: block; |
| | | content: ' '; |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_sc |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | if (!card.plot.valueField) { |
| | | card.errors.push({ level: 0, detail: '图表信息尚未设置!'}) |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | |
| | | let columns = card.columns.map(c => c.field) |
| | | if (!card.plot.Xaxis) { |
| | | card.errors.push({ level: 0, detail: '坐标轴尚未设置!'}) |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | let columns = card.columns.map(c => c.field) |
| | | if (!card.plot.valueField) { |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | if (!card.plot.Xaxis) { |
| | | card.errors.push({ level: 0, detail: '名称字段尚未设置!'}) |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | |
| | | if (!card.plot.Xaxis) { |
| | | card.errors.push({ level: 0, detail: '坐标轴尚未设置!'}) |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | this.setState({ |
| | | card: card |
| | |
| | | card.errors = checkComponent(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | padding: 5px; |
| | | background: rgba(255, 255, 255, 0.55); |
| | | } |
| | | .empty-content { |
| | | text-align: center; |
| | | font-size: 30px; |
| | | margin: 0; |
| | | line-height: 90px; |
| | | color: #bcbcbc; |
| | | } |
| | | } |
| | | .menu-editor-sand-box::after { |
| | | display: block; |
| | |
| | | } |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | this.setState({ |
| | | card: card |
| | | }) |
| | |
| | | } |
| | | |
| | | res.tbStyle = res.tbStyle.join(' ') |
| | | } |
| | | |
| | | if (res.loads) { |
| | | if (res.loads.includes('preload')) { |
| | | res.preload = 'true' |
| | | } |
| | | if (res.loads.includes('loaded')) { |
| | | res.loaded = 'true' |
| | | } |
| | | |
| | | delete res.loads |
| | | } |
| | | |
| | | delete res.splitLine |
| | |
| | | } trigger="hover"> |
| | | <ToolOutlined /> |
| | | </Popover> |
| | | <BraftContent value={card.wrap.datatype !== 'static' ? '<p class="empty-content">富文本</p>' : card.html}/> |
| | | {/* <BraftContent value={card.wrap.datatype !== 'static' ? '<p class="empty-content"><span>富文本<span>字符替换:$blank_space_**$(空格,其中**代表空格数)。 </span></span></p>' : card.html}/> */} |
| | | <BraftContent value={card.wrap.datatype !== 'static' ? '<p class="empty-content"><span>富文本</span></p>' : card.html}/> |
| | | <div className="component-name"> |
| | | <div className="center"> |
| | | <div className="title">{card.name}</div> |
| | |
| | | background: rgba(255, 255, 255, 0.55); |
| | | } |
| | | .empty-content { |
| | | text-align: center; |
| | | font-size: 30px; |
| | | margin: 0; |
| | | line-height: 90px; |
| | | height: 90px; |
| | | color: #bcbcbc; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | overflow: hidden; |
| | | |
| | | span { |
| | | display: inline-block; |
| | | text-align: center; |
| | | span { |
| | | display: block; |
| | | font-size: 14px; |
| | | color: rgba(0, 0, 0, 0.65); |
| | | white-space: nowrap; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .menu-normal-editor-box.th-light { |
| | |
| | | tbStyle = tbStyle.filter(n => n !== 'deep-split') |
| | | splitLine = 'true' |
| | | } |
| | | let loads = [] |
| | | if (wrap.loaded === 'true') { |
| | | loads.push('loaded') |
| | | } |
| | | if (wrap.preload === 'true') { |
| | | loads.push('preload') |
| | | } |
| | | |
| | | const cardWrapForm = [ |
| | | { |
| | |
| | | ], |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'loaded', |
| | | type: 'checkbox', |
| | | field: 'loads', |
| | | label: '布局调整', |
| | | initval: wrap.loaded || 'false', |
| | | initval: loads, |
| | | required: false, |
| | | tooltip: '预处理入参html、data,返回修改后的html;后处理入参为html,可通过页面元素的样式调整并返回处理后的html。', |
| | | options: [ |
| | | {value: 'false', label: '关闭'}, |
| | | {value: 'true', label: '开启'}, |
| | | {value: 'preload', label: '预处理'}, |
| | | {value: 'loaded', label: '后处理'}, |
| | | ], |
| | | controlFields: [ |
| | | {field: 'loadedfunc', values: ['true']}, |
| | | {field: 'prefunc', values: ['preload']}, |
| | | {field: 'loadedfunc', values: ['loaded']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'codemirror', |
| | | field: 'prefunc', |
| | | label: '预处理脚本', |
| | | initval: wrap.prefunc || '', |
| | | required: true, |
| | | span: 24 |
| | | }, |
| | | { |
| | | type: 'codemirror', |
| | | field: 'loadedfunc', |
| | | label: '处理脚本', |
| | | label: '后处理脚本', |
| | | initval: wrap.loadedfunc || '', |
| | | required: true, |
| | | span: 24 |
| | |
| | | card.width = card.wrap.width |
| | | card.name = card.wrap.name |
| | | card.errors = [] |
| | | let idCtrl = false |
| | | |
| | | card.$c_fc = true |
| | | if (card.wrap.datatype === 'dynamic') { |
| | | let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | |
| | | card.$c_ds = true |
| | | card.errors = checkComponent(card) |
| | | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } |
| | | } |
| | | item.fields.forEach(m => { |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `请检查关联主表“${m.label}”是否有效`}) |
| | | } |
| | | }) |
| | | }) |
| | | } else { |
| | | let supModule = '' |
| | | if (card.wrap.datatype === 'static') { |
| | | supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : '' |
| | | } |
| | | |
| | | card.$tables = getTables(card) |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } |
| | | } |
| | | item.fields.forEach(m => { |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule && card.wrap.datatype === 'static') { |
| | | card.errors.push({ level: 1, detail: `请检查关联主表“${m.label}”是否有效`}) |
| | | } |
| | | }) |
| | | }) |
| | | delete card.$c_ds |
| | | } |
| | | |
| | | card.idCtrl = idCtrl |
| | | card.errors = checkComponent(card) |
| | | card.$tables = getTables(card) |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_fc |
| | | |
| | | this.setState({ |
| | | card: card |
| | |
| | | card.width = card.wrap.width |
| | | card.name = card.wrap.name |
| | | card.errors = [] |
| | | let idCtrl = false |
| | | |
| | | card.$c_fc = true |
| | | if (card.wrap.datatype === 'dynamic') { |
| | | let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | |
| | | card.$c_ds = true |
| | | card.errors = checkComponent(card) |
| | | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } |
| | | } |
| | | item.fields.forEach(m => { |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `请检查分组“${item.setting.title}”中关联主表“${m.label}”是否有效`}) |
| | | } |
| | | }) |
| | | }) |
| | | } else { |
| | | let supModule = '' |
| | | if (card.wrap.datatype === 'static') { |
| | | supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : '' |
| | | } |
| | | |
| | | card.$tables = getTables(card) |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } |
| | | } |
| | | item.fields.forEach(m => { |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule && card.wrap.datatype === 'static') { |
| | | card.errors.push({ level: 1, detail: `请检查分组“${item.setting.title}”中关联主表“${m.label}”是否有效`}) |
| | | } |
| | | }) |
| | | }) |
| | | delete card.$c_ds |
| | | } |
| | | |
| | | card.idCtrl = idCtrl |
| | | card.errors = checkComponent(card) |
| | | card.$tables = getTables(card) |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_fc |
| | | |
| | | this.setState({ |
| | | card: card |
| | |
| | | card.width = card.wrap.width |
| | | card.name = card.wrap.name |
| | | card.errors = [] |
| | | let idCtrl = false |
| | | |
| | | |
| | | card.$c_fc = true |
| | | if (card.wrap.datatype === 'dynamic') { |
| | | let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | |
| | | card.$c_ds = true |
| | | card.errors = checkComponent(card) |
| | | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } |
| | | } |
| | | item.fields.forEach(m => { |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule) { |
| | | card.errors.push({ level: 1, detail: `请检查分组“${item.setting.title}”中关联主表“${m.label}”是否有效`}) |
| | | } |
| | | }) |
| | | }) |
| | | } else { |
| | | let supModule = '' |
| | | if (card.wrap.datatype === 'static') { |
| | | supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : '' |
| | | } |
| | | |
| | | card.$tables = getTables(card) |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | card.errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } |
| | | } |
| | | item.fields.forEach(m => { |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule && card.wrap.datatype === 'static') { |
| | | card.errors.push({ level: 1, detail: `请检查分组“${item.setting.title}”中关联主表“${m.label}”是否有效`}) |
| | | } |
| | | }) |
| | | }) |
| | | delete card.$c_ds |
| | | } |
| | | |
| | | card.idCtrl = idCtrl |
| | | card.errors = checkComponent(card) |
| | | card.$tables = getTables(card) |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_fc |
| | | |
| | | this.setState({ |
| | | card: card |
| | |
| | | } |
| | | |
| | | getWrapForms = () => { |
| | | const { setting } = this.state.group |
| | | const { group } = this.state |
| | | |
| | | return getSettingForm(setting) |
| | | let list = [] |
| | | group.components.forEach(item => { |
| | | if (item.type === 'card' && item.subtype === 'propcard') { |
| | | list.push({ |
| | | value: item.uuid, |
| | | label: item.name, |
| | | disabled: item.wrap.empty !== 'hidden' |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | return getSettingForm(group.setting, list) |
| | | } |
| | | |
| | | updateWrap = (res) => { |
| | |
| | | <NormalHeader hideSearch="true" config={group} updateComponent={this.updateComponent}/> |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <NormalForm title="分组设置" width={700} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <NormalForm title="分组设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}> |
| | | <EditOutlined style={{color: '#1890ff'}} title="编辑"/> |
| | | </NormalForm> |
| | | <CopyComponent type="group" card={group}/> |
| | |
| | | /** |
| | | * @description Wrap表单配置信息 |
| | | */ |
| | | export default function (setting) { |
| | | export default function (setting, list) { |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | let appType = sessionStorage.getItem('appType') |
| | | |
| | |
| | | precision: 0, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'select', |
| | | field: 'bindPropId', |
| | | label: '显示状态绑定', |
| | | initval: setting.bindPropId || '', |
| | | tooltip: '分组可绑定设有空值隐藏的属性卡,当属性卡隐藏时分组一同隐藏。', |
| | | required: false, |
| | | options: list, |
| | | forbid: appType === 'mob' |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // field: 'print', |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | |
| | | this.setState({ |
| | | card: card |
| | |
| | | card.$c_ds = card.wrap.datatype === 'dynamic' |
| | | card.errors = checkComponent(card) |
| | | |
| | | delete card.$c_ds |
| | | |
| | | if (card.errors.length === 0) { |
| | | if (card.buyer.setting.interType === 'system' && card.buyer.setting.execute !== 'false' && !card.buyer.setting.dataresource) { |
| | | card.errors.push({ level: 0, detail: '-购买方 未设置数据源!'}) |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_cl |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | forms.forEach(col => { |
| | | if (/date/.test(col.datatype)) { |
| | | vals.push(`'1949-10-01'`) |
| | | } else if (col.editType && ['select', 'popSelect'].includes(col.editType)) { |
| | | vals.push(`'0'`) |
| | | } else if (col.type === 'number') { |
| | | vals.push(`1`) |
| | | } else { |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_cl |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | delete card.$c_cl |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | if (card.errors.length === 0) { |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_sc |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | card.$tables = getTables(card) |
| | | } |
| | | |
| | | delete card.$c_ds |
| | | delete card.$c_ac |
| | | |
| | | if (!card.wrap.parentField || !card.wrap.valueField || !card.wrap.labelField) { |
| | | card.errors.push({ level: 0, detail: '未设置基本信息!'}) |
| | | } else { |
| | |
| | | padding: 5px; |
| | | background: rgba(255, 255, 255, 0.55); |
| | | } |
| | | .empty-content { |
| | | text-align: center; |
| | | font-size: 30px; |
| | | margin: 0; |
| | | line-height: 90px; |
| | | color: #bcbcbc; |
| | | } |
| | | .model-menu-action-list:not(.length0) { |
| | | margin: 10px 0px; |
| | | } |
| | |
| | | width={'75vw'} |
| | | maskClosable={false} |
| | | okText="提交" |
| | | onCancel={() => {this.setState({ visible: false, loading: false }) }} |
| | | onCancel={this.cancel} |
| | | footer={[ |
| | | config.subtype !== 'dualdatacard' && record.interType === 'inner' ? <CreateFunc key="create" getMsg={this.creatFunc}/> : null, |
| | | <Button key="cancel" onClick={this.cancel}>取消</Button>, |
| | |
| | | import React, { Component } from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { fromJS } from 'immutable' |
| | | import { Modal, Button, Drawer, Tooltip } from 'antd' |
| | | import { Modal, Button, Tooltip, Table } from 'antd' |
| | | import { ClockCircleOutlined, CheckCircleOutlined, CloseCircleOutlined, LoadingOutlined } from '@ant-design/icons' |
| | | |
| | | import Api from '@/api' |
| | |
| | | successIds: [], |
| | | errorIds: [], |
| | | errorMsg: {}, |
| | | execId: '' |
| | | execId: '', |
| | | columns: [ |
| | | { |
| | | title: '组件名', |
| | | dataIndex: 'name', |
| | | width: '25%' |
| | | }, |
| | | { |
| | | title: '名称', |
| | | dataIndex: 'label', |
| | | width: '25%' |
| | | }, |
| | | { |
| | | title: '上级', |
| | | dataIndex: 'supName', |
| | | width: '20%', |
| | | render: (_, record) => { |
| | | if (record.supName) { |
| | | return `${record.supName}-${record.tabName}` |
| | | } |
| | | return '' |
| | | } |
| | | }, |
| | | { |
| | | title: '状态', |
| | | dataIndex: 'status', |
| | | align: 'center', |
| | | width: '15%', |
| | | render: (_, record) => { |
| | | let status = <ClockCircleOutlined /> |
| | | |
| | | if (this.state.successIds.includes(record.uuid)) { |
| | | status = <CheckCircleOutlined /> |
| | | } else if (this.state.errorIds.includes(record.uuid)) { |
| | | if (this.state.errorMsg[record.uuid]) { |
| | | status = <Tooltip placement="topLeft" title={this.state.errorMsg[record.uuid]}> |
| | | <CloseCircleOutlined /> |
| | | </Tooltip> |
| | | } else { |
| | | status = <CloseCircleOutlined /> |
| | | } |
| | | } else if (record.uuid === this.state.execId) { |
| | | status = <LoadingOutlined /> |
| | | } |
| | | return status |
| | | } |
| | | }, |
| | | { |
| | | title: 'DeepSeek', |
| | | dataIndex: 'DeepSeek', |
| | | align: 'center', |
| | | width: '15%', |
| | | render: (_, record) => { |
| | | return <span className="anticon anticon-deepseek" onClick={() => { |
| | | if (record.sql) { |
| | | sessionStorage.setItem('deepseek_sql', `请检查以下代码,指出其可优化的地方\n${record.sql}`) |
| | | |
| | | window.open('#/ai') |
| | | |
| | | setTimeout(() => { |
| | | sessionStorage.removeItem('deepseek_sql') |
| | | }, 0) |
| | | } |
| | | }}> |
| | | <svg viewBox="0 0 1391 1024" width="1.5em" height="1.5em" fill="currentColor"> |
| | | <path d="M1361.92 83.136c-14.272-7.04-20.416 6.272-28.736 12.992-2.816 2.24-5.248 5.12-7.68 7.68-20.8 22.336-45.056 36.864-76.8 35.136-46.464-2.56-86.08 12.032-121.152 47.616-7.552-43.904-32.256-70.08-69.888-86.912-19.712-8.768-39.68-17.472-53.376-36.48-9.664-13.44-12.288-28.48-17.216-43.264-3.008-8.96-6.08-18.112-16.32-19.712-11.2-1.728-15.552 7.68-19.968 15.424-17.536 32.128-24.32 67.52-23.68 103.296 1.6 80.448 35.52 144.576 103.04 190.144 7.68 5.312 9.6 10.56 7.168 18.176-4.608 15.68-10.048 30.976-14.912 46.592-3.072 10.112-7.68 12.352-18.304 8a308.224 308.224 0 0 1-97.28-66.176c-48-46.4-91.392-97.664-145.472-137.792a655.36 655.36 0 0 0-38.528-26.432c-55.232-53.76 7.232-97.792 21.632-103.04 15.104-5.376 5.312-24.128-43.52-23.936C652.032 24.704 607.36 41.024 550.4 62.72a156.8 156.8 0 0 1-26.048 7.68 542.016 542.016 0 0 0-161.408-5.696c-105.6 11.904-189.888 61.824-251.904 147.2C36.608 314.24 19.072 430.848 40.512 552.32c22.528 128 87.808 234.048 188.16 316.992 104 85.888 223.808 128 360.512 120 82.944-4.864 175.424-16 279.68-104.32 26.368 13.056 53.888 18.24 99.712 22.272 35.2 3.328 69.184-1.792 95.424-7.232 41.216-8.704 38.4-46.848 23.424-53.888-120.576-56.32-94.208-33.408-118.272-51.84 61.376-72.768 153.792-148.224 189.952-392.768 2.816-19.392 0.384-31.552 0-47.36-0.256-9.536 1.92-13.312 12.8-14.4a231.04 231.04 0 0 0 86.592-26.56c78.272-42.88 109.696-113.024 117.184-197.184 1.088-12.928-0.256-26.24-13.76-32.96z m-681.408 757.76c-116.928-92.096-173.696-122.368-197.12-120.96-21.888 1.152-17.984 26.304-13.184 42.624 5.12 16.128 11.648 27.328 20.8 41.408 6.464 9.408 10.752 23.424-6.272 33.92-37.76 23.424-103.232-7.872-106.24-9.472-76.288-44.8-140.032-104.192-184.96-185.344-43.264-78.08-68.48-161.92-72.576-251.328-1.152-21.632 5.184-29.312 26.688-33.152a265.6 265.6 0 0 1 85.696-2.24c119.296 17.472 220.928 71.04 306.048 155.52 48.768 48.32 85.504 105.92 123.392 162.176 40.256 59.776 83.648 116.672 138.88 163.392 19.392 16.32 35.072 28.8 49.92 37.952-44.928 5.056-119.872 6.08-171.008-34.496z m56.064-361.024a17.152 17.152 0 1 1 2.752 9.6 16.896 16.896 0 0 1-2.752-9.664z m174.08 89.472a102.72 102.72 0 0 1-33.024 8.96 70.528 70.528 0 0 1-44.736-14.272c-15.296-12.8-26.176-19.968-30.848-42.496a99.264 99.264 0 0 1 0.832-32.96c4.032-18.368-0.384-30.08-13.248-40.768-10.624-8.768-23.872-11.072-38.592-11.072a31.168 31.168 0 0 1-14.272-4.416c-6.144-3.072-11.136-10.752-6.336-20.16 1.536-3.008 8.96-10.304 10.752-11.712 19.84-11.328 42.88-7.68 64.192 0.896 19.712 8.064 34.56 22.848 56 43.776 21.952 25.28 25.792 32.384 38.4 51.328 9.856 14.848 18.816 30.208 24.96 47.616 3.776 10.88-1.152 19.776-14.08 25.28z"></path> |
| | | </svg> |
| | | </span> |
| | | } |
| | | } |
| | | ] |
| | | } |
| | | |
| | | sqlList = [] |
| | |
| | | _sql = _sql.replace(/@BID@/ig, `'${BID}'`) |
| | | _sql = _sql.replace(/@typename@/ig, `'typename'`) |
| | | _sql = _sql.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, `''`) |
| | | _sql = _sql.replace(/\$check@|@check\$/ig, '') |
| | | |
| | | return _sql |
| | | } |
| | |
| | | aaa: select @ErrorCode as ErrorCode,@retmsg as retmsg` |
| | | } |
| | | |
| | | sql = sql.replace(/\$check@|@check\$/ig, '') |
| | | |
| | | return sql |
| | | } |
| | | |
| | |
| | | forms.forEach(col => { |
| | | if (/date/.test(col.datatype)) { |
| | | vals.push(`'1949-10-01'`) |
| | | } else if (col.editType && ['select', 'popSelect'].includes(col.editType)) { |
| | | vals.push(`'0'`) |
| | | } else if (col.type === 'number') { |
| | | vals.push(`1`) |
| | | } else { |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { visible, sqlList, status, successIds, errorIds, execId, errorMsg } = this.state |
| | | const { visible, status, columns, sqlList } = this.state |
| | | |
| | | return ( |
| | | <> |
| | | <Button className="mk-border-yellow" icon="bug" onClick={this.trigger}>调试</Button> |
| | | <Drawer |
| | | <Button className="mk-border-yellow" icon="bug" onClick={this.trigger}>DeepSeek调试</Button> |
| | | <Modal |
| | | className="debug-modal" |
| | | width={600} |
| | | title="DeepSeek调试" |
| | | width="60vw" |
| | | visible={visible} |
| | | closable={false} |
| | | placement="left" |
| | | centered={true} |
| | | footer={null} |
| | | destroyOnClose |
| | | > |
| | | <div className="mk-sql-wrap"> |
| | | <div className="body"> |
| | | {sqlList.map(item => { |
| | | let other = '' |
| | | if (item.supName) { |
| | | other = `上级:${item.supName}-${item.tabName}` |
| | | } |
| | | |
| | | let status = <ClockCircleOutlined /> |
| | | |
| | | if (successIds.includes(item.uuid)) { |
| | | status = <CheckCircleOutlined /> |
| | | } else if (errorIds.includes(item.uuid)) { |
| | | if (errorMsg[item.uuid]) { |
| | | status = <Tooltip placement="topLeft" title={errorMsg[item.uuid]}> |
| | | <CloseCircleOutlined /> |
| | | </Tooltip> |
| | | } else { |
| | | status = <CloseCircleOutlined /> |
| | | } |
| | | } else if (item.uuid === execId) { |
| | | status = <LoadingOutlined /> |
| | | } |
| | | |
| | | return <div className="sql-item" key={item.uuid}> |
| | | <div className="sql-1" title={item.name}><div>{item.name}</div></div> |
| | | <div className="sql-2" title={item.label}><div>{item.label}</div></div> |
| | | <div className="sql-3" title={other}><div>{other}</div></div> |
| | | <div className="sql-4">{status}</div> |
| | | </div> |
| | | })} |
| | | </div> |
| | | <div className="mk-sql-wrap mk-scrollbar"> |
| | | <Table |
| | | bordered |
| | | rowKey="uuid" |
| | | dataSource={sqlList} |
| | | columns={columns} |
| | | pagination={false} |
| | | /> |
| | | </div> |
| | | <div className="mk-footer"> |
| | | {status === 'error' ? <Button key="skip" className="mk-border-green" onClick={this.roopSql}> |
| | |
| | | 关闭 |
| | | </Button> |
| | | </div> |
| | | </Drawer> |
| | | </Modal> |
| | | </> |
| | | ) |
| | | } |
| | |
| | | .debug-modal { |
| | | .ant-drawer-body { |
| | | .ant-modal-body { |
| | | position: relative; |
| | | height: 100vh; |
| | | padding: 0 0 50px 0; |
| | | overflow: hidden; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | |
| | | .mk-sql-wrap { |
| | | padding: 10px; |
| | | max-height: calc(100vh - 150px); |
| | | min-height: 50vh; |
| | | padding: 15px 20px; |
| | | |
| | | .sql-item { |
| | | display: flex; |
| | | min-height: 30px; |
| | | |
| | | .sql-1, .sql-2 { |
| | | flex: 1; |
| | | width: 25%; |
| | | max-width: 25%; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | div { |
| | | overflow: hidden; |
| | | word-break: break-word; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | } |
| | | .sql-3 { |
| | | flex: 1; |
| | | width: 30%; |
| | | max-width: 30%; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | div { |
| | | overflow: hidden; |
| | | word-break: break-word; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | } |
| | | .sql-4 { |
| | | flex: 1; |
| | | width: 20%; |
| | | max-width: 20%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | .anticon { |
| | | font-size: 16px; |
| | | } |
| | | .anticon-clock-circle { |
| | | color: #c8c8c8; |
| | | } |
| | | .anticon-check-circle { |
| | | color: #26C281; |
| | | } |
| | | .anticon-close-circle { |
| | | color: red; |
| | | } |
| | | .anticon-loading { |
| | | color: orange; |
| | | } |
| | | } |
| | | .ant-table-thead > tr > th, .ant-table-tbody > tr > td { |
| | | padding: 12px; |
| | | } |
| | | .header { |
| | | border-bottom: 1px solid #e8e8e8; |
| | | .anticon { |
| | | font-size: 16px; |
| | | } |
| | | .body { |
| | | max-height: calc(100vh - 60px); |
| | | overflow-y: auto; |
| | | .anticon-clock-circle { |
| | | color: #c8c8c8; |
| | | } |
| | | } |
| | | |
| | | .mk-sql-wrap .body::-webkit-scrollbar { |
| | | width: 7px; |
| | | } |
| | | .mk-sql-wrap .body::-webkit-scrollbar-thumb { |
| | | border-radius: 5px; |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.13); |
| | | background: rgba(0, 0, 0, 0.13); |
| | | } |
| | | .mk-sql-wrap .body::-webkit-scrollbar-track { |
| | | box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05); |
| | | border-radius: 3px; |
| | | border: 1px solid rgba(0, 0, 0, 0.07); |
| | | background: rgba(0, 0, 0, 0); |
| | | .anticon-check-circle { |
| | | color: #26C281; |
| | | } |
| | | .anticon-close-circle { |
| | | color: red; |
| | | } |
| | | .anticon-loading { |
| | | color: orange; |
| | | } |
| | | .anticon-deepseek { |
| | | cursor: pointer; |
| | | color: #4D6BFE; |
| | | } |
| | | } |
| | | } |
| | | .mk-footer { |
| | | position: absolute; |
| | | bottom: 0px; |
| | | width: 100%; |
| | | height: 45px; |
| | | height: 50px; |
| | | line-height: 50px; |
| | | border-top: 1px solid #e8e8e8; |
| | | text-align: right; |
| | |
| | | exec = () => { |
| | | let config = fromJS(this.props.config).toJS() |
| | | |
| | | let resetForm = (m) => { |
| | | if (m.field) { |
| | | m.field = m.field.toLowerCase() |
| | | } |
| | | if (m.type === 'split' && m.splitctrl) { |
| | | m.splitctrl = m.splitctrl.toLowerCase() |
| | | } |
| | | if (m.tabField) { |
| | | m.tabField = m.tabField.toLowerCase() |
| | | } |
| | | if (m.linkField) { |
| | | m.linkField = m.linkField.toLowerCase() |
| | | } |
| | | if (m.supField) { |
| | | m.supField = m.supField.toLowerCase() |
| | | } |
| | | if (m.phoneField) { |
| | | m.phoneField = m.phoneField.toLowerCase() |
| | | } |
| | | if (m.linkSubField) { |
| | | m.linkSubField = m.linkSubField.map(n => n.toLowerCase()) |
| | | m.linkSubField = Array.from(new Set(m.linkSubField)) |
| | | } |
| | | } |
| | | let resetMark = (m) => { |
| | | m.marks = m.marks.map(n => { |
| | | if (n.field && Array.isArray(n.field)) { |
| | | if (n.field[1] === 'static') { |
| | | n.field[0] = n.field[0] === '$Index' ? n.field[0] : n.field[0].toLowerCase() |
| | | } else { |
| | | n.field = n.field.map(p => p === '$Index' ? p : p.toLowerCase()) |
| | | } |
| | | } |
| | | |
| | | return n |
| | | }) |
| | | } |
| | | let resetElement = (m) => { |
| | | if (m.datatype === 'dynamic' && m.field) { |
| | | if (m.field && m.field !== '$Index') { |
| | | m.field = m.field.toLowerCase() |
| | | } |
| | | if (m.posterField) { |
| | |
| | | m.linkurl = m.linkurl.toLowerCase() |
| | | } |
| | | if (m.modal && m.modal.fields) { |
| | | if (m.modal.setting && m.modal.setting.focus) { |
| | | m.modal.setting.focus = m.modal.setting.focus.toLowerCase() |
| | | } |
| | | m.modal.fields = m.modal.fields.map(col => { |
| | | if (col.field) { |
| | | col.field = col.field.toLowerCase() |
| | | } |
| | | if (col.type === 'split' && col.splitctrl) { |
| | | col.splitctrl = col.splitctrl.toLowerCase() |
| | | } |
| | | resetForm(col) |
| | | return col |
| | | }) |
| | | } |
| | |
| | | return col |
| | | }) |
| | | } |
| | | if (m.verify.billcodes) { |
| | | m.verify.billcodes = m.verify.billcodes.map(col => { |
| | | if (col.field) { |
| | | col.field = col.field.toLowerCase() |
| | | } |
| | | if (col.linkField && col.linkField !== 'BID') { |
| | | col.linkField = col.linkField.toLowerCase() |
| | | } |
| | | return col |
| | | }) |
| | | } |
| | | |
| | | if (m.verify.accountfield && m.verify.accountfield !== 'BID') { |
| | | m.verify.accountfield = m.verify.accountfield.toLowerCase() |
| | | } |
| | |
| | | if (m.controlField) { |
| | | m.controlField = m.controlField.toLowerCase() |
| | | } |
| | | |
| | | if (m.marks && m.marks.length) { |
| | | resetMark(m) |
| | | } |
| | | if (m.config && m.config.components) { |
| | | m.config.components = _replace(m.config.components) |
| | | } |
| | |
| | | let _replace = (components) => { |
| | | return components.map(item => { |
| | | if (item.type === 'tabs') { |
| | | if (item.setting) { |
| | | if (item.setting.controlField) { |
| | | item.setting.controlField = item.setting.controlField.toLowerCase() |
| | | } |
| | | if (item.setting.selectField) { |
| | | item.setting.selectField = item.setting.selectField.toLowerCase() |
| | | } |
| | | } |
| | | item.subtabs.forEach(tab => { |
| | | tab.components = _replace(tab.components) |
| | | }) |
| | |
| | | if (col.field) { |
| | | col.field = col.field.toLowerCase() |
| | | } |
| | | if (col.dateShift) { |
| | | col.dateShift = col.dateShift.toLowerCase() |
| | | } |
| | | return col |
| | | }) |
| | | } |
| | |
| | | |
| | | if (item.subcards) { |
| | | item.subcards.forEach(card => { |
| | | if (card.setting && card.setting.controlField) { |
| | | card.setting.controlField = card.setting.controlField.toLowerCase() |
| | | if (card.setting) { |
| | | if (card.setting.controlField && card.setting.controlField !== '$Index') { |
| | | card.setting.controlField = card.setting.controlField.toLowerCase() |
| | | } |
| | | if (card.setting.bgField) { |
| | | card.setting.bgField = card.setting.bgField.toLowerCase() |
| | | } |
| | | if (card.setting.menuType) { |
| | | card.setting.menuType = card.setting.menuType.toLowerCase() |
| | | } |
| | | } |
| | | if (card.elements) { |
| | | card.elements = card.elements.map(m => { |
| | |
| | | |
| | | if (card.fields) { |
| | | card.fields = card.fields.map(m => { |
| | | if (m.field) { |
| | | m.field = m.field.toLowerCase() |
| | | } |
| | | if (m.type === 'split' && m.splitctrl) { |
| | | m.splitctrl = m.splitctrl.toLowerCase() |
| | | } |
| | | resetForm(m) |
| | | return m |
| | | }) |
| | | } |
| | | if (card.subButton) { |
| | | resetElement(card.subButton) |
| | | |
| | | if (card.subButton.resetForms) { |
| | | card.subButton.resetForms = card.subButton.resetForms.map(n => n.toLowerCase()) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | |
| | | if (item.plot.gender) { |
| | | item.plot.gender = item.plot.gender.toLowerCase() |
| | | } |
| | | if (item.plot.menuType) { |
| | | item.plot.menuType = item.plot.menuType.toLowerCase() |
| | | } |
| | | if (item.Yaxis) { |
| | | if (Array.isArray(item.Yaxis)) { |
| | | item.Yaxis = item.Yaxis.map(m => { |
| | |
| | | let _update = (cols) => { |
| | | return cols.map(col => { |
| | | if (col.type === 'custom' && col.elements) { |
| | | if (col.sortField) { |
| | | col.sortField = col.sortField.toLowerCase() |
| | | } |
| | | col.elements = col.elements.map(m => { |
| | | resetElement(m) |
| | | return m |
| | | }) |
| | | } else if (col.type === 'colspan') { |
| | | col.subcols = _update(col.subcols) |
| | | } else if (col.field) { |
| | | col.field = col.field.toLowerCase() |
| | | } else { |
| | | if (col.field) { |
| | | col.field = col.field.toLowerCase() |
| | | |
| | | if (col.editable === 'true') { |
| | | if (col.linkSubField) { |
| | | col.linkSubField = col.linkSubField.map(n => n.toLowerCase()) |
| | | col.linkSubField = Array.from(new Set(col.linkSubField)) |
| | | } |
| | | if (col.clearField) { |
| | | col.clearField = col.clearField.toLowerCase() |
| | | } |
| | | if (col.ctrlField) { |
| | | col.ctrlField = col.ctrlField.toLowerCase() |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (col.marks && col.marks.length) { |
| | | resetMark(col) |
| | | } |
| | | } |
| | | |
| | | return col |
| | |
| | | } |
| | | |
| | | item.cols = _update(item.cols) |
| | | |
| | | if (item.lineMarks) { |
| | | item.lineMarks = item.lineMarks.map(n => { |
| | | if (n.field && Array.isArray(n.field)) { |
| | | if (n.field[1] === 'static') { |
| | | n.field[0] = n.field[0] === '$Index' ? n.field[0] : n.field[0].toLowerCase() |
| | | } else { |
| | | n.field = n.field.map(p => p === '$Index' ? p : p.toLowerCase()) |
| | | } |
| | | } |
| | | |
| | | return n |
| | | }) |
| | | } |
| | | } |
| | | |
| | | if (item.subMenus) { |
| | | item.subMenus = item.subMenus.map(m => { |
| | | if (m.setting && m.setting.tip) { |
| | | m.setting.tip = m.setting.tip.toLowerCase() |
| | | } |
| | | return m |
| | | }) |
| | | } |
| | | |
| | | if (item.wrap) { |
| | | if (item.wrap.field) { |
| | | item.wrap.field = item.wrap.field.toLowerCase() |
| | | } |
| | | if (item.wrap.tipField) { |
| | | item.wrap.tipField = item.wrap.tipField.toLowerCase() |
| | | } |
| | |
| | | if (item.wrap.link) { |
| | | item.wrap.link = item.wrap.link.toLowerCase() |
| | | } |
| | | if (item.wrap.linkField) { |
| | | item.wrap.linkField = item.wrap.linkField.toLowerCase() |
| | | } |
| | | if (item.wrap.focus) { |
| | | item.wrap.focus = item.wrap.focus.toLowerCase() |
| | | } |
| | | if (item.wrap.refocus) { |
| | | item.wrap.refocus = item.wrap.refocus.toLowerCase() |
| | | } |
| | | if (item.wrap.statusControl) { |
| | | item.wrap.statusControl = item.wrap.statusControl.toLowerCase() |
| | | } |
| | | if (item.wrap.timeField) { |
| | | item.wrap.timeField = item.wrap.timeField.toLowerCase() |
| | | } |
| | | if (item.wrap.endField) { |
| | | item.wrap.endField = item.wrap.endField.toLowerCase() |
| | | } |
| | | if (item.wrap.remarkField) { |
| | | item.wrap.remarkField = item.wrap.remarkField.toLowerCase() |
| | | } |
| | | if (item.wrap.colorField) { |
| | | item.wrap.colorField = item.wrap.colorField.toLowerCase() |
| | | } |
| | | if (item.wrap.menuType) { |
| | | item.wrap.menuType = item.wrap.menuType.toLowerCase() |
| | | } |
| | | |
| | | if (item.type === 'timeline') { |
| | | if (item.wrap.label) { |
| | | item.wrap.label = item.wrap.label.toLowerCase() |
| | | } |
| | | if (item.wrap.node) { |
| | | item.wrap.node = item.wrap.node.toLowerCase() |
| | | } |
| | | } |
| | | } |
| | | |
| | | return item |
| | |
| | | const SystemProc = asyncLoadComponent(() => import('@/views/systemproc')) |
| | | // const SystemCheck = asyncLoadComponent(() => import('@/views/syscheck')) |
| | | const MkIframe = asyncLoadComponent(() => import('@/views/mkiframe')) |
| | | const MkAi = asyncLoadComponent(() => import('@/views/mkai')) |
| | | |
| | | const routers = [ |
| | | {path: '/login', name: 'login', component: Login}, |
| | |
| | | {path: '/view/:menuId', name: 'iframe', component: MkIframe}, |
| | | {path: '/view/:menuId/:bid', name: 'iframe', component: MkIframe}, |
| | | {path: '/interface', name: 'interface', component: Interface}, |
| | | {path: '/ai', name: 'ai', component: MkAi}, |
| | | // {path: '/syscheck', name: 'syscheck', component: SystemCheck} |
| | | ] |
| | | |
| | |
| | | const FlowFloat = asyncComponent(() => import('@/tabviews/zshare/flowFloat')) |
| | | const SettingComponent = asyncComponent(() => import('@/tabviews/zshare/settingcomponent')) |
| | | const TableNodes = asyncComponent(() => import('@/tabviews/zshare/tablenodes')) |
| | | const DeepSeek = asyncComponent(() => import('@/tabviews/zshare/deepseek')) |
| | | const AutoMatic = asyncComponent(() => import('@/tabviews/zshare/automatic')) |
| | | const DebugTable = asyncComponent(() => import('@/tabviews/debugtable')) |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | if (config.urlFields && config.urlFields.length) { |
| | | config.urlFields.forEach(field => { |
| | | let key = field.toLowerCase() |
| | | if (urlparam[key] !== undefined) return |
| | | |
| | | urlparam[key] = '' |
| | | }) |
| | | } |
| | | |
| | | window.GLOB.CacheData.set(MenuID, urlparam) |
| | | |
| | | if (window.backend && config.allSqls) { |
| | |
| | | } |
| | | if (config.urlFields) { |
| | | config.urlFields.forEach(field => { |
| | | let val = `'${urlparam[field.toLowerCase()] || ''}'` |
| | | let val = `'${urlparam[field.toLowerCase()]}'` |
| | | regs.push({ |
| | | reg: new RegExp('@' + field + '@', 'ig'), |
| | | value: val |
| | |
| | | {config.process === 'true' ? <FlowFloat config={config}/> : null} |
| | | <SettingComponent config={config} shortcuts={shortcuts || []}/> |
| | | <TableNodes config={config} /> |
| | | <DeepSeek/> |
| | | </div> |
| | | </div> |
| | | ) |
| | |
| | | this.setState({data: _data}, () => { |
| | | if (selected !== 'false') { |
| | | this.checkTopLine() |
| | | } else if (config.wrap.empty === 'hidden') { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, _data.$$uuid || '', _data) |
| | | } |
| | | }) |
| | | }) |
| | |
| | | } else { |
| | | if (selected !== 'false') { |
| | | this.checkTopLine() |
| | | } else if (data.$$uuid) { |
| | | } else { |
| | | this.transferLine() |
| | | } |
| | | this.autoExec() |
| | |
| | | } else { |
| | | if (selected !== 'false') { |
| | | this.checkTopLine() |
| | | } else if (_data.$$uuid) { |
| | | } else { |
| | | this.transferLine() |
| | | } |
| | | this.autoExec() |
| | |
| | | transferLine = () => { |
| | | const { config, data } = this.state |
| | | |
| | | if (config.wrap.cardType) return |
| | | if (config.wrap.cardType) { |
| | | if (config.wrap.empty === 'hidden') { |
| | | MKEmitter.emit('resetSelectLine', config.uuid, data.$$uuid || '', data) |
| | | } |
| | | return |
| | | } |
| | | |
| | | MKEmitter.emit('resetSelectLine', config.uuid, data.$$uuid || '', data) |
| | | } |
| | |
| | | } else { |
| | | _data = [_data] |
| | | } |
| | | } else if (_config.html) { |
| | | if (_config.wrap.prefunc) { |
| | | let _html = '' |
| | | try { |
| | | // eslint-disable-next-line |
| | | let func = new Function('html', 'data', _config.wrap.prefunc) |
| | | _html = func(_config.html, {}) |
| | | } catch (e) { |
| | | _html = '' |
| | | console.warn(e) |
| | | } |
| | | |
| | | _config.html = _html || _config.html |
| | | } |
| | | } |
| | | |
| | | if (_config.wrap.minHeight) { |
| | |
| | | item.$html = item.$html.replace(reg, item[key]) |
| | | }) |
| | | } |
| | | |
| | | if (wrap.prefunc) { |
| | | let _html = '' |
| | | try { |
| | | // eslint-disable-next-line |
| | | let func = new Function('html', 'data', wrap.prefunc) |
| | | _html = func(item.$html, item) |
| | | } catch (e) { |
| | | _html = '' |
| | | console.warn(e) |
| | | } |
| | | |
| | | item.$html = _html || item.$html |
| | | } |
| | | // if (/\$blank_space_\d+\$/ig.test(item.$html)) { |
| | | // item.$html = item.$html.replace(/\$blank_space_\d+\$/ig, (w) => { |
| | | // let n = +w.replace(/blank_space_|\$/ig, '') |
| | | // if (n) { |
| | | // return new Array(n).fill(' ').join('') |
| | | // } |
| | | |
| | | // return w |
| | | // }) |
| | | // } |
| | | } |
| | | }) |
| | | |
| | |
| | | /> : data.map((item, index) => <BraftContent |
| | | key={index} |
| | | value={item.$html} |
| | | script={config.wrap.loaded === 'true' ? config.wrap.loadedfunc : ''} |
| | | script={config.wrap.loadedfunc || ''} |
| | | />)} |
| | | </div> |
| | | ) |
| | |
| | | background: #ffffff; |
| | | } |
| | | } |
| | | .braft-content { |
| | | table.no-border { |
| | | td, th { |
| | | border: none; |
| | | } |
| | | } |
| | | table.align-center { |
| | | td, th { |
| | | text-align: center; |
| | | } |
| | | } |
| | | table.deep-border { |
| | | td, th { |
| | | border-color: rgba(0, 0, 0, 0.85); |
| | | } |
| | | } |
| | | table.word-break { |
| | | td, th { |
| | | word-break: break-all; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .custom-braft-editor-box.th-light { |
| | |
| | | } |
| | | .custom-braft-editor-box.no-border { |
| | | .braft-content { |
| | | table { |
| | | table:not(.border):not(.deep-border) { |
| | | td, th { |
| | | border: none!important; |
| | | } |
| | |
| | | } |
| | | .custom-braft-editor-box.bold-border { |
| | | .braft-content { |
| | | table { |
| | | table:not(.no-border) { |
| | | td, th { |
| | | border-width: 2px!important; |
| | | } |
| | |
| | | } |
| | | .custom-braft-editor-box.deep-border { |
| | | .braft-content { |
| | | table { |
| | | table:not(.no-border) { |
| | | td, th { |
| | | border-color: rgba(0, 0, 0, 0.85)!important; |
| | | } |
| | |
| | | } |
| | | .custom-braft-editor-box.word-break { |
| | | .braft-content { |
| | | table { |
| | | table:not(.no-break) { |
| | | td, th { |
| | | word-break: break-all!important; |
| | | } |
| | |
| | | } |
| | | .custom-braft-editor-box.tb-flex { |
| | | .braft-content { |
| | | table { |
| | | table:not(.no-flex) { |
| | | table-layout: fixed; |
| | | } |
| | | } |
| | |
| | | import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons' |
| | | |
| | | import asyncComponent from '@/utils/asyncComponent' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import './index.scss' |
| | | |
| | | const TabTransfer = asyncComponent(() => import('@/tabviews/custom/components/share/tabtransfer')) |
| | |
| | | |
| | | state = { |
| | | visible: true, |
| | | hidden: this.props.config.setting.bindPropId ? null : false, |
| | | mergeAble: this.props.config.setting.mergeAble === 'true' |
| | | } |
| | | |
| | | componentDidMount () { |
| | | const { config } = this.props |
| | | |
| | | if (config.setting.bindPropId) { |
| | | MKEmitter.addListener('resetSelectLine', this.resetStatus) |
| | | } |
| | | } |
| | | |
| | | componentWillUnmount () { |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('resetSelectLine', this.resetStatus) |
| | | } |
| | | |
| | | resetStatus = (MenuID, _, data) => { |
| | | const { config } = this.props |
| | | |
| | | if (config.setting.bindPropId !== MenuID) return |
| | | |
| | | if (!data || data.$$empty) { |
| | | this.setState({hidden: true}) |
| | | } else { |
| | | this.setState({hidden: false}) |
| | | } |
| | | } |
| | | |
| | | render() { |
| | | const { config, style } = this.props |
| | | const { visible, mergeAble } = this.state |
| | | const { visible, mergeAble, hidden } = this.state |
| | | |
| | | if (config.components.length === 0) return (<div className={'ant-col ant-col-' + config.width} style={style}><div style={config.style}></div></div>) |
| | | |
| | | let _wrapStyle = style |
| | | if (hidden) { |
| | | _wrapStyle = {...style} |
| | | _wrapStyle.display = 'none' |
| | | } |
| | | |
| | | let title = config.setting && config.setting.title |
| | | |
| | | if (title && hidden === null) { |
| | | title = '' |
| | | } |
| | | |
| | | return ( |
| | | <div className={`ant-col ant-col-${config.width} ${mergeAble ? ' mk-merge-able mk-ctrl-' + (config.setting.ctrlNumber || 1) : ''} ${visible ? '' : ' close'}`} style={style}> |
| | | <div className={`ant-col ant-col-${config.width} ${mergeAble ? ' mk-merge-able mk-ctrl-' + (config.setting.ctrlNumber || 1) : ''} ${visible ? '' : ' close'}`} style={_wrapStyle}> |
| | | <div className={'normal-group-wrap ' + (config.setting.layout || '')} id={'anchor' + config.uuid} style={config.style}> |
| | | <div className="mk-control"> |
| | | <DoubleLeftOutlined onClick={() => this.setState({visible: false})}/> |
| | | <DoubleRightOutlined onClick={() => this.setState({visible: true})}/> |
| | | </div> |
| | | {config.setting && config.setting.title ? <div className="group-header" style={config.headerStyle}> |
| | | <span className="title">{config.setting.title}</span> |
| | | {title ? <div className="group-header" style={config.headerStyle}> |
| | | <span className="title">{title}</span> |
| | | </div> : null} |
| | | <TabTransfer config={config}/> |
| | | </div> |
| | |
| | | border-collapse: collapse; |
| | | border-spacing: 0; |
| | | margin: 10px 0px; |
| | | --table-font-size: 16px; |
| | | |
| | | tr:first-child { |
| | | background-color: #f0f0f0; |
| | | } |
| | | td, th { |
| | | padding: 5px 10px; |
| | | font-size: 16px; |
| | | font-size: var(--table-font-size, 16px); |
| | | border: 1px solid #ddd; |
| | | } |
| | | } |
| | |
| | | total: 0 |
| | | }) |
| | | reset && MKEmitter.emit('resetTable', config.uuid, 'true') // 列表重置 |
| | | MKEmitter.emit('transferData' + setting.tableId, []) |
| | | |
| | | this.requestId = '' |
| | | return |
| | |
| | | this.setState({ |
| | | loading: true |
| | | }) |
| | | Api.wxNginxRequest(`express/${code}/${order}`, 'get').then(res => { |
| | | Api.expressRequest(`express/${code}/${order}`).then(res => { |
| | | if (!res || typeof(res) !== 'string') { |
| | | notification.error({ |
| | | top: 92, |
| | |
| | | const DebugTable = asyncComponent(() => import('@/tabviews/debugtable')) |
| | | const FlowFloat = asyncComponent(() => import('@/tabviews/zshare/flowFloat')) |
| | | const TableNodes = asyncComponent(() => import('@/tabviews/zshare/tablenodes')) |
| | | const DeepSeek = asyncComponent(() => import('@/tabviews/zshare/deepseek')) |
| | | const MkInterfaces = asyncComponent(() => import('@/tabviews/custom/components/interfaces')) |
| | | |
| | | class CustomPage extends Component { |
| | |
| | | } |
| | | } |
| | | |
| | | if (config.urlFields && config.urlFields.length) { |
| | | config.urlFields.forEach(field => { |
| | | let key = field.toLowerCase() |
| | | if (urlparam[key] !== undefined) return |
| | | |
| | | urlparam[key] = '' |
| | | }) |
| | | } |
| | | |
| | | window.GLOB.CacheData.set(MenuID, urlparam) |
| | | |
| | | if (window.backend && config.allSqls) { |
| | |
| | | } |
| | | if (config.urlFields) { |
| | | config.urlFields.forEach(field => { |
| | | let val = `'${urlparam[field.toLowerCase()] || ''}'` |
| | | let val = `'${urlparam[field.toLowerCase()]}'` |
| | | regs.push({ |
| | | reg: new RegExp('@' + field + '@', 'ig'), |
| | | value: val |
| | |
| | | {config.process === 'true' ? <FlowFloat config={config}/> : null} |
| | | <SettingComponent config={config} shortcuts={shortcuts || []}/> |
| | | <TableNodes config={config} /> |
| | | <DeepSeek/> |
| | | </div> |
| | | </div> |
| | | ) |
| | |
| | | for (let i = 0; i < 26; i++) { |
| | | cols.push('A' + cols[i]) |
| | | } |
| | | let columns = fromJS(btn.verify.columns).toJS() |
| | | columns = columns.filter((col, index) => { |
| | | col.colIndex = cols[index] || (index + 1) |
| | | if (col.import !== 'init' && (/^Decimal/ig.test(col.type) || /^int/ig.test(col.type))) { |
| | | col.declen = 0 |
| | | if (/^Decimal/ig.test(col.type)) { |
| | | col.declen = +col.type.match(/\d+/g)[1] |
| | | } |
| | | col.declen = col.declen || 0 |
| | | } |
| | | if (col.required === 'false') { |
| | | delete col.min |
| | | delete col.max |
| | | } |
| | | |
| | | return col.import !== 'false' |
| | | }) |
| | | |
| | | let lines = data.map((item, lindex) => { |
| | | let vals = [] |
| | | btn.verify.columns.forEach((col, cindex) => { |
| | | if (col.import === 'false') return |
| | | |
| | | columns.forEach(col => { |
| | | let val = item[col.Column] !== undefined ? item[col.Column] : '' |
| | | let _colindex = cols[cindex] || (cindex + 1) |
| | | let _position = (_topline + lindex + 1) + '行 ' + _colindex + '列 ' |
| | | let _position = (_topline + lindex + 1) + '行 ' + col.colIndex + '列 ' |
| | | let eLen = errors.length |
| | | |
| | | if (col.import === 'init') { |
| | | if (col.$error) { |
| | | |
| | | } else if (col.import === 'init') { |
| | | if (/^Nvarchar/ig.test(col.type)) { |
| | | val = '' |
| | | } else if (/^Decimal/ig.test(col.type) || /^int/ig.test(col.type)) { |
| | |
| | | if (!val || isNaN(val)) { |
| | | val = 0 |
| | | } |
| | | } else if (!val && val !== 0) { |
| | | } |
| | | if (!val && val !== 0) { |
| | | errors.push(_position + '内容不可为空') |
| | | } else if (isNaN(val)) { // 检验是否为数值 |
| | | errors.push(_position + '内容应为数值') |
| | | } else if ((col.min || col.min === 0) && val < col.min) { // 最小值检验 |
| | | } else if (typeof(col.min) === 'number' && val < col.min) { // 最小值检验 |
| | | errors.push(_position + '小于最小值') |
| | | } else if ((col.max || col.max === 0) && val > col.max) { // 最大值检验 |
| | | } else if (typeof(col.max) === 'number' && val > col.max) { // 最大值检验 |
| | | errors.push(_position + '大于最大值') |
| | | } else { |
| | | let _float = (val + '').split('.')[1] |
| | | if (_float && _float.length > col.declen) { |
| | | if (col.declen) { |
| | | errors.push(_position + `数值不可大于${col.declen}位小数`) |
| | | } else { |
| | | errors.push(_position + '数值应为整数') |
| | | } |
| | | } |
| | | } |
| | | val = val + '' |
| | | } else if (col.type === 'date' || col.type === 'datetime') { |
| | | if (typeof(val) === 'number') { |
| | | if (val > 2958465 || val <= 0) { // 时间过大或小于等于0 |
| | |
| | | } |
| | | } |
| | | |
| | | if (errors.length > eLen) { |
| | | col.$error = true |
| | | } |
| | | |
| | | vals.push(val) |
| | | }) |
| | | |
| | |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } else if (btn.Ot !== 'notRequired' && data[0] && !data[0].$$uuid) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: dict['id_required'] || '未获取到ID值!', |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } else if (btn.Ot === 'requiredSgl' && data.length !== 1) { |
| | | // 需要选择单行时,校验数据 |
| | | notification.warning({ |
| | |
| | | let works_flow_sign_field = 'statuscharone' |
| | | let works_flow_sign_label = '' |
| | | let works_begin_branch = '' |
| | | if (line.approvalMethod === 'countersign' && node.checkIds.length > 1) { |
| | | works_flow_countersign = 'Y' |
| | | let mark = line.mark || '已审核' |
| | | let fields = ['statuscharone', 'statuschartwo', 'statuscharthree', 'statuscharfour', 'statuscharfive'] |
| | | node.checkUsers.forEach((user, index) => { |
| | | if (user.worker_id === userid) { |
| | | works_flow_sign_field = fields[index] |
| | | works_flow_sign_label = `${user.parentNames[2] || ''}${user.workername || ''}${mark}` |
| | | } else { |
| | | works_flow_sign_values += `${user.parentNames[2] || ''}${user.workername || ''}${mark}` |
| | | } |
| | | }) |
| | | } else { |
| | | works_begin_branch = line.mknode === 'startEdge' ? 'Y' : '' |
| | | if (line) { |
| | | if (line.approvalMethod === 'countersign' && node.checkIds.length > 1) { |
| | | works_flow_countersign = 'Y' |
| | | let mark = line.mark || '已审核' |
| | | let fields = ['statuscharone', 'statuschartwo', 'statuscharthree', 'statuscharfour', 'statuscharfive'] |
| | | node.checkUsers.forEach((user, index) => { |
| | | if (user.worker_id === userid) { |
| | | works_flow_sign_field = fields[index] |
| | | works_flow_sign_label = `${user.parentNames[2] || ''}${user.workername || ''}${mark}` |
| | | } else { |
| | | works_flow_sign_values += `${user.parentNames[2] || ''}${user.workername || ''}${mark}` |
| | | } |
| | | }) |
| | | } else { |
| | | works_begin_branch = line.mknode === 'startEdge' ? 'Y' : '' |
| | | } |
| | | } |
| | | |
| | | exps.push( |
| | |
| | | const { btn } = this.props |
| | | |
| | | if (!btn.verify) return |
| | | if (btn.verify.noteEnable !== 'true' && btn.verify.wxNote !== 'true' && btn.verify.printEnable !== 'true' && btn.verify.emailEnable !== 'true') return |
| | | if (btn.verify.noteEnable !== 'true' && btn.verify.wxNote !== 'true' && btn.verify.printEnable !== 'true' && btn.verify.emailEnable !== 'true' && btn.verify.DeepSeekable !== 'true') return |
| | | |
| | | let id = '' |
| | | if (btn.output) { |
| | |
| | | } |
| | | if (btn.verify.emailEnable === 'true') { |
| | | this.sendEmail(btn.verify, id) |
| | | } |
| | | if (btn.verify.DeepSeekable === 'true') { |
| | | this.openDeepSeek(id) |
| | | } |
| | | if (btn.verify.wxNote === 'true') { |
| | | if (btn.verify.wxTemplateId === 'mk_category_temp') { |
| | |
| | | }) |
| | | } |
| | | |
| | | openDeepSeek = (id) => { |
| | | let param = { |
| | | func: 's_get_deepseek_local', |
| | | upid: id |
| | | } |
| | | |
| | | param.LText = Utils.getuuid() |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | | param.secretkey = Utils.encrypt(param.LText, param.timestamp) |
| | | |
| | | Api.genericInterface(param).then(res => { |
| | | if (!res.status) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (res.deepseek_text) { |
| | | sessionStorage.setItem('deepseek_sql', res.deepseek_text) |
| | | |
| | | window.open('#/ai') |
| | | |
| | | setTimeout(() => { |
| | | sessionStorage.removeItem('deepseek_sql') |
| | | }, 0) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @description 操作失败后处理 |
| | | * 1、状态码为 E、N、F、NM 时,显示相应提示信息 |
New file |
| | |
| | | import React, { Component } from 'react' |
| | | import { Button, Tooltip } from 'antd' |
| | | |
| | | // import './index.scss' |
| | | |
| | | class DeekSeek extends Component { |
| | | state = { |
| | | ds: !window.GLOB.mkHS && localStorage.getItem(window.GLOB.sysSign + 'ds') === 'true' |
| | | } |
| | | |
| | | trigger = () => { |
| | | const { ds } = this.state |
| | | |
| | | if (!ds) return |
| | | |
| | | window.open('#/ai') |
| | | } |
| | | |
| | | |
| | | render() { |
| | | const { ds } = this.state |
| | | |
| | | if (!ds) return null |
| | | |
| | | return ( |
| | | <div className="tool-wrap"> |
| | | <Tooltip placement="left" title="DeepSeek"> |
| | | <Button shape="circle" onClick={this.trigger}> |
| | | <span className="anticon"> |
| | | <svg viewBox="0 0 1024 1024" width="1.5em" height="1.5em" fill="currentColor"> |
| | | <path d="M207.402667 834.133333c-43.349333-43.306667-49.066667-117.333333-13.354667-210.133333a595.626667 595.626667 0 0 1 51.413333-100.906667l1.450667-2.304-1.408-2.304a596.906667 596.906667 0 0 1-51.456-100.906666c-35.669333-92.8-29.994667-166.826667 13.354667-210.176 23.893333-23.893333 58.197333-36.693333 99.626666-36.693334 60.8 0 135.168 27.136 211.498667 74.922667l2.261333 1.450667 2.261334-1.450667C599.466667 197.845333 673.749333 170.666667 734.549333 170.666667c41.472 0 75.776 12.8 99.626667 36.693333 43.264 43.306667 48.981333 117.418667 13.312 210.176-13.866667 35.2-31.104 68.992-51.456 100.906667l-1.450667 2.304 1.450667 2.261333c21.333333 34.133333 38.826667 68.096 51.413333 100.906667 35.712 92.8 30.037333 166.869333-13.226666 210.176-23.893333 23.893333-58.24 36.736-99.669334 36.736-60.8 0-135.168-27.178667-211.498666-74.965334l-2.304-1.365333-2.261334 1.408c-76.373333 47.786667-150.698667 74.965333-211.498666 74.965333-41.472 0-75.776-12.8-99.626667-36.693333l0.042667-0.042667z m581.589333-187.690666a498.090667 498.090667 0 0 0-30.293333-63.658667l-3.2-5.632-3.925334 5.12a941.866667 941.866667 0 0 1-169.301333 169.301333l-5.12 3.968 5.632 3.157334c55.808 31.317333 109.226667 49.578667 151.722667 49.578666 24.021333 0 42.922667-5.888 55.381333-18.346666 12.8-12.8 18.602667-33.024 18.261333-57.429334-0.341333-24.533333-6.784-53.930667-19.157333-86.058666z m-270.72 70.4l2.474667 1.792 2.474666-1.792a848.256 848.256 0 0 0 194.176-193.578667l1.834667-2.474667-1.834667-2.474666a841.898667 841.898667 0 0 0-194.176-193.621334l-2.474666-1.706666-2.474667 1.792a848.341333 848.341333 0 0 0-194.218667 193.536l-1.792 2.474666 1.792 2.517334a861.354667 861.354667 0 0 0 89.344 104.832 842.24 842.24 0 0 0 104.874667 88.746666v-0.042666z m271.616-465.152c-12.501333-12.501333-31.402667-18.389333-55.381333-18.389334-42.581333 0-95.914667 18.304-151.722667 49.621334l-5.632 3.157333 5.12 3.925333a936.021333 936.021333 0 0 1 169.301333 169.301334l3.925334 5.12 3.157333-5.632c12.032-21.504 22.357333-42.837333 30.336-63.658667 12.373333-32.128 18.858667-61.525333 19.2-86.058667 0.298667-24.405333-5.504-44.586667-18.304-57.386666zM252.458667 395.136c8.618667 21.930667 18.773333 43.221333 30.378666 63.701333l3.157334 5.546667 3.925333-5.077333a936.106667 936.106667 0 0 1 169.301333-169.301334l5.12-3.925333-5.632-3.157333c-55.808-31.36-109.184-49.621333-151.722666-49.621334-24.021333 0-42.922667 5.888-55.381334 18.346667-12.8 12.842667-18.602667 33.024-18.261333 57.429333 0.298667 24.533333 6.826667 53.930667 19.114667 86.058667z m0 251.306667c-12.373333 32.128-18.773333 61.525333-19.114667 86.058666-0.341333 24.405333 5.418667 44.586667 18.261333 57.386667 12.501333 12.501333 31.402667 18.389333 55.381334 18.389333 42.538667 0 95.872-18.261333 151.722666-49.578666l5.589334-3.157334-5.12-3.968a936.106667 936.106667 0 0 1-169.258667-169.301333l-3.968-5.12-3.157333 5.632c-11.562667 20.48-21.674667 41.770667-30.293334 63.658667z"></path><path d="M550.869333 593.493333a78.634667 78.634667 0 0 1-108.8-72.704 78.72 78.72 0 1 1 108.8 72.704z"></path> |
| | | </svg> |
| | | </span> |
| | | </Button> |
| | | </Tooltip> |
| | | </div> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default DeekSeek |
| | |
| | | |
| | | if (['select', 'link', 'radio', 'checkbox', 'checkcard', 'multiselect', 'cascader'].includes(item.type)) { |
| | | item.options = item.options || [] |
| | | item.options = item.options.filter(cell => { |
| | | cell.value = cell.Value |
| | | cell.label = cell.Text |
| | | |
| | | return !cell.Hide |
| | | }) |
| | | item.$select = true |
| | | if (item.type === 'checkcard') { |
| | | item.options = item.options.filter(cell => { |
| | | cell.$value = cell.$value + '' |
| | | return !cell.Hide |
| | | }) |
| | | } else { |
| | | item.options = item.options.filter(cell => { |
| | | cell.value = cell.Value + '' |
| | | cell.label = cell.Text |
| | | |
| | | return !cell.Hide |
| | | }) |
| | | } |
| | | |
| | | if (item.setAll === 'true' && ['select', 'link', 'radio'].includes(item.type)) { // 添加空值 |
| | | item.options.unshift({ |
| | | key: Utils.getuuid(), |
| | |
| | | newval = '' |
| | | } |
| | | } |
| | | } else if (item.$select && item.resourceType === '0') { |
| | | newval = newval + '' |
| | | } |
| | | |
| | | if (newval !== '$empty') { |
| | |
| | | if (isNaN(item.initval) || item.initval === '') { |
| | | item.initval = 0 |
| | | } |
| | | } else if (['select', 'link', 'radio', 'checkbox', 'checkcard', 'multiselect', 'cascader'].includes(item.type) && item.resourceType === '1') { |
| | | } else if (item.$select && item.resourceType === '1') { |
| | | deForms.push(item) |
| | | } else if (item.type === 'rate') { |
| | | item.rateCount = item.rateCount || 5 |
| | |
| | | }) |
| | | } else if (item.regular === 'phone') { |
| | | item.rules.push({ |
| | | pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, |
| | | pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\s?\d{4}\s?\d{4}$/, |
| | | message: item.regularText || dict['phone_error'] || '请正确输入手机号' |
| | | }) |
| | | } else if (item.regular === 'email') { |
| | |
| | | } else if (item.declare === 'decimal') { |
| | | _item.type = 'number' |
| | | _item.fieldlen = item.decimal || 0 |
| | | } else if (['text', 'textarea', 'linkMain'].includes(item.type)) { |
| | | } else if (['text', 'textarea', 'linkMain', 'brafteditor'].includes(item.type)) { |
| | | _item.value = _item.value + '' |
| | | _item.value = _item.value.replace(/\t+|\v+/g, '') // 去除制表符 |
| | | |
| | | |
| | | if (item.interception !== 'false') { // 去除首尾空格 |
| | | if (item.interception === 'func') { |
| | | try { |
| | |
| | | _item.value = _item.value.replace(/(^\s*|\s*$)/g, '') |
| | | } |
| | | } |
| | | if (item.type === 'text' && /@appkey@|@SessionUid@|@bid@/ig.test(_item.value)) { // 特殊字段替换 |
| | | _item.value = _item.value.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey).replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || '')).replace(/^(\s*)@bid@(\s*)$/ig, (this.props.BID || '')) |
| | | } |
| | | if (item.type === 'text' && item.lenControl && item.lenControl !== 'limit') { |
| | | if (item.lenControl === 'left') { |
| | | _item.value = _item.value.substr(0, item.fieldlength) |
| | | } else { |
| | | _item.value = _item.value.slice(-item.fieldlength) |
| | | if (item.type === 'text') { |
| | | if (/@appkey@|@SessionUid@|@bid@/ig.test(_item.value)) { // 特殊字段替换 |
| | | _item.value = _item.value.replace(/^(\s*)@appkey@(\s*)$/ig, window.GLOB.appkey).replace(/^(\s*)@SessionUid@(\s*)$/ig, (localStorage.getItem('SessionUid') || '')).replace(/^(\s*)@bid@(\s*)$/ig, (this.props.BID || '')) |
| | | } |
| | | if (item.lenControl && item.lenControl !== 'limit') { |
| | | if (item.lenControl === 'left') { |
| | | _item.value = _item.value.substr(0, item.fieldlength) |
| | | } else { |
| | | _item.value = _item.value.slice(-item.fieldlength) |
| | | } |
| | | } |
| | | if (item.regular === 'phone') { |
| | | _item.value = _item.value.replace(/\s+/g, '') |
| | | } |
| | | } |
| | | } else if (item.type === 'datemonth') { |
| | |
| | | } else { |
| | | item.initval = moment(d).subtract(item.$initval, 'month').format('YYYY-MM') |
| | | } |
| | | item.oriInitval = item.initval |
| | | } |
| | | } |
| | | |
| | |
| | | } else { |
| | | item.initval = moment(d).subtract(item.$initval, 'month').format('YYYY-MM') |
| | | } |
| | | item.oriInitval = item.initval |
| | | } |
| | | } |
| | | |
| | |
| | | <Select.Option value="Decimal(18,2)"> Decimal(18,2) </Select.Option> |
| | | <Select.Option value="Decimal(18,4)"> Decimal(18,4) </Select.Option> |
| | | <Select.Option value="Decimal(18,6)"> Decimal(18,6) </Select.Option> |
| | | <Select.Option value="Decimal(18,8)"> Decimal(18,8) </Select.Option> |
| | | <Select.Option value="Decimal(18,10)"> Decimal(18,10) </Select.Option> |
| | | <Select.Option value="date"> date </Select.Option> |
| | | <Select.Option value="datetime"> datetime </Select.Option> |
| | | </Select> |
| | |
| | | { value: 'Decimal(18,2)', text: 'Decimal(18,2)' }, |
| | | { value: 'Decimal(18,4)', text: 'Decimal(18,4)' }, |
| | | { value: 'Decimal(18,6)', text: 'Decimal(18,6)' }, |
| | | { value: 'Decimal(18,8)', text: 'Decimal(18,8)' }, |
| | | { value: 'Decimal(18,10)', text: 'Decimal(18,10)' }, |
| | | { value: 'date', text: 'date' }, |
| | | { value: 'datetime', text: 'datetime' } |
| | | ] |
| | |
| | | unlimit: true, |
| | | editable: true, |
| | | keyVals: ['Int', 'Decimal(18,0)', 'Decimal(18,2)', 'Decimal(18,4)', 'Decimal(18,6)'], |
| | | render: (text, record) => /^Decimal/ig.test(record.type) || /^int/ig.test(record.type) ? text : '' |
| | | render: (text, record) => record.required === 'true' && (/^Decimal/ig.test(record.type) || /^int/ig.test(record.type)) ? text : '' |
| | | |
| | | }, |
| | | { |
| | |
| | | unlimit: true, |
| | | editable: true, |
| | | keyVals: ['Int', 'Decimal(18,0)', 'Decimal(18,2)', 'Decimal(18,4)', 'Decimal(18,6)'], |
| | | render: (text, record) => /^Decimal/ig.test(record.type) || /^int/ig.test(record.type) ? text : '' |
| | | render: (text, record) => record.required === 'true' && (/^Decimal/ig.test(record.type) || /^int/ig.test(record.type)) ? text : '' |
| | | } |
| | | ], |
| | | uniqueColumns: [ |
| | |
| | | <Button className="excel-col-add mk-red" title="清空Excel列" onClick={this.clearField}> |
| | | 清空Excel列 |
| | | </Button> |
| | | <Col style={{fontSize: '12px', color: '#757575', paddingLeft: '10px'}} span={24}>注:数值类型(int 或 decimal),内容为必填;最大值和最小值在类型为数值时有效。导入-初始化:用于excel中不存在,导入时需要初始化的字段</Col> |
| | | <Col style={{fontSize: '12px', color: '#757575', paddingLeft: '10px'}} span={24}>注:数值类型(int 或 decimal),内容为必填;最大值和最小值在类型为数值时(必填)有效。导入-初始化:用于excel中不存在,导入时需要初始化的字段</Col> |
| | | <EditTable actions={['edit', 'move', 'copy', 'del', 'extra:required:是否必填']} searchKey={searchKey} type="excelcolumn" data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/> |
| | | </TabPane> |
| | | {card.intertype === 'system' ? <TabPane tab={ |
| | |
| | | return |
| | | } |
| | | |
| | | if (card.intertype === 'system' && verify.dataType !== 'custom' && verify.columns.length > 0 && config.$c_ds && config.setting.interType === 'system' && config.columns && config.columns.length > 0) { |
| | | let ds = true |
| | | if (config.wrap && config.wrap.datatype && ['static', 'public'].includes(config.wrap.datatype)) { |
| | | ds = false |
| | | } |
| | | |
| | | if (card.intertype === 'system' && verify.dataType !== 'custom' && verify.columns.length > 0 && ds && config.setting.interType === 'system' && config.columns && config.columns.length > 0) { |
| | | let cols = [] |
| | | let columns = config.columns.map(c => c.field) |
| | | |
| | |
| | | } |
| | | .anticon-fullscreen-exit { |
| | | position: fixed; |
| | | z-index: 11; |
| | | z-index: 13; |
| | | right: 10px; |
| | | top: 5px; |
| | | font-size: 20px; |
| | |
| | | .CodeMirror-fullscreen.CodeMirror { |
| | | border-radius: 0; |
| | | position: fixed; |
| | | z-index: 10; |
| | | z-index: 12; |
| | | } |
| | | .CodeMirror-linenumber { |
| | | font-size: 14px; |
| | |
| | | .anticon-fullscreen-exit { |
| | | display: inline-block; |
| | | } |
| | | .anticon-font-size { |
| | | z-index: 13; |
| | | } |
| | | .anticon-fullscreen { |
| | | display: none; |
| | | } |
| | |
| | | hint: ['label', 'field', 'type', 'blacklist', 'supField', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], |
| | | split: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'splitctrl', 'supField', 'opacity'], |
| | | formula: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'supField', 'span', 'labelwidth', 'formula', 'eval', 'postfix'], |
| | | brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'extra', 'encryption', 'marginTop', 'marginBottom', 'contHeidht'], |
| | | brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'interception', 'extra', 'encryption', 'marginTop', 'marginBottom', 'contHeidht'], |
| | | funcvar: ['span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], |
| | | linkMain: ['readonly', 'required', 'hidden','declare', 'span', 'labelwidth', 'tooltip', 'interception', 'extra', 'place', 'marginTop', 'marginBottom', 'verifyVal'], |
| | | popSelect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'place', 'enter', 'dataSource', 'columns', 'primaryKey', 'order', 'controlField', 'laypage', 'onload', 'searchKey', 'showField', 'popWidth'], |
| | |
| | | if (this.record.interception === 'func') { |
| | | shows.push('func') |
| | | } |
| | | } else if (type === 'brafteditor') { |
| | | if (this.record.interception === 'func') { |
| | | shows.push('func') |
| | | } |
| | | } else if (type === 'popSelect') { |
| | | if (this.record.enter === 'tab' || this.record.enter === 'sub') { |
| | | shows.push('tabField') |
| | |
| | | |
| | | if (value === 'brafteditor') { |
| | | this.record.encryption = 'true' |
| | | this.record.interception = 'false' |
| | | _fieldval.encryption = 'true' |
| | | _fieldval.interception = 'false' |
| | | } |
| | | |
| | | if (value === 'linkMain') { |
| | |
| | | return fields |
| | | } |
| | | |
| | | transfer = (options) => { |
| | | if (options.length === 0) return options |
| | | // transfer = (options) => { |
| | | // if (options.length === 0) return options |
| | | |
| | | let isNumber = true |
| | | options.forEach(item => { |
| | | if (!item.Value || isNaN(item.Value)) { |
| | | isNumber = false |
| | | } |
| | | }) |
| | | // let isNumber = true |
| | | // options.forEach(item => { |
| | | // if (!item.Value || isNaN(item.Value)) { |
| | | // isNumber = false |
| | | // } |
| | | // }) |
| | | |
| | | if (isNumber) { |
| | | return options.map(item => { |
| | | item.Value = +item.Value |
| | | return item |
| | | }) |
| | | } else { |
| | | return options.map(item => { |
| | | item.Value = item.Value + '' |
| | | return item |
| | | }) |
| | | } |
| | | } |
| | | // if (isNumber) { |
| | | // return options.map(item => { |
| | | // item.Value = +item.Value |
| | | // return item |
| | | // }) |
| | | // } else { |
| | | // return options.map(item => { |
| | | // item.Value = item.Value + '' |
| | | // return item |
| | | // }) |
| | | // } |
| | | // } |
| | | |
| | | transferCard = (options) => { |
| | | if (options.length === 0) return options |
| | | // transferCard = (options) => { |
| | | // if (options.length === 0) return options |
| | | |
| | | let isNumber = true |
| | | options.forEach(item => { |
| | | if (!/^([0-9]|[1-9]\d{0,2})$/.test(item.$value)) { |
| | | isNumber = false |
| | | } |
| | | }) |
| | | // let isNumber = true |
| | | // options.forEach(item => { |
| | | // if (!/^([0-9]|[1-9]\d{0,2})$/.test(item.$value)) { |
| | | // isNumber = false |
| | | // } |
| | | // }) |
| | | |
| | | if (isNumber) { |
| | | return options.map(item => { |
| | | item.$value = +item.$value |
| | | return item |
| | | }) |
| | | } else { |
| | | return options.map(item => { |
| | | item.$value = item.$value + '' |
| | | return item |
| | | }) |
| | | } |
| | | } |
| | | // if (isNumber) { |
| | | // return options.map(item => { |
| | | // item.$value = +item.$value |
| | | // return item |
| | | // }) |
| | | // } else { |
| | | // return options.map(item => { |
| | | // item.$value = item.$value + '' |
| | | // return item |
| | | // }) |
| | | // } |
| | | // } |
| | | |
| | | handleConfirm = () => { |
| | | const { card, fields } = this.props |
| | |
| | | if (['multiselect', 'select', 'link', 'radio', 'checkbox'].includes(values.type)) { |
| | | if (values.resourceType === '0') { |
| | | values.options = values.options || [] |
| | | values.options = values.options.map(item => { |
| | | item.Value = item.Value + '' |
| | | return item |
| | | }) |
| | | values.dataSource = '' |
| | | let type = values.type |
| | | if (values.type === 'radio' && values.linkField) { |
| | | type = 'link' |
| | | } |
| | | |
| | | values.options = this.transfer(values.options) |
| | | // values.options = this.transfer(values.options) |
| | | |
| | | if (values.options.filter(op => op.Text === '').length > 0) { |
| | | notification.warning({ |
| | |
| | | let linkSubFields = values.linkSubField || [] |
| | | values.options = values.options.map(m => { |
| | | m.ParentID = m.ParentID || '' |
| | | m.$value = m.$value + '' |
| | | |
| | | linkSubFields.forEach(n => { |
| | | m[n] = m[n] || '' |
| | |
| | | return m |
| | | }) |
| | | |
| | | values.options = this.transferCard(values.options) |
| | | // values.options = this.transferCard(values.options) |
| | | |
| | | let type = values.type |
| | | if (values.linkField) { |
| | |
| | | <Col span={24}></Col> |
| | | <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="bottomLeft" title="按钮执行完成后打开DeepSeek,请整理好需要提问的语句。"> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | DeekSeek |
| | | </Tooltip> |
| | | }> |
| | | <Radio.Group value={verify.DeepSeekable} onChange={(e) => {this.onOptionChange(e.target.value, 'DeepSeekable')}}> |
| | | <Radio value="true">开启</Radio> |
| | | <Radio value="false">不开启</Radio> |
| | | </Radio.Group> |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}></Col> |
| | | <Col span={8}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="bottomLeft" title={'选择发送短信时,需完善短信设置。'}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | 发送短信 |
| | |
| | | } |
| | | |
| | | _verify.default = _verify.default || 'true' |
| | | _verify.wxNote = _verify.wxNote || 'false' // 公众号消息推送是否开启 |
| | | _verify.noteEnable = _verify.noteEnable || 'false' // 短信发送是否开启 |
| | | _verify.emailEnable = _verify.emailEnable || 'false' // 邮件发送是否开启 |
| | | _verify.printEnable = _verify.printEnable || 'false' // 单据打印是否开启 |
| | | _verify.preHandle = _verify.preHandle || 'false' // 按钮预处理是否开启 |
| | | _verify.wxNote = _verify.wxNote || 'false' // 公众号消息推送是否开启 |
| | | _verify.noteEnable = _verify.noteEnable || 'false' // 短信发送是否开启 |
| | | _verify.DeepSeekable = _verify.DeepSeekable || 'false'// DeepSeek是否开启 |
| | | _verify.emailEnable = _verify.emailEnable || 'false' // 邮件发送是否开启 |
| | | _verify.printEnable = _verify.printEnable || 'false' // 单据打印是否开启 |
| | | _verify.preHandle = _verify.preHandle || 'false' // 按钮预处理是否开启 |
| | | _verify.invalid = _invalid |
| | | _verify.uniques = _verify.uniques || [] |
| | | _verify.contrasts = _verify.contrasts || [] |
| | |
| | | _sql = _sql.replace(/@BID@/ig, `'${BID}'`) |
| | | _sql = _sql.replace(/@typename@/ig, `'typename'`) |
| | | _sql = _sql.replace(/@\$|\$@/ig, '').replace(/@datam@/ig, `''`) |
| | | _sql = _sql.replace(/\$check@|@check\$/ig, '') |
| | | |
| | | return _sql |
| | | } |
| | |
| | | if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) { |
| | | if (!cell.modal || cell.modal.fields.length === 0) { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”中表单尚未添加`}) |
| | | } else if (cell.OpenType === 'pop') { |
| | | let forms = [] |
| | | cell.modal.fields.forEach(n => { |
| | | if (n.type === 'funcvar' && n.field) { |
| | | forms.push(n.field) |
| | | } |
| | | }) |
| | | if (cell.verify && cell.verify.billcodes && cell.verify.billcodes.length > 0) { |
| | | let bills = cell.verify.billcodes.filter(item => item.status !== 'false').map(item => item.field) |
| | | bills.forEach(n => { |
| | | if (!forms.includes(n)) { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”中单号生成的函数变量“${n}”不存在`}) |
| | | } |
| | | }) |
| | | forms = forms.filter(n => !bills.includes(n)) |
| | | } |
| | | if (forms.length) { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”中函数变量表单“${forms.join(',')}”尚未使用`}) |
| | | } |
| | | } |
| | | } else if (cell.OpenType === 'excelIn') { |
| | | if (!cell.verify || !cell.verify.sheet || !cell.verify.columns || cell.verify.columns.length === 0) { |
| | |
| | | if (['pop', 'prompt', 'exec'].includes(cell.OpenType) && cell.verify && !cell.output) { |
| | | if (cell.verify.noteEnable === 'true') { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”未设置返回值短信发送无效!`}) |
| | | } else if (cell.verify.wxNote === 'true') { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”未设置返回值公众号消息无效!`}) |
| | | } else if (cell.verify.emailEnable === 'true') { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”未设置返回值邮件发送无效!`}) |
| | | } else if (cell.verify.DeepSeekable === 'true') { |
| | | errors.push({ level: 0, detail: `按钮“${cell.label}”未设置返回值DeekSeek无效!`}) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | if (card.$c_fc) { |
| | | let idCtrl = false |
| | | let supModule = '' |
| | | |
| | | if (card.wrap.datatype === 'dynamic') { |
| | | supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : '' |
| | | if (supModule === 'empty') { |
| | | supModule = '' |
| | | } |
| | | } else { |
| | | if (card.wrap.datatype === 'static') { |
| | | supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : '' |
| | | } else { |
| | | supModule = null |
| | | } |
| | | } |
| | | |
| | | card.subcards.forEach(item => { |
| | | if (item.subButton.intertype === 'system' && !item.subButton.sqlType) { |
| | | errors.push({ level: 0, detail: `${item.subButton.label} 按钮请设置操作类型`}) |
| | | } |
| | | if (item.subButton.Ot === 'requiredSgl' && card.wrap.datatype === 'static') { |
| | | errors.push({ level: 0, detail: `${item.subButton.label} 按钮选行时不可使用静态数据源`}) |
| | | } |
| | | if (item.subButton.verify && !item.subButton.output) { |
| | | if (item.subButton.verify.noteEnable === 'true') { |
| | | errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值短信发送无效!`}) |
| | | } else if (item.subButton.verify.wxNote === 'true') { |
| | | errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值公众号消息无效!`}) |
| | | } else if (item.subButton.verify.emailEnable === 'true') { |
| | | errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值邮件发送无效!`}) |
| | | } else if (item.subButton.verify.DeepSeekable === 'true') { |
| | | errors.push({ level: 0, detail: `${item.subButton.label} 按钮未设置返回值DeekSeek无效!`}) |
| | | } |
| | | } |
| | | |
| | | let forms = [] |
| | | item.fields.forEach(m => { |
| | | if (m.type === 'funcvar' && m.field) { |
| | | forms.push(m.field) |
| | | } |
| | | if (m.dataSource && /@ID@/ig.test(m.dataSource)) { |
| | | idCtrl = true |
| | | } |
| | | if (m.type === 'linkMain' && !supModule && supModule !== null) { |
| | | if (item.setting && item.setting.title) { |
| | | errors.push({ level: 1, detail: `请检查分组“${item.setting.title}”中关联主表“${m.label}”是否有效`}) |
| | | } else { |
| | | errors.push({ level: 1, detail: `请检查关联主表“${m.label}”是否有效`}) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | if (item.subButton.verify && item.subButton.verify.billcodes && item.subButton.verify.billcodes.length > 0) { |
| | | let bills = item.subButton.verify.billcodes.filter(item => item.status !== 'false').map(item => item.field) |
| | | bills.forEach(n => { |
| | | if (!forms.includes(n)) { |
| | | errors.push({ level: 0, detail: `按钮“${item.subButton.label}”中单号生成的函数变量“${n}”不存在`}) |
| | | } |
| | | }) |
| | | forms = forms.filter(n => !bills.includes(n)) |
| | | } |
| | | if (forms.length) { |
| | | if (item.setting && item.setting.title) { |
| | | errors.push({ level: 0, detail: `分组“${item.setting.title}”中函数变量表单“${forms.join(',')}”尚未使用`}) |
| | | } else { |
| | | errors.push({ level: 0, detail: `函数变量表单“${forms.join(',')}”尚未使用`}) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | card.idCtrl = idCtrl |
| | | } |
| | | |
| | | return errors |
| | | } |
| | | |
| | |
| | | let _ch_d = sql.match(/@check\$/ig) |
| | | let _m_b = sql.match(/\$@/ig) |
| | | let _m_d = sql.match(/@\$/ig) |
| | | let caseErr = false |
| | | |
| | | _quot = _quot ? _quot.length : 0 |
| | | _lparen = _lparen ? _lparen.length : 0 |
| | |
| | | _ch_d = _ch_d ? _ch_d.length : 0 |
| | | _m_b = _m_b ? _m_b.length : 0 |
| | | _m_d = _m_d ? _m_d.length : 0 |
| | | |
| | | if (/case\s+when\s+[\s\S]+\send(\s|\n|$)/ig.test(sql)) { |
| | | sql.match(/case\s+when\s+[\s\S]+\send(\s|\n|$)/ig).forEach(line => { |
| | | if (!/\selse\s/ig.test(line)) { |
| | | caseErr = true |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (_quot % 2 !== 0) { |
| | | notification.warning({ |
| | |
| | | }) |
| | | return false |
| | | } else if (/\sdecimal\(8,/ig.test(sql)) { |
| | | let lines = '' |
| | | sql.split(/\n/).forEach((s, i) => { |
| | | if (/(^|\s)decimal\(8,/ig.test(s)) { |
| | | lines = '第' + (i + 1) + '行中' |
| | | } |
| | | }) |
| | | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: `不可使用 decimal(8`, |
| | | message: `${lines}不可使用 decimal(8`, |
| | | duration: 5 |
| | | }) |
| | | return false |
| | | } else if (caseErr) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: 'case when 语句需要有 else', |
| | | duration: 5 |
| | | }) |
| | | return false |
| | |
| | | cols.push('A' + cols[i]) |
| | | } |
| | | |
| | | let columns = JSON.parse(JSON.stringify(btn.columns)) |
| | | columns = columns.filter((col, index) => { |
| | | col.colIndex = cols[index] || (index + 1) |
| | | if (col.import !== 'init' && (/^Decimal/ig.test(col.type) || /^int/ig.test(col.type))) { |
| | | col.declen = 0 |
| | | if (/^Decimal/ig.test(col.type)) { |
| | | col.declen = +col.type.match(/\d+/g)[1] |
| | | } |
| | | col.declen = col.declen || 0 |
| | | } |
| | | if (col.required === 'false') { |
| | | delete col.min |
| | | delete col.max |
| | | } |
| | | |
| | | return col.import !== 'false' |
| | | }) |
| | | |
| | | let _Ltext = data.map((item, lindex) => { |
| | | let vals = [] |
| | | btn.columns.forEach((col, cindex) => { |
| | | if (col.import === 'false') return |
| | | |
| | | columns.forEach(col => { |
| | | let val = item[col.Column] !== undefined ? item[col.Column] : '' |
| | | let _colindex = cols[cindex] || (cindex + 1) |
| | | let _position = (_topline + lindex + 1) + '行 ' + _colindex + '列 ' |
| | | let _position = (_topline + lindex + 1) + '行 ' + col.colIndex + '列 ' |
| | | let eLen = errors.length |
| | | |
| | | if (col.import === 'init') { |
| | | if (col.$error) { |
| | | |
| | | } else if (col.import === 'init') { |
| | | if (/^Nvarchar/ig.test(col.type)) { |
| | | val = '' |
| | | } else if (/^Decimal/ig.test(col.type) || /^int/ig.test(col.type)) { |
| | |
| | | if (!val || isNaN(val)) { |
| | | val = 0 |
| | | } |
| | | } else if (!val && val !== 0) { |
| | | } |
| | | if (!val && val !== 0) { |
| | | errors.push(_position + '内容不可为空') |
| | | } else if (isNaN(val)) { // 检验是否为数值 |
| | | errors.push(_position + '内容应为数值') |
| | | } else if ((col.min || col.min === 0) && val < col.min) { // 最小值检验 |
| | | } else if (typeof(col.min) === 'number' && val < col.min) { // 最小值检验 |
| | | errors.push(_position + '小于最小值') |
| | | } else if ((col.max || col.max === 0) && val > col.max) { // 最大值检验 |
| | | } else if (typeof(col.max) === 'number' && val > col.max) { // 最大值检验 |
| | | errors.push(_position + '大于最大值') |
| | | } else { |
| | | let _float = (val + '').split('.')[1] |
| | | if (_float && _float.length > col.declen) { |
| | | if (col.declen) { |
| | | errors.push(_position + `数值不可大于${col.declen}位小数`) |
| | | } else { |
| | | errors.push(_position + '数值应为整数') |
| | | } |
| | | } |
| | | } |
| | | } else if (col.type === 'date' || col.type === 'datetime') { |
| | | if (typeof(val) === 'number') { |
| | |
| | | } |
| | | } |
| | | |
| | | if (errors.length > eLen) { |
| | | col.$error = true |
| | | } |
| | | |
| | | vals.push(`'${val}'`) |
| | | }) |
| | | |
| | |
| | | let param = JSON.parse(window.decodeURIComponent(window.atob(params.param))) |
| | | |
| | | sessionStorage.setItem('dataM', param.dataM || '') |
| | | let urlParam = {...param} |
| | | |
| | | delete urlParam.tempId |
| | | delete urlParam.pageId |
| | | delete urlParam.dataM |
| | | |
| | | Object.keys(urlParam).forEach(key => { |
| | | if (key === key.toLowerCase()) return |
| | | urlParam[key.toLowerCase()] = urlParam[key] |
| | | delete urlParam[key] |
| | | }) |
| | | |
| | | this.setState({ |
| | | BID: param.id || '', |
| | | tempId: param.tempId, |
| | | urlParam: param, |
| | | urlParam: urlParam, |
| | | pageId: param.pageId || '' |
| | | }, () => { |
| | | setTimeout(() => { |
| | |
| | | |
| | | config.components = config.components.filter(item => !['tabs', 'search'].includes(item.type)) |
| | | |
| | | let urlparam = urlParam ? {...urlParam} : {} |
| | | if (config.urlFields && config.urlFields.length) { |
| | | config.urlFields.forEach(field => { |
| | | let key = field.toLowerCase() |
| | | if (urlparam[key] !== undefined) return |
| | | urlparam[key] = '' |
| | | }) |
| | | } |
| | | |
| | | if (window.backend && config.allSqls) { |
| | | let urlparam = urlParam || {} |
| | | let keys = Object.keys(urlparam) |
| | | config.allSqls.forEach(item => { |
| | | item.id = md5(window.GLOB.appkey + item.v_id) |
| | |
| | | |
| | | if (config.urlFields) { |
| | | config.urlFields.forEach(field => { |
| | | let val = `'${urlParam ? (urlParam[field] || '') : ''}'` |
| | | let val = `'${urlparam[field.toLowerCase()]}'` |
| | | regs.push({ |
| | | reg: new RegExp('@' + field + '@', 'ig'), |
| | | value: val |
| | |
| | | localStorage.setItem(_addressUrl, 'true') |
| | | this.queryAddress() |
| | | } |
| | | if (res.deekseek !== 'true') { |
| | | localStorage.removeItem(window.GLOB.sysSign + 'ds') |
| | | } else { |
| | | localStorage.setItem(window.GLOB.sysSign + 'ds', 'true') |
| | | } |
| | | } else if (res.ErrCode === 'N') { |
| | | localStorage.removeItem(_authUrl) |
| | | this.setState({ |
| | |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updateConfig}/> |
| | | <Paragraph style={{padding: '15px 0px 0px 32px'}} copyable={{ text: MenuId }}>菜单ID:</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>菜单组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCss config={config} updateConfig={this.updateConfig}/> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>复制菜单下所有组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCopy /> |
| | | </> : null} |
| | | </Panel> |
| | |
| | | <ReplaceField config={config} updateConfig={this.resetConfig}/> |
| | | <LowerField config={config} updateConfig={this.resetConfig}/> |
| | | <PictureController/> |
| | | <Button onClick={() => window.open('#/ai')}>DeepSeek</Button> |
| | | </div>} trigger={['hover']}> |
| | | <div className="mk-button-more">更多<DownOutlined/></div> |
| | | </Dropdown> : null} |
| | |
| | | border-bottom: 1px solid #e8e8e8; |
| | | height: 45px; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | overflow-y: hidden; |
| | | overflow-x: auto; |
| | | z-index: 10; |
| | | |
| | | button { |
| | |
| | | height: 24px; |
| | | } |
| | | } |
| | | |
| | | .mk-opeartion-list::-webkit-scrollbar { |
| | | display: none; |
| | | } |
| | | } |
| | | .menu-view.saving { |
| | | .anticon-tool { |
New file |
| | |
| | | import React, { Component, useState } from 'react' |
| | | import { fromJS } from 'immutable' |
| | | import { Spin, notification, Tooltip, Input, message, Dropdown, Button, Modal } from 'antd' |
| | | import { LoadingOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons' |
| | | // import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter' |
| | | // import { dark } from 'react-syntax-highlighter/dist/esm/styles/prism' |
| | | import moment from 'moment' |
| | | |
| | | import Api from '@/api' |
| | | import Utils from '@/utils/utils.js' |
| | | |
| | | import avatar from '@/assets/img/avatar.jpg' |
| | | import './index.scss' |
| | | |
| | | const { TextArea } = Input |
| | | const { confirm } = Modal |
| | | |
| | | let script = document.createElement('script') |
| | | script.src = '../marked.js' |
| | | document.body.appendChild(script) |
| | | |
| | | const burl = window.atob('aHR0cHM6Ly9jbG91$mkZC5tazloLmNu'.replace('$mk', '')) |
| | | let logo = window.GLOB.doclogo || '' |
| | | let uavatar = sessionStorage.getItem('avatar') || avatar |
| | | let fullname = sessionStorage.getItem('Full_Name') || '' |
| | | |
| | | const DeepSeekLogo = (props) => <span {...props} className="anticon mk-anticon-deepseek"> |
| | | <svg viewBox="0 0 1391 1024" fill="currentColor"> |
| | | <path d="M1361.92 83.136c-14.272-7.04-20.416 6.272-28.736 12.992-2.816 2.24-5.248 5.12-7.68 7.68-20.8 22.336-45.056 36.864-76.8 35.136-46.464-2.56-86.08 12.032-121.152 47.616-7.552-43.904-32.256-70.08-69.888-86.912-19.712-8.768-39.68-17.472-53.376-36.48-9.664-13.44-12.288-28.48-17.216-43.264-3.008-8.96-6.08-18.112-16.32-19.712-11.2-1.728-15.552 7.68-19.968 15.424-17.536 32.128-24.32 67.52-23.68 103.296 1.6 80.448 35.52 144.576 103.04 190.144 7.68 5.312 9.6 10.56 7.168 18.176-4.608 15.68-10.048 30.976-14.912 46.592-3.072 10.112-7.68 12.352-18.304 8a308.224 308.224 0 0 1-97.28-66.176c-48-46.4-91.392-97.664-145.472-137.792a655.36 655.36 0 0 0-38.528-26.432c-55.232-53.76 7.232-97.792 21.632-103.04 15.104-5.376 5.312-24.128-43.52-23.936C652.032 24.704 607.36 41.024 550.4 62.72a156.8 156.8 0 0 1-26.048 7.68 542.016 542.016 0 0 0-161.408-5.696c-105.6 11.904-189.888 61.824-251.904 147.2C36.608 314.24 19.072 430.848 40.512 552.32c22.528 128 87.808 234.048 188.16 316.992 104 85.888 223.808 128 360.512 120 82.944-4.864 175.424-16 279.68-104.32 26.368 13.056 53.888 18.24 99.712 22.272 35.2 3.328 69.184-1.792 95.424-7.232 41.216-8.704 38.4-46.848 23.424-53.888-120.576-56.32-94.208-33.408-118.272-51.84 61.376-72.768 153.792-148.224 189.952-392.768 2.816-19.392 0.384-31.552 0-47.36-0.256-9.536 1.92-13.312 12.8-14.4a231.04 231.04 0 0 0 86.592-26.56c78.272-42.88 109.696-113.024 117.184-197.184 1.088-12.928-0.256-26.24-13.76-32.96z m-681.408 757.76c-116.928-92.096-173.696-122.368-197.12-120.96-21.888 1.152-17.984 26.304-13.184 42.624 5.12 16.128 11.648 27.328 20.8 41.408 6.464 9.408 10.752 23.424-6.272 33.92-37.76 23.424-103.232-7.872-106.24-9.472-76.288-44.8-140.032-104.192-184.96-185.344-43.264-78.08-68.48-161.92-72.576-251.328-1.152-21.632 5.184-29.312 26.688-33.152a265.6 265.6 0 0 1 85.696-2.24c119.296 17.472 220.928 71.04 306.048 155.52 48.768 48.32 85.504 105.92 123.392 162.176 40.256 59.776 83.648 116.672 138.88 163.392 19.392 16.32 35.072 28.8 49.92 37.952-44.928 5.056-119.872 6.08-171.008-34.496z m56.064-361.024a17.152 17.152 0 1 1 2.752 9.6 16.896 16.896 0 0 1-2.752-9.664z m174.08 89.472a102.72 102.72 0 0 1-33.024 8.96 70.528 70.528 0 0 1-44.736-14.272c-15.296-12.8-26.176-19.968-30.848-42.496a99.264 99.264 0 0 1 0.832-32.96c4.032-18.368-0.384-30.08-13.248-40.768-10.624-8.768-23.872-11.072-38.592-11.072a31.168 31.168 0 0 1-14.272-4.416c-6.144-3.072-11.136-10.752-6.336-20.16 1.536-3.008 8.96-10.304 10.752-11.712 19.84-11.328 42.88-7.68 64.192 0.896 19.712 8.064 34.56 22.848 56 43.776 21.952 25.28 25.792 32.384 38.4 51.328 9.856 14.848 18.816 30.208 24.96 47.616 3.776 10.88-1.152 19.776-14.08 25.28z"></path> |
| | | </svg> |
| | | </span> |
| | | |
| | | const DeepSeekIcon = (props) => <span {...props} className="ds-icon anticon mk-anticon-think"> |
| | | <svg viewBox="0 0 20 20" fill="none"><path d="M2.656 17.344c-1.016-1.015-1.15-2.75-.313-4.925.325-.825.73-1.617 1.205-2.365L3.582 10l-.033-.054c-.5-.799-.91-1.596-1.206-2.365-.836-2.175-.703-3.91.313-4.926.56-.56 1.364-.86 2.335-.86 1.425 0 3.168.636 4.957 1.756l.053.034.053-.034c1.79-1.12 3.532-1.757 4.957-1.757.972 0 1.776.3 2.335.86 1.014 1.015 1.148 2.752.312 4.926a13.892 13.892 0 0 1-1.206 2.365l-.034.054.034.053c.5.8.91 1.596 1.205 2.365.837 2.175.704 3.911-.311 4.926-.56.56-1.364.861-2.335.861-1.425 0-3.168-.637-4.957-1.757L10 16.415l-.053.033c-1.79 1.12-3.532 1.757-4.957 1.757-.972 0-1.776-.3-2.335-.86zm13.631-4.399c-.187-.488-.429-.988-.71-1.492l-.075-.132-.092.12a22.075 22.075 0 0 1-3.968 3.968l-.12.093.132.074c1.308.734 2.559 1.162 3.556 1.162.563 0 1.006-.138 1.298-.43.3-.3.436-.774.428-1.346-.008-.575-.159-1.264-.449-2.017zm-6.345 1.65l.058.042.058-.042a19.881 19.881 0 0 0 4.551-4.537l.043-.058-.043-.058a20.123 20.123 0 0 0-2.093-2.458 19.732 19.732 0 0 0-2.458-2.08L10 5.364l-.058.042A19.883 19.883 0 0 0 5.39 9.942L5.348 10l.042.059c.631.874 1.332 1.695 2.094 2.457a19.74 19.74 0 0 0 2.458 2.08zm6.366-10.902c-.293-.293-.736-.431-1.298-.431-.998 0-2.248.429-3.556 1.163l-.132.074.12.092a21.938 21.938 0 0 1 3.968 3.968l.092.12.074-.132c.282-.504.524-1.004.711-1.492.29-.753.442-1.442.45-2.017.007-.572-.129-1.045-.429-1.345zM3.712 7.055c.202.514.44 1.013.712 1.493l.074.13.092-.119a21.94 21.94 0 0 1 3.968-3.968l.12-.092-.132-.074C7.238 3.69 5.987 3.262 4.99 3.262c-.563 0-1.006.138-1.298.43-.3.301-.436.774-.428 1.346.007.575.159 1.264.448 2.017zm0 5.89c-.29.753-.44 1.442-.448 2.017-.008.572.127 1.045.428 1.345.293.293.736.431 1.298.431.997 0 2.247-.428 3.556-1.162l.131-.074-.12-.093a21.94 21.94 0 0 1-3.967-3.968l-.093-.12-.074.132a11.712 11.712 0 0 0-.71 1.492z" fill="currentColor" stroke="currentColor" strokeWidth=".1"></path><path d="M10.706 11.704A1.843 1.843 0 0 1 8.155 10a1.845 1.845 0 1 1 2.551 1.704z" fill="currentColor" stroke="currentColor" strokeWidth=".2"></path></svg> |
| | | </span> |
| | | |
| | | const NewTalk = (props) => <span {...props} className="anticon mk-anticon-new"> |
| | | <svg viewBox="0 0 28 28" fill="none"><path d="M9.10999 27C8.92999 27 8.76001 26.96 8.60001 26.9C8.43001 26.83 8.29 26.74 8.16 26.61C8.03 26.49 7.94 26.3499 7.87 26.1899C7.79999 26.0299 7.76001 25.8599 7.76001 25.6899L7.73001 23.04C7.34001 22.98 6.95001 22.8799 6.57001 22.7599C6.19001 22.6299 5.83001 22.48 5.48001 22.29C5.13001 22.1 4.79999 21.88 4.48999 21.63C4.17999 21.39 3.89 21.1199 3.63 20.82C3.37 20.52 3.13999 20.21 2.92999 19.87C2.72999 19.53 2.56001 19.18 2.42001 18.82C2.28001 18.45 2.17001 18.07 2.10001 17.69C2.03001 17.3 2 16.92 2 16.53V9.46995C2 9.03995 2.04 8.61995 2.12 8.19995C2.21 7.77995 2.34 7.36995 2.5 6.96995C2.67 6.57995 2.88 6.19995 3.12 5.84995C3.36 5.48995 3.64001 5.15995 3.95001 4.85995C4.26001 4.55995 4.59999 4.28995 4.95999 4.04995C5.32999 3.80995 5.70999 3.60995 6.10999 3.44995C6.51999 3.27995 6.94 3.15995 7.37 3.07995C7.79999 2.98995 8.23001 2.94995 8.67001 2.94995H13.3C13.46 2.94995 13.61 2.97995 13.76 3.03995C13.9 3.09995 14.03 3.17995 14.14 3.28995C14.25 3.39995 14.33 3.51995 14.39 3.65995C14.45 3.79995 14.48 3.94995 14.48 4.09995C14.48 4.25995 14.45 4.39995 14.39 4.54995C14.33 4.68995 14.25 4.80995 14.14 4.91995C14.03 5.02995 13.9 5.10995 13.76 5.16995C13.61 5.22995 13.46 5.25995 13.3 5.25995H8.67001C8.38001 5.25995 8.09999 5.27995 7.82999 5.33995C7.54999 5.38995 7.27999 5.46995 7.01999 5.57995C6.75999 5.67995 6.50999 5.80995 6.26999 5.96995C6.03999 6.11995 5.82 6.29995 5.62 6.48995C5.42 6.68995 5.23999 6.89995 5.07999 7.12995C4.92999 7.35995 4.78999 7.59995 4.67999 7.85995C4.57999 8.10995 4.49 8.37995 4.44 8.64995C4.38 8.91995 4.35999 9.18995 4.35999 9.46995V16.53C4.35999 16.81 4.38 17.08 4.44 17.36C4.5 17.63 4.58 17.9 4.69 18.16C4.8 18.42 4.93 18.67 5.09 18.9C5.25 19.13 5.43001 19.3499 5.64001 19.5499C5.84001 19.75 6.05999 19.92 6.29999 20.08C6.53999 20.24 6.79 20.37 7.06 20.47C7.32 20.58 7.6 20.66 7.88 20.72C8.16001 20.77 8.44001 20.7999 8.73001 20.7999C8.91001 20.7999 9.08 20.83 9.25 20.9C9.41 20.97 9.55999 21.0599 9.67999 21.18C9.80999 21.3099 9.91001 21.45 9.98001 21.61C10.05 21.77 10.08 21.94 10.09 22.11L10.1 23.74L13.08 21.61C13.84 21.07 14.69 20.7999 15.63 20.7999H19.32C19.61 20.7999 19.89 20.77 20.16 20.72C20.44 20.67 20.71 20.59 20.97 20.4799C21.23 20.3699 21.48 20.24 21.72 20.09C21.95 19.94 22.17 19.76 22.37 19.57C22.57 19.3699 22.75 19.16 22.91 18.93C23.07 18.7 23.2 18.46 23.31 18.2C23.41 17.95 23.5 17.68 23.55 17.41C23.61 17.14 23.63 16.87 23.63 16.59V12.94C23.63 12.79 23.66 12.64 23.72 12.5C23.78 12.36 23.87 12.23 23.98 12.13C24.09 12.02 24.22 11.93 24.36 11.88C24.51 11.82 24.66 11.79 24.82 11.79C24.97 11.79 25.12 11.82 25.27 11.88C25.41 11.93 25.54 12.02 25.65 12.13C25.76 12.23 25.85 12.36 25.91 12.5C25.97 12.64 26 12.79 26 12.94V16.59C26 17.02 25.95 17.44 25.87 17.86C25.78 18.28 25.66 18.69 25.49 19.08C25.32 19.48 25.11 19.8499 24.87 20.2099C24.63 20.57 24.35 20.9 24.04 21.2C23.73 21.5 23.39 21.7699 23.03 22.0099C22.67 22.2499 22.28 22.45 21.88 22.61C21.47 22.77 21.06 22.9 20.63 22.9799C20.2 23.07 19.76 23.11 19.32 23.11H16.4C15.47 23.11 14.62 23.3799 13.86 23.9199L9.91 26.74C9.67 26.91 9.39999 27 9.10999 27Z" fill="currentColor"></path><path d="M24.6805 5.14453H18.1874C17.5505 5.14453 17.0342 5.66086 17.0342 6.29778C17.0342 6.9347 17.5505 7.45102 18.1874 7.45102H24.6805C25.3175 7.45102 25.8338 6.9347 25.8338 6.29778C25.8338 5.66086 25.3175 5.14453 24.6805 5.14453Z" fill="currentColor"></path><path d="M22.6137 3.1804C22.6137 2.52848 22.0852 2 21.4333 2C20.7814 2 20.2529 2.52848 20.2529 3.1804V9.4168C20.2529 10.0687 20.7814 10.5972 21.4333 10.5972C22.0852 10.5972 22.6137 10.0687 22.6137 9.4168V3.1804Z" fill="currentColor"></path></svg> |
| | | </span> |
| | | |
| | | const MkCopy = (props) => <Tooltip placement="top" title="复制"> |
| | | <span {...props} className="ds-icon anticon mk-anticon-copy"> |
| | | <svg viewBox="0 0 20 20" fill="none"><defs><clipPath id="clip1248_20193"><rect width="17.052675" height="17.052441" transform="translate(1.000000 1.000000)" fill="white" fillOpacity="0"></rect></clipPath><clipPath id="clip1257_20794"><rect width="20.000000" height="20.000000" fill="white" fillOpacity="0"></rect></clipPath></defs><g clipPath="url(#clip1257_20794)"><g clipPath="url(#clip1248_20193)"><path d="M5.03 14.64C4.77 14.64 4.5 14.62 4.24 14.56C3.98 14.51 3.73 14.43 3.49 14.33C3.24 14.23 3.01 14.1 2.79 13.96C2.57 13.81 2.37 13.64 2.18 13.45C1.99 13.26 1.82 13.05 1.68 12.83C1.53 12.61 1.4 12.37 1.3 12.13C1.2 11.88 1.13 11.63 1.07 11.36C1.02 11.1 1 10.84 1 10.57L1 5.07C1 4.8 1.02 4.54 1.07 4.27C1.13 4.01 1.2 3.76 1.3 3.51C1.4 3.26 1.53 3.03 1.68 2.81C1.82 2.58 1.99 2.38 2.18 2.19C2.37 2 2.57 1.83 2.79 1.68C3.01 1.53 3.24 1.41 3.49 1.31C3.73 1.2 3.98 1.13 4.24 1.07C4.5 1.02 4.77 1 5.03 1L10.49 1C10.75 1 11.01 1.02 11.27 1.07C11.53 1.13 11.78 1.2 12.03 1.31C12.27 1.41 12.51 1.53 12.73 1.68C12.95 1.83 13.15 2 13.34 2.19C13.53 2.38 13.69 2.58 13.84 2.81C13.99 3.03 14.11 3.26 14.21 3.51C14.31 3.76 14.39 4.01 14.44 4.27C14.5 4.54 14.52 4.8 14.52 5.07L12.94 5.07C12.94 4.91 12.92 4.75 12.89 4.58C12.86 4.43 12.81 4.27 12.75 4.12C12.69 3.97 12.61 3.83 12.52 3.69C12.43 3.56 12.33 3.43 12.22 3.32C12.1 3.2 11.98 3.1 11.85 3.01C11.71 2.92 11.57 2.84 11.42 2.78C11.27 2.72 11.12 2.67 10.96 2.64C10.81 2.61 10.65 2.59 10.49 2.59L5.03 2.59C4.87 2.59 4.71 2.61 4.55 2.64C4.4 2.67 4.24 2.72 4.09 2.78C3.95 2.84 3.8 2.92 3.67 3.01C3.54 3.1 3.41 3.2 3.3 3.32C3.18 3.43 3.08 3.56 2.99 3.69C2.9 3.83 2.83 3.97 2.77 4.12C2.71 4.27 2.66 4.43 2.63 4.58C2.6 4.75 2.58 4.91 2.58 5.07L2.58 10.57C2.58 10.73 2.6 10.89 2.63 11.05C2.66 11.21 2.71 11.37 2.77 11.52C2.83 11.67 2.9 11.81 2.99 11.94C3.08 12.08 3.18 12.2 3.3 12.32C3.41 12.43 3.54 12.54 3.67 12.63C3.8 12.72 3.95 12.79 4.09 12.86C4.24 12.92 4.4 12.96 4.55 13C4.71 13.03 4.87 13.04 5.03 13.04L5.03 14.64Z" fill="currentColor" fillOpacity="1.000000" fillRule="evenodd"></path></g><path d="M14.75 18.91L9.3 18.91C9.03 18.91 8.77 18.88 8.51 18.83C8.25 18.78 8 18.7 7.75 18.6C7.51 18.49 7.27 18.37 7.05 18.22C6.83 18.07 6.63 17.9 6.44 17.71C6.25 17.52 6.09 17.32 5.94 17.1C5.79 16.87 5.67 16.64 5.57 16.39C5.47 16.14 5.39 15.89 5.34 15.63C5.28 15.37 5.26 15.1 5.26 14.83L5.26 9.33C5.26 9.06 5.28 8.8 5.34 8.54C5.39 8.28 5.47 8.02 5.57 7.77C5.67 7.53 5.79 7.29 5.94 7.07C6.09 6.85 6.25 6.64 6.44 6.45C6.63 6.26 6.83 6.09 7.05 5.95C7.27 5.8 7.51 5.67 7.75 5.57C8 5.47 8.25 5.39 8.51 5.34C8.77 5.29 9.03 5.26 9.3 5.26L14.75 5.26C15.01 5.26 15.28 5.29 15.54 5.34C15.8 5.39 16.05 5.47 16.29 5.57C16.54 5.67 16.77 5.8 16.99 5.95C17.21 6.09 17.41 6.26 17.6 6.45C17.79 6.64 17.96 6.85 18.1 7.07C18.25 7.29 18.37 7.53 18.48 7.77C18.58 8.02 18.65 8.28 18.71 8.54C18.76 8.8 18.78 9.06 18.78 9.33L18.78 14.83C18.78 15.1 18.76 15.37 18.71 15.63C18.65 15.89 18.58 16.14 18.48 16.39C18.37 16.64 18.25 16.87 18.1 17.1C17.96 17.32 17.79 17.52 17.6 17.71C17.41 17.9 17.21 18.07 16.99 18.22C16.77 18.37 16.54 18.49 16.29 18.6C16.05 18.7 15.8 18.78 15.54 18.83C15.28 18.88 15.01 18.91 14.75 18.91ZM9.3 6.86C9.13 6.86 8.97 6.87 8.82 6.91C8.66 6.94 8.51 6.98 8.36 7.05C8.21 7.11 8.07 7.18 7.93 7.28C7.8 7.37 7.68 7.47 7.56 7.58C7.45 7.7 7.35 7.82 7.26 7.96C7.17 8.09 7.09 8.24 7.03 8.38C6.97 8.54 6.92 8.69 6.89 8.85C6.86 9.01 6.84 9.17 6.84 9.33L6.84 14.83C6.84 15 6.86 15.16 6.89 15.32C6.92 15.48 6.97 15.63 7.03 15.78C7.09 15.93 7.17 16.07 7.26 16.21C7.35 16.34 7.45 16.47 7.56 16.58C7.68 16.7 7.8 16.8 7.93 16.89C8.07 16.98 8.21 17.06 8.36 17.12C8.51 17.18 8.66 17.23 8.82 17.26C8.97 17.29 9.13 17.31 9.3 17.31L14.75 17.31C14.91 17.31 15.07 17.29 15.23 17.26C15.38 17.23 15.54 17.18 15.69 17.12C15.83 17.06 15.98 16.98 16.11 16.89C16.24 16.8 16.37 16.7 16.48 16.58C16.59 16.47 16.7 16.34 16.79 16.21C16.87 16.07 16.95 15.93 17.01 15.78C17.07 15.63 17.12 15.48 17.15 15.32C17.18 15.16 17.2 15 17.2 14.83L17.2 9.33C17.2 9.17 17.18 9.01 17.15 8.85C17.12 8.69 17.07 8.54 17.01 8.38C16.95 8.24 16.87 8.09 16.79 7.96C16.7 7.82 16.59 7.7 16.48 7.58C16.37 7.47 16.24 7.37 16.11 7.28C15.98 7.19 15.83 7.11 15.69 7.05C15.54 6.98 15.38 6.94 15.23 6.91C15.07 6.87 14.91 6.86 14.75 6.86L9.3 6.86Z" fill="currentColor" fillOpacity="1.000000" fillRule="nonzero"></path></g></svg> |
| | | </span> |
| | | </Tooltip> |
| | | |
| | | const MkLeft = ({ children, newContent }) => { |
| | | const [status, setStatus] = useState(false) |
| | | |
| | | const changeStatus = () => { |
| | | setStatus(!status) |
| | | } |
| | | |
| | | return ( |
| | | <div className={'mk-left' + (status ? ' close' : '')}> |
| | | {!status ? <div className="logo"> |
| | | <img src={logo} alt=""/> |
| | | <Tooltip placement="bottom" title="收起边栏"> |
| | | <span className="anticon mk-anticon-close" onClick={changeStatus}> |
| | | <svg viewBox="0 0 30 30" fill="none"><defs><clipPath id="clip1382_20239"><rect width="30.000000" height="30.000000" fill="white" fillOpacity="0"></rect></clipPath></defs><rect width="30.000000" height="30.000000" fill="#FFFFFF" fillOpacity="0"></rect><g clipPath="url(#clip1382_20239)"><rect id="rect" x="17.420410" y="12.316406" rx="1.000947" width="5.995172" height="2.001895" transform="rotate(137.159 17.420410 12.316406)" fill="currentColor" fillOpacity="1.000000"></rect><rect id="rect" x="12.959473" y="13.728516" rx="0.995190" width="6.002943" height="1.990380" transform="rotate(40.853 12.959473 13.728516)" fill="currentColor" fillOpacity="1.000000"></rect><path id="path" d="M20.1 25.5L9.9 25.51C9.48 25.51 9.06 25.47 8.65 25.39C8.24 25.3 7.84 25.18 7.45 25.02C7.06 24.86 6.69 24.66 6.34 24.43C5.99 24.19 5.67 23.92 5.37 23.63C5.07 23.33 4.81 23 4.58 22.65C4.34 22.3 4.15 21.93 3.98 21.54C3.82 21.15 3.7 20.75 3.62 20.34C3.54 19.93 3.5 19.51 3.5 19.09L3.5 10.93C3.5 10.51 3.54 10.1 3.62 9.68C3.7 9.27 3.82 8.87 3.98 8.48C4.15 8.09 4.34 7.72 4.58 7.37C4.81 7.02 5.07 6.69 5.37 6.39C5.67 6.1 5.99 5.83 6.34 5.6C6.69 5.36 7.06 5.16 7.45 5C7.84 4.84 8.24 4.72 8.65 4.64C9.06 4.55 9.48 4.51 9.9 4.51L20.1 4.5C20.52 4.5 20.94 4.54 21.35 4.62C21.76 4.7 22.16 4.83 22.55 4.99C22.94 5.15 23.31 5.35 23.66 5.58C24 5.82 24.33 6.08 24.62 6.38C24.92 6.68 25.19 7 25.42 7.35C25.65 7.7 25.85 8.07 26.01 8.46C26.17 8.85 26.3 9.25 26.38 9.67C26.46 10.08 26.5 10.5 26.5 10.92L26.5 19.07C26.5 19.5 26.46 19.91 26.38 20.32C26.3 20.74 26.17 21.14 26.01 21.53C25.85 21.92 25.65 22.29 25.42 22.64C25.19 22.99 24.92 23.31 24.62 23.61C24.33 23.91 24 24.17 23.66 24.41C23.31 24.64 22.94 24.84 22.55 25C22.16 25.16 21.76 25.29 21.35 25.37C20.94 25.45 20.52 25.5 20.1 25.5ZM9.9 6.6C9.61 6.6 9.33 6.63 9.05 6.69C8.78 6.74 8.51 6.82 8.24 6.93C7.98 7.04 7.73 7.18 7.5 7.33C7.26 7.49 7.04 7.67 6.84 7.87C6.64 8.07 6.46 8.29 6.31 8.53C6.15 8.77 6.02 9.01 5.91 9.28C5.8 9.54 5.72 9.81 5.66 10.09C5.61 10.37 5.58 10.65 5.58 10.93L5.58 19.09C5.58 19.37 5.61 19.65 5.66 19.93C5.72 20.21 5.8 20.48 5.91 20.74C6.02 21.01 6.15 21.26 6.31 21.49C6.46 21.73 6.64 21.95 6.84 22.15C7.04 22.35 7.26 22.53 7.5 22.69C7.73 22.85 7.98 22.98 8.24 23.09C8.51 23.2 8.78 23.28 9.05 23.33C9.33 23.39 9.61 23.42 9.9 23.42L20.1 23.41C20.38 23.41 20.67 23.37 20.94 23.32C21.22 23.26 21.49 23.18 21.75 23.07C22.01 22.96 22.26 22.83 22.5 22.67C22.73 22.51 22.95 22.33 23.15 22.13C23.35 21.93 23.53 21.71 23.69 21.48C23.85 21.24 23.98 20.99 24.09 20.73C24.2 20.47 24.28 20.2 24.33 19.92C24.39 19.64 24.42 19.36 24.42 19.07L24.42 10.92C24.42 10.64 24.39 10.35 24.33 10.07C24.28 9.79 24.2 9.52 24.09 9.26C23.98 9 23.85 8.75 23.69 8.51C23.53 8.28 23.35 8.06 23.15 7.86C22.95 7.66 22.73 7.48 22.5 7.32C22.26 7.16 22.01 7.03 21.75 6.92C21.49 6.81 21.22 6.73 20.94 6.67C20.67 6.62 20.38 6.59 20.1 6.59L9.9 6.6Z" fill="currentColor" fillOpacity="1.000000" fillRule="nonzero"></path><path id="rect" d="M8.5 5.51L10.54 5.51L10.6 24.43L8.55 24.43L8.5 5.51Z" fill="currentColor" fillOpacity="1.000000" fillRule="evenodd"></path></g></svg> |
| | | </span> |
| | | </Tooltip> |
| | | </div> : <div className="logo-open"> |
| | | <div className="d-l"> |
| | | <DeepSeekLogo onClick={changeStatus}/> |
| | | </div> |
| | | <div className="d-o"> |
| | | <Tooltip placement="top" title="打开边栏"> |
| | | <span className="anticon mk-anticon-open" onClick={changeStatus}> |
| | | <svg viewBox="0 0 30 30" fill="none"><defs><clipPath id="clip1381_20236"><rect width="30.000000" height="30.000000" fill="white" fillOpacity="0"></rect></clipPath></defs><rect width="30.000000" height="30.000000" fill="#FFFFFF" fillOpacity="0"></rect><g clipPath="url(#clip1381_20236)"><rect id="rect" x="11.572754" y="17.683594" rx="1.000947" width="5.995172" height="2.001895" transform="rotate(-42.841 11.572754 17.683594)" fill="currentColor" fillOpacity="1.000000"></rect><rect id="rect" x="16.033691" y="16.271484" rx="0.995190" width="6.002943" height="1.990380" transform="rotate(-139.147 16.033691 16.271484)" fill="currentColor" fillOpacity="1.000000"></rect><path id="path" d="M20.09 25.48L9.89 25.5C9.47 25.5 9.05 25.45 8.64 25.37C8.23 25.29 7.83 25.17 7.44 25C7.05 24.84 6.68 24.64 6.33 24.41C5.98 24.18 5.66 23.91 5.36 23.61C5.07 23.31 4.8 22.99 4.57 22.64C4.34 22.29 4.14 21.92 3.98 21.53C3.82 21.14 3.69 20.74 3.61 20.32C3.53 19.91 3.49 19.49 3.49 19.07L3.49 10.92C3.49 10.5 3.53 10.08 3.61 9.67C3.69 9.25 3.82 8.85 3.98 8.46C4.14 8.07 4.34 7.7 4.57 7.35C4.8 7 5.07 6.68 5.36 6.38C5.66 6.08 5.98 5.81 6.33 5.58C6.68 5.35 7.05 5.15 7.44 4.99C7.83 4.82 8.23 4.7 8.64 4.62C9.05 4.54 9.47 4.5 9.89 4.5L20.09 4.48C20.51 4.48 20.93 4.52 21.34 4.6C21.75 4.69 22.15 4.81 22.54 4.97C22.93 5.13 23.3 5.33 23.65 5.57C24 5.8 24.32 6.06 24.62 6.36C24.92 6.66 25.18 6.98 25.41 7.33C25.65 7.69 25.84 8.06 26.01 8.45C26.17 8.84 26.29 9.24 26.37 9.65C26.45 10.06 26.49 10.48 26.5 10.91L26.5 19.06C26.49 19.48 26.45 19.89 26.37 20.31C26.29 20.72 26.17 21.12 26.01 21.51C25.84 21.9 25.65 22.27 25.41 22.62C25.18 22.97 24.92 23.3 24.62 23.6C24.32 23.89 24 24.16 23.65 24.39C23.3 24.63 22.93 24.83 22.54 24.99C22.15 25.15 21.75 25.27 21.34 25.35C20.93 25.44 20.51 25.48 20.09 25.48ZM9.89 6.59C9.61 6.59 9.32 6.62 9.05 6.67C8.77 6.73 8.5 6.81 8.24 6.92C7.98 7.03 7.73 7.16 7.49 7.32C7.26 7.48 7.04 7.66 6.84 7.86C6.64 8.06 6.46 8.28 6.3 8.51C6.14 8.75 6.01 9 5.9 9.26C5.79 9.52 5.71 9.8 5.66 10.07C5.6 10.35 5.57 10.63 5.57 10.92L5.57 19.07C5.57 19.36 5.6 19.64 5.66 19.92C5.71 20.19 5.79 20.47 5.9 20.73C6.01 20.99 6.14 21.24 6.3 21.48C6.46 21.71 6.64 21.93 6.84 22.13C7.04 22.33 7.26 22.51 7.49 22.67C7.73 22.83 7.98 22.96 8.24 23.07C8.5 23.18 8.77 23.26 9.05 23.32C9.32 23.37 9.61 23.4 9.89 23.4L20.09 23.39C20.38 23.39 20.66 23.36 20.94 23.3C21.21 23.25 21.48 23.17 21.75 23.06C22.01 22.95 22.26 22.81 22.49 22.66C22.73 22.5 22.95 22.32 23.15 22.12C23.35 21.91 23.52 21.7 23.68 21.46C23.84 21.22 23.97 20.98 24.08 20.71C24.19 20.45 24.27 20.18 24.33 19.9C24.38 19.62 24.41 19.34 24.41 19.06L24.41 10.91C24.41 10.62 24.38 10.34 24.33 10.06C24.27 9.78 24.19 9.51 24.08 9.25C23.97 8.98 23.84 8.74 23.68 8.5C23.52 8.26 23.35 8.04 23.15 7.84C22.95 7.64 22.73 7.46 22.49 7.3C22.26 7.15 22.01 7.01 21.75 6.9C21.48 6.79 21.21 6.71 20.94 6.66C20.66 6.6 20.38 6.57 20.09 6.57L9.89 6.59Z" fill="currentColor" fillOpacity="1.000000" fillRule="nonzero"></path><path id="rect" d="M8.49 5.5L10.53 5.5L10.59 24.41L8.54 24.41L8.49 5.5Z" fill="currentColor" fillOpacity="1.000000" fillRule="evenodd"></path></g></svg> |
| | | </span> |
| | | </Tooltip> |
| | | </div> |
| | | </div>} |
| | | <div className="new-content"> |
| | | {!status ? <div className="wrap" onClick={newContent}> |
| | | <NewTalk /> |
| | | <span>开启新对话</span> |
| | | </div> : <Tooltip placement="top" title="开启新对话"> |
| | | <div className="wrap" onClick={newContent}> |
| | | <NewTalk /> |
| | | </div> |
| | | </Tooltip>} |
| | | </div> |
| | | {children} |
| | | <div className="user"> |
| | | <div className="wrap"> |
| | | <img src={uavatar} alt=""/> |
| | | <span>{fullname}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | ) |
| | | } |
| | | |
| | | const Record = ({ item, delChat, resetTitle, selectChat }) => { |
| | | const [status, setStatus] = useState(false) |
| | | const [val, setVal] = useState('') |
| | | |
| | | const reset = () => { |
| | | setStatus(true) |
| | | setVal(item.title) |
| | | } |
| | | |
| | | const chanVal = (e) => { |
| | | setVal(e.target.value) |
| | | } |
| | | |
| | | const submit = () => { |
| | | if (val && val !== item.title) { |
| | | resetTitle(item, val) |
| | | } |
| | | setStatus(false) |
| | | } |
| | | |
| | | const del = () => { |
| | | confirm({ |
| | | title: '永久删除对话', |
| | | content: '删除后,该对话将不可恢复。确认删除吗?', |
| | | okText: '删除', |
| | | cancelText: '取消', |
| | | onOk() { |
| | | delChat(item) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } |
| | | |
| | | if (status) { |
| | | return ( |
| | | <div className="item-title edit"> |
| | | <Input value={val} autoFocus onChange={chanVal} onBlur={submit} onPressEnter={submit}/> |
| | | </div> |
| | | ) |
| | | } |
| | | return ( |
| | | <div className="item-title"> |
| | | <div className="title" onClick={() => selectChat(item)}>{item.title}</div> |
| | | <Dropdown placement="bottomLeft" overlay={<div className="mk-history-dropdown-wrap"> |
| | | <Button onClick={() => reset()}><EditOutlined/> 重命名</Button> |
| | | <Button onClick={() => del(item)}><DeleteOutlined/> 删除</Button> |
| | | </div>} trigger={['click']}> |
| | | <div className="ds-icon" > |
| | | <svg fill="none" viewBox="0 0 24 24"><path fill="currentColor" fillRule="evenodd" d="M3 12a2 2 0 1 1 4 0 2 2 0 0 1-4 0m7 0a2 2 0 1 1 4 0 2 2 0 0 1-4 0m7 0a2 2 0 1 1 4 0 2 2 0 0 1-4 0" clipRule="evenodd"></path></svg> |
| | | </div> |
| | | </Dropdown> |
| | | </div> |
| | | ) |
| | | } |
| | | |
| | | const UserChat = ({ item, ...restProps }) => { |
| | | const copy = () => { |
| | | let oInput = document.createElement('input') |
| | | oInput.value = item.content |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | document.body.removeChild(oInput) |
| | | message.success('复制成功。') |
| | | } |
| | | |
| | | return ( |
| | | <div className="user-wrap" {...restProps}> |
| | | <MkCopy onClick={copy}/> |
| | | <div className="content"> |
| | | {item.content} |
| | | </div> |
| | | </div> |
| | | ) |
| | | } |
| | | |
| | | const DpChat = ({ item, ...restProps }) => { |
| | | const copy = () => { |
| | | let oInput = document.createElement('input') |
| | | oInput.value = item.oriText |
| | | document.body.appendChild(oInput) |
| | | oInput.select() |
| | | document.execCommand('Copy') |
| | | document.body.removeChild(oInput) |
| | | message.success('复制成功。') |
| | | } |
| | | |
| | | // eslint-disable-next-line |
| | | // let html = marked(item.content, { |
| | | // highlight: (code, language) => { |
| | | // // 通过时间戳生成唯一标识 |
| | | // const codeIndex = parseInt(Date.now() + "") + Math.floor(Math.random() * 10000000) |
| | | // // 格式化第一行是右侧language和 “复制” 按钮; |
| | | // let html = ` |
| | | // <div class=${styles["code-block-header"]}> |
| | | // <span>${language}</span> |
| | | // <span id='copy-btn'data-clipboard-action="copy" data-clipboard-target="#copy${codeIndex}">复制代码</span> |
| | | // </div> |
| | | // ` |
| | | |
| | | // //代码部分 |
| | | // if (code) { |
| | | // try { |
| | | // // 使用 highlight.js 对代码进行高亮显示 |
| | | // const preCode = hljs.highlightAuto(code).value; |
| | | // // 将代码包裹在 textarea 中,由于防止textarea渲染出现问题,这里将 "<" 用 "<" 代替,不影响复制功能 |
| | | // return `<pre class='${styles["hljs-customer"]} hljs'> |
| | | // <code>${preCode}</code> |
| | | // </pre> |
| | | // <textarea style="position: absolute;top: -9999px;left: -9999px;z-index: -9999;" id="copy${codeIndex}">${code.replace(/<\/textarea>/g,"</textarea>")}</textarea>`; |
| | | // } catch (error) { |
| | | |
| | | // } |
| | | // } |
| | | // } |
| | | // }) |
| | | // <SyntaxHighlighter language="javascript" style={dark}> |
| | | // {item.content} |
| | | // </SyntaxHighlighter> |
| | | |
| | | return ( |
| | | <div className="assist-wrap" {...restProps}> |
| | | <DeepSeekLogo/> |
| | | {item.type === 'deepseek-reasoner' ? <div className="top-level"> |
| | | <DeepSeekIcon /> |
| | | {item.loading ? '思考中...' : '已深度思考'} |
| | | </div> : null} |
| | | {item.loading ? <LoadingOutlined /> : null} |
| | | <div dangerouslySetInnerHTML={{ __html: item.content }}></div> |
| | | {item.oriText ? <MkCopy onClick={copy}/> : null} |
| | | </div> |
| | | ) |
| | | } |
| | | |
| | | class MkAi extends Component { |
| | | state = { |
| | | loading: true, |
| | | UserID: '', |
| | | LoginUID: '', |
| | | textInput: '', |
| | | type: 'deepseek-reasoner', // deepseek-chat deepseek-reasoner |
| | | currentChat: {id: '', list: [], title: ''}, |
| | | chats: [] |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | if (sessionStorage.getItem('UserID')) { |
| | | this.login() |
| | | } |
| | | } |
| | | |
| | | componentDidMount() { |
| | | if (!sessionStorage.getItem('UserID')) { |
| | | this.props.history.replace('/login') |
| | | return |
| | | } |
| | | |
| | | let node = document.getElementById('mk-input') |
| | | node && node.focus() |
| | | } |
| | | |
| | | login = () => { |
| | | window.GLOB.transfer = false |
| | | Api.getTouristMsg('cloud').then(res => { |
| | | if (res.status) { |
| | | this.setState({ |
| | | UserID: res.UserID, |
| | | LoginUID: res.LoginUID, |
| | | textInput: sessionStorage.getItem('deepseek_sql') || '' |
| | | }, () => { |
| | | sessionStorage.removeItem('deepseek_sql') |
| | | this.getList() |
| | | }) |
| | | } else { |
| | | sessionStorage.clear() |
| | | this.props.history.replace('/login') |
| | | window.location.reload() |
| | | } |
| | | }) |
| | | } |
| | | |
| | | getList = () => { |
| | | const { UserID, LoginUID } = this.state |
| | | |
| | | Api.genericInterface({ |
| | | func: 's_get_deepseek_list', |
| | | rduri: burl + '/webapi/dostars', |
| | | userid: UserID, |
| | | LoginUID: LoginUID, |
| | | u_id: sessionStorage.getItem('UserID') |
| | | }).then(result => { |
| | | this.setState({loading: false}) |
| | | |
| | | if (!result.status) { |
| | | notification.error({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 10 |
| | | }) |
| | | } else { |
| | | let chats = result.data || [] |
| | | let _today = moment().format('YYYY-MM-DD') |
| | | let _yestoday = moment().subtract(1, 'days').format('YYYY-MM-DD') |
| | | let _sevenday = moment().subtract(7, 'days').format('YYYY-MM-DD') |
| | | let _thirtyday = moment().subtract(30, 'days').format('YYYY-MM-DD') |
| | | let last = '' |
| | | |
| | | chats = chats.map(item => { |
| | | item.title = window.decodeURIComponent(window.atob(item.title)) |
| | | item.date = item.createdate.substr(0, 10) |
| | | |
| | | if (item.date === _today) { |
| | | item.date = '今天' |
| | | } else if (item.date === _yestoday) { |
| | | item.date = '昨天' |
| | | } else if (item.date >= _sevenday) { |
| | | item.date = '7天内' |
| | | } else if (item.date >= _thirtyday) { |
| | | item.date = '30天内' |
| | | } else { |
| | | item.date = item.date.substr(0, 4) + '年' + item.date.substr(5, 2) + '月' + item.date.substr(8, 2) + '日' |
| | | } |
| | | |
| | | if (item.date === last) { |
| | | item.date = '' |
| | | } else { |
| | | last = item.date |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | |
| | | this.setState({ |
| | | chats: chats |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | newContent = () => { |
| | | this.setState({textInput: '', currentChat: {id: '', list: [], title: ''}}) |
| | | let node = document.getElementById('mk-input') |
| | | node && node.focus() |
| | | } |
| | | |
| | | changeVal = (e) => { |
| | | this.setState({textInput: e.target.value}) |
| | | } |
| | | |
| | | selectChat = (item) => { |
| | | const { UserID, LoginUID } = this.state |
| | | |
| | | let chat = fromJS(item).toJS() |
| | | chat.list = [] |
| | | |
| | | this.setState({currentChat: chat, loading: true}) |
| | | |
| | | Api.genericInterface({ |
| | | func: 's_get_deepseek_content', |
| | | rduri: burl + '/webapi/dostars', |
| | | userid: UserID, |
| | | LoginUID: LoginUID, |
| | | ID: item.id |
| | | }).then(res => { |
| | | if (!res.status) { |
| | | notification.error({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 10 |
| | | }) |
| | | this.setState({loading: false}) |
| | | } else { |
| | | let _chat = fromJS(chat).toJS() |
| | | _chat.list = res.data || [] |
| | | _chat.list = _chat.list.map(cell => { |
| | | let role = cell.typechartwo === 'reply' ? 'assistant' : 'user' |
| | | let content = window.decodeURIComponent(window.atob(cell.content)) |
| | | let _content = content |
| | | |
| | | if (role === 'assistant') { |
| | | _content = this.getAssistVal(_content) |
| | | } |
| | | |
| | | return { |
| | | id: cell.id, |
| | | content: _content, |
| | | oriText: content, |
| | | type: cell.typecharone || '', |
| | | role |
| | | } |
| | | }) |
| | | |
| | | this.setState({currentChat: _chat, loading: false}) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | changeType = () => { |
| | | const { type } = this.state |
| | | |
| | | this.setState({type: type === 'deepseek-reasoner' ? 'deepseek-chat' : 'deepseek-reasoner'}) |
| | | } |
| | | |
| | | submit = () => { |
| | | const { textInput, currentChat, UserID, LoginUID, loading, type } = this.state |
| | | |
| | | let val = textInput.replace(/\t+|\v+/g, '').replace(/^\s+|\s+$/g, '') |
| | | |
| | | if (!val || currentChat.loading || loading) return |
| | | |
| | | let node = document.getElementById('mk-input') |
| | | node && node.blur() |
| | | |
| | | let isNew = false |
| | | let chat = fromJS(currentChat).toJS() |
| | | |
| | | if (!chat.id) { |
| | | chat.id = Utils.getuuid() |
| | | isNew = true |
| | | } |
| | | |
| | | chat.list.push({ role: 'user', content: val, id: Utils.getuuid() }) |
| | | chat.list.push({ role: 'assistant', content: '', type: type, loading: true, id: Utils.getuuid() }) |
| | | |
| | | if (!chat.title) { |
| | | chat.title = val.substr(0, 32) |
| | | } |
| | | chat.loading = true |
| | | |
| | | this.setState({textInput: '', currentChat: chat}) |
| | | |
| | | let list = [] |
| | | chat.list.forEach(item => { |
| | | if (!item.loading) { |
| | | list.push({ |
| | | role: item.role, |
| | | content: item.oriText || item.content |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | Api.directRequest({ |
| | | url: burl + '/chat/completions', |
| | | method: 'post', |
| | | headers: { 'Content-Type': 'application/json' }, |
| | | data: { |
| | | model: type, |
| | | messages: list, |
| | | stream: false |
| | | } |
| | | }).then(res => { |
| | | let _chat = fromJS(chat).toJS() |
| | | |
| | | delete _chat.loading |
| | | _chat.list.pop() |
| | | |
| | | let _val = '服务器繁忙,请稍后再试。' |
| | | let _html = _val |
| | | let tokens_count = 0 |
| | | if (res.success && res.choices && res.choices[0]) { |
| | | _val = res.choices[0].message.content |
| | | _html = this.getAssistVal(_val) |
| | | } else if (!res.success && res.rawStatusCode === 400 && res.message && /This\s*model's\s*maximum\s*context\s*length/.test(res.message)) { |
| | | _html = `当前对话已超出${type === 'deepseek-reasoner' ? '深度思考的' : ''}最大长度限制,开启一个新对话继续思考吧~` |
| | | _val = _html |
| | | } |
| | | |
| | | if (res.usage && res.usage.total_tokens) { |
| | | tokens_count = res.usage.total_tokens |
| | | } |
| | | |
| | | _chat.list = _chat.list.map(item => { |
| | | delete item.loading |
| | | delete item.step |
| | | return item |
| | | }) |
| | | |
| | | _chat.list.push({ role: 'assistant', content: _html, oriText: _val, type: type, step: true, id: Utils.getuuid() }) |
| | | |
| | | this.setState({currentChat: _chat}) |
| | | |
| | | Api.genericInterface({ |
| | | func: 's_deepseek_ai', |
| | | rduri: burl + '/webapi/dostars', |
| | | file_url: '', |
| | | userid: UserID, |
| | | LoginUID: LoginUID, |
| | | u_id: sessionStorage.getItem('UserID'), |
| | | content: window.btoa(window.encodeURIComponent(_val)), |
| | | title: window.btoa(window.encodeURIComponent(chat.title)), |
| | | data_type: 'reply', |
| | | tokens_count: tokens_count, |
| | | version: type, |
| | | ID: chat.id |
| | | }).then(r => { |
| | | if (!r.status) { |
| | | notification.error({ |
| | | top: 92, |
| | | message: r.message, |
| | | duration: 10 |
| | | }) |
| | | } else if (isNew) { |
| | | this.getList() |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | Api.genericInterface({ |
| | | func: 's_deepseek_ai', |
| | | rduri: burl + '/webapi/dostars', |
| | | file_url: '', |
| | | userid: UserID, |
| | | LoginUID: LoginUID, |
| | | u_id: sessionStorage.getItem('UserID'), |
| | | content: window.btoa(window.encodeURIComponent(val)), |
| | | title: window.btoa(window.encodeURIComponent(chat.title)), |
| | | data_type: 'request', |
| | | version: type, |
| | | tokens_count: 0, |
| | | ID: chat.id |
| | | }).then(result => { |
| | | if (!result.status) { |
| | | notification.error({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 10 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | getAssistVal = (val) => { |
| | | if (!val) return '' |
| | | |
| | | try { |
| | | // eslint-disable-next-line |
| | | val = marked ? marked.parse(val) : val |
| | | } catch(e) { |
| | | |
| | | } |
| | | |
| | | return val |
| | | } |
| | | |
| | | resetTitle = (item, val) => { |
| | | const { UserID, LoginUID } = this.state |
| | | |
| | | val = val.substr(0, 32) |
| | | |
| | | this.setState({loading: true}) |
| | | |
| | | Api.genericInterface({ |
| | | func: 's_deepseek_ai_up_title', |
| | | rduri: burl + '/webapi/dostars', |
| | | userid: UserID, |
| | | LoginUID: LoginUID, |
| | | title: window.btoa(window.encodeURIComponent(val)), |
| | | ID: item.id |
| | | }).then(result => { |
| | | this.setState({loading: false}) |
| | | if (!result.status) { |
| | | notification.error({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 10 |
| | | }) |
| | | } else { |
| | | this.getList() |
| | | } |
| | | }) |
| | | } |
| | | |
| | | delChat = (item) => { |
| | | const { UserID, LoginUID, currentChat } = this.state |
| | | |
| | | this.setState({loading: true}) |
| | | |
| | | if (currentChat.id && currentChat.id === item.id) { |
| | | this.newContent() |
| | | } |
| | | |
| | | Api.genericInterface({ |
| | | func: 's_deepseek_ai_del', |
| | | rduri: burl + '/webapi/dostars', |
| | | userid: UserID, |
| | | LoginUID: LoginUID, |
| | | ID: item.id |
| | | }).then(result => { |
| | | this.setState({loading: false}) |
| | | if (!result.status) { |
| | | notification.error({ |
| | | top: 92, |
| | | message: result.message, |
| | | duration: 10 |
| | | }) |
| | | } else { |
| | | this.getList() |
| | | } |
| | | }) |
| | | } |
| | | |
| | | render () { |
| | | const { loading, textInput, type, currentChat, chats } = this.state |
| | | |
| | | let able = textInput && !/^\s+$/.test(textInput) |
| | | let empty = !currentChat.id |
| | | |
| | | return ( |
| | | <div className="mk-deepseek-wrap"> |
| | | <div className="mk-deepseek-flex"> |
| | | <MkLeft newContent={this.newContent}> |
| | | <div className="history-wrap mk-scrollbar"> |
| | | {chats.map(item => { |
| | | return <div key={item.id} className={'item-wrap' + (currentChat.id === item.id ? ' active' : '')}> |
| | | {item.date ? <div className="item-date"> |
| | | {item.date} |
| | | </div> : null} |
| | | <Record |
| | | item={item} |
| | | delChat={this.delChat} |
| | | selectChat={this.selectChat} |
| | | resetTitle={this.resetTitle} |
| | | /> |
| | | </div> |
| | | })} |
| | | </div> |
| | | </MkLeft> |
| | | {loading ? <Spin size="large" /> : null} |
| | | <div className="mk-right"> |
| | | {!empty ? <div className="mk-faad"> |
| | | <div className="title"> |
| | | <span>{currentChat.title}</span> |
| | | </div> |
| | | </div> : null} |
| | | <div className="mk-ksje"> |
| | | {empty ? <div className="tip"> |
| | | <div className="c7e7df4d"> |
| | | <DeepSeekLogo/> |
| | | 我是 DeepSeek,很高兴见到你! |
| | | </div> |
| | | <div className="a8d0e1d3">我可以帮你写代码、读文件、写作各种创意内容,请把你的任务交给我吧~</div> |
| | | </div> : null} |
| | | {!empty ? <div className="chat-wrap"> |
| | | {currentChat.list.map(item => { |
| | | if (item.role === 'assistant') { |
| | | return <DpChat key={item.id} item={item}/> |
| | | } else { |
| | | return <UserChat key={item.id} item={item}/> |
| | | } |
| | | })} |
| | | </div> : null} |
| | | {!empty ? <div className="chat-reset"> |
| | | <div className="wrap" onClick={this.newContent}> |
| | | <NewTalk /> |
| | | <span>开启新对话</span> |
| | | </div> |
| | | </div> : null} |
| | | <div className="input-wrap"> |
| | | <div className="c9dd4ww"> |
| | | <div className="dd442025"> |
| | | <div className="fad49dec"> |
| | | <TextArea id="mk-input" value={textInput} autoSize={{minRows: 2, maxRows: 12}} placeholder="给 DeepSeek 发送消息 " onChange={this.changeVal} onPressEnter={this.submit}/> |
| | | </div> |
| | | <div className="ec4f5d61"> |
| | | {type === 'deepseek-chat' ? <Tooltip placement="left" title="调用新模型 DeekSeek-R1,解决推理问题"> |
| | | <div className="ds-button" onClick={this.changeType}> |
| | | <DeepSeekIcon/> |
| | | <span className="text">深度思考 (R1)</span> |
| | | </div> |
| | | </Tooltip> : <div className="ds-button active" onClick={this.changeType}> |
| | | <DeepSeekIcon/> |
| | | <span className="text">深度思考 (R1)</span> |
| | | </div>} |
| | | {/* <div className="ds-button"> |
| | | <span className="ds-icon"> |
| | | <svg width="20" height="20" viewBox="0 0 20 20" fill="none"><circle cx="10" cy="10" r="9" stroke="currentColor" strokeWidth="1.8"></circle><path d="M10 1c1.657 0 3 4.03 3 9s-1.343 9-3 9M10 19c-1.657 0-3-4.03-3-9s1.343-9 3-9M1 10h18" stroke="currentColor" strokeWidth="1.8"></path></svg> |
| | | </span> |
| | | <span className="text">联网搜索</span> |
| | | </div> */} |
| | | <div className="bf38813a"> |
| | | {able ? <div className="ds-icon" onClick={this.submit}> |
| | | <svg width="14" height="16" viewBox="0 0 14 16" fill="none"><path fillRule="evenodd" clipRule="evenodd" d="M7 16c-.595 0-1.077-.462-1.077-1.032V1.032C5.923.462 6.405 0 7 0s1.077.462 1.077 1.032v13.936C8.077 15.538 7.595 16 7 16z" fill="currentColor"></path><path fillRule="evenodd" clipRule="evenodd" d="M.315 7.44a1.002 1.002 0 0 1 0-1.46L6.238.302a1.11 1.11 0 0 1 1.523 0c.421.403.421 1.057 0 1.46L1.838 7.44a1.11 1.11 0 0 1-1.523 0z" fill="currentColor"></path><path fillRule="evenodd" clipRule="evenodd" d="M13.685 7.44a1.11 1.11 0 0 1-1.523 0L6.238 1.762a1.002 1.002 0 0 1 0-1.46 1.11 1.11 0 0 1 1.523 0l5.924 5.678c.42.403.42 1.056 0 1.46z" fill="currentColor"></path></svg> |
| | | </div> : |
| | | <Tooltip placement="top" title="请输入你的问题"> |
| | | <div className="ds-icon disabled"> |
| | | <svg width="14" height="16" viewBox="0 0 14 16" fill="none"><path fillRule="evenodd" clipRule="evenodd" d="M7 16c-.595 0-1.077-.462-1.077-1.032V1.032C5.923.462 6.405 0 7 0s1.077.462 1.077 1.032v13.936C8.077 15.538 7.595 16 7 16z" fill="currentColor"></path><path fillRule="evenodd" clipRule="evenodd" d="M.315 7.44a1.002 1.002 0 0 1 0-1.46L6.238.302a1.11 1.11 0 0 1 1.523 0c.421.403.421 1.057 0 1.46L1.838 7.44a1.11 1.11 0 0 1-1.523 0z" fill="currentColor"></path><path fillRule="evenodd" clipRule="evenodd" d="M13.685 7.44a1.11 1.11 0 0 1-1.523 0L6.238 1.762a1.002 1.002 0 0 1 0-1.46 1.11 1.11 0 0 1 1.523 0l5.924 5.678c.42.403.42 1.056 0 1.46z" fill="currentColor"></path></svg> |
| | | </div> |
| | | </Tooltip>} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div className={'mk-tail' + (empty ? '' : ' sticky')}>内容由 AI 生成,请仔细甄别</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | ) |
| | | } |
| | | } |
| | | |
| | | export default MkAi |
New file |
| | |
| | | .mk-deepseek-wrap { |
| | | --local-sider-width: 260px; |
| | | --ds-ease-in-out: cubic-bezier(.4,0,.2,1); |
| | | |
| | | .ant-spin { |
| | | position: fixed; |
| | | z-index: 2; |
| | | top: 30vh; |
| | | left: calc(50vw + 115px); |
| | | transition: left 0.2s; |
| | | } |
| | | .mk-left.close + .ant-spin { |
| | | left: calc(50vw + 18px); |
| | | } |
| | | .mk-deepseek-flex { |
| | | display: flex; |
| | | height: 100vh; |
| | | overflow: hidden; |
| | | .mk-left { |
| | | width: 260px; |
| | | max-width: 260px; |
| | | position: relative; |
| | | top: 0; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | z-index: 2; |
| | | transition: left 0.2s var(--ds-ease-in-out), max-width 0.2s var(--ds-ease-in-out); |
| | | flex-shrink: 0; |
| | | background-color: #f9fbff; |
| | | flex-direction: column; |
| | | flex-grow: 0; |
| | | min-width: 0; |
| | | display: flex; |
| | | |
| | | .logo { |
| | | height: 90px; |
| | | padding: 25px 10px 25px 20px; |
| | | box-sizing: border-box; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | width: 100%; |
| | | display: flex; |
| | | img { |
| | | height: 40px; |
| | | } |
| | | |
| | | .mk-anticon-close { |
| | | color: rgba(139, 139, 139, 1); |
| | | cursor: pointer; |
| | | svg { |
| | | width: 2em; |
| | | } |
| | | } |
| | | } |
| | | .new-content { |
| | | align-items: center; |
| | | margin-bottom: 34px; |
| | | display: flex; |
| | | |
| | | .wrap { |
| | | color: var(--mk-sys-color); |
| | | background-color: var(--mk-sys-color1); |
| | | cursor: pointer; |
| | | width: -moz-fit-content; |
| | | height: 44px; |
| | | border-radius: 14px; |
| | | flex-shrink: 0; |
| | | align-items: center; |
| | | width: fit-content; |
| | | margin: 0 2px 0 14px; |
| | | font-size: 16px; |
| | | font-weight: 500; |
| | | line-height: 20px; |
| | | display: flex; |
| | | overflow: hidden; |
| | | padding: 0 10px; |
| | | transition: background-color 0.2s; |
| | | |
| | | .mk-anticon-new { |
| | | margin-right: 9px; |
| | | } |
| | | } |
| | | .wrap:hover { |
| | | background-color: var(--mk-sys-color2); |
| | | } |
| | | } |
| | | .history-wrap { |
| | | flex: 1; |
| | | padding: 0 10px; |
| | | overflow-x: hidden; |
| | | overflow-y: auto; |
| | | position: relative; |
| | | |
| | | .item-wrap { |
| | | .item-date { |
| | | background-color: #f9fbff; |
| | | color: #555; |
| | | margin: 6px 0 6px -6px; |
| | | padding: 0 10px 0 16px; |
| | | font-size: 13px; |
| | | font-weight: 600; |
| | | line-height: 18px; |
| | | // position: -webkit-sticky; |
| | | // position: sticky; |
| | | // z-index: 2; |
| | | // top: 0; |
| | | } |
| | | .item-title { |
| | | height: 38px; |
| | | color: rgb(38, 38, 38); |
| | | background-color: #f9fbff; |
| | | cursor: pointer; |
| | | border-radius: 12px; |
| | | align-items: center; |
| | | padding: 0 10px; |
| | | font-size: 14px; |
| | | display: flex; |
| | | position: relative; |
| | | transition: background-color 0.2s; |
| | | |
| | | .title { |
| | | white-space: nowrap; |
| | | flex: 1; |
| | | align-items: center; |
| | | min-width: 0; |
| | | line-height: 18px; |
| | | display: flex; |
| | | overflow: hidden; |
| | | height: 100%; |
| | | } |
| | | .ds-icon { |
| | | margin-left: 5px; |
| | | padding: 5px; |
| | | width: 24px; |
| | | height: 24px; |
| | | background: rgba(255, 255, 255, 0.9); |
| | | border-radius: 8px; |
| | | opacity: 1; |
| | | transition: opacity 0.2s; |
| | | } |
| | | } |
| | | .item-title.edit { |
| | | padding: 0px; |
| | | .ant-input { |
| | | height: 100%; |
| | | border-radius: 12px; |
| | | border-color: var(--mk-sys-color); |
| | | } |
| | | } |
| | | .item-title:hover { |
| | | background-color: var(--mk-sys-color1); |
| | | } |
| | | } |
| | | .item-wrap:not(.active):not(:hover) { |
| | | .item-title { |
| | | .ds-icon { |
| | | opacity: 0; |
| | | } |
| | | } |
| | | } |
| | | .item-wrap:not(:first-child) { |
| | | .item-date { |
| | | margin-top: 24px; |
| | | } |
| | | } |
| | | .item-wrap.active { |
| | | .item-title { |
| | | background-color: var(--mk-sys-color2)!important; |
| | | } |
| | | } |
| | | } |
| | | .user { |
| | | box-sizing: border-box; |
| | | align-items: center; |
| | | padding: 10px 12px; |
| | | line-height: 20px; |
| | | display: flex; |
| | | |
| | | .wrap { |
| | | cursor: pointer; |
| | | box-sizing: border-box; |
| | | border-radius: 12px; |
| | | align-items: center; |
| | | width: 100%; |
| | | padding: 8px; |
| | | display: flex; |
| | | transition: background-color 0.2s; |
| | | |
| | | img { |
| | | width: 32px; |
| | | height: 32px; |
| | | border-radius: 50%; |
| | | } |
| | | span { |
| | | margin-left: 8px; |
| | | } |
| | | } |
| | | .wrap:hover { |
| | | background-color: var(--mk-sys-color1); |
| | | } |
| | | } |
| | | } |
| | | .mk-left.close { |
| | | max-width: 68px; |
| | | .logo-open { |
| | | flex-direction: column; |
| | | flex-grow: 0; |
| | | min-width: 0; |
| | | display: flex; |
| | | |
| | | .d-l, .d-o { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .anticon { |
| | | display: inline-block; |
| | | } |
| | | .mk-anticon-deepseek { |
| | | width: 32px; |
| | | height: 32px; |
| | | font-size: 32px; |
| | | margin-top: 30px; |
| | | cursor: pointer; |
| | | } |
| | | .mk-anticon-open { |
| | | color: rgba(139, 139, 139, 1); |
| | | cursor: pointer; |
| | | padding: 5px; |
| | | border-radius: 14px; |
| | | margin: 30px 0px; |
| | | transition: background-color 0.2s; |
| | | svg { |
| | | width: 26px; |
| | | } |
| | | } |
| | | .mk-anticon-open:hover { |
| | | background-color: var(--mk-sys-color1); |
| | | } |
| | | } |
| | | .new-content { |
| | | justify-content: center; |
| | | .wrap { |
| | | margin: 0px; |
| | | background-color: unset; |
| | | width: 36px; |
| | | height: 36px; |
| | | padding: 5px; |
| | | |
| | | .anticon { |
| | | margin-right: 0px; |
| | | } |
| | | .mk-anticon-new { |
| | | width: 26px; |
| | | color: rgba(139, 139, 139, 1); |
| | | } |
| | | } |
| | | .wrap:hover { |
| | | background-color: var(--mk-sys-color1); |
| | | } |
| | | } |
| | | .history-wrap .item-wrap { |
| | | display: none; |
| | | } |
| | | .user { |
| | | .wrap { |
| | | padding: 5px; |
| | | span { |
| | | display: none; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .mk-right { |
| | | position: relative; |
| | | flex-grow: 1; |
| | | min-width: 0; |
| | | display: flex; |
| | | flex-shrink: 0; |
| | | flex-direction: column; |
| | | overflow-y: auto; |
| | | |
| | | .mk-faad { |
| | | flex-direction: column; |
| | | flex-shrink: 0; |
| | | max-width: 100%; |
| | | display: flex; |
| | | position: sticky; |
| | | background-color: #fff; |
| | | top: 0px; |
| | | z-index: 1; |
| | | |
| | | .title { |
| | | box-sizing: border-box; |
| | | background-color: #fff; |
| | | flex-grow: 0; |
| | | flex-shrink: 0; |
| | | justify-content: center; |
| | | height: 56px; |
| | | padding-top: 10px; |
| | | display: flex; |
| | | position: relative; |
| | | z-index: 12; |
| | | margin-top: 10px; |
| | | |
| | | span { |
| | | cursor: pointer; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | color: #262626; |
| | | box-sizing: border-box; |
| | | max-width: 100%; |
| | | height: 40px; |
| | | transition: box-shadow 0.2s var(--ds-ease-in-out); |
| | | border-radius: 12px; |
| | | padding: 8px 12px; |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | line-height: 24px; |
| | | overflow: hidden; |
| | | } |
| | | } |
| | | } |
| | | .mk-ksje { |
| | | flex-grow: 1; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | |
| | | .tip { |
| | | color: #000; |
| | | font-size: 14px; |
| | | .c7e7df4d { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 14px; |
| | | margin-top: auto; |
| | | font-size: 24px; |
| | | font-weight: 500; |
| | | } |
| | | .mk-anticon-deepseek { |
| | | width: 50px; |
| | | height: 50px; |
| | | } |
| | | .a8d0e1d3 { |
| | | color: #404040; |
| | | margin: 8px 0 20px; |
| | | } |
| | | } |
| | | .chat-wrap { |
| | | flex: 1; |
| | | width: 800px; |
| | | max-width: 800px; |
| | | padding: 38px 0px 40px; |
| | | |
| | | .user-wrap { |
| | | justify-content: flex-end; |
| | | margin-bottom: 16px; |
| | | padding-bottom: 32px; |
| | | display: flex; |
| | | |
| | | .content { |
| | | font-size: 16px; |
| | | line-height: 28px; |
| | | color: #262626; |
| | | padding: 8px 20px; |
| | | box-sizing: border-box; |
| | | white-space: pre-wrap; |
| | | word-break: break-word; |
| | | background-color: #eff6ff; |
| | | border-radius: 14px; |
| | | max-width: calc(100% - 48px); |
| | | position: relative; |
| | | } |
| | | .ds-icon { |
| | | width: 30px; |
| | | height: 30px; |
| | | line-height: 32px; |
| | | margin-right: 10px; |
| | | position: relative; |
| | | top: 5px; |
| | | padding: 5px; |
| | | opacity: 0; |
| | | cursor: pointer; |
| | | transition: opacity 0.2s; |
| | | color: #909090; |
| | | } |
| | | } |
| | | .user-wrap:hover { |
| | | .ds-icon { |
| | | opacity: 1; |
| | | } |
| | | } |
| | | |
| | | .assist-wrap { |
| | | font-size: 14px; |
| | | color: rgb(64, 64, 64); |
| | | margin-bottom: 12px; |
| | | padding-left: 48px; |
| | | position: relative; |
| | | |
| | | .mk-anticon-deepseek { |
| | | width: 32px; |
| | | height: 32px; |
| | | position: absolute; |
| | | top: 0px; |
| | | left: 0px; |
| | | background-color: #fff; |
| | | border-radius: 50%; |
| | | box-shadow: 0 0 0 1px #d5e4ff; |
| | | padding: 4px; |
| | | } |
| | | |
| | | .top-level { |
| | | background: rgb(245, 245, 245); |
| | | user-select: none; |
| | | border-radius: 10px; |
| | | justify-content: center; |
| | | align-items: center; |
| | | width: fit-content; |
| | | padding: 7px 14px; |
| | | display: flex; |
| | | margin-bottom: 12px; |
| | | font-size: 12px; |
| | | line-height: 18px; |
| | | color: rgb(38, 38, 38); |
| | | |
| | | .mk-anticon-think { |
| | | width: 12px; |
| | | height: 12px; |
| | | margin-right: 6px; |
| | | } |
| | | } |
| | | .mk-anticon-copy { |
| | | width: 30px; |
| | | height: 30px; |
| | | line-height: 32px; |
| | | padding: 5px; |
| | | cursor: pointer; |
| | | border-radius: 8px; |
| | | transition: background-color 0.2s; |
| | | color: #909090; |
| | | } |
| | | .mk-anticon-copy:hover { |
| | | background-color: var(--mk-sys-color1); |
| | | } |
| | | } |
| | | } |
| | | .chat-reset { |
| | | align-items: center; |
| | | margin-bottom: 34px; |
| | | display: flex; |
| | | |
| | | .wrap { |
| | | color: var(--mk-sys-color); |
| | | background-color: var(--mk-sys-color1); |
| | | cursor: pointer; |
| | | width: -moz-fit-content; |
| | | border-radius: 12px; |
| | | align-items: center; |
| | | width: fit-content; |
| | | margin-bottom: 20px; |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | line-height: 28px; |
| | | display: flex; |
| | | overflow: hidden; |
| | | padding: 2px 14px; |
| | | gap: 10px; |
| | | transition: background-color 0.2s; |
| | | |
| | | .mk-anticon-new { |
| | | width: 18px; |
| | | height: 18px; |
| | | } |
| | | } |
| | | .wrap:hover { |
| | | background-color: var(--mk-sys-color2); |
| | | } |
| | | } |
| | | .input-wrap { |
| | | width: 802px; |
| | | position: sticky; |
| | | bottom: 30px; |
| | | z-index: 2; |
| | | border-top-left-radius: 24px; |
| | | border-top-right-radius: 24px; |
| | | background-color: #ffffff; |
| | | .c9dd4ww { |
| | | cursor: text; |
| | | box-sizing: border-box; |
| | | width: 100%; |
| | | font-size: 16px; |
| | | line-height: 28px; |
| | | transition: box-shadow 0.2s var(--ds-ease-in-out); |
| | | box-shadow: none; |
| | | background-color: #ffffff; |
| | | border-radius: 24px; |
| | | flex-direction: column; |
| | | display: flex; |
| | | position: relative; |
| | | |
| | | .dd442025 { |
| | | background-color: rgb(243, 244, 246); |
| | | box-shadow: 0px 0px 0px .5px #dce0e9; |
| | | border-radius: 24px; |
| | | z-index: 1; |
| | | flex-direction: column; |
| | | justify-content: flex-start; |
| | | align-items: flex-start; |
| | | padding: 10px; |
| | | display: flex; |
| | | overflow: hidden; |
| | | |
| | | .fad49dec { |
| | | cursor: text; |
| | | width: 100%; |
| | | .ant-input { |
| | | width: 100%; |
| | | border: none!important; |
| | | box-shadow: none!important; |
| | | outline: none!important; |
| | | background-color: transparent; |
| | | resize: none; |
| | | } |
| | | } |
| | | .ec4f5d61 { |
| | | width: calc(100% - 2px); |
| | | padding-left: 2px; |
| | | flex-wrap: wrap; |
| | | align-items: center; |
| | | margin-top: 4px; |
| | | display: flex; |
| | | |
| | | .ds-button { |
| | | border: 1px solid rgba(0, 0, 0, 0.12); |
| | | border-radius: 14px; |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 28px; |
| | | margin-right: 10px; |
| | | padding: 0 7px; |
| | | display: flex; |
| | | color: #4c4c4c; |
| | | font-size: 14px; |
| | | line-height: 25px; |
| | | background-color: #fff; |
| | | cursor: pointer; |
| | | |
| | | .ds-icon { |
| | | margin-right: 4px; |
| | | } |
| | | .text { |
| | | font-size: 12px; |
| | | } |
| | | } |
| | | .ds-button.active { |
| | | background-color: var(--mk-sys-color1); |
| | | border-color: var(--mk-sys-color3); |
| | | color: var(--mk-sys-color); |
| | | } |
| | | .ds-button:not(.active):hover { |
| | | background-color: rgba(0, 0, 0, 0.07); |
| | | } |
| | | .ds-button.active:hover { |
| | | background-color: var(--mk-sys-color2); |
| | | } |
| | | |
| | | .bf38813a { |
| | | flex: 1; |
| | | display: flex; |
| | | justify-content: right; |
| | | |
| | | .ds-icon { |
| | | white-space: nowrap; |
| | | cursor: pointer; |
| | | color: #fff; |
| | | background: var(--mk-sys-color5); |
| | | border: none; |
| | | border-radius: 16px; |
| | | min-width: 32px; |
| | | height: 32px; |
| | | align-items: center; |
| | | justify-content: center; |
| | | display: flex; |
| | | } |
| | | .ds-icon:not(.disabled):hover { |
| | | background: var(--mk-sys-color); |
| | | } |
| | | |
| | | .ds-icon.disabled { |
| | | background: var(--mk-sys-color4); |
| | | opacity: 0.9; |
| | | cursor: not-allowed; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .ds-icon { |
| | | height: 20px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .mk-tail { |
| | | text-align: center; |
| | | width: 100%; |
| | | position: absolute; |
| | | bottom: 0; |
| | | font-size: 12px; |
| | | color: rgb(163, 163, 163); |
| | | padding: 6px 0; |
| | | height: 30px; |
| | | background: #ffffff; |
| | | } |
| | | .mk-tail.sticky { |
| | | position: sticky; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .mk-anticon-deepseek { |
| | | color: #4D6BFE; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | .mk-anticon-think { |
| | | width: 20px; |
| | | height: 20px; |
| | | } |
| | | .mk-anticon-new { |
| | | width: 22px; |
| | | height: 22px; |
| | | } |
| | | } |
| | | .mk-history-dropdown-wrap { |
| | | padding: 10px; |
| | | .ant-btn { |
| | | display: block; |
| | | border: none; |
| | | box-shadow: none; |
| | | outline: none; |
| | | height: 40px; |
| | | color: rgba(0, 0, 0, 0.85); |
| | | } |
| | | .ant-btn::after { |
| | | display: none!important; |
| | | } |
| | | .ant-btn + .ant-btn { |
| | | color: #f5222d; |
| | | } |
| | | } |
| | |
| | | <TableComponent config={config} updatetable={this.updateConfig}/> |
| | | <Paragraph style={{padding: '15px 0px 0px 32px'}} copyable={{ text: MenuId }}>菜单ID:</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}} copyable={{ text: `${window.GLOB.baseurl}mob/index.html#/index/${sessionStorage.getItem('kei_no')}/${sessionStorage.getItem('typename')}/${sessionStorage.getItem('lang')}/${MenuId}/@BID@` }}>菜单链接:</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>菜单组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCss config={config} updateConfig={this.updateConfig}/> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>复制菜单下所有组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCopy /> |
| | | </> : null} |
| | | </Panel> |
| | |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updateConfig}/> |
| | | <Paragraph style={{padding: '15px 0px 0px 32px'}} copyable={{ text: MenuId }}>菜单ID:</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>菜单组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCss config={config} updateConfig={this.updateConfig}/> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>复制菜单下所有组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCopy /> |
| | | </> : null} |
| | | </Panel> |
| | |
| | | {/* 表名添加 */} |
| | | <TableComponent config={config} updatetable={this.updateConfig}/> |
| | | <Paragraph style={{padding: '15px 0px 0px 32px'}} copyable={{ text: MenuId }}>菜单ID:</Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>菜单组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <Paragraph style={{padding: '0px 0px 0px 18px'}}>复制菜单下所有组件:<CopyOutlined onClick={this.copyMenu} style={{cursor: 'pointer', color: '#1890ff'}} /></Paragraph> |
| | | <NormalCopy /> |
| | | </> : null} |
| | | </Panel> |
| | |
| | | {config ? <Dropdown placement="bottomCenter" overlay={<div className="mk-opeartion-dropdown-wrap"> |
| | | <ReplaceField config={config} updateConfig={this.resetConfig}/> |
| | | <LowerField config={config} updateConfig={this.resetConfig}/> |
| | | <Button onClick={() => window.open('#/ai')}>DeepSeek</Button> |
| | | </div>} trigger={['hover']}> |
| | | <div className="mk-button-more">更多<DownOutlined/></div> |
| | | </Dropdown> : null} |