github-actions[bot]
commited on
Commit
·
3dcf91b
1
Parent(s):
80e298a
Update from GitHub Actions
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .output/nitro.json +1 -1
- .output/public/assets/@braintree-BB7t-Iuh.js +1 -0
- .output/public/assets/@chevrotain-DFy4Htpj.js +84 -0
- .output/public/assets/@iconify-BUO7KvjM.js +12 -0
- .output/public/assets/@mermaid-js-C9iCgeAb.js +1 -0
- .output/public/assets/@traptitech-xv_Vpjqh.js +1 -0
- .output/public/assets/@vueuse-BsV7VRb2.js +3 -0
- .output/public/assets/@wdns-kgTb0OXQ.js +0 -0
- .output/public/assets/ChatInput.vue_vue_type_style_index_0_lang-CtKQjmWn.js +1 -0
- .output/public/assets/FrameContent-Bpw0Mm1e.js +1 -0
- .output/public/assets/ToolBar.vue_vue_type_style_index_0_lang-DoYvgSjk.js +1 -0
- .output/public/assets/_plugin-vue_export-helper-0drS65lc.js +0 -0
- .output/public/assets/about-Bb0zVL0B.js +1 -0
- .output/public/assets/avatar.vue_vue_type_script_setup_true_lang-CTTZTZu9.js +1 -0
- .output/public/assets/bezier-easing-BncZ6jfA.js +1 -0
- .output/public/assets/changelog-CW3gz1f_.js +1 -0
- .output/public/assets/chat-BqDYQNqZ.js +1 -0
- .output/public/assets/chevrotain-Cp5uJ8YW.js +99 -0
- .output/public/assets/chevrotain-allstar-WPou0XcH.js +1 -0
- .output/public/assets/content-ZDhKySfk.js +3 -0
- .output/public/assets/cytoscape-DQzyuV5c.js +0 -0
- .output/public/assets/cytoscape-fcose-B58q80h4.js +0 -0
- .output/public/assets/d3-CYv1AZUL.js +1 -0
- .output/public/assets/d3-array-BhN1wQGI.js +1 -0
- .output/public/assets/d3-brush-M2K_6cxE.js +1 -0
- .output/public/assets/d3-fetch-l0sNRNKZ.js +1 -0
- .output/public/assets/d3-sankey-B6tQBass.js +2 -0
- .output/public/assets/d3-scale-CdkN4P7M.js +1 -0
- .output/public/assets/d3-scale-chromatic-FDBKL9jm.js +1 -0
- .output/public/assets/d3-selection-Oxnq6l6A.js +1 -0
- .output/public/assets/d3-shape-C6CU9yox.js +21 -0
- .output/public/assets/d3-time-B1kAM736.js +1 -0
- .output/public/assets/d3-time-format-DB2uBv1t.js +1 -0
- .output/public/assets/d3-transition-0ltv4da8.js +7 -0
- .output/public/assets/d3-zoom-Dz8HuW59.js +1 -0
- .output/public/assets/dagre-d3-es-D8JeTxsO.js +11 -0
- .output/public/assets/debug-l0sNRNKZ.js +1 -0
- .output/public/assets/dompurify-z_KyBU9t.js +12 -0
- .output/public/assets/help-C3VRXhvZ.js +1 -0
- .output/public/assets/highlight.js-CmHaQWnk.js +0 -0
- .output/public/assets/index-BMpiHlJ4.js +1 -0
- .output/public/assets/index-CVP6se7q.js +1 -0
- .output/public/assets/index-D8bT04Ge.js +9 -0
- .output/public/assets/index-Dw44oD2u.js +1 -0
- .output/public/assets/index-KwP-fFKC.js +3 -0
- .output/public/assets/index-sT33uzOA.js +1 -0
- .output/public/assets/katex-Vs6-m9jZ.js +0 -0
- .output/public/assets/khroma-C2oHPU0S.js +37 -0
- .output/public/assets/langium-BVNt58jJ.js +0 -0
- .output/public/assets/lodash-es-RhymR7yg.js +9 -0
.output/nitro.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"date": "2025-03-
|
3 |
"preset": "node-server",
|
4 |
"framework": {
|
5 |
"name": "nitro",
|
|
|
1 |
{
|
2 |
+
"date": "2025-03-30T15:59:20.152Z",
|
3 |
"preset": "node-server",
|
4 |
"framework": {
|
5 |
"name": "nitro",
|
.output/public/assets/@braintree-BB7t-Iuh.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
var e,t,r={},a={};var i=function(){if(t)return r;t=1,Object.defineProperty(r,"__esModule",{value:!0}),r.sanitizeUrl=void 0;var i=(e||(e=1,Object.defineProperty(a,"__esModule",{value:!0}),a.BLANK_URL=a.relativeFirstCharacters=a.whitespaceEscapeCharsRegex=a.urlSchemeRegex=a.ctrlCharactersRegex=a.htmlCtrlEntityRegex=a.htmlEntitiesRegex=a.invalidProtocolRegex=void 0,a.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,a.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,a.htmlCtrlEntityRegex=/&(newline|tab);/gi,a.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,a.urlSchemeRegex=/^.+(:|:)/gim,a.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,a.relativeFirstCharacters=[".","/"],a.BLANK_URL="about:blank"),a);function n(e){try{return decodeURIComponent(e)}catch(t){return e}}return r.sanitizeUrl=function(e){if(!e)return i.BLANK_URL;var t,r,a=n(e.trim());do{t=(a=n(a=(r=a,r.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,(function(e,t){return String.fromCharCode(t)}))).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||a.match(i.htmlEntitiesRegex)||a.match(i.htmlCtrlEntityRegex)||a.match(i.whitespaceEscapeCharsRegex)}while(t&&t.length>0);var c=a;if(!c)return i.BLANK_URL;if(function(e){return i.relativeFirstCharacters.indexOf(e[0])>-1}(c))return c;var l=c.trimStart(),o=l.match(i.urlSchemeRegex);if(!o)return c;var s=o[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(s))return i.BLANK_URL;var h=l.replace(/\\/g,"/");if("mailto:"===s||s.includes("://"))return h;if("http:"===s||"https:"===s){if(!function(e){return URL.canParse(e)}(h))return i.BLANK_URL;var u=new URL(h);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return h},r}();export{i as d};
|
.output/public/assets/@chevrotain-DFy4Htpj.js
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import{a as t,p as e,f as i,m as s,i as r,b as a,s as n,c,e as o}from"./lodash-es-RhymR7yg.js";function h(t){return t.charCodeAt(0)}function u(t,e){Array.isArray(t)?t.forEach((function(t){e.push(t)})):e.push(t)}function p(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e],t[e]=!0}function d(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function l(t){return"Character"===t.type}const f=[];for(let Z=h("0");Z<=h("9");Z++)f.push(Z);const v=[h("_")].concat(f);for(let Z=h("a");Z<=h("z");Z++)v.push(Z);for(let Z=h("A");Z<=h("Z");Z++)v.push(Z);const m=[h(" "),h("\f"),h("\n"),h("\r"),h("\t"),h("\v"),h("\t"),h(" "),h(" "),h(" "),h(" "),h(" "),h(" "),h(" "),h(" "),h(" "),h(" "),h(" "),h(" "),h(" "),h("\u2028"),h("\u2029"),h(" "),h(" "),h(" "),h("\ufeff")],C=/[0-9a-fA-F]/,x=/[0-9]/,g=/[1-9]/;class A{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");const e=this.disjunction();this.consumeChar("/");const i={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":p(i,"global");break;case"i":p(i,"ignoreCase");break;case"m":p(i,"multiLine");break;case"u":p(i,"unicode");break;case"y":p(i,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:i,value:e,loc:this.loc(0)}}disjunction(){const t=[],e=this.idx;for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){const t=[],e=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};
|
2 |
+
// '\b' or '\B'
|
3 |
+
case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");
|
4 |
+
// '(?=' or '(?!'
|
5 |
+
case"(":let e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead"}d(e);const i=this.disjunction();return this.consumeChar(")"),{type:e,value:i,loc:this.loc(t)}}return function(){throw Error("Internal Error - Should never get here!")}()}quantifier(t=!1){let e;const i=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:i,atMost:i};break;case",":let t;this.isDigit()?(t=this.integerIncludingZero(),e={atLeast:i,atMost:t}):e={atLeast:i,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;d(e)}if(!0!==t||void 0!==e)return d(e)?("?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(i),e):void 0}atom(){let t;const e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}if(void 0===t&&this.isPatternCharacter()&&(t=this.patternCharacter()),d(t))return t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[h("\n"),h("\r"),h("\u2028"),h("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,e=!1;switch(this.popChar()){case"d":t=f;break;case"D":t=f,e=!0;break;case"s":t=m;break;case"S":t=m,e=!0;break;case"w":t=v;break;case"W":t=v,e=!0}if(d(t))return{type:"Set",value:t,complement:e}}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=h("\f");break;case"n":t=h("\n");break;case"r":t=h("\r");break;case"t":t=h("\t");break;case"v":t=h("\v")}if(d(t))return{type:"Character",value:t}}controlLetterEscapeAtom(){this.consumeChar("c");const t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:h("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:h(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){
|
6 |
+
// istanbul ignore next
|
7 |
+
case"\n":
|
8 |
+
// istanbul ignore next
|
9 |
+
case"\r":
|
10 |
+
// istanbul ignore next
|
11 |
+
case"\u2028":
|
12 |
+
// istanbul ignore next
|
13 |
+
case"\u2029":
|
14 |
+
// istanbul ignore next
|
15 |
+
case"\\":
|
16 |
+
// istanbul ignore next
|
17 |
+
case"]":throw Error("TBD");default:return{type:"Character",value:h(this.popChar())}}}characterClass(){const t=[];let e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){const e=this.classAtom();if(e.type,l(e)&&this.isRangeDash()){this.consumeChar("-");const i=this.classAtom();if(i.type,l(i)){if(i.value<e.value)throw Error("Range out of order in character class");t.push({from:e.value,to:i.value})}else u(e.value,t),t.push(h("-")),u(i.value,t)}else u(e.value,t)}return this.consumeChar("]"),{type:"Set",complement:e,value:t}}classAtom(){switch(this.peekChar()){
|
18 |
+
// istanbul ignore next
|
19 |
+
case"]":
|
20 |
+
// istanbul ignore next
|
21 |
+
case"\n":
|
22 |
+
// istanbul ignore next
|
23 |
+
case"\r":
|
24 |
+
// istanbul ignore next
|
25 |
+
case"\u2028":
|
26 |
+
// istanbul ignore next
|
27 |
+
case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){
|
28 |
+
// Matches a backspace.
|
29 |
+
// (Not to be confused with \b word boundary outside characterClass)
|
30 |
+
case"b":return this.consumeChar("b"),{type:"Character",value:h("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let t=!0;if(this.consumeChar("("),"?"===this.peekChar(0))this.consumeChar("?"),this.consumeChar(":"),t=!1;else this.groupIdx++;const e=this.disjunction();this.consumeChar(")");const i={type:"Group",capturing:t,value:e};return t&&(i.idx=this.groupIdx),i}positiveInteger(){let t=this.popChar();if(!1===g.test(t))throw Error("Expecting a positive integer");for(;x.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}integerIncludingZero(){let t=this.popChar();if(!1===x.test(t))throw Error("Expecting an integer");for(;x.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}patternCharacter(){const t=this.popChar();switch(t){
|
31 |
+
// istanbul ignore next
|
32 |
+
case"\n":
|
33 |
+
// istanbul ignore next
|
34 |
+
case"\r":
|
35 |
+
// istanbul ignore next
|
36 |
+
case"\u2028":
|
37 |
+
// istanbul ignore next
|
38 |
+
case"\u2029":
|
39 |
+
// istanbul ignore next
|
40 |
+
case"^":
|
41 |
+
// istanbul ignore next
|
42 |
+
case"$":
|
43 |
+
// istanbul ignore next
|
44 |
+
case"\\":
|
45 |
+
// istanbul ignore next
|
46 |
+
case".":
|
47 |
+
// istanbul ignore next
|
48 |
+
case"*":
|
49 |
+
// istanbul ignore next
|
50 |
+
case"+":
|
51 |
+
// istanbul ignore next
|
52 |
+
case"?":
|
53 |
+
// istanbul ignore next
|
54 |
+
case"(":
|
55 |
+
// istanbul ignore next
|
56 |
+
case")":
|
57 |
+
// istanbul ignore next
|
58 |
+
case"[":
|
59 |
+
// istanbul ignore next
|
60 |
+
case"|":throw Error("TBD");default:return{type:"Character",value:h(t)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return x.test(this.peekChar(0))}isClassAtom(t=0){switch(this.peekChar(t)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":
|
61 |
+
// atomEscape
|
62 |
+
case"[":
|
63 |
+
// characterClass
|
64 |
+
// TODO: isAtom must be called before isAssertion - disambiguate
|
65 |
+
case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;
|
66 |
+
// '\b' or '\B'
|
67 |
+
case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}
|
68 |
+
// '(?=' or '(?!'
|
69 |
+
case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}}isQuantifier(){const t=this.saveState();try{return void 0!==this.quantifier(!0)}catch(e){return!1}finally{this.restoreState(t)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(t){let e="";for(let i=0;i<t;i++){const t=this.popChar();if(!1===C.test(t))throw Error("Expecting a HexDecimal digits");e+=t}return{type:"Character",value:parseInt(e,16)}}peekChar(t=0){return this.input[this.idx+t]}popChar(){const t=this.peekChar(0);return this.consumeChar(void 0),t}consumeChar(t){if(void 0!==t&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}class y{visitChildren(t){for(const e in t){const i=t[e];t.hasOwnProperty(e)&&(void 0!==i.type?this.visit(i):Array.isArray(i)&&i.forEach((t=>{this.visit(t)}),this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}
|
70 |
+
// Assertion
|
71 |
+
visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}
|
72 |
+
// atoms
|
73 |
+
visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}function k(t){console&&console.error}function E(t){console&&console.warn}function b(t){const e=(new Date).getTime(),i=t();return{time:(new Date).getTime()-e,value:i}}function w(t){function e(){}e.prototype=t;const i=new e;function s(){return typeof i.bar}return s(),s(),t}function S(t){return r((e=t).LABEL)&&""!==e.LABEL?t.LABEL:t.name;var e}class T{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),i(this.definition,(e=>{e.accept(t)}))}}class R extends T{constructor(i){super([]),this.idx=1,t(this,e(i,(t=>void 0!==t)))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}}class L extends T{constructor(i){super(i.definition),this.orgText="",t(this,e(i,(t=>void 0!==t)))}}class B extends T{constructor(i){super(i.definition),this.ignoreAmbiguities=!1,t(this,e(i,(t=>void 0!==t)))}}class I extends T{constructor(i){super(i.definition),this.idx=1,t(this,e(i,(t=>void 0!==t)))}}class N extends T{constructor(i){super(i.definition),this.idx=1,t(this,e(i,(t=>void 0!==t)))}}class D extends T{constructor(i){super(i.definition),this.idx=1,t(this,e(i,(t=>void 0!==t)))}}class P extends T{constructor(i){super(i.definition),this.idx=1,t(this,e(i,(t=>void 0!==t)))}}class W extends T{constructor(i){super(i.definition),this.idx=1,t(this,e(i,(t=>void 0!==t)))}}class M extends T{get definition(){return this._definition}set definition(t){this._definition=t}constructor(i){super(i.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,t(this,e(i,(t=>void 0!==t)))}}class _{constructor(i){this.idx=1,t(this,e(i,(t=>void 0!==t)))}accept(t){t.visit(this)}}function O(t){return s(t,j)}function j(t){function e(t){return s(t,j)}if(t instanceof R){const e={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return r(t.label)&&(e.label=t.label),e}if(t instanceof B)return{type:"Alternative",definition:e(t.definition)};if(t instanceof I)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof N)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof D)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:j(new _({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof W)return{type:"RepetitionWithSeparator",idx:t.idx,separator:j(new _({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof P)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof M)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof _){const e={type:"Terminal",name:t.terminalType.name,label:S(t.terminalType),idx:t.idx};r(t.label)&&(e.terminalLabel=t.label);const i=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(e.pattern=a(i)?i.source:i),e}if(t instanceof L)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}class q{visit(t){const e=t;switch(e.constructor){case R:return this.visitNonTerminal(e);case B:return this.visitAlternative(e);case I:return this.visitOption(e);case N:return this.visitRepetitionMandatory(e);case D:return this.visitRepetitionMandatoryWithSeparator(e);case W:return this.visitRepetitionWithSeparator(e);case P:return this.visitRepetition(e);case M:return this.visitAlternation(e);case _:return this.visitTerminal(e);case L:return this.visitRule(e);
|
74 |
+
/* c8 ignore next 2 */default:throw Error("non exhaustive match")}}
|
75 |
+
/* c8 ignore next */visitNonTerminal(t){}
|
76 |
+
/* c8 ignore next */visitAlternative(t){}
|
77 |
+
/* c8 ignore next */visitOption(t){}
|
78 |
+
/* c8 ignore next */visitRepetition(t){}
|
79 |
+
/* c8 ignore next */visitRepetitionMandatory(t){}
|
80 |
+
/* c8 ignore next 3 */visitRepetitionMandatoryWithSeparator(t){}
|
81 |
+
/* c8 ignore next */visitRepetitionWithSeparator(t){}
|
82 |
+
/* c8 ignore next */visitAlternation(t){}
|
83 |
+
/* c8 ignore next */visitTerminal(t){}
|
84 |
+
/* c8 ignore next */visitRule(t){}}function G(t){return t instanceof B||t instanceof I||t instanceof P||t instanceof N||t instanceof D||t instanceof W||t instanceof _||t instanceof L}function U(t,e=[]){return!!(t instanceof I||t instanceof P||t instanceof W)||(t instanceof M?n(t.definition,(t=>U(t,e))):!(t instanceof R&&c(e,t))&&(t instanceof T&&(t instanceof R&&e.push(t),o(t.definition,(t=>U(t,e))))))}function F(t){return t instanceof M}function Q(t){if(t instanceof R)return"SUBRULE";if(t instanceof I)return"OPTION";if(t instanceof M)return"OR";if(t instanceof N)return"AT_LEAST_ONE";if(t instanceof D)return"AT_LEAST_ONE_SEP";if(t instanceof W)return"MANY_SEP";if(t instanceof P)return"MANY";if(t instanceof _)return"CONSUME";throw Error("non exhaustive match")}export{B as A,y as B,q as G,R as N,I as O,E as P,N as R,_ as T,D as a,W as b,P as c,M as d,F as e,U as f,A as g,k as h,G as i,w as j,L as k,Q as l,O as s,b as t};
|
.output/public/assets/@iconify-BUO7KvjM.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const t=Object.freeze({left:0,top:0,width:16,height:16}),e=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),n=Object.freeze({...t,...e}),i=Object.freeze({...n,body:"",hidden:!1}),o=Object.freeze({width:null,height:null}),r=Object.freeze({
|
2 |
+
// Dimensions
|
3 |
+
...o,
|
4 |
+
// Transformations
|
5 |
+
...e}),l=(t,e,n,i="")=>{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),e=o.pop(),n={
|
6 |
+
// Allow provider without '@': "provider:prefix:name"
|
7 |
+
provider:o.length>0?o[0]:i,prefix:e,name:t};return s(n)?n:null}const r=o[0],l=r.split("-");if(l.length>1){const t={provider:i,prefix:l.shift(),name:l.join("-")};return s(t)?t:null}if(n&&""===i){const t={provider:i,prefix:"",name:r};return s(t,n)?t:null}return null},s=(t,e)=>!!t&&!(// Check prefix: cannot be empty, unless allowSimpleName is enabled
|
8 |
+
// Check name: cannot be empty
|
9 |
+
!(e&&""===t.prefix||t.prefix)||!t.name);function c(t,n){const o=function(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(n.rotate=i),n}(t,n);for(const r in i)r in e?r in t&&!(r in o)&&(o[r]=e[r]):r in n?o[r]=n[r]:r in t&&(o[r]=t[r]);return o}function f(t,e,n){const i=t.icons,o=t.aliases||Object.create(null);let r={};function l(t){r=c(i[t]||o[t],r)}return l(e),n.forEach(l),c(t,r)}function h(t,e){if(t.icons[e])return f(t,e,[]);const n=function(t,e){const n=t.icons,i=t.aliases||Object.create(null),o=Object.create(null);return(e||Object.keys(n).concat(Object.keys(i))).forEach((function t(e){if(n[e])return o[e]=[];if(!(e in o)){o[e]=null;const n=i[e]&&i[e].parent,r=n&&t(n);r&&(o[e]=[n].concat(r))}return o[e]})),o}(t,[e])[e];return n?f(t,e,n):null}const u=/(-?[0-9.]*[0-9]+[0-9.]*)/g,a=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function p(t,e,n){if(1===e)return t;if(n=n||100,"number"==typeof t)return Math.ceil(t*e*n)/n;if("string"!=typeof t)return t;const i=t.split(u);if(null===i||!i.length)return t;const o=[];let r=i.shift(),l=a.test(r);for(;;){if(l){const t=parseFloat(r);isNaN(t)?o.push(r):o.push(Math.ceil(t*e*n)/n)}else o.push(r);if(r=i.shift(),void 0===r)return o.join("");l=!l}}function g(t,e){const i={...n,...t},o={...r,...e},l={left:i.left,top:i.top,width:i.width,height:i.height};let s=i.body;[i,o].forEach((t=>{const e=[],n=t.hFlip,i=t.vFlip;let o,r=t.rotate;switch(n?i?r+=2:(e.push("translate("+(l.width+l.left).toString()+" "+(0-l.top).toString()+")"),e.push("scale(-1 1)"),l.top=l.left=0):i&&(e.push("translate("+(0-l.left).toString()+" "+(l.height+l.top).toString()+")"),e.push("scale(1 -1)"),l.top=l.left=0),r<0&&(r-=4*Math.floor(r/4)),r%=4,r){case 1:o=l.height/2+l.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(l.width/2+l.left).toString()+" "+(l.height/2+l.top).toString()+")");break;case 3:o=l.width/2+l.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}r%2==1&&(l.left!==l.top&&(o=l.left,l.left=l.top,l.top=o),l.width!==l.height&&(o=l.width,l.width=l.height,l.height=o)),e.length&&(s=function(t,e,n){const i=function(t,e="defs"){let n="";const i=t.indexOf("<"+e);for(;i>=0;){const o=t.indexOf(">",i),r=t.indexOf("</"+e);if(-1===o||-1===r)break;const l=t.indexOf(">",r);if(-1===l)break;n+=t.slice(o+1,r).trim(),t=t.slice(0,i).trim()+t.slice(l+1)}return{defs:n,content:t}}(t);return o=i.defs,r=e+i.content+n,o?"<defs>"+o+"</defs>"+r:r;var o,r}(s,'<g transform="'+e.join(" ")+'">',"</g>"))}));const c=o.width,f=o.height,h=l.width,u=l.height;let a,g;null===c?(g=null===f?"1em":"auto"===f?u:f,a=p(g,h/u)):(a="auto"===c?h:c,g=null===f?p(a,u/h):"auto"===f?u:f);const d={},w=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(d[t]=e.toString())};w("width",a),w("height",g);const x=[l.left,l.top,h,u];return d.viewBox=x.join(" "),{attributes:d,viewBox:x,body:s}}const d=/\sid="(\S+)"/g,w="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let x=0;function b(t,e=w){const n=[];let i;for(;i=d.exec(t);)n.push(i[1]);if(!n.length)return t;const o="suffix"+(16777216*Math.random()|Date.now()).toString(16);return n.forEach((n=>{const i="function"==typeof e?e(n):e+(x++).toString(),r=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(
|
10 |
+
// Allowed characters before id: [#;"]
|
11 |
+
// Allowed characters after id: [)"], .[a-z]
|
12 |
+
new RegExp('([#;"])('+r+')([")]|\\.[a-z])',"g"),"$1"+i+o+"$3")})),t=t.replace(new RegExp(o,"g"),"")}function O(t,e){let n=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)n+=" "+i+'="'+e[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}export{O as a,h as g,g as i,b as r,l as s};
|
.output/public/assets/@mermaid-js-C9iCgeAb.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
var e,r,t,a,n,l,s,i,u,p,m,y,o;import{A as d,D as f,a as $,l as c,E as g,i as T,c as R,b as C}from"./langium-BVNt58jJ.js";const v={},h=function(e,r,t){let a=Promise.resolve();if(r&&r.length>0){const e=document.getElementsByTagName("link"),n=document.querySelector("meta[property=csp-nonce]"),l=(null==n?void 0:n.nonce)||(null==n?void 0:n.getAttribute("nonce"));a=Promise.allSettled(r.map((r=>{if(r=function(e,r){return new URL(e,r).href}(r,t),r in v)return;v[r]=!0;const a=r.endsWith(".css"),n=a?'[rel="stylesheet"]':"";if(!!t)for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.href===r&&(!a||"stylesheet"===n.rel))return}else if(document.querySelector(`link[href="${r}"]${n}`))return;const s=document.createElement("link");return s.rel=a?"stylesheet":"modulepreload",a||(s.as="script"),s.crossOrigin="",s.href=r,l&&s.setAttribute("nonce",l),document.head.appendChild(s),a?new Promise(((e,t)=>{s.addEventListener("load",e),s.addEventListener("error",(()=>t(new Error(`Unable to preload CSS for ${r}`))))})):void 0})))}function n(e){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=e,window.dispatchEvent(r),!r.defaultPrevented)throw e}return a.then((r=>{for(const e of r||[])"rejected"===e.status&&n(e.reason);return e().catch(n)}))};var A=Object.defineProperty,k=(e,r)=>A(e,"name",{value:r,configurable:!0}),w="Statement",x="Architecture";k((function(e){return te.isInstance(e,x)}),"isArchitecture");var G="Axis",E="Branch";k((function(e){return te.isInstance(e,E)}),"isBranch");var I="Checkout",S="CherryPicking",P="Commit";k((function(e){return te.isInstance(e,P)}),"isCommit");var _="Common";k((function(e){return te.isInstance(e,_)}),"isCommon");var b="Curve",L="Edge",K="Entry",D="GitGraph";k((function(e){return te.isInstance(e,D)}),"isGitGraph");var O="Group",H="Info";k((function(e){return te.isInstance(e,H)}),"isInfo");var M="Junction",N="Merge";k((function(e){return te.isInstance(e,N)}),"isMerge");var V="Option",B="Packet";k((function(e){return te.isInstance(e,B)}),"isPacket");var W="PacketBlock";k((function(e){return te.isInstance(e,W)}),"isPacketBlock");var j="Pie";k((function(e){return te.isInstance(e,j)}),"isPie");var U="PieSection";k((function(e){return te.isInstance(e,U)}),"isPieSection");var F,Y,q,z,J,X,Z="Radar",Q="Service",ee="Direction",re=(k(e=class extends d{getAllTypes(){return[x,G,E,I,S,P,_,b,ee,L,K,D,O,H,M,N,V,B,W,j,U,Z,Q,w]}computeIsSubtype(e,r){switch(e){case E:case I:case S:case P:case N:return this.isSubtype(w,r);case ee:return this.isSubtype(D,r);default:return!1}}getReferenceType(e){const r=`${e.container.$type}:${e.property}`;if("Entry:axis"===r)return G;throw new Error(`${r} is not a valid reference id.`)}getTypeMetaData(e){switch(e){case x:return{name:x,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case G:return{name:G,properties:[{name:"label"},{name:"name"}]};case E:return{name:E,properties:[{name:"name"},{name:"order"}]};case I:return{name:I,properties:[{name:"branch"}]};case S:return{name:S,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case P:return{name:P,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case _:return{name:_,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case b:return{name:b,properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case L:return{name:L,properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case K:return{name:K,properties:[{name:"axis"},{name:"value"}]};case D:return{name:D,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case O:return{name:O,properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case H:return{name:H,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case M:return{name:M,properties:[{name:"id"},{name:"in"}]};case N:return{name:N,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case V:return{name:V,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case B:return{name:B,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case W:return{name:W,properties:[{name:"end"},{name:"label"},{name:"start"}]};case j:return{name:j,properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case U:return{name:U,properties:[{name:"label"},{name:"value"}]};case Z:return{name:Z,properties:[{name:"accDescr"},{name:"accTitle"},{name:"axes",defaultValue:[]},{name:"curves",defaultValue:[]},{name:"options",defaultValue:[]},{name:"title"}]};case Q:return{name:Q,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case ee:return{name:ee,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:e,properties:[]}}}},"MermaidAstReflection"),e),te=new re,ae=k((()=>F??(F=c('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"InfoGrammar"),ne=k((()=>Y??(Y=c('{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PacketGrammar"),le=k((()=>q??(q=c('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PieGrammar"),se=k((()=>z??(z=c('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"ArchitectureGrammar"),ie=k((()=>J??(J=c('{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}'))),"GitGraphGrammar"),ue=k((()=>X??(X=c('{"$type":"Grammar","isDeclared":true,"name":"Radar","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@12"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@12"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9\\\\-_]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}'))),"RadarGrammar"),pe={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},me={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ye={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},oe={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},de={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},fe={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},$e={AstReflection:k((()=>new re),"AstReflection")},ce={Grammar:k((()=>ae()),"Grammar"),LanguageMetaData:k((()=>pe),"LanguageMetaData"),parser:{}},ge={Grammar:k((()=>ne()),"Grammar"),LanguageMetaData:k((()=>me),"LanguageMetaData"),parser:{}},Te={Grammar:k((()=>le()),"Grammar"),LanguageMetaData:k((()=>ye),"LanguageMetaData"),parser:{}},Re={Grammar:k((()=>se()),"Grammar"),LanguageMetaData:k((()=>oe),"LanguageMetaData"),parser:{}},Ce={Grammar:k((()=>ie()),"Grammar"),LanguageMetaData:k((()=>de),"LanguageMetaData"),parser:{}},ve={Grammar:k((()=>ue()),"Grammar"),LanguageMetaData:k((()=>fe),"LanguageMetaData"),parser:{}},he={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},Ae=(k(r=class extends f{runConverter(e,r,t){let a=this.runCommonConverter(e,r,t);return void 0===a&&(a=this.runCustomConverter(e,r,t)),void 0===a?super.runConverter(e,r,t):a}runCommonConverter(e,r,t){const a=he[e.name];if(void 0===a)return;const n=a.exec(r);return null!==n?void 0!==n[1]?n[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==n[2]?n[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},"AbstractMermaidValueConverter"),r),ke=(k(t=class extends Ae{runCustomConverter(e,r,t){}},"CommonValueConverter"),t),we=(k(a=class extends ${constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,r,t){const a=super.buildKeywordTokens(e,r,t);return a.forEach((e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))})),a}},"AbstractMermaidTokenBuilder"),a);k(class extends we{},"CommonTokenBuilder");var xe=(k(n=class extends we{constructor(){super(["gitGraph"])}},"GitGraphTokenBuilder"),n),Ge={parser:{TokenBuilder:k((()=>new xe),"TokenBuilder"),ValueConverter:k((()=>new ke),"ValueConverter")}};function Ee(e=g){const r=T(R(e),$e),t=T(C({shared:r}),Ce,Ge);return r.ServiceRegistry.register(t),{shared:r,GitGraph:t}}k(Ee,"createGitGraphServices");var Ie=(k(l=class extends we{constructor(){super(["info","showInfo"])}},"InfoTokenBuilder"),l),Se={parser:{TokenBuilder:k((()=>new Ie),"TokenBuilder"),ValueConverter:k((()=>new ke),"ValueConverter")}};function Pe(e=g){const r=T(R(e),$e),t=T(C({shared:r}),ce,Se);return r.ServiceRegistry.register(t),{shared:r,Info:t}}k(Pe,"createInfoServices");var _e=(k(s=class extends we{constructor(){super(["packet-beta"])}},"PacketTokenBuilder"),s),be={parser:{TokenBuilder:k((()=>new _e),"TokenBuilder"),ValueConverter:k((()=>new ke),"ValueConverter")}};function Le(e=g){const r=T(R(e),$e),t=T(C({shared:r}),ge,be);return r.ServiceRegistry.register(t),{shared:r,Packet:t}}k(Le,"createPacketServices");var Ke=(k(i=class extends we{constructor(){super(["pie","showData"])}},"PieTokenBuilder"),i),De=(k(u=class extends Ae{runCustomConverter(e,r,t){if("PIE_SECTION_LABEL"===e.name)return r.replace(/"/g,"").trim()}},"PieValueConverter"),u),Oe={parser:{TokenBuilder:k((()=>new Ke),"TokenBuilder"),ValueConverter:k((()=>new De),"ValueConverter")}};function He(e=g){const r=T(R(e),$e),t=T(C({shared:r}),Te,Oe);return r.ServiceRegistry.register(t),{shared:r,Pie:t}}k(He,"createPieServices");var Me=(k(p=class extends we{constructor(){super(["architecture"])}},"ArchitectureTokenBuilder"),p),Ne=(k(m=class extends Ae{runCustomConverter(e,r,t){return"ARCH_ICON"===e.name?r.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===e.name?r.replace(/["()]/g,""):"ARCH_TITLE"===e.name?r.replace(/[[\]]/g,"").trim():void 0}},"ArchitectureValueConverter"),m),Ve={parser:{TokenBuilder:k((()=>new Me),"TokenBuilder"),ValueConverter:k((()=>new Ne),"ValueConverter")}};function Be(e=g){const r=T(R(e),$e),t=T(C({shared:r}),Re,Ve);return r.ServiceRegistry.register(t),{shared:r,Architecture:t}}k(Be,"createArchitectureServices");var We=(k(y=class extends we{constructor(){super(["radar-beta"])}},"RadarTokenBuilder"),y),je={parser:{TokenBuilder:k((()=>new We),"TokenBuilder"),ValueConverter:k((()=>new ke),"ValueConverter")}};function Ue(e=g){const r=T(R(e),$e),t=T(C({shared:r}),ve,je);return r.ServiceRegistry.register(t),{shared:r,Radar:t}}k(Ue,"createRadarServices");var Fe={},Ye={info:k((async()=>{const{createInfoServices:e}=await h((async()=>{const{createInfoServices:e}=await Promise.resolve().then((()=>Je));return{createInfoServices:e}}),void 0,import.meta.url),r=e().Info.parser.LangiumParser;Fe.info=r}),"info"),packet:k((async()=>{const{createPacketServices:e}=await h((async()=>{const{createPacketServices:e}=await Promise.resolve().then((()=>Xe));return{createPacketServices:e}}),void 0,import.meta.url),r=e().Packet.parser.LangiumParser;Fe.packet=r}),"packet"),pie:k((async()=>{const{createPieServices:e}=await h((async()=>{const{createPieServices:e}=await Promise.resolve().then((()=>Ze));return{createPieServices:e}}),void 0,import.meta.url),r=e().Pie.parser.LangiumParser;Fe.pie=r}),"pie"),architecture:k((async()=>{const{createArchitectureServices:e}=await h((async()=>{const{createArchitectureServices:e}=await Promise.resolve().then((()=>Qe));return{createArchitectureServices:e}}),void 0,import.meta.url),r=e().Architecture.parser.LangiumParser;Fe.architecture=r}),"architecture"),gitGraph:k((async()=>{const{createGitGraphServices:e}=await h((async()=>{const{createGitGraphServices:e}=await Promise.resolve().then((()=>er));return{createGitGraphServices:e}}),void 0,import.meta.url),r=e().GitGraph.parser.LangiumParser;Fe.gitGraph=r}),"gitGraph"),radar:k((async()=>{const{createRadarServices:e}=await h((async()=>{const{createRadarServices:e}=await Promise.resolve().then((()=>rr));return{createRadarServices:e}}),void 0,import.meta.url),r=e().Radar.parser.LangiumParser;Fe.radar=r}),"radar")};async function qe(e,r){const t=Ye[e];if(!t)throw new Error(`Unknown diagram type: ${e}`);Fe[e]||await t();const a=Fe[e].parse(r);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new ze(a);return a.value}k(qe,"parse");var ze=(k(o=class extends Error{constructor(e){super(`Parsing failed: ${e.lexerErrors.map((e=>e.message)).join("\n")} ${e.parserErrors.map((e=>e.message)).join("\n")}`),this.result=e}},"MermaidParseError"),o);const Je=Object.defineProperty({__proto__:null,InfoModule:Se,createInfoServices:Pe},Symbol.toStringTag,{value:"Module"}),Xe=Object.defineProperty({__proto__:null,PacketModule:be,createPacketServices:Le},Symbol.toStringTag,{value:"Module"}),Ze=Object.defineProperty({__proto__:null,PieModule:Oe,createPieServices:He},Symbol.toStringTag,{value:"Module"}),Qe=Object.defineProperty({__proto__:null,ArchitectureModule:Ve,createArchitectureServices:Be},Symbol.toStringTag,{value:"Module"}),er=Object.defineProperty({__proto__:null,GitGraphModule:Ge,createGitGraphServices:Ee},Symbol.toStringTag,{value:"Module"}),rr=Object.defineProperty({__proto__:null,RadarModule:je,createRadarServices:Ue},Symbol.toStringTag,{value:"Module"});export{h as _,qe as p};
|
.output/public/assets/@traptitech-xv_Vpjqh.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{g as r}from"./@babel-ynFNPEB3.js";import{r as e}from"./katex-Vs6-m9jZ.js";var t,n;const c=r(function(){if(n)return t;n=1;var r=e();function c(r,e){var t,n,c=r.posMax,s=!0,a=!0;return t=e>0?r.src.charCodeAt(e-1):-1,n=e+1<=c?r.src.charCodeAt(e+1):-1,(32===t||9===t||n>=48&&n<=57)&&(a=!1),32!==n&&9!==n||(s=!1),{can_open:s,can_close:a}}function s(r,e){var t,n,s,a;if("$"!==r.src[r.pos])return!1;if(!c(r,r.pos).can_open)return e||(r.pending+="$"),r.pos+=1,!0;for(n=t=r.pos+1;-1!==(n=r.src.indexOf("$",n));){for(a=n-1;"\\"===r.src[a];)a-=1;if((n-a)%2==1)break;n+=1}return-1===n?(e||(r.pending+="$"),r.pos=t,!0):n-t==0?(e||(r.pending+="$$"),r.pos=t+1,!0):c(r,n).can_close?(e||((s=r.push("math_inline","math",0)).markup="$",s.content=r.src.slice(t,n)),r.pos=n+1,!0):(e||(r.pending+="$"),r.pos=t,!0)}function a(r,e,t,n){var c,s,a,o,i,l=!1,p=r.bMarks[e]+r.tShift[e],u=r.eMarks[e];if(p+2>u)return!1;if("$$"!==r.src.slice(p,p+2))return!1;if(p+=2,c=r.src.slice(p,u),n)return!0;for("$$"===c.trim().slice(-2)&&(c=c.trim().slice(0,-2),l=!0),a=e;!l&&!(++a>=t)&&!((p=r.bMarks[a]+r.tShift[a])<(u=r.eMarks[a])&&r.tShift[a]<r.blkIndent);)"$$"===r.src.slice(p,u).trim().slice(-2)&&(o=r.src.slice(0,u).lastIndexOf("$$"),s=r.src.slice(p,o),l=!0);return r.line=a+1,(i=r.push("math_block","math",0)).block=!0,i.content=(c&&c.trim()?c+"\n":"")+r.getLines(e+1,a,r.tShift[e],!0)+(s&&s.trim()?s:""),i.map=[e,r.line],i.markup="$$",!0}function o(r){return r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}return t=function(e,t){(t=t||{}).katex&&(r=t.katex),t.blockClass||(t.blockClass="");e.inline.ruler.after("escape","math_inline",s),e.block.ruler.after("blockquote","math_block",a,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=function(e,n){return function(e){t.displayMode=!1;try{return r.renderToString(e,t)}catch(n){return t.throwOnError,`<span class='katex-error' title='${o(n.toString())}'>${o(e)}</span>`}}(e[n].content)},e.renderer.rules.math_block=function(e,n){return function(e){t.displayMode=!0;try{return`<p class="katex-block ${t.blockClass}">`+r.renderToString(e,t)+"</p>"}catch(n){return t.throwOnError,`<p class='katex-block katex-error ${t.blockClass}' title='${o(n.toString())}'>${o(e)}</p>`}}(e[n].content)+"\n"}}}());export{c as m};
|
.output/public/assets/@vueuse-BsV7VRb2.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
import{w as e,n as t,r as n,t as a,a as i,c as r,g as o,h as u,i as l,o as s,b as c,d as v,s as d,e as f,f as p,u as m,j as g,k as h}from"./@vue-COP35Tvs.js";function w(e){return!!c()&&(v(e),!0)}const y=new WeakMap,b="undefined"!=typeof window&&"undefined"!=typeof document;"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope);const S=Object.prototype.toString,N=()=>{};const I=e=>e();function E(e=I,t={}){const{initialState:o="active"}=t,u=function(...e){if(1!==e.length)return a(...e);const t=e[0];return"function"==typeof t?n(r((()=>({get:t,set:N})))):i(t)}("active"===o);return{isActive:n(u),pause:function(){u.value=!1},resume:function(){u.value=!0},eventFilter:(...t)=>{u.value&&e(...t)}}}function O(e){return e.endsWith("rem")?16*Number.parseFloat(e):Number.parseFloat(e)}function A(e){return Array.isArray(e)?e:[e]}function F(t,n,a={}){const{eventFilter:i=I,...r}=a;return e(t,(o=i,u=n,function(...e){return new Promise(((t,n)=>{Promise.resolve(o((()=>u.apply(this,e)),{fn:u,thisArg:this,args:e})).then(t).catch(n)}))}),r);var o,u}function T(e,n=!0,a){o()?s(e,a):n?e():t(e)}const M=b?window:void 0,j=b?window.navigator:void 0;function V(...t){const n=[],a=()=>{n.forEach((e=>e())),n.length=0},i=p((()=>{const e=A(f(t[0])).filter((e=>null!=e));return e.every((e=>"string"!=typeof e))?e:void 0})),r=(o=([e,t,i,r])=>{if(a(),!(null==e?void 0:e.length)||!(null==t?void 0:t.length)||!(null==i?void 0:i.length))return;const o=(u=r,"[object Object]"===S.call(u)?{...r}:r);var u;n.push(...e.flatMap((e=>t.flatMap((t=>i.map((n=>((e,t,n,a)=>(e.addEventListener(t,n,a),()=>e.removeEventListener(t,n,a)))(e,t,n,o))))))))},u={flush:"post"},e((()=>{var e,n;return[null!=(n=null==(e=i.value)?void 0:e.map((e=>function(e){var t;const n=f(e);return null!=(t=null==n?void 0:n.$el)?t:n}(e))))?n:[M].filter((e=>null!=e)),A(f(i.value?t[1]:t[0])),A(m(i.value?t[2]:t[1])),
|
2 |
+
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
3 |
+
f(i.value?t[3]:t[2])]}),o,{...u,immediate:!0}));var o,u;return w(a),()=>{r(),a()}}function W(e){const t=function(){const e=d(!1),t=o();return t&&s((()=>{e.value=!0}),t),e}();return p((()=>(t.value,Boolean(e()))))}const k=Symbol("vueuse-ssr-width");function x(){const e=u()?((...e)=>{var t;const n=e[0],a=null==(t=o())?void 0:t.proxy;if(null==a&&!u())throw new Error("injectLocal must be called in setup");return a&&y.has(a)&&n in y.get(a)?y.get(a)[n]:l(...e)})(k,null):null;return"number"==typeof e?e:void 0}function _(e,t={}){const{controls:n=!1,navigator:a=j}=t,i=W((()=>a&&"permissions"in a)),r=d(),o="string"==typeof e?{name:e}:e,u=d(),l=()=>{var e,t;u.value=null!=(t=null==(e=r.value)?void 0:e.state)?t:"prompt"};V(r,"change",l,{passive:!0});const s=function(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const e=t;t=void 0,e&&await e},n}((async()=>{if(i.value){if(!r.value)try{r.value=await a.permissions.query(o)}catch(e){r.value=void 0}finally{l()}return n?h(r.value):void 0}}));return s(),n?{state:u,isSupported:i,query:s}:u}function D(e={}){const{navigator:t=j,read:a=!1,source:i,copiedDuring:r=1500,legacy:o=!1}=e,u=W((()=>t&&"clipboard"in t)),l=_("clipboard-read"),s=_("clipboard-write"),c=p((()=>u.value||o)),v=d(""),m=d(!1),g=function(e,t,a={}){const{immediate:i=!0,immediateCallback:r=!1}=a,o=d(!1);let u=null;function l(){u&&(clearTimeout(u),u=null)}function s(){o.value=!1,l()}function c(...n){r&&e(),l(),o.value=!0,u=setTimeout((()=>{o.value=!1,u=null,e(...n)}),f(t))}return i&&(o.value=!0,b&&c()),w(s),{isPending:n(o),start:c,stop:s}}((()=>m.value=!1),r,{immediate:!1});function h(e){return"granted"===e||"prompt"===e}return c.value&&a&&V(["copy","cut"],(async function(){let e=!(u.value&&h(l.value));if(!e)try{v.value=await t.clipboard.readText()}catch(r){e=!0}var n,a,i;e&&(v.value=null!=(i=null==(a=null==(n=null==document?void 0:document.getSelection)?void 0:n.call(document))?void 0:a.toString())?i:"")}),{passive:!0}),{isSupported:c,text:v,copied:m,copy:async function(e=f(i)){if(c.value&&null!=e){let a=!(u.value&&h(s.value));if(!a)try{await t.clipboard.writeText(e)}catch(n){a=!0}a&&function(e){const t=document.createElement("textarea");t.value=null!=e?e:"",t.style.position="absolute",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}(e),v.value=e,m.value=!0,g.start()}}}}const J="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},z="__vueuse_ssr_handlers__",C=P();function P(){return z in J||(J[z]=J[z]||{}),J[z]}const H={boolean:{read:e=>"true"===e,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},L="vueuse-storage";function q(n,a,r,o={}){var u;const{flush:l="pre",deep:s=!0,listenToStorageChanges:c=!0,writeDefaults:v=!0,mergeDefaults:m=!1,shallow:g,window:h=M,eventFilter:w,onError:y=e=>{},initOnMounted:b}=o,S=(g?d:i)(a),N=p((()=>f(n)));if(!r)try{r=function(e,t){return C[e]||t}("getDefaultStorage",(()=>{var e;return null==(e=M)?void 0:e.localStorage}))()}catch(D){y(D)}if(!r)return S;const I=f(a),O=function(e){return null==e?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"object"==typeof e?"object":Number.isNaN(e)?"any":"number"}(I),A=null!=(u=o.serializer)?u:H[O],{pause:j,resume:W}=function(e,t,n={}){const{eventFilter:a,initialState:i="active",...r}=n,{eventFilter:o,pause:u,resume:l,isActive:s}=E(a,{initialState:i});return{stop:F(e,t,{...r,eventFilter:o}),pause:u,resume:l,isActive:s}}(S,(()=>function(e){try{const t=r.getItem(N.value);if(null==e)k(t,null),r.removeItem(N.value);else{const n=A.write(e);t!==n&&(r.setItem(N.value,n),k(t,n))}}catch(D){y(D)}}(S.value)),{flush:l,deep:s,eventFilter:w});function k(e,t){if(h){const n={key:N.value,oldValue:e,newValue:t,storageArea:r};h.dispatchEvent(r instanceof Storage?new StorageEvent("storage",n):new CustomEvent(L,{detail:n}))}}function x(e){if(!e||e.storageArea===r)if(e&&null==e.key)S.value=I;else if(!e||e.key===N.value){j();try{(null==e?void 0:e.newValue)!==A.write(S.value)&&(S.value=function(e){const t=e?e.newValue:r.getItem(N.value);if(null==t)return v&&null!=I&&r.setItem(N.value,A.write(I)),I;if(!e&&m){const e=A.read(t);return"function"==typeof m?m(e,I):"object"!==O||Array.isArray(e)?e:{...I,...e}}return"string"!=typeof t?t:A.read(t)}(e))}catch(D){y(D)}finally{e?t(W):W()}}}function _(e){x(e.detail)}return e(N,(()=>x()),{flush:l}),h&&c&&T((()=>{r instanceof Storage?V(h,"storage",x,{passive:!0}):V(h,L,_),b&&x()})),b||x(),S}function B(e,t,n={}){const{window:a=M}=n;return q(e,t,null==a?void 0:a.localStorage,n)}function G(e={}){const{window:t=M}=e;if(!t)return i(["en"]);const n=t.navigator,a=i(n.languages);return V(t,"languagechange",(()=>{a.value=n.languages}),{passive:!0}),a}function Y(t={}){const{window:n=M,initialWidth:a=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:o=!0,type:u="inner"}=t,l=d(a),s=d(i),c=()=>{if(n)if("outer"===u)l.value=n.outerWidth,s.value=n.outerHeight;else if("visual"===u&&n.visualViewport){const{width:e,height:t,scale:a}=n.visualViewport;l.value=Math.round(e*a),s.value=Math.round(t*a)}else o?(l.value=n.innerWidth,s.value=n.innerHeight):(l.value=n.document.documentElement.clientWidth,s.value=n.document.documentElement.clientHeight)};c(),T(c);const v={passive:!0};if(V("resize",c,v),n&&"visual"===u&&n.visualViewport&&V(n.visualViewport,"resize",c,v),r){const t=function(e,t={}){const{window:n=M,ssrWidth:a=x()}=t,i=W((()=>n&&"matchMedia"in n&&"function"==typeof n.matchMedia)),r=d("number"==typeof a),o=d(),u=d(!1);return g((()=>{if(r.value){r.value=!i.value;const t=f(e).split(",");u.value=t.some((e=>{const t=e.includes("not all"),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let r=Boolean(n||i);return n&&r&&(r=a>=O(n[1])),i&&r&&(r=a<=O(i[1])),t?!r:r}))}else i.value&&(o.value=n.matchMedia(f(e)),u.value=o.value.matches)})),V(o,"change",(e=>{u.value=e.matches}),{passive:!0}),p((()=>u.value))}("(orientation: portrait)");e(t,(()=>c()))}return{width:l,height:s}}export{G as a,D as b,Y as c,B as u};
|
.output/public/assets/@wdns-kgTb0OXQ.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
.output/public/assets/ChatInput.vue_vue_type_style_index_0_lang-CtKQjmWn.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{l as e,K as a,w as t,a as l,v as s,z as n,y as o,R as r,F as i,ab as u,J as c,aa as p,A as v,H as f,ad as d,u as m,f as g,o as w,B as h,I as y,n as x}from"./@vue-COP35Tvs.js";import{t as k,u as A,d as b,m as C}from"./_plugin-vue_export-helper-0drS65lc.js";import{$ as P,c as z,Y as M,x as V,U as L,s as B}from"./tdesign-vue-next-CHJ-1YYh.js";import{c as R,P as U,af as j}from"./tdesign-icons-vue-next-CCrD-Br3.js";import{m as D}from"./mammoth-Cw8VHd7C.js";import{r as N,u as T}from"./xlsx-DB6BMndo.js";import{_ as F,a as S}from"./pdfjs-dist-8WFUNQXM.js";function H(){const e=window.innerWidth<768,a=navigator.userAgent.toLowerCase(),t=["android","webos","iphone","ipad","ipod","blackberry","windows phone"].some((e=>a.includes(e))),l="ontouchstart"in window||navigator.maxTouchPoints>0,s=void 0!==window.screen.orientation;return e&&(t||l||s)}const G={key:0,class:"flex gap-2 flex-wrap"},_=["onClick"],E={class:"max-w-[160px] overflow-hidden text-ellipsis text-nowrap"},I={class:"flex gap-2"},K={class:"max-w-[120px] overflow-hidden text-ellipsis text-nowrap"},Q=["onClick"],J={class:"max-w-[160px] overflow-hidden text-ellipsis text-nowrap"},O={class:"flex gap-2"},Y={class:"max-w-[120px] overflow-hidden text-ellipsis text-nowrap"},Z={class:"whitespace-pre-wrap break-words"},W=e({__name:"FileList",props:{files:{type:Array},showCloseButton:{type:Boolean,default:!0}},setup(e){const g=e,w=a([]);t((()=>g.files.length),(()=>{w.length=g.files.length,w.fill(!1)}),{immediate:!0});const h=e=>{g.files.splice(e,1)},y=l(!1),x=l("");function k(e){if(0===e)return"0 B";const a=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,a)).toFixed(2))+" "+["B","KB","MB","GB"][a]}return(a,t)=>{const l=P,g=z,A=M,b=V;return e.files.length>0?(o(),s("div",G,[(o(!0),s(i,null,u(e.files,((a,t)=>(o(),s(i,null,[a.type.startsWith("image")?(o(),c(A,{key:a.id,visible:w[t],images:[a.content||a.url],"close-on-overlay":"",onClose:e=>(e=>{w[e]=!1})(t)},{trigger:p((()=>[v("div",{class:"bg-color-page flex p-2 gap-2 rounded-lg cursor-pointer",onClick:e=>(e=>{w[e]=!0})(t)},[r(l,{src:a.content||a.url,style:{width:"40px",height:"40px"}},null,8,["src"]),v("div",null,[v("div",E,f(a.name),1),v("div",I,[v("span",K,f(a.type),1),v("span",null,f(k(a.size)),1)])]),e.showCloseButton?(o(),c(g,{key:0,theme:"primary",shape:"circle",onClick:d((e=>h(t)),["stop"]),size:"small",variant:"text"},{default:p((()=>[r(m(R),{slot:"icon"})])),_:2},1032,["onClick"])):n("",!0)],8,_)])),_:2},1032,["visible","images","onClose"])):(o(),s("div",{key:1,class:"bg-color-page flex p-2 gap-2 rounded-lg cursor-pointer",onClick:e=>(e=>{y.value=!0,x.value=e.content})(a)},[r(l,{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGwAAABsCAMAAAC4uKf/AAAA1VBMVEVHcEwgUP8kVP8lVf8oUP8IMKckVP8lU/8NL6kkVP8gUP8QMJ8NL6klVf8jU/8NL6oLMKokVP8OMKglUv8NMKkkVP8kU/8OLqskVP8OL6klU/8kVP8OLqkNL6oNMKkNL6olU/8NMKckVf8MMKckVP////8NL6nI1P8QNLR2lP8/af8yX/8xX/+6yf9Aaf/W3/9bf/+tv/+7yv+Env/x9f/k6v+ftP9oif8YQtQeS+lNdP9piv+En/8XQM/j6v8VPckhT/QSNrqgtP8eS+oTOL+Sqf+Rqf9kuMQUAAAAJHRSTlMAEHBgICDv39/PIBDv35C/ML9wYF9A0H+wz5+Pj59Q76Bgr0CdNRTaAAACCElEQVRo3u3a11ICQRAF0GVFFpAgIIggxt5ZcpJgzvr/n+STVZZMT+zZp7k/cGrSZavoIOClGHaiHKjnvHq5H5hlrwaaYYzlz0yoZgRggDF2pE1lugCGWOlQ08q2wBhjeb1zy0ZggbH8gc4eGlq/GKtqYF2wxNip+pUHa4zVVbGIAGPXrhf2FyupXckCCab2ALJAg7EThQcQUmGsJ8faZBg7dnlk/zF5J+cIMSbrZKDEZFeSFJN1Mi0m6WRiTNzJ1Jiwk8kxdpYmJuhkekzwABxgeCfbYH1M6znAXjAM62Qb7A7FkE4GJ/uIdDI4Whq3Ja0wuMW1Ojkm0Kr0GLxi51ZygAF8PH2+9TlxgmHxmMc8JsYGk2Q3AyfYaBZzs546wBYxkoQem8Zo5uTYA47dkGODNLFhmtsICWZNUrz6s6GbR73cfdPLx7HvRo95zGMe85glNvrmfTcimQyssPtVrJVkbPEpt441szHH3mPtjI2xRB/bGmNLfWxujH3pY0NjbLTStRY2V/85vasPMNyov+lksfXd6DGPecxjHiP+u1+YHOlQjSQFDnbhCmsTD58IExKP1QhT5P01WEvvyKxGoURpUA95CVLGxihTXFgQVOitCj5yWCDfxAz9MCVqFV2MbvLTKkqGNwnPrZKRTx4SLa7cVBt0JLgntYb61G14VTD+fctFnZB/WD8ijwbYDm7GXAAAAABJRU5ErkJggg==",style:{width:"40px",height:"40px"}}),v("div",null,[v("div",J,f(a.name),1),v("div",O,[v("span",Y,f(a.type),1),v("span",null,f(k(a.size)),1)])]),e.showCloseButton?(o(),c(g,{key:0,theme:"primary",shape:"circle",onClick:d((e=>h(t)),["stop"]),size:"small",variant:"text"},{default:p((()=>[r(m(R),{slot:"icon"})])),_:2},1032,["onClick"])):n("",!0)],8,Q))],64)))),256)),r(b,{visible:y.value,"onUpdate:visible":t[0]||(t[0]=e=>y.value=e),attach:"body","on-confirm":()=>y.value=!1},{body:p((()=>[v("div",Z,f(x.value),1)])),_:1},8,["visible","on-confirm"])])):n("",!0)}}}),q={class:"relative"},X=["onClick"],$={class:"flex align-middle justify-center items-center gap-2"},ee=e({__name:"ChatInput",props:{disabled:{type:Boolean,default:!1},minRows:{type:Number,default:2},maxRows:{type:Number,default:8},showUpload:{type:Boolean,default:!0},placeholder:{type:String,default:k("components.chatInput.placeholder")},autoCompleteEnabled:{type:Boolean,default:!1},tips:{type:String,default:""}},emits:["input"],setup(e,{emit:a}){F.workerSrc=new URL(""+new URL("pdf.worker.min-yatZIOMy.mjs",import.meta.url).href,import.meta.url).toString();const k=l(null),P=A();t((()=>P.isSidebarCompact),(e=>{e&&x((()=>{if(k.value){const e=k.value.$el.querySelector("textarea");e&&(e.focus(),e.blur())}}))}));const M=e,V=l(""),R=l([]),G=l(-1);l("");const _=a,E=()=>{const e=V.value.trim();e&&(R.value.push(e),R.value.length>50&&R.value.shift(),localStorage.setItem("chatHistory",JSON.stringify(R.value)),_("input",{content:e,files:I.value.map((e=>({content:e.content,url:e.url,id:e.raw.path,name:e.name,type:e.type,size:e.size})))}),V.value="",I.value=[],G.value=-1)},I=l([]),K=async e=>{try{for(const a of e){const e=await J(a.raw);a.content=e,I.value.push(a)}return{status:"success",error:"",response:{url:" "}}}catch{return{status:"fail",error:"",response:{}}}};async function Q(e){return new Promise(((a,t)=>{const l=new FileReader;l.onload=e=>a(e.target.result),l.onerror=e=>t(e),l.readAsArrayBuffer(e)}))}async function J(e){var a;switch(null==(a=e.name.split(".").pop())?void 0:a.toLowerCase()){case"docx":return await async function(e){const a=await Q(e);return(await D.extractRawText({arrayBuffer:a})).value}(e);case"pdf":return await async function(e){const a=await Q(e),t=await S(a).promise;let l="";for(let s=1;s<=t.numPages;s++){const e=await t.getPage(s);l+=(await e.getTextContent()).items.map((e=>e.str)).join(" ")+"\n"}return l}(e);case"xlsx":case"xls":return await async function(e){const a=await Q(e),t=N(new Uint8Array(a),{type:"array"});let l="";return t.SheetNames.forEach((e=>{const a=t.Sheets[e],s=T.sheet_to_json(a,{header:1});l+=`Sheet: ${e}\n`,s.forEach((e=>{l+=e.join(", ")+"\n"})),l+="\n"})),l}(e);case"png":case"jpg":case"jpeg":case"gif":case"bmp":case"webp":return await async function(e){return new Promise(((a,t)=>{const l=new FileReader;l.readAsDataURL(e),l.onload=()=>a(l.result),l.onerror=e=>t(e)}))}(e);default:return await async function(e){return new Promise(((a,t)=>{const l=new FileReader;l.onload=function(e){a(e.target.result)},l.onerror=function(e){t(e)},l.readAsText(e)}))}(e)}}const O=b(),Y=l(!1),Z=l(0),ee=l(0),ae=l(""),te=l(null),le=l(null),se=l(null),ne=l("-150px"),oe=g((()=>["@ai",...O.enableModels.map((e=>`@${C.getModelItemTitle(e)}`))])),re=l(!1),ie=(e,a)=>{const{e:t}=a;if(Y.value)switch(t.key){case"ArrowDown":t.preventDefault(),Z.value=(Z.value+1)%ue.value.length;break;case"ArrowUp":t.preventDefault(),Z.value=(Z.value-1+ue.value.length)%ue.value.length;break;case"Enter":t.preventDefault(),ue.value.length>0&&pe(ue.value[Z.value]);break;case"Escape":Y.value=!1}else if("Enter"===t.key){if(t.shiftKey||re.value)return;const e=V.value.trim();if(M.autoCompleteEnabled&&e.startsWith("@")&&(oe.value.includes(e)||"@"===e))return void t.preventDefault();t.preventDefault(),E()}else if("ArrowUp"===t.key||"ArrowDown"===t.key){if(-1===G.value&&V.value)return;if(t.preventDefault(),"ArrowUp"===t.key){if(0===R.value.length)return;G.value<R.value.length-1&&G.value++}else G.value>-1&&G.value--;-1===G.value?V.value="":V.value=R.value[R.value.length-1-G.value]}},ue=g((()=>{if(!ae.value)return oe.value;const e=ae.value.toLowerCase();return oe.value.filter((a=>a.toLowerCase().includes(e)))}));t((()=>ue),(async()=>{if(Y.value&&le.value){await x();const e=te.value.offsetHeight;ne.value=`-${e}px`}}));const ce=(e,a)=>{const{e:t}=a,l=e;if(G.value=-1,!M.autoCompleteEnabled)return;const s=t.target.selectionStart;if(ee.value=l.lastIndexOf("@",s-1),-1!==ee.value&&ee.value<s){const e=l.indexOf(" ",ee.value);ee.value===l.length-1||-1===e||e>=s?(ae.value=l.slice(ee.value+1,s),Y.value=!0,Z.value=0):Y.value=!1}else Y.value=!1},pe=e=>{const a=V.value.slice(0,ee.value),t=V.value.slice(V.value.indexOf(" ",ee.value)+1||V.value.length);V.value=a+e+" "+t,Y.value=!1,ae.value=""},ve=()=>{if(se.value&&te.value){const e=te.value,a=se.value,t=e.scrollTop,l=t+e.clientHeight,s=a.offsetTop,n=s+a.offsetHeight;s<t?e.scrollTop=s:n>l&&(e.scrollTop=n-e.clientHeight)}};t(Z,(()=>{x(ve)})),w((()=>{re.value=H();const e=localStorage.getItem("chatHistory");e&&(R.value=JSON.parse(e))}));const fe=async e=>{var a;const t=null==(a=e.clipboardData)?void 0:a.items;if(t)for(let l=0;l<t.length;l++){const a=t[l];if(a.type.startsWith("image/")){e.preventDefault();const t=a.getAsFile();if(t){const e={raw:t,name:`pasted_image_${Date.now()}.${t.type.split("/")[1]}`,type:t.type,size:t.size};await K([e])}}else if("file"===a.kind){e.preventDefault();const t=a.getAsFile();if(t){const e={raw:t,name:t.name||`pasted_file_${Date.now()}`,type:t.type,size:t.size};await K([e])}}}},de=async e=>{var a;const t=null==(a=e.dataTransfer)?void 0:a.files;if(t)for(let l=0;l<t.length;l++){const e=t[l];if(e){const a={raw:e,name:e.name,type:e.type,size:e.size};await K([a])}}};return(a,t)=>{const l=z,g=L,w=B;return o(),s("div",q,[Y.value?(o(),s("div",{key:0,class:"autocomplete left-0 absolute z-50 w-full bg-color-container bordered p-2",ref_key:"autocompleteContainer",ref:te,style:h({top:ne.value})},[v("ul",{ref_key:"suggestionList",ref:le},[(o(!0),s(i,null,u(ue.value,((e,a)=>(o(),s("li",{key:e,onClick:a=>pe(e),class:y({selected:a===Z.value}),ref_for:!0,ref:e=>{a===Z.value&&(se.value=e)}},f(e),11,X)))),128))],512)],4)):n("",!0),v("div",{class:"flex flex-col chat-input bg-color-container bordered rounded-lg px-1",onDragover:t[1]||(t[1]=d((()=>{}),["prevent"])),onDrop:d(de,["prevent"])},[r(W,{files:I.value,class:y(["py-2"])},null,8,["files"]),v("div",$,[e.showUpload?(o(),c(g,{key:0,theme:"custom","request-method":K,multiple:!0,allowUploadDuplicateFile:!0},{default:p((()=>[r(l,{theme:"primary",shape:"circle",size:"large",variant:"base"},{default:p((()=>[r(m(U),{slot:"icon"})])),_:1})])),_:1})):n("",!0),r(w,{ref_key:"textareaRef",ref:k,class:"flex-1",onKeydown:ie,onChange:ce,onPaste:fe,disabled:e.disabled,modelValue:V.value,"onUpdate:modelValue":t[0]||(t[0]=e=>V.value=e),placeholder:e.placeholder,name:"description",tips:e.tips,autosize:{minRows:e.minRows,maxRows:e.maxRows}},null,8,["disabled","modelValue","placeholder","tips","autosize"]),r(l,{theme:"primary",shape:"circle",onClick:E,size:"large",variant:"base"},{default:p((()=>[r(m(j),{slot:"icon"})])),_:1})])],32)])}}});export{ee as _,W as a,H as c};
|
.output/public/assets/FrameContent-Bpw0Mm1e.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{c as e}from"./@vueuse-BsV7VRb2.js";import{d as t}from"./lodash-VDnThKtA.js";import{p as a,u as o,_ as r}from"./_plugin-vue_export-helper-0drS65lc.js";import{V as s}from"./tdesign-vue-next-CHJ-1YYh.js";import{l as n,a as i,f as u,w as l,v as m,y as p,R as d,aa as c,A as f,I as g,B as h,u as v}from"./@vue-COP35Tvs.js";const y=["src"],w=r(n({__name:"FrameContent",props:{frameSrc:String,offset:{type:Number,default:0}},setup(r){const n=r,{width:w,height:_}=e(),x=i(!0),b=i(window.innerHeight),F=i(),j=u((()=>[`${a}-iframe-page`])),B=o(),I=u((()=>({height:`${b.value}px`}))),S=getComputedStyle(document.documentElement),H=S.getPropertyValue("--td-comp-size-xxxl"),C=S.getPropertyValue("--td-comp-size-xxl"),V=S.getPropertyValue("--td-comp-paddingTB-m");function $(){const e=v(F);if(!e)return;let t=0;const{showLayoutHeader:a,showFooter:o,showBreadcrumb:r}=B,s=a?parseFloat(H):0,i=document.querySelector(".t-breadcrumb"),u=s+(r?function(e){let t=e.clientHeight;const a=window.getComputedStyle(e);return t+=parseInt(a.marginTop,10),t+=parseInt(a.marginBottom,10),t+=parseInt(a.borderTopWidth,10),t+=parseInt(a.borderBottomWidth,10),t}(i):0)+2*parseFloat(V)+(o?parseFloat(C):0)+2+n.offset;b.value=window.innerHeight-u,t=document.documentElement.clientHeight-u,e.style.height=`${t}px`}function z(){x.value=!1,$()}return l([w,_],t($,250)),l([()=>B.showFooter,()=>B.showBreadcrumb],t($,250)),(e,t)=>{const a=s;return p(),m("div",{class:g(j.value),style:h(I.value)},[d(a,{loading:x.value,size:"large",style:h(I.value)},{default:c((()=>[f("iframe",{ref_key:"frameRef",ref:F,src:r.frameSrc,class:g(`${j.value}__main`),onLoad:z},null,42,y)])),_:1},8,["loading","style"])],6)}}}),[["__scopeId","data-v-200260e8"]]);export{w as F};
|
.output/public/assets/ToolBar.vue_vue_type_style_index_0_lang-DoYvgSjk.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{l as e,K as t,a,V as l,w as n,o as s,f as o,v as i,y as c,F as r,a0 as u,z as d,A as p,H as v,a1 as m,R as f,aa as g,u as h,ab as x,J as y,G as w,n as b,ah as _,I as k,ad as C,B as j}from"./@vue-COP35Tvs.js";import{m as T}from"./markdown-DcXY1cgb.js";import{s as B,c as $,Y as R,I as S,Z as z,_ as M,E,d as V,j as A,m as H,K as L,f as O}from"./tdesign-vue-next-CHJ-1YYh.js";import{c as q,ad as I,v as U,k as D,Z as P,a5 as Y,af as F}from"./tdesign-icons-vue-next-CCrD-Br3.js";import{_ as K,b as N,t as W,f as Z,o as G}from"./_plugin-vue_export-helper-0drS65lc.js";import{a as J}from"./ChatInput.vue_vue_type_style_index_0_lang-CtKQjmWn.js";import{U as X}from"./@wdns-kgTb0OXQ.js";import{v as Q}from"./uuid-_R2nDvl_.js";import{a as ee}from"./main-CIVI3Nwp.js";const te={class:"markdown-body"},ae={class:"think-summary"},le=["innerHTML"],ne=["innerHTML"],se={class:"flex justify-end mt-2 gap-5"},oe={key:0,class:"tdesign-image-viewer-wrapper flex flex-wrap gap-6"},ie={key:0,class:"tdesign-image-viewer__error tdesign-image-viewer__ui-image tdesign-image-viewer__base"},ce={class:"tdesign-image-viewer__error--content"},re={class:"tdesign-image-viewer__ui-image tdesign-image-viewer__base"},ue=["src","onError"],de=["onClick"],pe={class:"absolute left-1 top-1 max-w-[75%]"},ve=["title"],me=K(e({__name:"AssistantContent",props:{content:{type:Object},isEditing:{type:Boolean,default:!1}},emits:["save","cancel"],setup(e,{emit:_}){const k=t([!1,!1,!1,!1]),C=t([!1,!1,!1,!1]),j=e,S=a(""),z=a(""),M=a(!1),E=a(!1);let V=null,A=null;const H=async()=>{j.content.think&&(V&&clearTimeout(V),V=window.setTimeout((async()=>{try{M.value=!0,S.value=await T.render(j.content.think||"")}catch(e){}finally{M.value=!1}}),100))},L=async()=>{j.content.text&&(A&&clearTimeout(A),A=window.setTimeout((async()=>{try{E.value=!0,z.value=await T.render(j.content.text||"")}catch(e){}finally{E.value=!1}}),100))};l((()=>{V&&clearTimeout(V),A&&clearTimeout(A)})),n((()=>j.content.text),(()=>{L()})),n((()=>j.content.think),(()=>{H()})),s((()=>{j.content.text&&!z.value&&L(),j.content.think&&!S.value&&H()}));const O=o((()=>j.content.images.map((e=>e.content||e.url)))),P=_,Y=a(j.content.text),F=()=>{P("save",Y.value)},K=()=>{Y.value=j.content.text,P("cancel")},N=(e,t)=>{},W=a(null);return n((()=>j.isEditing),(e=>{e&&(Y.value=j.content.text,b((()=>{W.value.$el.querySelector("textarea").focus()})))})),(t,a)=>{const l=B,n=$,s=R;return c(),i(r,null,[u(p("div",te,[u(p("details",null,[p("summary",ae,v(e.content.text?"查看 AI 思考过程":"思考中..."),1),p("div",{class:"think-process assistant-content",innerHTML:S.value},null,8,le)],512),[[m,e.content.think]]),p("div",{innerHTML:z.value,class:"assistant-content"},null,8,ne)],512),[[m,(e.content.text||e.content.think)&&!e.isEditing]]),u(p("div",null,[f(l,{ref_key:"textareaRef",ref:W,modelValue:Y.value,"onUpdate:modelValue":a[0]||(a[0]=e=>Y.value=e),autosize:{minRows:5,maxRows:20},onBlur:N},null,8,["modelValue"]),p("div",se,[f(n,{shape:"circle",size:"medium",onClick:K},{default:g((()=>[f(h(q),{slot:"icon"})])),_:1}),f(n,{shape:"circle",size:"medium",onClick:F},{default:g((()=>[f(h(I),{slot:"icon"})])),_:1})])],512),[[m,e.content.text&&e.isEditing]]),O.value.length>0?(c(),i("div",oe,[(c(!0),i(r,null,x(j.content.images,((e,t)=>(c(),i("div",{key:t,class:"min-w-44 min-h-44"},[C[t]?(c(),i("div",ie,[p("div",ce,[f(h(U),{name:"image-error",size:"2em"}),a[1]||(a[1]=p("div",null,"图片无法显示",-1))])])):(c(),y(s,{key:1,visible:k[t],images:O.value,"default-index":t,"close-on-overlay":"",onClose:e=>(e=>{k[e]=!1})(t)},{trigger:g((()=>[p("div",re,[p("img",{alt:"test",src:e.content||e.url,class:"tdesign-image-viewer__ui-image--img",onError:e=>(e=>{C[e]=!0})(t)},null,40,ue),p("div",{class:"tdesign-image-viewer__ui-image--hover",onClick:e=>(e=>{k[e]=!0})(t)},[p("span",null,[f(h(D),{size:"1.4em"}),a[2]||(a[2]=w(" 预览 "))])],8,de),p("div",pe,[p("div",{class:"text-black bg-white bg-opacity-75 p-1 rounded-2xl text-xs truncate",title:e.model},v(e.model),9,ve)])])])),_:2},1032,["visible","images","default-index","onClose"]))])))),128))])):d("",!0)],64)}}}),[["__scopeId","data-v-19255ef7"]]),fe={key:0,class:"toggle-button-container"},ge={key:1},he={class:"flex justify-end mt-2 gap-5"},xe=K(e({__name:"UserContent",props:{content:{type:Object},isEditing:{type:Boolean,default:!1},maxHeight:{type:Number,default:300}},emits:["save","cancel"],setup(e,{emit:t}){_((e=>({"2702f56a":l.maxHeight+"px"})));const l=e,x=o((()=>[...l.content.files,...l.content.images])),y=t,C=a(l.content.text),j=a(null),T=a(!0),R=a(!1),z=a(!1),M=()=>{if(j.value){const e=j.value.scrollHeight;R.value=e>l.maxHeight}},E=()=>{T.value=!T.value};s((()=>{b((async()=>{M()})),window.addEventListener("resize",M)})),n((()=>l.content.text),(()=>{b((()=>{M()}))}));const V=()=>{y("save",C.value)},A=()=>{C.value=l.content.text,y("cancel")},H=(e,t)=>{},L=a(null);return n((()=>l.isEditing),(e=>{e&&(C.value=l.content.text,b((()=>{L.value.$el.querySelector("textarea").focus()})))})),(t,a)=>{const l=S,n=$,s=B;return c(),i(r,null,[f(J,{files:x.value,showCloseButton:!1,class:"mb-2"},null,8,["files"]),e.isEditing?d("",!0):(c(),i("div",{key:0,class:"content-container relative",onMouseenter:a[0]||(a[0]=e=>z.value=!0),onMouseleave:a[1]||(a[1]=e=>z.value=!1)},[p("div",{ref_key:"contentRef",ref:j,class:k(["user-content whitespace-pre-wrap break-words",{"content-collapsed":T.value&&R.value}])},v(e.content.text),3),R.value?u((c(),i("div",fe,[f(n,{size:"small",variant:"text",onClick:E,class:"toggle-button"},{icon:g((()=>[f(l,{name:T.value?"chevron-down":"chevron-up"},null,8,["name"])])),default:g((()=>[w(v(T.value?"展开":"收起")+" ",1)])),_:1})],512)),[[m,z.value]]):d("",!0)],32)),e.isEditing?(c(),i("div",ge,[f(s,{ref_key:"textareaRef",ref:L,modelValue:C.value,"onUpdate:modelValue":a[2]||(a[2]=e=>C.value=e),autosize:{minRows:2,maxRows:20},onBlur:H},null,8,["modelValue"]),p("div",he,[f(n,{size:"large",shape:"circle",variant:"text",onClick:A},{default:g((()=>[f(h(q),{slot:"icon"})])),_:1}),f(n,{size:"large",shape:"circle",variant:"text",onClick:V},{default:g((()=>[f(h(I),{slot:"icon"})])),_:1})])])):d("",!0)],64)}}}),[["__scopeId","data-v-b8afd07d"]]),ye=e({__name:"CodeRenderer",props:{blocks:{type:Array,required:!0}},setup(e){const t=e,l=a(),r=o((()=>t.blocks.every((e=>e.complete))));const u=o((()=>{var e,a,l,n,s,o;if(!r.value)return"";const i=(null==(e=t.blocks.find((e=>"html"===e.language)))?void 0:e.code)||"",{head:c,body:u}=function(e){const t=e.match(/<head\b[^>]*>([\s\S]*?)<\/head>/i),a=e.match(/<body\b[^>]*>([\s\S]*?)<\/body>/i);return{head:t?t[1].trim():"",body:a?a[1].trim():""}}(i),d=(null==(a=t.blocks.find((e=>"css"===e.language)))?void 0:a.code)||"",p=(null==(l=t.blocks.find((e=>"js"===e.language||"javascript"===e.language||"typescript"===e.language)))?void 0:l.code)||"";null==(n=t.blocks.find((e=>"typescript"===e.language)))||n.code;const v=(null==(s=t.blocks.find((e=>"jsx"===e.language)))?void 0:s.code)||"",m=(null==(o=t.blocks.find((e=>"vue"===e.language)))?void 0:o.code)||"";if(v){const e=v.match(/export default (\w+);/),t=e?e[1]:null;return`\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset="utf-8" />\n <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'unsafe-inline' 'unsafe-eval' https://cdnjs.cloudflare.com; style-src 'unsafe-inline';">\n <style>${d}</style>\n <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/7.24.6/babel.min.js"><\/script>\n <script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.3.1/umd/react.production.min.js"><\/script>\n <script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.3.1/umd/react-dom.production.min.js"><\/script>\n ${c}\n </head>\n\n <body>\n <div id="app"></div>\n ${u}\n <script type="text/babel">\n ${function(e){const t=/import\s+(?:(\w+)\s*,?\s*)?(?:{([^}]+)})?\s+from\s+['"]react['"];?/g,a=/import\s+['"]([^'"]+\.css)['"];?/g,l=/import\s+\w+\s+from\s+['"]react-dom['"];?/g,n=/ReactDOM\.render\([^)]*\);?/g;let s,o=e,i="";const c=new Set;for(;null!==(s=t.exec(e));)s[1]&&(i=s[1].trim()),s[2]&&s[2].split(",").forEach((e=>c.add(e.trim())));o=o.replace(t,""),o=o.replace(a,""),o=o.replace(l,""),o=o.replace(n,"");let r="";r+=i?`const ${i} = window.React;\n`:"const React = window.React;\n";c.size>0&&(r+=`const { ${Array.from(c).join(", ")} } = React;\n`);return(r+o).replace(/export default \w+;\s*$/,"")}(v)}\n ReactDOM.render(<${t} />, document.getElementById('app'))\n <\/script>\n </body>\n </html>\n `}if(m){const e=m.match(/<template>([\s\S]*)<\/template>/),t=m.match(/<script\s*(setup)?[^>]*>([\s\S]*)<\/script>/),a=m.match(/<style[^>]*>([\s\S]*)<\/style>/),l=e?e[1].trim():"",n=t?t[2].trim():"",s=t&&"setup"===t[1],o=a?a[1].trim():"";let i=n;if(s)i=i.replace(/import\s+.*from\s+['"].*['"]/g,""),i=`return {\n ${i}\n }`;else{const e=i.match(/export\s+default\s*{([\s\S]*)}/);e&&(i=e[1].trim())}return`\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset="utf-8" />\n <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'unsafe-inline' 'unsafe-eval' https://unpkg.com; style-src 'unsafe-inline';">\n <script src="https://unpkg.com/vue@3/dist/vue.global.js"><\/script>\n <style>${o}</style>\n ${c}\n </head>\n <body>\n <div id="app">\n ${l}\n </div>\n ${u}\n <script>\n const { createApp, ref, reactive, computed, onMounted } = Vue;\n \n const app = createApp({\n ${s?"setup() {":""}\n ${i}\n ${s?"}":""}\n });\n \n app.mount('#app');\n <\/script>\n </body>\n </html>\n `}return`\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset="utf-8" />\n <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'unsafe-inline'; style-src 'unsafe-inline';">\n <style>${d}</style>\n ${c}\n </head>\n <body>\n ${u}\n <script>\n ${p}\n <\/script>\n </body>\n </html>\n `}));return n(u,(e=>{l.value&&(l.value.srcdoc=e)})),s((()=>{l.value&&(l.value.srcdoc=u.value)})),(e,t)=>(c(),i("iframe",{ref_key:"iframeRef",ref:l,sandbox:"allow-scripts",style:{width:"100%",height:"100%",border:"none"}},null,512))}}),we={class:"h-full w-full relative"},be=e({__name:"CodeBlocks",props:{content:{type:String,required:!0},closeBtn:{type:[Function,null],default:null}},setup(e){const t=e,l=a(0),s=a([]);n((()=>t.content),(e=>{s.value=function(e){const t=/(?:^|\n)```(?:(html|css|js|javascript|typescript|jsx|vue)?.*)\n([\s\S]*?)(?:```|$)/g;return[...e.matchAll(t)].map((e=>({language:e[1]||"javascript",code:e[2].trim(),complete:e[0].endsWith("```")})))}(t.content);const a=s.value.every((e=>e.complete));l.value=a?-1:0}),{immediate:!0});const o=()=>{t.closeBtn()};return(t,a)=>{const n=M,u=z,p=$;return c(),i("div",we,[f(u,{modelValue:l.value,"onUpdate:modelValue":a[0]||(a[0]=e=>l.value=e),class:"h-full overflow-auto flex flex-col artifact"},{default:g((()=>[f(n,{value:-1,label:"preview"},{default:g((()=>[f(ye,{blocks:s.value,class:"rounded-lg"},null,8,["blocks"])])),_:1}),(c(!0),i(r,null,x(s.value,((e,t)=>(c(),y(n,{value:t,label:e.language},{default:g((()=>[f(h(X),{highlightjs:"",code:e.code,lang:e.language,theme:!1,class:"code-block h-full"},null,8,["code","lang"])])),_:2},1032,["value","label"])))),256))])),_:1},8,["modelValue"]),e.closeBtn?(c(),y(p,{key:0,size:"small",variant:"outline",onClick:o,class:"absolute right-0 top-3 z-50"},{default:g((()=>[f(h(q),{slot:"icon"})])),_:1})):d("",!0)])}}}),_e={class:"flex flex-row items-center p-2"},ke={class:"flex flex-col gap-2 p-2"},Ce={class:"max-h-32 bg-color-page overflow-auto whitespace-pre-line scrollbar p-2"},je=["innerHTML"],Te={class:"flex flex-row justify-end gap-2"},Be={class:"flex flex-col gap-2 p-2"},$e={class:"flex flex-grow items-center gap-2 relative"},Re={class:"flex flex-col gap-2 p-2"},Se={class:"max-h-72 scrollbar overflow-y-auto overflow-x-hidden bordered p-2 shadow-sm"},ze=e({__name:"ToolBar",props:{parent:Object},setup(e,{expose:t}){const l=N(),d=ee(),_=e,k=a({top:"0px",left:"0px"}),R=a(!1),S=a(null),z=a(null),M=a(""),I=()=>{if(!S.value||!_.parent)return;const e=S.value,t=_.parent,a=t.getBoundingClientRect(),l=e.getBoundingClientRect();let n=parseFloat(k.value.left);const s=a.width-l.width;n>s&&(n=s),n<0&&(n=0);let o=parseFloat(k.value.top);const i=l.height+o,c=a.height;i>c&&(o=Math.max(0,c-l.height));const r=t.scrollTop;o<r&&(o=r),k.value={top:`${o}px`,left:`${n}px`}},U=a(!1),D=a(!1),K=a(""),J=()=>{R.value=!1,U.value=!1},X=()=>{const e=window.getSelection();navigator.clipboard.writeText(e.toString()),J(),O.success(W("components.toolBar.copySuccessMsg"))},te=()=>{navigator.clipboard.writeText(M.value),J(),O.success(W("components.toolBar.copySuccessMsg"))},ae=o((()=>l.toolBarButtons.filter((e=>e.name&&e.show)))),le=(e,t)=>{const{e:a}=t;if("Enter"===a.key){if(a.shiftKey)return;a.preventDefault(),ce()}};let ne="",se=null,oe=a("");const ie=()=>{he(),D.value=!0,se=window.getSelection(),oe.value=se.toString(),b((()=>{I()}))},ce=async()=>{const e=oe.value,t=K.value;ne=t.includes("{{text}}")?t.replace("{{text}}",e):e?e+"\r\n"+t:t,D.value=!1,await re()};async function re(){const e=_.parent,t=S.value.getBoundingClientRect().left-e.getBoundingClientRect().left;he(),U.value=!0,b((()=>{const a=e.getBoundingClientRect(),l=S.value.getBoundingClientRect();let n=t;const s=a.width-l.width;if(n>s&&(n=s),n<0&&(n=0),se&&se.rangeCount>0){const t=se.getRangeAt(0).getBoundingClientRect();let s=t.top+e.scrollTop-a.top-52;const o=e.scrollTop;s<o&&(s=o),s+l.height>a.height+e.scrollTop&&(s=t.bottom+e.scrollTop-a.top+10,s+l.height>a.height+e.scrollTop&&(s=Math.max(o,a.height+e.scrollTop-l.height))),k.value={top:`${s}px`,left:`${n}px`}}})),await ue()}const ue=async()=>{l.assistModel?(M.value=W("components.toolBar.handing"),await Z(ne,(e=>{M.value=e,b((()=>{I()}))}))):O.error(W("components.toolBar.noAssistModel"))},de=a(!1),pe=async()=>{he(),de.value=!0,oe.value=window.getSelection().toString(),b((()=>{I()}))},ve=a(""),me=d.list,fe=async()=>{de.value=!1;const e=oe.value,t={id:Q(),title:e,time:(new Date).getTime(),conversationId:"",conversationName:"",conversationAvatar:"",chats:[],notes:[oe.value]};if(d.add(t),O.success(W("pages.conversation.favorite_success")),l.assistModel){const a=W("pages.conversation.extract_core_conversation",{question:e,answer:""});await G(a,(e=>{t.title=e,t.title=t.title.replaceAll("###",""),t.title=t.title.trim(),d.update(t)}))}},ge=async()=>{if(!ve.value)return void O.warning("需要先选中笔记");de.value=!1;const e=me.find((e=>e.id==ve.value));e.notes.push(oe.value),d.update(e),O.success(W("pages.conversation.favorite_success"))},he=()=>{U.value=!1,D.value=!1,K.value="",de.value=!1,ve.value=""};return n([M,D,de],(()=>{(U.value||D.value||de.value)&&b((()=>{I()}))}),{deep:!0}),s((()=>{if(_.parent){new ResizeObserver((()=>{R.value&&I()})).observe(_.parent),_.parent.addEventListener("scroll",(()=>{R.value&&I()}))}})),t({showToolbox:()=>{const e=window.getSelection();e.toString().trim()&&(R.value=!0,he(),b((()=>{const t=e.getRangeAt(0).getBoundingClientRect(),a=_.parent,l=a.getBoundingClientRect(),n=S.value.getBoundingClientRect();let s=t.left+t.width/2-n.width/2+a.scrollLeft-l.left;const o=l.width-n.width;s>o&&(s=o),s<0&&(s=0);let i=t.top+a.scrollTop-l.top-52;const c=a.scrollTop;i<c&&(i=c),i+n.height>l.height+a.scrollTop&&(i=t.bottom+a.scrollTop-l.top+10,i+n.height>l.height+a.scrollTop&&(i=Math.max(c,l.height+a.scrollTop-n.height))),k.value={top:`${i}px`,left:`${s}px`}})))},hideToolbox:J}),(e,t)=>{const a=$,l=E,n=B,s=L,o=H,d=A,b=V;return u((c(),i("div",{ref_key:"selectToolbox",ref:S,style:j(k.value),class:"z-50 absolute bg-color-container bordered rounded-xl shadow-md flex flex-col max-w-80",onMouseup:t[2]||(t[2]=C((()=>{}),["stop"])),onMousedown:t[3]||(t[3]=C((()=>{}),["stop"]))},[p("div",_e,[(c(!0),i(r,null,x(ae.value,(e=>(c(),i(r,null,[f(a,{onClick:t=>(async e=>{se=window.getSelection(),oe.value=se.toString(),ne=e.prompt.replace("{{text}}",oe.value),await re()})(e),size:"small",variant:"text"},{default:g((()=>[w(v(e.name),1)])),_:2},1032,["onClick"]),f(l,{layout:"vertical"})],64)))),256)),f(a,{size:"small",variant:"text",onClick:ie},{default:g((()=>[w(v(e.$t("components.toolBar.dialog")),1)])),_:1}),f(l,{layout:"vertical"}),f(a,{size:"small",variant:"text",onClick:pe},{default:g((()=>[w(v(e.$t("components.toolBar.faviorite")),1)])),_:1}),f(l,{layout:"vertical"}),f(a,{size:"small",variant:"text",onClick:X},{default:g((()=>[w(v(e.$t("components.toolBar.copy")),1)])),_:1})]),u(p("div",ke,[p("pre",Ce,v(h(ne)),1),p("div",{ref_key:"toolResultContent",ref:z,class:"markdown-body max-h-64 overflow-auto scrollbar",innerHTML:h(T).renderSync(M.value)},null,8,je),p("div",Te,[f(a,{size:"small",variant:"outline",onClick:ue},{default:g((()=>[f(h(P),{slot:"icon"})])),_:1}),f(a,{size:"small",variant:"outline",onClick:te},{default:g((()=>[f(h(Y),{slot:"icon"})])),_:1}),f(a,{size:"small",variant:"outline",onClick:J},{default:g((()=>[f(h(q),{slot:"icon"})])),_:1})])],512),[[m,U.value]]),u(p("div",Be,[u(p("pre",{class:"max-h-32 bg-color-page overflow-auto whitespace-pre-line scrollbar p-2"},v(h(oe).trim()),513),[[m,h(oe).trim()]]),p("div",$e,[f(n,{modelValue:K.value,"onUpdate:modelValue":t[0]||(t[0]=e=>K.value=e),onKeypress:le},null,8,["modelValue"]),f(a,{size:"small",shape:"circle",variant:"outline",onClick:ce,class:"absolute bottom-1 right-1"},{default:g((()=>[f(h(F),{slot:"icon"})])),_:1})])],512),[[m,D.value]]),u(p("div",Re,[u(p("pre",{class:"max-h-32 bg-color-page overflow-auto whitespace-pre-line scrollbar p-2"},v(h(oe).trim()),513),[[m,h(oe).trim()]]),f(a,{onClick:fe,theme:"default",variant:"outline"},{default:g((()=>t[4]||(t[4]=[w("创建新的笔记")]))),_:1}),f(a,{onClick:ge,theme:"default",variant:"outline"},{default:g((()=>t[5]||(t[5]=[w("添加到笔记")]))),_:1}),p("div",Se,[f(b,{modelValue:ve.value,"onUpdate:modelValue":t[1]||(t[1]=e=>ve.value=e)},{default:g((()=>[f(d,{gutter:[16,16]},{default:g((()=>[(c(!0),i(r,null,x(h(me),(e=>(c(),y(o,{span:12},{default:g((()=>[f(s,{value:e.id,class:"grid grid-flow-col auto-cols-max align-middle fav-radio fav-radio-toolbar"},{default:g((()=>[w(v(e.title),1)])),_:2},1032,["value"])])),_:2},1024)))),256))])),_:1})])),_:1},8,["modelValue"])])],512),[[m,de.value]])],36)),[[m,R.value]])}}});export{me as A,xe as U,be as _,ze as a};
|
.output/public/assets/_plugin-vue_export-helper-0drS65lc.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
.output/public/assets/about-Bb0zVL0B.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{F as s}from"./FrameContent-Bpw0Mm1e.js";import{l as t,J as o,y as i}from"./@vue-COP35Tvs.js";import"./@vueuse-BsV7VRb2.js";import"./lodash-VDnThKtA.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./_plugin-vue_export-helper-0drS65lc.js";import"./pinia-DYvg5Pdn.js";import"./pinia-plugin-persistedstate-DyrI1rJI.js";import"./destr-ClW9AvhW.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./eventsource-parser-D0ssca5s.js";import"./tdesign-vue-next-CHJ-1YYh.js";import"./tdesign-icons-vue-next-CCrD-Br3.js";import"./lodash-es-RhymR7yg.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./vue-i18n-DTZjQIEs.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";const r=t({__name:"about",setup:t=>(t,r)=>(i(),o(s,{frameSrc:"http://www.openseed.top/about"}))});export{r as default};
|
.output/public/assets/avatar.vue_vue_type_script_setup_true_lang-CTTZTZu9.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{c as a,i as s,a as e,b as t,d as r,e as i,f as o,g as l,h as n,j as u,k as m,l as c}from"./@dicebear-JcnEMRoc.js";import{A as p,c as v}from"./tdesign-vue-next-CHJ-1YYh.js";import{Z as d}from"./tdesign-icons-vue-next-CCrD-Br3.js";import{v as g}from"./uuid-_R2nDvl_.js";import{l as f,a as h,w as b,v as j,y as x,R as _,aa as k,u as w}from"./@vue-COP35Tvs.js";const y={class:"h-[80px] w-[80px] relative"},E=f({__name:"avatar",props:{url:String},emits:["update"],setup(f,{emit:E}){const z={adventurer:c,avataaars:m,bigEars:u,bigSmile:n,bottts:l,funEmoji:o,icons:i,lorelei:r,micah:t,miniavs:e,personas:s},C=f,M=h(C.url),S=E,A=async()=>{const s=Object.keys(z),e=s[Math.floor(Math.random()*s.length)],t=a(z[e],{seed:g()});M.value=await t.toDataUri(),S("update",M.value)};return C.url||A(),b((()=>C.url),(a=>{C.url?M.value=a:A()})),(a,s)=>{const e=p,t=v;return x(),j("div",y,[_(e,{image:M.value,size:"80px"},null,8,["image"]),_(t,{shape:"circle",variant:"dashed",onClick:A,class:"absolute bottom-0 right-[-15px] z-50"},{default:k((()=>[_(w(d),{slot:"icon"})])),_:1})])}}});export{E as _};
|
.output/public/assets/bezier-easing-BncZ6jfA.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{g as r}from"./@babel-ynFNPEB3.js";var n,t;const u=r(function(){if(t)return n;t=1;var r=.1,u="function"==typeof Float32Array;function e(r,n){return 1-3*n+3*r}function o(r,n){return 3*n-6*r}function f(r){return 3*r}function i(r,n,t){return((e(n,t)*r+o(n,t))*r+f(n))*r}function a(r,n,t){return 3*e(n,t)*r*r+2*o(n,t)*r+f(n)}function c(r){return r}return n=function(n,t,e,o){if(!(0<=n&&n<=1&&0<=e&&e<=1))throw new Error("bezier x values must be in [0, 1] range");if(n===t&&e===o)return c;for(var f=u?new Float32Array(11):new Array(11),v=0;v<11;++v)f[v]=i(v*r,n,e);function s(t){for(var u=0,o=1;10!==o&&f[o]<=t;++o)u+=r;--o;var c=u+(t-f[o])/(f[o+1]-f[o])*r,v=a(c,n,e);return v>=.001?function(r,n,t,u){for(var e=0;e<4;++e){var o=a(n,t,u);if(0===o)return n;n-=(i(n,t,u)-r)/o}return n}(t,c,n,e):0===v?c:function(r,n,t,u,e){var o,f,a=0;do{(o=i(f=n+(t-n)/2,u,e)-r)>0?t=f:n=f}while(Math.abs(o)>1e-7&&++a<10);return f}(t,u,u+r,n,e)}return function(r){return 0===r?0:1===r?1:i(s(r),t,o)}}}());export{u as R};
|
.output/public/assets/changelog-CW3gz1f_.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{F as s}from"./FrameContent-Bpw0Mm1e.js";import{l as o,J as t,y as e}from"./@vue-COP35Tvs.js";import"./@vueuse-BsV7VRb2.js";import"./lodash-VDnThKtA.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./_plugin-vue_export-helper-0drS65lc.js";import"./pinia-DYvg5Pdn.js";import"./pinia-plugin-persistedstate-DyrI1rJI.js";import"./destr-ClW9AvhW.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./eventsource-parser-D0ssca5s.js";import"./tdesign-vue-next-CHJ-1YYh.js";import"./tdesign-icons-vue-next-CCrD-Br3.js";import"./lodash-es-RhymR7yg.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./vue-i18n-DTZjQIEs.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";const i=o({__name:"changelog",setup:o=>(o,i)=>(e(),t(s,{frameSrc:"http://www.openseed.top/changelog"}))});export{i as default};
|
.output/public/assets/chat-BqDYQNqZ.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{l as e,f as t,a,w as l,o,v as n,y as s,F as i,J as c,z as r,R as u,aa as d,u as v,A as p,H as m,ab as h,G as f,ac as g,ad as _,j as x,a0 as b,I as w,a1 as y,V as j,B as k,n as C}from"./@vue-COP35Tvs.js";import{c as z,d as M,m as A,t as I,_ as V,b as S,g as T,u as E,h as R,r as U,j as P,k as H,n as B,o as O,e as q}from"./_plugin-vue_export-helper-0drS65lc.js";import{u as N,a as $}from"./vue-router-DbZJX5bT.js";import{c as D,_ as W}from"./ChatInput.vue_vue_type_style_index_0_lang-CtKQjmWn.js";import{_ as L}from"./avatar.vue_vue_type_script_setup_true_lang-CTTZTZu9.js";import{u as F}from"./app-_ksMLlTy.js";import{p as K,q as J,r as G,T as X,c as Y,s as Z,t as Q,u as ee,O as te,A as ae,v as le,w as oe,n as ne,D as se,x as ie,f as ce,P as re,l as ue,y as de,E as ve,G as pe,m as me,J as he,d as fe,j as ge,K as _e}from"./tdesign-vue-next-CHJ-1YYh.js";import{V as xe,W as be,X as we,Y as ye,Z as je,$ as ke,a0 as Ce,a1 as ze,a2 as Me,a3 as Ae,_ as Ie,a4 as Ve,a5 as Se,a6 as Te,a7 as Ee,a8 as Re,E as Ue,n as Pe}from"./tdesign-icons-vue-next-CCrD-Br3.js";import{v as He}from"./uuid-_R2nDvl_.js";import{u as Be,a as Oe}from"./main-CIVI3Nwp.js";import{U as qe,A as Ne,_ as $e,a as De}from"./ToolBar.vue_vue_type_style_index_0_lang-DoYvgSjk.js";import{d as We}from"./vuedraggable-B95MGA-k.js";import{g as Le}from"./lyihub-zLFv36Ly.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./pinia-DYvg5Pdn.js";import"./pinia-plugin-persistedstate-DyrI1rJI.js";import"./destr-ClW9AvhW.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./lodash-VDnThKtA.js";import"./eventsource-parser-D0ssca5s.js";import"./@vueuse-BsV7VRb2.js";import"./vue-i18n-DTZjQIEs.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./mammoth-Cw8VHd7C.js";import"./xlsx-DB6BMndo.js";import"./pdfjs-dist-8WFUNQXM.js";import"./@dicebear-JcnEMRoc.js";import"./lodash-es-RhymR7yg.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./vue-DJZ4t1rv.js";import"./markdown-DcXY1cgb.js";import"./markdown-it-link-attributes-DRKqjf49.js";import"./markdown-it-C8SkdHr7.js";import"./mdurl-CDXpswLz.js";import"./uc.micro-CLkLCS2f.js";import"./entities-D7HTx9ov.js";import"./linkify-it-LcVOBuC5.js";import"./punycode.js-Bmr3cAX8.js";import"./@traptitech-xv_Vpjqh.js";import"./katex-Vs6-m9jZ.js";import"./markdown-it-highlightjs-DU5UZju5.js";import"./highlight.js-CmHaQWnk.js";import"./mermaid-r27wrvTx.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-z_KyBU9t.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-DQzyuV5c.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./@wdns-kgTb0OXQ.js";import"./ua-parser-js--QiuJfYt.js";const Fe={key:0,class:"flex flex-col items-center justify-center mb-[var(--td-comp-margin-xxl)] gap-3"},Ke={class:"text-lg font-bold"},Je={class:"overflow-y-auto overflow-x-hidden max-h-60 custom-scrollbar"},Ge={class:"flex"},Xe={class:"flex flex-row justify-between gap-3 w-full"},Ye=V(e({__name:"ConversationDrawer",setup(e){const x=z(),b=t({get:()=>x.showEditorDrawer,set(e){x.showEditorDrawer=e}}),w=()=>{x.showEditorDrawer=!1},y=D(),j=a(null),k=N(),C=()=>{const e=x.find(k.query.id);V.value=e.models.reduce(((e,t)=>(e[t.modelId]=t.showing,e)),{}),j.value={id:e.id,name:e.name,content:e.content,avatar:e.avatar,models:e.models.map((e=>e.modelId)),agentId:e.agentId,saveToAgent:!1,maxContextSize:e.maxContextSize,aspectRatio:e.aspectRatio}},V=a({});l((()=>{var e;return null==(e=j.value)?void 0:e.models}),(e=>{const t=Object.keys(V.value);t.forEach((t=>{e.includes(t)||delete V.value[t]})),e.forEach((e=>{t.includes(e)||(V.value[e]=!1)}))}));const S=t((()=>{if(!j.value)return!1;return Object.values(V.value).filter((e=>e)).length>=F}));l((()=>x.showEditorDrawer),(e=>{e&&C()})),M();const T=t((()=>A.availableModels.value.map((e=>({value:e.id,label:A.getModelItemTitle(e),...e}))))),E=Be(),R=t((()=>{let e=E.find(j.value.agentId);return e=e||E.defaultAgent,e})),U=e=>{j.value.avatar=e},P=()=>{const e=x.find(j.value.id);e.name=j.value.name,e.content=j.value.content,e.avatar=j.value.avatar,e.agentId=j.value.agentId,e.maxContextSize=j.value.maxContextSize,e.aspectRatio=j.value.aspectRatio;const t=[];e.models.forEach((e=>{j.value.models.includes(e.modelId)&&(e.showing=V.value[e.modelId],t.push(e))})),j.value.models.forEach((a=>{e.models.some((e=>e.modelId===a))||t.push({modelId:a,chats:[],startContext:0,apiAgentId:"",apiConversationId:"",apiNote:"",showing:V.value[a],status:{responseWating:!1,chating:!1,stop:!1}})})),e.models=t,j.value.saveToAgent&&(R.value.content=j.value.content),C(),ce.success(I("pages.conversation.save_conversation_success"))},H=a(!1),B=a(""),O=()=>{if(""===B.value.trim())return void ce.warning(I("pages.conversation.enter_agent_name"));const e=He();E.add({id:e,name:B.value,status:!0,content:j.value.content,avatar:j.value.avatar,onboarding:"",isDefault:!1});const t=x.find(j.value.id);j.value.agentId=e,t.agentId=e,H.value=!1,ce.success(I("pages.conversation.create_agent_success"))},q=()=>{j.value.content=R.value.content},$=()=>{j.value.saveToAgent=!j.value.saveToAgent};return o((()=>{x.showEditorDrawer=!1})),(e,t)=>{const a=G,l=J,o=Y,x=X,k=Z,C=Q,z=te,M=ee,E=oe,N=le,D=ae,W=ne,F=K,ce=se,re=ie;return s(),n(i,null,[j.value?(s(),c(ce,{key:0,visible:b.value,"onUpdate:visible":t[7]||(t[7]=e=>b.value=e),size:"408px",footer:!1,header:v(I)("pages.conversation.current_conversation"),"close-btn":!0,class:"",onCloseBtnClick:w},{default:d((()=>[u(F,{ref:"form",data:j.value,"label-width":100,"label-align":"top"},{default:d((()=>[v(y)?r("",!0):(s(),n("div",Fe,[u(L,{ref:"avatarRef",url:j.value.avatar,onUpdate:U},null,8,["url"]),p("h1",Ke,m(v(I)("pages.conversation.agent"))+": "+m(R.value.name),1)])),u(l,{label:v(I)("pages.conversation.conversation_name"),name:"name"},{default:d((()=>[u(a,{modelValue:j.value.name,"onUpdate:modelValue":t[0]||(t[0]=e=>j.value.name=e)},null,8,["modelValue"])])),_:1},8,["label"]),u(l,{label:v(I)("pages.conversation.conversation_description"),name:"content",class:"relative"},{default:d((()=>[u(x,{content:v(I)("pages.conversation.rollback_from_agent")},{default:d((()=>[u(o,{shape:"circle",variant:"text",class:"absolute z-50 right-0 top-[-32px]",onClick:q},{default:d((()=>[u(v(xe),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(k,{modelValue:j.value.content,"onUpdate:modelValue":t[1]||(t[1]=e=>j.value.content=e),autosize:{minRows:2,maxRows:5},name:"content"},null,8,["modelValue"])])),_:1},8,["label"]),u(l,{label:v(I)("pages.conversation.context_rounds"),name:"maxContextSize"},{default:d((()=>[u(C,{modelValue:j.value.maxContextSize,"onUpdate:modelValue":t[2]||(t[2]=e=>j.value.maxContextSize=e),inputNumberProps:"",showStep:"",min:0,max:30},null,8,["modelValue"])])),_:1},8,["label"]),u(l,{label:"图片宽高比",name:"aspectRatio"},{default:d((()=>[u(M,{modelValue:j.value.aspectRatio,"onUpdate:modelValue":t[3]||(t[3]=e=>j.value.aspectRatio=e)},{default:d((()=>[u(z,{value:"IMAGE_ASPECT_RATIO_SQUARE",label:"方形 (1:1)"}),u(z,{value:"IMAGE_ASPECT_RATIO_PORTRAIT",label:"竖屏 (9:16)"}),u(z,{value:"IMAGE_ASPECT_RATIO_LANDSCAPE",label:"横屏 (16:9)"}),u(z,{value:"IMAGE_ASPECT_RATIO_PORTRAIT_THREE_FOUR",label:"竖屏 (3:4)"}),u(z,{value:"IMAGE_ASPECT_RATIO_LANDSCAPE_FOUR_THREE",label:"横屏 (4:3)"})])),_:1},8,["modelValue"])])),_:1}),u(l,{label:v(I)("pages.conversation.model"),name:"models"},{default:d((()=>[u(M,{modelValue:j.value.models,"onUpdate:modelValue":t[5]||(t[5]=e=>j.value.models=e),multiple:"",filterable:!v(y)},{valueDisplay:d((({value:e,onClose:a})=>[p("div",Je,[(s(!0),n(i,null,h(e,((e,l)=>(s(),c(N,{key:l,closable:!0,"on-close":({e:e})=>{e.stopPropagation(),a(l)}},{default:d((()=>[u(E,{disabled:S.value&&!V.value[e.value],onClick:t[4]||(t[4]=_((()=>{}),["stop"])),class:"mr-1",size:"small",modelValue:V.value[e.value],"onUpdate:modelValue":t=>V.value[e.value]=t},null,8,["disabled","modelValue","onUpdate:modelValue"]),f(" "+m(e.label),1)])),_:2},1032,["on-close"])))),128))])])),default:d((()=>[(s(!0),n(i,null,h(T.value,(e=>(s(),c(z,{key:e.value,value:e.value,label:e.label},{default:d((()=>[p("div",Ge,[u(D,{size:"20px",class:"mr-1"},{icon:d((()=>[(s(),c(g(v(A).icons[e.type])))])),_:2},1024),f(" "+m(e.label),1)])])),_:2},1032,["value","label"])))),128))])),_:1},8,["modelValue","filterable"])])),_:1},8,["label"]),u(l,null,{default:d((()=>[p("div",Xe,[R.value.isDefault?r("",!0):(s(),c(W,{key:0,onChange:$},{default:d((()=>[f(m(v(I)("pages.conversation.save_to_agent")),1)])),_:1})),u(o,{theme:"primary",type:"submit",onClick:P,class:"flex-1"},{default:d((()=>[f(m(v(I)("pages.conversation.save_conversation")),1)])),_:1})])])),_:1}),u(l,null,{default:d((()=>[u(o,{theme:"primary",type:"submit",onClick:t[6]||(t[6]=e=>H.value=!0),class:"w-full"},{default:d((()=>[f(m(v(I)("pages.conversation.save_as_new_agent")),1)])),_:1})])),_:1})])),_:1},8,["data"])])),_:1},8,["visible","header"])):r("",!0),u(re,{visible:H.value,"onUpdate:visible":t[9]||(t[9]=e=>H.value=e),header:v(I)("pages.conversation.create_new_agent"),"on-confirm":O},{default:d((()=>[u(F,{ref:"form","label-width":100},{default:d((()=>[u(l,{label:v(I)("pages.conversation.agent_name"),name:"name"},{default:d((()=>[u(a,{modelValue:B.value,"onUpdate:modelValue":t[8]||(t[8]=e=>B.value=e)},null,8,["modelValue"])])),_:1},8,["label"])])),_:1},512)])),_:1},8,["visible","header"])],64)}}}),[["__scopeId","data-v-9dfbddf7"]]),Ze={class:"h-full flex flex-col chat-model-container relative"},Qe={class:"cursor-pointer handle p-2 bg-color-container rounded-t-lg shadow-2xl chat-model-header z-20"},et={class:"flex flex-wrap justify-between w-full overflow-x-hidden"},tt={class:"flex gap-1"},at={class:"max-w-[120px]"},lt={class:"model-info flex flex-col gap-2"},ot={class:"max-h-44 overflow-auto no-scrollbar"},nt={class:"flex gap-1 flex-wrap"},st={key:0,class:"flex w-full justify-end items-start flex-row-reverse gap-2 chat-item"},it=["data-index"],ct={class:"flex justify-between overflow-hidden h-[24px]"},rt={class:"flex chat-item-tools gap-2"},ut={class:"user-chat-content p-2 rounded-lg"},dt={class:"w-[24px] h-[24px]"},vt={key:1,class:"flex w-full flex-col gap-2 chat-item"},pt={class:"flex justify-start align-middle items-center gap-2 h-[24px]"},mt={class:"flex flex-row justify-between gap-5"},ht={class:"flex flex-col w-full"},ft=["data-index"],gt={key:0,class:"loader"},_t={key:2,class:"flex gap-5 overflow-x-auto scrollbar p-1"},xt=["onClick"],bt={class:"flex flex-row w-full"},wt={class:"w-12 h-2"},yt=["src"],jt={class:"w-44"},kt={class:"w-full text-ellipsis overflow-hidden text-nowrap"},Ct={class:"text-ellipsis overflow-hidden whitespace-nowrap"},zt={class:"max-h-10 overflow-hidden mt-2"},Mt={class:"h-[24px] mt-1 chat-item-tools"},At={class:"flex justify-end gap-2"},It={key:3,class:"flex justify-center w-full"},Vt={class:"fixed-scroll-buttons"},St=e({__name:"ChatColumn",props:{chatModel:{type:Object},conversation:{type:Object},fullScreenModelId:{type:String,default:""},isSingleModel:{type:Boolean,default:!1}},emits:["stop-chat","extend-model-visible","re-chat","change-size","api-setting-visible","fav-note-visible","clear-chat-context","clear-chat-history","update-scroll-flag"],setup(e,{emit:l}){const j=D(),k=S();N();const C=e,z=a(null);Oe(),M();const V=t((()=>C.chatModel.chat.chats));const E=l,R=e=>{E("re-chat",e.model.id)},U=a(-1),P=e=>{U.value=e},H=e=>{V.value[U.value].content.text=e,U.value=-1},B=()=>{U.value=-1},O=t((()=>A.getModelItemTitle(C.chatModel.model))),q=e=>{navigator.clipboard.writeText(e.content.text),ce.success(I("pages.note.noteCopySuccess"))},$=t((()=>{let e="",t="";if(C.chatModel.model.apiBase.startsWith("http"))e=C.chatModel.model.apiBase,t=C.chatModel.model.apiKey;else{let l=T(C.chatModel.model.apiBase||A.dict[C.chatModel.model.type].apiBase,"openai"==C.chatModel.model.type);l=l.replace("/app/","/api/"),l.includes("?")?l+="&":l+="?",l+=`model=${C.chatModel.model.id}`,l+="&",l+=`conversation=${C.conversation.id}`;const o=l.indexOf("?");e=l.substring(0,o)+"/v1/chat/completions",t="oa_"+(a=l.substring(o+1),btoa(a).split("").map((e=>{const t=e.charCodeAt(0);return String.fromCharCode(t+1)})).join(""))}var a;return{apiBase:e,apiKey:t}})),W=t((()=>C.chatModel.model.apiBase.startsWith("http")?"ApiBase":"LocalApi")),L=t((()=>C.chatModel.model.apiBase.startsWith("http")?"ApiKey":"LocalKey")),F=a(!1),K=a("");x((()=>{if(!V.value||0===V.value.length)return;const e=V.value[V.value.length-1];"assistant"===e.role&&(K.value=e.content.text)}));const G=()=>{F.value=!1};async function Z(){await window.ipcRenderer.invoke("refresh-vercel-view")?ce.success("Refresh succeed"):ce.error("Refresh failed")}async function ee(){await window.ipcRenderer.invoke("refresh-coze-com-view")?ce.success("Refresh succeed"):ce.error("Refresh failed")}async function te(){await window.ipcRenderer.invoke("refresh-coze-cn-view")?ce.success("Refresh succeed"):ce.error("Refresh failed")}async function oe(){const e=A.dict["chatgpt.com"],t=await window.ipcRenderer.invoke("login-get-token",{url:e.tokenUrl,userAgent:"",script:"",show:!1,autoClose:!0});e.playground.apiKey=t.token,ce.success("Refresh succeed")}async function ne(){const e=A.dict.magai,t=await window.ipcRenderer.invoke("login-get-token",{url:e.tokenUrl,userAgent:"",script:"",show:!1,autoClose:!0});e.playground.apiKey=t.token,ce.success("Refresh succeed")}const se=a(!1),ie=a(!1),me=a(!1),he=a(!1),fe=()=>{if(!z.value)return;const e=z.value.querySelector(".chat-container-content"),t=e.scrollTop,a=e.scrollHeight,l=e.clientHeight;se.value=t>200,ie.value=a-t-l>200,me.value=se.value||ie.value},ge=()=>{const e=z.value.querySelector(".chat-container-content"),t=e.getAttribute("data-chat-id");t&&E("update-scroll-flag",t,!1),e.scrollTo({top:0,behavior:"smooth"}),setTimeout((()=>{e.scrollTo({top:0,behavior:"instant"})}),500)},_e=()=>{const e=z.value.querySelector(".chat-container-content"),t=e.getAttribute("data-chat-id");t&&E("update-scroll-flag",t,!0),e.scrollTo({top:e.scrollHeight,behavior:"smooth"}),setTimeout((()=>{e.scrollTo({top:e.scrollHeight,behavior:"instant"})}),500)},xe=e=>{he.value=e};return o((()=>{z.value.querySelector(".chat-container-content").addEventListener("scroll",fe)})),(t,a)=>{const l=ae,o=Q,x=J,C=Y,M=ue,S=re,T=X,N=le,D=ve,ce=pe,fe=de;return s(),n("div",Ze,[p("div",Qe,[p("div",et,[p("div",tt,[u(l,{size:"20px"},{icon:d((()=>[(s(),c(g(v(A).icons[e.chatModel.model.type])))])),_:1}),p("div",at,[u(S,{placement:"bottom","cancel-btn":null,"confirm-btn":null},{content:d((()=>[p("div",lt,[a[21]||(a[21]=p("p",null,"Model Info",-1)),p("p",null,[p("span",null,m(t.$t("pages.setting.model.model_name")),1),f(m(e.chatModel.model.name),1)]),p("p",null,[p("span",null,m(t.$t("pages.setting.model.model_interface")),1),f(m(e.chatModel.model.type),1)]),p("p",null,[p("span",null,m(t.$t("pages.setting.model.model_address")),1),f(m(e.chatModel.model.apiBase),1)]),u(x,{label:v(I)("pages.conversation.temperature"),name:"temperature",labelAlign:"left",labelWidth:"64px"},{default:d((()=>[u(o,{modelValue:e.chatModel.model.temperature,"onUpdate:modelValue":a[0]||(a[0]=t=>e.chatModel.model.temperature=t),inputNumberProps:"",showStep:"",min:0,max:1,step:.1},null,8,["modelValue"])])),_:1},8,["label"]),u(x,{label:v(I)("pages.conversation.maxTokens"),name:"maxTokens",labelAlign:"left",labelWidth:"64px"},{default:d((()=>[u(o,{modelValue:e.chatModel.model.maxTokens,"onUpdate:modelValue":a[1]||(a[1]=t=>e.chatModel.model.maxTokens=t),inputNumberProps:"",showStep:"",min:1024,max:61440,step:1024},null,8,["modelValue"])])),_:1},8,["label"]),u(x,{label:v(I)("pages.conversation.topP"),name:"topP",labelAlign:"left",labelWidth:"64px"},{default:d((()=>[u(o,{modelValue:e.chatModel.model.topP,"onUpdate:modelValue":a[2]||(a[2]=t=>e.chatModel.model.topP=t),inputNumberProps:"",showStep:"",min:0,max:1,step:.1},null,8,["modelValue"])])),_:1},8,["label"]),p("p",null,[p("span",null,m(W.value),1),f(m($.value.apiBase),1)]),p("p",ot,[p("span",null,m(L.value),1),f(m($.value.apiKey),1)]),p("p",null,[a[15]||(a[15]=p("span",null,"Model ",-1)),f(m(e.chatModel.model.apiModel),1)]),"vercel"===e.chatModel.model.type?(s(),c(C,{key:0,theme:"primary",onClick:Z},{default:d((()=>a[16]||(a[16]=[f("refresh vercel.ai ")]))),_:1})):r("",!0),"coze.com"===e.chatModel.model.type?(s(),c(C,{key:1,theme:"primary",onClick:ee},{default:d((()=>a[17]||(a[17]=[f("refresh coze.com ")]))),_:1})):r("",!0),"coze.cn"===e.chatModel.model.type?(s(),c(C,{key:2,theme:"primary",onClick:te},{default:d((()=>a[18]||(a[18]=[f("refresh coze.cn ")]))),_:1})):r("",!0),"chatgpt.com"===e.chatModel.model.type?(s(),c(C,{key:3,theme:"primary",onClick:oe},{default:d((()=>a[19]||(a[19]=[f("refresh chatgpt.com ")]))),_:1})):r("",!0),"magai"===e.chatModel.model.type?(s(),c(C,{key:4,theme:"primary",onClick:ne},{default:d((()=>a[20]||(a[20]=[f("refresh magai.co ")]))),_:1})):r("",!0)])])),default:d((()=>[u(M,{theme:"primary",title:O.value,class:"block w-full whitespace-nowrap text-ellipsis overflow-hidden"},{default:d((()=>[f(m(O.value),1)])),_:1},8,["title"])])),_:1})])]),p("div",nt,[u(T,{content:v(I)("pages.conversation.maximize_minimize")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[3]||(a[3]=_((t=>{return a=e.chatModel,void E("change-size",a.model.id);var a}),["stop"]))},{default:d((()=>[e.chatModel.chat.modelId==e.fullScreenModelId?(s(),c(v(be),{key:0,slot:"icon"})):(s(),c(v(we),{key:1,slot:"icon"}))])),_:1})])),_:1},8,["content"]),u(T,{content:v(I)("pages.conversation.stop_answering")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[4]||(a[4]=_((t=>{return a=e.chatModel,void E("stop-chat",a.model.id);var a}),["stop"]))},{default:d((()=>[u(v(ye),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(T,{content:v(I)("pages.conversation.regenerate_last_conversation")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[5]||(a[5]=_((t=>R(e.chatModel)),["stop"]))},{default:d((()=>[u(v(je),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(S,{theme:"danger",content:v(I)("pages.conversation.confirm_delete_chat_history"),placement:"top",onConfirm:a[6]||(a[6]=t=>{return a=e.chatModel,void E("clear-chat-history",a.model.id);var a})},{default:d((()=>[u(T,{content:v(I)("pages.conversation.delete_chat_history")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline"},{default:d((()=>[u(v(ke),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:1},8,["content"]),u(S,{theme:"warning",content:v(I)("pages.conversation.confirm_clear_context"),placement:"top",onConfirm:a[7]||(a[7]=t=>{return a=e.chatModel,void E("clear-chat-context",a.model.id);var a})},{default:d((()=>[u(T,{content:v(I)("pages.conversation.clear_context")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline"},{default:d((()=>[u(v(Ce),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:1},8,["content"]),u(T,{content:v(I)("pages.conversation.inherit_other_model_conversation")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[8]||(a[8]=_((t=>{return a=e.chatModel,void E("extend-model-visible",a.model.id);var a}),["stop"]))},{default:d((()=>[u(v(ze),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(T,{content:v(I)("pages.conversation.api_conversation_settings")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[9]||(a[9]=_((t=>{return a=e.chatModel,void E("api-setting-visible",a.model.id);var a}),["stop"]))},{default:d((()=>[u(v(Me),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(T,{content:v(I)("pages.conversation.toggle_artifacts")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[10]||(a[10]=_((e=>{F.value=!F.value}),["stop"]))},{default:d((()=>[u(v(Ae),{slot:"icon"})])),_:1})])),_:1},8,["content"])])])]),p("div",{class:"flex flex-1 overflow-hidden bg-color-container rounded-b-lg shadow-md w-full",onMouseenter:a[13]||(a[13]=e=>xe(!0)),onMouseleave:a[14]||(a[14]=e=>xe(!1))},[p("div",{class:"flex-1 relative h-full overflow-hidden",ref_key:"scrollable_chat",ref:z},[u(fe,{"data-chat-id":e.chatModel.model.id,class:w(["flex flex-col h-full overflow-y-auto chat-container-content scrollable-chat relative",{chating:e.chatModel.chat.status.chating}]),scroll:{type:"virtual",bufferSize:20}},{default:d((()=>[(s(!0),n(i,null,h(V.value,((t,o)=>(s(),c(ce,{key:`${e.chatModel.model.id}-${o}`,class:"w-full"},{default:d((()=>["user"===t.role?(s(),n("div",st,[p("div",{class:"flex flex-col gap-2 w-[calc(100%-24px-1rem)]","data-index":`${o}`},[p("div",ct,[f(m(v(k).name)+" ",1),p("div",rt,[u(S,{theme:"danger",content:v(I)("pages.conversation.dialog_confirm_delete_record"),placement:"bottom",onConfirm:e=>(e=>{const t=V.value.findIndex((t=>t===e));-1!==t&&(V.value.splice(t,1),t<V.value.length&&"assistant"===V.value[t].role&&V.value.splice(t,1))})(t)},{default:d((()=>[u(T,{content:v(I)("pages.conversation.button_tooltip_delete"),placement:"bottom"},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline"},{default:d((()=>[u(v(Ie),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:2},1032,["content","onConfirm"]),u(T,{content:v(I)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:e=>P(o)},{default:d((()=>[u(v(Ve),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),u(T,{content:v(I)("pages.conversation.button_tooltip_copy")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:e=>q(t)},{default:d((()=>[u(v(Se),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),u(T,{content:v(I)("pages.conversation.button_tooltip_favourite"),placement:"bottom"},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a=>{return l=e.chatModel,void E("fav-note-visible",l,t);var l}},{default:d((()=>[u(v(Te),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),o===e.chatModel.chat.chats.length-2?(s(),c(T,{key:0,content:v(I)("pages.conversation.button_tooltip_refresh")},{default:d((()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[11]||(a[11]=t=>R(e.chatModel))},{default:d((()=>[u(v(je),{slot:"icon"})])),_:1})])),_:1},8,["content"])):r("",!0)])]),p("div",ut,[u(qe,{content:t.content,isEditing:U.value===o,onSave:H,onCancel:B},null,8,["content","isEditing"])])],8,it),p("div",dt,[u(l,{size:"24px",image:v(k).avatar},null,8,["image"])])])):"assistant"===t.role?(s(),n("div",vt,[p("div",pt,[u(l,{size:"24px",image:e.conversation.avatar},null,8,["image"]),p("div",mt,m(e.conversation.name),1)]),p("div",ht,[p("div",{"data-index":`${o}`},[e.chatModel.chat.status.responseWating&&o===e.chatModel.chat.chats.length-1?(s(),n("span",gt)):(s(),c(Ne,{key:1,content:t.content,isEditing:U.value===o,onSave:H,onCancel:B},null,8,["content","isEditing"])),t.content.webs&&t.content.webs.length>0?(s(),n("div",_t,[(s(!0),n(i,null,h(t.content.webs,(e=>(s(),n("div",{class:"bg-color-page p-2 w-60 cursor-pointer",onClick:t=>{return a=e.url,void(window.ipcRenderer?window.ipcRenderer.send("open-url",a):window.open(a));var a}},[p("div",bt,[p("div",wt,[p("img",{src:e.icon,alt:""},null,8,yt)]),p("div",jt,[p("div",kt,m(e.title),1),p("div",Ct,m(e.url),1)])]),p("div",zt,m(e.excerpt),1)],8,xt)))),256))])):r("",!0)],8,ft),p("div",Mt,[p("div",At,[t.model?(s(),c(N,{key:0,class:"max-w-60 model-tag"},{default:d((()=>[f(m(t.model),1)])),_:2},1024)):r("",!0),u(T,{content:v(I)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:d((()=>[u(C,{size:"small",variant:"outline",onClick:e=>P(o)},{default:d((()=>[u(v(Ve),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),u(T,{content:v(I)("pages.conversation.button_tooltip_copy")},{default:d((()=>[u(C,{size:"small",variant:"outline",onClick:e=>q(t)},{default:d((()=>[u(v(Se),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),u(T,{content:v(I)("pages.conversation.toggle_artifacts")},{default:d((()=>[u(C,{size:"small",variant:"outline",onClick:e=>{var a;"assistant"===(a=t).role&&(K.value=a.content.text,F.value=!0)}},{default:d((()=>[u(v(Ae),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),o===e.chatModel.chat.chats.length-1?(s(),c(T,{key:1,content:v(I)("pages.conversation.button_tooltip_refresh")},{default:d((()=>[u(C,{size:"small",variant:"outline",onClick:a[12]||(a[12]=t=>R(e.chatModel))},{default:d((()=>[u(v(je),{slot:"icon"})])),_:1})])),_:1},8,["content"])):r("",!0)])])])])):"verbose"===t.role?(s(),c(D,{key:2},{default:d((()=>[f(m(t.content.text),1)])),_:2},1024)):(s(),n("div",It,m(t.role)+" - "+m(t.content.text),1))])),_:2},1024)))),128))])),_:1},8,["data-chat-id","class"]),a[22]||(a[22]=p("div",{class:"absolute z-50 bottom-0 w-full h-20 rounded-b-lg chat-model-footer pointer-events-none"},null,-1))],512),F.value?(s(),n("div",{key:0,class:w([e.chatModel.chat.modelId!==e.fullScreenModelId&&!e.isSingleModel||v(j)?"w-full":"w-1/2","pr-4"])},[u($e,{content:K.value,closeBtn:G},null,8,["content"])],2)):r("",!0),b(p("div",Vt,[b(u(C,{class:"scroll-top-btn",shape:"circle",onClick:ge},{icon:d((()=>[u(v(Ee))])),_:1},512),[[y,se.value]]),b(u(C,{class:"scroll-bottom-btn",shape:"circle",onClick:_e},{icon:d((()=>[u(v(Ee),{style:{transform:"rotateX(180deg)"}})])),_:1},512),[[y,ie.value]])],512),[[y,me.value&&he.value]])],32)])}}}),Tt={class:"w-full flex gap-2 absolute bottom-0 z-50"},Et={class:"rounded-lg px-1 bg-color-container bordered flex items-center align-middle"},Rt={class:"flex flex-col justify-center items-center w-full"},Ut={class:"flex flex-col gap-5 w-full overflow-hidden"},Pt={class:"max-h-96 scrollbar overflow-y-auto overflow-x-hidden bordered p-2 shadow-sm"},Ht=e({name:"ListConversation",setup(e){const o=S(),r=E(),V=Oe(),T=z(),L=N();$();const F=a(null),Z=a(null);let Q=!1;const ee=a([]),te=M(),le=D(),oe=a(!1),ne=async e=>{if(e.content)if(Q)ce.warning("等待上个问题回答完成");else try{ee.value.forEach((t=>{if(""!==Xe.value&&Xe.value!==t.model.id)return;const a=B(e.content);e.files.forEach((e=>{e.type.startsWith("image")?a.images.push({...e,model:""}):a.files.push(e)})),t.chat.chats.push({role:"user",content:a,id:"",liked:!1,model:""}),t.chat.chats.push({role:"assistant",content:B(""),id:"",liked:!1,model:""})})),R.setPause(!0);const t=ee.value.map(((e,t)=>{if((""===Xe.value||Xe.value===e.model.id)&&!0!==e.chat.status.chating)return e.chat.status.chating=!0,e.chat.status.stop=!1,e.chat.status.responseWating=!0,e})).filter((e=>e));if(0===t.length)return;await mt(0),pt();let a="";if(Z.value.internet){const l=await P(e.content);t.map((e=>{e.chat.chats[e.chat.chats.length-1].content.webs=l.map((e=>({title:e.title,icon:e.icon,excerpt:e.excerpt,url:e.url})))})),l.length>0&&(a=JSON.stringify(l.map((e=>({content:e.content,url:e.url})))))}const l=t.map(((e,t)=>new Promise(((l,o)=>{setTimeout((()=>{const t=H(Z.value,e,a);l(t)}),100*t)}))));await Promise.all(l)}finally{Q=!1,R.setPause(!1),T.$persist()}else ce.error(I("pages.conversation.question_cannot_be_empty"))},se=async()=>{try{if(""!==Xe.value)return void ue(Xe.value);if(Q)return void ce.warning("等待上个问题回答完成");R.setPause(!0);const e=ee.value.map(((e,t)=>{if(0===e.chat.chats.length)return;if(!0===e.chat.status.chating)return;const a=e.chat.chats[e.chat.chats.length-1];if("assistant"==a.role)return U(a.content),a.model="",e.chat.status.chating=!0,e.chat.status.stop=!1,e.chat.status.responseWating=!0,e;ce.error(I("pages.conversation.please_start_question_again"))})).filter((e=>e));if(0===e.length)return;await mt(0),pt();let t="";if(Z.value.internet){const a=e.find((e=>e.chat.chats.length>0));if(a){const l=a.chat.chats,o=l[l.length-2];if(o){const a=await P(o.content.text);e.map((e=>{e.chat.chats[e.chat.chats.length-1].content.webs=a.map((e=>({title:e.title,icon:e.icon,excerpt:e.excerpt,url:e.url})))})),a.length>0&&(t=JSON.stringify(a.map((e=>({content:e.content,url:e.url})))))}}}const a=e.map(((e,a)=>new Promise(((l,o)=>{setTimeout((()=>{const a=H(Z.value,e,t);l(a)}),100*a)}))));await Promise.all(a)}finally{Q=!1,R.setPause(!1),T.$persist()}},ue=async e=>{try{const t=ee.value.find((t=>t.model.id===e));if(0===t.chat.chats.length)return;R.setPause(!0);const a=t.chat.chats[t.chat.chats.length-1];if("assistant"!=a.role)return void ce.error(I("pages.conversation.please_start_question_again"));if(!0===t.chat.status.chating)return;U(a.content),a.model="",t.chat.status.chating=!0,t.chat.status.stop=!1,t.chat.status.responseWating=!0;let l="";if(pt(),Z.value.internet){const e=await P(t.chat.chats[t.chat.chats.length-2].content.text);a.content.webs=e.map((e=>({title:e.title,icon:e.icon,excerpt:e.excerpt,url:e.url}))),e.length>0&&(l=JSON.stringify(e.map((e=>({content:e.content,url:e.url})))))}await H(Z.value,t,l)}finally{Q=!1,R.setPause(!1),T.$persist()}},de=async()=>{""===Xe.value?(ee.value.forEach((e=>{e.chat.chats.push({role:"verbose",content:B(I("pages.conversation.context_cleared")),id:"",liked:!1,model:""}),e.chat.startContext=e.chat.chats.length})),ce.success(I("pages.conversation.context_cleared_success")),await mt(0)):Me(Xe.value)},ve=()=>{T.showEditorDrawer=!0},pe=e=>{const t=ee.value.find((t=>t.chat.modelId===e));t.chat.status.stop=!0,t.chat.status.responseWating=!1,t.chat.status.chating=!1},xe=()=>{""===Xe.value?ee.value.forEach((e=>{e.chat.status.stop=!0,e.chat.status.responseWating=!1,e.chat.status.chating=!1})):pe(Xe.value)},be=()=>{Z.value.internet=!Z.value.internet},we=()=>{""===Xe.value?ee.value.forEach((e=>{e.chat.chats=[],e.chat.startContext=0})):Ae(Xe.value)},Me=e=>{const t=ee.value.find((t=>t.chat.modelId===e)).chat;t.chats.push({role:"verbose",content:B(I("pages.conversation.context_cleared")),id:"",liked:!1,model:""}),t.startContext=t.chats.length,ce.success(I("pages.conversation.context_cleared_success")),C((()=>{const t=document.querySelector(`[data-chat-id="${e}"]`);t&&t.scrollTo({top:t.scrollHeight,behavior:"smooth"})}))},Ae=e=>{const t=ee.value.find((t=>t.chat.modelId===e)).chat;t.chats=[],t.startContext=0},Ie=a(!1),Ve=a(""),Se=a(""),Te=e=>{Ie.value=!0,Se.value="",Ve.value=e},Ee=async()=>{if(!Se.value)return void(Ie.value=!1);const e=Z.value.models.find((e=>e.modelId===Se.value));if(Ve.value){const t=Z.value.models.find((e=>e.modelId===Ve.value));t.chats=JSON.parse(JSON.stringify(e.chats)),t.startContext=0}else Z.value.models.forEach((t=>{t.modelId!=Se.value&&(t.chats=JSON.parse(JSON.stringify(e.chats)),t.startContext=0)}));Ie.value=!1,await mt(0)},Be=a(!1),qe=a(""),Ne=a(""),$e=a("");let Fe="";const Ke=e=>{Be.value=!0,Fe=e;const t=Z.value.models.find((e=>e.modelId===Fe));Ne.value=t.apiConversationId,qe.value=t.apiAgentId,$e.value=t.apiNote},Je=()=>{var e,t,a;const l=Z.value.models.find((e=>e.modelId===Fe));l.apiConversationId=null==(e=Ne.value)?void 0:e.trim(),l.apiAgentId=null==(t=qe.value)?void 0:t.trim(),l.apiNote=null==(a=$e.value)?void 0:a.trim(),Be.value=!1};async function Ge(){const e=ee.value.find((e=>e.chat.modelId===Fe));if("lyihub"===e.model.type){const t=await Le(e.model.apiKey);Ne.value=t.id}else Ne.value=He()}const Xe=a(""),Ze=e=>{1!==ee.value.length&&(""===Xe.value?Xe.value=e:Xe.value="")},Qe=a(!1),et=a(""),tt=V.list;let at=null,lt=null;const ot=async(e,t)=>{Qe.value=!0,et.value="",at=e,lt=t},nt=async()=>{const e=at.chat.chats,t=e.findIndex((e=>e===lt)),a=e[t].content.text;let l="";const n=t+1;n<e.length&&"assistant"===e[n].role&&(l=e[n].content.text);const s={id:He(),title:a,time:(new Date).getTime(),conversationId:Z.value.id,conversationName:Z.value.name,conversationAvatar:Z.value.avatar,chats:[{...e[t],content:{...e[t].content}},{...e[n],content:{...e[n].content}}],notes:[]};if(V.add(s),ce.success(I("pages.conversation.favorite_success")),o.assistModel){const e=I("pages.conversation.extract_core_conversation",{question:a,answer:l});await O(e,(e=>{s.title=e,s.title=s.title.replaceAll("###",""),s.title=s.title.trim(),V.update(s)}))}Qe.value=!1},st=async()=>{if(!et.value)return void ce.warning("需要先选中笔记");const e=tt.find((e=>e.id==et.value)),t=at.chat.chats,a=t.findIndex((e=>e===lt)),l=a+1;e.chats.push({...t[a],content:{...t[a].content}}),e.chats.push({...t[l],content:{...t[l].content}}),V.update(e),ce.success(I("pages.conversation.favorite_success")),Qe.value=!1},it=t((()=>E().isSidebarCompact)),ct=t((()=>""!==Xe.value||1===ee.value.length||it.value?12:2===ee.value.length?6:3===ee.value.length?4:4===ee.value.length?3:5===ee.value.length||6===ee.value.length?4:7===ee.value.length||8===ee.value.length?3:12)),rt=t((()=>""!==Xe.value||1===ee.value.length||it.value||2===ee.value.length||3===ee.value.length||4===ee.value.length?"h-[calc(100%-10px)]":5===ee.value.length||6===ee.value.length||7===ee.value.length||8===ee.value.length?"h-[calc(50%-10px)]":"h-[calc(100%-10px)]")),ut=t((()=>{let e="h-[calc(100vh-56px-2*var(--td-comp-paddingTB-m))]";return r.showLayoutHeader&&r.showFooter&&(e="h-[calc(100vh-56px-var(--td-comp-size-xxl)-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]"),r.showLayoutHeader&&!r.showFooter&&(e="h-[calc(100vh-56px-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]"),!r.showLayoutHeader&&r.showFooter&&(e="h-[calc(100vh-56px-var(--td-comp-size-xxl)-2*var(--td-comp-paddingTB-m))]"),[e,{"chat-container-collapsed":it.value&&ee.value.length>1&&!Xe.value}]})),dt=()=>{const e=ee.value.map((e=>e.chat)),t=new Set(e),a=Z.value.models.filter((e=>!t.has(e)));Z.value.models=[...e,...a]},vt=new Map,pt=async()=>{if(!F.value)return;Q=!0,await C();const e=F.value.querySelectorAll(".chating");e.forEach((e=>{const t=e.getAttribute("data-chat-id");if(t&&!vt.has(t)){vt.set(t,!0);const a=()=>{const a=e.scrollHeight-e.scrollTop-e.clientHeight;a>100?vt.set(t,!1):a<100&&vt.set(t,!0),e.setAttribute("data-last-scroll-time",Date.now().toString())};e._scrollHandler=a,e.addEventListener("scroll",a)}}));const t=()=>{Q&&(e.forEach((e=>{const t=e.getAttribute("data-chat-id");if(t&&vt.get(t))try{if(e.scrollHeight-e.scrollTop-e.clientHeight>10){const t=parseInt(e.getAttribute("data-last-scroll-time")||"0");Date.now()-t>500&&(null==e||e.scrollTo({top:e.scrollHeight,behavior:"instant"}))}}catch(a){}})),Q&&requestAnimationFrame((()=>{setTimeout(t,200)})))};t()};async function mt(e){await new Promise((t=>setTimeout(t,e))),F.value&&requestAnimationFrame((()=>{F.value.querySelectorAll(".scrollable-chat").forEach((e=>{if(e)try{e.scrollTo({top:e.scrollHeight,behavior:"instant"})}catch(t){}}))}))}j((()=>{ht()}));const ht=()=>{(()=>{if(!F.value)return;F.value.querySelectorAll("[data-chat-id]").forEach((e=>{const t=e.getAttribute("data-chat-id");if(t){const a=e.onscroll;a&&e.removeEventListener("scroll",a),vt.delete(t)}}))})(),vt.clear()};x((()=>{Z.value&&(ht(),ft())}));const ft=()=>{ee.value=Z.value.models.map((e=>{const t=te.find(e.modelId);if(t&&e.showing)return{model:t,chat:e,id:e.modelId}})).filter(Boolean)};l((()=>L.query.id),(async e=>{if("/conversation/chat"!==L.path)return Z.value=null,void ht();let t=e;Z.value,requestAnimationFrame((async()=>{Z.value=T.find(t),Xe.value="",setTimeout((()=>{var e;ft();!L.query.isNew||!(null==(e=q.data)?void 0:e.content)||0===Z.value.models.length||Z.value.models[0].chats.length>0?mt(1e3):ne(q.data)}),50)}))}),{immediate:!0});const gt=t((()=>Z.value&&Z.value.internet?{color:"green"}:{})),_t=a(null),xt=()=>{var e;null==(e=_t.value)||e.showToolbox()},bt=()=>{var e;null==(e=_t.value)||e.hideToolbox()},wt=(e,t)=>{if(vt.set(e,t),F.value){const a=F.value.querySelector(`[data-chat-id="${e}"]`);if(a&&!t){const t=a._scrollHandler;t&&(a.removeEventListener("scroll",t),a._scrollHandler=null);const l=()=>{a.removeEventListener("scroll",l),setTimeout((()=>{const t=()=>{const t=a.scrollHeight-a.scrollTop-a.clientHeight;t>100?vt.set(e,!1):t<100&&vt.set(e,!0)};a._scrollHandler=t,a.addEventListener("scroll",t)}),1e3)};a.addEventListener("scroll",l)}}};return(e,t)=>{const a=me,l=Y,o=X,r=re,x=he,j=ae,C=_e,z=ge,M=fe,V=ie,S=G,T=J,E=K;return b((s(),n("div",{class:"flex flex-col items-center h-full relative",onMousedown:bt},[p("div",{class:w(["w-full",ut.value]),ref_key:"chatContainer",ref:F,onMouseup:xt},[u(De,{ref_key:"toolbar",ref:_t,parent:F.value},null,8,["parent"]),u(v(We),{tag:"t-row",modelValue:ee.value,"onUpdate:modelValue":t[0]||(t[0]=e=>ee.value=e),handle:".handle","component-data":{align:"top",gutter:10},onEnd:dt,"item-key":"id",class:"h-full"},{item:d((({element:e})=>[(s(),c(a,{span:ct.value,key:`${Z.value.id}-${e.model.id}`,class:w([rt.value,{hidden:""!==Xe.value&&Xe.value!==e.model.id}])},{default:d((()=>[u(St,{"chat-model":e,conversation:Z.value,"data-index":`${e.model.id}`,"full-screen-model-id":Xe.value,"is-single-model":1===ee.value.length,onStopChat:pe,onExtendModelVisible:Te,onReChat:ue,onChangeSize:Ze,onApiSettingVisible:Ke,onFavNoteVisible:ot,onClearChatContext:Me,onClearChatHistory:Ae,onUpdateScrollFlag:wt},null,8,["chat-model","conversation","data-index","full-screen-model-id","is-single-model"])])),_:2},1032,["span","class"]))])),_:1},8,["modelValue"])],34),p("div",Tt,[u(W,{class:"flex-1",onInput:ne}),p("div",Et,[v(le)?(s(),c(x,{key:1,delay:0,modelValue:oe.value,"onUpdate:modelValue":t[7]||(t[7]=e=>oe.value=e),onOverlayClick:t[8]||(t[8]=e=>oe.value=!1)},{content:d((()=>[p("div",Rt,[u(l,{size:"large",shape:"circle",variant:"text",onClick:be},{default:d((()=>[u(v(Re),{slot:"icon",style:k(gt.value)},null,8,["style"])])),_:1}),u(l,{size:"large",shape:"circle",variant:"text",onClick:xe},{default:d((()=>[u(v(ye),{slot:"icon"})])),_:1}),u(l,{size:"large",shape:"circle",variant:"text",onClick:se},{default:d((()=>[u(v(je),{slot:"icon"})])),_:1}),u(l,{size:"large",shape:"circle",variant:"text",onClick:t[2]||(t[2]=e=>Te(""))},{default:d((()=>[u(v(ze),{slot:"icon"})])),_:1}),u(r,{theme:"danger",content:v(I)("pages.conversation.confirm_delete_all_chat_records"),placement:"left",onConfirm:t[4]||(t[4]=()=>{we(),oe.value=!1})},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:t[3]||(t[3]=_((()=>{}),["stop"]))},{default:d((()=>[u(v(ke),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(r,{theme:"warning",content:v(I)("pages.conversation.confirm_clear_all_context"),placement:"left",onConfirm:t[6]||(t[6]=()=>{de(),oe.value=!1})},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:t[5]||(t[5]=_((()=>{}),["stop"]))},{default:d((()=>[u(v(Ce),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(l,{size:"large",shape:"circle",variant:"text",onClick:ve},{default:d((()=>[u(v(Ue),{slot:"icon"})])),_:1})])])),default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text"},{default:d((()=>[u(v(Pe),{slot:"icon"})])),_:1})])),_:1},8,["modelValue"])):(s(),n(i,{key:0},[u(o,{content:v(I)("pages.conversation.internet_search")},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:_(be,["stop"])},{default:d((()=>[u(v(Re),{slot:"icon",style:k(gt.value)},null,8,["style"])])),_:1})])),_:1},8,["content"]),u(o,{content:v(I)("pages.conversation.stop_answering")},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:_(xe,["stop"])},{default:d((()=>[u(v(ye),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(o,{content:v(I)("pages.conversation.regenerate_last_conversation")},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:_(se,["stop"])},{default:d((()=>[u(v(je),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(o,{content:v(I)("pages.conversation.inherit_other_model_conversation"),placement:"top"},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:t[1]||(t[1]=_((e=>Te("")),["stop"]))},{default:d((()=>[u(v(ze),{slot:"icon"})])),_:1})])),_:1},8,["content"]),u(r,{theme:"danger",content:v(I)("pages.conversation.confirm_delete_all_chat_records"),placement:"top",onConfirm:we},{default:d((()=>[u(o,{content:v(I)("pages.conversation.delete_all_chat_records"),placement:"top"},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text"},{default:d((()=>[u(v(ke),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:1},8,["content"]),u(r,{theme:"warning",content:v(I)("pages.conversation.confirm_clear_all_context"),placement:"top",onConfirm:de},{default:d((()=>[u(o,{content:v(I)("pages.conversation.clear_all_context"),placement:"top"},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text"},{default:d((()=>[u(v(Ce),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:1},8,["content"]),u(o,{content:v(I)("pages.conversation.edit_current_conversation"),placement:"top"},{default:d((()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:ve},{default:d((()=>[u(v(Ue),{slot:"icon"})])),_:1})])),_:1},8,["content"])],64))])]),u(Ye),u(V,{header:v(I)("pages.conversation.inherit_model_dialog"),visible:Ie.value,"onUpdate:visible":t[10]||(t[10]=e=>Ie.value=e),"on-confirm":Ee,class:"extend-model"},{default:d((()=>[u(M,{class:"w-full",modelValue:Se.value,"onUpdate:modelValue":t[9]||(t[9]=e=>Se.value=e)},{default:d((()=>[u(z,{gutter:[16,16],class:"w-full"},{default:d((()=>[(s(!0),n(i,null,h(ee.value,(e=>(s(),c(a,{span:12},{default:d((()=>[u(C,{value:e.model.id,disabled:Ve.value===e.model.id},{default:d((()=>[u(j,{size:"20px",class:"mr-1"},{icon:d((()=>[(s(),c(g(v(A).icons[e.model.type])))])),_:2},1024),f(" "+m(v(A).getModelItemTitle(e.model)),1)])),_:2},1032,["value","disabled"])])),_:2},1024)))),256))])),_:1})])),_:1},8,["modelValue"])])),_:1},8,["header","visible"]),u(V,{header:v(I)("pages.conversation.api_conversation_settings"),visible:Be.value,"onUpdate:visible":t[14]||(t[14]=e=>Be.value=e),"on-confirm":Je},{default:d((()=>[u(E,{"label-align":"top"},{default:d((()=>[u(T,{label:v(I)("pages.conversation.api_agent"),name:"apiSettingAgent"},{default:d((()=>[u(S,{modelValue:qe.value,"onUpdate:modelValue":t[11]||(t[11]=e=>qe.value=e)},null,8,["modelValue"])])),_:1},8,["label"]),u(T,{label:v(I)("pages.conversation.api_conversation_id"),name:"apiSettingConversation"},{default:d((()=>[u(S,{modelValue:Ne.value,"onUpdate:modelValue":t[12]||(t[12]=e=>Ne.value=e)},null,8,["modelValue"]),u(l,{class:"ml-2",onClick:Ge},{default:d((()=>[f(m(v(I)("pages.conversation.api_conversation_id_random")),1)])),_:1})])),_:1},8,["label"]),u(T,{label:v(I)("pages.conversation.remarks"),name:"apiSettingNode"},{default:d((()=>[u(S,{modelValue:$e.value,"onUpdate:modelValue":t[13]||(t[13]=e=>$e.value=e)},null,8,["modelValue"])])),_:1},8,["label"])])),_:1})])),_:1},8,["header","visible"]),u(V,{header:v(I)("pages.conversation.button_tooltip_favourite"),visible:Qe.value,"onUpdate:visible":t[16]||(t[16]=e=>Qe.value=e),confirmBtn:null},{default:d((()=>[p("div",Ut,[u(l,{onClick:nt,theme:"default",variant:"outline"},{default:d((()=>t[17]||(t[17]=[f("创建新的笔记")]))),_:1}),u(l,{onClick:st,theme:"default",variant:"outline"},{default:d((()=>t[18]||(t[18]=[f("添加到笔记")]))),_:1}),p("div",Pt,[u(M,{modelValue:et.value,"onUpdate:modelValue":t[15]||(t[15]=e=>et.value=e)},{default:d((()=>[u(z,{gutter:[16,16]},{default:d((()=>[(s(!0),n(i,null,h(v(tt),(e=>(s(),c(a,{span:12},{default:d((()=>[u(C,{value:e.id,class:"grid grid-flow-col auto-cols-max fav-radio fav-radio-dialog"},{default:d((()=>[f(m(e.title),1)])),_:2},1032,["value"])])),_:2},1024)))),256))])),_:1})])),_:1},8,["modelValue"])])])])),_:1},8,["header","visible"])],544)),[[y,Z.value]])}}});export{Ht as default};
|
.output/public/assets/chevrotain-Cp5uJ8YW.js
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import{O as t,T as e,N as n,A as i,R as r,a as s,b as o,c as a,d as c,i as l,e as h,f as u,g as d,B as p,P as f,h as T,t as E,j as m,k as R,l as I,G as N,s as A}from"./@chevrotain-DFy4Htpj.js";import{f as g,d as O,u as S,m as L,g as _,a as k,h as y,c as x,v as C,e as P,j as v,k as M,l as b,r as w,n as U,i as F,o as D,b as $,q as K,t as G,w as B,x as H,y as W,z as V,A as Y,B as z,C as j,D as X,E as q,F as J,G as Z,H as Q,I as tt,p as et,J as nt,s as it}from"./lodash-es-RhymR7yg.js";class rt{walk(l,h=[]){g(l.definition,((u,d)=>{const p=O(l.definition,d+1);if(u instanceof n)this.walkProdRef(u,p,h);else if(u instanceof e)this.walkTerminal(u,p,h);else if(u instanceof i)this.walkFlat(u,p,h);else if(u instanceof t)this.walkOption(u,p,h);else if(u instanceof r)this.walkAtLeastOne(u,p,h);else if(u instanceof s)this.walkAtLeastOneSep(u,p,h);else if(u instanceof o)this.walkManySep(u,p,h);else if(u instanceof a)this.walkMany(u,p,h);else{if(!(u instanceof c))throw Error("non exhaustive match");this.walkOr(u,p,h)}}))}walkTerminal(t,e,n){}walkProdRef(t,e,n){}walkFlat(t,e,n){const i=e.concat(n);this.walk(t,i)}walkOption(t,e,n){const i=e.concat(n);this.walk(t,i)}walkAtLeastOne(e,n,i){const r=[new t({definition:e.definition})].concat(n,i);this.walk(e,r)}walkAtLeastOneSep(t,e,n){const i=st(t,e,n);this.walk(t,i)}walkMany(e,n,i){const r=[new t({definition:e.definition})].concat(n,i);this.walk(e,r)}walkManySep(t,e,n){const i=st(t,e,n);this.walk(t,i)}walkOr(t,e,n){const r=e.concat(n);g(t.definition,(t=>{const e=new i({definition:[t]});this.walk(e,r)}))}}function st(n,i,r){return[new t({definition:[new e({terminalType:n.separator})].concat(n.definition)})].concat(i,r)}function ot(t){if(t instanceof n)return ot(t.referencedRule);if(t instanceof e)return[t.terminalType];if(l(t))return function(t){let e=[];const n=t.definition;let i,r=0,s=n.length>r,o=!0;for(;s&&o;)i=n[r],o=u(i),e=e.concat(ot(i)),r+=1,s=n.length>r;return S(e)}(t);if(h(t))return function(t){const e=L(t.definition,(t=>ot(t)));return S(_(e))}(t);throw Error("non exhaustive match")}const at="_~IN~_";class ct extends rt{constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,e,n){}walkProdRef(t,e,n){const r=(s=t.referencedRule,o=t.idx,s.name+o+at+this.topProd.name);var s,o;const a=e.concat(n),c=ot(new i({definition:a}));this.follows[r]=c}}let lt={};const ht=new d;function ut(t){const e=t.toString();if(lt.hasOwnProperty(e))return lt[e];{const t=ht.pattern(e);return lt[e]=t,t}}const dt="Complement Sets are not supported for first char optimization",pt='Unable to use "first char" lexer optimizations:\n';function ft(t,e=!1){try{const e=ut(t);return Tt(e.value,{},e.flags.ignoreCase)}catch(n){if(n.message===dt)e&&f(`${pt}\tUnable to optimize: < ${t.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";e&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),T(`${pt}\n\tFailed parsing: < ${t.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Tt(t,e,n){switch(t.type){case"Disjunction":for(let r=0;r<t.value.length;r++)Tt(t.value[r],e,n);break;case"Alternative":const i=t.value;for(let t=0;t<i.length;t++){const r=i[t];switch(r.type){case"EndAnchor":
|
2 |
+
// A group back reference cannot affect potential starting char.
|
3 |
+
// because if a back reference is the first production than automatically
|
4 |
+
// the group being referenced has had to come BEFORE so its codes have already been added
|
5 |
+
case"GroupBackReference":
|
6 |
+
// assertions do not affect potential starting codes
|
7 |
+
case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const s=r;switch(s.type){case"Character":Et(s.value,e,n);break;case"Set":if(!0===s.complement)throw Error(dt);g(s.value,(t=>{if("number"==typeof t)Et(t,e,n);else{const i=t;if(!0===n)for(let t=i.from;t<=i.to;t++)Et(t,e,n);else{for(let t=i.from;t<=i.to&&t<Dt;t++)Et(t,e,n);if(i.to>=Dt){const t=i.from>=Dt?i.from:Dt,n=i.to,r=Kt(t),s=Kt(n);for(let i=r;i<=s;i++)e[i]=i}}}}));break;case"Group":Tt(s.value,e,n);break;
|
8 |
+
/* istanbul ignore next */default:throw Error("Non Exhaustive Match")}const o=void 0!==s.quantifier&&0===s.quantifier.atLeast;if(
|
9 |
+
// A group may be optional due to empty contents /(?:)/
|
10 |
+
// or if everything inside it is optional /((a)?)/
|
11 |
+
"Group"===s.type&&!1===Rt(s)||// If this term is not a group it may only be optional if it has an optional quantifier
|
12 |
+
"Group"!==s.type&&!1===o)break}break;
|
13 |
+
/* istanbul ignore next */default:throw Error("non exhaustive match!")}return C(e)}function Et(t,e,n){const i=Kt(t);e[i]=i,!0===n&&function(t,e){const n=String.fromCharCode(t),i=n.toUpperCase();if(i!==n){const t=Kt(i.charCodeAt(0));e[t]=t}else{const t=n.toLowerCase();if(t!==n){const n=Kt(t.charCodeAt(0));e[n]=n}}}(t,e)}function mt(t,e){return y(t.value,(t=>{if("number"==typeof t)return x(e,t);{const n=t;return void 0!==y(e,(t=>n.from<=t&&t<=n.to))}}))}function Rt(t){const e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&(v(t.value)?P(t.value,Rt):Rt(t.value))}class It extends p{constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}super.visitChildren(t)}}visitCharacter(t){x(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===mt(t,this.targetCharCodes)&&(this.found=!0):void 0!==mt(t,this.targetCharCodes)&&(this.found=!0)}}function Nt(t,e){if(e instanceof RegExp){const n=ut(e),i=new It(t);return i.visit(n),i.found}return void 0!==y(e,(e=>x(t,e.charCodeAt(0))))}const At="PATTERN",gt="defaultMode",Ot="modes";let St="boolean"==typeof new RegExp("(?:)").sticky;function Lt(t,e){const n=(e=G(e,{useSticky:St,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(t,e)=>e()})).tracer;let i;n("initCharCodeToOptimizedIndexMap",(()=>{!function(){if(W($t)){$t=new Array(65536);for(let t=0;t<65536;t++)$t[t]=t>255?255+~~(t/255):t}}()})),n("Reject Lexer.NA",(()=>{i=w(t,(t=>t[At]===te.NA))}));let r,s,o,a,c,l,h,u,d,p,f,E=!1;n("Transform Patterns",(()=>{E=!1,r=L(i,(t=>{const n=t[At];if($(n)){const t=n.source;return 1!==t.length||// only these regExp meta characters which can appear in a length one regExp
|
14 |
+
"^"===t||"$"===t||"."===t||n.ignoreCase?2!==t.length||"\\"!==t[0]||x(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],t[1])?e.useSticky?Ct(n):xt(n):t[1]:t}if(K(n))return E=!0,{exec:n};if("object"==typeof n)return E=!0,n;if("string"==typeof n){if(1===n.length)return n;{const t=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),i=new RegExp(t);return e.useSticky?Ct(i):xt(i)}}throw Error("non exhaustive match")}))})),n("misc mapping",(()=>{s=L(i,(t=>t.tokenTypeIdx)),o=L(i,(t=>{const e=t.GROUP;if(e!==te.SKIPPED){if(F(e))return e;if(D(e))return!1;throw Error("non exhaustive match")}})),a=L(i,(t=>{const e=t.LONGER_ALT;if(e){return v(e)?L(e,(t=>B(i,t))):[B(i,e)]}})),c=L(i,(t=>t.PUSH_MODE)),l=L(i,(t=>M(t,"POP_MODE")))})),n("Line Terminator Handling",(()=>{const t=Ut(e.lineTerminatorCharacters);h=L(i,(t=>!1)),"onlyOffset"!==e.positionTracking&&(h=L(i,(e=>M(e,"LINE_BREAKS")?!!e.LINE_BREAKS:!1===wt(e,t)&&Nt(t,e.PATTERN))))})),n("Misc Mapping #2",(()=>{u=L(i,vt),d=L(r,Mt),p=H(i,((t,e)=>{const n=e.GROUP;return F(n)&&n!==te.SKIPPED&&(t[n]=[]),t}),{}),f=L(r,((t,e)=>({pattern:r[e],longerAlt:a[e],canLineTerminator:h[e],isCustom:u[e],short:d[e],group:o[e],push:c[e],pop:l[e],tokenTypeIdx:s[e],tokenType:i[e]})))}));let m=!0,R=[];return e.safeMode||n("First Char Optimization",(()=>{R=H(i,((t,n,i)=>{if("string"==typeof n.PATTERN){const e=Kt(n.PATTERN.charCodeAt(0));Ft(t,e,f[i])}else if(v(n.START_CHARS_HINT)){let e;g(n.START_CHARS_HINT,(n=>{const r=Kt("string"==typeof n?n.charCodeAt(0):n);e!==r&&(e=r,Ft(t,r,f[i]))}))}else if($(n.PATTERN))if(n.PATTERN.unicode)m=!1,e.ensureOptimizations&&T(`${pt}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const r=ft(n.PATTERN,e.ensureOptimizations);W(r)&&(m=!1),g(r,(e=>{Ft(t,e,f[i])}))}else e.ensureOptimizations&&T(`${pt}\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1;return t}),[])})),{emptyGroups:p,patternIdxToConfig:f,charCodeToPatternIdxToConfig:R,hasCustom:E,canBeOptimized:m}}function _t(t,e){let n=[];const i=function(t){const e=V(t,(t=>!M(t,At))),n=L(e,(t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:Jt.MISSING_PATTERN,tokenTypes:[t]}))),i=Y(t,e);return{errors:n,valid:i}}(t);n=n.concat(i.errors);const r=function(t){const e=V(t,(t=>{const e=t[At];return!($(e)||K(e)||M(e,"exec")||F(e))})),n=L(e,(t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Jt.INVALID_PATTERN,tokenTypes:[t]}))),i=Y(t,e);return{errors:n,valid:i}}(i.valid),s=r.valid;return n=n.concat(r.errors),n=n.concat(function(t){let e=[];const n=V(t,(t=>$(t[At])));return e=e.concat(function(t){class e extends p{constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}const n=V(t,(t=>{const n=t.PATTERN;try{const t=ut(n),i=new e;return i.visit(t),i.found}catch(i){return kt.test(n.source)}})),i=L(n,(t=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Jt.EOI_ANCHOR_FOUND,tokenTypes:[t]})));return i}(n)),e=e.concat(function(t){class e extends p{constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}const n=V(t,(t=>{const n=t.PATTERN;try{const t=ut(n),i=new e;return i.visit(t),i.found}catch(i){return yt.test(n.source)}})),i=L(n,(t=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+t.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Jt.SOI_ANCHOR_FOUND,tokenTypes:[t]})));return i}(n)),e=e.concat(function(t){const e=V(t,(t=>{const e=t[At];return e instanceof RegExp&&(e.multiline||e.global)})),n=L(e,(t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Jt.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]})));return n}(n)),e=e.concat(function(t){const e=[];let n=L(t,(n=>H(t,((t,i)=>(n.PATTERN.source!==i.PATTERN.source||x(e,i)||i.PATTERN===te.NA||(e.push(i),t.push(i)),t)),[])));n=b(n);const i=V(n,(t=>t.length>1)),r=L(i,(t=>{const e=L(t,(t=>t.name));return{message:`The same RegExp pattern ->${z(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:Jt.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}}));return r}(n)),e=e.concat(function(t){const e=V(t,(t=>t.PATTERN.test(""))),n=L(e,(t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:Jt.EMPTY_MATCH_PATTERN,tokenTypes:[t]})));return n}(n)),e}(s)),n=n.concat(function(t){const e=V(t,(t=>{if(!M(t,"GROUP"))return!1;const e=t.GROUP;return e!==te.SKIPPED&&e!==te.NA&&!F(e)})),n=L(e,(t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Jt.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]})));return n}(s)),n=n.concat(function(t,e){const n=V(t,(t=>void 0!==t.PUSH_MODE&&!x(e,t.PUSH_MODE))),i=L(n,(t=>({message:`Token Type: ->${t.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${t.PUSH_MODE}<-which does not exist`,type:Jt.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]})));return i}(s,e)),n=n.concat(function(t){const e=[],n=H(t,((t,e,n)=>{const i=e.PATTERN;return i===te.NA||(F(i)?t.push({str:i,idx:n,tokenType:e}):$(i)&&(r=i,void 0===y([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(t=>-1!==r.source.indexOf(t))))&&t.push({str:i.source,idx:n,tokenType:e})),t;var r}),[]);return g(t,((t,i)=>{g(n,(({str:n,idx:r,tokenType:s})=>{if(i<r&&function(t,e){if($(e)){const n=e.exec(t);return null!==n&&0===n.index}if(K(e))return e(t,0,[],{});if(M(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}(n,t.PATTERN)){const n=`Token: ->${s.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${t.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:n,type:Jt.UNREACHABLE_PATTERN,tokenTypes:[t,s]})}}))})),e}(s)),n}const kt=/[^\\][$]/;const yt=/[^\\[][\^]|^\^/;function xt(t){const e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function Ct(t){const e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function Pt(t,e,n){const i=[];let r=!1;const s=b(_(C(t.modes))),o=w(s,(t=>t[At]===te.NA)),a=Ut(n);return e&&g(o,(t=>{const e=wt(t,a);if(!1!==e){const n=function(t,e){if(e.issue===Jt.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${t.name}> Token Type\n\t Root cause: ${e.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Jt.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <${t.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(t,e),r={message:n,type:e.issue,tokenType:t};i.push(r)}else M(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(r=!0):Nt(a,t.PATTERN)&&(r=!0)})),e&&!r&&i.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:Jt.NO_LINE_BREAKS_FLAGS}),i}function vt(t){const e=t.PATTERN;if($(e))return!1;if(K(e))return!0;if(M(e,"exec"))return!0;if(F(e))return!1;throw Error("non exhaustive match")}function Mt(t){return!(!F(t)||1!==t.length)&&t.charCodeAt(0)}const bt={
|
15 |
+
// implements /\n|\r\n?/g.test
|
16 |
+
test:function(t){const e=t.length;for(let n=this.lastIndex;n<e;n++){const e=t.charCodeAt(n);if(10===e)return this.lastIndex=n+1,!0;if(13===e)return 10===t.charCodeAt(n+1)?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function wt(t,e){if(M(t,"LINE_BREAKS"))return!1;if($(t.PATTERN)){try{Nt(e,t.PATTERN)}catch(n){return{issue:Jt.IDENTIFY_TERMINATOR,errMsg:n.message}}return!1}if(F(t.PATTERN))return!1;if(vt(t))return{issue:Jt.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function Ut(t){return L(t,(t=>F(t)?t.charCodeAt(0):t))}function Ft(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}const Dt=256;let $t=[];function Kt(t){return t<Dt?t:$t[t]}function Gt(t,e){const n=t.tokenTypeIdx;return n===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[n]}function Bt(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}let Ht=1;const Wt={};function Vt(t){const e=function(t){let e=j(t),n=t,i=!0;for(;i;){n=b(_(L(n,(t=>t.CATEGORIES))));const t=Y(n,e);e=e.concat(t),W(t)?i=!1:n=t}return e}(t);!function(t){g(t,(t=>{zt(t)||(Wt[Ht]=t,t.tokenTypeIdx=Ht++),jt(t)&&!v(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),jt(t)||(t.CATEGORIES=[]),M(t,"categoryMatches")||(t.categoryMatches=[]),function(t){return M(t,"categoryMatchesMap")}(t)||(t.categoryMatchesMap={})}))}(e),function(t){g(t,(t=>{Yt([],t)}))}(e),function(t){g(t,(t=>{t.categoryMatches=[],g(t.categoryMatchesMap,((e,n)=>{t.categoryMatches.push(Wt[n].tokenTypeIdx)}))}))}(e),g(e,(t=>{t.isParent=t.categoryMatches.length>0}))}function Yt(t,e){g(t,(t=>{e.categoryMatchesMap[t.tokenTypeIdx]=!0})),g(e.CATEGORIES,(n=>{const i=t.concat(e);x(i,n)||Yt(i,n)}))}function zt(t){return M(t,"tokenTypeIdx")}function jt(t){return M(t,"CATEGORIES")}function Xt(t){return M(t,"tokenTypeIdx")}const qt={buildUnableToPopLexerModeMessage:t=>`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(t,e,n,i,r)=>`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${n} characters.`};var Jt,Zt;(Zt=Jt||(Jt={}))[Zt.MISSING_PATTERN=0]="MISSING_PATTERN",Zt[Zt.INVALID_PATTERN=1]="INVALID_PATTERN",Zt[Zt.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",Zt[Zt.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",Zt[Zt.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",Zt[Zt.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",Zt[Zt.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",Zt[Zt.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",Zt[Zt.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",Zt[Zt.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",Zt[Zt.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",Zt[Zt.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",Zt[Zt.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",Zt[Zt.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",Zt[Zt.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",Zt[Zt.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",Zt[Zt.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",Zt[Zt.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE";const Qt={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:qt,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Qt);class te{constructor(t,e=Qt){if(this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(t,e)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent,this.traceInitMaxIdent;const{time:i,value:r}=E(e),s=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${t}> time: ${i}ms`),this.traceInitIndent--,r}return e()},"boolean"==typeof e)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=k({},Qt,e);const n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(()=>{let n,i=!0;this.TRACE_INIT("Lexer Config handling",(()=>{if(this.config.lineTerminatorsPattern===Qt.lineTerminatorsPattern)this.config.lineTerminatorsPattern=bt;else if(this.config.lineTerminatorCharacters===Qt.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(e.safeMode&&e.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),v(t)?n={modes:{defaultMode:j(t)},defaultMode:gt}:(i=!1,n=j(t))})),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(t){const e=[];return M(t,gt)||e.push({message:"A MultiMode Lexer cannot be initialized without a <"+gt+"> property in its definition\n",type:Jt.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),M(t,Ot)||e.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:Jt.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),M(t,Ot)&&M(t,gt)&&!M(t.modes,t.defaultMode)&&e.push({message:`A MultiMode Lexer cannot be initialized with a ${gt}: <${t.defaultMode}>which does not exist\n`,type:Jt.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),M(t,Ot)&&g(t.modes,((t,n)=>{g(t,((i,r)=>{if(D(i))e.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${r}>\n`,type:Jt.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(M(i,"LONGER_ALT")){const r=v(i.LONGER_ALT)?i.LONGER_ALT:[i.LONGER_ALT];g(r,(r=>{D(r)||x(t,r)||e.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${r.name}> on token <${i.name}> outside of mode <${n}>\n`,type:Jt.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))}}))})),e}(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),this.TRACE_INIT("performWarningRuntimeChecks",(()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Pt(n,this.trackStartLines,this.config.lineTerminatorCharacters))}))),n.modes=n.modes?n.modes:{},g(n.modes,((t,e)=>{n.modes[e]=w(t,(t=>D(t)))}));const r=U(n.modes);if(g(n.modes,((t,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,(()=>{if(this.modes.push(n),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(_t(t,r))})),W(this.lexerDefinitionErrors)){let i;Vt(t),this.TRACE_INIT("analyzeTokenTypes",(()=>{i=Lt(t,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:e.positionTracking,ensureOptimizations:e.ensureOptimizations,safeMode:e.safeMode,tracer:this.TRACE_INIT})})),this.patternIdxToConfig[n]=i.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=i.charCodeToPatternIdxToConfig,this.emptyGroups=k({},this.emptyGroups,i.emptyGroups),this.hasCustom=i.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=i.canBeOptimized}}))})),this.defaultMode=n.defaultMode,!W(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const t=L(this.lexerDefinitionErrors,(t=>t.message)).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+t)}g(this.lexerDefinitionWarning,(t=>{f(t.message)})),this.TRACE_INIT("Choosing sub-methods implementations",(()=>{if(St?(this.chopInput=X,this.match=this.matchWithTest):(this.updateLastIndex=q,this.match=this.matchWithExec),i&&(this.handleModes=q),!1===this.trackStartLines&&(this.computeNewColumn=X),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=q),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)})),this.TRACE_INIT("Failed Optimization Warnings",(()=>{const t=H(this.canModeBeOptimized,((t,e,n)=>(!1===e&&t.push(n),t)),[]);if(e.ensureOptimizations&&!W(t))throw Error(`Lexer Modes: < ${t.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)})),this.TRACE_INIT("clearRegExpParserCache",(()=>{lt={}})),this.TRACE_INIT("toFastProperties",(()=>{m(this)}))}))}tokenize(t,e=this.defaultMode){if(!W(this.lexerDefinitionErrors)){const t=L(this.lexerDefinitionErrors,(t=>t.message)).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+t)}return this.tokenizeInternal(t,e)}
|
17 |
+
// There is quite a bit of duplication between this and "tokenizeInternalLazy"
|
18 |
+
// This is intentional due to performance considerations.
|
19 |
+
// this method also used quite a bit of `!` none null assertions because it is too optimized
|
20 |
+
// for `tsc` to always understand it is "safe"
|
21 |
+
tokenizeInternal(t,e){let n,i,r,s,o,a,c,l,h,u,d,p,f,T,E;const m=t,R=m.length;let I=0,N=0;const A=this.hasCustom?0:Math.floor(t.length/10),O=new Array(A),S=[];let L=this.trackStartLines?1:void 0,_=this.trackStartLines?1:void 0;const k=function(t){const e={},n=U(t);return g(n,(n=>{const i=t[n];if(!v(i))throw Error("non exhaustive match");e[n]=[]})),e}(this.emptyGroups),y=this.trackStartLines,x=this.config.lineTerminatorsPattern;let C=0,P=[],M=[];const b=[],w=[];let F;function D(){return P}function $(t){const e=Kt(t),n=M[e];return void 0===n?w:n}Object.freeze(w);const K=t=>{if(1===b.length&&// if we have both a POP_MODE and a PUSH_MODE this is in-fact a "transition"
|
22 |
+
// So no error should occur.
|
23 |
+
void 0===t.tokenType.PUSH_MODE){const e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t);S.push({offset:t.startOffset,line:t.startLine,column:t.startColumn,length:t.image.length,message:e})}else{b.pop();const t=J(b);P=this.patternIdxToConfig[t],M=this.charCodeToPatternIdxToConfig[t],C=P.length;const e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;F=M&&e?$:D}};function G(t){b.push(t),M=this.charCodeToPatternIdxToConfig[t],P=this.patternIdxToConfig[t],C=P.length,C=P.length;const e=this.canModeBeOptimized[t]&&!1===this.config.safeMode;F=M&&e?$:D}let B;G.call(this,e);const H=this.config.recoveryEnabled;for(;I<R;){a=null;const e=m.charCodeAt(I),A=F(e),g=A.length;for(n=0;n<g;n++){B=A[n];const i=B.pattern;c=null;const h=B.short;if(!1!==h?e===h&&(a=i):!0===B.isCustom?(E=i.exec(m,I,O,k),null!==E?(a=E[0],void 0!==E.payload&&(c=E.payload)):a=null):(this.updateLastIndex(i,I),a=this.match(i,t,I)),null!==a){if(o=B.longerAlt,void 0!==o){const e=o.length;for(r=0;r<e;r++){const e=P[o[r]],n=e.pattern;if(l=null,!0===e.isCustom?(E=n.exec(m,I,O,k),null!==E?(s=E[0],void 0!==E.payload&&(l=E.payload)):s=null):(this.updateLastIndex(n,I),s=this.match(n,t,I)),s&&s.length>a.length){a=s,c=l,B=e;break}}}break}}if(null!==a){if(h=a.length,u=B.group,void 0!==u&&(d=B.tokenTypeIdx,p=this.createTokenInstance(a,I,d,B.tokenType,L,_,h),this.handlePayload(p,c),!1===u?N=this.addToken(O,N,p):k[u].push(p)),t=this.chopInput(t,h),I+=h,_=this.computeNewColumn(_,h),!0===y&&!0===B.canLineTerminator){let t,e,n=0;x.lastIndex=0;do{t=x.test(a),!0===t&&(e=x.lastIndex-1,n++)}while(!0===t);0!==n&&(L+=n,_=h-e,this.updateTokenEndLineColumnLocation(p,u,e,n,L,_,h))}this.handleModes(B,K,G,p)}else{const e=I,n=L,r=_;let s=!1===H;for(;!1===s&&I<R;)for(t=this.chopInput(t,1),I++,i=0;i<C;i++){const e=P[i],n=e.pattern,r=e.short;if(!1!==r?m.charCodeAt(I)===r&&(s=!0):!0===e.isCustom?s=null!==n.exec(m,I,O,k):(this.updateLastIndex(n,I),s=null!==n.exec(t)),!0===s)break}if(f=I-e,_=this.computeNewColumn(_,f),T=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(m,e,f,n,r),S.push({offset:e,line:n,column:r,length:f,message:T}),!1===H)break}}return this.hasCustom||(O.length=N),{tokens:O,groups:k,errors:S}}handleModes(t,e,n,i){if(!0===t.pop){const r=t.push;e(i),void 0!==r&&n.call(this,r)}else void 0!==t.push&&n.call(this,t.push)}chopInput(t,e){return t.substring(e)}updateLastIndex(t,e){t.lastIndex=e}
|
24 |
+
// TODO: decrease this under 600 characters? inspect stripping comments option in TSC compiler
|
25 |
+
updateTokenEndLineColumnLocation(t,e,n,i,r,s,o){let a,c;void 0!==e&&(a=n===o-1,c=a?-1:0,1===i&&!0===a||(t.endLine=r+c,t.endColumn=s-1-c))}computeNewColumn(t,e){return t+e}createOffsetOnlyToken(t,e,n,i){return{image:t,startOffset:e,tokenTypeIdx:n,tokenType:i}}createStartOnlyToken(t,e,n,i,r,s){return{image:t,startOffset:e,startLine:r,startColumn:s,tokenTypeIdx:n,tokenType:i}}createFullToken(t,e,n,i,r,s,o){return{image:t,startOffset:e,endOffset:e+o-1,startLine:r,endLine:r,startColumn:s,endColumn:s+o-1,tokenTypeIdx:n,tokenType:i}}addTokenUsingPush(t,e,n){return t.push(n),e}addTokenUsingMemberAccess(t,e,n){return t[e]=n,++e}handlePayloadNoCustom(t,e){}handlePayloadWithCustom(t,e){null!==e&&(t.payload=e)}matchWithTest(t,e,n){return!0===t.test(e)?e.substring(n,t.lastIndex):null}matchWithExec(t,e){const n=t.exec(e);return null!==n?n[0]:null}}function ee(t){return ne(t)?t.LABEL:t.name}function ne(t){return F(t.LABEL)&&""!==t.LABEL}te.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",te.NA=/NOT_APPLICABLE/;const ie="parent",re="categories",se="label",oe="group",ae="push_mode",ce="pop_mode",le="longer_alt",he="line_breaks",ue="start_chars_hint";function de(t){return function(t){const e=t.pattern,n={};n.name=t.name,D(e)||(n.PATTERN=e);if(M(t,ie))throw"The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.";M(t,re)&&(n.CATEGORIES=t[re]);Vt([n]),M(t,se)&&(n.LABEL=t[se]);M(t,oe)&&(n.GROUP=t[oe]);M(t,ce)&&(n.POP_MODE=t[ce]);M(t,ae)&&(n.PUSH_MODE=t[ae]);M(t,le)&&(n.LONGER_ALT=t[le]);M(t,he)&&(n.LINE_BREAKS=t[he]);M(t,ue)&&(n.START_CHARS_HINT=t[ue]);return n}(t)}const pe=de({name:"EOF",pattern:te.NA});function fe(t,e,n,i,r,s,o,a){return{image:e,startOffset:n,endOffset:i,startLine:r,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function Te(t,e){return Gt(t,e)}Vt([pe]);const Ee={buildMismatchTokenMessage:({expected:t,actual:e,previous:n,ruleName:i})=>`Expecting ${ne(t)?`--\x3e ${ee(t)} <--`:`token of type --\x3e ${t.name} <--`} but found --\x3e '${e.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:t,ruleName:e})=>"Redundant input, expecting EOF but found: "+t.image,buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:n,customUserDescription:i,ruleName:r}){const s="Expecting: ",o="\nbut found: '"+z(e).image+"'";if(i)return s+i+o;{const e=H(t,((t,e)=>t.concat(e)),[]),n=L(e,(t=>`[${L(t,(t=>ee(t))).join(", ")}]`));return s+`one of these possible Token sequences:\n${L(n,((t,e)=>` ${e+1}. ${t}`)).join("\n")}`+o}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:n,ruleName:i}){const r="Expecting: ",s="\nbut found: '"+z(e).image+"'";if(n)return r+n+s;return r+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${L(t,(t=>`[${L(t,(t=>ee(t))).join(",")}]`)).join(" ,")}>`+s}};Object.freeze(Ee);const me={buildRuleNotFoundError:(t,e)=>"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+"<-\ninside top level rule: ->"+t.name+"<-"},Re={buildDuplicateFoundError(t,i){const r=t.name,s=z(i),o=s.idx,a=I(s),c=(l=s)instanceof e?l.terminalType.name:l instanceof n?l.nonTerminalName:"";var l;let h=`->${a}${o>0?o:""}<- ${c?`with argument: ->${c}<-`:""}\n appears more than once (${i.length} times) in the top level rule: ->${r}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return h=h.replace(/[ \t]+/g," "),h=h.replace(/\s\s+/g,"\n"),h},buildNamespaceConflictError:t=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(t){const e=L(t.prefixPath,(t=>ee(t))).join(", "),n=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin <OR${n}> inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(t){const e=L(t.prefixPath,(t=>ee(t))).join(", "),n=0===t.alternation.idx?"":t.alternation.idx;let i=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${n}> inside <${t.topLevelRule.name}> Rule,\n<${e}> may appears as a prefix path in all these alternatives.\n`;return i+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",i},buildEmptyRepetitionError(t){let e=I(t.repetition);0!==t.repetition.idx&&(e+=t.repetition.idx);return`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},
|
26 |
+
// TODO: remove - `errors_public` from nyc.config.js exclude
|
27 |
+
// once this method is fully removed from this file
|
28 |
+
buildTokenNameError:t=>"deprecated",buildEmptyAlternationError:t=>`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:t=>`An Alternation cannot have more than 256 alternatives:\n<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.\n has ${t.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(t){const e=t.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${e}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${e} --\x3e ${L(t.leftRecursionPath,(t=>t.name)).concat([e]).join(" --\x3e ")}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},
|
29 |
+
// TODO: remove - `errors_public` from nyc.config.js exclude
|
30 |
+
// once this method is fully removed from this file
|
31 |
+
buildInvalidRuleNameError:t=>"deprecated",buildDuplicateRuleNameError(t){let e;e=t.topLevelRule instanceof R?t.topLevelRule.name:t.topLevelRule;return`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};class Ie extends N{constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){g(C(this.nameToTopRule),(t=>{this.currTopLevel=t,t.accept(this)}))}visitNonTerminal(t){const e=this.nameToTopRule[t.nonTerminalName];if(e)t.referencedRule=e;else{const e=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:e,type:Wn.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}}class Ne extends rt{constructor(t,e){super(),this.topProd=t,this.path=e,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=j(this.path.ruleStack).reverse(),this.occurrenceStack=j(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,e=[]){this.found||super.walk(t,e)}walkProdRef(t,e,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){const i=e.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,i)}}updateExpectedNext(){W(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class Ae extends Ne{constructor(t,e){super(t,e),this.path=e,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,e,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){const t=e.concat(n),r=new i({definition:t});this.possibleTokTypes=ot(r),this.found=!0}}}class ge extends rt{constructor(t,e){super(),this.topRule=t,this.occurrence=e,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class Oe extends ge{walkMany(t,n,i){if(t.idx===this.occurrence){const t=z(n.concat(i));this.result.isEndOfRule=void 0===t,t instanceof e&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkMany(t,n,i)}}class Se extends ge{walkManySep(t,n,i){if(t.idx===this.occurrence){const t=z(n.concat(i));this.result.isEndOfRule=void 0===t,t instanceof e&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkManySep(t,n,i)}}class Le extends ge{walkAtLeastOne(t,n,i){if(t.idx===this.occurrence){const t=z(n.concat(i));this.result.isEndOfRule=void 0===t,t instanceof e&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkAtLeastOne(t,n,i)}}class _e extends ge{walkAtLeastOneSep(t,n,i){if(t.idx===this.occurrence){const t=z(n.concat(i));this.result.isEndOfRule=void 0===t,t instanceof e&&(this.result.token=t.terminalType,this.result.occurrence=t.idx)}else super.walkAtLeastOneSep(t,n,i)}}function ke(l,h,u=[]){u=j(u);let d=[],p=0;function f(t){const e=ke(t.concat(O(l,p+1)),h,u);return d.concat(e)}for(;u.length<h&&p<l.length;){const h=l[p];if(h instanceof i)return f(h.definition);if(h instanceof n)return f(h.definition);if(h instanceof t)d=f(h.definition);else{if(h instanceof r){return f(h.definition.concat([new a({definition:h.definition})]))}if(h instanceof s){return f([new i({definition:h.definition}),new a({definition:[new e({terminalType:h.separator})].concat(h.definition)})])}if(h instanceof o){const t=h.definition.concat([new a({definition:[new e({terminalType:h.separator})].concat(h.definition)})]);d=f(t)}else if(h instanceof a){const t=h.definition.concat([new a({definition:h.definition})]);d=f(t)}else{if(h instanceof c)return g(h.definition,(t=>{!1===W(t.definition)&&(d=f(t.definition))})),d;if(!(h instanceof e))throw Error("non exhaustive match");u.push(h.terminalType)}}p++}return d.push({partialPath:u,suffixDef:O(l,p)}),d}function ye(l,h,u,d){const p="EXIT_NONE_TERMINAL",f=[p],T="EXIT_ALTERNATIVE";let E=!1;const m=h.length,I=m-d-1,N=[],A=[];for(A.push({idx:-1,def:l,ruleStack:[],occurrenceStack:[]});!W(A);){const l=A.pop();if(l===T){E&&J(A).idx<=I&&A.pop();continue}const d=l.def,g=l.idx,S=l.ruleStack,L=l.occurrenceStack;if(W(d))continue;const _=d[0];if(_===p){const t={idx:g,def:O(d),ruleStack:Z(S),occurrenceStack:Z(L)};A.push(t)}else if(_ instanceof e)if(g<m-1){const t=g+1;if(u(h[t],_.terminalType)){const e={idx:t,def:O(d),ruleStack:S,occurrenceStack:L};A.push(e)}}else{if(g!==m-1)throw Error("non exhaustive match");N.push({nextTokenType:_.terminalType,nextTokenOccurrence:_.idx,ruleStack:S,occurrenceStack:L}),E=!0}else if(_ instanceof n){const t=j(S);t.push(_.nonTerminalName);const e=j(L);e.push(_.idx);const n={idx:g,def:_.definition.concat(f,O(d)),ruleStack:t,occurrenceStack:e};A.push(n)}else if(_ instanceof t){const t={idx:g,def:O(d),ruleStack:S,occurrenceStack:L};A.push(t),A.push(T);const e={idx:g,def:_.definition.concat(O(d)),ruleStack:S,occurrenceStack:L};A.push(e)}else if(_ instanceof r){const t=new a({definition:_.definition,idx:_.idx}),e={idx:g,def:_.definition.concat([t],O(d)),ruleStack:S,occurrenceStack:L};A.push(e)}else if(_ instanceof s){const t=new e({terminalType:_.separator}),n=new a({definition:[t].concat(_.definition),idx:_.idx}),i={idx:g,def:_.definition.concat([n],O(d)),ruleStack:S,occurrenceStack:L};A.push(i)}else if(_ instanceof o){const t={idx:g,def:O(d),ruleStack:S,occurrenceStack:L};A.push(t),A.push(T);const n=new e({terminalType:_.separator}),i=new a({definition:[n].concat(_.definition),idx:_.idx}),r={idx:g,def:_.definition.concat([i],O(d)),ruleStack:S,occurrenceStack:L};A.push(r)}else if(_ instanceof a){const t={idx:g,def:O(d),ruleStack:S,occurrenceStack:L};A.push(t),A.push(T);const e=new a({definition:_.definition,idx:_.idx}),n={idx:g,def:_.definition.concat([e],O(d)),ruleStack:S,occurrenceStack:L};A.push(n)}else if(_ instanceof c)for(let t=_.definition.length-1;t>=0;t--){const e={idx:g,def:_.definition[t].definition.concat(O(d)),ruleStack:S,occurrenceStack:L};A.push(e),A.push(T)}else if(_ instanceof i)A.push({idx:g,def:_.definition.concat(O(d)),ruleStack:S,occurrenceStack:L});else{if(!(_ instanceof R))throw Error("non exhaustive match");A.push(xe(_,g,S,L))}}return N}function xe(t,e,n,i){const r=j(n);r.push(t.name);const s=j(i);return s.push(1),{idx:e,def:t.definition,ruleStack:r,occurrenceStack:s}}var Ce,Pe;function ve(e){if(e instanceof t||"Option"===e)return Ce.OPTION;if(e instanceof a||"Repetition"===e)return Ce.REPETITION;if(e instanceof r||"RepetitionMandatory"===e)return Ce.REPETITION_MANDATORY;if(e instanceof s||"RepetitionMandatoryWithSeparator"===e)return Ce.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof o||"RepetitionWithSeparator"===e)return Ce.REPETITION_WITH_SEPARATOR;if(e instanceof c||"Alternation"===e)return Ce.ALTERNATION;throw Error("non exhaustive match")}function Me(t){const{occurrence:e,rule:n,prodType:i,maxLookahead:r}=t,s=ve(i);return s===Ce.ALTERNATION?Be(e,n,r):He(e,n,s,r)}function be(t,e,n,i){const r=t.length,s=P(t,(t=>P(t,(t=>1===t.length))));if(e)return function(e){const i=L(e,(t=>t.GATE));for(let s=0;s<r;s++){const e=t[s],r=e.length,o=i[s];if(void 0===o||!1!==o.call(this))t:for(let t=0;t<r;t++){const i=e[t],r=i.length;for(let t=0;t<r;t++){const e=this.LA(t+1);if(!1===n(e,i[t]))continue t}return s}}};if(s&&!i){const e=L(t,(t=>_(t))),n=H(e,((t,e,n)=>(g(e,(e=>{M(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=n),g(e.categoryMatches,(e=>{M(t,e)||(t[e]=n)}))})),t)),{});return function(){const t=this.LA(1);return n[t.tokenTypeIdx]}}return function(){for(let e=0;e<r;e++){const i=t[e],r=i.length;t:for(let t=0;t<r;t++){const r=i[t],s=r.length;for(let t=0;t<s;t++){const e=this.LA(t+1);if(!1===n(e,r[t]))continue t}return e}}}}function we(t,e,n){const i=P(t,(t=>1===t.length)),r=t.length;if(i&&!n){const e=_(t);if(1===e.length&&W(e[0].categoryMatches)){const t=e[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{const t=H(e,((t,e,n)=>(t[e.tokenTypeIdx]=!0,g(e.categoryMatches,(e=>{t[e]=!0})),t)),[]);return function(){const e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){t:for(let n=0;n<r;n++){const i=t[n],r=i.length;for(let t=0;t<r;t++){const n=this.LA(t+1);if(!1===e(n,i[t]))continue t}return!0}return!1}}(Pe=Ce||(Ce={}))[Pe.OPTION=0]="OPTION",Pe[Pe.REPETITION=1]="REPETITION",Pe[Pe.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",Pe[Pe.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",Pe[Pe.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",Pe[Pe.ALTERNATION=5]="ALTERNATION";class Ue extends rt{constructor(t,e,n){super(),this.topProd=t,this.targetOccurrence=e,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,e,n,i){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=n.concat(i),!0)}walkOption(t,e,n){this.checkIsTarget(t,Ce.OPTION,e,n)||super.walkOption(t,e,n)}walkAtLeastOne(t,e,n){this.checkIsTarget(t,Ce.REPETITION_MANDATORY,e,n)||super.walkOption(t,e,n)}walkAtLeastOneSep(t,e,n){this.checkIsTarget(t,Ce.REPETITION_MANDATORY_WITH_SEPARATOR,e,n)||super.walkOption(t,e,n)}walkMany(t,e,n){this.checkIsTarget(t,Ce.REPETITION,e,n)||super.walkOption(t,e,n)}walkManySep(t,e,n){this.checkIsTarget(t,Ce.REPETITION_WITH_SEPARATOR,e,n)||super.walkOption(t,e,n)}}class Fe extends N{constructor(t,e,n){super(),this.targetOccurrence=t,this.targetProdType=e,this.targetRef=n,this.result=[]}checkIsTarget(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,Ce.OPTION)}visitRepetition(t){this.checkIsTarget(t,Ce.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,Ce.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,Ce.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,Ce.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,Ce.ALTERNATION)}}function De(t){const e=new Array(t);for(let n=0;n<t;n++)e[n]=[];return e}function $e(t){let e=[""];for(let n=0;n<t.length;n++){const i=t[n],r=[];for(let t=0;t<e.length;t++){const n=e[t];r.push(n+"_"+i.tokenTypeIdx);for(let t=0;t<i.categoryMatches.length;t++){const e="_"+i.categoryMatches[t];r.push(n+e)}}e=r}return e}function Ke(t,e,n){for(let i=0;i<t.length;i++){if(i===n)continue;const r=t[i];for(let t=0;t<e.length;t++){if(!0===r[e[t]])return!1}}return!0}function Ge(t,e){const n=L(t,(t=>ke([t],1))),i=De(n.length),r=L(n,(t=>{const e={};return g(t,(t=>{const n=$e(t.partialPath);g(n,(t=>{e[t]=!0}))})),e}));let s=n;for(let o=1;o<=e;o++){const t=s;s=De(t.length);for(let n=0;n<t.length;n++){const a=t[n];for(let t=0;t<a.length;t++){const c=a[t].partialPath,l=a[t].suffixDef,h=$e(c);if(Ke(r,h,n)||W(l)||c.length===e){const t=i[n];if(!1===We(t,c)){t.push(c);for(let t=0;t<h.length;t++){const e=h[t];r[n][e]=!0}}}else{const t=ke(l,o+1,c);s[n]=s[n].concat(t),g(t,(t=>{const e=$e(t.partialPath);g(e,(t=>{r[n][t]=!0}))}))}}}}return i}function Be(t,e,n,i){const r=new Fe(t,Ce.ALTERNATION,i);return e.accept(r),Ge(r.result,n)}function He(t,e,n,r){const s=new Fe(t,n);e.accept(s);const o=s.result,a=new Ue(e,t,n).startWalking();return Ge([new i({definition:o}),new i({definition:a})],r)}function We(t,e){t:for(let n=0;n<t.length;n++){const i=t[n];if(i.length===e.length){for(let t=0;t<i.length;t++){const n=e[t],r=i[t];if(!1===(n===r||void 0!==r.categoryMatchesMap[n.tokenTypeIdx]))continue t}return!0}}return!1}function Ve(t){return P(t,(t=>P(t,(t=>P(t,(t=>W(t.categoryMatches)))))))}function Ye(t,e,n,i){const r=Q(t,(t=>function(t,e){const n=new Xe;t.accept(n);const i=n.allProductions,r=tt(i,ze),s=et(r,(t=>t.length>1)),o=L(C(s),(n=>{const i=z(n),r=e.buildDuplicateFoundError(t,n),s=I(i),o={message:r,type:Wn.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:s,occurrence:i.idx},a=je(i);return a&&(o.parameter=a),o}));return o}(t,n))),s=function(t,e,n){const i=[],r=L(e,(t=>t.name));return g(t,(t=>{const e=t.name;if(x(r,e)){const r=n.buildNamespaceConflictError(t);i.push({message:r,type:Wn.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e})}})),i}(t,e,n),o=Q(t,(t=>function(t,e){const n=new Ze;t.accept(n);const i=n.alternations,r=Q(i,(n=>n.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:n}),type:Wn.TOO_MANY_ALTS,ruleName:t.name,occurrence:n.idx}]:[]));return r}(t,n))),a=Q(t,(e=>function(t,e,n,i){const r=[],s=H(e,((e,n)=>n.name===t.name?e+1:e),0);if(s>1){const e=i.buildDuplicateRuleNameError({topLevelRule:t,grammarName:n});r.push({message:e,type:Wn.DUPLICATE_RULE_NAME,ruleName:t.name})}return r}(e,t,i,n)));return r.concat(s,o,a)}function ze(t){return`${I(t)}_#_${t.idx}_#_${je(t)}`}function je(t){return t instanceof e?t.terminalType.name:t instanceof n?t.nonTerminalName:""}class Xe extends N{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}}function qe(t,e,n,i=[]){const r=[],s=Je(e.definition);if(W(s))return[];{const e=t.name;x(s,t)&&r.push({message:n.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:i}),type:Wn.LEFT_RECURSION,ruleName:e});const o=Y(s,i.concat([t])),a=Q(o,(e=>{const r=j(i);return r.push(e),qe(t,e,n,r)}));return r.concat(a)}}function Je(l){let h=[];if(W(l))return h;const d=z(l);if(d instanceof n)h.push(d.referencedRule);else if(d instanceof i||d instanceof t||d instanceof r||d instanceof s||d instanceof o||d instanceof a)h=h.concat(Je(d.definition));else if(d instanceof c)h=_(L(d.definition,(t=>Je(t.definition))));else if(!(d instanceof e))throw Error("non exhaustive match");const p=u(d),f=l.length>1;if(p&&f){const t=O(l);return h.concat(Je(t))}return h}class Ze extends N{constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}}function Qe(t,e,n){const i=new Ze;t.accept(i);let r=i.alternations;r=w(r,(t=>!0===t.ignoreAmbiguities));const s=Q(r,(i=>{const r=i.idx,s=i.maxLookahead||e,o=Be(r,t,s,i),a=function(t,e,n,i){const r=[],s=H(t,((n,i,s)=>(!0===e.definition[s].ignoreAmbiguities||g(i,(i=>{const o=[s];g(t,((t,n)=>{s!==n&&We(t,i)&&// ignore (skip) ambiguities with this "other" alternative
|
32 |
+
!0!==e.definition[n].ignoreAmbiguities&&o.push(n)})),o.length>1&&!We(r,i)&&(r.push(i),n.push({alts:o,path:i}))})),n)),[]),o=L(s,(t=>{const r=L(t.alts,(t=>t+1));return{message:i.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:r,prefixPath:t.path}),type:Wn.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:t.alts}}));return o}(o,i,t,n),c=function(t,e,n,i){const r=H(t,((t,e,n)=>{const i=L(e,(t=>({idx:n,path:t})));return t.concat(i)}),[]),s=b(Q(r,(t=>{if(!0===e.definition[t.idx].ignoreAmbiguities)return[];const s=t.idx,o=t.path,a=V(r,(t=>{
|
33 |
+
// ignore (skip) ambiguities with this "other" alternative
|
34 |
+
return!0!==e.definition[t.idx].ignoreAmbiguities&&t.idx<s&&(// checking for strict prefix because identical lookaheads
|
35 |
+
// will be be detected using a different validation.
|
36 |
+
n=t.path,i=o,n.length<i.length&&P(n,((t,e)=>{const n=i[e];return t===n||n.categoryMatchesMap[t.tokenTypeIdx]})));var n,i}));return L(a,(t=>{const r=[t.idx+1,s+1],o=0===e.idx?"":e.idx;return{message:i.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:r,prefixPath:t.path}),type:Wn.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:r}}))})));return s}(o,i,t,n);return a.concat(c)}));return s}class tn extends N{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}}function en(t){const e=G(t,{errMsgProvider:me}),n={};return g(t.rules,(t=>{n[t.name]=t})),function(t,e){const n=new Ie(t,e);return n.resolveRefs(),n.errors}(n,e.errMsgProvider)}const nn="MismatchedTokenException",rn="NoViableAltException",sn="EarlyExitException",on="NotAllInputParsedException",an=[nn,rn,sn,on];function cn(t){return x(an,t.name)}Object.freeze(an);class ln extends Error{constructor(t,e){super(t),this.token=e,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class hn extends ln{constructor(t,e,n){super(t,e),this.previousToken=n,this.name=nn}}class un extends ln{constructor(t,e,n){super(t,e),this.previousToken=n,this.name=rn}}class dn extends ln{constructor(t,e){super(t,e),this.name=on}}class pn extends ln{constructor(t,e,n){super(t,e),this.previousToken=n,this.name=sn}}const fn={},Tn="InRuleRecoveryException";class En extends Error{constructor(t){super(t),this.name=Tn}}function mn(t,e,n,i,r,s,o){const a=this.getKeyForAutomaticLookahead(i,r);let c=this.firstAfterRepMap[a];if(void 0===c){const t=this.getCurrRuleFullName();c=new s(this.getGAstProductions()[t],r).startWalking(),this.firstAfterRepMap[a]=c}let l=c.token,h=c.occurrence;const u=c.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===l&&(l=pe,h=1),void 0!==l&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(l,h,o)&&this.tryInRepetitionRecovery(t,e,n,l)}const Rn=1024,In=1280,Nn=1536;function An(t,e,n){return n|e|t}class gn{constructor(t){var e;this.maxLookahead=null!==(e=null==t?void 0:t.maxLookahead)&&void 0!==e?e:Bn.maxLookahead}validate(t){const e=this.validateNoLeftRecursion(t.rules);if(W(e)){const n=this.validateEmptyOrAlternatives(t.rules),i=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),r=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...e,...n,...i,...r]}return e}validateNoLeftRecursion(t){return Q(t,(t=>qe(t,t,Re)))}validateEmptyOrAlternatives(t){return Q(t,(t=>function(t,e){const n=new Ze;t.accept(n);const i=n.alternations;return Q(i,(n=>{const i=Z(n.definition);return Q(i,((i,r)=>{const s=ye([i],[],Gt,1);return W(s)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:n,emptyChoiceIdx:r}),type:Wn.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:n.idx,alternative:r+1}]:[]}))}))}(t,Re)))}validateAmbiguousAlternationAlternatives(t,e){return Q(t,(t=>Qe(t,e,Re)))}validateSomeNonEmptyLookaheadPath(t,e){return function(t,e,n){const i=[];return g(t,(t=>{const r=new tn;t.accept(r);const s=r.allProductions;g(s,(r=>{const s=ve(r),o=r.maxLookahead||e,a=He(r.idx,t,s,o)[0];if(W(_(a))){const e=n.buildEmptyRepetitionError({topLevelRule:t,repetition:r});i.push({message:e,type:Wn.NO_NON_EMPTY_LOOKAHEAD,ruleName:t.name})}}))})),i}(t,e,Re)}buildLookaheadForAlternation(t){return function(t,e,n,i,r,s){const o=Be(t,e,n);return s(o,i,Ve(o)?Bt:Gt,r)}(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,be)}buildLookaheadForOptional(t){return function(t,e,n,i,r,s){const o=He(t,e,r,n),a=Ve(o)?Bt:Gt;return s(o[0],a,i)}(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,ve(t.prodType),we)}}const On=new class extends N{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}};function Sn(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset==!0&&(t.endOffset=e.endOffset)}function Ln(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset==!0&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}function _n(t,e){Object.defineProperty(t,"name",{enumerable:!1,configurable:!0,writable:!1,value:e})}function kn(t,e){const n=U(t),i=n.length;for(let r=0;r<i;r++){const i=t[n[r]],s=i.length;for(let t=0;t<s;t++){const n=i[t];void 0===n.tokenTypeIdx&&this[n.name](n.children,e)}}}function yn(t,e){const n=function(){};_n(n,t+"BaseSemantics");const i={visit:function(t,e){if(v(t)&&(t=t[0]),!D(t))return this[t.name](t.children,e)},validateVisitor:function(){const t=function(t,e){const n=function(t,e){const n=V(e,(e=>!1===K(t[e]))),i=L(n,(e=>({msg:`Missing visitor method: <${e}> on ${t.constructor.name} CST Visitor.`,type:xn.MISSING_METHOD,methodName:e})));return b(i)}(t,e);return n}(this,e);if(!W(t)){const e=L(t,(t=>t.msg));throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${e.join("\n\n").replace(/\n/g,"\n\t")}`)}}};return(n.prototype=i).constructor=n,n._RULE_NAMES=e,n}var xn,Cn;(Cn=xn||(xn={}))[Cn.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",Cn[Cn.MISSING_METHOD=1]="MISSING_METHOD";const Pn={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Pn);const vn=!0,Mn=Math.pow(2,8)-1,bn=de({name:"RECORDING_PHASE_TOKEN",pattern:te.NA});Vt([bn]);const wn=fe(bn,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",
|
37 |
+
// Using "-1" instead of NaN (as in EOF) because an actual number is less likely to
|
38 |
+
// cause errors if the output of LA or CONSUME would be (incorrectly) used during the recording phase.
|
39 |
+
-1,-1,-1,-1,-1,-1);Object.freeze(wn);const Un={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}};function Fn(t,e,n,i=!1){Kn(n);const r=J(this.recordingProdStack),s=K(e)?e:e.DEF,o=new t({definition:[],idx:n});return i&&(o.separator=e.SEP),M(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),r.definition.push(o),this.recordingProdStack.pop(),Pn}function Dn(t,e){Kn(e);const n=J(this.recordingProdStack),r=!1===v(t),s=!1===r?t:t.DEF,o=new c({definition:[],idx:e,ignoreAmbiguities:r&&!0===t.IGNORE_AMBIGUITIES});M(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD);const a=it(s,(t=>K(t.GATE)));return o.hasPredicates=a,n.definition.push(o),g(s,(t=>{const e=new i({definition:[]});o.definition.push(e),M(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:M(t,"GATE")&&(e.ignoreAmbiguities=!0),this.recordingProdStack.push(e),t.ALT.call(this),this.recordingProdStack.pop()})),Pn}function $n(t){return 0===t?"":`${t}`}function Kn(t){if(t<0||t>Mn){const e=new Error(
|
40 |
+
// The stack trace will contain all the needed details
|
41 |
+
`Invalid DSL Method idx value: <${t}>\n\tIdx value must be a none negative value smaller than ${Mn+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}const Gn=fe(pe,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Gn);const Bn=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Ee,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Hn=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var Wn,Vn,Yn;function zn(t=void 0){return function(){return t}}(Vn=Wn||(Wn={}))[Vn.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",Vn[Vn.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",Vn[Vn.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",Vn[Vn.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",Vn[Vn.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",Vn[Vn.LEFT_RECURSION=5]="LEFT_RECURSION",Vn[Vn.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",Vn[Vn.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",Vn[Vn.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",Vn[Vn.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",Vn[Vn.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",Vn[Vn.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",Vn[Vn.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",Vn[Vn.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION";class jn{
|
42 |
+
/**
|
43 |
+
* @deprecated use the **instance** method with the same name instead
|
44 |
+
*/
|
45 |
+
static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",(()=>{let t;this.selfAnalysisDone=!0;const e=this.className;this.TRACE_INIT("toFastProps",(()=>{m(this)})),this.TRACE_INIT("Grammar Recording",(()=>{try{this.enableRecording(),g(this.definedRulesNames,(t=>{const e=this[t].originalGrammarAction;let n;this.TRACE_INIT(`${t} Rule`,(()=>{n=this.topLevelRuleRecord(t,e)})),this.gastProductionsCache[t]=n}))}finally{this.disableRecording()}}));let n=[];if(this.TRACE_INIT("Grammar Resolving",(()=>{n=en({rules:C(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)})),this.TRACE_INIT("Grammar Validations",(()=>{if(W(n)&&!1===this.skipValidations){const n=(t={rules:C(this.gastProductionsCache),tokenTypes:C(this.tokensMap),errMsgProvider:Re,grammarName:e},Ye((t=G(t,{errMsgProvider:Re})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)),i=function(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return L(e,(t=>Object.assign({type:Wn.CUSTOM_LOOKAHEAD_VALIDATION},t)))}({lookaheadStrategy:this.lookaheadStrategy,rules:C(this.gastProductionsCache),tokenTypes:C(this.tokensMap),grammarName:e});this.definitionErrors=this.definitionErrors.concat(n,i)}var t})),W(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",(()=>{const t=function(t){const e={};return g(t,(t=>{const n=new ct(t).startWalking();k(e,n)})),e}(C(this.gastProductionsCache));this.resyncFollows=t})),this.TRACE_INIT("ComputeLookaheadFunctions",(()=>{var t,e;null===(e=(t=this.lookaheadStrategy).initialize)||void 0===e||e.call(t,{rules:C(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(C(this.gastProductionsCache))}))),!jn.DEFER_DEFINITION_ERRORS_HANDLING&&!W(this.definitionErrors))throw t=L(this.definitionErrors,(t=>t.message)),new Error(`Parser Definition Errors detected:\n ${t.join("\n-------------------------------\n")}`)}))}constructor(t,e){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(e),n.initLexerAdapter(),n.initLooksAhead(e),n.initRecognizerEngine(t,e),n.initRecoverable(e),n.initTreeBuilder(e),n.initContentAssist(),n.initGastRecorder(e),n.initPerformanceTracer(e),M(e,"ignoredIssues"))throw new Error("The <ignoredIssues> IParserConfig property has been deprecated.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=M(e,"skipValidations")?e.skipValidations:Bn.skipValidations}}jn.DEFER_DEFINITION_ERRORS_HANDLING=!1,Yn=jn,[class{initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=M(t,"recoveryEnabled")?t.recoveryEnabled:Bn.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=mn)}getTokenToInsert(t){const e=fe(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return e.isInsertedInRecovery=!0,e}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,e,n,i){const r=this.findReSyncTokenType(),s=this.exportLexerState(),o=[];let a=!1;const c=this.LA(1);let l=this.LA(1);const h=()=>{const t=this.LA(0),e=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:c,previous:t,ruleName:this.getCurrRuleFullName()}),n=new hn(e,c,this.LA(0));n.resyncedTokens=Z(o),this.SAVE_ERROR(n)};for(;!a;){if(this.tokenMatcher(l,i))return void h();if(n.call(this))return h(),void t.apply(this,e);this.tokenMatcher(l,r)?a=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,o))}this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(t,e,n){return!1!==n&&!this.tokenMatcher(this.LA(1),t)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e))}
|
46 |
+
// Error Recovery functionality
|
47 |
+
getFollowsForInRuleRecovery(t,e){const n=this.getCurrentGrammarPath(t,e);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){const t=this.SKIP_TOKEN();return this.consumeToken(),t}throw new En("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t))return!1;if(W(e))return!1;const n=this.LA(1);return void 0!==y(e,(t=>this.tokenMatcher(n,t)))}canRecoverWithSingleTokenDeletion(t){return!!this.canTokenTypeBeDeletedInRecovery(t)&&this.tokenMatcher(this.LA(2),t)}isInCurrentRuleReSyncSet(t){const e=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(e);return x(n,t)}findReSyncTokenType(){const t=this.flattenFollowSet();let e=this.LA(1),n=2;for(;;){const i=y(t,(t=>Te(e,t)));if(void 0!==i)return i;e=this.LA(n),n++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return fn;const t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const t=this.RULE_STACK,e=this.RULE_OCCURRENCE_STACK;return L(t,((n,i)=>0===i?fn:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:e[i],inRule:this.shortRuleNameToFullName(t[i-1])}))}flattenFollowSet(){const t=L(this.buildFullFollowKeyStack(),(t=>this.getFollowSetFromFollowKey(t)));return _(t)}getFollowSetFromFollowKey(t){if(t===fn)return[pe];const e=t.ruleName+t.idxInCallingRule+at+t.inRule;return this.resyncFollows[e]}
|
48 |
+
// It does not make any sense to include a virtual EOF token in the list of resynced tokens
|
49 |
+
// as EOF does not really exist and thus does not contain any useful information (line/column numbers)
|
50 |
+
addToResyncTokens(t,e){return this.tokenMatcher(t,pe)||e.push(t),e}reSyncTo(t){const e=[];let n=this.LA(1);for(;!1===this.tokenMatcher(n,t);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,e);return Z(e)}attemptInRepetitionRecovery(t,e,n,i,r,s,o){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:j(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return L(this.RULE_STACK,(t=>this.shortRuleNameToFullName(t)))}},class{initLooksAhead(t){this.dynamicTokensEnabled=M(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:Bn.dynamicTokensEnabled,this.maxLookahead=M(t,"maxLookahead")?t.maxLookahead:Bn.maxLookahead,this.lookaheadStrategy=M(t,"lookaheadStrategy")?t.lookaheadStrategy:new gn({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){g(t,(t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,(()=>{const{alternation:e,repetition:n,option:i,repetitionMandatory:r,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:o}=function(t){On.reset(),t.accept(On);const e=On.dslMethods;return On.reset(),e}(t);g(e,(e=>{const n=0===e.idx?"":e.idx;this.TRACE_INIT(`${I(e)}${n}`,(()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:e.idx,rule:t,maxLookahead:e.maxLookahead||this.maxLookahead,hasPredicates:e.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),i=An(this.fullRuleNameToShort[t.name],256,e.idx);this.setLaFuncCache(i,n)}))})),g(n,(e=>{this.computeLookaheadFunc(t,e.idx,768,"Repetition",e.maxLookahead,I(e))})),g(i,(e=>{this.computeLookaheadFunc(t,e.idx,512,"Option",e.maxLookahead,I(e))})),g(r,(e=>{this.computeLookaheadFunc(t,e.idx,Rn,"RepetitionMandatory",e.maxLookahead,I(e))})),g(s,(e=>{this.computeLookaheadFunc(t,e.idx,Nn,"RepetitionMandatoryWithSeparator",e.maxLookahead,I(e))})),g(o,(e=>{this.computeLookaheadFunc(t,e.idx,In,"RepetitionWithSeparator",e.maxLookahead,I(e))}))}))}))}computeLookaheadFunc(t,e,n,i,r,s){this.TRACE_INIT(`${s}${0===e?"":e}`,(()=>{const s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:e,rule:t,maxLookahead:r||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),o=An(this.fullRuleNameToShort[t.name],n,e);this.setLaFuncCache(o,s)}))}
|
51 |
+
// this actually returns a number, but it is always used as a string (object prop key)
|
52 |
+
getKeyForAutomaticLookahead(t,e){return An(this.getLastExplicitRuleShortName(),t,e)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}
|
53 |
+
/* istanbul ignore next */setLaFuncCache(t,e){this.lookAheadFuncsCache.set(t,e)}},class{initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=M(t,"nodeLocationTracking")?t.nodeLocationTracking:Bn.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ln,this.setNodeLocationFromNode=Ln,this.cstPostRule=q,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Sn,this.setNodeLocationFromNode=Sn,this.cstPostRule=q,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=q,this.setInitialNodeLocation=q}else this.cstInvocationStateUpdate=q,this.cstFinallyStateUpdate=q,this.cstPostTerminal=q,this.cstPostNonTerminal=q,this.cstPostRule=q}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={
|
54 |
+
// without error recovery the starting Location of a new CstNode is guaranteed
|
55 |
+
// To be the next Token's startOffset (for valid inputs).
|
56 |
+
// For invalid inputs there won't be any CSTOutput so this potential
|
57 |
+
// inaccuracy does not matter
|
58 |
+
startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}
|
59 |
+
/**
|
60 |
+
* @see setInitialNodeLocationOnlyOffsetRegular for explanation why this work
|
61 |
+
|
62 |
+
* @param cstNode
|
63 |
+
*/setInitialNodeLocationFullRegular(t){const e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){const e={name:t,children:Object.create(null)};this.setInitialNodeLocation(e),this.CST_STACK.push(e)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){const e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==1?(n.endOffset=e.endOffset,n.endLine=e.endLine,n.endColumn=e.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(t){const e=this.LA(0),n=t.location;n.startOffset<=e.startOffset==1?n.endOffset=e.endOffset:n.startOffset=NaN}cstPostTerminal(t,e){const n=this.CST_STACK[this.CST_STACK.length-1];var i,r,s;r=e,s=t,void 0===(i=n).children[s]?i.children[s]=[r]:i.children[s].push(r),this.setNodeLocationFromToken(n.location,e)}cstPostNonTerminal(t,e){const n=this.CST_STACK[this.CST_STACK.length-1];!function(t,e,n){void 0===t.children[e]?t.children[e]=[n]:t.children[e].push(n)}(n,e,t),this.setNodeLocationFromNode(n.location,t.location)}getBaseCstVisitorConstructor(){if(D(this.baseCstVisitorConstructor)){const t=yn(this.className,U(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(D(this.baseCstVisitorWithDefaultsConstructor)){const t=function(t,e,n){const i=function(){};_n(i,t+"BaseSemanticsWithDefaults");const r=Object.create(n.prototype);return g(e,(t=>{r[t]=kn})),(i.prototype=r).constructor=i,i}(this.className,U(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){const t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){const t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}
|
64 |
+
// skips a token and returns the next token
|
65 |
+
SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Gn}
|
66 |
+
// Lexer (accessing Token vector) related methods which can be overridden to implement lazy lexers
|
67 |
+
// or lexers dependent on parser context.
|
68 |
+
LA(t){const e=this.currIdx+t;return e<0||this.tokVectorLength<=e?Gn:this.tokVector[e]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Bt,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},M(e,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(v(t)){if(W(t))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof t[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(v(t))this.tokensMap=H(t,((t,e)=>(t[e.name]=e,t)),{});else if(M(t,"modes")&&P(_(C(t.modes)),Xt)){const e=_(C(t.modes)),n=S(e);this.tokensMap=H(n,((t,e)=>(t[e.name]=e,t)),{})}else{if(!nt(t))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=j(t)}this.tokensMap.EOF=pe;const n=M(t,"modes")?_(C(t.modes)):C(t),i=P(n,(t=>W(t.categoryMatches)));this.tokenMatcher=i?Bt:Gt,Vt(C(this.tokensMap))}defineRule(t,e,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const i=M(n,"resyncEnabled")?n.resyncEnabled:Hn.resyncEnabled,r=M(n,"recoveryValueFunc")?n.recoveryValueFunc:Hn.recoveryValueFunc,s=this.ruleShortNameIdx<<12;let o;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=t,this.fullRuleNameToShort[t]=s,o=!0===this.outputCst?function(...n){try{this.ruleInvocationStateUpdate(s,t,this.subruleIdx),e.apply(this,n);const i=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(i),i}catch(o){return this.invokeRuleCatch(o,i,r)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(s,t,this.subruleIdx),e.apply(this,n)}catch(o){return this.invokeRuleCatch(o,i,r)}finally{this.ruleFinallyStateUpdate()}},Object.assign(o,{ruleName:t,originalGrammarAction:e})}invokeRuleCatch(t,e,n){const i=1===this.RULE_STACK.length,r=e&&!this.isBackTracking()&&this.recoveryEnabled;if(cn(t)){const e=t;if(r){const i=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(i)){if(e.resyncedTokens=this.reSyncTo(i),this.outputCst){const t=this.CST_STACK[this.CST_STACK.length-1];return t.recoveredNode=!0,t}return n(t)}if(this.outputCst){const t=this.CST_STACK[this.CST_STACK.length-1];t.recoveredNode=!0,e.partialCstResult=t}throw e}if(i)return this.moveToTerminatedState(),n(t);throw e}throw t}
|
69 |
+
// Implementation of parsing DSL
|
70 |
+
optionInternal(t,e){const n=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,n)}optionInternalLogic(t,e,n){let i,r=this.getLaFuncFromCache(n);if("function"!=typeof t){i=t.DEF;const e=t.GATE;if(void 0!==e){const t=r;r=()=>e.call(this)&&t.call(this)}}else i=t;if(!0===r.call(this))return i.call(this)}atLeastOneInternal(t,e){const n=this.getKeyForAutomaticLookahead(Rn,t);return this.atLeastOneInternalLogic(t,e,n)}atLeastOneInternalLogic(t,e,n){let i,r=this.getLaFuncFromCache(n);if("function"!=typeof e){i=e.DEF;const t=e.GATE;if(void 0!==t){const e=r;r=()=>t.call(this)&&e.call(this)}}else i=e;if(!0!==r.call(this))throw this.raiseEarlyExitException(t,Ce.REPETITION_MANDATORY,e.ERR_MSG);{let t=this.doSingleRepetition(i);for(;!0===r.call(this)&&!0===t;)t=this.doSingleRepetition(i)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,e],r,Rn,t,Le)}atLeastOneSepFirstInternal(t,e){const n=this.getKeyForAutomaticLookahead(Nn,t);this.atLeastOneSepFirstInternalLogic(t,e,n)}atLeastOneSepFirstInternalLogic(t,e,n){const i=e.DEF,r=e.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(t,Ce.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);{i.call(this);const e=()=>this.tokenMatcher(this.LA(1),r);for(;!0===this.tokenMatcher(this.LA(1),r);)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,r,e,i,_e],e,Nn,t,_e)}}manyInternal(t,e){const n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,n)}manyInternalLogic(t,e,n){let i,r=this.getLaFuncFromCache(n);if("function"!=typeof e){i=e.DEF;const t=e.GATE;if(void 0!==t){const e=r;r=()=>t.call(this)&&e.call(this)}}else i=e;let s=!0;for(;!0===r.call(this)&&!0===s;)s=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[t,e],r,768,t,Oe,
|
71 |
+
// The notStuck parameter is only relevant when "attemptInRepetitionRecovery"
|
72 |
+
// is invoked from manyInternal, in the MANY_SEP case and AT_LEAST_ONE[_SEP]
|
73 |
+
// An infinite loop cannot occur as:
|
74 |
+
// - Either the lookahead is guaranteed to consume something (Single Token Separator)
|
75 |
+
// - AT_LEAST_ONE by definition is guaranteed to consume something (or error out).
|
76 |
+
s)}manySepFirstInternal(t,e){const n=this.getKeyForAutomaticLookahead(In,t);this.manySepFirstInternalLogic(t,e,n)}manySepFirstInternalLogic(t,e,n){const i=e.DEF,r=e.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){i.call(this);const e=()=>this.tokenMatcher(this.LA(1),r);for(;!0===this.tokenMatcher(this.LA(1),r);)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,r,e,i,Se],e,In,t,Se)}}repetitionSepSecondInternal(t,e,n,i,r){for(;n();)this.CONSUME(e),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,n,i,r],n,Nn,t,r)}doSingleRepetition(t){const e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e}orInternal(t,e){const n=this.getKeyForAutomaticLookahead(256,e),i=v(t)?t:t.DEF,r=this.getLaFuncFromCache(n).call(this,i);if(void 0!==r)return i[r].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new dn(e,t))}}subruleInternal(t,e,n){let i;try{const r=void 0!==n?n.ARGS:void 0;return this.subruleIdx=e,i=t.apply(this,r),this.cstPostNonTerminal(i,void 0!==n&&void 0!==n.LABEL?n.LABEL:t.ruleName),i}catch(r){throw this.subruleInternalError(r,n,t.ruleName)}}subruleInternalError(t,e,n){throw cn(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:n),delete t.partialCstResult),t}consumeInternal(t,e,n){let i;try{const e=this.LA(1);!0===this.tokenMatcher(e,t)?(this.consumeToken(),i=e):this.consumeInternalError(t,e,n)}catch(r){i=this.consumeInternalRecovery(t,e,r)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:t.name,i),i}consumeInternalError(t,e,n){let i;const r=this.LA(0);throw i=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new hn(i,e,r))}consumeInternalRecovery(t,e,n){if(!this.recoveryEnabled||// TODO: more robust checking of the exception type. Perhaps Typescript extending expressions?
|
77 |
+
"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;{const r=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,r)}catch(i){throw i.name===Tn?n:i}}}saveRecogState(){const t=this.errors,e=j(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,e,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),pe)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},class{ACTION(t){return t.call(this)}consume(t,e,n){return this.consumeInternal(e,t,n)}subrule(t,e,n){return this.subruleInternal(e,t,n)}option(t,e){return this.optionInternal(e,t)}or(t,e){return this.orInternal(e,t)}many(t,e){return this.manyInternal(t,e)}atLeastOne(t,e){return this.atLeastOneInternal(t,e)}CONSUME(t,e){return this.consumeInternal(t,0,e)}CONSUME1(t,e){return this.consumeInternal(t,1,e)}CONSUME2(t,e){return this.consumeInternal(t,2,e)}CONSUME3(t,e){return this.consumeInternal(t,3,e)}CONSUME4(t,e){return this.consumeInternal(t,4,e)}CONSUME5(t,e){return this.consumeInternal(t,5,e)}CONSUME6(t,e){return this.consumeInternal(t,6,e)}CONSUME7(t,e){return this.consumeInternal(t,7,e)}CONSUME8(t,e){return this.consumeInternal(t,8,e)}CONSUME9(t,e){return this.consumeInternal(t,9,e)}SUBRULE(t,e){return this.subruleInternal(t,0,e)}SUBRULE1(t,e){return this.subruleInternal(t,1,e)}SUBRULE2(t,e){return this.subruleInternal(t,2,e)}SUBRULE3(t,e){return this.subruleInternal(t,3,e)}SUBRULE4(t,e){return this.subruleInternal(t,4,e)}SUBRULE5(t,e){return this.subruleInternal(t,5,e)}SUBRULE6(t,e){return this.subruleInternal(t,6,e)}SUBRULE7(t,e){return this.subruleInternal(t,7,e)}SUBRULE8(t,e){return this.subruleInternal(t,8,e)}SUBRULE9(t,e){return this.subruleInternal(t,9,e)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,e,n=Hn){if(x(this.definedRulesNames,t)){const e={message:Re.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Wn.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(e)}this.definedRulesNames.push(t);const i=this.defineRule(t,e,n);return this[t]=i,i}OVERRIDE_RULE(t,e,n=Hn){const i=function(t,e,n){const i=[];let r;return x(e,t)||(r=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,i.push({message:r,type:Wn.INVALID_RULE_OVERRIDE,ruleName:t})),i}(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);const r=this.defineRule(t,e,n);return this[t]=r,r}BACKTRACK(t,e){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return t.apply(this,e),!0}catch(i){if(cn(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}
|
78 |
+
// GAST export APIs
|
79 |
+
getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return A(C(this.gastProductionsCache))}},class{initErrorHandler(t){this._errors=[],this.errorMessageProvider=M(t,"errorMessageProvider")?t.errorMessageProvider:Bn.errorMessageProvider}SAVE_ERROR(t){if(cn(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:j(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return j(this._errors)}set errors(t){this._errors=t}
|
80 |
+
// TODO: consider caching the error message computed information
|
81 |
+
raiseEarlyExitException(t,e,n){const i=this.getCurrRuleFullName(),r=He(t,this.getGAstProductions()[i],e,this.maxLookahead)[0],s=[];for(let a=1;a<=this.maxLookahead;a++)s.push(this.LA(a));const o=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:r,actual:s,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new pn(o,this.LA(1),this.LA(0)))}
|
82 |
+
// TODO: consider caching the error message computed information
|
83 |
+
raiseNoAltException(t,e){const n=this.getCurrRuleFullName(),i=Be(t,this.getGAstProductions()[n],this.maxLookahead),r=[];for(let a=1;a<=this.maxLookahead;a++)r.push(this.LA(a));const s=this.LA(0),o=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:r,previous:s,customUserDescription:e,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new un(o,this.LA(1),s))}},class{initContentAssist(){}computeContentAssist(t,e){const n=this.gastProductionsCache[t];if(D(n))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return ye([n],e,this.tokenMatcher,this.maxLookahead)}
|
84 |
+
// TODO: should this be a member method or a utility? it does not have any state or usage of 'this'...
|
85 |
+
// TODO: should this be more explicitly part of the public API?
|
86 |
+
getNextPossibleTokenTypes(t){const e=z(t.ruleStack),n=this.getGAstProductions()[e];return new Ae(n,t).startWalking()}},class{initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(()=>{for(let t=0;t<10;t++){const e=t>0?t:"";this[`CONSUME${e}`]=function(e,n){return this.consumeInternalRecord(e,t,n)},this[`SUBRULE${e}`]=function(e,n){return this.subruleInternalRecord(e,t,n)},this[`OPTION${e}`]=function(e){return this.optionInternalRecord(e,t)},this[`OR${e}`]=function(e){return this.orInternalRecord(e,t)},this[`MANY${e}`]=function(e){this.manyInternalRecord(t,e)},this[`MANY_SEP${e}`]=function(e){this.manySepFirstInternalRecord(t,e)},this[`AT_LEAST_ONE${e}`]=function(e){this.atLeastOneInternalRecord(t,e)},this[`AT_LEAST_ONE_SEP${e}`]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}}this.consume=function(t,e,n){return this.consumeInternalRecord(e,t,n)},this.subrule=function(t,e,n){return this.subruleInternalRecord(e,t,n)},this.option=function(t,e){return this.optionInternalRecord(e,t)},this.or=function(t,e){return this.orInternalRecord(e,t)},this.many=function(t,e){this.manyInternalRecord(t,e)},this.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD}))}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(()=>{const t=this;for(let e=0;e<10;e++){const n=e>0?e:"";delete t[`CONSUME${n}`],delete t[`SUBRULE${n}`],delete t[`OPTION${n}`],delete t[`OR${n}`],delete t[`MANY${n}`],delete t[`MANY_SEP${n}`],delete t[`AT_LEAST_ONE${n}`],delete t[`AT_LEAST_ONE_SEP${n}`]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA}))}
|
87 |
+
// Parser methods are called inside an ACTION?
|
88 |
+
// Maybe try/catch/finally on ACTIONS while disabling the recorders state changes?
|
89 |
+
// @ts-expect-error -- noop place holder
|
90 |
+
ACTION_RECORD(t){}
|
91 |
+
// Executing backtracking logic will break our recording logic assumptions
|
92 |
+
BACKTRACK_RECORD(t,e){return()=>!0}
|
93 |
+
// LA is part of the official API and may be used for custom lookahead logic
|
94 |
+
// by end users who may forget to wrap it in ACTION or inside a GATE
|
95 |
+
LA_RECORD(t){return Gn}topLevelRuleRecord(t,e){try{const n=new R({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),e.call(this),this.recordingProdStack.pop(),n}catch(n){if(!0!==n.KNOWN_RECORDER_ERROR)try{n.message=n.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(i){throw n}throw n}}
|
96 |
+
// Implementation of parsing DSL
|
97 |
+
optionInternalRecord(e,n){return Fn.call(this,t,e,n)}atLeastOneInternalRecord(t,e){Fn.call(this,r,e,t)}atLeastOneSepFirstInternalRecord(t,e){Fn.call(this,s,e,t,vn)}manyInternalRecord(t,e){Fn.call(this,a,e,t)}manySepFirstInternalRecord(t,e){Fn.call(this,o,e,t,vn)}orInternalRecord(t,e){return Dn.call(this,t,e)}subruleInternalRecord(t,e,i){if(Kn(e),!t||!1===M(t,"ruleName")){const n=new Error(`<SUBRULE${$n(e)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=J(this.recordingProdStack),s=t.ruleName,o=new n({idx:e,nonTerminalName:s,label:null==i?void 0:i.LABEL,
|
98 |
+
// The resolving of the `referencedRule` property will be done once all the Rule's GASTs have been created
|
99 |
+
referencedRule:void 0});return r.definition.push(o),this.outputCst?Un:Pn}consumeInternalRecord(t,n,i){if(Kn(n),!zt(t)){const e=new Error(`<CONSUME${$n(n)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw e.KNOWN_RECORDER_ERROR=!0,e}const r=J(this.recordingProdStack),s=new e({idx:n,terminalType:t,label:null==i?void 0:i.LABEL});return r.definition.push(s),wn}},class{initPerformanceTracer(t){if(M(t,"traceInitPerf")){const e=t.traceInitPerf,n="number"==typeof e;this.traceInitMaxIdent=n?e:1/0,this.traceInitPerf=n?e>0:e}else this.traceInitMaxIdent=0,this.traceInitPerf=Bn.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,e){if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent,this.traceInitMaxIdent;const{time:i,value:r}=E(e),s=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${t}> time: ${i}ms`),this.traceInitIndent--,r}return e()}}].forEach((t=>{const e=t.prototype;Object.getOwnPropertyNames(e).forEach((n=>{if("constructor"===n)return;const i=Object.getOwnPropertyDescriptor(e,n);i&&(i.get||i.set)?Object.defineProperty(Yn.prototype,n,i):Yn.prototype[n]=t.prototype[n]}))}));class Xn extends jn{constructor(t,e=Bn){const n=j(e);n.outputCst=!1,super(t,n)}}export{Xn as E,gn as L,ee as a,zn as b,pe as c,Ee as d,te as e,qt as f,Me as g,Te as t};
|
.output/public/assets/chevrotain-allstar-WPou0XcH.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{L as t,g as n,t as e,a as o}from"./chevrotain-Cp5uJ8YW.js";import{T as i,N as s,d as r,O as a,c,b as u,R as f,a as l}from"./@chevrotain-DFy4Htpj.js";import{z as p,m as d,x as h,f as g,g as y,y as v,K as S,H as m,L as k}from"./lodash-es-RhymR7yg.js";function T(t,n,e){return`${t.name}_${n}_${e}`}class A{constructor(t){this.target=t}isEpsilon(){return!1}}class x extends A{constructor(t,n){super(t),this.tokenType=n}}class b extends A{constructor(t){super(t)}isEpsilon(){return!0}}class M extends A{constructor(t,n,e){super(t),this.rule=n,this.followState=e}isEpsilon(){return!0}}function E(t){const n={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};!function(t,n){const e=n.length;for(let o=0;o<e;o++){const e=n[o],i=z(t,e,void 0,{type:2}),s=z(t,e,void 0,{type:7});i.stop=s,t.ruleToStartState.set(e,i),t.ruleToStopState.set(e,s)}}(n,t);const e=t.length;for(let o=0;o<e;o++){const e=t[o],i=w(n,e,e);void 0!==i&&N(n,e,i)}return n}function O(t,n,e){return e instanceof i?_(t,n,e.terminalType,e):e instanceof s?function(t,n,e){const o=e.referencedRule,i=t.ruleToStartState.get(o),s=z(t,n,e,{type:1}),r=z(t,n,e,{type:1}),a=new M(i,o,r);return P(s,a),{left:s,right:r}}(t,n,e):e instanceof r?function(t,n,e){const o=z(t,n,e,{type:1});R(t,o);const i=d(e.definition,(e=>O(t,n,e))),s=$(t,n,o,e,...i);return s}(t,n,e):e instanceof a?function(t,n,e){const o=z(t,n,e,{type:1});R(t,o);const i=$(t,n,o,e,w(t,n,e));return function(t,n,e,o){const i=o.left,s=o.right;return j(i,s),t.decisionMap[T(n,"Option",e.idx)]=i,o}(t,n,e,i)}(t,n,e):e instanceof c?function(t,n,e){const o=z(t,n,e,{type:5});R(t,o);const i=$(t,n,o,e,w(t,n,e));return I(t,n,e,i)}(t,n,e):e instanceof u?function(t,n,e){const o=z(t,n,e,{type:5});R(t,o);const i=$(t,n,o,e,w(t,n,e)),s=_(t,n,e.separator,e);return I(t,n,e,i,s)}(t,n,e):e instanceof f?function(t,n,e){const o=z(t,n,e,{type:4});R(t,o);const i=$(t,n,o,e,w(t,n,e));return L(t,n,e,i)}(t,n,e):e instanceof l?function(t,n,e){const o=z(t,n,e,{type:4});R(t,o);const i=$(t,n,o,e,w(t,n,e)),s=_(t,n,e.separator,e);return L(t,n,e,i,s)}(t,n,e):w(t,n,e)}function w(t,n,e){const o=p(d(e.definition,(e=>O(t,n,e))),(t=>void 0!==t));return 1===o.length?o[0]:0===o.length?void 0:function(t,n){const e=n.length;for(let s=0;s<e-1;s++){const e=n[s];let o;1===e.left.transitions.length&&(o=e.left.transitions[0]);const i=o instanceof M,r=o,a=n[s+1].left;1===e.left.type&&1===e.right.type&&void 0!==o&&(i&&r.followState===e.right||o.target===e.right)?(i?r.followState=a:o.target=a,U(t,e.right)):j(e.right,a)}const o=n[0],i=n[e-1];return{left:o.left,right:i.right}}(t,o)}function L(t,n,e,o,i){const s=o.left,r=o.right,a=z(t,n,e,{type:11});R(t,a);const c=z(t,n,e,{type:12});return s.loopback=a,c.loopback=a,t.decisionMap[T(n,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",e.idx)]=a,j(r,a),void 0===i?(j(a,s),j(a,c)):(j(a,c),j(a,i.left),j(i.right,s)),{left:s,right:c}}function I(t,n,e,o,i){const s=o.left,r=o.right,a=z(t,n,e,{type:10});R(t,a);const c=z(t,n,e,{type:12}),u=z(t,n,e,{type:9});return a.loopback=u,c.loopback=u,j(a,s),j(a,c),j(r,u),void 0!==i?(j(u,c),j(u,i.left),j(i.right,s)):j(u,a),t.decisionMap[T(n,i?"RepetitionWithSeparator":"Repetition",e.idx)]=a,{left:a,right:c}}function R(t,n){return t.decisionStates.push(n),n.decision=t.decisionStates.length-1,n.decision}function $(t,n,e,o,...i){const s=z(t,n,o,{type:8,start:e});e.end=s;for(const r of i)void 0!==r?(j(e,r.left),j(r.right,s)):j(e,s);const p={left:e,right:s};return t.decisionMap[T(n,function(t){if(t instanceof r)return"Alternation";if(t instanceof a)return"Option";if(t instanceof c)return"Repetition";if(t instanceof u)return"RepetitionWithSeparator";if(t instanceof f)return"RepetitionMandatory";if(t instanceof l)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}(o),o.idx)]=e,p}function _(t,n,e,o){const i=z(t,n,o,{type:1}),s=z(t,n,o,{type:1});return P(i,new x(s,e)),{left:i,right:s}}function N(t,n,e){const o=t.ruleToStartState.get(n);j(o,e.left);const i=t.ruleToStopState.get(n);j(e.right,i);return{left:o,right:i}}function j(t,n){P(t,new b(n))}function z(t,n,e,o){const i=Object.assign({atn:t,production:e,epsilonOnlyTransitions:!1,rule:n,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},o);return t.states.push(i),i}function P(t,n){0===t.transitions.length&&(t.epsilonOnlyTransitions=n.isEpsilon()),t.transitions.push(n)}function U(t,n){t.states.splice(t.states.indexOf(n),1)}const W={};class F{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){const n=G(t);n in this.map||(this.map[n]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return d(this.configs,(t=>t.alt))}get key(){let t="";for(const n in this.map)t+=n+":";return t}}function G(t,n=!0){return`${n?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map((t=>t.stateNumber.toString())).join("_")}`}function q(t,n){const e={};return o=>{const i=o.toString();let s=e[i];return void 0!==s||(s={atnStartState:t,decision:n,states:{}},e[i]=s),s}}class B{constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,n){this.predicates[t]=n}toString(){let t="";const n=this.predicates.length;for(let e=0;e<n;e++)t+=!0===this.predicates[e]?"1":"0";return t}}const Y=new B;class C extends t{constructor(t){var n;super(),this.logging=null!==(n=null==t?void 0:t.logging)&&void 0!==n?n:t=>{}}initialize(t){this.atn=E(t.rules),this.dfas=function(t){const n=t.decisionStates.length,e=Array(n);for(let o=0;o<n;o++)e[o]=q(t.decisionStates[o],o);return e}(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){const{prodOccurrence:e,rule:o,hasPredicates:i,dynamicTokensEnabled:s}=t,r=this.dfas,a=this.logging,c=T(o,"Alternation",e),u=this.atn.decisionMap[c].decision,f=d(n({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:o}),(t=>d(t,(t=>t[0]))));if(D(f,!1)&&!s){const t=h(f,((t,n,e)=>(g(n,(n=>{n&&(t[n.tokenTypeIdx]=e,g(n.categoryMatches,(n=>{t[n]=e})))})),t)),{});return i?function(n){var e;const o=this.LA(1),i=t[o.tokenTypeIdx];if(void 0!==n&&void 0!==i){const t=null===(e=n[i])||void 0===e?void 0:e.GATE;if(void 0!==t&&!1===t.call(this))return}return i}:function(){const n=this.LA(1);return t[n.tokenTypeIdx]}}return i?function(t){const n=new B,e=void 0===t?0:t.length;for(let i=0;i<e;i++){const e=null==t?void 0:t[i].GATE;n.set(i,void 0===e||e.call(this))}const o=H.call(this,r,u,n,a);return"number"==typeof o?o:void 0}:function(){const t=H.call(this,r,u,Y,a);return"number"==typeof t?t:void 0}}buildLookaheadForOptional(t){const{prodOccurrence:e,rule:o,prodType:i,dynamicTokensEnabled:s}=t,r=this.dfas,a=this.logging,c=T(o,i,e),u=this.atn.decisionMap[c].decision,f=d(n({maxLookahead:1,occurrence:e,prodType:i,rule:o}),(t=>d(t,(t=>t[0]))));if(D(f)&&f[0][0]&&!s){const t=f[0],n=y(t);if(1===n.length&&v(n[0].categoryMatches)){const t=n[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{const t=h(n,((t,n)=>(void 0!==n&&(t[n.tokenTypeIdx]=!0,g(n.categoryMatches,(n=>{t[n]=!0}))),t)),{});return function(){const n=this.LA(1);return!0===t[n.tokenTypeIdx]}}}return function(){const t=H.call(this,r,u,Y,a);return"object"!=typeof t&&0===t}}}function D(t,n=!0){const e=new Set;for(const o of t){const t=new Set;for(const i of o){if(void 0===i){if(n)break;return!1}const o=[i.tokenTypeIdx].concat(i.categoryMatches);for(const n of o)if(e.has(n)){if(!t.has(n))return!1}else e.add(n),t.add(n)}}return!0}function H(t,n,e,o){const i=t[n](e);let s=i.start;if(void 0===s){s=nt(i,Z(function(t){const n=new F,e=t.transitions.length;for(let o=0;o<e;o++){et({state:t.transitions[o].target,alt:o,stack:[]},n)}return n}(i.atnStartState))),i.start=s}return K.apply(this,[i,s,e,o])}function K(t,n,e,o){let i=n,s=1;const r=[];let a=this.LA(s++);for(;;){let n=(c=a,i.edges[c.tokenTypeIdx]);if(void 0===n&&(n=V.apply(this,[t,i,a,s,e,o])),n===W)return Q(r,i,a);if(!0===n.isAcceptState)return n.prediction;i=n,r.push(a),a=this.LA(s++)}var c}function V(t,n,e,o,i,s){const r=function(t,n,e){const o=new F,i=[];for(const r of t.elements){if(!1===e.is(r.alt))continue;if(7===r.state.type){i.push(r);continue}const t=r.state.transitions.length;for(let e=0;e<t;e++){const t=X(r.state.transitions[e],n);void 0!==t&&o.add({state:t,alt:r.alt,stack:r.stack})}}let s;0===i.length&&1===o.size&&(s=o);if(void 0===s){s=new F;for(const t of o.elements)et(t,s)}if(i.length>0&&!function(t){for(const n of t.elements)if(7===n.state.type)return!0;return!1}(s))for(const r of i)s.add(r);return s}(n.configs,e,i);if(0===r.size)return tt(t,n,e,W),W;let a=Z(r);const c=function(t,n){let e;for(const o of t.elements)if(!0===n.is(o.alt))if(void 0===e)e=o.alt;else if(e!==o.alt)return;return e}(r,i);if(void 0!==c)a.isAcceptState=!0,a.prediction=c,a.configs.uniqueAlt=c;else if(function(t){if(function(t){for(const n of t.elements)if(7!==n.state.type)return!1;return!0}(t))return!0;const n=function(t){const n=new Map;for(const e of t){const t=G(e,!1);let o=n.get(t);void 0===o&&(o={},n.set(t,o)),o[e.alt]=!0}return n}(t.elements);return function(t){for(const n of Array.from(t.values()))if(Object.keys(n).length>1)return!0;return!1}(n)&&!function(t){for(const n of Array.from(t.values()))if(1===Object.keys(n).length)return!0;return!1}(n)}(r)){const n=S(r.alts);a.isAcceptState=!0,a.prediction=n,a.configs.uniqueAlt=n,J.apply(this,[t,o,r.alts,s])}return a=tt(t,n,e,a),a}function J(t,n,e,p){const h=[];for(let o=1;o<=n;o++)h.push(this.LA(o).tokenType);const g=t.atnStartState;p(function(t){const n=d(t.prefixPath,(t=>o(t))).join(", "),e=0===t.production.idx?"":t.production.idx;let p=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${function(t){if(t instanceof s)return"SUBRULE";if(t instanceof a)return"OPTION";if(t instanceof r)return"OR";if(t instanceof f)return"AT_LEAST_ONE";if(t instanceof l)return"AT_LEAST_ONE_SEP";if(t instanceof u)return"MANY_SEP";if(t instanceof c)return"MANY";if(t instanceof i)return"CONSUME";throw Error("non exhaustive match")}(t.production)}${e}> inside <${t.topLevelRule.name}> Rule,\n<${n}> may appears as a prefix path in all these alternatives.\n`;return p+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",p}({topLevelRule:g.rule,ambiguityIndices:e,production:g.production,prefixPath:h}))}function Q(t,n,e){const o=m(n.configs.elements,(t=>t.state.transitions));return{actualToken:e,possibleTokenTypes:k(o.filter((t=>t instanceof x)).map((t=>t.tokenType)),(t=>t.tokenTypeIdx)),tokenPath:t}}function X(t,n){if(t instanceof x&&e(n,t.tokenType))return t.target}function Z(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function tt(t,n,e,o){return o=nt(t,o),n.edges[e.tokenTypeIdx]=o,o}function nt(t,n){if(n===W)return n;const e=n.configs.key,o=t.states[e];return void 0!==o?o:(n.configs.finalize(),t.states[e]=n,n)}function et(t,n){const e=t.state;if(7===e.type){if(t.stack.length>0){const e=[...t.stack];et({state:e.pop(),alt:t.alt,stack:e},n)}else n.add(t);return}e.epsilonOnlyTransitions||n.add(t);const o=e.transitions.length;for(let i=0;i<o;i++){const o=ot(t,e.transitions[i]);void 0!==o&&et(o,n)}}function ot(t,n){if(n instanceof b)return{state:n.target,alt:t.alt,stack:t.stack};if(n instanceof M){const e=[...t.stack,n.followState];return{state:n.target,alt:t.alt,stack:e}}}export{C as L};
|
.output/public/assets/content-ZDhKySfk.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
import{U as e,A as t,_ as o,a}from"./ToolBar.vue_vue_type_style_index_0_lang-DoYvgSjk.js";import{_ as l}from"./ChatInput.vue_vue_type_style_index_0_lang-CtKQjmWn.js";import{b as s,u as n,d as i,t as r,m as u,B as c}from"./_plugin-vue_export-helper-0drS65lc.js";import{a as m,u as p}from"./vue-router-DbZJX5bT.js";import{m as d}from"./markdown-DcXY1cgb.js";import{s as v,c as f,P as j,T as g,A as h,r as x,g as y,f as _}from"./tdesign-vue-next-CHJ-1YYh.js";import{c as w,ad as b,_ as k,a4 as C,a5 as T,a3 as z,ae as E}from"./tdesign-icons-vue-next-CCrD-Br3.js";import{l as B,a as $,V as H,w as I,o as S,v as V,y as M,z as R,A,R as O,aa as q,u as D,F,n as L,f as P,J as N,ab as J,I as U,H as W}from"./@vue-COP35Tvs.js";import{a as K}from"./main-CIVI3Nwp.js";import"./@wdns-kgTb0OXQ.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./lodash-es-RhymR7yg.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./ua-parser-js--QiuJfYt.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./uuid-_R2nDvl_.js";import"./mammoth-Cw8VHd7C.js";import"./xlsx-DB6BMndo.js";import"./pdfjs-dist-8WFUNQXM.js";import"./pinia-DYvg5Pdn.js";import"./pinia-plugin-persistedstate-DyrI1rJI.js";import"./destr-ClW9AvhW.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./lodash-VDnThKtA.js";import"./eventsource-parser-D0ssca5s.js";import"./@vueuse-BsV7VRb2.js";import"./vue-i18n-DTZjQIEs.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./markdown-it-link-attributes-DRKqjf49.js";import"./markdown-it-C8SkdHr7.js";import"./mdurl-CDXpswLz.js";import"./uc.micro-CLkLCS2f.js";import"./entities-D7HTx9ov.js";import"./linkify-it-LcVOBuC5.js";import"./punycode.js-Bmr3cAX8.js";import"./@traptitech-xv_Vpjqh.js";import"./katex-Vs6-m9jZ.js";import"./markdown-it-highlightjs-DU5UZju5.js";import"./highlight.js-CmHaQWnk.js";import"./mermaid-r27wrvTx.js";import"./ts-dedent-CttZBlkd.js";import"./d3-transition-0ltv4da8.js";import"./d3-timer-keMr1twq.js";import"./d3-dispatch-Chq_f_hl.js";import"./d3-interpolate-Ct9kki6l.js";import"./d3-color-D5ULnJIe.js";import"./d3-selection-Oxnq6l6A.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-Dz8HuW59.js";import"./dompurify-z_KyBU9t.js";import"./stylis-Cl7w7uv3.js";import"./dagre-d3-es-D8JeTxsO.js";import"./@braintree-BB7t-Iuh.js";import"./khroma-C2oHPU0S.js";import"./dayjs-Cbdj87rt.js";import"./d3-scale-CdkN4P7M.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-BhN1wQGI.js";import"./d3-format-C0lSXcPg.js";import"./d3-time-format-DB2uBv1t.js";import"./d3-time-B1kAM736.js";import"./d3-axis-pCwzqJ1S.js";import"./d3-shape-C6CU9yox.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-Bkc4UHOn.js";import"./cytoscape-DQzyuV5c.js";import"./cytoscape-cose-bilkent-CcQu5e-H.js";import"./cose-base-kQthUiMK.js";import"./layout-base-DqRk0Tgc.js";import"./d3-sankey-B6tQBass.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./@iconify-BUO7KvjM.js";import"./marked-CrLTNeyQ.js";import"./cytoscape-fcose-B58q80h4.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./vuedraggable-B95MGA-k.js";import"./vue-DJZ4t1rv.js";const X={key:0,class:"markdown-body"},Y=["innerHTML"],Q={key:1},Z={class:"flex justify-end mt-2 gap-5"},G=B({__name:"NoteContent",props:{content:{},isEditing:{type:Boolean,default:!1}},emits:["save","cancel"],setup(e,{emit:t}){const o=e,a=$(""),l=$(!1),s=$(!1);let n=null;const i=async()=>{o.content&&(n&&clearTimeout(n),n=window.setTimeout((async()=>{try{l.value=!0,a.value=await d.render(o.content)}catch(e){s.value=!0}finally{l.value=!1}}),100))};H((()=>{n&&clearTimeout(n)})),I((()=>o.content),(()=>{i()}),{immediate:!0}),S((()=>{o.content&&!a.value&&i()}));const r=t,u=$(o.content),c=()=>{r("save",u.value)},m=()=>{u.value=o.content,r("cancel")},p=(e,t)=>{t.e.relatedTarget||m()},j=$(null);return I((()=>o.isEditing),(e=>{e&&(u.value=o.content,L((()=>{j.value.$el.querySelector("textarea").focus()})))})),(e,t)=>{const o=v,l=f;return M(),V(F,null,[e.isEditing?R("",!0):(M(),V("div",X,[A("div",{innerHTML:a.value},null,8,Y)])),e.isEditing?(M(),V("div",Q,[O(o,{ref_key:"textareaRef",ref:j,modelValue:u.value,"onUpdate:modelValue":t[0]||(t[0]=e=>u.value=e),autosize:{minRows:2,maxRows:20},onBlur:p},null,8,["modelValue"]),A("div",Z,[O(l,{size:"large",shape:"circle",variant:"text",onClick:m},{default:q((()=>[O(D(w),{slot:"icon"})])),_:1}),O(l,{size:"large",shape:"circle",variant:"text",onClick:c},{default:q((()=>[O(D(b),{slot:"icon"})])),_:1})])])):R("",!0)],64)}}}),ee={class:"flex justify-between w-full"},te={class:"flex-1"},oe={key:0,class:"text-xl font-bold"},ae={class:"flex align-middle items-center gap-2"},le={class:"flex flex-1 overflow-hidden"},se={class:"flex-1 relative h-full overflow-y-auto no-scrollbar flex flex-col gap-5"},ne={key:0,class:"flex w-full justify-end items-start gap-2 note-item"},ie={class:"flex justify-end overflow-hidden h-[24px]"},re={class:"bg-color-page p-4 rounded-lg"},ue={class:"flex justify-end gap-2 note-item-tools"},ce={class:"w-[24px] h-[24px]"},me={key:1,class:"flex w-full justify-end items-start flex-row-reverse gap-2 note-item"},pe={class:"flex flex-col gap-2 w-[calc(100%-24px-1rem)]"},de={class:"flex justify-between overflow-hidden h-[24px]"},ve={class:"bg-color-page p-4 rounded-lg"},fe={class:"flex justify-end gap-2 note-item-tools"},je={class:"w-[24px] h-[24px]"},ge={class:"flex w-full justify-end note-item items-start gap-2"},he={class:"flex justify-end overflow-hidden h-[24px]"},xe={class:"bg-color-page p-4 rounded-lg"},ye={key:0,class:"loader"},_e={class:"flex justify-end gap-2 note-item-tools"},we={class:"w-[24px] h-[24px]"},be={key:0,class:"w-1/2"},ke=B({__name:"content",setup(d){var v;const w=$(null),B=$(null),H=s(),S=K();m();const X=p(),Y=$(),Q=n(),Z=$(!1),ke=i();I((()=>X.query.id),(e=>{if("/note/content"!==X.path)return void(Y.value=null);let t=e;Y.value=S.find(t)}),{immediate:!0});const Ce=P((()=>Q.showLayoutHeader&&Q.showFooter?"h-[calc(100vh-var(--td-comp-size-xxl)-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]":Q.showLayoutHeader&&!Q.showFooter?"h-[calc(100vh-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]":!Q.showLayoutHeader&&Q.showFooter?"h-[calc(100vh-var(--td-comp-size-xxl)-2*var(--td-comp-paddingTB-m))]":"h-[calc(100vh-2*var(--td-comp-paddingTB-m))]"));let Te=null;const ze=$(!1),Ee=async e=>{var t;if(e.content)if(e.content.startsWith("@")){const{name:t,content:o}=function(e){const t=e.indexOf("@");if(-1===t)return null;let o=e.indexOf(" ",t);const a=e.indexOf("(",t),l=e.indexOf(")",t);return-1!==a&&-1!==l&&l>a?o=e.indexOf(" ",l):-1===o&&(o=e.length),{name:e.substring(t+1,o).trim(),content:e.substring(o).trim()}}(e.content),a="ai"===t?ke.find(H.assistModel):ke.enableModels.find((e=>u.getModelItemTitle(e)===t));let l=o;Y.value.notes.push(`# ${l}`);try{let e="";for(let t=0;t<Y.value.chats.length;t++){const o=Y.value.chats[t];"user"===o.role&&(e+=`<|im_start|>user\n${o.content}<|im_end|>\n`),"assistant"===o.role&&(e+=`<|im_start|>assistant\n${o.content}<|im_end|>\n`)}for(let t=0;t<Y.value.notes.length;t++){e+=`<|im_start|>user\n${Y.value.notes[t]}<|im_end|>`}e+=`<|im_start|>user\n${o}<|im_end|>`,Te=setInterval(Be,0),ze.value=!0,await c(a,e,(e=>{ze.value&&(ze.value=!1),Y.value.notes[Y.value.notes.length-1]=`# ${l}\n`+e}))}finally{null!==Te&&(clearInterval(Te),Te=null)}}else Y.value.notes.push(e.content),t=0,L((()=>{setTimeout((()=>{var e;null==(e=w.value)||e.scrollTo({top:w.value.scrollHeight,behavior:"smooth"})}),t)}));else _.error(r("pages.note.noteEmptyError"))},Be=async()=>{for(var e;null!==Te;)await new Promise((e=>setTimeout(e,300))),null==(e=w.value)||e.scrollTo({top:w.value.scrollHeight,behavior:"instant"})},$e=$(!1);let He=$("");const Ie=()=>{$e.value=!1},Se=$(null),Ve=$(null==(v=Y.value)?void 0:v.title),Me=(e,t)=>{t.e.relatedTarget||(Z.value=!1)},Re=()=>{Y.value.title=Ve.value,Z.value=!1},Ae=()=>{var e;Ve.value=null==(e=Y.value)?void 0:e.title,Z.value=!0,L((()=>{Se.value.$el.querySelector("input").focus()}))},Oe=$(-1),qe=e=>{Oe.value=e},De=e=>{Y.value.chats[Oe.value].content.text=e,Oe.value=-1},Fe=()=>{Oe.value=-1},Le=$(-1),Pe=e=>{Y.value.notes[Le.value]=e,Le.value=-1},Ne=()=>{Le.value=-1},Je=()=>{navigator.clipboard.writeText(JSON.stringify(Y.value)),_.success(r("pages.note.noteCopySuccess"))};return(s,n)=>{const i=x,u=f,c=g,m=j,p=h;return Y.value?(M(),N(D(y),{key:0,class:U(["note-page overflow-hidden flex flex-col",[Ce.value]]),"header-bordered":"",title:Y.value.title,bordered:!1},{header:q((()=>[A("div",ee,[A("div",te,[Z.value?(M(),N(i,{key:1,ref_key:"inputTitleRef",ref:Se,type:"text",modelValue:Ve.value,"onUpdate:modelValue":n[0]||(n[0]=e=>Ve.value=e),onEnter:Re,onBlur:Me},null,8,["modelValue"])):(M(),V("h1",oe,W(Y.value.title),1))]),A("div",ae,[O(c,{content:D(r)("pages.note.noteRenameTooltip"),placement:"top"},{default:q((()=>[Z.value?(M(),N(u,{key:1,size:"small",shape:"circle",variant:"text",onClick:Re},{default:q((()=>[O(D(b),{slot:"icon"})])),_:1})):(M(),N(u,{key:0,size:"small",shape:"circle",variant:"text",onClick:Ae},{default:q((()=>[O(D(E),{slot:"icon"})])),_:1}))])),_:1},8,["content"]),O(u,{size:"small",shape:"circle",variant:"text",onClick:Je},{default:q((()=>[O(D(T),{slot:"icon"})])),_:1})])])])),content:q((()=>[A("div",{ref_key:"scrollable_chat",ref:w,class:"h-full note-content flex flex-col gap-1 relative",onMouseupPassive:n[1]||(n[1]=//@ts-ignore
|
2 |
+
(...e)=>{var t,o;return(null==(t=B.value)?void 0:t.showToolbox)&&(null==(o=B.value)?void 0:o.showToolbox(...e))}),onMousedownPassive:n[2]||(n[2]=//@ts-ignore
|
3 |
+
(...e)=>{var t,o;return(null==(t=B.value)?void 0:t.hideToolbox)&&(null==(o=B.value)?void 0:o.hideToolbox(...e))})},[A("div",le,[A("div",se,[(M(!0),V(F,null,J(Y.value.chats,((o,a)=>(M(),V(F,null,["user"===o.role?(M(),V("div",ne,[A("div",{class:U(["flex flex-col gap-2",Oe.value===a?"w-full":""])},[A("div",ie,W(D(H).name),1),A("div",re,[O(e,{content:o.content,isEditing:Oe.value===a,onSave:De,onCancel:Fe},null,8,["content","isEditing"])]),A("div",ue,[O(m,{theme:"danger",content:D(r)("pages.note.noteDeleteConfirm"),placement:"bottom",onConfirm:e=>(e=>{const t=Y.value.chats.findIndex((t=>t===e));-1!==t&&Y.value.chats.splice(t,2)})(o)},{default:q((()=>[O(c,{content:D(r)("pages.note.noteDeleteTooltip")},{default:q((()=>[O(u,{size:"small",variant:"outline"},{default:q((()=>[O(D(k),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:2},1032,["content","onConfirm"]),O(c,{content:D(r)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:q((()=>[O(u,{size:"small",variant:"outline",onClick:e=>qe(a)},{default:q((()=>[O(D(C),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"])])],2),A("div",ce,[O(p,{size:"24px",image:D(H).avatar},null,8,["image"])])])):"assistant"===o.role?(M(),V("div",me,[A("div",pe,[A("div",de,[A("div",null,W(Y.value.conversationName),1)]),A("div",ve,[O(t,{content:o.content,isEditing:Oe.value===a,onSave:De,onCancel:Fe},null,8,["content","isEditing"])]),A("div",fe,[O(c,{content:D(r)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:q((()=>[O(u,{size:"small",variant:"outline",onClick:e=>qe(a)},{default:q((()=>[O(D(C),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),O(c,{content:D(r)("pages.note.noteCopyTooltip")},{default:q((()=>[O(u,{size:"small",variant:"outline",onClick:e=>{return t=o,navigator.clipboard.writeText(t.content.text),void _.success(r("pages.note.noteCopySuccess"));var t}},{default:q((()=>[O(D(T),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"]),O(c,{content:D(r)("pages.conversation.toggle_artifacts")},{default:q((()=>[O(u,{size:"small",variant:"outline",onClick:e=>{var t;"assistant"===(t=o).role&&($e.value=!$e.value,$e.value&&(He.value=t.content.text))}},{default:q((()=>[O(D(z),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"])])]),A("div",je,[O(p,{size:"24px",image:Y.value.conversationAvatar},null,8,["image"])])])):R("",!0)],64)))),256)),(M(!0),V(F,null,J(Y.value.notes,((e,t)=>(M(),V("div",ge,[A("div",{class:U(["flex flex-col gap-2 min-w-[300px]",Le.value===t?"w-full":""])},[A("div",he,W(D(H).name),1),A("div",xe,[ze.value&&t===Y.value.notes.length-1?(M(),V("span",ye)):(M(),N(G,{key:1,content:e,isEditing:Le.value===t,onSave:Pe,onCancel:Ne},null,8,["content","isEditing"]))]),A("div",_e,[O(m,{theme:"danger",content:D(r)("pages.note.noteDeleteConfirm"),placement:"bottom",onConfirm:e=>(e=>{Y.value.notes.splice(e,1)})(t)},{default:q((()=>[O(c,{content:D(r)("pages.note.noteDeleteTooltip")},{default:q((()=>[O(u,{size:"small",variant:"outline"},{default:q((()=>[O(D(k),{slot:"icon"})])),_:1})])),_:1},8,["content"])])),_:2},1032,["content","onConfirm"]),O(c,{content:D(r)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:q((()=>[O(u,{size:"small",variant:"outline",onClick:e=>(e=>{Le.value=e})(t)},{default:q((()=>[O(D(C),{slot:"icon"})])),_:2},1032,["onClick"])])),_:2},1032,["content"])])],2),A("div",we,[O(p,{size:"24px",image:D(H).avatar},null,8,["image"])])])))),256))]),$e.value?(M(),V("div",be,[O(o,{content:D(He),closeBtn:Ie},null,8,["content"])])):R("",!0)]),O(a,{ref_key:"toolbar",ref:B,parent:w.value},null,8,["parent"])],544)])),footer:q((()=>[O(l,{"show-upload":!1,"auto-complete-enabled":!0,placeholder:s.$t("pages.note.notePlaceholder"),onInput:Ee},null,8,["placeholder"])])),_:1},8,["class","title"])):R("",!0)}}});export{ke as default};
|
.output/public/assets/cytoscape-DQzyuV5c.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
.output/public/assets/cytoscape-fcose-B58q80h4.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
.output/public/assets/d3-CYv1AZUL.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import"./d3-transition-0ltv4da8.js";import"./d3-zoom-Dz8HuW59.js";
|
.output/public/assets/d3-array-BhN1wQGI.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
function t(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function n(t,n){return null==t||null==n?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function r(r){let o,u,l;function f(t,n,r=0,e=t.length){if(r<e){if(0!==o(n,n))return e;do{const o=r+e>>>1;u(t[o],n)<0?r=o+1:e=o}while(r<e)}return r}return 2!==r.length?(o=t,u=(n,e)=>t(r(n),e),l=(t,n)=>r(t)-n):(o=r===t||r===n?r:e,u=r,l=r),{left:f,center:function(t,n,r=0,e=t.length){const o=f(t,n,r,e-1);return o>r&&l(t[o-1],n)>-l(t[o],n)?o-1:o},right:function(t,n,r=0,e=t.length){if(r<e){if(0!==o(n,n))return e;do{const o=r+e>>>1;u(t[o],n)<=0?r=o+1:e=o}while(r<e)}return r}}}function e(){return 0}const o=r(t).right;r((function(t){return null===t?NaN:+t})).center;const u=Math.sqrt(50),l=Math.sqrt(10),f=Math.sqrt(2);function i(t,n,r){const e=(n-t)/Math.max(0,r),o=Math.floor(Math.log10(e)),a=e/Math.pow(10,o),c=a>=u?10:a>=l?5:a>=f?2:1;let s,h,M;return o<0?(M=Math.pow(10,-o)/c,s=Math.round(t*M),h=Math.round(n*M),s/M<t&&++s,h/M>n&&--h,M=-M):(M=Math.pow(10,o)*c,s=Math.round(t/M),h=Math.round(n/M),s*M<t&&++s,h*M>n&&--h),h<s&&.5<=r&&r<2?i(t,n,2*r):[s,h,M]}function a(t,n,r){if(!((r=+r)>0))return[];if((t=+t)===(n=+n))return[t];const e=n<t,[o,u,l]=e?i(n,t,r):i(t,n,r);if(!(u>=o))return[];const f=u-o+1,a=new Array(f);if(e)if(l<0)for(let i=0;i<f;++i)a[i]=(u-i)/-l;else for(let i=0;i<f;++i)a[i]=(u-i)*l;else if(l<0)for(let i=0;i<f;++i)a[i]=(o+i)/-l;else for(let i=0;i<f;++i)a[i]=(o+i)*l;return a}function c(t,n,r){return i(t=+t,n=+n,r=+r)[2]}function s(t,n,r){r=+r;const e=(n=+n)<(t=+t),o=e?c(n,t,r):c(t,n,r);return(e?-1:1)*(o<0?1/-o:o)}function h(t,n){let r;if(void 0===n)for(const e of t)null!=e&&(r<e||void 0===r&&e>=e)&&(r=e);else{let e=-1;for(let o of t)null!=(o=n(o,++e,t))&&(r<o||void 0===r&&o>=o)&&(r=o)}return r}function M(t,n){let r;if(void 0===n)for(const e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let e=-1;for(let o of t)null!=(o=n(o,++e,t))&&(r>o||void 0===r&&o>=o)&&(r=o)}return r}function d(t,n,r){t=+t,n=+n,r=(o=arguments.length)<2?(n=t,t=0,1):o<3?1:+r;for(var e=-1,o=0|Math.max(0,Math.ceil((n-t)/r)),u=new Array(o);++e<o;)u[e]=t+e*r;return u}export{a,o as b,c,r as d,h as e,M as m,d as r,s as t};
|
.output/public/assets/d3-brush-M2K_6cxE.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import"./d3-transition-0ltv4da8.js";
|
.output/public/assets/d3-fetch-l0sNRNKZ.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
|
.output/public/assets/d3-sankey-B6tQBass.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
function t(t,n){let o;if(void 0===n)for(const e of t)null!=e&&(o<e||void 0===o&&e>=e)&&(o=e);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(o<r||void 0===o&&r>=r)&&(o=r)}return o}function n(t,n){let o;if(void 0===n)for(const e of t)null!=e&&(o>e||void 0===o&&e>=e)&&(o=e);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(o>r||void 0===o&&r>=r)&&(o=r)}return o}function o(t,n){let o=0;if(void 0===n)for(let e of t)(e=+e)&&(o+=e);else{let e=-1;for(let r of t)(r=+n(r,++e,t))&&(o+=r)}return o}function e(t){return t.target.depth}function r(t){return t.depth}function i(t,n){return n-1-t.height}function s(t,n){return t.sourceLinks.length?t.depth:n-1}function u(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?n(t.sourceLinks,e)-1:0}function f(t){return function(){return t}}function c(t,n){return l(t.source,n.source)||t.index-n.index}function h(t,n){return l(t.target,n.target)||t.index-n.index}function l(t,n){return t.y0-n.y0}function a(t){return t.value}function y(t){return t.index}function g(t){return t.nodes}function d(t){return t.links}function _(t,n){const o=t.get(n);if(!o)throw new Error("missing: "+n);return o}function p({nodes:t}){for(const n of t){let t=n.y0,o=t;for(const e of n.sourceLinks)e.y0=t+e.width/2,t+=e.width;for(const e of n.targetLinks)e.y1=o+e.width/2,o+=e.width}}function k(){let e,r,i,u=0,k=0,x=1,L=1,v=24,w=8,M=y,b=s,S=g,m=d,A=6;function T(){const s={nodes:S.apply(null,arguments),links:m.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,r]of t.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const o=new Map(t.map(((n,o)=>[M(n,o,t),n])));for(const[e,r]of n.entries()){r.index=e;let{source:t,target:n}=r;"object"!=typeof t&&(t=r.source=_(o,t)),"object"!=typeof n&&(n=r.target=_(o,n)),t.sourceLinks.push(r),n.targetLinks.push(r)}if(null!=i)for(const{sourceLinks:e,targetLinks:r}of t)e.sort(i),r.sort(i)}(s),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(o(n.sourceLinks,a),o(n.targetLinks,a)):n.fixedValue}(s),function({nodes:t}){const n=t.length;let o=new Set(t),e=new Set,r=0;for(;o.size;){for(const t of o){t.depth=r;for(const{target:n}of t.sourceLinks)e.add(n)}if(++r>n)throw new Error("circular link");o=e,e=new Set}}(s),function({nodes:t}){const n=t.length;let o=new Set(t),e=new Set,r=0;for(;o.size;){for(const t of o){t.height=r;for(const{source:n}of t.targetLinks)e.add(n)}if(++r>n)throw new Error("circular link");o=e,e=new Set}}(s),function(i){const s=function({nodes:n}){const o=t(n,(t=>t.depth))+1,e=(x-u-v)/(o-1),i=new Array(o);for(const t of n){const n=Math.max(0,Math.min(o-1,Math.floor(b.call(null,t,o))));t.layer=n,t.x0=u+n*e,t.x1=t.x0+v,i[n]?i[n].push(t):i[n]=[t]}if(r)for(const t of i)t.sort(r);return i}(i);e=Math.min(w,(L-k)/(t(s,(t=>t.length))-1)),function(t){const r=n(t,(t=>(L-k-(t.length-1)*e)/o(t,a)));for(const n of t){let t=k;for(const o of n){o.y0=t,o.y1=t+o.value*r,t=o.y1+e;for(const t of o.sourceLinks)t.width=t.value*r}t=(L-t+e)/(n.length+1);for(let o=0;o<n.length;++o){const e=n[o];e.y0+=t*(o+1),e.y1+=t*(o+1)}I(n)}}(s);for(let t=0;t<A;++t){const n=Math.pow(.99,t),o=Math.max(1-n,(t+1)/A);E(s,n,o),z(s,n,o)}}(s),p(s),s}function z(t,n,o){for(let e=1,i=t.length;e<i;++e){const i=t[e];for(const t of i){let o=0,e=0;for(const{source:n,value:i}of t.targetLinks){let r=i*(t.layer-n.layer);o+=V(n,t)*r,e+=r}if(!(e>0))continue;let r=(o/e-t.y0)*n;t.y0+=r,t.y1+=r,P(t)}void 0===r&&i.sort(l),C(i,o)}}function E(t,n,o){for(let e=t.length-2;e>=0;--e){const i=t[e];for(const t of i){let o=0,e=0;for(const{target:n,value:i}of t.sourceLinks){let r=i*(n.layer-t.layer);o+=Z(t,n)*r,e+=r}if(!(e>0))continue;let r=(o/e-t.y0)*n;t.y0+=r,t.y1+=r,P(t)}void 0===r&&i.sort(l),C(i,o)}}function C(t,n){const o=t.length>>1,r=t[o];q(t,r.y0-e,o-1,n),j(t,r.y1+e,o+1,n),q(t,L,t.length-1,n),j(t,k,0,n)}function j(t,n,o,r){for(;o<t.length;++o){const i=t[o],s=(n-i.y0)*r;s>1e-6&&(i.y0+=s,i.y1+=s),n=i.y1+e}}function q(t,n,o,r){for(;o>=0;--o){const i=t[o],s=(i.y1-n)*r;s>1e-6&&(i.y0-=s,i.y1-=s),n=i.y0-e}}function P({sourceLinks:t,targetLinks:n}){if(void 0===i){for(const{source:{sourceLinks:t}}of n)t.sort(h);for(const{target:{targetLinks:n}}of t)n.sort(c)}}function I(t){if(void 0===i)for(const{sourceLinks:n,targetLinks:o}of t)n.sort(h),o.sort(c)}function V(t,n){let o=t.y0-(t.sourceLinks.length-1)*e/2;for(const{target:r,width:i}of t.sourceLinks){if(r===n)break;o+=i+e}for(const{source:e,width:r}of n.targetLinks){if(e===t)break;o-=r}return o}function Z(t,n){let o=n.y0-(n.targetLinks.length-1)*e/2;for(const{source:r,width:i}of n.targetLinks){if(r===t)break;o+=i+e}for(const{target:e,width:r}of t.sourceLinks){if(e===n)break;o-=r}return o}return T.update=function(t){return p(t),t},T.nodeId=function(t){return arguments.length?(M="function"==typeof t?t:f(t),T):M},T.nodeAlign=function(t){return arguments.length?(b="function"==typeof t?t:f(t),T):b},T.nodeSort=function(t){return arguments.length?(r=t,T):r},T.nodeWidth=function(t){return arguments.length?(v=+t,T):v},T.nodePadding=function(t){return arguments.length?(w=e=+t,T):w},T.nodes=function(t){return arguments.length?(S="function"==typeof t?t:f(t),T):S},T.links=function(t){return arguments.length?(m="function"==typeof t?t:f(t),T):m},T.linkSort=function(t){return arguments.length?(i=t,T):i},T.size=function(t){return arguments.length?(u=k=0,x=+t[0],L=+t[1],T):[x-u,L-k]},T.extent=function(t){return arguments.length?(u=+t[0][0],x=+t[1][0],k=+t[0][1],L=+t[1][1],T):[[u,k],[x,L]]},T.iterations=function(t){return arguments.length?(A=+t,T):A},T}var x=Math.PI,L=2*x,v=1e-6,w=L-v;function M(){this._x0=this._y0=// start of current subpath
|
2 |
+
this._x1=this._y1=null,this._=""}function b(){return new M}function S(t){return function(){return t}}function m(t){return t[0]}function A(t){return t[1]}M.prototype=b.prototype={constructor:M,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,o,e){this._+="Q"+ +t+","+ +n+","+(this._x1=+o)+","+(this._y1=+e)},bezierCurveTo:function(t,n,o,e,r,i){this._+="C"+ +t+","+ +n+","+ +o+","+ +e+","+(this._x1=+r)+","+(this._y1=+i)},arcTo:function(t,n,o,e,r){t=+t,n=+n,o=+o,e=+e,r=+r;var i=this._x1,s=this._y1,u=o-t,f=e-n,c=i-t,h=s-n,l=c*c+h*h;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(l>v)if(Math.abs(h*u-f*c)>v&&r){var a=o-i,y=e-s,g=u*u+f*f,d=a*a+y*y,_=Math.sqrt(g),p=Math.sqrt(l),k=r*Math.tan((x-Math.acos((g+l-d)/(2*_*p)))/2),L=k/p,w=k/_;Math.abs(L-1)>v&&(this._+="L"+(t+L*c)+","+(n+L*h)),this._+="A"+r+","+r+",0,0,"+ +(h*a>c*y)+","+(this._x1=t+w*u)+","+(this._y1=n+w*f)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,o,e,r,i){t=+t,n=+n,i=!!i;var s=(o=+o)*Math.cos(e),u=o*Math.sin(e),f=t+s,c=n+u,h=1^i,l=i?e-r:r-e;if(o<0)throw new Error("negative radius: "+o);null===this._x1?this._+="M"+f+","+c:(Math.abs(this._x1-f)>v||Math.abs(this._y1-c)>v)&&(this._+="L"+f+","+c),o&&(l<0&&(l=l%L+L),l>w?this._+="A"+o+","+o+",0,1,"+h+","+(t-s)+","+(n-u)+"A"+o+","+o+",0,1,"+h+","+(this._x1=f)+","+(this._y1=c):l>v&&(this._+="A"+o+","+o+",0,"+ +(l>=x)+","+h+","+(this._x1=t+o*Math.cos(r))+","+(this._y1=n+o*Math.sin(r))))},rect:function(t,n,o,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +o+"v"+ +e+"h"+-o+"Z"},toString:function(){return this._}};var T=Array.prototype.slice;function z(t){return t.source}function E(t){return t.target}function C(t,n,o,e,r){t.moveTo(n,o),t.bezierCurveTo(n=(n+e)/2,o,n,r,e,r)}function j(){return function(t){var n=z,o=E,e=m,r=A,i=null;function s(){var s,u=T.call(arguments),f=n.apply(this,u),c=o.apply(this,u);if(i||(i=s=b()),t(i,+e.apply(this,(u[0]=f,u)),+r.apply(this,u),+e.apply(this,(u[0]=c,u)),+r.apply(this,u)),s)return i=null,s+""||null}return s.source=function(t){return arguments.length?(n=t,s):n},s.target=function(t){return arguments.length?(o=t,s):o},s.x=function(t){return arguments.length?(e="function"==typeof t?t:S(+t),s):e},s.y=function(t){return arguments.length?(r="function"==typeof t?t:S(+t),s):r},s.context=function(t){return arguments.length?(i=null==t?null:t,s):i},s}(C)}function q(t){return[t.source.x1,t.y0]}function P(t){return[t.target.x0,t.y1]}function I(){return j().source(q).target(P)}export{k as S,u as c,I as d,s as j,r as l,i as r};
|
.output/public/assets/d3-scale-CdkN4P7M.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{I as n}from"./internmap-B8oPgqVZ.js";import{r,b as t,t as e,a,c as u}from"./d3-array-BhN1wQGI.js";import{f as i,p as o,a as c,b as f,c as s,d as l}from"./d3-format-C0lSXcPg.js";import{i as h,a as m,b as p}from"./d3-interpolate-Ct9kki6l.js";import{t as g}from"./d3-time-format-DB2uBv1t.js";import{s as d,t as v,a as M,b as y,c as w,d as b,e as k,f as N,g as A}from"./d3-time-B1kAM736.js";function j(n,r){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(r).domain(n)}return this}const x=Symbol("implicit");function D(){var r=new n,t=[],e=[],a=x;function u(n){let u=r.get(n);if(void 0===u){if(a!==x)return a;r.set(n,u=t.push(n)-1)}return e[u%e.length]}return u.domain=function(e){if(!arguments.length)return t.slice();t=[],r=new n;for(const n of e)r.has(n)||r.set(n,t.push(n)-1);return u},u.range=function(n){return arguments.length?(e=Array.from(n),u):e.slice()},u.unknown=function(n){return arguments.length?(a=n,u):a},u.copy=function(){return D(t,e).unknown(a)},j.apply(u,arguments),u}function I(){var n,t,e=D().unknown(void 0),a=e.domain,u=e.range,i=0,o=1,c=!1,f=0,s=0,l=.5;function h(){var e=a().length,h=o<i,m=h?o:i,p=h?i:o;n=(p-m)/Math.max(1,e-f+2*s),c&&(n=Math.floor(n)),m+=(p-m-n*(e-f))*l,t=n*(1-f),c&&(m=Math.round(m),t=Math.round(t));var g=r(e).map((function(r){return m+n*r}));return u(h?g.reverse():g)}return delete e.unknown,e.domain=function(n){return arguments.length?(a(n),h()):a()},e.range=function(n){return arguments.length?([i,o]=n,i=+i,o=+o,h()):[i,o]},e.rangeRound=function(n){return[i,o]=n,i=+i,o=+o,c=!0,h()},e.bandwidth=function(){return t},e.step=function(){return n},e.round=function(n){return arguments.length?(c=!!n,h()):c},e.padding=function(n){return arguments.length?(f=Math.min(1,s=+n),h()):f},e.paddingInner=function(n){return arguments.length?(f=Math.min(1,n),h()):f},e.paddingOuter=function(n){return arguments.length?(s=+n,h()):s},e.align=function(n){return arguments.length?(l=Math.max(0,Math.min(1,n)),h()):l},e.copy=function(){return I(a(),[i,o]).round(c).paddingInner(f).paddingOuter(s).align(l)},j.apply(h(),arguments)}function F(n){return+n}var O=[0,1];function R(n){return n}function S(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:(t=isNaN(r)?NaN:.5,function(){return t});var t}function Y(n,r,t){var e=n[0],a=n[1],u=r[0],i=r[1];return a<e?(e=S(a,e),u=t(i,u)):(e=S(e,a),u=t(u,i)),function(n){return u(e(n))}}function B(n,r,e){var a=Math.min(n.length,r.length)-1,u=new Array(a),i=new Array(a),o=-1;for(n[a]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++o<a;)u[o]=S(n[o],n[o+1]),i[o]=e(r[o],r[o+1]);return function(r){var e=t(n,r,1,a)-1;return i[e](u[e](r))}}function L(n,r){return r.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function Q(){var n,r,t,e,a,u,i=O,o=O,c=m,f=R;function s(){var n,r,t,c=Math.min(i.length,o.length);return f!==R&&(n=i[0],r=i[c-1],n>r&&(t=n,n=r,r=t),f=function(t){return Math.max(n,Math.min(r,t))}),e=c>2?B:Y,a=u=null,l}function l(r){return null==r||isNaN(r=+r)?t:(a||(a=e(i.map(n),o,c)))(n(f(r)))}return l.invert=function(t){return f(r((u||(u=e(o,i.map(n),h)))(t)))},l.domain=function(n){return arguments.length?(i=Array.from(n,F),s()):i.slice()},l.range=function(n){return arguments.length?(o=Array.from(n),s()):o.slice()},l.rangeRound=function(n){return o=Array.from(n),c=p,s()},l.clamp=function(n){return arguments.length?(f=!!n||R,s()):f!==R},l.interpolate=function(n){return arguments.length?(c=n,s()):c},l.unknown=function(n){return arguments.length?(t=n,l):t},function(t,e){return n=t,r=e,s()}}function X(){return Q()(R,R)}function Z(n){var r=n.domain;return n.ticks=function(n){var t=r();return a(t[0],t[t.length-1],null==n?10:n)},n.tickFormat=function(n,t){var a=r();return function(n,r,t,a){var u,h=e(n,r,t);switch((a=i(null==a?",f":a)).type){case"s":var m=Math.max(Math.abs(n),Math.abs(r));return null!=a.precision||isNaN(u=f(h,m))||(a.precision=u),s(a,m);case"":case"e":case"g":case"p":case"r":null!=a.precision||isNaN(u=c(h,Math.max(Math.abs(n),Math.abs(r))))||(a.precision=u-("e"===a.type));break;case"f":case"%":null!=a.precision||isNaN(u=o(h))||(a.precision=u-2*("%"===a.type))}return l(a)}(a[0],a[a.length-1],null==n?10:n,t)},n.nice=function(t){null==t&&(t=10);var e,a,i=r(),o=0,c=i.length-1,f=i[o],s=i[c],l=10;for(s<f&&(a=f,f=s,s=a,a=o,o=c,c=a);l-- >0;){if((a=u(f,s,t))===e)return i[o]=f,i[c]=s,r(i);if(a>0)f=Math.floor(f/a)*a,s=Math.ceil(s/a)*a;else{if(!(a<0))break;f=Math.ceil(f*a)/a,s=Math.floor(s*a)/a}e=a}return n},n}function q(){var n=X();return n.copy=function(){return L(n,q())},j.apply(n,arguments),Z(n)}function z(n){return new Date(n)}function C(n){return n instanceof Date?+n:+new Date(+n)}function E(n,r,t,e,a,u,i,o,c,f){var s=X(),l=s.invert,h=s.domain,m=f(".%L"),p=f(":%S"),g=f("%I:%M"),d=f("%I %p"),v=f("%a %d"),M=f("%b %d"),y=f("%B"),w=f("%Y");function b(n){return(c(n)<n?m:o(n)<n?p:i(n)<n?g:u(n)<n?d:e(n)<n?a(n)<n?v:M:t(n)<n?y:w)(n)}return s.invert=function(n){return new Date(l(n))},s.domain=function(n){return arguments.length?h(Array.from(n,C)):h().map(z)},s.ticks=function(r){var t=h();return n(t[0],t[t.length-1],null==r?10:r)},s.tickFormat=function(n,r){return null==r?b:f(r)},s.nice=function(n){var t=h();return n&&"function"==typeof n.range||(n=r(t[0],t[t.length-1],null==n?10:n)),n?h(function(n,r){var t,e=0,a=(n=n.slice()).length-1,u=n[e],i=n[a];return i<u&&(t=e,e=a,a=t,t=u,u=i,i=t),n[e]=r.floor(u),n[a]=r.ceil(i),n}(t,n)):s},s.copy=function(){return L(s,E(n,r,t,e,a,u,i,o,c,f))},s}function G(){return j.apply(E(A,N,k,b,w,y,M,v,d,g).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}export{I as b,q as l,D as o,G as t};
|
.output/public/assets/d3-scale-chromatic-FDBKL9jm.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
const a=function(a){for(var e=a.length/6|0,f=new Array(e),r=0;r<e;)f[r]="#"+a.slice(6*r,6*++r);return f}("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");export{a as d};
|
.output/public/assets/d3-selection-Oxnq6l6A.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
var t="http://www.w3.org/1999/xhtml";const n={svg:"http://www.w3.org/2000/svg",xhtml:t,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function e(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),n.hasOwnProperty(e)?{space:n[e],local:t}:t}function r(n){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===t&&e.documentElement.namespaceURI===t?e.createElement(n):e.createElementNS(r,n)}}function i(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function o(t){var n=e(t);return(n.local?i:r)(n)}function u(){}function s(t){return null==t?u:function(){return this.querySelector(t)}}function c(){return[]}function a(t){return null==t?c:function(){return this.querySelectorAll(t)}}function l(t){return function(){return null==(n=t.apply(this,arguments))?[]:Array.isArray(n)?n:Array.from(n);var n}}function f(t){return function(){return this.matches(t)}}function h(t){return function(n){return n.matches(t)}}var p=Array.prototype.find;function _(){return this.firstElementChild}var y=Array.prototype.filter;function d(){return Array.from(this.children)}function v(t){return new Array(t.length)}function m(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function g(t,n,e,r,i,o){for(var u,s=0,c=n.length,a=o.length;s<a;++s)(u=n[s])?(u.__data__=o[s],r[s]=u):e[s]=new m(t,o[s]);for(;s<c;++s)(u=n[s])&&(i[s]=u)}function w(t,n,e,r,i,o,u){var s,c,a,l=new Map,f=n.length,h=o.length,p=new Array(f);for(s=0;s<f;++s)(c=n[s])&&(p[s]=a=u.call(c,c.__data__,s,n)+"",l.has(a)?i[s]=c:l.set(a,c));for(s=0;s<h;++s)a=u.call(t,o[s],s,o)+"",(c=l.get(a))?(r[s]=c,c.__data__=o[s],l.delete(a)):e[s]=new m(t,o[s]);for(s=0;s<f;++s)(c=n[s])&&l.get(p[s])===c&&(i[s]=c)}function A(t){return t.__data__}function x(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function b(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function S(t){return function(){this.removeAttribute(t)}}function N(t){return function(){this.removeAttributeNS(t.space,t.local)}}function E(t,n){return function(){this.setAttribute(t,n)}}function C(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function L(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function B(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function P(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function q(t){return function(){this.style.removeProperty(t)}}function D(t,n,e){return function(){this.style.setProperty(t,n,e)}}function M(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function O(t,n){return t.style.getPropertyValue(n)||P(t).getComputedStyle(t,null).getPropertyValue(n)}function j(t){return function(){delete this[t]}}function H(t,n){return function(){this[t]=n}}function I(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function R(t){return t.trim().split(/^|\s+/)}function T(t){return t.classList||new U(t)}function U(t){this._node=t,this._names=R(t.getAttribute("class")||"")}function V(t,n){for(var e=T(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function k(t,n){for(var e=T(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function z(t){return function(){V(this,t)}}function X(t){return function(){k(this,t)}}function F(t,n){return function(){(n.apply(this,arguments)?V:k)(this,t)}}function G(){this.textContent=""}function J(t){return function(){this.textContent=t}}function K(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Q(){this.innerHTML=""}function W(t){return function(){this.innerHTML=t}}function Y(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function Z(){this.nextSibling&&this.parentNode.appendChild(this)}function $(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function tt(){return null}function nt(){var t=this.parentNode;t&&t.removeChild(this)}function et(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function rt(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function it(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.options);++i?n.length=i:delete this.__on}}}function ot(t,n,e){return function(){var r,i=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(i)for(var u=0,s=i.length;u<s;++u)if((r=i[u]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=e),void(r.value=n);this.addEventListener(t.type,o,e),r={type:t.type,name:t.name,value:n,listener:o,options:e},i?i.push(r):this.__on=[r]}}function ut(t,n,e){var r=P(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function st(t,n){return function(){return ut(this,t,n)}}function ct(t,n){return function(){return ut(this,t,n.apply(this,arguments))}}m.prototype={constructor:m,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},U.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var at=[null];function lt(t,n){this._groups=t,this._parents=n}function ft(){return new lt([[document.documentElement]],at)}function ht(t){return"string"==typeof t?new lt([[document.querySelector(t)]],[document.documentElement]):new lt([[t]],at)}lt.prototype=ft.prototype={constructor:lt,select:function(t){"function"!=typeof t&&(t=s(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u,c=n[i],a=c.length,l=r[i]=new Array(a),f=0;f<a;++f)(o=c[f])&&(u=t.call(o,o.__data__,f,c))&&("__data__"in o&&(u.__data__=o.__data__),l[f]=u);return new lt(r,this._parents)},selectAll:function(t){t="function"==typeof t?l(t):a(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,s=n[o],c=s.length,f=0;f<c;++f)(u=s[f])&&(r.push(t.call(u,u.__data__,f,s)),i.push(u));return new lt(r,i)},selectChild:function(t){return this.select(null==t?_:function(t){return function(){return p.call(this.children,t)}}("function"==typeof t?t:h(t)))},selectChildren:function(t){return this.selectAll(null==t?d:function(t){return function(){return y.call(this.children,t)}}("function"==typeof t?t:h(t)))},filter:function(t){"function"!=typeof t&&(t=f(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],s=u.length,c=r[i]=[],a=0;a<s;++a)(o=u[a])&&t.call(o,o.__data__,a,u)&&c.push(o);return new lt(r,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,A);var e,r=n?w:g,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var u=o.length,s=new Array(u),c=new Array(u),a=new Array(u),l=0;l<u;++l){var f=i[l],h=o[l],p=h.length,_=x(t.call(f,f&&f.__data__,l,i)),y=_.length,d=c[l]=new Array(y),v=s[l]=new Array(y);r(f,h,d,v,a[l]=new Array(p),_,n);for(var m,b,S=0,N=0;S<y;++S)if(m=d[S]){for(S>=N&&(N=S+1);!(b=v[N])&&++N<y;);m._next=b||null}}return(s=new lt(s,i))._enter=c,s._exit=a,s},enter:function(){return new lt(this._enter||this._groups.map(v),this._parents)},exit:function(){return new lt(this._exit||this._groups.map(v),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=n&&(i=n(i))&&(i=i.selection()),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,u=Math.min(i,o),s=new Array(i),c=0;c<u;++c)for(var a,l=e[c],f=r[c],h=l.length,p=s[c]=new Array(h),_=0;_<h;++_)(a=l[_]||f[_])&&(p[_]=a);for(;c<i;++c)s[c]=e[c];return new lt(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=b);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,s=e[o],c=s.length,a=i[o]=new Array(c),l=0;l<c;++l)(u=s[l])&&(a[l]=u);a.sort(n)}return new lt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,s=o.length;u<s;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},attr:function(t,n){var r=e(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==n?r.local?N:S:"function"==typeof n?r.local?B:L:r.local?C:E)(r,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?q:"function"==typeof n?M:D)(t,n,null==e?"":e)):O(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?j:"function"==typeof n?I:H)(t,n)):this.node()[t]},classed:function(t,n){var e=R(t+"");if(arguments.length<2){for(var r=T(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?F:n?z:X)(e,n))},text:function(t){return arguments.length?this.each(null==t?G:("function"==typeof t?K:J)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Q:("function"==typeof t?Y:W)(t)):this.node().innerHTML},raise:function(){return this.each(Z)},lower:function(){return this.each($)},append:function(t){var n="function"==typeof t?t:o(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:o(t),r=null==n?tt:"function"==typeof n?n:s(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(nt)},clone:function(t){return this.select(t?rt:et)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),u=o.length;if(!(arguments.length<2)){for(s=n?ot:it,r=0;r<u;++r)this.each(s(o[r],n,e));return this}var s=this.node().__on;if(s)for(var c,a=0,l=s.length;a<l;++a)for(r=0,c=s[a];r<u;++r)if((i=o[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,n){return this.each(("function"==typeof n?ct:st)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r,i=t[n],o=0,u=i.length;o<u;++o)(r=i[o])&&(yield r)}};export{a,ft as b,O as c,ht as d,f as m,e as n,s};
|
.output/public/assets/d3-shape-C6CU9yox.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import{P as t}from"./d3-path-QSrLXsQ3.js";function i(t){return function(){return t}}const n=Math.abs,s=Math.atan2,_=Math.cos,h=Math.max,e=Math.min,o=Math.sin,a=Math.sqrt,c=1e-12,r=Math.PI,l=r/2,u=2*r;function x(t){return t>=1?l:t<=-1?-l:Math.asin(t)}function y(i){let n=3;return i.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{const i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);n=i}return i},()=>new t(n)}function f(t){return t.innerRadius}function p(t){return t.outerRadius}function v(t){return t.startAngle}function d(t){return t.endAngle}function T(t){return t&&t.padAngle}function b(t,i,n,s,_,e,o){var c=t-n,r=i-s,l=(o?e:-e)/a(c*c+r*r),u=l*r,x=-l*c,y=t+u,f=i+x,p=n+u,v=s+x,d=(y+p)/2,T=(f+v)/2,b=p-y,w=v-f,N=b*b+w*w,k=_-e,g=y*v-p*f,m=(w<0?-1:1)*a(h(0,k*k*N-g*g)),E=(g*w-b*m)/N,S=(-g*b-w*m)/N,M=(g*w+b*m)/N,P=(-g*b+w*m)/N,A=E-d,z=S-T,C=M-d,R=P-T;return A*A+z*z>C*C+R*R&&(E=M,S=P),{cx:E,cy:S,x01:-u,y01:-x,x11:E*(_/k-1),y11:S*(_/k-1)}}function w(){var t=f,h=p,w=i(0),N=null,k=v,g=d,m=T,E=null,S=y(M);function M(){var i,y,f,p=+t.apply(this,arguments),v=+h.apply(this,arguments),d=k.apply(this,arguments)-l,T=g.apply(this,arguments)-l,M=n(T-d),P=T>d;if(E||(E=i=S()),v<p&&(y=v,v=p,p=y),v>c)if(M>u-c)E.moveTo(v*_(d),v*o(d)),E.arc(0,0,v,d,T,!P),p>c&&(E.moveTo(p*_(T),p*o(T)),E.arc(0,0,p,T,d,P));else{var A,z,C=d,R=T,q=d,j=T,I=M,O=M,V=m.apply(this,arguments)/2,$=V>c&&(N?+N.apply(this,arguments):a(p*p+v*v)),B=e(n(v-p)/2,+w.apply(this,arguments)),D=B,F=B;if($>c){var G=x($/p*o(V)),H=x($/v*o(V));(I-=2*G)>c?(q+=G*=P?1:-1,j-=G):(I=0,q=j=(d+T)/2),(O-=2*H)>c?(C+=H*=P?1:-1,R-=H):(O=0,C=R=(d+T)/2)}var J=v*_(C),K=v*o(C),L=p*_(j),Q=p*o(j);if(B>c){var U,W=v*_(R),X=v*o(R),Y=p*_(q),Z=p*o(q);if(M<r)if(U=function(t,i,n,s,_,h,e,o){var a=n-t,r=s-i,l=e-_,u=o-h,x=u*a-l*r;if(!(x*x<c))return[t+(x=(l*(i-h)-u*(t-_))/x)*a,i+x*r]}(J,K,Y,Z,W,X,L,Q)){var tt=J-U[0],it=K-U[1],nt=W-U[0],st=X-U[1],_t=1/o(((f=(tt*nt+it*st)/(a(tt*tt+it*it)*a(nt*nt+st*st)))>1?0:f<-1?r:Math.acos(f))/2),ht=a(U[0]*U[0]+U[1]*U[1]);D=e(B,(p-ht)/(_t-1)),F=e(B,(v-ht)/(_t+1))}else D=F=0}O>c?F>c?(A=b(Y,Z,J,K,v,F,P),z=b(W,X,L,Q,v,F,P),E.moveTo(A.cx+A.x01,A.cy+A.y01),F<B?E.arc(A.cx,A.cy,F,s(A.y01,A.x01),s(z.y01,z.x01),!P):(E.arc(A.cx,A.cy,F,s(A.y01,A.x01),s(A.y11,A.x11),!P),E.arc(0,0,v,s(A.cy+A.y11,A.cx+A.x11),s(z.cy+z.y11,z.cx+z.x11),!P),E.arc(z.cx,z.cy,F,s(z.y11,z.x11),s(z.y01,z.x01),!P))):(E.moveTo(J,K),E.arc(0,0,v,C,R,!P)):E.moveTo(J,K),p>c&&I>c?D>c?(A=b(L,Q,W,X,p,-D,P),z=b(J,K,Y,Z,p,-D,P),E.lineTo(A.cx+A.x01,A.cy+A.y01),D<B?E.arc(A.cx,A.cy,D,s(A.y01,A.x01),s(z.y01,z.x01),!P):(E.arc(A.cx,A.cy,D,s(A.y01,A.x01),s(A.y11,A.x11),!P),E.arc(0,0,p,s(A.cy+A.y11,A.cx+A.x11),s(z.cy+z.y11,z.cx+z.x11),P),E.arc(z.cx,z.cy,D,s(z.y11,z.x11),s(z.y01,z.x01),!P))):E.arc(0,0,p,j,q,P):E.lineTo(L,Q)}else E.moveTo(0,0);if(E.closePath(),i)return E=null,i+""||null}return M.centroid=function(){var i=(+t.apply(this,arguments)+ +h.apply(this,arguments))/2,n=(+k.apply(this,arguments)+ +g.apply(this,arguments))/2-r/2;return[_(n)*i,o(n)*i]},M.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),M):t},M.outerRadius=function(t){return arguments.length?(h="function"==typeof t?t:i(+t),M):h},M.cornerRadius=function(t){return arguments.length?(w="function"==typeof t?t:i(+t),M):w},M.padRadius=function(t){return arguments.length?(N=null==t?null:"function"==typeof t?t:i(+t),M):N},M.startAngle=function(t){return arguments.length?(k="function"==typeof t?t:i(+t),M):k},M.endAngle=function(t){return arguments.length?(g="function"==typeof t?t:i(+t),M):g},M.padAngle=function(t){return arguments.length?(m="function"==typeof t?t:i(+t),M):m},M.context=function(t){return arguments.length?(E=null==t?null:t,M):E},M}function N(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function k(t){this._context=t}function g(t){return new k(t)}function m(t){return t[0]}function E(t){return t[1]}function S(t,n){var s=i(!0),_=null,h=g,e=null,o=y(a);function a(i){var a,c,r,l=(i=N(i)).length,u=!1;for(null==_&&(e=h(r=o())),a=0;a<=l;++a)!(a<l&&s(c=i[a],a,i))===u&&((u=!u)?e.lineStart():e.lineEnd()),u&&e.point(+t(c,a,i),+n(c,a,i));if(r)return e=null,r+""||null}return t="function"==typeof t?t:void 0===t?m:i(t),n="function"==typeof n?n:void 0===n?E:i(n),a.x=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),a):t},a.y=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),a):n},a.defined=function(t){return arguments.length?(s="function"==typeof t?t:i(!!t),a):s},a.curve=function(t){return arguments.length?(h=t,null!=_&&(e=h(_)),a):h},a.context=function(t){return arguments.length?(null==t?_=e=null:e=h(_=t),a):_},a}function M(t,i){return i<t?-1:i>t?1:i>=t?0:NaN}function P(t){return t}function A(){var t=P,n=M,s=null,_=i(0),h=i(u),e=i(0);function o(i){var o,a,c,r,l,x=(i=N(i)).length,y=0,f=new Array(x),p=new Array(x),v=+_.apply(this,arguments),d=Math.min(u,Math.max(-u,h.apply(this,arguments)-v)),T=Math.min(Math.abs(d)/x,e.apply(this,arguments)),b=T*(d<0?-1:1);for(o=0;o<x;++o)(l=p[f[o]=o]=+t(i[o],o,i))>0&&(y+=l);for(null!=n?f.sort((function(t,i){return n(p[t],p[i])})):null!=s&&f.sort((function(t,n){return s(i[t],i[n])})),o=0,c=y?(d-x*b)/y:0;o<x;++o,v=r)a=f[o],r=v+((l=p[a])>0?l*c:0)+b,p[a]={data:i[a],index:o,value:l,startAngle:v,endAngle:r,padAngle:T};return p}return o.value=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),o):t},o.sortValues=function(t){return arguments.length?(n=t,s=null,o):n},o.sort=function(t){return arguments.length?(s=t,n=null,o):s},o.startAngle=function(t){return arguments.length?(_="function"==typeof t?t:i(+t),o):_},o.endAngle=function(t){return arguments.length?(h="function"==typeof t?t:i(+t),o):h},o.padAngle=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),o):e},o}k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;
|
2 |
+
// falls through
|
3 |
+
default:this._context.lineTo(t,i)}}};class z{constructor(t,i){this._context=t,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;
|
4 |
+
// falls through
|
5 |
+
default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,i,t,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,t,this._y0,t,i)}this._x0=t,this._y0=i}}function C(t){return new z(t,!0)}function R(t){return new z(t,!1)}function q(){}function j(t,i,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+n)/6)}function I(t){this._context=t}function O(t){return new I(t)}function V(t){this._context=t}function $(t){return new V(t)}function B(t){this._context=t}function D(t){return new B(t)}function F(t,i){this._basis=new I(t),this._beta=i}I.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:j(this,this._x1,this._y1);
|
6 |
+
// falls through
|
7 |
+
case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);
|
8 |
+
// falls through
|
9 |
+
default:j(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},V.prototype={areaStart:q,areaEnd:q,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:j(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},B.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,s=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(n,s):this._context.moveTo(n,s);break;case 3:this._point=4;
|
10 |
+
// falls through
|
11 |
+
default:j(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},F.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,n=t.length-1;if(n>0)for(var s,_=t[0],h=i[0],e=t[n]-_,o=i[n]-h,a=-1;++a<=n;)s=a/n,this._basis.point(this._beta*t[a]+(1-this._beta)*(_+s*e),this._beta*i[a]+(1-this._beta)*(h+s*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const G=function t(i){function n(t){return 1===i?new I(t):new F(t,i)}return n.beta=function(i){return t(+i)},n}(.85);function H(t,i,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function J(t,i){this._context=t,this._k=(1-i)/6}J.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:H(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;
|
12 |
+
// falls through
|
13 |
+
default:H(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const K=function t(i){function n(t){return new J(t,i)}return n.tension=function(i){return t(+i)},n}(0);function L(t,i){this._context=t,this._k=(1-i)/6}L.prototype={areaStart:q,areaEnd:q,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:H(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const Q=function t(i){function n(t){return new L(t,i)}return n.tension=function(i){return t(+i)},n}(0);function U(t,i){this._context=t,this._k=(1-i)/6}U.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;
|
14 |
+
// falls through
|
15 |
+
default:H(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const W=function t(i){function n(t){return new U(t,i)}return n.tension=function(i){return t(+i)},n}(0);function X(t,i,n){var s=t._x1,_=t._y1,h=t._x2,e=t._y2;if(t._l01_a>c){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,a=3*t._l01_a*(t._l01_a+t._l12_a);s=(s*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/a,_=(_*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/a}if(t._l23_a>c){var r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);h=(h*r+t._x1*t._l23_2a-i*t._l12_2a)/l,e=(e*r+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(s,_,h,e,t._x2,t._y2)}function Y(t,i){this._context=t,this._alpha=i}Y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,s=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;
|
16 |
+
// falls through
|
17 |
+
default:X(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const Z=function t(i){function n(t){return i?new Y(t,i):new J(t,0)}return n.alpha=function(i){return t(+i)},n}(.5);function tt(t,i){this._context=t,this._alpha=i}tt.prototype={areaStart:q,areaEnd:q,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,s=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+s*s,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:X(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const it=function t(i){function n(t){return i?new tt(t,i):new L(t,0)}return n.alpha=function(i){return t(+i)},n}(.5);function nt(t,i){this._context=t,this._alpha=i}nt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,s=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+s*s,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;
|
18 |
+
// falls through
|
19 |
+
default:X(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const st=function t(i){function n(t){return i?new nt(t,i):new U(t,0)}return n.alpha=function(i){return t(+i)},n}(.5);function _t(t){this._context=t}function ht(t){return new _t(t)}function et(t){return t<0?-1:1}function ot(t,i,n){var s=t._x1-t._x0,_=i-t._x1,h=(t._y1-t._y0)/(s||_<0&&-0),e=(n-t._y1)/(_||s<0&&-0),o=(h*_+e*s)/(s+_);return(et(h)+et(e))*Math.min(Math.abs(h),Math.abs(e),.5*Math.abs(o))||0}function at(t,i){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-i)/2:i}function ct(t,i,n){var s=t._x0,_=t._y0,h=t._x1,e=t._y1,o=(h-s)/3;t._context.bezierCurveTo(s+o,_+o*i,h-o,e-o*n,h,e)}function rt(t){this._context=t}function lt(t){this._context=new ut(t)}function ut(t){this._context=t}function xt(t){return new rt(t)}function yt(t){return new lt(t)}function ft(t){this._context=t}function pt(t){var i,n,s=t.length-1,_=new Array(s),h=new Array(s),e=new Array(s);for(_[0]=0,h[0]=2,e[0]=t[0]+2*t[1],i=1;i<s-1;++i)_[i]=1,h[i]=4,e[i]=4*t[i]+2*t[i+1];for(_[s-1]=2,h[s-1]=7,e[s-1]=8*t[s-1]+t[s],i=1;i<s;++i)n=_[i]/h[i-1],h[i]-=n,e[i]-=n*e[i-1];for(_[s-1]=e[s-1]/h[s-1],i=s-2;i>=0;--i)_[i]=(e[i]-_[i+1])/h[i];for(h[s-1]=(t[s]+_[s-1])/2,i=0;i<s-1;++i)h[i]=2*t[i+1]-_[i+1];return[_,h]}function vt(t){return new ft(t)}function dt(t,i){this._context=t,this._t=i}function Tt(t){return new dt(t,.5)}function bt(t){return new dt(t,0)}function wt(t){return new dt(t,1)}_t.prototype={areaStart:q,areaEnd:q,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}},rt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ct(this,this._t0,at(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var n=NaN;if(i=+i,(t=+t)!==this._x1||i!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,ct(this,at(this,n=ot(this,t,i)),n);break;default:ct(this,this._t0,n=ot(this,t,i))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=n}}},(lt.prototype=Object.create(rt.prototype)).point=function(t,i){rt.prototype.point.call(this,i,t)},ut.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,n,s,_,h){this._context.bezierCurveTo(i,t,s,n,h,_)}},ft.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),2===n)this._context.lineTo(t[1],i[1]);else for(var s=pt(t),_=pt(i),h=0,e=1;e<n;++h,++e)this._context.bezierCurveTo(s[0][h],_[0][h],s[1][h],_[1][h],t[e],i[e]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}},dt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;
|
20 |
+
// falls through
|
21 |
+
default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,i)}}this._x=t,this._y=i}};export{wt as a,vt as b,Tt as c,xt as d,ht as e,g as f,Z as g,st as h,it as i,K as j,W as k,Q as l,yt as m,G as n,R as o,C as p,D as q,$ as r,bt as s,O as t,S as u,w as v,A as w};
|
.output/public/assets/d3-time-B1kAM736.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{d as e,t}from"./d3-array-BhN1wQGI.js";const s=new Date,n=new Date;function r(e,t,a,o){function l(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return l.floor=t=>(e(t=new Date(+t)),t),l.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),l.round=e=>{const t=l(e),s=l.ceil(e);return e-t<s-e?t:s},l.offset=(e,s)=>(t(e=new Date(+e),null==s?1:Math.floor(s)),e),l.range=(s,n,r)=>{const a=[];if(s=l.ceil(s),r=null==r?1:Math.floor(r),!(s<n&&r>0))return a;let o;do{a.push(o=new Date(+s)),t(s,r),e(s)}while(o<s&&s<n);return a},l.filter=s=>r((t=>{if(t>=t)for(;e(t),!s(t);)t.setTime(t-1)}),((e,n)=>{if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!s(e););else for(;--n>=0;)for(;t(e,1),!s(e););})),a&&(l.count=(t,r)=>(s.setTime(+t),n.setTime(+r),e(s),e(n),Math.floor(a(s,n))),l.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?l.filter(o?t=>o(t)%e==0:t=>l.count(0,t)%e==0):l:null)),l}const a=r((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));a.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?r((t=>{t.setTime(Math.floor(t/e)*e)}),((t,s)=>{t.setTime(+t+s*e)}),((t,s)=>(s-t)/e)):a:null),a.range;const o=1e3,l=6e4,g=36e5,u=864e5,i=6048e5,T=2592e6,f=31536e6,c=r((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*o)}),((e,t)=>(t-e)/o),(e=>e.getUTCSeconds()));c.range;const C=r((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*o)}),((e,t)=>{e.setTime(+e+t*l)}),((e,t)=>(t-e)/l),(e=>e.getMinutes()));C.range;r((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*l)}),((e,t)=>(t-e)/l),(e=>e.getUTCMinutes())).range;const U=r((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*o-e.getMinutes()*l)}),((e,t)=>{e.setTime(+e+t*g)}),((e,t)=>(t-e)/g),(e=>e.getHours()));U.range;r((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*g)}),((e,t)=>(t-e)/g),(e=>e.getUTCHours())).range;const M=r((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*l)/u),(e=>e.getDate()-1));M.range;const h=r((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/u),(e=>e.getUTCDate()-1));h.range;function D(e){return r((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*l)/i))}r((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/u),(e=>Math.floor(e/u))).range;const F=D(0),m=D(1),Y=D(2),H=D(3),d=D(4),y=D(5),w=D(6);function v(e){return r((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/i))}F.range,m.range,Y.range,H.range,d.range,y.range,w.range;const p=v(0),z=v(1),O=v(2),S=v(3),b=v(4),j=v(5),x=v(6);p.range,z.range,O.range,S.range,b.range,j.range,x.range;const k=r((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()));k.range;r((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth())).range;const q=r((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));q.every=e=>isFinite(e=Math.floor(e))&&e>0?r((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,s)=>{t.setFullYear(t.getFullYear()+s*e)})):null,q.range;const A=r((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));A.every=e=>isFinite(e=Math.floor(e))&&e>0?r((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,s)=>{t.setUTCFullYear(t.getUTCFullYear()+s*e)})):null,A.range;const[B,E]=function(s,n,r,C,U,M){const h=[[c,1,o],[c,5,5e3],[c,15,15e3],[c,30,3e4],[M,1,l],[M,5,3e5],[M,15,9e5],[M,30,18e5],[U,1,g],[U,3,108e5],[U,6,216e5],[U,12,432e5],[C,1,u],[C,2,1728e5],[r,1,i],[n,1,T],[n,3,7776e6],[s,1,f]];function D(n,r,o){const l=Math.abs(r-n)/o,g=e((([,,e])=>e)).right(h,l);if(g===h.length)return s.every(t(n/f,r/f,o));if(0===g)return a.every(Math.max(t(n,r,o),1));const[u,i]=h[l/h[g-1][2]<h[g][2]/l?g-1:g];return u.every(i)}return[function(e,t,s){const n=t<e;n&&([e,t]=[t,e]);const r=s&&"function"==typeof s.range?s:D(e,t,s),a=r?r.range(e,+t+1):[];return n?a.reverse():a},D]}(q,k,F,M,U,C);export{U as a,M as b,F as c,k as d,q as e,E as f,B as g,h,m as i,A as j,b as k,p as l,d as m,w as n,y as o,H as p,Y as q,a as r,c as s,C as t,z as u};
|
.output/public/assets/d3-time-format-DB2uBv1t.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{u as n,h as e,i as t,b as r,j as u,k as c,l as i,e as o,m as a,c as f}from"./d3-time-B1kAM736.js";function l(n){if(0<=n.y&&n.y<100){var e=new Date(-1,n.m,n.d,n.H,n.M,n.S,n.L);return e.setFullYear(n.y),e}return new Date(n.y,n.m,n.d,n.H,n.M,n.S,n.L)}function g(n){if(0<=n.y&&n.y<100){var e=new Date(Date.UTC(-1,n.m,n.d,n.H,n.M,n.S,n.L));return e.setUTCFullYear(n.y),e}return new Date(Date.UTC(n.y,n.m,n.d,n.H,n.M,n.S,n.L))}function s(n,e,t){return{y:n,m:e,d:t,H:0,M:0,S:0,L:0}}var h,y,v={"-":"",_:" ",0:"0"},d=/^\s*\d+/,C=/^%/,m=/[\\^$*+?|[\]().{}]/g;function M(n,e,t){var r=n<0?"-":"",u=(r?-n:n)+"",c=u.length;return r+(c<t?new Array(t-c+1).join(e)+u:u)}function T(n){return n.replace(m,"\\$&")}function D(n){return new RegExp("^(?:"+n.map(T).join("|")+")","i")}function U(n){return new Map(n.map(((n,e)=>[n.toLowerCase(),e])))}function x(n,e,t){var r=d.exec(e.slice(t,t+1));return r?(n.w=+r[0],t+r[0].length):-1}function w(n,e,t){var r=d.exec(e.slice(t,t+1));return r?(n.u=+r[0],t+r[0].length):-1}function p(n,e,t){var r=d.exec(e.slice(t,t+2));return r?(n.U=+r[0],t+r[0].length):-1}function S(n,e,t){var r=d.exec(e.slice(t,t+2));return r?(n.V=+r[0],t+r[0].length):-1}function F(n,e,t){var r=d.exec(e.slice(t,t+2));return r?(n.W=+r[0],t+r[0].length):-1}function H(n,e,t){var r=d.exec(e.slice(t,t+4));return r?(n.y=+r[0],t+r[0].length):-1}function L(n,e,t){var r=d.exec(e.slice(t,t+2));return r?(n.y=+r[0]+(+r[0]>68?1900:2e3),t+r[0].length):-1}function A(n,e,t){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(t,t+6));return r?(n.Z=r[1]?0:-(r[2]+(r[3]||"00")),t+r[0].length):-1}function Y(n,e,t){var r=d.exec(e.slice(t,t+1));return r?(n.q=3*r[0]-3,t+r[0].length):-1}function Z(n,e,t){var r=d.exec(e.slice(t,t+2));return r?(n.m=r[0]-1,t+r[0].length):-1}function b(n,e,t){var r=d.exec(e.slice(t,t+2));return r?(n.d=+r[0],t+r[0].length):-1}function W(n,e,t){var r=d.exec(e.slice(t,t+3));return r?(n.m=0,n.d=+r[0],t+r[0].length):-1}function V(n,e,t){var r=d.exec(e.slice(t,t+2));return r?(n.H=+r[0],t+r[0].length):-1}function j(n,e,t){var r=d.exec(e.slice(t,t+2));return r?(n.M=+r[0],t+r[0].length):-1}function q(n,e,t){var r=d.exec(e.slice(t,t+2));return r?(n.S=+r[0],t+r[0].length):-1}function J(n,e,t){var r=d.exec(e.slice(t,t+3));return r?(n.L=+r[0],t+r[0].length):-1}function Q(n,e,t){var r=d.exec(e.slice(t,t+6));return r?(n.L=Math.floor(r[0]/1e3),t+r[0].length):-1}function X(n,e,t){var r=C.exec(e.slice(t,t+1));return r?t+r[0].length:-1}function I(n,e,t){var r=d.exec(e.slice(t));return r?(n.Q=+r[0],t+r[0].length):-1}function B(n,e,t){var r=d.exec(e.slice(t));return r?(n.s=+r[0],t+r[0].length):-1}function G(n,e){return M(n.getDate(),e,2)}function O(n,e){return M(n.getHours(),e,2)}function P(n,e){return M(n.getHours()%12||12,e,2)}function N(n,e){return M(1+r.count(o(n),n),e,3)}function $(n,e){return M(n.getMilliseconds(),e,3)}function k(n,e){return $(n,e)+"000"}function z(n,e){return M(n.getMonth()+1,e,2)}function E(n,e){return M(n.getMinutes(),e,2)}function R(n,e){return M(n.getSeconds(),e,2)}function _(n){var e=n.getDay();return 0===e?7:e}function K(n,e){return M(f.count(o(n)-1,n),e,2)}function nn(n){var e=n.getDay();return e>=4||0===e?a(n):a.ceil(n)}function en(n,e){return n=nn(n),M(a.count(o(n),n)+(4===o(n).getDay()),e,2)}function tn(n){return n.getDay()}function rn(n,e){return M(t.count(o(n)-1,n),e,2)}function un(n,e){return M(n.getFullYear()%100,e,2)}function cn(n,e){return M((n=nn(n)).getFullYear()%100,e,2)}function on(n,e){return M(n.getFullYear()%1e4,e,4)}function an(n,e){var t=n.getDay();return M((n=t>=4||0===t?a(n):a.ceil(n)).getFullYear()%1e4,e,4)}function fn(n){var e=n.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+M(e/60|0,"0",2)+M(e%60,"0",2)}function ln(n,e){return M(n.getUTCDate(),e,2)}function gn(n,e){return M(n.getUTCHours(),e,2)}function sn(n,e){return M(n.getUTCHours()%12||12,e,2)}function hn(n,t){return M(1+e.count(u(n),n),t,3)}function yn(n,e){return M(n.getUTCMilliseconds(),e,3)}function vn(n,e){return yn(n,e)+"000"}function dn(n,e){return M(n.getUTCMonth()+1,e,2)}function Cn(n,e){return M(n.getUTCMinutes(),e,2)}function mn(n,e){return M(n.getUTCSeconds(),e,2)}function Mn(n){var e=n.getUTCDay();return 0===e?7:e}function Tn(n,e){return M(i.count(u(n)-1,n),e,2)}function Dn(n){var e=n.getUTCDay();return e>=4||0===e?c(n):c.ceil(n)}function Un(n,e){return n=Dn(n),M(c.count(u(n),n)+(4===u(n).getUTCDay()),e,2)}function xn(n){return n.getUTCDay()}function wn(e,t){return M(n.count(u(e)-1,e),t,2)}function pn(n,e){return M(n.getUTCFullYear()%100,e,2)}function Sn(n,e){return M((n=Dn(n)).getUTCFullYear()%100,e,2)}function Fn(n,e){return M(n.getUTCFullYear()%1e4,e,4)}function Hn(n,e){var t=n.getUTCDay();return M((n=t>=4||0===t?c(n):c.ceil(n)).getUTCFullYear()%1e4,e,4)}function Ln(){return"+0000"}function An(){return"%"}function Yn(n){return+n}function Zn(n){return Math.floor(+n/1e3)}h=function(u){var c=u.dateTime,i=u.date,o=u.time,a=u.periods,f=u.days,h=u.shortDays,y=u.months,d=u.shortMonths,C=D(a),m=U(a),M=D(f),T=U(f),nn=D(h),Dn=U(h),bn=D(y),Wn=U(y),Vn=D(d),jn=U(d),qn={a:function(n){return h[n.getDay()]},A:function(n){return f[n.getDay()]},b:function(n){return d[n.getMonth()]},B:function(n){return y[n.getMonth()]},c:null,d:G,e:G,f:k,g:cn,G:an,H:O,I:P,j:N,L:$,m:z,M:E,p:function(n){return a[+(n.getHours()>=12)]},q:function(n){return 1+~~(n.getMonth()/3)},Q:Yn,s:Zn,S:R,u:_,U:K,V:en,w:tn,W:rn,x:null,X:null,y:un,Y:on,Z:fn,"%":An},Jn={a:function(n){return h[n.getUTCDay()]},A:function(n){return f[n.getUTCDay()]},b:function(n){return d[n.getUTCMonth()]},B:function(n){return y[n.getUTCMonth()]},c:null,d:ln,e:ln,f:vn,g:Sn,G:Hn,H:gn,I:sn,j:hn,L:yn,m:dn,M:Cn,p:function(n){return a[+(n.getUTCHours()>=12)]},q:function(n){return 1+~~(n.getUTCMonth()/3)},Q:Yn,s:Zn,S:mn,u:Mn,U:Tn,V:Un,w:xn,W:wn,x:null,X:null,y:pn,Y:Fn,Z:Ln,"%":An},Qn={a:function(n,e,t){var r=nn.exec(e.slice(t));return r?(n.w=Dn.get(r[0].toLowerCase()),t+r[0].length):-1},A:function(n,e,t){var r=M.exec(e.slice(t));return r?(n.w=T.get(r[0].toLowerCase()),t+r[0].length):-1},b:function(n,e,t){var r=Vn.exec(e.slice(t));return r?(n.m=jn.get(r[0].toLowerCase()),t+r[0].length):-1},B:function(n,e,t){var r=bn.exec(e.slice(t));return r?(n.m=Wn.get(r[0].toLowerCase()),t+r[0].length):-1},c:function(n,e,t){return Bn(n,c,e,t)},d:b,e:b,f:Q,g:L,G:H,H:V,I:V,j:W,L:J,m:Z,M:j,p:function(n,e,t){var r=C.exec(e.slice(t));return r?(n.p=m.get(r[0].toLowerCase()),t+r[0].length):-1},q:Y,Q:I,s:B,S:q,u:w,U:p,V:S,w:x,W:F,x:function(n,e,t){return Bn(n,i,e,t)},X:function(n,e,t){return Bn(n,o,e,t)},y:L,Y:H,Z:A,"%":X};function Xn(n,e){return function(t){var r,u,c,i=[],o=-1,a=0,f=n.length;for(t instanceof Date||(t=new Date(+t));++o<f;)37===n.charCodeAt(o)&&(i.push(n.slice(a,o)),null!=(u=v[r=n.charAt(++o)])?r=n.charAt(++o):u="e"===r?" ":"0",(c=e[r])&&(r=c(t,u)),i.push(r),a=o+1);return i.push(n.slice(a,o)),i.join("")}}function In(u,c){return function(i){var o,a,f=s(1900,void 0,1);if(Bn(f,u,i+="",0)!=i.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(1e3*f.s+("L"in f?f.L:0));if(c&&!("Z"in f)&&(f.Z=0),"p"in f&&(f.H=f.H%12+12*f.p),void 0===f.m&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>53)return null;"w"in f||(f.w=1),"Z"in f?(a=(o=g(s(f.y,0,1))).getUTCDay(),o=a>4||0===a?n.ceil(o):n(o),o=e.offset(o,7*(f.V-1)),f.y=o.getUTCFullYear(),f.m=o.getUTCMonth(),f.d=o.getUTCDate()+(f.w+6)%7):(a=(o=l(s(f.y,0,1))).getDay(),o=a>4||0===a?t.ceil(o):t(o),o=r.offset(o,7*(f.V-1)),f.y=o.getFullYear(),f.m=o.getMonth(),f.d=o.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),a="Z"in f?g(s(f.y,0,1)).getUTCDay():l(s(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+7*f.W-(a+5)%7:f.w+7*f.U-(a+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,g(f)):l(f)}}function Bn(n,e,t,r){for(var u,c,i=0,o=e.length,a=t.length;i<o;){if(r>=a)return-1;if(37===(u=e.charCodeAt(i++))){if(u=e.charAt(i++),!(c=Qn[u in v?e.charAt(i++):u])||(r=c(n,t,r))<0)return-1}else if(u!=t.charCodeAt(r++))return-1}return r}return qn.x=Xn(i,qn),qn.X=Xn(o,qn),qn.c=Xn(c,qn),Jn.x=Xn(i,Jn),Jn.X=Xn(o,Jn),Jn.c=Xn(c,Jn),{format:function(n){var e=Xn(n+="",qn);return e.toString=function(){return n},e},parse:function(n){var e=In(n+="",!1);return e.toString=function(){return n},e},utcFormat:function(n){var e=Xn(n+="",Jn);return e.toString=function(){return n},e},utcParse:function(n){var e=In(n+="",!0);return e.toString=function(){return n},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),y=h.format,h.parse,h.utcFormat,h.utcParse;export{y as t};
|
.output/public/assets/d3-transition-0ltv4da8.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import{t,a as n,n as e}from"./d3-timer-keMr1twq.js";import{d as r}from"./d3-dispatch-Chq_f_hl.js";import{i,c as o,d as a,e as u,f as s}from"./d3-interpolate-Ct9kki6l.js";import{c as l}from"./d3-color-D5ULnJIe.js";import{n as f,m as c,s as h,a as _,b as v,c as d}from"./d3-selection-Oxnq6l6A.js";import{c as p}from"./d3-ease-Cx6bG2vu.js";var y=r("start","end","cancel","interrupt"),m=[];function w(e,r,i,o,a,u){var s=e.__transition;if(s){if(i in s)return}else e.__transition={};!function(e,r,i){var o,a=e.__transition;function u(t){i.state=1,i.timer.restart(s,i.delay,i.time),i.delay<=t&&s(t-i.delay)}function s(t){var u,c,h,_;if(1!==i.state)return f();for(u in a)if((_=a[u]).name===i.name){if(3===_.state)return n(s);4===_.state?(_.state=6,_.timer.stop(),_.on.call("interrupt",e,e.__data__,_.index,_.group),delete a[u]):+u<r&&(_.state=6,_.timer.stop(),_.on.call("cancel",e,e.__data__,_.index,_.group),delete a[u])}if(n((function(){3===i.state&&(i.state=4,i.timer.restart(l,i.delay,i.time),l(t))})),i.state=2,i.on.call("start",e,e.__data__,i.index,i.group),2===i.state){for(i.state=3,o=new Array(h=i.tween.length),u=0,c=-1;u<h;++u)(_=i.tween[u].value.call(e,e.__data__,i.index,i.group))&&(o[++c]=_);o.length=c+1}}function l(t){for(var n=t<i.duration?i.ease.call(null,t/i.duration):(i.timer.restart(f),i.state=5,1),r=-1,a=o.length;++r<a;)o[r].call(e,n);5===i.state&&(i.on.call("end",e,e.__data__,i.index,i.group),f())}function f(){for(var t in i.state=6,i.timer.stop(),delete a[r],a)return;delete e.__transition}a[r]=i,i.timer=t(u,0,i.time)}(e,i,{name:r,index:o,
|
2 |
+
// For context during callback.
|
3 |
+
group:a,
|
4 |
+
// For context during callback.
|
5 |
+
on:y,tween:m,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:0})}function g(t,n){var e=b(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function A(t,n){var e=b(t,n);if(e.state>3)throw new Error("too late; already running");return e}function b(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function x(t,n){var e,r;return function(){var i=A(this,t),o=i.tween;if(o!==e)for(var a=0,u=(r=e=o).length;a<u;++a)if(r[a].name===n){(r=r.slice()).splice(a,1);break}i.tween=r}}function E(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=A(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},s=0,l=i.length;s<l;++s)if(i[s].name===n){i[s]=u;break}s===l&&i.push(u)}o.tween=i}}function C(t,n,e){var r=t._id;return t.each((function(){var t=A(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return b(t,r).value[n]}}function N(t,n){var e;return("number"==typeof n?i:n instanceof l?o:(e=l(n))?(n=e,o):a)(t,n)}function S(t){return function(){this.removeAttribute(t)}}function T(t){return function(){this.removeAttributeNS(t.space,t.local)}}function j(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=n(r=a,e)}}function P(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=n(r=a,e)}}function z(t,n,e){var r,i,o;return function(){var a,u,s=e(this);if(null!=s)return(a=this.getAttribute(t))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,s));this.removeAttribute(t)}}function k(t,n,e){var r,i,o;return function(){var a,u,s=e(this);if(null!=s)return(a=this.getAttributeNS(t.space,t.local))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,s));this.removeAttributeNS(t.space,t.local)}}function $(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}(t,i)),e}return i._value=n,i}function H(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}(t,i)),e}return i._value=n,i}function K(t,n){return function(){g(this,t).delay=+n.apply(this,arguments)}}function M(t,n){return n=+n,function(){g(this,t).delay=n}}function O(t,n){return function(){A(this,t).duration=+n.apply(this,arguments)}}function Q(t,n){return n=+n,function(){A(this,t).duration=n}}var V=v.prototype.constructor;function q(t){return function(){this.style.removeProperty(t)}}var B=0;function D(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function F(){return++B}var G=v.prototype;D.prototype={constructor:D,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=h(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u,s,l=r[a],f=l.length,c=o[a]=new Array(f),_=0;_<f;++_)(u=l[_])&&(s=t.call(u,u.__data__,_,l))&&("__data__"in u&&(s.__data__=u.__data__),c[_]=s,w(c[_],n,e,_,c,b(u,e)));return new D(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=_(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var s,l=r[u],f=l.length,c=0;c<f;++c)if(s=l[c]){for(var h,v=t.call(s,s.__data__,c,l),d=b(s,e),p=0,y=v.length;p<y;++p)(h=v[p])&&w(h,n,e,p,v,d);o.push(v),a.push(s)}return new D(o,a,n,e)},selectChild:G.selectChild,selectChildren:G.selectChildren,filter:function(t){"function"!=typeof t&&(t=c(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,s=r[i]=[],l=0;l<u;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&s.push(o);return new D(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var s,l=n[u],f=e[u],c=l.length,h=a[u]=new Array(c),_=0;_<c;++_)(s=l[_]||f[_])&&(h[_]=s);for(;u<r;++u)a[u]=n[u];return new D(a,this._parents,this._name,this._id)},selection:function(){return new V(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=F(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],s=u.length,l=0;l<s;++l)if(a=u[l]){var f=b(a,n);w(a,t,e,l,u,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new D(r,this._parents,t,e)},call:G.call,nodes:G.nodes,node:G.node,size:G.size,empty:G.empty,each:G.each,on:function(t,n){var e=this._id;return arguments.length<2?b(this.node(),e).on.on(t):this.each(function(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?g:A;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}(e,t,n))},attr:function(t,n){var e=f(t),r="transform"===e?u:N;return this.attrTween(t,"function"==typeof n?(e.local?k:z)(e,r,C(this,"attr."+t,n)):null==n?(e.local?T:S)(e):(e.local?P:j)(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=f(t);return this.tween(e,(r.local?$:H)(r,n))},style:function(t,n,e){var r="transform"==(t+="")?s:N;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=d(this,t),a=(this.style.removeProperty(t),d(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}(t,r)).on("end.style."+t,q(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var a=d(this,t),u=e(this),s=u+"";return null==u&&(this.style.removeProperty(t),s=u=d(this,t)),a===s?null:a===r&&s===i?o:(i=s,o=n(r=a,u))}}(t,r,C(this,"style."+t,n))).each(function(t,n){var e,r,i,o,a="style."+n,u="end."+a;return function(){var s=A(this,t),l=s.on,f=null==s.value[a]?o||(o=q(n)):void 0;l===e&&i===f||(r=(e=l).copy()).on(u,i=f),s.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var a=d(this,t);return a===o?null:a===r?i:i=n(r=a,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(C(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=b(this.node(),e).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?x:E)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?K:M)(n,t)):b(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?O:Q)(n,t)):b(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if("function"!=typeof n)throw new Error;return function(){A(this,t).ease=n}}(n,t)):b(this.node(),n).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,n){return function(){var e=n.apply(this,arguments);if("function"!=typeof e)throw new Error;A(this,t).ease=e}}(this._id,t))},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(o,a){var u={value:a},s={value:function(){0==--i&&o()}};e.each((function(){var e=A(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(u),n._.interrupt.push(u),n._.end.push(s)),e.on=n})),0===i&&o()}))},[Symbol.iterator]:G[Symbol.iterator]};var I={time:null,
|
6 |
+
// Set on use.
|
7 |
+
delay:0,duration:250,ease:p};function J(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return e}v.prototype.interrupt=function(t){return this.each((function(){!function(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},v.prototype.transition=function(t){var n,r;t instanceof D?(n=t._id,t=t._name):(n=F(),(r=I).time=e(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,a=0;a<o;++a)for(var u,s=i[a],l=s.length,f=0;f<l;++f)(u=s[f])&&w(u,t,n,f,s,r||J(u,n));return new D(i,this._parents,t,n)};
|
.output/public/assets/d3-zoom-Dz8HuW59.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import"./d3-transition-0ltv4da8.js";function t(t,i,n){this.k=t,this.x=i,this.y=n}t.prototype={constructor:t,scale:function(i){return 1===i?this:new t(this.k*i,this.x,this.y)},translate:function(i,n){return 0===i&0===n?this:new t(this.k,this.x+this.k*i,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},t.prototype;
|
.output/public/assets/dagre-d3-es-D8JeTxsO.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import{M as e,q as n,n as t,z as r,f as o,o as i,N as s,v as a,x as u,y as d,g as h,m as c,O as f,P as g,K as l,Q as v,k as p,R as w,j as m,h as b,S as y,T as _,U as E,F as k,V as x,W as N,X as O,Y as P,Z as C,t as j,C as L}from"./lodash-es-RhymR7yg.js";var I="\0";class M{constructor(n={}){this._isDirected=!Object.prototype.hasOwnProperty.call(n,"directed")||n.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(n,"multigraph")&&n.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(n,"compound")&&n.compound,this._label=void 0,this._defaultNodeLabelFn=e(void 0),this._defaultEdgeLabelFn=e(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[I]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}
|
2 |
+
/* === Graph functions ========= */isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}
|
3 |
+
/* === Node functions ========== */setDefaultNodeLabel(t){return n(t)||(t=e(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return t(this._nodes)}sources(){var e=this;return r(this.nodes(),(function(n){return d(e._in[n])}))}sinks(){var e=this;return r(this.nodes(),(function(n){return d(e._out[n])}))}setNodes(e,n){var t=arguments,r=this;return o(e,(function(e){t.length>1?r.setNode(e,n):r.setNode(e)})),this}setNode(e,n){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=n),this):(this._nodes[e]=arguments.length>1?n:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=I,this._children[e]={},this._children[I][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var n=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],o(this.children(e),(e=>{this.setParent(e)})),delete this._children[e]),o(t(this._in[e]),n),delete this._in[e],delete this._preds[e],o(t(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(i(n))n=I;else{for(var t=n+="";!i(t);t=this.parent(t))if(t===e)throw new Error("Setting "+n+" as parent of "+e+" would create a cycle");this.setNode(n)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=n,this._children[n][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var n=this._parent[e];if(n!==I)return n}}children(e){if(i(e)&&(e=I),this._isCompound){var n=this._children[e];if(n)return t(n)}else{if(e===I)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var n=this._preds[e];if(n)return t(n)}successors(e){var n=this._sucs[e];if(n)return t(n)}neighbors(e){var n=this.predecessors(e);if(n)return s(n,this.successors(e))}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var t=this;o(this._nodes,(function(t,r){e(r)&&n.setNode(r,t)})),o(this._edgeObjs,(function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,t.edge(e))}));var r={};function i(e){var o=t.parent(e);return void 0===o||n.hasNode(o)?(r[e]=o,o):o in r?r[o]:i(o)}return this._isCompound&&o(n.nodes(),(function(e){n.setParent(e,i(e))})),n}
|
4 |
+
/* === Edge functions ========== */setDefaultEdgeLabel(t){return n(t)||(t=e(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return a(this._edgeObjs)}setPath(e,n){var t=this,r=arguments;return u(e,(function(e,o){return r.length>1?t.setEdge(e,o,n):t.setEdge(e,o),o})),this}
|
5 |
+
/*
|
6 |
+
* setEdge(v, w, [value, [name]])
|
7 |
+
* setEdge({ v, w, [name] }, [value])
|
8 |
+
*/setEdge(){var e,n,t,r,o=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,n=s.w,t=s.name,2===arguments.length&&(r=arguments[1],o=!0)):(e=s,n=arguments[1],t=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),e=""+e,n=""+n,i(t)||(t=""+t);var a=F(this._isDirected,e,n,t);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,a))return o&&(this._edgeLabels[a]=r),this;if(!i(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(n),this._edgeLabels[a]=o?r:this._defaultEdgeLabelFn(e,n,t);var u=function(e,n,t,r){var o=""+n,i=""+t;if(!e&&o>i){var s=o;o=i,i=s}var a={v:o,w:i};r&&(a.name=r);return a}(this._isDirected,e,n,t);return e=u.v,n=u.w,Object.freeze(u),this._edgeObjs[a]=u,R(this._preds[n],e),R(this._sucs[e],n),this._in[n][a]=u,this._out[e][a]=u,this._edgeCount++,this}edge(e,n,t){var r=1===arguments.length?D(this._isDirected,arguments[0]):F(this._isDirected,e,n,t);return this._edgeLabels[r]}hasEdge(e,n,t){var r=1===arguments.length?D(this._isDirected,arguments[0]):F(this._isDirected,e,n,t);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,n,t){var r=1===arguments.length?D(this._isDirected,arguments[0]):F(this._isDirected,e,n,t),o=this._edgeObjs[r];return o&&(e=o.v,n=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],T(this._preds[n],e),T(this._sucs[e],n),delete this._in[n][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,n){var t=this._in[e];if(t){var o=a(t);return n?r(o,(function(e){return e.v===n})):o}}outEdges(e,n){var t=this._out[e];if(t){var o=a(t);return n?r(o,(function(e){return e.w===n})):o}}nodeEdges(e,n){var t=this.inEdges(e,n);if(t)return t.concat(this.outEdges(e,n))}}function R(e,n){e[n]?e[n]++:e[n]=1}function T(e,n){--e[n]||delete e[n]}function F(e,n,t,r){var o=""+n,s=""+t;if(!e&&o>s){var a=o;o=s,s=a}return o+""+s+""+(i(r)?"\0":r)}function D(e,n){return F(e,n.v,n.w,n.name)}M.prototype._nodeCount=0,M.prototype._edgeCount=0;class S{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return G(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&G(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,t=n._prev;t!==n;)e.push(JSON.stringify(t,V)),t=t._prev;return"["+e.join(", ")+"]"}}function G(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function V(e,n){if("_next"!==e&&"_prev"!==e)return n}var q=e(1);function B(e,n){if(e.nodeCount()<=1)return[];var t=function(e,n){var t=new M,r=0,i=0;o(e.nodes(),(function(e){t.setNode(e,{v:e,in:0,out:0})})),o(e.edges(),(function(e){var o=t.edge(e.v,e.w)||0,s=n(e),a=o+s;t.setEdge(e.v,e.w,a),i=Math.max(i,t.node(e.v).out+=s),r=Math.max(r,t.node(e.w).in+=s)}));var s=f(i+r+3).map((function(){return new S})),a=r+1;return o(t.nodes(),(function(e){z(s,a,t.node(e))})),{graph:t,buckets:s,zeroIdx:a}}(e,n||q),r=function(e,n,t){var r,o=[],i=n[n.length-1],s=n[0];for(;e.nodeCount();){for(;r=s.dequeue();)Y(e,n,t,r);for(;r=i.dequeue();)Y(e,n,t,r);if(e.nodeCount())for(var a=n.length-2;a>0;--a)if(r=n[a].dequeue()){o=o.concat(Y(e,n,t,r,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return h(c(r,(function(n){return e.outEdges(n.v,n.w)})))}function Y(e,n,t,r,i){var s=i?[]:void 0;return o(e.inEdges(r.v),(function(r){var o=e.edge(r),a=e.node(r.v);i&&s.push({v:r.v,w:r.w}),a.out-=o,z(n,t,a)})),o(e.outEdges(r.v),(function(r){var o=e.edge(r),i=r.w,s=e.node(i);s.in-=o,z(n,t,s)})),e.removeNode(r.v),s}function z(e,n,t){t.out?t.in?e[t.out-t.in+n].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}function A(e){var n,t="greedy"===e.graph().acyclicer?B(e,(n=e,function(e){return n.edge(e).weight})):function(e){var n=[],t={},r={};function i(s){Object.prototype.hasOwnProperty.call(r,s)||(r[s]=!0,t[s]=!0,o(e.outEdges(s),(function(e){Object.prototype.hasOwnProperty.call(t,e.w)?n.push(e):i(e.w)})),delete t[s])}return o(e.nodes(),i),n}(e);o(t,(function(n){var t=e.edge(n);e.removeEdge(n),t.forwardName=n.name,t.reversed=!0,e.setEdge(n.w,n.v,t,g("rev"))}))}function J(e,n,t,r){var o;do{o=g(r)}while(e.hasNode(o));return t.dummy=n,e.setNode(o,t),o}function K(e){var n=new M({multigraph:e.isMultigraph()}).setGraph(e.graph());return o(e.nodes(),(function(t){e.children(t).length||n.setNode(t,e.node(t))})),o(e.edges(),(function(t){n.setEdge(t,e.edge(t))})),n}function Q(e,n){var t,r,o=e.x,i=e.y,s=n.x-o,a=n.y-i,u=e.width/2,d=e.height/2;if(!s&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*u>Math.abs(s)*d?(a<0&&(d=-d),t=d*s/a,r=d):(s<0&&(u=-u),t=u,r=u*a/s),{x:o+t,y:i+r}}function U(e){var n=c(f(X(e)+1),(function(){return[]}));return o(e.nodes(),(function(t){var r=e.node(t),o=r.rank;i(o)||(n[o][r.order]=t)})),n}function W(e,n,t,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=t,o.order=r),J(e,"border",o,n)}function X(e){return v(c(e.nodes(),(function(n){var t=e.node(n).rank;if(!i(t))return t})))}function Z(e,n){return n()}function H(e,n,t,r,o,i){var s={width:0,height:0,rank:i,borderType:n},a=o[n][i-1],u=J(e,"border",s,t);o[n][i]=u,e.setParent(u,r),a&&e.setEdge(a,u,{weight:1})}function $(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){o(e.nodes(),(function(n){te(e.node(n))})),o(e.edges(),(function(n){var t=e.edge(n);o(t.points,te),Object.prototype.hasOwnProperty.call(t,"y")&&te(t)}))}(e),"lr"!==n&&"rl"!==n||(!function(e){o(e.nodes(),(function(n){re(e.node(n))})),o(e.edges(),(function(n){var t=e.edge(n);o(t.points,re),Object.prototype.hasOwnProperty.call(t,"x")&&re(t)}))}(e),ee(e))}function ee(e){o(e.nodes(),(function(n){ne(e.node(n))})),o(e.edges(),(function(n){ne(e.edge(n))}))}function ne(e){var n=e.width;e.width=e.height,e.height=n}function te(e){e.y=-e.y}function re(e){var n=e.x;e.x=e.y,e.y=n}function oe(e){e.graph().dummyChains=[],o(e.edges(),(function(n){!function(e,n){var t=n.v,r=e.node(t).rank,o=n.w,i=e.node(o).rank,s=n.name,a=e.edge(n),u=a.labelRank;if(i===r+1)return;e.removeEdge(n);var d,h,c=void 0;for(h=0,++r;r<i;++h,++r)a.points=[],d=J(e,"edge",c={width:0,height:0,edgeLabel:a,edgeObj:n,rank:r},"_d"),r===u&&(c.width=a.width,c.height=a.height,c.dummy="edge-label",c.labelpos=a.labelpos),e.setEdge(t,d,{weight:a.weight},s),0===h&&e.graph().dummyChains.push(d),t=d;e.setEdge(t,o,{weight:a.weight},s)}(e,n)}))}function ie(e){var n={};o(e.sources(),(function t(r){var o=e.node(r);if(Object.prototype.hasOwnProperty.call(n,r))return o.rank;n[r]=!0;var i=l(c(e.outEdges(r),(function(n){return t(n.w)-e.edge(n).minlen})));return i!==Number.POSITIVE_INFINITY&&null!=// return value of _.map([]) for Lodash 3
|
9 |
+
i||(i=0),o.rank=i}))}function se(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function ae(e){var n,t,r=new M({directed:!1}),o=e.nodes()[0],i=e.nodeCount();for(r.setNode(o,{});ue(r,e)<i;)n=de(r,e),t=r.hasNode(n.v)?se(e,n):-se(e,n),he(r,e,t);return r}function ue(e,n){return o(e.nodes(),(function t(r){o(n.nodeEdges(r),(function(o){var i=o.v,s=r===i?o.w:i;e.hasNode(s)||se(n,o)||(e.setNode(s,{}),e.setEdge(r,s,{}),t(s))}))})),e.nodeCount()}function de(e,n){return w(n.edges(),(function(t){if(e.hasNode(t.v)!==e.hasNode(t.w))return se(n,t)}))}function he(e,n,t){o(e.nodes(),(function(e){n.node(e).rank+=t}))}function ce(e,n,t){m(n)||(n=[n]);var r=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],s={};return o(n,(function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);fe(e,n,"post"===t,s,r,i)})),i}function fe(e,n,t,r,i,s){Object.prototype.hasOwnProperty.call(r,n)||(r[n]=!0,t||s.push(n),o(i(n),(function(n){fe(e,n,t,r,i,s)})),t&&s.push(n))}function ge(e){e=function(e){var n=(new M).setGraph(e.graph());return o(e.nodes(),(function(t){n.setNode(t,e.node(t))})),o(e.edges(),(function(t){var r=n.edge(t.v,t.w)||{weight:0,minlen:1},o=e.edge(t);n.setEdge(t.v,t.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),n}(e),ie(e);var n,t=ae(e);for(pe(t),le(t,e);n=me(t);)ye(t,e,n,be(t,e,n))}function le(e,n){var t=function(e,n){return ce(e,n,"post")}(e,e.nodes());t=t.slice(0,t.length-1),o(t,(function(t){!function(e,n,t){var r=e.node(t),o=r.parent;e.edge(t,o).cutvalue=ve(e,n,t)}(e,n,t)}))}function ve(e,n,t){var r=e.node(t).parent,i=!0,s=n.edge(t,r),a=0;return s||(i=!1,s=n.edge(r,t)),a=s.weight,o(n.nodeEdges(t),(function(o){var s,u,d=o.v===t,h=d?o.w:o.v;if(h!==r){var c=d===i,f=n.edge(o).weight;if(a+=c?f:-f,s=t,u=h,e.hasEdge(s,u)){var g=e.edge(t,h).cutvalue;a+=c?-g:g}}})),a}function pe(e,n){arguments.length<2&&(n=e.nodes()[0]),we(e,{},1,n)}function we(e,n,t,r,i){var s=t,a=e.node(r);return n[r]=!0,o(e.neighbors(r),(function(o){Object.prototype.hasOwnProperty.call(n,o)||(t=we(e,n,t,o,r))})),a.low=s,a.lim=t++,i?a.parent=i:delete a.parent,t}function me(e){return b(e.edges(),(function(n){return e.edge(n).cutvalue<0}))}function be(e,n,t){var o=t.v,i=t.w;n.hasEdge(o,i)||(o=t.w,i=t.v);var s=e.node(o),a=e.node(i),u=s,d=!1;s.lim>a.lim&&(u=a,d=!0);var h=r(n.edges(),(function(n){return d===_e(e,e.node(n.v),u)&&d!==_e(e,e.node(n.w),u)}));return w(h,(function(e){return se(n,e)}))}function ye(e,n,t,r){var i=t.v,s=t.w;e.removeEdge(i,s),e.setEdge(r.v,r.w,{}),pe(e),le(e,n),function(e,n){var t=b(e.nodes(),(function(e){return!n.node(e).parent})),r=function(e,n){return ce(e,n,"pre")}(e,t);r=r.slice(1),o(r,(function(t){var r=e.node(t).parent,o=n.edge(t,r),i=!1;o||(o=n.edge(r,t),i=!0),n.node(t).rank=n.node(r).rank+(i?o.minlen:-o.minlen)}))}(e,n)}function _e(e,n,t){return t.low<=n.lim&&n.lim<=t.lim}function Ee(e){switch(e.graph().ranker){case"network-simplex":default:xe(e);break;case"tight-tree":!function(e){ie(e),ae(e)}(e);break;case"longest-path":ke(e)}}new Error,ge.initLowLimValues=pe,ge.initCutValues=le,ge.calcCutValue=ve,ge.leaveEdge=me,ge.enterEdge=be,ge.exchangeEdges=ye;var ke=ie;function xe(e){ge(e)}function Ne(e){var n=J(e,"root",{},"_root"),t=function(e){var n={};function t(r,i){var s=e.children(r);s&&s.length&&o(s,(function(e){t(e,i+1)})),n[r]=i}return o(e.children(),(function(e){t(e,1)})),n}(e),r=v(a(t))-1,i=2*r+1;e.graph().nestingRoot=n,o(e.edges(),(function(n){e.edge(n).minlen*=i}));var s=function(e){return u(e.edges(),(function(n,t){return n+e.edge(t).weight}),0)}(e)+1;o(e.children(),(function(o){Oe(e,n,i,s,r,t,o)})),e.graph().nodeRankFactor=i}function Oe(e,n,t,r,i,s,a){var u=e.children(a);if(u.length){var d=W(e,"_bt"),h=W(e,"_bb"),c=e.node(a);e.setParent(d,a),c.borderTop=d,e.setParent(h,a),c.borderBottom=h,o(u,(function(o){Oe(e,n,t,r,i,s,o);var u=e.node(o),c=u.borderTop?u.borderTop:o,f=u.borderBottom?u.borderBottom:o,g=u.borderTop?r:2*r,l=c!==f?1:i-s[a]+1;e.setEdge(d,c,{weight:g,minlen:l,nestingEdge:!0}),e.setEdge(f,h,{weight:g,minlen:l,nestingEdge:!0})})),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+s[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:t})}function Pe(e,n,t){var r=function(e){var n;for(;e.hasNode(n=g("_root")););return n}(e),s=new M({compound:!0}).setGraph({root:r}).setDefaultNodeLabel((function(n){return e.node(n)}));return o(e.nodes(),(function(a){var u=e.node(a),d=e.parent(a);(u.rank===n||u.minRank<=n&&n<=u.maxRank)&&(s.setNode(a),s.setParent(a,d||r),o(e[t](a),(function(n){var t=n.v===a?n.w:n.v,r=s.edge(t,a),o=i(r)?0:r.weight;s.setEdge(t,a,{weight:e.edge(n).weight+o})})),Object.prototype.hasOwnProperty.call(u,"minRank")&&s.setNode(a,{borderLeft:u.borderLeft[n],borderRight:u.borderRight[n]}))})),s}function Ce(e,n){for(var t=0,r=1;r<n.length;++r)t+=je(e,n[r-1],n[r]);return t}function je(e,n,t){for(var r=y(t,c(t,(function(e,n){return n}))),i=h(c(n,(function(n){return _(c(e.outEdges(n),(function(n){return{pos:r[n.w],weight:e.edge(n).weight}})),"pos")}))),s=1;s<t.length;)s<<=1;var a=2*s-1;s-=1;var u=c(new Array(a),(function(){return 0})),d=0;return o(
|
10 |
+
// @ts-expect-error
|
11 |
+
i.forEach((function(e){var n=e.pos+s;u[n]+=e.weight;for(var t=0;n>0;)n%2&&(t+=u[n+1]),u[n=n-1>>1]+=e.weight;d+=e.weight*t}))),d}function Le(e,n){var t={};return o(e,(function(e,n){var r=t[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};i(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)})),o(n.edges(),(function(e){var n=t[e.v],r=t[e.w];i(n)||i(r)||(r.indegree++,n.out.push(t[e.w]))})),function(e){var n=[];function t(e){return function(n){n.merged||(i(n.barycenter)||i(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var t=0,r=0;e.weight&&(t+=e.barycenter*e.weight,r+=e.weight);n.weight&&(t+=n.barycenter*n.weight,r+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=t/r,e.weight=r,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function s(n){return function(t){t.in.push(n),0==--t.indegree&&e.push(t)}}for(;e.length;){var a=e.pop();n.push(a),o(a.in.reverse(),t(a)),o(a.out,s(a))}return c(r(n,(function(e){return!e.merged})),(function(e){return E(e,["vs","i","barycenter","weight"])}))}(r(t,(function(e){return!e.indegree})))}function Ie(e,n){var t,r=function(e,n){var t={lhs:[],rhs:[]};return o(e,(function(e){n(e)?t.lhs.push(e):t.rhs.push(e)})),t}(e,(function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")})),i=r.lhs,s=_(r.rhs,(function(e){return-e.i})),a=[],u=0,d=0,c=0;i.sort((t=!!n,function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:t?n.i-e.i:e.i-n.i})),c=Me(a,s,c),o(i,(function(e){c+=e.vs.length,a.push(e.vs),u+=e.barycenter*e.weight,d+=e.weight,c=Me(a,s,c)}));var f={vs:h(a)};return d&&(f.barycenter=u/d,f.weight=d),f}function Me(e,n,t){for(var r;n.length&&(r=k(n)).i<=t;)n.pop(),e.push(r.vs),t++;return t}function Re(e,n,t,s){var a=e.children(n),d=e.node(n),f=d?d.borderLeft:void 0,g=d?d.borderRight:void 0,l={};f&&(a=r(a,(function(e){return e!==f&&e!==g})));var v=function(e,n){return c(n,(function(n){var t=e.inEdges(n);if(t.length){var r=u(t,(function(n,t){var r=e.edge(t),o=e.node(t.v);return{sum:n.sum+r.weight*o.order,weight:n.weight+r.weight}}),{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}return{v:n}}))}(e,a);o(v,(function(n){if(e.children(n.v).length){var r=Re(e,n.v,t,s);l[n.v]=r,Object.prototype.hasOwnProperty.call(r,"barycenter")&&(a=r,i((o=n).barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a}));var p=Le(v,t);!function(e,n){o(e,(function(e){e.vs=h(e.vs.map((function(e){return n[e]?n[e].vs:e})))}))}(p,l);var w=Ie(p,s);if(f&&(w.vs=h([f,w.vs,g]),e.predecessors(f).length)){var m=e.node(e.predecessors(f)[0]),b=e.node(e.predecessors(g)[0]);Object.prototype.hasOwnProperty.call(w,"barycenter")||(w.barycenter=0,w.weight=0),w.barycenter=(w.barycenter*w.weight+m.order+b.order)/(w.weight+2),w.weight+=2}return w}function Te(e){var n=X(e),t=Fe(e,f(1,n+1),"inEdges"),i=Fe(e,f(n-1,-1,-1),"outEdges"),s=function(e){var n={},t=r(e.nodes(),(function(n){return!e.children(n).length})),i=v(c(t,(function(n){return e.node(n).rank}))),s=c(f(i+1),(function(){return[]})),a=_(t,(function(n){return e.node(n).rank}));return o(a,(function t(r){if(!p(n,r)){n[r]=!0;var i=e.node(r);s[i.rank].push(r),o(e.successors(r),t)}})),s}(e);Se(e,s);for(var a,u=Number.POSITIVE_INFINITY,d=0,h=0;h<4;++d,++h){De(d%2?t:i,d%4>=2);var g=Ce(e,s=U(e));g<u&&(h=0,a=x(s),u=g)}Se(e,a)}function Fe(e,n,t){return c(n,(function(n){return Pe(e,n,t)}))}function De(e,n){var t=new M;o(e,(function(e){var r=e.graph().root,i=Re(e,r,t,n);o(i.vs,(function(n,t){e.node(n).order=t})),function(e,n,t){var r,i={};o(t,(function(t){for(var o,s,a=e.parent(t);a;){if((o=e.parent(a))?(s=i[o],i[o]=a):(s=r,r=a),s&&s!==a)return void n.setEdge(s,a);a=o}}))}(e,t,i.vs)}))}function Se(e,n){o(n,(function(n){o(n,(function(n,t){e.node(n).order=t}))}))}function Ge(e){var n=function(e){var n={},t=0;function r(i){var s=t;o(e.children(i),r),n[i]={low:s,lim:t++}}return o(e.children(),r),n}(e);o(e.graph().dummyChains,(function(t){for(var r=e.node(t),o=r.edgeObj,i=function(e,n,t,r){var o,i,s=[],a=[],u=Math.min(n[t].low,n[r].low),d=Math.max(n[t].lim,n[r].lim);o=t;do{o=e.parent(o),s.push(o)}while(o&&(n[o].low>u||d>n[o].lim));i=o,o=r;for(;(o=e.parent(o))!==i;)a.push(o);return{path:s.concat(a.reverse()),lca:i}}(e,n,o.v,o.w),s=i.path,a=i.lca,u=0,d=s[u],h=!0;t!==o.w;){if(r=e.node(t),h){for(;(d=s[u])!==a&&e.node(d).maxRank<r.rank;)u++;d===a&&(h=!1)}if(!h){for(;u<s.length-1&&e.node(d=s[u+1]).minRank<=r.rank;)u++;d=s[u]}e.setParent(t,d),t=e.successors(t)[0]}}))}function Ve(e,n){var t={};return u(n,(function(n,r){var i=0,s=0,a=n.length,u=k(r);return o(r,(function(n,d){var h=function(e,n){if(e.node(n).dummy)return b(e.predecessors(n),(function(n){return e.node(n).dummy}))}(e,n),c=h?e.node(h).order:a;(h||n===u)&&(o(r.slice(s,d+1),(function(n){o(e.predecessors(n),(function(r){var o=e.node(r),s=o.order;!(s<i||c<s)||o.dummy&&e.node(n).dummy||qe(t,r,n)}))})),s=d+1,i=c)})),r})),t}function qe(e,n,t){if(n>t){var r=n;n=t,t=r}var o=e[n];o||(e[n]=o={}),o[t]=!0}function Be(e,n,t){if(n>t){var r=n;n=t,t=r}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],t)}function Ye(e,n,t,r,i){var s={},a=function(e,n,t,r){var i=new M,s=e.graph(),a=function(e,n,t){return function(r,o,i){var s,a=r.node(o),u=r.node(i),d=0;if(d+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":s=-a.width/2;break;case"r":s=a.width/2}if(s&&(d+=t?s:-s),s=0,d+=(a.dummy?n:e)/2,d+=(u.dummy?n:e)/2,d+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2}return s&&(d+=t?s:-s),s=0,d}}(s.nodesep,s.edgesep,r);return o(n,(function(n){var r;o(n,(function(n){var o=t[n];if(i.setNode(o),r){var s=t[r],u=i.edge(s,o);i.setEdge(s,o,Math.max(a(e,n,r),u||0))}r=n}))})),i}(e,n,t,i),u=i?"borderLeft":"borderRight";function d(e,n){for(var t=a.nodes(),r=t.pop(),o={};r;)o[r]?e(r):(o[r]=!0,t.push(r),t=t.concat(n(r))),r=t.pop()}return d((function(e){s[e]=a.inEdges(e).reduce((function(e,n){return Math.max(e,s[n.v]+a.edge(n))}),0)}),a.predecessors.bind(a)),d((function(n){var t=a.outEdges(n).reduce((function(e,n){return Math.min(e,s[n.w]-a.edge(n))}),Number.POSITIVE_INFINITY),r=e.node(n);t!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[n]=Math.max(s[n],t))}),a.successors.bind(a)),o(r,(function(e){s[e]=s[t[e]]})),s}function ze(e){var n,t=U(e),r=N(Ve(e,t),function(e,n){var t={};function r(n,r,i,s,a){var u;o(f(r,i),(function(r){u=n[r],e.node(u).dummy&&o(e.predecessors(u),(function(n){var r=e.node(n);r.dummy&&(r.order<s||r.order>a)&&qe(t,n,u)}))}))}return u(n,(function(n,t){var i,s=-1,a=0;return o(t,(function(o,u){if("border"===e.node(o).dummy){var d=e.predecessors(o);d.length&&(i=e.node(d[0]).order,r(t,a,u,s,i),a=u,s=i)}r(t,a,t.length,i,n.length)})),t})),t}(e,t)),i={};o(["u","d"],(function(s){n="u"===s?t:a(t).reverse(),o(["l","r"],(function(t){"r"===t&&(n=c(n,(function(e){return a(e).reverse()})));var u=("u"===s?e.predecessors:e.successors).bind(e),d=function(e,n,t,r){var i={},s={},a={};return o(n,(function(e){o(e,(function(e,n){i[e]=e,s[e]=e,a[e]=n}))})),o(n,(function(e){var n=-1;o(e,(function(e){var o=r(e);if(o.length)for(var u=((o=_(o,(function(e){return a[e]}))).length-1)/2,d=Math.floor(u),h=Math.ceil(u);d<=h;++d){var c=o[d];s[e]===e&&n<a[c]&&!Be(t,e,c)&&(s[c]=e,s[e]=i[e]=i[c],n=a[c])}}))})),{root:i,align:s}}(0,n,r,u),h=Ye(e,n,d.root,d.align,"r"===t);"r"===t&&(h=O(h,(function(e){return-e}))),i[s+t]=h}))}));var s=function(e,n){return w(a(n),(function(n){var t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;return P(n,(function(n,o){var i=function(e,n){return e.node(n).width}(e,o)/2;t=Math.max(n+i,t),r=Math.min(n-i,r)})),t-r}))}(e,i);return function(e,n){var t=a(n),r=l(t),i=v(t);o(["u","d"],(function(t){o(["l","r"],(function(o){var s,u=t+o,d=e[u];if(d!==n){var h=a(d);(s="l"===o?r-l(h):i-v(h))&&(e[u]=O(d,(function(e){return e+s})))}}))}))}(i,s),function(e,n){return O(e.ul,(function(t,r){if(n)return e[n.toLowerCase()][r];var o=_(c(e,r));return(o[1]+o[2])/2}))}(i,e.graph().align)}function Ae(e){(function(e){var n=U(e),t=e.graph().ranksep,r=0;o(n,(function(n){var i=v(c(n,(function(n){return e.node(n).height})));o(n,(function(n){e.node(n).y=r+i/2})),r+=i+t}))})(e=K(e)),C(ze(e),(function(n,t){e.node(t).x=n}))}function Je(e,n){var t=Z;t("layout",(()=>{var n=t(" buildLayoutGraph",(()=>function(e){var n=new M({multigraph:!0,compound:!0}),t=nn(e.graph());return n.setGraph(N({},Qe,en(t,Ke),E(t,Ue))),o(e.nodes(),(function(t){var r=nn(e.node(t));n.setNode(t,j(en(r,We),Xe)),n.setParent(t,e.parent(t))})),o(e.edges(),(function(t){var r=nn(e.edge(t));n.setEdge(t,N({},He,en(r,Ze),E(r,$e)))})),n}(e)));t(" runLayout",(()=>function(e,n){n(" makeSpaceForEdgeLabels",(()=>function(e){var n=e.graph();n.ranksep/=2,o(e.edges(),(function(t){var r=e.edge(t);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e))),n(" removeSelfEdges",(()=>function(e){o(e.edges(),(function(n){if(n.v===n.w){var t=e.node(n.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}}))}(e))),n(" acyclic",(()=>A(e))),n(" nestingGraph.run",(()=>Ne(e))),n(" rank",(()=>Ee(K(e)))),n(" injectEdgeLabelProxies",(()=>function(e){o(e.edges(),(function(n){var t=e.edge(n);if(t.width&&t.height){var r=e.node(n.v),o={rank:(e.node(n.w).rank-r.rank)/2+r.rank,e:n};J(e,"edge-proxy",o,"_ep")}}))}(e))),n(" removeEmptyRanks",(()=>function(e){var n=l(c(e.nodes(),(function(n){return e.node(n).rank}))),t=[];o(e.nodes(),(function(r){var o=e.node(r).rank-n;t[o]||(t[o]=[]),t[o].push(r)}));var r=0,s=e.graph().nodeRankFactor;o(t,(function(n,t){i(n)&&t%s!=0?--r:r&&o(n,(function(n){e.node(n).rank+=r}))}))}(e))),n(" nestingGraph.cleanup",(()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,o(e.edges(),(function(n){e.edge(n).nestingEdge&&e.removeEdge(n)}))}(e))),n(" normalizeRanks",(()=>function(e){var n=l(c(e.nodes(),(function(n){return e.node(n).rank})));o(e.nodes(),(function(t){var r=e.node(t);p(r,"rank")&&(r.rank-=n)}))}(e))),n(" assignRankMinMax",(()=>function(e){var n=0;o(e.nodes(),(function(t){var r=e.node(t);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,n=v(n,r.maxRank))})),e.graph().maxRank=n}(e))),n(" removeEdgeLabelProxies",(()=>function(e){o(e.nodes(),(function(n){var t=e.node(n);"edge-proxy"===t.dummy&&(e.edge(t.e).labelRank=t.rank,e.removeNode(n))}))}(e))),n(" normalize.run",(()=>oe(e))),n(" parentDummyChains",(()=>Ge(e))),n(" addBorderSegments",(()=>function(e){o(e.children(),(function n(t){var r=e.children(t),i=e.node(t);if(r.length&&o(r,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,a=i.maxRank+1;s<a;++s)H(e,"borderLeft","_bl",t,i,s),H(e,"borderRight","_br",t,i,s)}}))}(e))),n(" order",(()=>Te(e))),n(" insertSelfEdges",(()=>function(e){var n=U(e);o(n,(function(n){var t=0;o(n,(function(n,r){var i=e.node(n);i.order=r+t,o(i.selfEdges,(function(n){J(e,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:r+ ++t,e:n.e,label:n.label},"_se")})),delete i.selfEdges}))}))}(e))),n(" adjustCoordinateSystem",(()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||ee(e)}(e))),n(" position",(()=>Ae(e))),n(" positionSelfEdges",(()=>function(e){o(e.nodes(),(function(n){var t=e.node(n);if("selfedge"===t.dummy){var r=e.node(t.e.v),o=r.x+r.width/2,i=r.y,s=t.x-o,a=r.height/2;e.setEdge(t.e,t.label),e.removeNode(n),t.label.points=[{x:o+2*s/3,y:i-a},{x:o+5*s/6,y:i-a},{x:o+s,y:i},{x:o+5*s/6,y:i+a},{x:o+2*s/3,y:i+a}],t.label.x=t.x,t.label.y=t.y}}))}(e))),n(" removeBorderNodes",(()=>function(e){o(e.nodes(),(function(n){if(e.children(n).length){var t=e.node(n),r=e.node(t.borderTop),o=e.node(t.borderBottom),i=e.node(k(t.borderLeft)),s=e.node(k(t.borderRight));t.width=Math.abs(s.x-i.x),t.height=Math.abs(o.y-r.y),t.x=i.x+t.width/2,t.y=r.y+t.height/2}})),o(e.nodes(),(function(n){"border"===e.node(n).dummy&&e.removeNode(n)}))}(e))),n(" normalize.undo",(()=>function(e){o(e.graph().dummyChains,(function(n){var t,r=e.node(n),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)t=e.successors(n)[0],e.removeNode(n),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),n=t,r=e.node(n)}))}(e))),n(" fixupEdgeLabelCoords",(()=>function(e){o(e.edges(),(function(n){var t=e.edge(n);if(Object.prototype.hasOwnProperty.call(t,"x"))switch("l"!==t.labelpos&&"r"!==t.labelpos||(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset}}))}(e))),n(" undoCoordinateSystem",(()=>$(e))),n(" translateGraph",(()=>function(e){var n=Number.POSITIVE_INFINITY,t=0,r=Number.POSITIVE_INFINITY,i=0,s=e.graph(),a=s.marginx||0,u=s.marginy||0;function d(e){var o=e.x,s=e.y,a=e.width,u=e.height;n=Math.min(n,o-a/2),t=Math.max(t,o+a/2),r=Math.min(r,s-u/2),i=Math.max(i,s+u/2)}o(e.nodes(),(function(n){d(e.node(n))})),o(e.edges(),(function(n){var t=e.edge(n);Object.prototype.hasOwnProperty.call(t,"x")&&d(t)})),n-=a,r-=u,o(e.nodes(),(function(t){var o=e.node(t);o.x-=n,o.y-=r})),o(e.edges(),(function(t){var i=e.edge(t);o(i.points,(function(e){e.x-=n,e.y-=r})),Object.prototype.hasOwnProperty.call(i,"x")&&(i.x-=n),Object.prototype.hasOwnProperty.call(i,"y")&&(i.y-=r)})),s.width=t-n+a,s.height=i-r+u}(e))),n(" assignNodeIntersects",(()=>function(e){o(e.edges(),(function(n){var t,r,o=e.edge(n),i=e.node(n.v),s=e.node(n.w);o.points?(t=o.points[0],r=o.points[o.points.length-1]):(o.points=[],t=s,r=i),o.points.unshift(Q(i,t)),o.points.push(Q(s,r))}))}(e))),n(" reversePoints",(()=>function(e){o(e.edges(),(function(n){var t=e.edge(n);t.reversed&&t.points.reverse()}))}(e))),n(" acyclic.undo",(()=>function(e){o(e.edges(),(function(n){var t=e.edge(n);if(t.reversed){e.removeEdge(n);var r=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(n.w,n.v,t,r)}}))}(e)))}(n,t))),t(" updateInputGraph",(()=>function(e,n){o(e.nodes(),(function(t){var r=e.node(t),o=n.node(t);r&&(r.x=o.x,r.y=o.y,n.children(t).length&&(r.width=o.width,r.height=o.height))})),o(e.edges(),(function(t){var r=e.edge(t),o=n.edge(t);r.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(r.x=o.x,r.y=o.y)})),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,n)))}))}var Ke=["nodesep","edgesep","ranksep","marginx","marginy"],Qe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Ue=["acyclicer","ranker","rankdir","align"],We=["width","height"],Xe={width:0,height:0},Ze=["minlen","weight","width","height","labeloffset"],He={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},$e=["labelpos"];function en(e,n){return O(E(e,n),Number)}function nn(e){var n={};return o(e,(function(e,t){n[t.toLowerCase()]=e})),n}function tn(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:rn(e),edges:on(e)};return i(e.graph())||(n.value=L(e.graph())),n}function rn(e){return c(e.nodes(),(function(n){var t=e.node(n),r=e.parent(n),o={v:n};return i(t)||(o.value=t),i(r)||(o.parent=r),o}))}function on(e){return c(e.edges(),(function(n){var t=e.edge(n),r={v:n.v,w:n.w};return i(n.name)||(r.name=n.name),i(t)||(r.value=t),r}))}export{M as G,Je as l,tn as w};
|
.output/public/assets/debug-l0sNRNKZ.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
|
.output/public/assets/dompurify-z_KyBU9t.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
|
2 |
+
const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),N=(b=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(b,t)});var b;function R(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function v(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=v(r):n[o]=r)}return n}function D(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),k=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),I=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9;var oe=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const o=e=>t(e);if(o.version="3.2.4",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:b,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=D(q,"cloneNode"),V=D(q,"remove"),oe=D(q,"nextSibling"),re=D(q,"childNodes"),ie=D(q,"parentNode");if("function"==typeof b){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ae,le="";const{implementation:ce,createNodeIterator:se,createDocumentFragment:ue,getElementsByTagName:me}=r,{importNode:pe}=a;let fe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ie&&ce&&void 0!==ce.createHTMLDocument;const{MUSTACHE_EXPR:de,ERB_EXPR:he,TMPLIT_EXPR:ge,DATA_ATTR:Te,ARIA_ATTR:ye,IS_SCRIPT_OR_DATA:Ee,ATTR_WHITESPACE:Ae,CUSTOM_ELEMENT:_e}=Z;let{IS_ALLOWED_URI:Se}=Z,Ne=null;const be=w({},[...L,...C,...x,...I,...U]);let Re=null;const we=w({},[...z,...P,...H,...F]);let Oe=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,De=null,Le=!0,Ce=!0,xe=!1,ke=!0,Ie=!1,Me=!0,Ue=!1,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!0,Ge=!1,Ye=!0,je=!1,Xe={},qe=null;const $e=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ke=null;const Ve=w({},["audio","video","img","source","image","track"]);let Ze=null;const Je=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qe="http://www.w3.org/1998/Math/MathML",et="http://www.w3.org/2000/svg",tt="http://www.w3.org/1999/xhtml";let nt=tt,ot=!1,rt=null;const it=w({},[Qe,et,tt],g);let at=w({},["mi","mo","mn","ms","mtext"]),lt=w({},["annotation-xml"]);const ct=w({},["title","style","font","a","script"]);let st=null;const ut=["application/xhtml+xml","text/html"];let mt=null,pt=null;const ft=r.createElement("form"),dt=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!pt||pt!==e){if(e&&"object"==typeof e||(e={}),e=v(e),st=// eslint-disable-next-line unicorn/prefer-includes
|
3 |
+
-1===ut.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,mt="application/xhtml+xml"===st?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,mt):be,Re=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,mt):we,rt=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):it,Ze=_(e,"ADD_URI_SAFE_ATTR")?w(v(Je),e.ADD_URI_SAFE_ATTR,mt):Je,Ke=_(e,"ADD_DATA_URI_TAGS")?w(v(Ve),e.ADD_DATA_URI_TAGS,mt):Ve,qe=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,mt):$e,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,mt):{},De=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,mt):{},Xe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ie=e.SAFE_FOR_TEMPLATES||!1,Me=!1!==e.SAFE_FOR_XML,Ue=e.WHOLE_DOCUMENT||!1,He=e.RETURN_DOM||!1,Fe=e.RETURN_DOM_FRAGMENT||!1,Be=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,We=!1!==e.SANITIZE_DOM,Ge=e.SANITIZE_NAMED_PROPS||!1,Ye=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,Se=e.ALLOWED_URI_REGEXP||X,nt=e.NAMESPACE||tt,at=e.MATHML_TEXT_INTEGRATION_POINTS||at,lt=e.HTML_INTEGRATION_POINTS||lt,Oe=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Oe.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Oe.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Oe.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(Ce=!1),Fe&&(He=!0),Xe&&(Ne=w({},U),Re=[],!0===Xe.html&&(w(Ne,L),w(Re,z)),!0===Xe.svg&&(w(Ne,C),w(Re,P),w(Re,F)),!0===Xe.svgFilters&&(w(Ne,x),w(Re,P),w(Re,F)),!0===Xe.mathMl&&(w(Ne,I),w(Re,H),w(Re,F))),e.ADD_TAGS&&(Ne===be&&(Ne=v(Ne)),w(Ne,e.ADD_TAGS,mt)),e.ADD_ATTR&&(Re===we&&(Re=v(Re)),w(Re,e.ADD_ATTR,mt)),e.ADD_URI_SAFE_ATTR&&w(Ze,e.ADD_URI_SAFE_ATTR,mt),e.FORBID_CONTENTS&&(qe===$e&&(qe=v(qe)),w(qe,e.FORBID_CONTENTS,mt)),Ye&&(Ne["#text"]=!0),Ue&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ae=e.TRUSTED_TYPES_POLICY,le=ae.createHTML("")}else void 0===ae&&(ae=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(i){return null}}(j,c)),null!==ae&&"string"==typeof le&&(le=ae.createHTML(""));i&&i(e),pt=e}},gt=w({},[...C,...x,...k]),Tt=w({},[...I,...M]),yt=function(e){f(o.removed,{element:e});try{ie(e).removeChild(e)}catch(t){V(e)}},Et=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(n){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(He||Fe)try{yt(t)}catch(n){}else try{t.setAttribute(e,"")}catch(n){}},At=function(e){let t=null,n=null;if(Pe)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===st&&nt===tt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ae?ae.createHTML(e):e;if(nt===tt)try{t=(new Y).parseFromString(o,st)}catch(a){}if(!t||!t.documentElement){t=ce.createDocument(nt,"template",null);try{t.documentElement.innerHTML=ot?le:o}catch(a){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),nt===tt?me.call(t,Ue?"html":"body")[0]:Ue?t.documentElement:i},_t=function(e){return se.call(e.ownerDocument||e,e,
|
4 |
+
// eslint-disable-next-line no-bitwise
|
5 |
+
B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},St=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function bt(e,t,n){u(e,(e=>{e.call(o,t,n,pt)}))}const Rt=function(e){let t=null;if(bt(fe.beforeSanitizeElements,e,null),St(e))return yt(e),!0;const n=mt(e.nodeName);if(bt(fe.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return yt(e),!0;if(e.nodeType===ee)return yt(e),!0;if(Me&&e.nodeType===te&&S(/<[/\w]/g,e.data))return yt(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Ot(n)){if(Oe.tagNameCheck instanceof RegExp&&S(Oe.tagNameCheck,n))return!1;if(Oe.tagNameCheck instanceof Function&&Oe.tagNameCheck(n))return!1}if(Ye&&!qe[n]){const t=ie(e)||e.parentNode,n=re(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,oe(e))}}}return yt(e),!0}return e instanceof O&&!function(e){let t=ie(e);t&&t.tagName||(t={namespaceURI:nt,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!rt[e.namespaceURI]&&(e.namespaceURI===et?t.namespaceURI===tt?"svg"===n:t.namespaceURI===Qe?"svg"===n&&("annotation-xml"===o||at[o]):Boolean(gt[n]):e.namespaceURI===Qe?t.namespaceURI===tt?"math"===n:t.namespaceURI===et?"math"===n&<[o]:Boolean(Tt[n]):e.namespaceURI===tt?!(t.namespaceURI===et&&!lt[o])&&!(t.namespaceURI===Qe&&!at[o])&&!Tt[n]&&(ct[n]||!gt[n]):!("application/xhtml+xml"!==st||!rt[e.namespaceURI]))}(e)?(yt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&e.nodeType===Q&&(t=e.textContent,u([de,he,ge],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),bt(fe.afterSanitizeElements,e,null),!1):(yt(e),!0)},wt=function(e,t,n){if(We&&("id"===t||"name"===t)&&(n in r||n in ft))return!1;if(Ce&&!De[t]&&S(Te,t));else if(Le&&S(ye,t));else if(!Re[t]||De[t]){if(
|
6 |
+
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
7 |
+
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
8 |
+
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
9 |
+
!(Ot(e)&&(Oe.tagNameCheck instanceof RegExp&&S(Oe.tagNameCheck,e)||Oe.tagNameCheck instanceof Function&&Oe.tagNameCheck(e))&&(Oe.attributeNameCheck instanceof RegExp&&S(Oe.attributeNameCheck,t)||Oe.attributeNameCheck instanceof Function&&Oe.attributeNameCheck(t))||// Alternative, second condition checks if it's an `is`-attribute, AND
|
10 |
+
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
11 |
+
"is"===t&&Oe.allowCustomizedBuiltInElements&&(Oe.tagNameCheck instanceof RegExp&&S(Oe.tagNameCheck,n)||Oe.tagNameCheck instanceof Function&&Oe.tagNameCheck(n))))return!1}else if(Ze[t]);else if(S(Se,y(n,Ae,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ke[e]){if(xe&&!S(Ee,y(n,Ae,"")));else if(n)return!1}else;return!0},Ot=function(e){return"annotation-xml"!==e&&T(e,_e)},vt=function(e){bt(fe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||St(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Re,forceKeepAttr:void 0};let r=t.length;for(;r--;){const a=t[r],{name:l,namespaceURI:c,value:s}=a,m=mt(l);let f="value"===l?s:A(s);if(n.attrName=m,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,bt(fe.uponSanitizeAttribute,e,n),f=n.attrValue,!Ge||"id"!==m&&"name"!==m||(Et(l,e),f="user-content-"+f),Me&&S(/((--!?|])>)|<\/(style|title)/i,f)){Et(l,e);continue}if(n.forceKeepAttr)continue;if(Et(l,e),!n.keepAttr)continue;if(!ke&&S(/\/>/i,f)){Et(l,e);continue}Ie&&u([de,he,ge],(e=>{f=y(f,e," ")}));const d=mt(e.nodeName);if(wt(d,m,f)){if(ae&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(c);else switch(j.getAttributeType(d,m)){case"TrustedHTML":f=ae.createHTML(f);break;case"TrustedScriptURL":f=ae.createScriptURL(f)}try{c?e.setAttributeNS(c,l,f):e.setAttribute(l,f),St(e)?yt(e):p(o.removed)}catch(i){}}}bt(fe.afterSanitizeAttributes,e,null)},Dt=function e(t){let n=null;const o=_t(t);for(bt(fe.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)bt(fe.uponSanitizeShadowNode,n,null),Rt(n),vt(n),n.content instanceof s&&e(n.content);bt(fe.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(ot=!e,ot&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw N("toString is not a function");if("string"!=typeof(e=e.toString()))throw N("dirty is not a string, aborting")}if(!o.isSupported)return e;if(ze||ht(t),o.removed=[],"string"==typeof e&&(je=!1),je){if(e.nodeName){const t=mt(e.nodeName);if(!Ne[t]||ve[t])throw N("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=At("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!He&&!Ie&&!Ue&&// eslint-disable-next-line unicorn/prefer-includes
|
12 |
+
-1===e.indexOf("<"))return ae&&Be?ae.createHTML(e):e;if(n=At(e),!n)return He?null:Be?le:""}n&&Pe&&yt(n.firstChild);const c=_t(je?e:n);for(;i=c.nextNode();)Rt(i),vt(i),i.content instanceof s&&Dt(i.content);if(je)return e;if(He){if(Fe)for(l=ue.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Re.shadowroot||Re.shadowrootmode)&&(l=pe.call(a,l,!0)),l}let m=Ue?n.outerHTML:n.innerHTML;return Ue&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ie&&u([de,he,ge],(e=>{m=y(m,e," ")})),ae&&Be?ae.createHTML(m):m},o.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),ze=!0},o.clearConfig=function(){pt=null,ze=!1},o.isValidAttribute=function(e,t,n){pt||ht({});const o=mt(e),r=mt(t);return wt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(fe[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(fe[e],t);return-1===n?void 0:d(fe[e],n,1)[0]}return p(fe[e])},o.removeHooks=function(e){fe[e]=[]},o.removeAllHooks=function(){fe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();export{oe as p};
|
.output/public/assets/help-C3VRXhvZ.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{F as s}from"./FrameContent-Bpw0Mm1e.js";import{v as e}from"./_plugin-vue_export-helper-0drS65lc.js";import{l as r,a as t,J as i,y as o}from"./@vue-COP35Tvs.js";import"./@vueuse-BsV7VRb2.js";import"./lodash-VDnThKtA.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./tdesign-vue-next-CHJ-1YYh.js";import"./tdesign-icons-vue-next-CCrD-Br3.js";import"./lodash-es-RhymR7yg.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./pinia-DYvg5Pdn.js";import"./pinia-plugin-persistedstate-DyrI1rJI.js";import"./destr-ClW9AvhW.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./eventsource-parser-D0ssca5s.js";import"./vue-i18n-DTZjQIEs.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";const p=r({__name:"help",setup(r){const p=t(`${e()}/docs/index.html?t=${(new Date).getTime()}`);return(e,r)=>(o(),i(s,{frameSrc:p.value},null,8,["frameSrc"]))}});export{p as default};
|
.output/public/assets/highlight.js-CmHaQWnk.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
.output/public/assets/index-BMpiHlJ4.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{F as e}from"./FrameContent-Bpw0Mm1e.js";import{v as t}from"./_plugin-vue_export-helper-0drS65lc.js";import{l as s,J as o,y as r}from"./@vue-COP35Tvs.js";import"./@vueuse-BsV7VRb2.js";import"./lodash-VDnThKtA.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./tdesign-vue-next-CHJ-1YYh.js";import"./tdesign-icons-vue-next-CCrD-Br3.js";import"./lodash-es-RhymR7yg.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./pinia-DYvg5Pdn.js";import"./pinia-plugin-persistedstate-DyrI1rJI.js";import"./destr-ClW9AvhW.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./eventsource-parser-D0ssca5s.js";import"./vue-i18n-DTZjQIEs.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";const i=s({__name:"index",setup(s){const i=`${t()}/swagger/index.html?t=${(new Date).getTime()}`,p=getComputedStyle(document.documentElement).getPropertyValue("--td-comp-size-xxxl"),m=parseFloat(p)+20;return(t,s)=>(r(),o(e,{frameSrc:i,offset:m}))}});export{i as default};
|
.output/public/assets/index-CVP6se7q.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{v as e,y as t,ag as l,l as a,f as i,A as r,C as s,J as o,ac as n,H as d,a as p,w as f,a0 as h,a1 as u,R as c,aa as m,G as v,u as g,F as z,ab as _,I as x}from"./@vue-COP35Tvs.js";import{u as w,a as k}from"./vue-router-DbZJX5bT.js";import{_ as B,d as M,m as y,c as j,u as E,t as H,e as F}from"./_plugin-vue_export-helper-0drS65lc.js";import{_ as A}from"./ChatInput.vue_vue_type_style_index_0_lang-CtKQjmWn.js";import{u as S}from"./app-_ksMLlTy.js";import{A as U,l as G,j as I,m as L,g as b,n as V,o as C,c as O,f as R}from"./tdesign-vue-next-CHJ-1YYh.js";import{v as T}from"./uuid-_R2nDvl_.js";import{u as q}from"./main-CIVI3Nwp.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./pinia-DYvg5Pdn.js";import"./pinia-plugin-persistedstate-DyrI1rJI.js";import"./destr-ClW9AvhW.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./lodash-VDnThKtA.js";import"./eventsource-parser-D0ssca5s.js";import"./@vueuse-BsV7VRb2.js";import"./vue-i18n-DTZjQIEs.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tdesign-icons-vue-next-CCrD-Br3.js";import"./mammoth-Cw8VHd7C.js";import"./xlsx-DB6BMndo.js";import"./pdfjs-dist-8WFUNQXM.js";import"./lodash-es-RhymR7yg.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./vuedraggable-B95MGA-k.js";import"./vue-DJZ4t1rv.js";const D={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"140",fill:"none"};const $={render:function(a,i){return t(),e("svg",D,i[0]||(i[0]=[l('<g mask="url(#mask0_17_619)"><path fill="#97A3B7" d="M30 62h88v60H30z"></path><g filter="url(#filter0_f_17_619)"><path fill="#E3E6EB" d="M12 84h80v60H12z"></path></g><g filter="url(#filter1_f_17_619)"><path fill="#E3E6EB" d="M80 54h80v60H80z"></path></g><path fill="#fff" d="M46 105h32v2H46zM46 98h32v2H46zM46 88h16v2H46z"></path></g><path fill="currentcolor" d="M63 20h88v10H63z" opacity=".9"></path><mask id="a" width="88" height="50" x="63" y="30" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="currentcolor" d="M63 30h88v50H63z"></path></mask><g mask="url(#a)"><path fill="currentcolor" d="M63 30h88v50H63z"></path><g filter="url(#filter2_f_17_619)" opacity=".3"><path fill="#97A3B7" d="M30 62h88v60H30z"></path></g></g><path fill="#fff" fill-rule="evenodd" d="m95.686 40.858 10.278 10.277A4 4 0 0 1 107 51c2.213 0 4 1.786 4 4q-.002.538-.134 1.033l10.276 10.28-2.828 2.829-4.598-4.597A17.1 17.1 0 0 1 107 65.909c-7.273 0-13.484-4.524-16-10.91a17.3 17.3 0 0 1 5.696-7.472l-3.838-3.84zM99 55a8.003 8.003 0 0 0 12.063 6.892l-3.029-3.026q-.496.132-1.034.134c-2.213 0-4-1.787-4-4q.002-.538.134-1.034l-3.027-3.027A7.96 7.96 0 0 0 99 54.999m8-10.91c7.273 0 13.484 4.524 16 10.91a17.3 17.3 0 0 1-4.166 6.177l-4.105-4.105a8.003 8.003 0 0 0-9.801-9.8l-2.55-2.551c1.47-.41 3.02-.63 4.622-.63" clip-rule="evenodd"></path><path fill="#fff" d="M68 24h2v2h-2zM74 24h2v2h-2zM80 24h66v2H80z"></path><path fill="#fff" stroke="#000" d="m157 54 24.249 42h-48.498z"></path><path stroke="#000" d="M157 89V71"></path>',8)]))}},N={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"140",fill:"none"};const J={render:function(a,i){return t(),e("svg",N,i[0]||(i[0]=[l('<g mask="url(#mask0_16559_24301)"><path fill="#97A3B7" d="M30 62h88v60H30z"></path><g filter="url(#filter0_f_16559_24301)"><path fill="#E3E6EB" d="M12 84h80v60H12z"></path></g><g filter="url(#filter1_f_16559_24301)"><path fill="#E3E6EB" d="M80 54h80v60H80z"></path></g><path stroke="#fff" stroke-width="2" d="m49 93-7 7 7 7M69 107l7-7-7-7M62.365 87.443l-6.73 25.114"></path></g><path fill="currentcolor" d="M63 20h88v10H63z" opacity=".9"></path><mask id="a" width="88" height="50" x="63" y="30" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="currentcolor" d="M63 30h88v50H63z"></path></mask><g mask="url(#a)"><path fill="currentcolor" d="M63 30h88v50H63z"></path><g filter="url(#filter2_f_16559_24301)" opacity=".3"><path fill="#97A3B7" d="M30 62h88v60H30z"></path></g></g><path fill="#fff" fill-rule="evenodd" d="M105.25 41c6.765 0 12.25 5.484 12.25 12.25 0 2.433-.709 4.7-1.932 6.606L121 65.288 117.288 69l-5.432-5.432a12.2 12.2 0 0 1-6.606 1.932C98.484 65.5 93 60.016 93 53.25S98.484 41 105.25 41m0 3.5a8.75 8.75 0 1 0 0 17.5 8.75 8.75 0 0 0 0-17.5" clip-rule="evenodd"></path><path fill="#fff" d="M68 24h2v2h-2zM74 24h2v2h-2zM80 24h66v2H80z"></path><path fill="#fff" fill-rule="evenodd" d="M153 56c-12.15 0-22 9.85-22 22 0 4.604 1.414 8.878 3.832 12.41L127 98.5l12.495-3.132A21.9 21.9 0 0 0 153 100c12.15 0 22-9.85 22-22s-9.85-22-22-22" clip-rule="evenodd"></path><path fill="#000" d="M131 78h.5zm3.832 12.41.359.348.284-.293-.23-.337zM127 98.5l-.359-.348-1.219 1.259 1.7-.426zm12.495-3.132.307-.394-.192-.15-.237.06zM153 100v.5zm22-22h-.5zm-43.5 0c0-11.874 9.626-21.5 21.5-21.5v-1c-12.426 0-22.5 10.074-22.5 22.5zm3.745 12.128A21.4 21.4 0 0 1 131.5 78h-1c0 4.708 1.446 9.08 3.919 12.693zm-.772-.066-7.832 8.09.718.696 7.832-8.09zm-7.351 8.923 12.494-3.132-.243-.97-12.495 3.132zM153 99.5c-4.976 0-9.555-1.69-13.198-4.526l-.615.789A22.4 22.4 0 0 0 153 100.5zM174.5 78c0 11.874-9.626 21.5-21.5 21.5v1c12.426 0 22.5-10.074 22.5-22.5zM153 56.5c11.874 0 21.5 9.626 21.5 21.5h1c0-12.426-10.074-22.5-22.5-22.5z"></path>',8)]))}},W={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"140",fill:"none"};const K={render:function(a,i){return t(),e("svg",W,i[0]||(i[0]=[l('<g mask="url(#mask0_16559_24251)"><path fill="#97A3B7" d="m68 48 38.105 22v44L68 136l-38.105-22V70z"></path><g filter="url(#a)"><path fill="#E3E6EB" d="M46.391 92h80v60h-80z"></path></g><g filter="url(#b)"><path fill="#E3E6EB" d="M0 23h80v60H0z"></path></g></g><mask id="c" width="78" height="88" x="80" y="9" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="currentcolor" d="m119 9 38.105 22v44L119 97 80.895 75V31z"></path></mask><g mask="url(#c)"><path fill="currentcolor" fill-rule="evenodd" d="M80.895 31v44L119 97l38.105-22V31L119 53z" clip-rule="evenodd"></path><path fill="currentcolor" d="m119-35 38.105 22v44.5L119 53.5l-38.105-22V-13z" opacity=".9"></path><g filter="url(#d)" opacity=".3"><path fill="#97A3B7" d="m68 48 38.105 22v44L68 136l-38.105-22V70z"></path></g></g><path fill="#fff" stroke="#000" d="m143 68.822 4.867 17.053.133.466.469-.118 17.202-4.312-12.335 12.741-.337.348.337.348 12.335 12.741-17.202-4.312-.469-.118-.133.466L143 121.178l-4.867-17.053-.133-.466-.469.118-17.202 4.312 12.335-12.741.337-.348-.337-.348-12.335-12.741 17.202 4.312.469.118.133-.466z"></path><path fill="#fff" fill-rule="evenodd" d="m123.243 35.082 2.828-1.633-2.828-1.633-2.829 1.633zM119 32.632 121.828 31l-7.071-4.082-2.828 1.633zm8.485 3.267c-4.679 2.701-12.291 2.701-16.97 0-4.68-2.702-4.68-7.096 0-9.798s12.291-2.701 16.97 0c4.68 2.702 4.68 7.096 0 9.798m-19.799-11.43c-6.248 3.607-6.248 9.455 0 13.062s16.38 3.607 22.628 0 6.248-9.455 0-13.062-16.38-3.607-22.628 0M41.899 86.286l2.828 1.633v6.532L41.9 92.818zm12.02 6.94 2.829 1.634v6.532l-2.828-1.633zm-9.19 14.289-2.83-1.633.001 3.266 2.828 1.633zl9.192 5.307v3.266l2.828 1.633v-3.266l-2.828-1.633v-3.266l-9.192-5.307z" clip-rule="evenodd"></path><defs><filter id="a" width="180" height="160" x="-3.609" y="42" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_16559_24251" stdDeviation="25"></feGaussianBlur></filter><filter id="b" width="180" height="160" x="-50" y="-27" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_16559_24251" stdDeviation="25"></feGaussianBlur></filter><filter id="d" width="88.21" height="100" x="23.895" y="42" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_16559_24251" stdDeviation="3"></feGaussianBlur></filter></defs>',6)]))}},P={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"140",fill:"none"};const Q={render:function(a,i){return t(),e("svg",P,i[0]||(i[0]=[l('<g mask="url(#mask0_22_990)"><path fill="#97A3B7" fill-rule="evenodd" d="m144.569 105.61-48 27.712-48-27.712V83.712L96.57 56l48 27.713z" clip-rule="evenodd"></path><g filter="url(#filter0_f_22_990)"><path fill="#E3E6EB" d="M-3 33.999h80v60H-3z"></path></g><g filter="url(#filter1_f_22_990)"><path fill="#E3E6EB" d="M97 97.999h80v60H97z"></path></g></g><mask id="a" width="86" height="69" x="53" y="16" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="currentcolor" fill-rule="evenodd" d="m113.357 42.715 16.472-9.51a36 36 0 0 0-3.186-2.043c-5.375-3.104-11.92-5.147-18.885-6.139-4.209-5.562-10.18-8.898-17.324-8.828-6.755.087-15.486 5.746-21.507 14.365q-1.247.622-2.432 1.306c-14.378 8.3-16.94 20.75-7.473 30.065-1.035-5.805-.31-10.865 3.101-16.215-.058.632-.21 4.427-.232 5.067-.67 18.914 15.02 34.058 26.139 33.928 8.45-.1 15.565-5.013 20.319-12.631 6.214-1.231 12.089-3.294 17.094-6.183 13.476-7.78 16.567-19.182 9.104-28.268l-16.599 9.582c1.762 3.654.049 7.823-5.078 10.783-5.126 2.96-12.347 3.948-18.677 2.931-2.843-.469-5.522-1.342-7.74-2.622l-.049-.028zM78.655 53.773c-6.127-3.977-5.683-10.226 1.195-14.197s17.703-4.226 24.591-.69zM93.556 18.17c4.61-.04 8.728 2.405 11.94 6.57-8.447-.918-17.384-.326-25.523 1.765 3.699-5.124 8.471-8.275 13.583-8.335m-2.232 63.447c-5.853.068-10.971-3.926-14.377-10.332 8.845 2.342 18.925 2.775 28.427 1.317-3.756 5.52-8.714 8.951-14.05 9.015" clip-rule="evenodd"></path></mask><g mask="url(#a)"><path fill="currentcolor" fill-rule="evenodd" d="m113.357 42.715 16.472-9.51a36 36 0 0 0-3.186-2.043c-5.375-3.104-11.92-5.147-18.885-6.139-4.209-5.562-10.18-8.898-17.324-8.828-6.755.087-15.486 5.746-21.507 14.365q-1.247.622-2.432 1.306c-14.378 8.3-16.94 20.75-7.473 30.065-1.035-5.805-.31-10.865 3.101-16.215-.058.632-.21 4.427-.232 5.067-.67 18.914 15.02 34.058 26.139 33.928 8.45-.1 15.565-5.013 20.319-12.631 6.214-1.231 12.089-3.294 17.094-6.183 13.476-7.78 16.567-19.182 9.104-28.268l-16.599 9.582c1.762 3.654.049 7.823-5.078 10.783-5.126 2.96-12.347 3.948-18.677 2.931-2.843-.469-5.522-1.342-7.74-2.622l-.049-.028zM78.655 53.773c-6.127-3.977-5.683-10.226 1.195-14.197s17.703-4.226 24.591-.69zM93.556 18.17c4.61-.04 8.728 2.405 11.94 6.57-8.447-.918-17.384-.326-25.523 1.765 3.699-5.124 8.471-8.275 13.583-8.335m-2.232 63.447c-5.853.068-10.971-3.926-14.377-10.332 8.845 2.342 18.925 2.775 28.427 1.317-3.756 5.52-8.714 8.951-14.05 9.015" clip-rule="evenodd"></path><g filter="url(#filter2_f_22_990)" opacity=".3"><path fill="#97A3B7" d="m96.569 56 48 27.712v55.426l-48 27.712-48-27.712V83.712z"></path></g></g><circle cx="155" cy="78" r="22" fill="#fff" stroke="#000" transform="rotate(180 155 78)"></circle><path stroke="#000" d="M155 83V65"></path><path fill="#C4C4C4" stroke="#000" stroke-linejoin="round" stroke-width="2" d="M155 87h.004v.004H155z"></path><path stroke="#fff" stroke-width="2" d="M96.57 112V88M86.57 98l10-10 9.999 10"></path>',7)]))}},Y={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"140",fill:"none"};const Z={render:function(a,i){return t(),e("svg",Y,i[0]||(i[0]=[l('<mask id="a" width="78" height="88" x="80" y="9" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="currentColor" d="m119 9 38.105 22v44L119 97 80.895 75V31z"></path></mask><g mask="url(#a)"><path fill="currentColor" d="m119 9 38.105 22v44L119 97 80.895 75V31z"></path><g filter="url(#b)" opacity=".3"><path fill="#97A3B7" d="m68 48 38.105 22v44L68 136l-38.105-22V70z"></path></g></g><mask id="c" width="78" height="88" x="29" y="48" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="#97A3B7" d="m68 48 38.105 22v44L68 136l-38.105-22V70z"></path></mask><g mask="url(#c)"><path fill="#97A3B7" d="m68 48 38.105 22v44L68 136l-38.105-22V70z"></path><g filter="url(#d)"><path fill="#E3E6EB" d="M46.391 92h80v60h-80z"></path></g><g filter="url(#e)"><path fill="#E3E6EB" d="M0 23h80v60H0z"></path></g></g><path fill="#fff" d="m41.898 86.287 2.829 1.633v6.531l-2.828-1.632zM53.919 93.227l2.828 1.633v6.532l-2.828-1.633zM44.728 107.515l-2.829-1.633v3.266l2.829 1.633zl9.191 5.308v3.265l2.829 1.633v-3.266l-2.828-1.632v-3.266l-9.193-5.308z"></path><path fill="#fff" fill-rule="evenodd" d="M108.348 23.48c-2.16 2.51-1.813 5.903 1.047 8.08 3.265 2.486 8.568 2.447 11.845-.087 3.276-2.534 3.286-6.603.021-9.089-2.86-2.177-7.284-2.417-10.54-.74l5.202 3.96-2.373 1.836z" clip-rule="evenodd"></path><path fill="#fff" fill-rule="evenodd" d="m120.865 33.009 8.965 6.826 2.373-1.836-8.965-6.826q-.481.523-1.089.993-.608.468-1.284.843m-1.203-.916a8.5 8.5 0 0 0 1.305-.828 7.248 7.248 0 0 1 0 0 8.5 8.5 0 0 1-1.305.828" clip-rule="evenodd"></path><path fill="#fff" stroke="#181818" d="m144 70 24.249 42h-48.498z"></path><path stroke="#181818" d="M144 100V82"></path><path stroke="#181818" stroke-linejoin="round" stroke-width="2" d="M144 105h.004v.004H144z"></path><defs><filter id="b" width="88.21" height="100" x="23.895" y="42" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_216_313" stdDeviation="3"></feGaussianBlur></filter><filter id="d" width="180" height="160" x="-3.609" y="42" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_216_313" stdDeviation="25"></feGaussianBlur></filter><filter id="e" width="180" height="160" x="-50" y="-27" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_216_313" stdDeviation="25"></feGaussianBlur></filter></defs>',11)]))}},X={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"140",fill:"none"};const ee={render:function(a,i){return t(),e("svg",X,i[0]||(i[0]=[l('<g mask="url(#mask0_21_716)"><path fill="#97A3B7" fill-rule="evenodd" d="M33 46.843 96.321 119l63.322-72.157C142.742 32 120.583 23 96.321 23 72.061 23 49.901 32 33 46.843" clip-rule="evenodd"></path><g filter="url(#filter0_f_21_716)"><path fill="#E3E6EB" d="M95 21h80v60H95z"></path></g><g filter="url(#filter1_f_21_716)"><path fill="#E3E6EB" d="M-7 43h80v60H-7z"></path></g></g><path fill="currentcolor" d="m72.812 63.688-3.157 3.157 6.246 6.247a50.3 50.3 0 0 0-12.713 8.151L96.321 119l11.913-13.575 6.413 6.412 3.157-3.157L80.45 71.326zM129.455 81.243l-15.318 17.455-28.74-28.74a50.4 50.4 0 0 1 10.924-1.19c12.695 0 24.29 4.709 33.134 12.475"></path><path fill="#fff" stroke="#000" d="m152 21.822 4.867 17.053.133.465.469-.117 17.202-4.312-12.335 12.741-.337.348.337.348 12.335 12.741-17.202-4.312-.469-.117-.133.465L152 74.178l-4.867-17.053-.133-.465-.469.117-17.202 4.312 12.335-12.741.337-.348-.337-.348-12.335-12.741 17.202 4.312.469.117.133-.465z"></path><path stroke="#fff" stroke-width="2" d="M101 31 90 42l11 11-8 8"></path>',4)]))}},te={class:"result-container"},le={class:"result-bg-img"},ae={class:"result-title"},ie={class:"result-tip"},re=B(a({__name:"index",props:{bgUrl:String,title:String,tip:String,type:String},setup(l){const a=l,p=i((()=>{switch(a.type){case"403":default:return $;case"404":return J;case"500":return K;case"ie":return Q;case"wifi":return ee;case"maintenance":return Z}}));return(a,i)=>(t(),e("div",te,[r("div",le,[(t(),o(n(p.value)))]),r("div",ae,d(l.title),1),r("div",ie,d(l.tip),1),s(a.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-50bd89bc"]]),se={class:"flex-1 w-full overflow-hidden flex flex-col"},oe={class:"flex flex-col justify-center items-center gap-3 w-full"},ne={class:"text-center"},de={class:"text-2xl font-bold"},pe=["title"],fe={class:"text-center p-2"},he={key:0,class:"flex flex-col items-center align-middle gap-5 w-full p-2 overflow-y-auto no-scrollbar"},ue=["title"],ce={class:"flex gap-1"},me={class:"w-[200px] whitespace-nowrap text-ellipsis overflow-hidden"},ve={class:"w-full relative"},ge=a({name:"NewConversation",setup(l){const a=q(),s=w(),B=k(),D=p(null);f((()=>s.query.id),(e=>{if("/conversation/index"!==s.path)return void(D.value=null);const t=e;D.value=t?a.find(t):a.defaultAgent}),{immediate:!0}),M();const $=i((()=>y.availableModels.value.map((e=>({...e,title:y.getModelItemTitle(e)}))))),N=p([]),J=e=>{},W=j(),K=e=>{if(0===N.value.length)return void R.error(H("pages.conversation.noSelectModelMsg"));const t={id:T(),name:D.value.name,avatar:D.value.avatar,agentId:D.value.id,content:D.value.content,models:[],time:(new Date).getTime(),pinned:!1,maxContextSize:10,aspectRatio:"IMAGE_ASPECT_RATIO_SQUARE",internet:!1};t.models=N.value.map((e=>({modelId:e,chats:[],startContext:0,apiAgentId:"",apiConversationId:"",apiNote:"",showing:!0,status:{responseWating:!1,chating:!1,stop:!1}}))),W.add(t),N.value=[],F.setData(e),B.push({path:"/conversation/chat",query:{id:t.id,isNew:1}})},P=E(),Q=i((()=>{let e="h-[calc(100vh-2*var(--td-comp-paddingTB-m))]";return P.showLayoutHeader&&P.showFooter&&(e="h-[calc(100vh-var(--td-comp-size-xxl)-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]"),P.showLayoutHeader&&!P.showFooter&&(e="h-[calc(100vh-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]"),!P.showLayoutHeader&&P.showFooter&&(e="h-[calc(100vh-var(--td-comp-size-xxl)-2*var(--td-comp-paddingTB-m))]"),e})),Y=e=>{B.push(e)};return(l,a)=>{const i=U,s=G,p=V,f=b,w=L,k=I,B=C,M=O;return h((t(),e("div",{class:x(["flex flex-col items-center w-full gap-5",Q.value])},[r("div",se,[r("div",oe,[c(i,{size:"80px",image:D.value.avatar},null,8,["image"]),r("div",ne,[r("h1",de,d(D.value.name),1),c(s,{underline:"",theme:"primary",onClick:a[0]||(a[0]=e=>Y("/setting/agent"))},{default:m((()=>[v(d(l.$t("pages.conversation.switchAgent")),1)])),_:1})]),r("div",{class:"text-center text-sm text-gray-500 w-full overflow-hidden whitespace-nowrap text-ellipsis",title:D.value.content},d(D.value.content),9,pe)]),r("div",fe,[r("span",null,d(l.$t("pages.conversation.modelTips",{max_model_num:g(S)})),1)]),$.value.length>0?(t(),e("div",he,[c(B,{modelValue:N.value,"onUpdate:modelValue":a[1]||(a[1]=e=>N.value=e),onChange:J,max:g(S),class:"w-full"},{default:m((()=>[c(k,{gutter:[{xs:0,sm:16,md:16,lg:16,xl:16,xxl:16},16],class:"w-full"},{default:m((()=>[(t(!0),e(z,null,_($.value,(e=>(t(),o(w,{key:e.id,xs:12,lg:4,xl:3},{default:m((()=>[c(f,{class:"shadow-md",bordered:!1},{default:m((()=>[r("div",{class:"flex justify-between overflow-hidden",title:e.title},[r("div",ce,[c(i,{size:"20px",class:"mr-1"},{icon:m((()=>[(t(),o(n(g(y).icons[e.type])))])),_:2},1024),r("div",me,d(e.title),1)]),(t(),o(p,{key:e.id,value:e.id},null,8,["value"]))],8,ue)])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1},8,["modelValue","max"])])):(t(),o(re,{key:1,type:"404",title:l.$t("pages.conversation.emptyModelTips")},{default:m((()=>[c(M,{size:"large",theme:"primary",variant:"base",onClick:a[2]||(a[2]=e=>Y("/setting/model"))},{default:m((()=>[v(d(l.$t("pages.conversation.createModel")),1)])),_:1})])),_:1},8,["title"]))]),r("div",ve,[c(A,{onInput:K})])],2)),[[u,D.value]])}}});export{ge as default};
|
.output/public/assets/index-D8bT04Ge.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import{l as e,f as a,J as t,y as l,aa as o,R as i,ad as s,u as n,ac as u,G as d,H as r,s as p,a as m,w as c,A as v,z as g,v as _,F as y,ab as f}from"./@vue-COP35Tvs.js";import{m as h,t as k,d as b,w,x as V,y as x,z as $,v as j,A as T}from"./_plugin-vue_export-helper-0drS65lc.js";import{c as D,A as S,g as C,T as U,l as B,p as P,q as M,r as z,u as K,O as A,n as O,P as N,t as J,s as R,x as W,f as E,m as q,j as H,Q as I}from"./tdesign-vue-next-CHJ-1YYh.js";import{a5 as F,ab as L,a9 as G,c as Q,d as X}from"./tdesign-icons-vue-next-CCrD-Br3.js";import{p as Y}from"./lyihub-zLFv36Ly.js";import{v as Z}from"./uuid-_R2nDvl_.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./pinia-DYvg5Pdn.js";import"./pinia-plugin-persistedstate-DyrI1rJI.js";import"./destr-ClW9AvhW.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./lodash-VDnThKtA.js";import"./eventsource-parser-D0ssca5s.js";import"./@vueuse-BsV7VRb2.js";import"./vue-i18n-DTZjQIEs.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./lodash-es-RhymR7yg.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";const ee=e({__name:"ModelCard",props:{product:{type:Object}},emits:["delete-item","copy-item"],setup(e,{emit:d}){const r=e,p=a((()=>{const e=h.getModelItemTitle(r.product);return e.length>40?e.slice(0,40)+"...":e})),m=d;return(a,d)=>{const r=S,c=D,v=C;return l(),t(v,{theme:"normal",title:p.value,"hover-shadow":"",bordered:!1},{avatar:o((()=>[i(r,{size:"56px"},{icon:o((()=>[(l(),t(u(n(h).icons[e.product.type])))])),_:1})])),actions:o((()=>[i(c,{shape:"circle",onClick:d[0]||(d[0]=s((a=>{return t=e.product,void m("copy-item",t);var t}),["stop"])),variant:"text"},{default:o((()=>[i(n(F),{slot:"icon"})])),_:1}),i(c,{shape:"circle",onClick:d[1]||(d[1]=s((a=>{return t=e.product,void m("delete-item",t);var t}),["stop"])),variant:"text"},{default:o((()=>[i(n(L),{slot:"icon"})])),_:1})])),_:1},8,["title"])}}}),ae=e({__name:"WebToken",props:{url:{type:String},userAgent:{type:String},script:{type:String},text:{type:String,default:k("pages.setting.model.login_to_get_token")}},emits:["onResult"],setup(e,{emit:a}){const s=e,n=a,u=async()=>{const e=await window.ipcRenderer.invoke("login-get-token",{url:s.url,userAgent:s.userAgent,script:s.script,show:!0});n("onResult",e)};return(e,a)=>{const n=B,p=U;return l(),t(p,{content:e.$t("pages.setting.model.login_and_close"),placement:"bottom"},{default:o((()=>[i(n,{theme:"primary",onClick:u},{default:o((()=>[d(r(s.text),1)])),_:1})])),_:1},8,["content"])}}}),te={class:"flex gap-2"},le={class:"flex flex-col items-center justify-center mb-[var(--td-comp-margin-xxl)] gap-2"},oe={class:"w-12 h-12"},ie={key:7,class:"mb-5 pl-24 flex flex-col gap-2"},se={class:"flex gap-2 items-center"},ne={class:"w-full flex flex-row justify-end gap-3"},ue={id:"",name:"",status:"1",description:"",type:"openai",apiModel:"",apiBase:"",apiKey:"",keys:[],prompt:"",likes:0,additionalData:{},temperature:x,
|
2 |
+
//生成随机性
|
3 |
+
topP:V,maxTokens:w,stream:!0},de=e({__name:"DialogForm",props:{visible:{type:Boolean,default:!1},data:Object},emits:["update:visible"],setup(e,{emit:a}){const s=b(),C=e,q=p(h.providers[0]),H=m(!1),I=m({...ue}),F=m(!1),L=m(""),X=m(""),ee=m(!1),de=m(""),re=m(!1),pe=m(""),me=m(""),ce=m(!1),ve=window.isElectron,ge=({validateResult:e,firstError:a})=>{var t,l,o;if(a)return void E.warning(a);const i=!I.value.id||""===I.value.id;i&&(I.value.id=Z());const n={id:I.value.id,name:I.value.name,status:"1"===I.value.status,description:I.value.description,type:I.value.type,apiBase:null==(t=I.value.apiBase)?void 0:t.trim(),apiKey:null==(l=I.value.apiKey)?void 0:l.trim(),apiModel:null==(o=I.value.apiModel)?void 0:o.trim(),keys:I.value.keys,likes:I.value.likes,prompt:I.value.prompt,temperature:I.value.temperature,
|
4 |
+
//生成随机性
|
5 |
+
topP:I.value.topP,maxTokens:I.value.maxTokens,additionalData:I.value.additionalData,stream:I.value.stream};i?(s.add(n),E.success(k("pages.setting.model.submit_success"))):(s.update(n),E.success(k("pages.setting.model.update_success"))),H.value=!1},_e=()=>{H.value=!1},ye=()=>{},fe=m([]),he=e=>{fe.value.find((a=>a.value===e))||fe.value.push({label:e,value:e})},ke=e=>{(null==e?void 0:e.token)?I.value.apiKey=null==e?void 0:e.token:E.error(k("pages.setting.model.get_token_failed"))},be=a;c((()=>H.value),(e=>{be("update:visible",e)})),c((()=>C.visible),(e=>{H.value=e})),c((()=>C.data),(e=>{I.value={...e}}),{immediate:!0}),c((()=>I.value.id),(()=>{Ve()})),c((()=>[I.value.type]),(()=>{fe.value=[],q.value=h.providers.find((e=>e.name===I.value.type)),q.value||(q.value={name:I.value.type,title:"Model Provider Non existent!",icon:"",apiBase:"",tokenUrl:"",isApi:!1,show:{apiBase:!0,apiKey:!0,apiModel:!0},tips:{apiBase:"",apiKey:"",apiModel:""}}),C.data.type===q.value.name?(I.value.apiBase=C.data.apiBase,I.value.apiKey=C.data.apiKey,I.value.apiModel=C.data.apiModel,I.value.prompt=C.data.prompt,I.value.keys=C.data.keys,I.value.temperature=C.data.temperature,I.value.topP=C.data.topP,I.value.maxTokens=C.data.maxTokens,I.value.additionalData=C.data.additionalData,I.value.stream=C.data.stream):(I.value.apiBase=q.value.apiBase,I.value.apiKey="",I.value.apiModel="",I.value.prompt="",I.value.keys=[],I.value.temperature=x,I.value.topP=V,I.value.maxTokens=w,I.value.additionalData={},I.value.stream=!0),Ve()}));const we={name:[{required:!0,message:k("pages.setting.model.enter_model_name"),type:"error"}]},Ve=()=>{fe.value=[];let e=q.value.models;I.value.additionalData.models&&(e=I.value.additionalData.models),e&&(Array.isArray(e)?fe.value=e.map((e=>({label:e,value:e}))):"object"==typeof e&&(fe.value=Object.entries(e).map((([e,a])=>({label:e,value:a}))))),I.value.apiModel&&!fe.value.find((e=>e.value===I.value.apiModel))&&fe.value.push({label:I.value.apiModel,value:I.value.apiModel})},xe=m(!1);async function $e(){try{if(xe.value=!0,I.value.type.startsWith("openai")){let a=I.value.apiBase;if(!a)return void E.error(k("pages.setting.model.api_base_required"));const t=$(a);if(/\/v\d+\/(?!chat\/completions$)/.test(t)){const e=t.match(/(\/v\d+\/)/);if(e&&e[1]){a=`${t.split(e[1])[0]}${e[1]}models`}}else a=t.replace("/chat/completions","/models");try{const e=await fetch(a,{headers:{Authorization:`Bearer ${I.value.apiKey}`}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json();if(t&&t.data&&Array.isArray(t.data)){const e=t.data.map((e=>e.id));I.value.additionalData||(I.value.additionalData={}),I.value.additionalData.models=e,E.success(k("pages.setting.model.get_models_success"))}else E.error(k("pages.setting.model.invalid_response"))}catch(e){E.error(k("pages.setting.model.get_models_failed")+": "+e.message)}}else{if(!I.value.type.startsWith("lyihub"))return void(I.value.additionalData.models=null);I.value.additionalData.models=await Y(50,I.value.apiKey)}Ve()}finally{xe.value=!1}}async function je(){I.value.additionalData&&(I.value.additionalData.models=null),Ve(),E.success(k("pages.setting.model.clean_models_success"))}async function Te(){if(!F.value)try{F.value=!0;const e=await fetch(j()+"/github/code"),a=await e.json();if(!a)return void E.error(k("pages.setting.model.get_auth_code_failed"));L.value=a.user_code,X.value=a.verification_uri,await navigator.clipboard.writeText(L.value);const t=await fetch(j()+`/github/token?device_code=${a.device_code}&interval=${a.interval}`),l=await t.json();if(!1===H.value)return;ke(l),L.value="",X.value=""}finally{F.value=!1}}async function De(){if(!ee.value)try{ee.value=!0;const e=await fetch(j()+"/cursor/code"),a=await e.json(),{url:t,uuid:l,verifier:o}=a;de.value=t;const i=await fetch(j()+`/cursor/token?uuid=${l}&verifier=${o}&interval=1`),s=await i.json();if(!1===H.value)return;ke(s)}finally{ee.value=!1,de.value=""}}async function Se(){if(re.value)return;const e=e=>btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");try{re.value=!0;const t=e(crypto.getRandomValues(new Uint8Array(32)).buffer),l=e(await(async e=>{const a=(new TextEncoder).encode(e);return await crypto.subtle.digest("SHA-256",a)})(t)),o=crypto.getRandomValues(new Uint8Array(8)),i={codeVerifier:t,codeChallenge:l,state:e(o.buffer),creationTime:Date.now()},s="v",n=new URLSearchParams({response_type:"code",code_challenge:i.codeChallenge,client_id:s,state:i.state,prompt:"login"});me.value="";const u=`https://auth.augmentcode.com/authorize?${n.toString()}`;pe.value=u;const d=3e5,r=Date.now();for(;Date.now()-r<d;){const e=me.value;if(e)try{JSON.parse(e);break}catch(a){}await new Promise((e=>setTimeout(e,1e3)))}const p=JSON.parse(me.value),m=await fetch(`${p.tenant_url}token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grant_type:"authorization_code",client_id:s,code_verifier:i.codeVerifier,redirect_uri:"",code:p.code})});if(!m.ok)throw new Error(`HTTP error! status: ${m.status}`);const c=(await m.json()).access_token;if(!1===H.value)return;ke({token:c})}finally{re.value=!1,me.value="",pe.value=""}}async function Ce(){if(!ce.value){ce.value=!0;try{(await fetch(j()+"/cache/clear?key=google_code")).ok||E.error("clear google code fail");const e=j()+"/google/code";Ue(`https://accounts.google.com/o/oauth2/v2/auth?scope=https://www.googleapis.com/auth/cloud-platform&response_type=code&redirect_uri=${e}&client_id=${I.value.additionalData.google_oauth_client_id}&access_type=offline&prompt=consent`);let a="",t=0;const l=1e3;for(;;){if(!1===H.value)return;await new Promise((e=>setTimeout(e,l)));const e=await fetch(j()+"/google/access_token"),o=await e.json();if("ok"===o.status){a=o.code;break}if(t+=1,t*l>45e3)break}if(!a)return void E.success(k("pages.setting.model.get_auth_code_failed"));const o=await fetch("https://www.googleapis.com/oauth2/v4/token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:I.value.additionalData.google_oauth_client_id,client_secret:I.value.additionalData.google_oauth_client_secret,code:a,redirect_uri:e,grant_type:"authorization_code"})}),i=await o.json();I.value.apiKey=`${I.value.additionalData.google_oauth_client_id}${T}${I.value.additionalData.google_oauth_client_secret}${T}${i.refresh_token}`,E.success(k("pages.setting.model.get_auth_code_success"))}finally{ce.value=!1}}}function Ue(e){window.ipcRenderer?window.ipcRenderer.send("open-url",e):window.open(e)}function Be(){I.value.keys.push({key:I.value.apiKey,name:(I.value.keys.length+1).toString(),enabled:!0})}return(e,a)=>{const s=z,p=M,m=S,c=A,b=K,w=B,V=U,x=D,$=O,j=N,T=J,C=R,E=P,Y=W;return l(),t(Y,{visible:H.value,"onUpdate:visible":a[21]||(a[21]=e=>H.value=e),onClose:ye,header:I.value.id?e.$t("pages.setting.model.editor_model"):e.$t("pages.setting.model.add_model"),width:680,footer:!1},{body:o((()=>[i(E,{ref:"form",data:I.value,rules:we,"label-width":96,onSubmit:ge},{default:o((()=>[i(p,{label:e.$t("pages.setting.model.model_name"),name:"name"},{default:o((()=>[i(s,{modelValue:I.value.name,"onUpdate:modelValue":a[0]||(a[0]=e=>I.value.name=e)},null,8,["modelValue"])])),_:1},8,["label"]),i(p,{label:e.$t("pages.setting.model.model_description"),name:"description"},{default:o((()=>[i(s,{modelValue:I.value.description,"onUpdate:modelValue":a[1]||(a[1]=e=>I.value.description=e)},null,8,["modelValue"])])),_:1},8,["label"]),i(p,{label:e.$t("pages.setting.model.model_interface"),name:"type"},{default:o((()=>[i(b,{modelValue:I.value.type,"onUpdate:modelValue":a[2]||(a[2]=e=>I.value.type=e),clearable:"",filterable:""},{default:o((()=>[(l(!0),_(y,null,f(n(h).options,((e,a)=>(l(),t(c,{key:a,value:e.value,label:e.label},{default:o((()=>[v("div",te,[i(m,{size:"20px"},{icon:o((()=>[(l(),t(u(e.icon)))])),_:2},1024),d(" "+r(e.label),1)])])),_:2},1032,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1},8,["label"]),v("div",le,[v("div",oe,[(l(),t(u(q.value.icon)))]),n(ve)&&!q.value.isApi&&q.value.tokenUrl?(l(),t(ae,{key:0,url:q.value.tokenUrl,onOnResult:ke},null,8,["url"])):g("",!0),!q.value.tokenUrl||n(ve)&&!q.value.isApi?g("",!0):(l(),t(w,{key:1,theme:"primary",onClick:a[3]||(a[3]=e=>Ue(q.value.tokenUrl))},{default:o((()=>[d(r(q.value.tokenUrl),1)])),_:1})),i(V,{content:e.$t("pages.setting.model.login_and_wait"),placement:"bottom"},{default:o((()=>[X.value&&"github-copilot"===q.value.name?(l(),t(w,{key:0,theme:"primary",onClick:a[4]||(a[4]=e=>Ue(X.value))},{default:o((()=>[d(r(e.$t("pages.setting.model.click_to_enter_auth_code")),1)])),_:1})):g("",!0),de.value&&"cursor"===q.value.name?(l(),t(w,{key:1,theme:"primary",onClick:a[5]||(a[5]=e=>Ue(de.value))},{default:o((()=>[d(r(e.$t("pages.setting.model.click_to_enter_auth_code")),1)])),_:1})):g("",!0),pe.value&&"augment"===q.value.name?(l(),t(w,{key:2,theme:"primary",onClick:a[6]||(a[6]=e=>Ue(pe.value))},{default:o((()=>[d(r(e.$t("pages.setting.model.click_to_enter_auth_code")),1)])),_:1})):g("",!0)])),_:1},8,["content"]),"cursor"===q.value.name?(l(),t(x,{key:2,loading:ee.value,onClick:De},{default:o((()=>[d(r(e.$t("pages.setting.model.getTokenButtonText")),1)])),_:1},8,["loading"])):g("",!0),"augment"===q.value.name?(l(),t(x,{key:3,loading:re.value,onClick:Se},{default:o((()=>[d(r(e.$t("pages.setting.model.getTokenButtonText")),1)])),_:1},8,["loading"])):g("",!0)]),"augment"===q.value.name?(l(),t(p,{key:0,label:e.$t("pages.setting.model.get_auth_code"),name:"augment_user_code"},{default:o((()=>[i(s,{modelValue:me.value,"onUpdate:modelValue":a[7]||(a[7]=e=>me.value=e)},null,8,["modelValue"])])),_:1},8,["label"])):g("",!0),"github-copilot"===q.value.name?(l(),t(p,{key:1,label:e.$t("pages.setting.model.get_auth_code"),name:"github_user_code"},{default:o((()=>[i(s,{readonly:"",modelValue:L.value,"onUpdate:modelValue":a[8]||(a[8]=e=>L.value=e)},null,8,["modelValue"]),a[22]||(a[22]=d()),i(x,{class:"ml-2",loading:F.value,onClick:Te},{default:o((()=>[d(r(e.$t("pages.setting.model.getTokenButtonText")),1)])),_:1},8,["loading"])])),_:1},8,["label"])):g("",!0),q.value.name.endsWith("vertex")?(l(),t(p,{key:2,label:"Client ID"},{default:o((()=>[i(s,{modelValue:I.value.additionalData.google_oauth_client_id,"onUpdate:modelValue":a[9]||(a[9]=e=>I.value.additionalData.google_oauth_client_id=e)},null,8,["modelValue"])])),_:1})):g("",!0),q.value.name.endsWith("vertex")?(l(),t(p,{key:3,label:"Client Secret"},{default:o((()=>[i(s,{modelValue:I.value.additionalData.google_oauth_client_secret,"onUpdate:modelValue":a[10]||(a[10]=e=>I.value.additionalData.google_oauth_client_secret=e)},null,8,["modelValue"]),a[23]||(a[23]=d()),i(x,{class:"ml-2",onClick:Ce,loading:ce.value},{default:o((()=>[d(r(e.$t("pages.setting.model.getTokenButtonText")),1)])),_:1},8,["loading"])])),_:1})):g("",!0),q.value.show.apiBase?(l(),t(p,{key:4,label:e.$t("pages.setting.model.model_address"),name:"apiBase",tips:q.value.tips.apiBase},{default:o((()=>[i(s,{modelValue:I.value.apiBase,"onUpdate:modelValue":a[11]||(a[11]=e=>I.value.apiBase=e),placeholder:q.value.apiBase},null,8,["modelValue","placeholder"])])),_:1},8,["label","tips"])):g("",!0),q.value.show.apiModel?(l(),t(p,{key:5,label:e.$t("pages.setting.model.model"),name:"apiModel",tips:q.value.tips.apiModel},{default:o((()=>[i(b,{modelValue:I.value.apiModel,"onUpdate:modelValue":a[12]||(a[12]=e=>I.value.apiModel=e),creatable:"",filterable:"",options:fe.value,onCreate:he,onEnter:a[13]||(a[13]=e=>{e.e.preventDefault()})},null,8,["modelValue","options"]),q.value.name.startsWith("lyihub")||q.value.name.startsWith("openai")?(l(),t(x,{key:0,class:"ml-2",onClick:$e,loading:xe.value},{default:o((()=>[d(r(e.$t("pages.setting.model.getTokenButtonText")),1)])),_:1},8,["loading"])):g("",!0),q.value.name.startsWith("lyihub")||q.value.name.startsWith("openai")?(l(),t(x,{key:1,class:"ml-2",onClick:je},{default:o((()=>[d(r(e.$t("pages.setting.model.cleanTokenButtonText")),1)])),_:1})):g("",!0)])),_:1},8,["label","tips"])):g("",!0),q.value.show.apiKey?(l(),t(p,{key:6,label:e.$t("pages.setting.model.model_key"),name:"apiKey",tips:q.value.tips.apiKey},{default:o((()=>[i(s,{type:"password",modelValue:I.value.apiKey,"onUpdate:modelValue":a[14]||(a[14]=e=>I.value.apiKey=e)},null,8,["modelValue"]),i(x,{shape:"square",variant:"text",class:"ml-2",onClick:Be},{default:o((()=>[i(n(G),{slot:"icon"})])),_:1})])),_:1},8,["label","tips"])):g("",!0),I.value.keys&&I.value.keys.length>0?(l(),_("div",ie,[(l(!0),_(y,null,f(I.value.keys,((a,t)=>(l(),_("div",se,[i(s,{modelValue:a.name,"onUpdate:modelValue":e=>a.name=e,class:"w-32"},null,8,["modelValue","onUpdate:modelValue"]),i(s,{modelValue:a.key,"onUpdate:modelValue":e=>a.key=e,type:"password"},null,8,["modelValue","onUpdate:modelValue"]),i($,{modelValue:a.enabled,"onUpdate:modelValue":e=>a.enabled=e},null,8,["modelValue","onUpdate:modelValue"]),i(j,{content:e.$t("pages.setting.user.confirm_delete"),onConfirm:e=>function(e){I.value.keys.splice(e,1)}(t)},{default:o((()=>[i(x,{shape:"square",variant:"text"},{default:o((()=>[i(n(Q),{slot:"icon"})])),_:1})])),_:2},1032,["content","onConfirm"])])))),256))])):g("",!0),i(p,{label:n(k)("pages.conversation.stream"),name:"stream"},{default:o((()=>[i($,{modelValue:I.value.stream,"onUpdate:modelValue":a[15]||(a[15]=e=>I.value.stream=e)},null,8,["modelValue"])])),_:1},8,["label"]),i(p,{label:n(k)("pages.conversation.temperature"),name:"temperature"},{default:o((()=>[i(T,{modelValue:I.value.temperature,"onUpdate:modelValue":a[16]||(a[16]=e=>I.value.temperature=e),inputNumberProps:"",showStep:"",min:0,max:1,step:.1},null,8,["modelValue"])])),_:1},8,["label"]),i(p,{label:n(k)("pages.conversation.maxTokens"),name:"maxTokens"},{default:o((()=>[i(T,{modelValue:I.value.maxTokens,"onUpdate:modelValue":a[17]||(a[17]=e=>I.value.maxTokens=e),inputNumberProps:"",showStep:"",min:1024,max:61440,step:1024},null,8,["modelValue"])])),_:1},8,["label"]),i(p,{label:n(k)("pages.conversation.topP"),name:"topP"},{default:o((()=>[i(T,{modelValue:I.value.topP,"onUpdate:modelValue":a[18]||(a[18]=e=>I.value.topP=e),inputNumberProps:"",showStep:"",min:0,max:1,step:.1},null,8,["modelValue"])])),_:1},8,["label"]),q.value.name.startsWith("cozec")?(l(),t(p,{key:8,label:"",tips:"会将话中的角色设定附加到每次发送的用户消息上"},{default:o((()=>[i($,{modelValue:I.value.additionalData.useConversationSetting,"onUpdate:modelValue":a[19]||(a[19]=e=>I.value.additionalData.useConversationSetting=e)},{default:o((()=>a[24]||(a[24]=[d("使用会话的角色设定")]))),_:1},8,["modelValue"])])),_:1})):g("",!0),i(p,{label:e.$t("pages.setting.model.model_prompt"),name:"prompt",tips:e.$t("pages.setting.model.prompt_tips")},{default:o((()=>[i(C,{modelValue:I.value.prompt,"onUpdate:modelValue":a[20]||(a[20]=e=>I.value.prompt=e),autosize:{minRows:2,maxRows:5},name:"prompt"},null,8,["modelValue"])])),_:1},8,["label","tips"]),i(p,null,{default:o((()=>[v("div",ne,[i(x,{variant:"outline",onClick:_e},{default:o((()=>[d(r(e.$t("pages.setting.model.cancel")),1)])),_:1}),i(x,{theme:"primary",type:"submit"},{default:o((()=>[d(r(e.$t("pages.setting.model.confirm")),1)])),_:1})])])),_:1})])),_:1},8,["data"])])),_:1},8,["visible","header"])}}}),re={class:"search-box",style:{"margin-bottom":"16px"}},pe={class:"list-card-items"},me={class:"list-card-pagination"},ce=e({name:"ListModel",setup(e){const s=m(""),u=b(),d=m({current:1,pageSize:31,total:0}),r=a((()=>{const e=u.models.filter((e=>e.name.includes(s.value)||e.apiModel.includes(s.value)));return d.value.total=e.length,e})),p=m(void 0),c=a((()=>p.value?k("pages.setting.model.confirm_delete_model",{modelName:p.value.name}):"")),g=()=>{u.remove(p.value.id),j.value=!1,E.success(k("pages.setting.model.delete_success"))},$=m(!1),j=m(!1),T=m({...ue}),D=e=>{d.value.pageSize=e,d.value.current=1},U=e=>{d.value.current=e},B=e=>{j.value=!0,p.value=e},P=()=>{p.value=void 0},M=()=>{T.value={...ue,keys:[]},$.value=!0},K=e=>{if(!h.dict[e.type])return void E.error(k("pages.setting.model.model_provider_not_exist"));const a={...e,
|
6 |
+
// 清空ID,作为新模型
|
7 |
+
name:`${e.name} (副本)`};T.value={id:"",name:a.name,status:a.status?"1":"0",description:a.description,type:a.type.toString(),apiBase:a.apiBase,apiKey:a.apiKey,apiModel:a.apiModel,keys:a.keys?JSON.parse(JSON.stringify(a.keys)):[],likes:a.likes,prompt:a.prompt,temperature:a.temperature||x,topP:a.topP||V,maxTokens:a.maxTokens||w,stream:a.stream,additionalData:a.additionalData?JSON.parse(JSON.stringify(a.additionalData)):{}},$.value=!0};return(e,a)=>{const u=z,p=S,m=C,b=q,A=H,O=I,N=W;return l(),_("div",null,[v("div",re,[i(u,{modelValue:s.value,"onUpdate:modelValue":a[0]||(a[0]=e=>s.value=e),placeholder:"搜索模型"},null,8,["modelValue"])]),v("div",pe,[i(A,{gutter:[16,16]},{default:o((()=>[i(b,{xs:12,lg:4,xl:3},{default:o((()=>[i(m,{theme:"normal","hover-shadow":"",class:"list-card-item border-dashed",style:{"border-color":"var(--td-brand-color-active)"},title:e.$t("pages.setting.model.add_model"),onClick:M},{avatar:o((()=>[i(p,{size:"56px"},{icon:o((()=>[i(n(X))])),_:1})])),_:1},8,["title"])])),_:1}),(l(!0),_(y,null,f(r.value.slice(d.value.pageSize*(d.value.current-1),d.value.pageSize*d.value.current),(e=>(l(),t(b,{key:e.id,xs:12,lg:4,xl:3},{default:o((()=>[i(ee,{class:"list-card-item",product:e,onDeleteItem:B,onCopyItem:K,onClick:a=>(e=>{h.dict[e.type]?(T.value={id:e.id,name:e.name,status:e.status?"1":"0",description:e.description,type:e.type.toString(),apiBase:e.apiBase,apiKey:e.apiKey,apiModel:e.apiModel,keys:e.keys?JSON.parse(JSON.stringify(e.keys)):[],likes:e.likes,prompt:e.prompt,temperature:e.temperature||x,
|
8 |
+
//生成随机性
|
9 |
+
topP:e.topP||V,maxTokens:e.maxTokens||w,stream:e.stream,additionalData:e.additionalData?JSON.parse(JSON.stringify(e.additionalData)):{}},$.value=!0):E.error(k("pages.setting.model.model_provider_not_exist"))})(e)},null,8,["product","onClick"])])),_:2},1024)))),128))])),_:1})]),v("div",me,[i(O,{modelValue:d.value.current,"onUpdate:modelValue":a[1]||(a[1]=e=>d.value.current=e),"page-size":d.value.pageSize,"onUpdate:pageSize":a[2]||(a[2]=e=>d.value.pageSize=e),total:d.value.total,"page-size-options":[31],onPageSizeChange:D,onCurrentChange:U},null,8,["modelValue","page-size","total","page-size-options"])]),i(de,{visible:$.value,"onUpdate:visible":a[3]||(a[3]=e=>$.value=e),data:T.value},null,8,["visible","data"]),i(N,{visible:j.value,"onUpdate:visible":a[4]||(a[4]=e=>j.value=e),header:e.$t("pages.setting.model.confirm_delete_selected_model"),body:c.value,"on-cancel":P,onConfirm:g},null,8,["visible","header","body"])])}}});export{ce as default};
|
.output/public/assets/index-Dw44oD2u.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{t as e}from"./_plugin-vue_export-helper-0drS65lc.js";import{a as t}from"./vue-router-DbZJX5bT.js";import{W as a,X as i,l as o,x as s,g as r,f as l}from"./tdesign-vue-next-CHJ-1YYh.js";import{l as p,f as n,a as m,J as u,y as d,aa as j,R as v,G as c,H as g}from"./@vue-COP35Tvs.js";import{a as f}from"./main-CIVI3Nwp.js";import"./pinia-DYvg5Pdn.js";import"./pinia-plugin-persistedstate-DyrI1rJI.js";import"./destr-ClW9AvhW.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tvision-color-BdwcCUqE.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./lodash-VDnThKtA.js";import"./eventsource-parser-D0ssca5s.js";import"./@vueuse-BsV7VRb2.js";import"./vue-i18n-DTZjQIEs.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./tdesign-icons-vue-next-CCrD-Br3.js";import"./lodash-es-RhymR7yg.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./vuedraggable-B95MGA-k.js";import"./vue-DJZ4t1rv.js";const h=p({name:"About Page",setup(p){const h=f(),b=n((()=>h.data)),x=t(),y=[{title:e("pages.note.tableTitleName"),align:"left",width:320,colKey:"title",fixed:"left"},{title:e("pages.note.tableOperation"),align:"left",fixed:"right",width:160,colKey:"op"}],C=m({defaultPageSize:20,total:b.value.length,defaultCurrent:1}),_=m(""),k=m(!1),w=()=>{h.remove(_.value),k.value=!1,l.success(e("pages.note.deleteMsgSuccess")),$()},$=()=>{_.value=""},z=()=>{$()};return(e,t)=>{const l=o,p=i,n=a,m=s,f=r;return d(),u(f,null,{default:j((()=>[v(n,{data:b.value,columns:y,"row-key":"id","vertical-align":"top",hover:!0,pagination:C.value},{op:j((t=>[v(p,null,{default:j((()=>[v(l,{theme:"primary",onClick:e=>{return a=t,void x.push(`/note/content?id=${a.row.id}`);var a}},{default:j((()=>[c(g(e.$t("pages.note.detail")),1)])),_:2},1032,["onClick"]),v(l,{theme:"danger",onClick:e=>{return a=t,_.value=a.row.id,void(k.value=!0);var a}},{default:j((()=>[c(g(e.$t("pages.note.delete")),1)])),_:2},1032,["onClick"])])),_:2},1024)])),_:1},8,["data","pagination"]),v(m,{visible:k.value,"onUpdate:visible":t[0]||(t[0]=e=>k.value=e),header:e.$t("layout.sideNav.confirmDelete"),"on-cancel":z,onConfirm:w},null,8,["visible","header"])])),_:1})}}});export{h as default};
|
.output/public/assets/index-KwP-fFKC.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
import{r as e,q as a,d as l,R as t,J as o,N as s,w as n,p as u,c as r,f as i,j as d,m as c,u as m,O as p,A as v,n as g,U as f,P as h,x as _,g as y}from"./tdesign-vue-next-CHJ-1YYh.js";import{l as b,f as V,v as w,y as x,R as j,aa as $,F as U,A as k,B as F,a as T,o as C,j as M,z,H as B,ab as A,J as S,ac as H,u as O,G as D}from"./@vue-COP35Tvs.js";import{D as R,_ as I,b as P,u as E,t as L,S as N,d as q,c as J,m as K,q as G,v as W}from"./_plugin-vue_export-helper-0drS65lc.js";import{u as X,a as Q,b as Y}from"./main-CIVI3Nwp.js";import{_ as Z}from"./avatar.vue_vue_type_script_setup_true_lang-CTTZTZu9.js";import{b as ee}from"./@vueuse-BsV7VRb2.js";import{d as ae}from"./vuedraggable-B95MGA-k.js";import{a9 as le,aa as te,c as oe}from"./tdesign-icons-vue-next-CCrD-Br3.js";import"./lodash-es-RhymR7yg.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./pinia-DYvg5Pdn.js";import"./pinia-plugin-persistedstate-DyrI1rJI.js";import"./destr-ClW9AvhW.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./lodash-VDnThKtA.js";import"./eventsource-parser-D0ssca5s.js";import"./vue-i18n-DTZjQIEs.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./vue-router-DbZJX5bT.js";import"./vue-DJZ4t1rv.js";import"./@dicebear-JcnEMRoc.js";import"./uuid-_R2nDvl_.js";const se=b({__name:"CloudflareKVHTTPDriverForm",props:["modelValue"],emits:["update:modelValue"],setup(l,{emit:t}){const o=l,s=t,n=V({get:()=>o.modelValue,set:e=>s("update:modelValue",e)}),u=e=>{s("update:modelValue",{...n.value})};return(l,t)=>{const o=e,s=a;return x(),w(U,null,[j(s,{label:"API Base",name:"apiBase","initial-data":""},{default:$((()=>[j(o,{placeholder:"",modelValue:n.value.apiURL,"onUpdate:modelValue":t[0]||(t[0]=e=>n.value.apiURL=e),onChange:u},null,8,["modelValue"])])),_:1}),j(s,{label:"Account",name:"accountId","initial-data":""},{default:$((()=>[j(o,{placeholder:"",modelValue:n.value.accountId,"onUpdate:modelValue":t[1]||(t[1]=e=>n.value.accountId=e),onChange:u},null,8,["modelValue"])])),_:1}),j(s,{label:"Namespace",name:"namespaceId","initial-data":""},{default:$((()=>[j(o,{placeholder:"",modelValue:n.value.namespaceId,"onUpdate:modelValue":t[2]||(t[2]=e=>n.value.namespaceId=e),onChange:u},null,8,["modelValue"])])),_:1}),j(s,{label:"API Token",name:"apiToken","initial-data":""},{default:$((()=>[j(o,{type:"password",placeholder:"",modelValue:n.value.apiToken,"onUpdate:modelValue":t[3]||(t[3]=e=>n.value.apiToken=e),onChange:u},null,8,["modelValue"])])),_:1})],64)}}}),ne=Object.defineProperty({__proto__:null,default:se,driverConfig:{name:"cloudflareKVHTTP",component:"CloudflareKVHTTPDriverForm"}},Symbol.toStringTag,{value:"Module"}),ue={xmlns:"http://www.w3.org/2000/svg",width:"88",height:"48",fill:"none"};const re={render:function(e,a){return x(),w("svg",ue,a[0]||(a[0]=[k("path",{fill:"var(--td-component-border)",d:"M0 0h88v48H0z"},null,-1),k("path",{fill:"var(--td-text-color-primary)",d:"M42.863 14.052v2.708h1.625v-2.708z"},null,-1),k("path",{fill:"var(--td-text-color-primary)","fill-rule":"evenodd",d:"M38.349 23.982a5.326 5.326 0 1 1 10.653 0 5.326 5.326 0 0 1-10.653 0m5.326-3.701a3.701 3.701 0 1 0 0 7.403 3.701 3.701 0 0 0 0-7.403M52.208 26.781h-2.621l-2.06 6.699 1.552.478.511-1.661h2.614l.511 1.66 1.554-.477zm-.503 3.89-.697-2.265h-.221l-.697 2.266z","clip-rule":"evenodd"},null,-1),k("path",{fill:"var(--td-text-color-primary)",d:"m48.208 18.3 1.915-1.914 1.149 1.15-1.915 1.914zM53.606 23.17h-2.709v1.625h2.709zM44.488 31.205v2.708h-1.625v-2.708zM37.228 31.579l1.915-1.915-1.15-1.15-1.914 1.916zM36.453 24.795h-2.708V23.17h2.708zM36.079 17.535l1.915 1.915 1.149-1.15-1.915-1.914z"},null,-1)]))}},ie={xmlns:"http://www.w3.org/2000/svg",width:"88",height:"48",fill:"none"};const de={render:function(e,a){return x(),w("svg",ie,a[0]||(a[0]=[k("path",{fill:"#13161B",d:"M0 0h88v48H0z"},null,-1),k("path",{fill:"#949EAA","fill-rule":"evenodd",d:"M52.533 26.87q-.748.129-1.533.13a9 9 0 0 1-8.533-11.87A9 9 0 0 0 44 33a9 9 0 0 0 8.533-6.13","clip-rule":"evenodd"},null,-1)]))}},ce={xmlns:"http://www.w3.org/2000/svg",width:"88",height:"48",fill:"none"};const me={render:function(e,a){return x(),w("svg",ce,a[0]||(a[0]=[k("path",{fill:"var(--td-component-border)",d:"M0 0h88v48H0z"},null,-1),k("path",{fill:"var(--td-text-color-primary)","fill-rule":"evenodd",d:"M44 20.583a3.417 3.417 0 1 0 0 6.833 3.417 3.417 0 0 0 0-6.833M39.083 24a4.917 4.917 0 1 1 9.834 0 4.917 4.917 0 0 1-9.834 0M43.25 17.333v-2.5h1.5v2.5zM48.184 18.755l1.767-1.767 1.06 1.06-1.767 1.768zM50.667 23.25h2.5v1.5h-2.5zM49.244 28.184l1.768 1.767-1.06 1.06-1.768-1.767zM44.75 30.666v2.5h-1.5v-2.5zM39.816 29.244l-1.767 1.768-1.061-1.061 1.767-1.768zM37.333 24.75h-2.5v-1.5h2.5zM38.756 19.816l-1.768-1.768 1.06-1.06 1.768 1.767z","clip-rule":"evenodd"},null,-1)]))}},pe=I(b({__name:"index",props:{value:{type:String}},setup(e){const a=e,l=V((()=>{const{value:e}=a;return{background:R.indexOf(e)>-1?e:"conic-gradient(from 90deg at 50% 50%, #FF0000 -19.41deg, #FF0000 18.76deg, #FF8A00 59.32deg, #FFE600 99.87deg, #14FF00 141.65deg, #00A3FF 177.72deg, #0500FF 220.23deg, #AD00FF 260.13deg, #FF00C7 300.69deg, #FF0000 340.59deg, #FF0000 378.76deg)"}}));return(e,a)=>(x(),w("div",{style:F(l.value),class:"color-container"},null,4))}}),[["__scopeId","data-v-f0f6ec52"]]),ve={class:"setting-container"},ge={class:"setting-group-title"},fe={style:{textAlign:"center",marginTop:"8px"}},he={class:"setting-group-title"},_e={class:"setting-layout-drawer"},ye={key:0,class:"setting-info mt-10"},be=b({__name:"appearance",setup(e){P();const d=E(),c=[
|
2 |
+
//@ts-ignore
|
3 |
+
{type:"light",text:L("pages.setting.theme.options.light")},{type:"dark",text:L("pages.setting.theme.options.dark")},{type:"auto",text:L("pages.setting.theme.options.auto")}],m=V((()=>-1===R.indexOf(p.value.brandTheme)?p.value.brandTheme:"")),p=T({...(()=>{const e=N;for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(e[a]=d[a]);return e})()}),v=T(!1),g=e=>{p.value.brandTheme=e};C((()=>{var e;null==(e=document.querySelector(".dynamic-color-btn"))||e.addEventListener("click",(()=>{v.value=!0}))}));const f=(e,a)=>{e||"document"!==a.trigger||(v.value=e)},h=()=>{const e=JSON.stringify(p.value,null,4),{copy:a}=ee({source:e});a().then((()=>{i.closeAll(),i.success(L("pages.setting.copy.success"))})).catch((()=>{i.closeAll(),i.error(L("pages.setting.copy.fail"))}))};return M((()=>{p.value.brandTheme&&d.updateConfig(p.value)})),(e,i)=>{const d=t,_=l,y=s,b=o,V=n,F=a,T=u,C=r;return x(),w("div",ve,[j(T,{ref:"form",data:p.value,"label-align":"left"},{default:$((()=>[k("div",ge,B(e.$t("pages.setting.theme.mode")),1),j(_,{modelValue:p.value.mode,"onUpdate:modelValue":i[0]||(i[0]=e=>p.value.mode=e)},{default:$((()=>[(x(),w(U,null,A(c,((e,a)=>k("div",{key:a,class:"setting-layout-drawer"},[k("div",null,[(x(),S(d,{key:a,value:e.type},{default:$((()=>{return[(x(),S(H((a=e.type,"light"===a?me:"dark"===a?de:re))))];var a})),_:2},1032,["value"])),k("p",fe,B(e.text),1)])]))),64))])),_:1},8,["modelValue"]),k("div",he,B(e.$t("pages.setting.theme.color")),1),j(_,{modelValue:p.value.brandTheme,"onUpdate:modelValue":i[1]||(i[1]=e=>p.value.brandTheme=e)},{default:$((()=>[(x(!0),w(U,null,A(O(R),((e,a)=>(x(),w("div",{key:a,class:"setting-layout-drawer"},[(x(),S(d,{key:a,value:e,class:"setting-layout-color-group"},{default:$((()=>[j(pe,{value:e},null,8,["value"])])),_:2},1032,["value"]))])))),128)),k("div",_e,[j(b,{"destroy-on-close":"","expand-animation":"",placement:"bottom-right",trigger:"click",visible:v.value,"overlay-style":{padding:0},onVisibleChange:f},{content:$((()=>[j(y,{"on-change":g,"color-modes":["monochrome"],format:"HEX","swatch-colors":[]})])),default:$((()=>[j(d,{value:m.value,class:"setting-layout-color-group dynamic-color-btn"},{default:$((()=>[j(pe,{value:m.value},null,8,["value"])])),_:1},8,["value"])])),_:1},8,["visible"])])])),_:1},8,["modelValue"]),k("div",null,[j(F,{label:e.$t("pages.setting.element.showHeader"),name:"showHeader"},{default:$((()=>[j(V,{modelValue:p.value.showHeader,"onUpdate:modelValue":i[2]||(i[2]=e=>p.value.showHeader=e)},null,8,["modelValue"])])),_:1},8,["label"]),j(F,{label:e.$t("pages.setting.element.showNav"),name:"showNav"},{default:$((()=>[j(V,{modelValue:p.value.showNav,"onUpdate:modelValue":i[3]||(i[3]=e=>p.value.showNav=e)},null,8,["modelValue"])])),_:1},8,["label"]),j(F,{label:e.$t("pages.setting.element.showBreadcrumb"),name:"showBreadcrumb"},{default:$((()=>[j(V,{modelValue:p.value.showBreadcrumb,"onUpdate:modelValue":i[4]||(i[4]=e=>p.value.showBreadcrumb=e)},null,8,["modelValue"])])),_:1},8,["label"]),j(F,{label:e.$t("pages.setting.element.showFooter"),name:"showFooter"},{default:$((()=>[j(V,{modelValue:p.value.showFooter,"onUpdate:modelValue":i[5]||(i[5]=e=>p.value.showFooter=e)},null,8,["modelValue"])])),_:1},8,["label"])])])),_:1},8,["data"]),O(false)?(x(),w("div",ye,[k("p",null,B(e.$t("pages.setting.tips")),1),j(C,{theme:"primary",variant:"text",onClick:h},{default:$((()=>[D(B(e.$t("pages.setting.copy.title")),1)])),_:1})])):z("",!0),i[6]||(i[6]=k("div",{class:"text-center text-gray-400"},"3/30/2025, 3:57:27 PM",-1))])}}}),Ve={class:"flex justify-center"},we={class:"font-bold text-xl mb-5"},xe={class:"flex"},je={class:"font-bold text-xl mb-5"},$e={class:"flex flex-col gap-5"},Ue={class:"flex justify-between"},ke={class:"font-bold text-xl"},Fe={class:"flex flex-col gap-5 w-full overflow-hidden"},Te={class:"font-bold text-xl mb-5"},Ce=I(b({name:"User",setup(l){const t=q(),o=P(),s=X(),b=E(),F=J(),C=Q(),M=async e=>{try{const a=await async function(e){return new Promise(((a,l)=>{const t=new FileReader;t.onload=function(e){a(e.target.result)},t.onerror=function(e){l(e)},t.readAsText(e)}))}(e.raw);return R(JSON.parse(a)),i.success({content:L("pages.setting.user.import_success")}),{status:"success",error:"",response:{url:" "}}}catch{return i.error({content:L("pages.setting.user.import_failed")}),{status:"fail",error:"",response:{}}}};const R=e=>{var a;if(e.user&&o.$patch(e.user),e.model&&t.$patch(e.model),e.agent&&s.$patch(e.agent),e.setting&&b.$patch(e.setting),e.conversation){const a=function(e,a=640){return e.map((e=>({...e,models:e.models.map((e=>{try{const l=JSON.stringify(e.chats);return(new TextEncoder).encode(l).length/1024>a?{...e,chats:[]}:e}catch{return{...e,chats:[]}}}))})))}(e.conversation.list);F.$patch({...e.conversation,list:a})}e.note&&C.$patch(e.note),(null==(a=e.user)?void 0:a.lang)&&ee(e.user.lang)};function I(){const e=JSON.stringify({user:o.$state,model:t.$state,agent:s.$state,setting:b.$state,conversation:F.$state,note:C.$state},null,2),a=new Blob([e],{type:"application/json"}),l=document.createElement("a");l.href=URL.createObjectURL(a),l.download="config.json",document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(l.href)}const N=window.isElectron,{changeLocale:ee,locale:se}=Y(),ue=V({get:()=>se.value,set(e){ee(e)}}),re=e=>{o.avatar=e};function ie(e,a){const l=a.e,t=l.key,s=[l.ctrlKey?"Ctrl":"",l.metaKey?"Cmd":"",l.altKey?"Alt":"",l.shiftKey?"Shift":""].filter(Boolean).join("+");o.shortcut=`${s}+${t.toUpperCase()}`,l.preventDefault()}const de=V((()=>K.availableModels.value.map((e=>({value:e.id,label:K.getModelItemTitle(e),...e}))))),ce=()=>{o.toolBarButtons.push({name:"",icon:null,prompt:"",show:!0})},me=Object.assign({"./drivers/CloudflareKVHTTPDriverForm.vue":ne}),pe=Object.values(me).map((e=>e.driverConfig)),ve=V((()=>b.drivers.currentDriver)),ge=V((()=>b.drivers)),fe=V((()=>b.version)),he=V((()=>{const e=pe.find((e=>e.name===ve.value));return e?me[`./drivers/${e.component}.vue`].default:null})),_e=async e=>{b.updateDriverSettings(e,ge.value[e])};async function ye(e){b.updateDriverSettings(ve.value,e)}const Ce=T(!1),Me=T(!1),ze=T(!1),Be=T(null),Ae=V((()=>{var e;return null==(e=Be.value)?void 0:e.setting.version}));async function Se(){try{if(Ce.value=!0,Be.value=await Re(),Be.value){new Date(Ae.value)>=new Date(fe.value)||!fe.value?ze.value=!0:(await Ie(),i.success("备份成功"))}else await Ie(),i.success("备份成功")}catch(e){i.error("备份失败: "+e.message)}finally{Ce.value=!1}}async function He(){try{Me.value=!0;const e=await Re();if(!e)throw new Error("未找到远程数据");R(e),i.success("恢复成功")}catch(e){i.error("恢复失败: "+e.message)}finally{Me.value=!1}}async function Oe(){try{Ce.value=!0,await Ie(),i.success("备份成功")}catch(e){i.error("备份失败: "+e.message)}finally{ze.value=!1,Ce.value=!1}}async function De(){if(Be.value)try{Me.value=!0,R(Be.value),i.success("数据已成功恢复")}catch(e){i.error("恢复失败: "+e.message)}finally{ze.value=!1,Me.value=!1}}const Re=async()=>{try{const e=new URLSearchParams({driver:ve.value,config:JSON.stringify(ge.value[ve.value])}),a=await fetch(`${W()}/config?${e.toString()}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!a.ok)throw new Error(await a.text());return(await a.json()).data}catch(e){throw e}};async function Ie(){try{b.version=(new Date).toISOString();const e={user:o.$state,model:t.$state,agent:s.$state,setting:b.$state,conversation:F.$state,note:C.$state},a=await fetch(W()+"/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:e,driver:ve.value,config:ge.value[ve.value]})});if(!a.ok)throw new Error(await a.text())}catch(e){throw e}}return(l,t)=>{const s=e,i=a,b=c,V=p,F=m,T=v,C=g,R=d,P=r,E=f,L=u,q=n,J=h,W=_,X=y;return x(),S(X,{shadow:"",class:"overflow-hidden",bordered:!1},{default:$((()=>[j(L,{ref:"form",class:"flex flex-col gap-8","label-align":"top"},{default:$((()=>[k("div",Ve,[j(Z,{ref:"avatarRef",url:O(o).avatar,onUpdate:re},null,8,["url"])]),k("div",null,[k("h1",we,B(l.$t("pages.setting.user.basic_settings")),1),j(R,{class:"row-gap",gutter:[32,24]},{default:$((()=>[j(b,{xs:12,lg:6},{default:$((()=>[j(i,{label:l.$t("pages.setting.user.username"),name:"name"},{default:$((()=>[j(s,{modelValue:O(o).name,"onUpdate:modelValue":t[0]||(t[0]=e=>O(o).name=e),placeholder:l.$t("pages.setting.user.enter_username")},null,8,["modelValue","placeholder"])])),_:1},8,["label"])])),_:1}),j(b,{xs:12,lg:6},{default:$((()=>[j(i,{label:l.$t("pages.setting.user.language"),name:"lang"},{default:$((()=>[j(F,{modelValue:ue.value,"onUpdate:modelValue":t[1]||(t[1]=e=>ue.value=e),class:"demo-select-base",clearable:""},{default:$((()=>[(x(!0),w(U,null,A(O(G),((e,a)=>(x(),S(V,{key:a,value:`${e.value}`,label:`${e.content}`},{default:$((()=>[D(B(e.content),1)])),_:2},1032,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1},8,["label"])])),_:1}),O(N)?(x(),S(b,{key:0,xs:12,lg:6},{default:$((()=>[j(i,{label:l.$t("pages.setting.user.shortcut"),name:"shortcut"},{default:$((()=>[j(s,{onKeydown:ie,modelValue:O(o).shortcut,"onUpdate:modelValue":t[2]||(t[2]=e=>O(o).shortcut=e),placeholder:l.$t("pages.setting.user.enter_shortcut")},null,8,["modelValue","placeholder"])])),_:1},8,["label"])])),_:1})):z("",!0),j(b,{xs:12,lg:6},{default:$((()=>[j(i,{label:l.$t("pages.setting.user.assist_model"),name:"assistModel"},{default:$((()=>[j(F,{modelValue:O(o).assistModel,"onUpdate:modelValue":t[3]||(t[3]=e=>O(o).assistModel=e),tips:l.$t("pages.setting.user.assist_model_tips"),filterable:""},{default:$((()=>[(x(!0),w(U,null,A(de.value,(e=>(x(),S(V,{key:e.value,value:e.value,label:e.label},{default:$((()=>[k("div",xe,[j(T,{size:"20px",class:"mr-1"},{icon:$((()=>[(x(),S(H(O(K).icons[e.type])))])),_:2},1024),D(" "+B(e.label),1)])])),_:2},1032,["value","label"])))),128))])),_:1},8,["modelValue","tips"])])),_:1},8,["label"])])),_:1}),j(b,{xs:12,lg:6},{default:$((()=>[j(i,{label:l.$t("pages.setting.user.remoteHost"),name:"remoteHost"},{default:$((()=>[j(s,{modelValue:O(o).remoteHost,"onUpdate:modelValue":t[4]||(t[4]=e=>O(o).remoteHost=e)},null,8,["modelValue"])])),_:1},8,["label"])])),_:1}),O(N)?(x(),S(b,{key:1,span:6},{default:$((()=>[j(i,{label:l.$t("pages.setting.user.open_at_login"),name:"openAtLogin"},{default:$((()=>[j(C,{modelValue:O(o).openAtLogin,"onUpdate:modelValue":t[5]||(t[5]=e=>O(o).openAtLogin=e)},null,8,["modelValue"])])),_:1},8,["label"])])),_:1})):z("",!0),O(N)?(x(),S(b,{key:2,span:6},{default:$((()=>[j(i,{label:l.$t("pages.setting.user.minimize_to_bottom_right"),name:"minimizeToBottomRight"},{default:$((()=>[j(C,{modelValue:O(o).minimizeToBottomRight,"onUpdate:modelValue":t[6]||(t[6]=e=>O(o).minimizeToBottomRight=e)},null,8,["modelValue"])])),_:1},8,["label"])])),_:1})):z("",!0)])),_:1})]),k("div",null,[k("h1",je,B(l.$t("pages.setting.user.import_config")),1),j(L,null,{default:$((()=>[j(i,{label:"存储类型",name:"driverType","initial-data":""},{default:$((()=>[j(F,{modelValue:ve.value,"onUpdate:modelValue":t[7]||(t[7]=e=>ve.value=e),onChange:_e,placeholder:"Select Driver"},{default:$((()=>[(x(!0),w(U,null,A(O(pe),(e=>(x(),S(V,{key:e.name,value:e.name,label:e.name},null,8,["value","label"])))),128))])),_:1},8,["modelValue"])])),_:1}),(x(),S(H(he.value),{modelValue:ge.value[ve.value],"onUpdate:modelValue":[t[8]||(t[8]=e=>ge.value[ve.value]=e),ye]},null,8,["modelValue"])),j(R,{class:"row-gap",gutter:[24,24]},{default:$((()=>[j(b,{xs:6,lg:3,class:"flex justify-center"},{default:$((()=>[j(P,{onClick:Se,loading:Ce.value},{default:$((()=>t[11]||(t[11]=[D("备份到服务器")]))),_:1},8,["loading"])])),_:1}),j(b,{xs:6,lg:3,class:"flex justify-center"},{default:$((()=>[j(P,{onClick:He,loading:Me.value},{default:$((()=>t[12]||(t[12]=[D("从服务器恢复")]))),_:1},8,["loading"])])),_:1}),j(b,{xs:6,lg:3,class:"flex justify-center"},{default:$((()=>[j(E,{theme:"custom","request-method":M,multiple:!1},{default:$((()=>[j(P,{theme:"primary"},{default:$((()=>[D(B(l.$t("pages.setting.user.import_local_config")),1)])),_:1})])),_:1})])),_:1}),j(b,{xs:6,lg:3,class:"flex justify-center"},{default:$((()=>[j(P,{theme:"primary",onClick:I},{default:$((()=>[D(B(l.$t("pages.setting.user.export_local_config")),1)])),_:1})])),_:1})])),_:1})])),_:1})]),k("div",$e,[k("div",Ue,[k("h1",ke,B(l.$t("pages.setting.user.toolbar_settings")),1),j(P,{shape:"square",variant:"text",onClick:ce},{default:$((()=>[j(O(le),{slot:"icon"})])),_:1})]),k("div",Fe,[j(O(ae),{modelValue:O(o).toolBarButtons,"onUpdate:modelValue":t[9]||(t[9]=e=>O(o).toolBarButtons=e),"item-key":"id",animation:150,class:"flex flex-col gap-5",handle:".drag-handle"},{item:$((({element:e})=>[j(R,{gutter:{xs:8,sm:16,md:24,lg:32,xl:32,xxl:40},class:"items-center"},{default:$((()=>[j(b,{xs:2,sm:1},{default:$((()=>[j(P,{shape:"square",variant:"text",class:"drag-handle cursor-move"},{default:$((()=>[j(O(te))])),_:1})])),_:1}),j(b,{xs:2,sm:2},{default:$((()=>[j(s,{modelValue:e.name,"onUpdate:modelValue":a=>e.name=a,placeholder:"名称"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),j(b,{xs:3,sm:5},{default:$((()=>[j(s,{modelValue:e.prompt,"onUpdate:modelValue":a=>e.prompt=a,placeholder:"提示词"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),j(b,{xs:2,sm:2},{default:$((()=>[j(s,{modelValue:e.icon,"onUpdate:modelValue":a=>e.icon=a,placeholder:"图标"},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),j(b,{xs:2,sm:1,class:"flex justify-end"},{default:$((()=>[j(q,{modelValue:e.show,"onUpdate:modelValue":a=>e.show=a},null,8,["modelValue","onUpdate:modelValue"])])),_:2},1024),j(b,{xs:1,sm:1,class:"flex justify-end"},{default:$((()=>[j(J,{content:l.$t("pages.setting.user.confirm_delete"),onConfirm:a=>(e=>{o.toolBarButtons=o.toolBarButtons.filter((a=>a!==e))})(e)},{default:$((()=>[j(P,{shape:"square",variant:"text"},{default:$((()=>[j(O(oe),{slot:"icon"})])),_:1})])),_:2},1032,["content","onConfirm"])])),_:2},1024)])),_:2},1024)])),_:1},8,["modelValue"])])]),k("div",null,[k("h1",Te,B(l.$t("pages.setting.user.theme_settings")),1),j(be)])])),_:1},512),j(W,{visible:ze.value,"onUpdate:visible":t[10]||(t[10]=e=>ze.value=e),attach:"body",header:"发现新的备份"},{body:$((()=>[t[13]||(t[13]=k("p",null,"检测到服务器上存在较新的备份数据。您希望如何处理?",-1)),k("p",null,"本地版本:"+B(fe.value),1),k("p",null,"服务器版本:"+B(Ae.value),1)])),footer:$((()=>[j(P,{onClick:Oe,loading:Ce.value},{default:$((()=>t[14]||(t[14]=[D("覆盖服务器数据")]))),_:1},8,["loading"]),j(P,{theme:"primary",onClick:De,loading:Me.value},{default:$((()=>t[15]||(t[15]=[D("从服务器恢复")]))),_:1},8,["loading"])])),_:1},8,["visible"])])),_:1})}}}),[["__scopeId","data-v-20b252b9"]]);export{Ce as default};
|
.output/public/assets/index-sT33uzOA.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{a as e}from"./vue-router-DbZJX5bT.js";import{l as a,f as t,J as s,y as i,aa as l,R as r,z as n,ad as o,u,a as d,w as p,A as v,G as m,H as c,v as g,F as f,ab as j}from"./@vue-COP35Tvs.js";import{c as b,A as _,g as h,p as x,q as y,r as z,s as C,x as k,f as w,m as S,j as D,Q as V}from"./tdesign-vue-next-CHJ-1YYh.js";import{ac as U,ab as A,d as q}from"./tdesign-icons-vue-next-CCrD-Br3.js";import{t as R}from"./_plugin-vue_export-helper-0drS65lc.js";import{_ as F}from"./avatar.vue_vue_type_script_setup_true_lang-CTTZTZu9.js";import{v as B}from"./uuid-_R2nDvl_.js";import{u as E}from"./main-CIVI3Nwp.js";import"./@babel-ynFNPEB3.js";import"./core-js-pure-Dnpx5JGu.js";import"./lodash-es-RhymR7yg.js";import"./sortablejs-DGtSoqI-.js";import"./@popperjs-B4tvfKWZ.js";import"./pinia-DYvg5Pdn.js";import"./pinia-plugin-persistedstate-DyrI1rJI.js";import"./destr-ClW9AvhW.js";import"./deep-pick-omit-DP_A4OSP.js";import"./tvision-color-BdwcCUqE.js";import"./chroma-js-CJzpYopr.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-BncZ6jfA.js";import"./lodash-VDnThKtA.js";import"./eventsource-parser-D0ssca5s.js";import"./@vueuse-BsV7VRb2.js";import"./vue-i18n-DTZjQIEs.js";import"./@intlify-eboPrqDD.js";import"./@mozilla-BD532_dh.js";import"./@dicebear-JcnEMRoc.js";import"./@mermaid-js-C9iCgeAb.js";import"./langium-BVNt58jJ.js";import"./vscode-jsonrpc-B7fdjHWu.js";import"./chevrotain-Cp5uJ8YW.js";import"./@chevrotain-DFy4Htpj.js";import"./chevrotain-allstar-WPou0XcH.js";import"./vscode-languageserver-types-BtnkyLj9.js";import"./vscode-languageserver-textdocument-ygi3JyHC.js";import"./vscode-uri-DEKkV-x5.js";import"./vuedraggable-B95MGA-k.js";import"./vue-DJZ4t1rv.js";const H=a({__name:"AgentCard",props:{product:{type:Object}},emits:["start-chat","delete-item"],setup(e,{emit:a}){const d=e,p=t((()=>d.product.content.substring(0,20)+"...")),v=a;return(a,t)=>{const d=_,m=b,c=h;return i(),s(c,{title:e.product.name,description:p.value,"hover-shadow":"",bordered:!1},{avatar:l((()=>[r(d,{size:"56px",image:e.product.avatar},null,8,["image"])])),actions:l((()=>[r(m,{shape:"circle",onClick:t[0]||(t[0]=o((a=>{return t=e.product,void v("start-chat",t);var t}),["stop"])),variant:"text"},{default:l((()=>[r(u(U),{slot:"icon"})])),_:1}),e.product.isDefault?n("",!0):(i(),s(m,{key:0,shape:"circle",onClick:t[1]||(t[1]=o((a=>{return t=e.product,void v("delete-item",t);var t}),["stop"])),variant:"text"},{default:l((()=>[r(u(A),{slot:"icon"})])),_:1}))])),_:1},8,["title","description"])}}}),I={class:"flex flex-col items-center justify-center mb-[var(--td-comp-margin-xxl)]"},J={class:"w-full flex flex-row justify-end gap-3"},O={id:"",name:"",status:"1",content:"",avatar:"",onboarding:"",isDefault:!1},$=a({__name:"DialogForm",props:{visible:{type:Boolean,default:!1},data:Object},emits:["update:visible"],setup(e,{emit:a}){const t=E(),n=e,o=d(null),g=d(!1),f=d({...O}),j=e=>{f.value.avatar=e},_=({validateResult:e,firstError:a})=>{if(a)return void w.warning(a);const s=!f.value.id||""===f.value.id;s&&(f.value.id=B());const i={id:f.value.id,name:f.value.name,status:"1"===f.value.status,content:f.value.content,avatar:f.value.avatar,onboarding:f.value.onboarding,isDefault:f.value.isDefault};s?(t.add(i),w.success(R("pages.setting.agent.submit_success"))):(t.update(i),w.success(R("pages.setting.agent.update_success"))),g.value=!1},h=()=>{g.value=!1},S=a;p((()=>g.value),(e=>{S("update:visible",e)})),p((()=>n.visible),(e=>{g.value=e})),p((()=>n.data),(e=>{f.value=e}),{immediate:!0});const D={name:[{required:!0,message:R("pages.setting.agent.enter_agent_name"),type:"error"}],content:[{required:!0,message:R("pages.setting.agent.enter_agent_description"),type:"error"}]};return(e,a)=>{const t=z,n=y,d=C,p=b,w=x,S=k;return i(),s(S,{visible:g.value,"onUpdate:visible":a[2]||(a[2]=e=>g.value=e),header:f.value.id?u(R)("pages.setting.agent.editor_agent"):u(R)("pages.setting.agent.add_agent"),placement:"top",width:680,footer:!1},{body:l((()=>[r(w,{ref:"form",data:f.value,rules:D,"label-width":100,"label-align":"top",onSubmit:_},{default:l((()=>[v("div",I,[r(F,{ref_key:"avatarRef",ref:o,url:f.value.avatar,onUpdate:j},null,8,["url"])]),r(n,{label:u(R)("pages.setting.agent.agent_name"),name:"name"},{default:l((()=>[r(t,{modelValue:f.value.name,"onUpdate:modelValue":a[0]||(a[0]=e=>f.value.name=e)},null,8,["modelValue"])])),_:1},8,["label"]),r(n,{label:u(R)("pages.setting.agent.agent_description"),name:"content"},{default:l((()=>[r(d,{modelValue:f.value.content,"onUpdate:modelValue":a[1]||(a[1]=e=>f.value.content=e),autosize:{minRows:5,maxRows:12},name:"content"},null,8,["modelValue"])])),_:1},8,["label"]),r(n,null,{default:l((()=>[v("div",J,[r(p,{variant:"outline",onClick:h},{default:l((()=>[m(c(u(R)("pages.setting.agent.cancel")),1)])),_:1}),r(p,{theme:"primary",type:"submit"},{default:l((()=>[m(c(u(R)("pages.setting.agent.confirm")),1)])),_:1})])])),_:1})])),_:1},8,["data"])])),_:1},8,["visible","header"])}}}),G={class:"list-card-items"},L={class:"list-card-pagination"},N=a({name:"ListAgent",setup(a){const n=e(),o=d(void 0),p=E(),m=d({current:1,pageSize:35,total:0}),c=t((()=>{const e=[p.defaultAgent,...p.agents];return m.value.total=e.length,e})),b=t((()=>o.value?R("pages.setting.agent.confirm_delete_agent",{agentName:o.value.name}):"")),x=d(!1),y=d(!1),z=d({...O}),C=e=>{m.value.pageSize=e,m.value.current=1},U=e=>{m.value.current=e},A=e=>{y.value=!0,o.value=e},F=()=>{p.remove(o.value.id),y.value=!1,w.success(R("pages.setting.agent.delete_success"))},B=()=>{o.value=void 0},I=e=>{n.push({path:"/conversation/index",query:{id:e.id}})},J=()=>{z.value={...O},x.value=!0};return(e,a)=>{const t=_,n=h,o=S,d=D,p=V,w=k;return i(),g("div",null,[v("div",G,[r(d,{gutter:[16,16]},{default:l((()=>[r(o,{xs:12,lg:4,xl:3},{default:l((()=>[r(n,{theme:"normal","hover-shadow":"",class:"list-card-item h-[108px] border-dashed",style:{"border-color":"var(--td-brand-color-active)"},title:e.$t("pages.setting.agent.add_agent"),onClick:J},{avatar:l((()=>[r(t,{size:"56px"},{icon:l((()=>[r(u(q))])),_:1})])),_:1},8,["title"])])),_:1}),(i(!0),g(f,null,j(c.value.slice(m.value.pageSize*(m.value.current-1),m.value.pageSize*m.value.current),(e=>(i(),s(o,{key:e.id,xs:12,lg:4,xl:3},{default:l((()=>[r(H,{class:"list-card-item h-[108px]",product:e,onDeleteItem:A,onStartChat:I,onClick:a=>(e=>{z.value={id:e.id,name:e.name,status:e.status?"1":"0",content:e.content,avatar:e.avatar,onboarding:e.onboarding,isDefault:e.isDefault},x.value=!0})(e)},null,8,["product","onClick"])])),_:2},1024)))),128))])),_:1})]),v("div",L,[r(p,{modelValue:m.value.current,"onUpdate:modelValue":a[0]||(a[0]=e=>m.value.current=e),"page-size":m.value.pageSize,"onUpdate:pageSize":a[1]||(a[1]=e=>m.value.pageSize=e),total:m.value.total,"page-size-options":[35],onPageSizeChange:C,onCurrentChange:U},null,8,["modelValue","page-size","total","page-size-options"])]),r($,{visible:x.value,"onUpdate:visible":a[2]||(a[2]=e=>x.value=e),data:z.value},null,8,["visible","data"]),r(w,{visible:y.value,"onUpdate:visible":a[3]||(a[3]=e=>y.value=e),header:e.$t("pages.setting.agent.confirm_delete_selected_agent"),body:b.value,"on-cancel":B,onConfirm:F},null,8,["visible","header","body"])])}}});export{N as default};
|
.output/public/assets/katex-Vs6-m9jZ.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
.output/public/assets/khroma-C2oHPU0S.js
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const e={
|
2 |
+
/* CLAMP */
|
3 |
+
min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},
|
4 |
+
/* CONVERSION */
|
5 |
+
//SOURCE: https://planetcalc.com/7779
|
6 |
+
toLinear:e=>{const a=e/255;return e>.03928?Math.pow((a+.055)/1.055,2.4):a/12.92},
|
7 |
+
//SOURCE: https://gist.github.com/mjackson/5311256
|
8 |
+
hue2rgb:(e,a,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(a-e)*r:r<.5?a:r<2/3?e+(a-e)*(2/3-r)*6:e),hsl2rgb:({h:a,s:r,l:t},n)=>{if(!r)return 2.55*t;a/=360,r/=100;const s=(t/=100)<.5?t*(1+r):t+r-t*r,d=2*t-s;switch(n){case"r":return 255*e.hue2rgb(d,s,a+1/3);case"g":return 255*e.hue2rgb(d,s,a);case"b":return 255*e.hue2rgb(d,s,a-1/3)}},rgb2hsl:({r:e,g:a,b:r},t)=>{e/=255,a/=255,r/=255;const n=Math.max(e,a,r),s=Math.min(e,a,r),d=(n+s)/2;if("l"===t)return 100*d;if(n===s)return 0;const l=n-s;if("s"===t)return 100*(d>.5?l/(2-n-s):l/(n+s));switch(n){case e:return 60*((a-r)/l+(a<r?6:0));case a:return 60*((r-e)/l+2);case r:return 60*((e-a)/l+4);default:return-1}}},a={channel:e,lang:{
|
9 |
+
/* API */
|
10 |
+
clamp:(e,a,r)=>a>r?Math.min(a,Math.max(r,e)):Math.min(r,Math.max(a,e)),round:e=>Math.round(1e10*e)/1e10},unit:{
|
11 |
+
/* API */
|
12 |
+
dec2hex:e=>{const a=Math.round(e).toString(16);return a.length>1?a:`0${a}`}}},r={};for(let F=0;F<=255;F++)r[F]=a.unit.dec2hex(F);const t=0,n=1,s=2;class d{constructor(){this.type=t}
|
13 |
+
/* API */get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=t}is(e){return this.type===e}}const l=new class{
|
14 |
+
/* CONSTRUCTOR */
|
15 |
+
constructor(e,a){this.color=a,this.changed=!1,this.data=e,this.type=new d}
|
16 |
+
/* API */set(e,a){return this.color=a,this.changed=!1,this.data=e,this.type.type=t,this}
|
17 |
+
/* HELPERS */_ensureHSL(){const e=this.data,{h:r,s:t,l:n}=e;void 0===r&&(e.h=a.channel.rgb2hsl(e,"h")),void 0===t&&(e.s=a.channel.rgb2hsl(e,"s")),void 0===n&&(e.l=a.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r:r,g:t,b:n}=e;void 0===r&&(e.r=a.channel.hsl2rgb(e,"r")),void 0===t&&(e.g=a.channel.hsl2rgb(e,"g")),void 0===n&&(e.b=a.channel.hsl2rgb(e,"b"))}
|
18 |
+
/* GETTERS */get r(){const e=this.data,r=e.r;return this.type.is(s)||void 0===r?(this._ensureHSL(),a.channel.hsl2rgb(e,"r")):r}get g(){const e=this.data,r=e.g;return this.type.is(s)||void 0===r?(this._ensureHSL(),a.channel.hsl2rgb(e,"g")):r}get b(){const e=this.data,r=e.b;return this.type.is(s)||void 0===r?(this._ensureHSL(),a.channel.hsl2rgb(e,"b")):r}get h(){const e=this.data,r=e.h;return this.type.is(n)||void 0===r?(this._ensureRGB(),a.channel.rgb2hsl(e,"h")):r}get s(){const e=this.data,r=e.s;return this.type.is(n)||void 0===r?(this._ensureRGB(),a.channel.rgb2hsl(e,"s")):r}get l(){const e=this.data,r=e.l;return this.type.is(n)||void 0===r?(this._ensureRGB(),a.channel.rgb2hsl(e,"l")):r}get a(){return this.data.a}
|
19 |
+
/* SETTERS */set r(e){this.type.set(n),this.changed=!0,this.data.r=e}set g(e){this.type.set(n),this.changed=!0,this.data.g=e}set b(e){this.type.set(n),this.changed=!0,this.data.b=e}set h(e){this.type.set(s),this.changed=!0,this.data.h=e}set s(e){this.type.set(s),this.changed=!0,this.data.s=e}set l(e){this.type.set(s),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},"transparent"),i={
|
20 |
+
/* VARIABLES */
|
21 |
+
re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,
|
22 |
+
/* API */
|
23 |
+
parse:e=>{if(35!==e.charCodeAt(0))return;const a=e.match(i.re);if(!a)return;const r=a[1],t=parseInt(r,16),n=r.length,s=n%4==0,d=n>4,f=d?1:17,h=d?8:4,o=s?0:-1,c=d?255:15;return l.set({r:(t>>h*(o+3)&c)*f,g:(t>>h*(o+2)&c)*f,b:(t>>h*(o+1)&c)*f,a:s?(t&c)*f/255:1},e)},stringify:e=>{const{r:a,g:t,b:n,a:s}=e;return s<1?`#${r[Math.round(a)]}${r[Math.round(t)]}${r[Math.round(n)]}${r[Math.round(255*s)]}`:`#${r[Math.round(a)]}${r[Math.round(t)]}${r[Math.round(n)]}`}},f={
|
24 |
+
/* VARIABLES */
|
25 |
+
re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,
|
26 |
+
/* HELPERS */
|
27 |
+
_hue2deg:e=>{const r=e.match(f.hueRe);if(r){const[,e,t]=r;switch(t){case"grad":return a.channel.clamp.h(.9*parseFloat(e));case"rad":return a.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return a.channel.clamp.h(360*parseFloat(e))}}return a.channel.clamp.h(parseFloat(e))},
|
28 |
+
/* API */
|
29 |
+
parse:e=>{const r=e.charCodeAt(0);if(104!==r&&72!==r)return;const t=e.match(f.re);if(!t)return;const[,n,s,d,i,h]=t;return l.set({h:f._hue2deg(n),s:a.channel.clamp.s(parseFloat(s)),l:a.channel.clamp.l(parseFloat(d)),a:i?a.channel.clamp.a(h?parseFloat(i)/100:parseFloat(i)):1},e)},stringify:e=>{const{h:r,s:t,l:n,a:s}=e;return s<1?`hsla(${a.lang.round(r)}, ${a.lang.round(t)}%, ${a.lang.round(n)}%, ${s})`:`hsl(${a.lang.round(r)}, ${a.lang.round(t)}%, ${a.lang.round(n)}%)`}},h={
|
30 |
+
/* VARIABLES */
|
31 |
+
colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},
|
32 |
+
/* API */
|
33 |
+
parse:e=>{e=e.toLowerCase();const a=h.colors[e];if(a)return i.parse(a)},stringify:e=>{const a=i.stringify(e);for(const r in h.colors)if(h.colors[r]===a)return r}},o={
|
34 |
+
/* VARIABLES */
|
35 |
+
re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,
|
36 |
+
/* API */
|
37 |
+
parse:e=>{const r=e.charCodeAt(0);if(114!==r&&82!==r)return;const t=e.match(o.re);if(!t)return;const[,n,s,d,i,f,h,c,g]=t;return l.set({r:a.channel.clamp.r(s?2.55*parseFloat(n):parseFloat(n)),g:a.channel.clamp.g(i?2.55*parseFloat(d):parseFloat(d)),b:a.channel.clamp.b(h?2.55*parseFloat(f):parseFloat(f)),a:c?a.channel.clamp.a(g?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:r,g:t,b:n,a:s}=e;return s<1?`rgba(${a.lang.round(r)}, ${a.lang.round(t)}, ${a.lang.round(n)}, ${a.lang.round(s)})`:`rgb(${a.lang.round(r)}, ${a.lang.round(t)}, ${a.lang.round(n)})`}},c=e=>{if("string"!=typeof e)return e;const a=i.parse(e)||o.parse(e)||f.parse(e)||h.parse(e);if(a)return a;throw new Error(`Unsupported color format: "${e}"`)},g=e=>!e.changed&&e.color?e.color:e.type.is(s)||void 0===e.data.r?f.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?o.stringify(e):i.stringify(e),u=(e,r)=>{const t=c(e);for(const n in r)t[n]=a.channel.clamp[n](r[n]);return g(t)},b=(e,r,t=0,n=1)=>{if("number"!=typeof e)return u(e,{a:r});const s=l.set({r:a.channel.clamp.r(e),g:a.channel.clamp.g(r),b:a.channel.clamp.b(t),a:a.channel.clamp.a(n)});return g(s)},p=(e,r)=>a.lang.round(c(e)[r]),m=e=>(e=>{const{r:r,g:t,b:n}=c(e),s=.2126*a.channel.toLinear(r)+.7152*a.channel.toLinear(t)+.0722*a.channel.toLinear(n);return a.lang.round(s)})(e)>=.5,y=e=>!m(e),k=(e,r,t)=>{const n=c(e),s=n[r],d=a.channel.clamp[r](s+t);return s!==d&&(n[r]=d),g(n)},w=(e,a)=>k(e,"l",a),v=(e,a)=>k(e,"l",-a),$=(e,a)=>{const r=c(e),t={};for(const n in a)a[n]&&(t[n]=r[n]+a[n]);return u(e,t)},M=(e,a=100)=>{const r=c(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((e,a,r=50)=>{const{r:t,g:n,b:s,a:d}=c(e),{r:l,g:i,b:f,a:h}=c(a),o=r/100,g=2*o-1,u=d-h,p=((g*u==-1?g:(g+u)/(1+g*u))+1)/2,m=1-p;return b(t*p+l*m,n*p+i*m,s*p+f*m,d*o+h*(1-o))})(r,e,a)};export{$ as a,y as b,p as c,v as d,M as i,w as l,b as r};
|
.output/public/assets/langium-BVNt58jJ.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
.output/public/assets/lodash-es-RhymR7yg.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var t="object"==typeof global&&global&&global.Object===Object&&global,r="object"==typeof self&&self&&self.Object===Object&&self,n=t||r||Function("return this")(),e=n.Symbol,u=Object.prototype,o=u.hasOwnProperty,a=u.toString,i=e?e.toStringTag:void 0;var c=Object.prototype.toString;var f=e?e.toStringTag:void 0;function l(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":f&&f in Object(t)?function(t){var r=o.call(t,i),n=t[i];try{t[i]=void 0;var e=!0}catch(c){}var u=a.call(t);return e&&(r?t[i]=n:delete t[i]),u}(t):function(t){return c.call(t)}(t)}function s(t){return null!=t&&"object"==typeof t}function v(t){return"symbol"==typeof t||s(t)&&"[object Symbol]"==l(t)}function p(t,r){for(var n=-1,e=null==t?0:t.length,u=Array(e);++n<e;)u[n]=r(t[n],n,t);return u}var h=Array.isArray,b=e?e.prototype:void 0,d=b?b.toString:void 0;function y(t){if("string"==typeof t)return t;if(h(t))return p(t,y)+"";if(v(t))return d?d.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}var g=/\s/;var j=/^\s+/;function _(t){return t?t.slice(0,function(t){for(var r=t.length;r--&&g.test(t.charAt(r)););return r}(t)+1).replace(j,""):t}function O(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}var w=/^[-+]0x[0-9a-f]+$/i,x=/^0b[01]+$/i,m=/^0o[0-7]+$/i,A=parseInt;function E(t){if("number"==typeof t)return t;if(v(t))return NaN;if(O(t)){var r="function"==typeof t.valueOf?t.valueOf():t;t=O(r)?r+"":r}if("string"!=typeof t)return 0===t?t:+t;t=_(t);var n=x.test(t);return n||m.test(t)?A(t.slice(2),n?2:8):w.test(t)?NaN:+t}var S=1/0;function z(t){return t?(t=E(t))===S||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function P(t){var r=z(t),n=r%1;return r==r?n?r-n:r:0}function T(t){return t}function U(t){if(!O(t))return!1;var r=l(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}var I,M=n["__core-js_shared__"],C=(I=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"";var D=Function.prototype.toString;function R(t){if(null!=t){try{return D.call(t)}catch(r){}try{return t+""}catch(r){}}return""}var L=/^\[object .+?Constructor\]$/,F=Function.prototype,N=Object.prototype,$=F.toString,k=N.hasOwnProperty,B=RegExp("^"+$.call(k).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Z(t){return!(!O(t)||(r=t,C&&C in r))&&(U(t)?B:L).test(R(t));var r}function W(t,r){var n=function(t,r){return null==t?void 0:t[r]}(t,r);return Z(n)?n:void 0}var V=W(n,"WeakMap"),G=Object.create,H=function(){function t(){}return function(r){if(!O(r))return{};if(G)return G(r);t.prototype=r;var n=new t;return t.prototype=void 0,n}}();function Y(){}function q(t,r){var n=-1,e=t.length;for(r||(r=Array(e));++n<e;)r[n]=t[n];return r}var J=Date.now;function K(t){return function(){return t}}var Q,X,tt,rt=function(){try{var t=W(Object,"defineProperty");return t({},"",{}),t}catch(r){}}(),nt=rt?function(t,r){return rt(t,"toString",{configurable:!0,enumerable:!1,value:K(r),writable:!0})}:T,et=(Q=nt,X=0,tt=0,function(){var t=J(),r=16-(t-tt);if(tt=t,r>0){if(++X>=800)return arguments[0]}else X=0;return Q.apply(void 0,arguments)});function ut(t,r){for(var n=-1,e=null==t?0:t.length;++n<e&&!1!==r(t[n],n,t););return t}function ot(t,r,n,e){for(var u=t.length,o=n+-1;++o<u;)if(r(t[o],o,t))return o;return-1}function at(t){return t!=t}function it(t,r,n){return r==r?function(t,r,n){for(var e=n-1,u=t.length;++e<u;)if(t[e]===r)return e;return-1}(t,r,n):ot(t,at,n)}function ct(t,r){return!!(null==t?0:t.length)&&it(t,r,0)>-1}var ft=/^(?:0|[1-9]\d*)$/;function lt(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&ft.test(t))&&t>-1&&t%1==0&&t<r}function st(t,r,n){"__proto__"==r&&rt?rt(t,r,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[r]=n}function vt(t,r){return t===r||t!=t&&r!=r}var pt=Object.prototype.hasOwnProperty;function ht(t,r,n){var e=t[r];pt.call(t,r)&&vt(e,n)&&(void 0!==n||r in t)||st(t,r,n)}function bt(t,r,n,e){var u=!n;n||(n={});for(var o=-1,a=r.length;++o<a;){var i=r[o],c=void 0;void 0===c&&(c=t[i]),u?st(n,i,c):ht(n,i,c)}return n}var dt=Math.max;function yt(t,r,n){return r=dt(void 0===r?t.length-1:r,0),function(){for(var e=arguments,u=-1,o=dt(e.length-r,0),a=Array(o);++u<o;)a[u]=e[r+u];u=-1;for(var i=Array(r+1);++u<r;)i[u]=e[u];return i[r]=n(a),function(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}(t,this,i)}}function gt(t,r){return et(yt(t,r,T),t+"")}function jt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function _t(t){return null!=t&&jt(t.length)&&!U(t)}function Ot(t,r,n){if(!O(n))return!1;var e=typeof r;return!!("number"==e?_t(n)&<(r,n.length):"string"==e&&r in n)&&vt(n[r],t)}function wt(t){return gt((function(r,n){var e=-1,u=n.length,o=u>1?n[u-1]:void 0,a=u>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(u--,o):void 0,a&&Ot(n[0],n[1],a)&&(o=u<3?void 0:o,u=1),r=Object(r);++e<u;){var i=n[e];i&&t(r,i,e,o)}return r}))}var xt=Object.prototype;function mt(t){var r=t&&t.constructor;return t===("function"==typeof r&&r.prototype||xt)}function At(t){return s(t)&&"[object Arguments]"==l(t)}var Et=Object.prototype,St=Et.hasOwnProperty,zt=Et.propertyIsEnumerable,Pt=At(function(){return arguments}())?At:function(t){return s(t)&&St.call(t,"callee")&&!zt.call(t,"callee")};var Tt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ut=Tt&&"object"==typeof module&&module&&!module.nodeType&&module,It=Ut&&Ut.exports===Tt?n.Buffer:void 0,Mt=(It?It.isBuffer:void 0)||function(){return!1},Ct={};function Dt(t){return function(r){return t(r)}}Ct["[object Float32Array]"]=Ct["[object Float64Array]"]=Ct["[object Int8Array]"]=Ct["[object Int16Array]"]=Ct["[object Int32Array]"]=Ct["[object Uint8Array]"]=Ct["[object Uint8ClampedArray]"]=Ct["[object Uint16Array]"]=Ct["[object Uint32Array]"]=!0,Ct["[object Arguments]"]=Ct["[object Array]"]=Ct["[object ArrayBuffer]"]=Ct["[object Boolean]"]=Ct["[object DataView]"]=Ct["[object Date]"]=Ct["[object Error]"]=Ct["[object Function]"]=Ct["[object Map]"]=Ct["[object Number]"]=Ct["[object Object]"]=Ct["[object RegExp]"]=Ct["[object Set]"]=Ct["[object String]"]=Ct["[object WeakMap]"]=!1;var Rt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Lt=Rt&&"object"==typeof module&&module&&!module.nodeType&&module,Ft=Lt&&Lt.exports===Rt&&t.process,Nt=function(){try{var t=Lt&&Lt.require&&Lt.require("util").types;return t||Ft&&Ft.binding&&Ft.binding("util")}catch(r){}}(),$t=Nt&&Nt.isTypedArray,kt=$t?Dt($t):function(t){return s(t)&&jt(t.length)&&!!Ct[l(t)]},Bt=Object.prototype.hasOwnProperty;function Zt(t,r){var n=h(t),e=!n&&Pt(t),u=!n&&!e&&Mt(t),o=!n&&!e&&!u&&kt(t),a=n||e||u||o,i=a?function(t,r){for(var n=-1,e=Array(t);++n<t;)e[n]=r(n);return e}(t.length,String):[],c=i.length;for(var f in t)!r&&!Bt.call(t,f)||a&&(// Safari 9 has enumerable `arguments.length` in strict mode.
|
2 |
+
"length"==f||// Node.js 0.10 has enumerable non-index properties on buffers.
|
3 |
+
u&&("offset"==f||"parent"==f)||// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
4 |
+
o&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||// Skip index properties.
|
5 |
+
lt(f,c))||i.push(f);return i}function Wt(t,r){return function(n){return t(r(n))}}var Vt=Wt(Object.keys,Object),Gt=Object.prototype.hasOwnProperty;function Ht(t){if(!mt(t))return Vt(t);var r=[];for(var n in Object(t))Gt.call(t,n)&&"constructor"!=n&&r.push(n);return r}function Yt(t){return _t(t)?Zt(t):Ht(t)}var qt=Object.prototype.hasOwnProperty,Jt=wt((function(t,r){if(mt(r)||_t(r))bt(r,Yt(r),t);else for(var n in r)qt.call(r,n)&&ht(t,n,r[n])}));var Kt=Object.prototype.hasOwnProperty;function Qt(t){if(!O(t))return function(t){var r=[];if(null!=t)for(var n in Object(t))r.push(n);return r}(t);var r=mt(t),n=[];for(var e in t)("constructor"!=e||!r&&Kt.call(t,e))&&n.push(e);return n}function Xt(t){return _t(t)?Zt(t,!0):Qt(t)}var tr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rr=/^\w*$/;function nr(t,r){if(h(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!v(t))||(rr.test(t)||!tr.test(t)||null!=r&&t in Object(r))}var er=W(Object,"create");var ur=Object.prototype.hasOwnProperty;var or=Object.prototype.hasOwnProperty;function ar(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}function ir(t,r){for(var n=t.length;n--;)if(vt(t[n][0],r))return n;return-1}ar.prototype.clear=function(){this.__data__=er?er(null):{},this.size=0},ar.prototype.delete=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},ar.prototype.get=function(t){var r=this.__data__;if(er){var n=r[t];return"__lodash_hash_undefined__"===n?void 0:n}return ur.call(r,t)?r[t]:void 0},ar.prototype.has=function(t){var r=this.__data__;return er?void 0!==r[t]:or.call(r,t)},ar.prototype.set=function(t,r){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=er&&void 0===r?"__lodash_hash_undefined__":r,this};var cr=Array.prototype.splice;function fr(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}fr.prototype.clear=function(){this.__data__=[],this.size=0},fr.prototype.delete=function(t){var r=this.__data__,n=ir(r,t);return!(n<0)&&(n==r.length-1?r.pop():cr.call(r,n,1),--this.size,!0)},fr.prototype.get=function(t){var r=this.__data__,n=ir(r,t);return n<0?void 0:r[n][1]},fr.prototype.has=function(t){return ir(this.__data__,t)>-1},fr.prototype.set=function(t,r){var n=this.__data__,e=ir(n,t);return e<0?(++this.size,n.push([t,r])):n[e][1]=r,this};var lr=W(n,"Map");function sr(t,r){var n,e,u=t.__data__;return("string"==(e=typeof(n=r))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==n:null===n)?u["string"==typeof r?"string":"hash"]:u.map}function vr(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}vr.prototype.clear=function(){this.size=0,this.__data__={hash:new ar,map:new(lr||fr),string:new ar}},vr.prototype.delete=function(t){var r=sr(this,t).delete(t);return this.size-=r?1:0,r},vr.prototype.get=function(t){return sr(this,t).get(t)},vr.prototype.has=function(t){return sr(this,t).has(t)},vr.prototype.set=function(t,r){var n=sr(this,t),e=n.size;return n.set(t,r),this.size+=n.size==e?0:1,this};function pr(t,r){if("function"!=typeof t||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var n=function(){var e=arguments,u=r?r.apply(this,e):e[0],o=n.cache;if(o.has(u))return o.get(u);var a=t.apply(this,e);return n.cache=o.set(u,a)||o,a};return n.cache=new(pr.Cache||vr),n}pr.Cache=vr;var hr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,br=/\\(\\)?/g,dr=function(t){var r=pr(t,(function(t){return 500===n.size&&n.clear(),t})),n=r.cache;return r}((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(hr,(function(t,n,e,u){r.push(e?u.replace(br,"$1"):n||t)})),r}));function yr(t){return null==t?"":y(t)}function gr(t,r){return h(t)?t:nr(t,r)?[t]:dr(yr(t))}function jr(t){if("string"==typeof t||v(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}function _r(t,r){for(var n=0,e=(r=gr(r,t)).length;null!=t&&n<e;)t=t[jr(r[n++])];return n&&n==e?t:void 0}function Or(t,r,n){var e=null==t?void 0:_r(t,r);return void 0===e?n:e}function wr(t,r){for(var n=-1,e=r.length,u=t.length;++n<e;)t[u+n]=r[n];return t}var xr=e?e.isConcatSpreadable:void 0;function mr(t){return h(t)||Pt(t)||!!(xr&&t&&t[xr])}function Ar(t,r,n,e,u){var o=-1,a=t.length;for(n||(n=mr),u||(u=[]);++o<a;){var i=t[o];n(i)?wr(u,i):e||(u[u.length]=i)}return u}function Er(t){return(null==t?0:t.length)?Ar(t):[]}function Sr(t){return et(yt(t,void 0,Er),t+"")}var zr=Wt(Object.getPrototypeOf,Object),Pr=Function.prototype,Tr=Object.prototype,Ur=Pr.toString,Ir=Tr.hasOwnProperty,Mr=Ur.call(Object);function Cr(t){if(!s(t)||"[object Object]"!=l(t))return!1;var r=zr(t);if(null===r)return!0;var n=Ir.call(r,"constructor")&&r.constructor;return"function"==typeof n&&n instanceof n&&Ur.call(n)==Mr}function Dr(t,r,n){var e=-1,u=t.length;r<0&&(r=-r>u?0:u+r),(n=n>u?u:n)<0&&(n+=u),u=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(u);++e<u;)o[e]=t[e+r];return o}var Rr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Lr(t){return Rr.test(t)}var Fr="\\ud800-\\udfff",Nr="["+Fr+"]",$r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",kr="\\ud83c[\\udffb-\\udfff]",Br="[^"+Fr+"]",Zr="(?:\\ud83c[\\udde6-\\uddff]){2}",Wr="[\\ud800-\\udbff][\\udc00-\\udfff]",Vr="(?:"+$r+"|"+kr+")"+"?",Gr="[\\ufe0e\\ufe0f]?",Hr=Gr+Vr+("(?:\\u200d(?:"+[Br,Zr,Wr].join("|")+")"+Gr+Vr+")*"),Yr="(?:"+[Br+$r+"?",$r,Zr,Wr,Nr].join("|")+")",qr=RegExp(kr+"(?="+kr+")|"+Yr+Hr,"g");function Jr(t){return Lr(t)?function(t){return t.match(qr)||[]}(t):function(t){return t.split("")}(t)}var Kr,Qr=(Kr="toUpperCase",function(t){var r,n,e,u,o=Lr(t=yr(t))?Jr(t):void 0,a=o?o[0]:t.charAt(0),i=o?(r=o,n=1,u=r.length,Dr(r,n,e=void 0===e?u:e)).join(""):t.slice(1);return a[Kr]()+i});function Xr(t,r,n,e){var u=-1,o=null==t?0:t.length;for(e&&o&&(n=t[++u]);++u<o;)n=r(n,t[u],u,t);return n}var tn,rn=(tn={
|
6 |
+
// Latin-1 Supplement block.
|
7 |
+
"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss",
|
8 |
+
// Latin Extended-A block.
|
9 |
+
"Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},function(t){return null==tn?void 0:tn[t]}),nn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,en=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var un=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var on=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var an="\\ud800-\\udfff",cn="\\u2700-\\u27bf",fn="a-z\\xdf-\\xf6\\xf8-\\xff",ln="A-Z\\xc0-\\xd6\\xd8-\\xde",sn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",vn="["+sn+"]",pn="\\d+",hn="["+cn+"]",bn="["+fn+"]",dn="[^"+an+sn+pn+cn+fn+ln+"]",yn="(?:\\ud83c[\\udde6-\\uddff]){2}",gn="[\\ud800-\\udbff][\\udc00-\\udfff]",jn="["+ln+"]",_n="(?:"+bn+"|"+dn+")",On="(?:"+jn+"|"+dn+")",wn="(?:['’](?:d|ll|m|re|s|t|ve))?",xn="(?:['’](?:D|LL|M|RE|S|T|VE))?",mn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",An="[\\ufe0e\\ufe0f]?",En=An+mn+("(?:\\u200d(?:"+["[^"+an+"]",yn,gn].join("|")+")"+An+mn+")*"),Sn="(?:"+[hn,yn,gn].join("|")+")"+En,zn=RegExp([jn+"?"+bn+"+"+wn+"(?="+[vn,jn,"$"].join("|")+")",On+"+"+xn+"(?="+[vn,jn+_n,"$"].join("|")+")",jn+"?"+_n+"+"+wn,jn+"+"+xn,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",pn,Sn].join("|"),"g");function Pn(t,r,n){return t=yr(t),void 0===r?function(t){return on.test(t)}(t)?function(t){return t.match(zn)||[]}(t):function(t){return t.match(un)||[]}(t):t.match(r)||[]}var Tn=RegExp("['’]","g");function Un(t){return function(r){return Xr(Pn(function(t){return(t=yr(t))&&t.replace(nn,rn).replace(en,"")}(r).replace(Tn,"")),t,"")}}var In=Un((function(t,r,n){return r=r.toLowerCase(),t+(n?Qr(yr(r).toLowerCase()):r)}));function Mn(t){var r=this.__data__=new fr(t);this.size=r.size}Mn.prototype.clear=function(){this.__data__=new fr,this.size=0},Mn.prototype.delete=function(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n},Mn.prototype.get=function(t){return this.__data__.get(t)},Mn.prototype.has=function(t){return this.__data__.has(t)},Mn.prototype.set=function(t,r){var n=this.__data__;if(n instanceof fr){var e=n.__data__;if(!lr||e.length<199)return e.push([t,r]),this.size=++n.size,this;n=this.__data__=new vr(e)}return n.set(t,r),this.size=n.size,this};var Cn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Dn=Cn&&"object"==typeof module&&module&&!module.nodeType&&module,Rn=Dn&&Dn.exports===Cn?n.Buffer:void 0,Ln=Rn?Rn.allocUnsafe:void 0;function Fn(t,r){if(r)return t.slice();var n=t.length,e=Ln?Ln(n):new t.constructor(n);return t.copy(e),e}function Nn(t,r){for(var n=-1,e=null==t?0:t.length,u=0,o=[];++n<e;){var a=t[n];r(a,n,t)&&(o[u++]=a)}return o}function $n(){return[]}var kn=Object.prototype.propertyIsEnumerable,Bn=Object.getOwnPropertySymbols,Zn=Bn?function(t){return null==t?[]:(t=Object(t),Nn(Bn(t),(function(r){return kn.call(t,r)})))}:$n;var Wn=Object.getOwnPropertySymbols?function(t){for(var r=[];t;)wr(r,Zn(t)),t=zr(t);return r}:$n;function Vn(t,r,n){var e=r(t);return h(t)?e:wr(e,n(t))}function Gn(t){return Vn(t,Yt,Zn)}function Hn(t){return Vn(t,Xt,Wn)}var Yn=W(n,"DataView"),qn=W(n,"Promise"),Jn=W(n,"Set"),Kn="[object Map]",Qn="[object Promise]",Xn="[object Set]",te="[object WeakMap]",re="[object DataView]",ne=R(Yn),ee=R(lr),ue=R(qn),oe=R(Jn),ae=R(V),ie=l;(Yn&&ie(new Yn(new ArrayBuffer(1)))!=re||lr&&ie(new lr)!=Kn||qn&&ie(qn.resolve())!=Qn||Jn&&ie(new Jn)!=Xn||V&&ie(new V)!=te)&&(ie=function(t){var r=l(t),n="[object Object]"==r?t.constructor:void 0,e=n?R(n):"";if(e)switch(e){case ne:return re;case ee:return Kn;case ue:return Qn;case oe:return Xn;case ae:return te}return r});var ce=Object.prototype.hasOwnProperty;var fe=n.Uint8Array;function le(t){var r=new t.constructor(t.byteLength);return new fe(r).set(new fe(t)),r}var se=/\w*$/;var ve=e?e.prototype:void 0,pe=ve?ve.valueOf:void 0;function he(t,r){var n=r?le(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function be(t,r,n){var e,u,o,a=t.constructor;switch(r){case"[object ArrayBuffer]":return le(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,r){var n=r?le(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return he(t,n);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(t);case"[object RegExp]":return(o=new(u=t).constructor(u.source,se.exec(u))).lastIndex=u.lastIndex,o;case"[object Symbol]":return e=t,pe?Object(pe.call(e)):{}}}function de(t){return"function"!=typeof t.constructor||mt(t)?{}:H(zr(t))}var ye=Nt&&Nt.isMap,ge=ye?Dt(ye):function(t){return s(t)&&"[object Map]"==ie(t)};var je=Nt&&Nt.isSet,_e=je?Dt(je):function(t){return s(t)&&"[object Set]"==ie(t)},Oe="[object Arguments]",we="[object Function]",xe="[object Object]",me={};function Ae(t,r,n,e,u,o){var a,i=1&r,c=2&r,f=4&r;if(n&&(a=u?n(t,e,u,o):n(t)),void 0!==a)return a;if(!O(t))return t;var l=h(t);if(l){if(a=function(t){var r=t.length,n=new t.constructor(r);return r&&"string"==typeof t[0]&&ce.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!i)return q(t,a)}else{var s=ie(t),v=s==we||"[object GeneratorFunction]"==s;if(Mt(t))return Fn(t,i);if(s==xe||s==Oe||v&&!u){if(a=c||v?{}:de(t),!i)return c?function(t,r){return bt(t,Wn(t),r)}(t,function(t,r){return t&&bt(r,Xt(r),t)}(a,t)):function(t,r){return bt(t,Zn(t),r)}(t,function(t,r){return t&&bt(r,Yt(r),t)}(a,t))}else{if(!me[s])return u?t:{};a=be(t,s,i)}}o||(o=new Mn);var p=o.get(t);if(p)return p;o.set(t,a),_e(t)?t.forEach((function(e){a.add(Ae(e,r,n,e,t,o))})):ge(t)&&t.forEach((function(e,u){a.set(u,Ae(e,r,n,u,t,o))}));var b=l?void 0:(f?c?Hn:Gn:c?Xt:Yt)(t);return ut(b||t,(function(e,u){b&&(e=t[u=e]),ht(a,u,Ae(e,r,n,u,t,o))})),a}me[Oe]=me["[object Array]"]=me["[object ArrayBuffer]"]=me["[object DataView]"]=me["[object Boolean]"]=me["[object Date]"]=me["[object Float32Array]"]=me["[object Float64Array]"]=me["[object Int8Array]"]=me["[object Int16Array]"]=me["[object Int32Array]"]=me["[object Map]"]=me["[object Number]"]=me[xe]=me["[object RegExp]"]=me["[object Set]"]=me["[object String]"]=me["[object Symbol]"]=me["[object Uint8Array]"]=me["[object Uint8ClampedArray]"]=me["[object Uint16Array]"]=me["[object Uint32Array]"]=!0,me["[object Error]"]=me[we]=me["[object WeakMap]"]=!1;function Ee(t){return Ae(t,4)}function Se(t){return Ae(t,5)}function ze(t){for(var r=-1,n=null==t?0:t.length,e=0,u=[];++r<n;){var o=t[r];o&&(u[e++]=o)}return u}function Pe(t){var r=-1,n=null==t?0:t.length;for(this.__data__=new vr;++r<n;)this.add(t[r])}function Te(t,r){for(var n=-1,e=null==t?0:t.length;++n<e;)if(r(t[n],n,t))return!0;return!1}function Ue(t,r){return t.has(r)}Pe.prototype.add=Pe.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Pe.prototype.has=function(t){return this.__data__.has(t)};function Ie(t,r,n,e,u,o){var a=1&n,i=t.length,c=r.length;if(i!=c&&!(a&&c>i))return!1;var f=o.get(t),l=o.get(r);if(f&&l)return f==r&&l==t;var s=-1,v=!0,p=2&n?new Pe:void 0;for(o.set(t,r),o.set(r,t);++s<i;){var h=t[s],b=r[s];if(e)var d=a?e(b,h,s,r,t,o):e(h,b,s,t,r,o);if(void 0!==d){if(d)continue;v=!1;break}if(p){if(!Te(r,(function(t,r){if(!Ue(p,r)&&(h===t||u(h,t,n,e,o)))return p.push(r)}))){v=!1;break}}else if(h!==b&&!u(h,b,n,e,o)){v=!1;break}}return o.delete(t),o.delete(r),v}function Me(t){var r=-1,n=Array(t.size);return t.forEach((function(t,e){n[++r]=[e,t]})),n}function Ce(t){var r=-1,n=Array(t.size);return t.forEach((function(t){n[++r]=t})),n}var De=e?e.prototype:void 0,Re=De?De.valueOf:void 0;var Le=Object.prototype.hasOwnProperty;var Fe="[object Arguments]",Ne="[object Array]",$e="[object Object]",ke=Object.prototype.hasOwnProperty;function Be(t,r,n,e,u,o){var a=h(t),i=h(r),c=a?Ne:ie(t),f=i?Ne:ie(r),l=(c=c==Fe?$e:c)==$e,s=(f=f==Fe?$e:f)==$e,v=c==f;if(v&&Mt(t)){if(!Mt(r))return!1;a=!0,l=!1}if(v&&!l)return o||(o=new Mn),a||kt(t)?Ie(t,r,n,e,u,o):function(t,r,n,e,u,o,a){switch(n){case"[object DataView]":if(t.byteLength!=r.byteLength||t.byteOffset!=r.byteOffset)return!1;t=t.buffer,r=r.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=r.byteLength||!o(new fe(t),new fe(r)));case"[object Boolean]":case"[object Date]":case"[object Number]":return vt(+t,+r);case"[object Error]":return t.name==r.name&&t.message==r.message;case"[object RegExp]":case"[object String]":return t==r+"";case"[object Map]":var i=Me;case"[object Set]":var c=1&e;if(i||(i=Ce),t.size!=r.size&&!c)return!1;var f=a.get(t);if(f)return f==r;e|=2,a.set(t,r);var l=Ie(i(t),i(r),e,u,o,a);return a.delete(t),l;case"[object Symbol]":if(Re)return Re.call(t)==Re.call(r)}return!1}(t,r,c,n,e,u,o);if(!(1&n)){var p=l&&ke.call(t,"__wrapped__"),b=s&&ke.call(r,"__wrapped__");if(p||b){var d=p?t.value():t,y=b?r.value():r;return o||(o=new Mn),u(d,y,n,e,o)}}return!!v&&(o||(o=new Mn),function(t,r,n,e,u,o){var a=1&n,i=Gn(t),c=i.length;if(c!=Gn(r).length&&!a)return!1;for(var f=c;f--;){var l=i[f];if(!(a?l in r:Le.call(r,l)))return!1}var s=o.get(t),v=o.get(r);if(s&&v)return s==r&&v==t;var p=!0;o.set(t,r),o.set(r,t);for(var h=a;++f<c;){var b=t[l=i[f]],d=r[l];if(e)var y=a?e(d,b,l,r,t,o):e(b,d,l,t,r,o);if(!(void 0===y?b===d||u(b,d,n,e,o):y)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var g=t.constructor,j=r.constructor;g==j||!("constructor"in t)||!("constructor"in r)||"function"==typeof g&&g instanceof g&&"function"==typeof j&&j instanceof j||(p=!1)}return o.delete(t),o.delete(r),p}(t,r,n,e,u,o))}function Ze(t,r,n,e,u){return t===r||(null==t||null==r||!s(t)&&!s(r)?t!=t&&r!=r:Be(t,r,n,e,Ze,u))}function We(t){return t==t&&!O(t)}function Ve(t,r){return function(n){return null!=n&&(n[t]===r&&(void 0!==r||t in Object(n)))}}function Ge(t){var r=function(t){for(var r=Yt(t),n=r.length;n--;){var e=r[n],u=t[e];r[n]=[e,u,We(u)]}return r}(t);return 1==r.length&&r[0][2]?Ve(r[0][0],r[0][1]):function(n){return n===t||function(t,r,n,e){var u=n.length,o=u;if(null==t)return!o;for(t=Object(t);u--;){var a=n[u];if(a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++u<o;){var i=(a=n[u])[0],c=t[i],f=a[1];if(a[2]){if(void 0===c&&!(i in t))return!1}else if(!Ze(f,c,3,e,new Mn))return!1}return!0}(n,0,r)}}function He(t,r){return null!=t&&r in Object(t)}function Ye(t,r,n){for(var e=-1,u=(r=gr(r,t)).length,o=!1;++e<u;){var a=jr(r[e]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++e!=u?o:!!(u=null==t?0:t.length)&&jt(u)&<(a,u)&&(h(t)||Pt(t))}function qe(t,r){return null!=t&&Ye(t,r,He)}function Je(t){return nr(t)?(r=jr(t),function(t){return null==t?void 0:t[r]}):function(t){return function(r){return _r(r,t)}}(t);var r}function Ke(t){return"function"==typeof t?t:null==t?T:"object"==typeof t?h(t)?(r=t[0],n=t[1],nr(r)&&We(n)?Ve(jr(r),n):function(t){var e=Or(t,r);return void 0===e&&e===n?qe(t,r):Ze(n,e,3)}):Ge(t):Je(t);var r,n}function Qe(t,r,n,e){for(var u=-1,o=null==t?0:t.length;++u<o;){var a=t[u];r(e,a,n(a),t)}return e}var Xe=function(t,r,n){for(var e=-1,u=Object(t),o=n(t),a=o.length;a--;){var i=o[++e];if(!1===r(u[i],i,u))break}return t};function tu(t,r){return t&&Xe(t,r,Yt)}var ru,nu=(ru=tu,function(t,r){if(null==t)return t;if(!_t(t))return ru(t,r);for(var n=t.length,e=-1,u=Object(t);++e<n&&!1!==r(u[e],e,u););return t});function eu(t,r,n,e){return nu(t,(function(t,u,o){r(e,t,n(t),o)})),e}var uu=function(){return n.Date.now()},ou=Math.max,au=Math.min;function iu(t,r,n){var e,u,o,a,i,c,f=0,l=!1,s=!1,v=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(r){var n=e,o=u;return e=u=void 0,f=r,a=t.apply(o,n)}function h(t){var n=t-c;return void 0===c||n>=r||n<0||s&&t-f>=o}function b(){var t=uu();if(h(t))return d(t);i=setTimeout(b,function(t){var n=r-(t-c);return s?au(n,o-(t-f)):n}(t))}function d(t){return i=void 0,v&&e?p(t):(e=u=void 0,a)}function y(){var t=uu(),n=h(t);if(e=arguments,u=this,c=t,n){if(void 0===i)return function(t){return f=t,i=setTimeout(b,r),l?p(t):a}(c);if(s)return clearTimeout(i),i=setTimeout(b,r),p(c)}return void 0===i&&(i=setTimeout(b,r)),a}return r=E(r)||0,O(n)&&(l=!!n.leading,o=(s="maxWait"in n)?ou(E(n.maxWait)||0,r):o,v="trailing"in n?!!n.trailing:v),y.cancel=function(){void 0!==i&&clearTimeout(i),f=0,e=c=u=i=void 0},y.flush=function(){return void 0===i?a:d(uu())},y}var cu=Object.prototype,fu=cu.hasOwnProperty,lu=gt((function(t,r){t=Object(t);var n=-1,e=r.length,u=e>2?r[2]:void 0;for(u&&Ot(r[0],r[1],u)&&(e=1);++n<e;)for(var o=r[n],a=Xt(o),i=-1,c=a.length;++i<c;){var f=a[i],l=t[f];(void 0===l||vt(l,cu[f])&&!fu.call(t,f))&&(t[f]=o[f])}return t}));function su(t,r,n){(void 0!==n&&!vt(t[r],n)||void 0===n&&!(r in t))&&st(t,r,n)}function vu(t){return s(t)&&_t(t)}function pu(t,r){if(("constructor"!==r||"function"!=typeof t[r])&&"__proto__"!=r)return t[r]}function hu(t,r,n,e,u,o,a){var i=pu(t,n),c=pu(r,n),f=a.get(c);if(f)su(t,n,f);else{var l,s=o?o(i,c,n+"",t,r,a):void 0,v=void 0===s;if(v){var p=h(c),b=!p&&Mt(c),d=!p&&!b&&kt(c);s=c,p||b||d?h(i)?s=i:vu(i)?s=q(i):b?(v=!1,s=Fn(c,!0)):d?(v=!1,s=he(c,!0)):s=[]:Cr(c)||Pt(c)?(s=i,Pt(i)?s=bt(l=i,Xt(l)):O(i)&&!U(i)||(s=de(c))):v=!1}v&&(a.set(c,s),u(s,c,e,o,a),a.delete(c)),su(t,n,s)}}function bu(t,r,n,e,u){t!==r&&Xe(r,(function(o,a){if(u||(u=new Mn),O(o))hu(t,r,a,n,bu,e,u);else{var i=e?e(pu(t,a),o,a+"",t,r,u):void 0;void 0===i&&(i=o),su(t,a,i)}}),Xt)}var du=wt((function(t,r,n,e){bu(t,r,n,e)}));function yu(t,r,n){for(var e=-1,u=null==t?0:t.length;++e<u;)if(n(r,t[e]))return!0;return!1}function gu(t,r,n,e){var u=-1,o=ct,a=!0,i=t.length,c=[],f=r.length;if(!i)return c;e?(o=yu,a=!1):r.length>=200&&(o=Ue,a=!1,r=new Pe(r));t:for(;++u<i;){var l=t[u],s=l;if(l=e||0!==l?l:0,a&&s==s){for(var v=f;v--;)if(r[v]===s)continue t;c.push(l)}else o(r,s,e)||c.push(l)}return c}var ju=gt((function(t,r){return vu(t)?gu(t,Ar(r,0,vu,!0)):[]}));function _u(t){var r=null==t?0:t.length;return r?t[r-1]:void 0}function Ou(t,r,n){var e=null==t?0:t.length;return e?Dr(t,(r=void 0===r?1:P(r))<0?0:r,e):[]}function wu(t,r,n){var e=null==t?0:t.length;return e?Dr(t,0,(r=e-(r=void 0===r?1:P(r)))<0?0:r):[]}function xu(t){return"function"==typeof t?t:T}function mu(t,r){return(h(t)?ut:nu)(t,xu(r))}function Au(t,r){for(var n=-1,e=null==t?0:t.length;++n<e;)if(!r(t[n],n,t))return!1;return!0}function Eu(t,r){var n=!0;return nu(t,(function(t,e,u){return n=!!r(t,e,u)})),n}function Su(t,r,n){return(h(t)?Au:Eu)(t,Ke(r))}function zu(t,r){var n=[];return nu(t,(function(t,e,u){r(t,e,u)&&n.push(t)})),n}function Pu(t,r){return(h(t)?Nn:zu)(t,Ke(r))}var Tu=Math.max;var Uu,Iu=(Uu=function(t,r,n){var e=null==t?0:t.length;if(!e)return-1;var u=null==n?0:P(n);return u<0&&(u=Tu(e+u,0)),ot(t,Ke(r),u)},function(t,r,n){var e=Object(t);if(!_t(t)){var u=Ke(r);t=Yt(t),r=function(t){return u(e[t],t,e)}}var o=Uu(t,r,n);return o>-1?e[u?t[o]:o]:void 0});function Mu(t){return t&&t.length?t[0]:void 0}function Cu(t,r){var n=-1,e=_t(t)?Array(t.length):[];return nu(t,(function(t,u,o){e[++n]=r(t,u,o)})),e}function Du(t,r){return(h(t)?p:Cu)(t,Ke(r))}function Ru(t,r){return Ar(Du(t,r))}function Lu(t,r){return null==t?t:Xe(t,xu(r),Xt)}function Fu(t,r){return t&&tu(t,xu(r))}var Nu,$u,ku=Object.prototype.hasOwnProperty,Bu=(Nu=function(t,r,n){ku.call(t,n)?t[n].push(r):st(t,n,[r])},function(t,r){var n=h(t)?Qe:eu,e=$u?$u():{};return n(t,Nu,Ke(r),e)});function Zu(t,r){return t>r}var Wu=Object.prototype.hasOwnProperty;function Vu(t,r){return null!=t&&Wu.call(t,r)}function Gu(t,r){return null!=t&&Ye(t,r,Vu)}function Hu(t){return"string"==typeof t||!h(t)&&s(t)&&"[object String]"==l(t)}function Yu(t){return null==t?[]:function(t,r){return p(r,(function(r){return t[r]}))}(t,Yt(t))}var qu=Math.max;function Ju(t,r,n,e){t=_t(t)?t:Yu(t),n=n?P(n):0;var u=t.length;return n<0&&(n=qu(u+n,0)),Hu(t)?n<=u&&t.indexOf(r,n)>-1:!!u&&it(t,r,n)>-1}function Ku(t,r,n){if(!(null==t?0:t.length))return-1;return it(t,r,0)}var Qu=Math.min;function Xu(t){return vu(t)?t:[]}var to=gt((function(t){var r=p(t,Xu);return r.length&&r[0]===t[0]?function(t){for(var r=ct,n=t[0].length,e=t.length,u=e,o=Array(e),a=1/0,i=[];u--;){var c=t[u];a=Qu(c.length,a),o[u]=n>=120&&c.length>=120?new Pe(u&&c):void 0}c=t[0];var f=-1,l=o[0];t:for(;++f<n&&i.length<a;){var s=c[f],v=s;if(s=0!==s?s:0,!(l?Ue(l,v):r(i,v))){for(u=e;--u;){var p=o[u];if(!(p?Ue(p,v):r(t[u],v)))continue t}l&&l.push(v),i.push(s)}}return i}(r):[]}));function ro(t){return!0===t||!1===t||s(t)&&"[object Boolean]"==l(t)}var no=Object.prototype.hasOwnProperty;function eo(t){if(null==t)return!0;if(_t(t)&&(h(t)||"string"==typeof t||"function"==typeof t.splice||Mt(t)||kt(t)||Pt(t)))return!t.length;var r=ie(t);if("[object Map]"==r||"[object Set]"==r)return!t.size;if(mt(t))return!Ht(t).length;for(var n in t)if(no.call(t,n))return!1;return!0}function uo(t,r){return Ze(t,r)}function oo(t){return"number"==typeof t||s(t)&&"[object Number]"==l(t)}function ao(t){return oo(t)&&t!=+t}function io(t){return null==t}function co(t){return null===t}var fo=Nt&&Nt.isRegExp,lo=fo?Dt(fo):function(t){return s(t)&&"[object RegExp]"==l(t)};function so(t){return void 0===t}var vo=Un((function(t,r,n){return t+(n?"-":"")+r.toLowerCase()}));function po(t,r){return t<r}function ho(t,r){var n={};return r=Ke(r),tu(t,(function(t,e,u){st(n,r(t,e,u),t)})),n}function bo(t,r){var n={};return r=Ke(r),tu(t,(function(t,e,u){st(n,e,r(t,e,u))})),n}function yo(t,r,n){for(var e=-1,u=t.length;++e<u;){var o=t[e],a=r(o);if(null!=a&&(void 0===i?a==a&&!v(a):n(a,i)))var i=a,c=o}return c}function go(t){return t&&t.length?yo(t,T,Zu):void 0}var jo=wt((function(t,r,n){bu(t,r,n)}));function _o(t){return t&&t.length?yo(t,T,po):void 0}function Oo(t,r){return t&&t.length?yo(t,Ke(r),po):void 0}function wo(t,r){return null==(t=function(t,r){return r.length<2?t:_r(t,Dr(r,0,-1))}(t,r=gr(r,t)))||delete t[jr(_u(r))]}function xo(t){return Cr(t)?void 0:t}var mo=Sr((function(t,r){var n={};if(null==t)return n;var e=!1;r=p(r,(function(r){return r=gr(r,t),e||(e=r.length>1),r})),bt(t,Hn(t),n),e&&(n=Ae(n,7,xo));for(var u=r.length;u--;)wo(n,r[u]);return n}));function Ao(t,r,n,e){if(!O(t))return t;for(var u=-1,o=(r=gr(r,t)).length,a=o-1,i=t;null!=i&&++u<o;){var c=jr(r[u]),f=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(u!=a){var l=i[c];void 0===(f=void 0)&&(f=O(l)?l:lt(r[u+1])?[]:{})}ht(i,c,f),i=i[c]}return t}function Eo(t,r,n){for(var e=-1,u=r.length,o={};++e<u;){var a=r[e],i=_r(t,a);n(i,a)&&Ao(o,gr(a,t),i)}return o}function So(t,r){if(null==t)return{};var n=p(Hn(t),(function(t){return[t]}));return r=Ke(r),Eo(t,n,(function(t,n){return r(t,n[0])}))}function zo(t,r){if(t!==r){var n=void 0!==t,e=null===t,u=t==t,o=v(t),a=void 0!==r,i=null===r,c=r==r,f=v(r);if(!i&&!f&&!o&&t>r||o&&a&&c&&!i&&!f||e&&a&&c||!n&&c||!u)return 1;if(!e&&!o&&!f&&t<r||f&&n&&u&&!e&&!o||i&&n&&u||!a&&u||!c)return-1}return 0}function Po(t,r,n){r=r.length?p(r,(function(t){return h(t)?function(r){return _r(r,1===t.length?t[0]:t)}:t})):[T];var e=-1;return r=p(r,Dt(Ke)),function(t,r){var n=t.length;for(t.sort(r);n--;)t[n]=t[n].value;return t}(Cu(t,(function(t,n,u){return{criteria:p(r,(function(r){return r(t)})),index:++e,value:t}})),(function(t,r){return function(t,r,n){for(var e=-1,u=t.criteria,o=r.criteria,a=u.length,i=n.length;++e<a;){var c=zo(u[e],o[e]);if(c)return e>=i?c:c*("desc"==n[e]?-1:1)}return t.index-r.index}(t,r,n)}))}var To=Sr((function(t,r){return null==t?{}:function(t,r){return Eo(t,r,(function(r,n){return qe(t,n)}))}(t,r)})),Uo=Math.ceil,Io=Math.max;var Mo=function(t,r,n){return n&&"number"!=typeof n&&Ot(t,r,n)&&(r=n=void 0),t=z(t),void 0===r?(r=t,t=0):r=z(r),function(t,r,n){for(var e=-1,u=Io(Uo((r-t)/(n||1)),0),o=Array(u);u--;)o[++e]=t,t+=n;return o}(t,r,n=void 0===n?t<r?1:-1:z(n))};function Co(t,r,n,e,u){return u(t,(function(t,u,o){n=e?(e=!1,t):r(n,t,u,o)})),n}function Do(t,r,n){var e=h(t)?Xr:Co,u=arguments.length<3;return e(t,Ke(r),n,u,nu)}function Ro(t,r){return(h(t)?Nn:zu)(t,function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var r=arguments;switch(r.length){case 0:return!t.call(this);case 1:return!t.call(this,r[0]);case 2:return!t.call(this,r[0],r[1]);case 3:return!t.call(this,r[0],r[1],r[2])}return!t.apply(this,r)}}(Ke(r)))}function Lo(t,r,n){return null==t?t:Ao(t,r,n)}function Fo(t,r){var n;return nu(t,(function(t,e,u){return!(n=r(t,e,u))})),!!n}function No(t,r,n){return(h(t)?Te:Fo)(t,Ke(r))}var $o=gt((function(t,r){if(null==t)return[];var n=r.length;return n>1&&Ot(t,r[0],r[1])?r=[]:n>2&&Ot(r[0],r[1],r[2])&&(r=[r[0]]),Po(t,Ar(r),[])}));function ko(t){return t&&t.length?function(t,r){for(var n,e=-1,u=t.length;++e<u;){var o=r(t[e]);void 0!==o&&(n=void 0===n?o:n+o)}return n}(t,T):0}function Bo(t,r,n){var e=!0,u=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return O(n)&&(e="leading"in n?!!n.leading:e,u="trailing"in n?!!n.trailing:u),iu(t,r,{leading:e,maxWait:r,trailing:u})}var Zo=Jn&&1/Ce(new Jn([,-0]))[1]==1/0?function(t){return new Jn(t)}:Y;function Wo(t,r,n){var e=-1,u=ct,o=t.length,a=!0,i=[],c=i;if(n)a=!1,u=yu;else if(o>=200){var f=r?null:Zo(t);if(f)return Ce(f);a=!1,u=Ue,c=new Pe}else c=r?[]:i;t:for(;++e<o;){var l=t[e],s=r?r(l):l;if(l=n||0!==l?l:0,a&&s==s){for(var v=c.length;v--;)if(c[v]===s)continue t;r&&c.push(s),i.push(l)}else u(c,s,n)||(c!==i&&c.push(s),i.push(l))}return i}var Vo=gt((function(t){return Wo(Ar(t,0,vu,!0))}));function Go(t){return t&&t.length?Wo(t):[]}function Ho(t,r){return t&&t.length?Wo(t,Ke(r)):[]}var Yo=0;function qo(t){var r=++Yo;return yr(t)+r}var Jo=Un((function(t,r,n){return t+(n?" ":"")+r.toUpperCase()}));var Ko=gt((function(t){var r=_u(t);return r="function"==typeof r?r:void 0,function(t,r,n){var e=t.length;if(e<2)return e?Wo(t[0]):[];for(var u=-1,o=Array(e);++u<e;)for(var a=t[u],i=-1;++i<e;)i!=u&&(o[u]=gu(o[u]||a,t[i],0,n));return Wo(Ar(o),r,n)}(Nn(t,vu),void 0,r)}));function Qo(t,r){return function(t,r,n){for(var e=-1,u=t.length,o=r.length,a={};++e<u;){var i=e<o?r[e]:void 0;n(a,t[e],i)}return a}(t||[],r||[],ht)}export{du as $,ju as A,Mu as B,Ee as C,T as D,Y as E,_u as F,wu as G,Ru as H,Bu as I,O as J,_o as K,Ho as L,K as M,Vo as N,Mo as O,qo as P,go as Q,Oo as R,Qo as S,$o as T,To as U,Se as V,jo as W,bo as X,Lu as Y,Fu as Z,pr as _,Jt as a,co as a0,oo as a1,In as a2,vo as a3,uo as a4,ho as a5,ro as a6,iu as a7,mo as a8,to as a9,Or as aa,ao as ab,io as ac,Lo as ad,Bo as ae,ko as af,Jo as ag,Ko as ah,Qr as ai,lo as b,Ju as c,Ou as d,Su as e,mu as f,Er as g,Iu as h,Hu as i,h as j,Gu as k,ze as l,Du as m,Yt as n,so as o,So as p,U as q,Ro as r,No as s,lu as t,Go as u,Yu as v,Ku as w,Do as x,eo as y,Pu as z};
|