github-actions[bot]
commited on
Commit
·
98aa88a
1
Parent(s):
d2ed2b7
Update from GitHub Actions
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .output/nitro.json +2 -2
- .output/public/assets/@babel-Cvfd6jjG.js +1 -0
- .output/public/assets/@braintree-vxCX0osh.js +1 -0
- .output/public/assets/@chevrotain-DMqKfIoR.js +84 -0
- .output/public/assets/@dicebear-Dldv2b64.js +0 -0
- .output/public/assets/@iconify-ol6u86He.js +12 -0
- .output/public/assets/@intlify-CtDSkVkn.js +135 -0
- .output/public/assets/@mermaid-js-CShQflH_.js +1 -0
- .output/public/assets/@mozilla-5yaQRYvZ.js +385 -0
- .output/public/assets/@popperjs-CRf0lzMe.js +28 -0
- .output/public/assets/@traptitech-B3kbI6Qt.js +1 -0
- .output/public/assets/@vue-D4KNhCYp.js +0 -0
- .output/public/assets/@vueuse-GpL_9d7-.js +3 -0
- .output/public/assets/@wdns-Bgg_AWFD.js +0 -0
- .output/public/assets/ChatInput.vue_vue_type_style_index_0_lang-YsHH5-3J.js +1 -0
- .output/public/assets/FrameContent-CKkluf0G.js +1 -0
- .output/public/assets/ToolBar.vue_vue_type_style_index_0_lang-CkN0N_Db.js +1 -0
- .output/public/assets/about-t2NQzCul.js +1 -0
- .output/public/assets/avatar.vue_vue_type_script_setup_true_lang-DlbJhpTb.js +1 -0
- .output/public/assets/bezier-easing-DvN6YyXp.js +1 -0
- .output/public/assets/changelog-B5ck2R4n.js +1 -0
- .output/public/assets/chat-PBdUl7xn.js +1 -0
- .output/public/assets/chevrotain-CHpUImcB.js +99 -0
- .output/public/assets/chevrotain-allstar-uapKNRlC.js +1 -0
- .output/public/assets/chroma-js-CAQMm5d7.js +79 -0
- .output/public/assets/content-CgNX0a7-.js +3 -0
- .output/public/assets/core-js-pure-rpEbRaqb.js +99 -0
- .output/public/assets/cose-base-Cjsls_Nj.js +46 -0
- .output/public/assets/cytoscape-D0Lf_MdX.js +0 -0
- .output/public/assets/cytoscape-cose-bilkent-CIWZ1EOj.js +74 -0
- .output/public/assets/cytoscape-fcose-C-UBqLtC.js +0 -0
- .output/public/assets/d3-DQzaeFuQ.js +1 -0
- .output/public/assets/d3-array-Dy1FNIg7.js +1 -0
- .output/public/assets/d3-axis-DxpTsFyd.js +1 -0
- .output/public/assets/d3-brush-nFNI3W3g.js +1 -0
- .output/public/assets/d3-color-rIUEC1ZR.js +5 -0
- .output/public/assets/d3-dispatch-Q6TpkW-B.js +1 -0
- .output/public/assets/d3-format-CtKB2kpq.js +1 -0
- .output/public/assets/d3-interpolate-DP-dmwpU.js +1 -0
- .output/public/assets/d3-sankey-BFhHcGrm.js +2 -0
- .output/public/assets/d3-scale-DWiW64kU.js +1 -0
- .output/public/assets/d3-selection-CfLXJeJu.js +1 -0
- .output/public/assets/d3-shape-zSUJvKTl.js +21 -0
- .output/public/assets/d3-time-BRbAhEAC.js +1 -0
- .output/public/assets/d3-time-format-BMc3Utpi.js +1 -0
- .output/public/assets/d3-timer-CJv_AqWU.js +1 -0
- .output/public/assets/d3-transition-B7gMhpAH.js +7 -0
- .output/public/assets/d3-zoom-BJNDRQ4C.js +1 -0
- .output/public/assets/dagre-d3-es-D6GBqVHj.js +11 -0
- .output/public/assets/dayjs-BlFCBw8z.js +2 -0
.output/nitro.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
{
|
2 |
-
"date": "2025-
|
3 |
"preset": "node-server",
|
4 |
"framework": {
|
5 |
"name": "nitro",
|
6 |
"version": ""
|
7 |
},
|
8 |
"versions": {
|
9 |
-
"nitro": "2.11.
|
10 |
},
|
11 |
"commands": {
|
12 |
"preview": "node ./server/index.mjs"
|
|
|
1 |
{
|
2 |
+
"date": "2025-07-02T02:08:08.411Z",
|
3 |
"preset": "node-server",
|
4 |
"framework": {
|
5 |
"name": "nitro",
|
6 |
"version": ""
|
7 |
},
|
8 |
"versions": {
|
9 |
+
"nitro": "2.11.13"
|
10 |
},
|
11 |
"commands": {
|
12 |
"preview": "node ./server/index.mjs"
|
.output/public/assets/@babel-Cvfd6jjG.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{r as t,a as n,b as r,c as e,d as a,e as o,f as s,g as c,h as l,i,j as u,k as f,l as p,m as v,n as y,o as b,p as d,q as h,s as g,t as m}from"./core-js-pure-rpEbRaqb.js";var w,j,O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function I(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var n=t.default;if("function"==typeof n){var r=function t(){return this instanceof t?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};r.prototype=n.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var e=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,e.get?e:{enumerable:!0,get:function(){return t[n]}})}),r}const P=_(j?w:(j=1,w=t()));function T(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var k,E;const M=_(E?k:(E=1,k=n()));var S,A;const q=_(A?S:(A=1,S=r()));var x,C;const D=_(C?x:(C=1,x=e()));var R,U;const $=_(U?R:(U=1,R=a()));function z(t,n){var r;if(t){if("string"==typeof t)return T(t,n);var e=$(r=Object.prototype.toString.call(t)).call(r,8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?D(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?T(t,n):void 0}}function B(t){return function(t){if(P(t))return T(t)}(t)||function(t){if(void 0!==M&&null!=q(t)||null!=t["@@iterator"])return D(t)}(t)||z(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}var G,H;const J=_(H?G:(H=1,G=o()));function K(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),J(t,e.key,e)}}function L(t,n,r){return n&&K(t.prototype,n),r&&K(t,r),J(t,"prototype",{writable:!1}),t}function N(t,n,r){return n in t?J(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var Q,V;const W=_(V?Q:(V=1,Q=s()));var X,Y;const Z=_(Y?X:(Y=1,X=c()));var tt,nt;const rt=_(nt?tt:(nt=1,tt=l()));var et,at;const ot=_(at?et:(at=1,et=i()));var st,ct;const lt=_(ct?st:(ct=1,st=u()));var it,ut;const ft=_(ut?it:(ut=1,it=f()));var pt,vt;const yt=_(vt?pt:(vt=1,pt=p()));var bt,dt;const ht=_(dt?bt:(dt=1,bt=v()));var gt,mt;const wt=_(mt?gt:(mt=1,gt=y()));var jt,Ot;const _t=_(Ot?jt:(Ot=1,jt=b()));var It,Pt;const Tt=_(Pt?It:(Pt=1,It=d()));var kt,Et;const Mt=_(Et?kt:(Et=1,kt=h()));var St,At;const qt=_(At?St:(At=1,St=g()));function xt(t,n){return function(t){if(P(t))return t}(t)||function(t,n){var r=null==t?null:void 0!==M&&q(t)||t["@@iterator"];if(null!=r){var e,a,o=[],s=!0,c=!1;try{for(r=r.call(t);!(s=(e=r.next()).done)&&(o.push(e.value),!n||o.length!==n);s=!0);}catch(l){c=!0,a=l}finally{try{s||null==r.return||r.return()}finally{if(c)throw a}}return o}}(t,n)||z(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Ct,Dt;const Rt=_(Dt?Ct:(Dt=1,Ct=m()));export{qt as M,L as _,I as a,Z as b,O as c,F as d,wt as e,B as f,_ as g,lt as h,rt as i,_t as j,xt as k,Tt as l,yt as m,Rt as n,W as o,ft as p,N as q,q as s,ot as u,ht as v,Mt as x};
|
.output/public/assets/@braintree-vxCX0osh.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){return e.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function c(e){try{return decodeURIComponent(e)}catch(t){return e}}return r.sanitizeUrl=function(e){if(!e)return i.BLANK_URL;var t,r=c(e.trim());do{t=(r=c(r=n(r).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||r.match(i.htmlEntitiesRegex)||r.match(i.htmlCtrlEntityRegex)||r.match(i.whitespaceEscapeCharsRegex)}while(t&&t.length>0);var a=r;if(!a)return i.BLANK_URL;if(function(e){return i.relativeFirstCharacters.indexOf(e[0])>-1}(a))return a;var l=a.trimStart(),o=l.match(i.urlSchemeRegex);if(!o)return a;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-DMqKfIoR.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-Cacf3aVv.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/@dicebear-Dldv2b64.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
.output/public/assets/@iconify-ol6u86He.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/@intlify-CtDSkVkn.js
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* shared v11.1.7
|
3 |
+
* (c) 2025 kazuya kawaguchi
|
4 |
+
* Released under the MIT License.
|
5 |
+
*/
|
6 |
+
const e="undefined"!=typeof window,t=(e,t=!1)=>t?Symbol.for(e):Symbol(e),n=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),r=e=>"number"==typeof e&&isFinite(e),o=e=>"[object RegExp]"===_(e),s=e=>v(e)&&0===Object.keys(e).length,c=Object.assign,a=Object.create,l=(e=null)=>a(e);let u;const i=()=>u||(u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:l());function f(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const d=Object.prototype.hasOwnProperty;function m(e,t){return d.call(e,t)}const p=Array.isArray,h=e=>"function"==typeof e,k=e=>"string"==typeof e,y=e=>"boolean"==typeof e,b=e=>null!==e&&"object"==typeof e,g=Object.prototype.toString,_=e=>g.call(e),v=e=>"[object Object]"===_(e);function L(e,t=""){return e.reduce((e,n,r)=>0===r?e+n:e+t+n,"")}function x(e,t){}const w=e=>!b(e)||p(e);function C(e,t){if(w(e)||w(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:e,des:t}=n.pop();Object.keys(e).forEach(r=>{"__proto__"!==r&&(b(e[r])&&!b(t[r])&&(t[r]=Array.isArray(e[r])?[]:l()),w(t[r])||w(e[r])?t[r]=e[r]:n.push({src:e[r],des:t[r]}))})}}
|
7 |
+
/*!
|
8 |
+
* message-compiler v11.1.7
|
9 |
+
* (c) 2025 kazuya kawaguchi
|
10 |
+
* Released under the MIT License.
|
11 |
+
*/function T(e,t,n){return{start:e,end:t}}const O=1,P=2,S=3,F=4,I=5,N=6,$=7,W=8,E=9,D=10,M=11,R=12,A=13,j=14;function z(e,t,n={}){const{domain:r,messages:o,args:s}=n,c=new SyntaxError(String(e));return c.code=e,t&&(c.location=t),c.domain=r,c}function H(e){throw e}const J=" ",K="\n",V=String.fromCharCode(8232),Y=String.fromCharCode(8233);function U(e){const t=e;let n=0,r=1,o=1,s=0;const c=e=>"\r"===t[e]&&t[e+1]===K,a=e=>t[e]===Y,l=e=>t[e]===V,u=e=>c(e)||(e=>t[e]===K)(e)||a(e)||l(e),i=e=>c(e)||a(e)||l(e)?K:t[e];function f(){return s=0,u(n)&&(r++,o=0),c(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>s,charAt:i,currentChar:()=>i(n),currentPeek:()=>i(n+s),next:f,peek:function(){return c(n+s)&&s++,s++,t[n+s]},reset:function(){n=0,r=1,o=1,s=0},resetPeek:function(e=0){s=e},skipToPeek:function(){const e=n+s;for(;e!==n;)f();s=0}}}const G=void 0;function Z(e,t={}){const n=!1!==t.location,r=U(e),o=()=>r.index(),s=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},c=s(),a=o(),l={currentType:13,offset:a,startLoc:c,endLoc:c,lastType:13,lastOffset:a,lastStartLoc:c,lastEndLoc:c,braceNest:0,inLinked:!1,text:""},u=()=>l,{onError:i}=t;function f(e,t,r,...o){const s=u();if(t.column+=r,t.offset+=r,i){const r=z(e,n?T(s.startLoc,t):null,{domain:"tokenizer",args:o});i(r)}}function d(e,t,r){e.endLoc=s(),e.currentType=t;const o={type:t};return n&&(o.loc=T(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const m=e=>d(e,13
|
12 |
+
/* TokenTypes.EOF */);function p(e,t){return e.currentChar()===t?(e.next(),t):(f(O,s(),0,t),"")}function h(e){let t="";for(;e.currentPeek()===J||e.currentPeek()===K;)t+=e.currentPeek(),e.peek();return t}function k(e){const t=h(e);return e.skipToPeek(),t}function y(e){if(e===G)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||// a-z
|
13 |
+
t>=65&&t<=90||// A-Z
|
14 |
+
95===t}function b(e,t){const{currentType:n}=t;if(2!==n)return!1;h(e);const r=function(e){if(e===G)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function g(e){h(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function _(e,t=!0){const n=(t=!1,r="")=>{const o=e.currentPeek();return"{"===o?t:"@"!==o&&o?"|"===o?!(r===J||r===K):o===J?(e.peek(),n(!0,J)):o!==K||(e.peek(),n(!0,K)):t},r=n();return t&&e.resetPeek(),r}function v(e,t){const n=e.currentChar();return n===G?G:t(n)?(e.next(),n):null}function L(e){const t=e.charCodeAt(0);return t>=97&&t<=122||// a-z
|
15 |
+
t>=65&&t<=90||// A-Z
|
16 |
+
t>=48&&t<=57||// 0-9
|
17 |
+
95===t||// _
|
18 |
+
36===t}function x(e){return v(e,L)}function w(e){const t=e.charCodeAt(0);return t>=97&&t<=122||// a-z
|
19 |
+
t>=65&&t<=90||// A-Z
|
20 |
+
t>=48&&t<=57||// 0-9
|
21 |
+
95===t||// _
|
22 |
+
36===t||// $
|
23 |
+
45===t}function C(e){return v(e,w)}function M(e){const t=e.charCodeAt(0);return t>=48&&t<=57}function R(e){return v(e,M)}function A(e){const t=e.charCodeAt(0);return t>=48&&t<=57||// 0-9
|
24 |
+
t>=65&&t<=70||// A-F
|
25 |
+
t>=97&&t<=102}function j(e){return v(e,A)}function H(e){let t="",n="";for(;t=R(e);)n+=t;return n}function V(e){return"'"!==e&&e!==K}function Y(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return Z(e,t,4);case"U":return Z(e,t,6);default:return f(F,s(),0,t),""}}function Z(e,t,n){p(e,t);let r="";for(let o=0;o<n;o++){const n=j(e);if(!n){f(I,s(),0,`\\${t}${r}${e.currentChar()}`);break}r+=n}return`\\${t}${r}`}function q(e){return"{"!==e&&"}"!==e&&e!==J&&e!==K}function B(e){k(e);const t=p(e,"|"
|
26 |
+
/* TokenChars.Pipe */);return k(e),t}function Q(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&f(E,s(),0),e.next(),n=d(t,2,"{"
|
27 |
+
/* TokenChars.BraceLeft */),k(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&f(W,s(),0),e.next(),n=d(t,3,"}"
|
28 |
+
/* TokenChars.BraceRight */),t.braceNest--,t.braceNest>0&&k(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&f($,s(),0),n=X(e,t)||m(t),t.braceNest=0,n;default:{let r=!0,o=!0,c=!0;if(g(e))return t.braceNest>0&&f($,s(),0),n=d(t,1,B(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(4===t.currentType||5===t.currentType||6===t.currentType))return f($,s(),0),t.braceNest=0,ee(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;h(e);const r=y(e.currentPeek());return e.resetPeek(),r}(e,t))return n=d(t,4,function(e){k(e);let t="",n="";for(;t=C(e);)n+=t;return e.currentChar()===G&&f($,s(),0),n}(e)),k(e),n;if(o=b(e,t))return n=d(t,5,function(e){k(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${H(e)}`):t+=H(e),e.currentChar()===G&&f($,s(),0),t}(e)),k(e),n;if(c=function(e,t){const{currentType:n}=t;if(2!==n)return!1;h(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=d(t,6,function(e){k(e),p(e,"'");let t="",n="";for(;t=v(e,V);)n+="\\"===t?Y(e):t;const r=e.currentChar();return r===K||r===G?(f(S,s(),0),r===K&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),k(e),n;if(!r&&!o&&!c)return n=d(t,12,function(e){k(e);let t="",n="";for(;t=v(e,q);)n+=t;return n}(e)),f(P,s(),0,n.value),k(e),n;break}}return n}function X(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(7!==n&&8!==n&&11!==n&&9!==n||o!==K&&o!==J||f(D,s(),0),o){case"@":return e.next(),r=d(t,7,"@"
|
29 |
+
/* TokenChars.LinkedAlias */),t.inLinked=!0,r;case".":return k(e),e.next(),d(t,8,"."
|
30 |
+
/* TokenChars.LinkedDot */);case":":return k(e),e.next(),d(t,9,":"
|
31 |
+
/* TokenChars.LinkedDelimiter */);default:return g(e)?(r=d(t,1,B(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(7!==n)return!1;h(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(7!==n&&11!==n)return!1;h(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(k(e),X(e,t)):function(e,t){const{currentType:n}=t;if(8!==n)return!1;h(e);const r=y(e.currentPeek());return e.resetPeek(),r}(e,t)?(k(e),d(t,11,function(e){let t="",n="";for(;t=x(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(9!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?y(e.peek()):!("@"===t||"|"===t||":"===t||"."===t||t===J||!t)&&(t===K?(e.peek(),r()):_(e,!1))},o=r();return e.resetPeek(),o}(e,t)?(k(e),"{"===o?Q(e,t)||r:d(t,10,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"@"!==r&&"|"!==r&&"("!==r&&")"!==r&&r?r===J?n:(n+=r,e.next(),t(n)):n};return t("")}(e))):(7===n&&f(D,s(),0),t.braceNest=0,t.inLinked=!1,ee(e,t))}}function ee(e,t){let n={type:13
|
32 |
+
/* TokenTypes.EOF */};if(t.braceNest>0)return Q(e,t)||m(t);if(t.inLinked)return X(e,t)||m(t);switch(e.currentChar()){case"{":return Q(e,t)||m(t);case"}":return f(N,s(),0),e.next(),d(t,3,"}"
|
33 |
+
/* TokenChars.BraceRight */);case"@":return X(e,t)||m(t);default:if(g(e))return n=d(t,1,B(e)),t.braceNest=0,t.inLinked=!1,n;if(_(e))return d(t,0,function(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if(n===J||n===K)if(_(e))t+=n,e.next();else{if(g(e))break;t+=n,e.next()}else t+=n,e.next()}return t}(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:c}=l;return l.lastType=e,l.lastOffset=t,l.lastStartLoc=n,l.lastEndLoc=c,l.offset=o(),l.startLoc=s(),r.currentChar()===G?d(l,13
|
34 |
+
/* TokenTypes.EOF */):ee(r,l)},currentOffset:o,currentPosition:s,context:u}}const q=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function B(e,t,n){switch(e){case"\\\\":return"\\";
|
35 |
+
// eslint-disable-next-line no-useless-escape
|
36 |
+
case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function Q(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,r,o,s,...c){const a=e.currentPosition();if(a.offset+=s,a.column+=s,n){const e=z(r,t?T(o,a):null,{domain:"parser",args:c});n(e)}}function o(e,n,r){const o={type:e};return t&&(o.start=n,o.end=n,o.loc={start:r,end:r}),o}function s(e,n,r,o){t&&(e.end=n,e.loc&&(e.loc.end=r))}function a(e,t){const n=e.context(),r=o(3,n.offset,n.startLoc);return r.value=t,s(r,e.currentOffset(),e.currentPosition()),r}function l(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:c}=n,a=o(5,r,c);return a.index=parseInt(t,10),e.nextToken(),s(a,e.currentOffset(),e.currentPosition()),a}function u(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:c}=n,a=o(4,r,c);return a.key=t,e.nextToken(),s(a,e.currentOffset(),e.currentPosition()),a}function i(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:c}=n,a=o(9,r,c);return a.value=t.replace(q,B),e.nextToken(),s(a,e.currentOffset(),e.currentPosition()),a}function f(e){const t=e.context(),n=o(6,t.offset,t.startLoc);let c=e.nextToken();if(8===c.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:c,lastStartLoc:a}=n,l=o(8,c,a);return 11!==t.type?(r(e,R,n.lastStartLoc,0),l.value="",s(l,c,a),{nextConsumeToken:t,node:l}):(null==t.value&&r(e,j,n.lastStartLoc,0,X(t)),l.value=t.value||"",s(l,e.currentOffset(),e.currentPosition()),{node:l})}(e);n.modifier=t.node,c=t.nextConsumeToken||e.nextToken()}switch(9!==c.type&&r(e,j,t.lastStartLoc,0,X(c)),c=e.nextToken(),2===c.type&&(c=e.nextToken()),c.type){case 10:null==c.value&&r(e,j,t.lastStartLoc,0,X(c)),n.key=function(e,t){const n=e.context(),r=o(7,n.offset,n.startLoc);return r.value=t,s(r,e.currentOffset(),e.currentPosition()),r}(e,c.value||"");break;case 4:null==c.value&&r(e,j,t.lastStartLoc,0,X(c)),n.key=u(e,c.value||"");break;case 5:null==c.value&&r(e,j,t.lastStartLoc,0,X(c)),n.key=l(e,c.value||"");break;case 6:null==c.value&&r(e,j,t.lastStartLoc,0,X(c)),n.key=i(e,c.value||"");break;default:{r(e,A,t.lastStartLoc,0);const a=e.context(),l=o(7,a.offset,a.startLoc);return l.value="",s(l,a.offset,a.startLoc),n.key=l,s(n,a.offset,a.startLoc),{nextConsumeToken:c,node:n}}}return s(n,e.currentOffset(),e.currentPosition()),{node:n}}function d(e){const t=e.context(),n=o(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let c=null;do{const o=c||e.nextToken();switch(c=null,o.type){case 0:null==o.value&&r(e,j,t.lastStartLoc,0,X(o)),n.items.push(a(e,o.value||""));break;case 5:null==o.value&&r(e,j,t.lastStartLoc,0,X(o)),n.items.push(l(e,o.value||""));break;case 4:null==o.value&&r(e,j,t.lastStartLoc,0,X(o)),n.items.push(u(e,o.value||""));break;case 6:null==o.value&&r(e,j,t.lastStartLoc,0,X(o)),n.items.push(i(e,o.value||""));break;case 7:{const t=f(e);n.items.push(t.node),c=t.nextConsumeToken||null;break}}}while(13!==t.currentType&&1!==t.currentType);return s(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function m(e){const t=e.context(),{offset:n,startLoc:c}=t,a=d(e);return 13===t.currentType?a:function(e,t,n,c){const a=e.context();let l=0===c.items.length;const u=o(1,t,n);u.cases=[],u.cases.push(c);do{const t=d(e);l||(l=0===t.items.length),u.cases.push(t)}while(13!==a.currentType);return l&&r(e,M,n,0),s(u,e.currentOffset(),e.currentPosition()),u}(e,n,c,a)}return{parse:function(n){const a=Z(n,c({},e)),l=a.context(),u=o(0,l.offset,l.startLoc);return t&&u.loc&&(u.loc.source=n),u.body=m(a),e.onCacheKey&&(u.cacheKey=e.onCacheKey(n)),13!==l.currentType&&r(a,j,l.lastStartLoc,0,n[l.offset]||""),s(u,a.currentOffset(),a.currentPosition()),u}}}function X(e){if(13===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function ee(e,t){for(let n=0;n<e.length;n++)te(e[n],t)}function te(e,t){switch(e.type){case 1:ee(e.cases,t),t.helper("plural"
|
37 |
+
/* HelperNameMap.PLURAL */);break;case 2:ee(e.items,t);break;case 6:te(e.key,t),t.helper("linked"
|
38 |
+
/* HelperNameMap.LINKED */),t.helper("type"
|
39 |
+
/* HelperNameMap.TYPE */);break;case 5:t.helper("interpolate"
|
40 |
+
/* HelperNameMap.INTERPOLATE */),t.helper("list"
|
41 |
+
/* HelperNameMap.LIST */);break;case 4:t.helper("interpolate"
|
42 |
+
/* HelperNameMap.INTERPOLATE */),t.helper("named"
|
43 |
+
/* HelperNameMap.NAMED */)}}function ne(e,t={}){const n=function(e){const t={ast:e,helpers:new Set};return{context:()=>t,helper:e=>(t.helpers.add(e),e)}}(e);n.helper("normalize"
|
44 |
+
/* HelperNameMap.NORMALIZE */),e.body&&te(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function re(e){if(1===e.items.length){const t=e.items[0];3!==t.type&&9!==t.type||(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const r=e.items[n];if(3!==r.type&&9!==r.type)break;if(null==r.value)break;t.push(r.value)}if(t.length===e.items.length){e.static=L(t);for(let t=0;t<e.items.length;t++){const n=e.items[t];3!==n.type&&9!==n.type||delete n.value}}}}function oe(e){switch(e.t=e.type,e.type){case 0:{const t=e;oe(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let e=0;e<n.length;e++)oe(n[e]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let e=0;e<n.length;e++)oe(n[e]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;oe(t.key),t.k=t.key,delete t.key,t.modifier&&(oe(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function se(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?se(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural"
|
45 |
+
/* HelperNameMap.PLURAL */)}([`),e.indent(r());const o=t.cases.length;for(let n=0;n<o&&(se(e,t.cases[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}(e,t);break;case 2:!function(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize"
|
46 |
+
/* HelperNameMap.NORMALIZE */)}([`),e.indent(r());const o=t.items.length;for(let s=0;s<o&&(se(e,t.items[s]),s!==o-1);s++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked"
|
47 |
+
/* HelperNameMap.LINKED */)}(`),se(e,t.key),t.modifier?(e.push(", "),se(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate"
|
48 |
+
/* HelperNameMap.INTERPOLATE */)}(${n("list"
|
49 |
+
/* HelperNameMap.LIST */)}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate"
|
50 |
+
/* HelperNameMap.INTERPOLATE */)}(${n("named"
|
51 |
+
/* HelperNameMap.NAMED */)}(${JSON.stringify(t.key)}))`,t)}}function ce(e,t={}){const n=c({},t),r=!!n.jit,o=!!n.minify,s=null==n.optimize||n.optimize,a=Q(n).parse(e);return r?(s&&function(e){const t=e.body;2===t.type?re(t):t.cases.forEach(e=>re(e))}(a),o&&oe(a),{ast:a,code:""}):(ne(a,n),((e,t={})=>{const n=k(t.mode)?t.mode:"normal",r=k(t.filename)?t.filename:"message.intl";t.sourceMap;const o=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",s=t.needIndent?t.needIndent:"arrow"!==n,c=e.helpers||[],a=function(e,t){const{filename:n,breakLineCode:r,needIndent:o}=t,s=!1!==t.location,c={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};function a(e,t){c.code+=e}function l(e,t=!0){const n=t?r:"";a(o?n+" ".repeat(e):n)}return s&&e.loc&&(c.source=e.loc.source),{context:()=>c,push:a,indent:function(e=!0){const t=++c.indentLevel;e&&l(t)},deindent:function(e=!0){const t=--c.indentLevel;e&&l(t)},newline:function(){l(c.indentLevel)},helper:e=>`_${e}`,needIndent:()=>c.needIndent}}(e,{filename:r,breakLineCode:o,needIndent:s});a.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(s),c.length>0&&(a.push(`const { ${L(c.map(e=>`${e}: _${e}`),", ")} } = ctx`),a.newline()),a.push("return "),se(a,e),a.deindent(s),a.push("}"),delete e.helpers;const{code:l,map:u}=a.context();return{ast:e,code:l,map:u?u.toJSON():void 0}})(a,n))}
|
52 |
+
/*!
|
53 |
+
* core-base v11.1.7
|
54 |
+
* (c) 2025 kazuya kawaguchi
|
55 |
+
* Released under the MIT License.
|
56 |
+
*/function ae(e){return b(e)&&0===me(e)&&(m(e,"b")||m(e,"body"))}const le=["b","body"];const ue=["c","cases"];const ie=["s","static"];const fe=["i","items"];const de=["t","type"];function me(e){return be(e,de)}const pe=["v","value"];function he(e,t){const n=be(e,pe);if(null!=n)return n;throw _e(t)}const ke=["m","modifier"];const ye=["k","key"];function be(e,t,n){for(let r=0;r<t.length;r++){const n=t[r];if(m(e,n)&&null!=e[n])return e[n]}return n}const ge=[...le,...ue,...ie,...fe,...ye,...ke,...pe,...de];function _e(e){return new Error(`unhandled node type: ${e}`)}function ve(e){return t=>function(e,t){const n=(r=t,be(r,le));var r;if(null==n)throw _e(0
|
57 |
+
/* NodeTypes.Resource */);if(1===me(n)){const t=function(e){return be(e,ue,[])}(n);return e.plural(t.reduce((t,n)=>[...t,Le(e,n)],[]))}return Le(e,n)}(t,e)}function Le(e,t){const n=function(e){return be(e,ie)}(t);if(null!=n)return"text"===e.type?n:e.normalize([n]);{const n=function(e){return be(e,fe,[])}(t).reduce((t,n)=>[...t,xe(e,n)],[]);return e.normalize(n)}}function xe(e,t){const n=me(t);switch(n){case 3:case 9:case 7:case 8:return he(t,n);case 4:{const r=t;if(m(r,"k")&&r.k)return e.interpolate(e.named(r.k));if(m(r,"key")&&r.key)return e.interpolate(e.named(r.key));throw _e(n)}case 5:{const o=t;if(m(o,"i")&&r(o.i))return e.interpolate(e.list(o.i));if(m(o,"index")&&r(o.index))return e.interpolate(e.list(o.index));throw _e(n)}case 6:{const n=t,r=function(e){return be(e,ke)}(n),o=function(e){const t=be(e,ye);if(t)return t;throw _e(6
|
58 |
+
/* NodeTypes.Linked */)}(n);return e.linked(xe(e,o),r?xe(e,r):void 0,e.type)}default:throw new Error(`unhandled node on format message part: ${n}`)}}const we=e=>e;let Ce=l();
|
59 |
+
// @__NO_SIDE_EFFECTS__
|
60 |
+
function Te(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&k(e)){!y(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||we)(e),r=Ce[n];if(r)return r;const{ast:o,detectError:s}=function(e,t={}){let n=!1;const r=t.onError||H;return t.onError=e=>{n=!0,r(e)},{...ce(e,t),detectError:n}}(e,{...t,location:!1,jit:!0}),c=ve(o);return s?c:Ce[n]=c}{const t=e.cacheKey;if(t){const n=Ce[t];return n||(Ce[t]=ve(e))}return ve(e)}}let Oe=null;function Pe(e){Oe=e}const Se=Fe("function:translate");function Fe(e){return t=>Oe&&Oe.emit(e,t)}const Ie=17,Ne=18,$e=19,We=21,Ee=22,De=23,Me=24;function Re(e){return z(e,null,void 0)}function Ae(e,t){return null!=t.locale?ze(t.locale):ze(e.locale)}let je;function ze(e){if(k(e))return e;if(h(e)){if(e.resolvedOnce&&null!=je)return je;if("Function"===e.constructor.name){const n=e();if(b(t=n)&&h(t.then)&&h(t.catch))throw Re(We);return je=n}throw Re(Ee)}throw Re(De);var t}function He(e,t,n){return[...new Set([n,...p(t)?t:b(t)?Object.keys(t):k(t)?[t]:[n]])]}function Je(e,t,n){const r=k(n)?n:tt,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let s=o.__localeChainCache.get(r);if(!s){s=[];let e=[n];for(;p(e);)e=Ke(s,e,t);const c=p(t)||!v(t)?t:t.default?t.default:null;e=k(c)?[c]:c,p(e)&&Ke(s,e,!1),o.__localeChainCache.set(r,s)}return s}function Ke(e,t,n){let r=!0;for(let o=0;o<t.length&&y(r);o++){const s=t[o];k(s)&&(r=Ve(e,t[o],n))}return r}function Ve(e,t,n){let r;const o=t.split("-");do{r=Ye(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function Ye(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const o=t.replace(/!/g,"");e.push(o),(p(n)||v(n))&&n[o]&&(r=n[o])}return r}const Ue=[];Ue[0
|
61 |
+
/* States.BEFORE_PATH */]={w:[0
|
62 |
+
/* States.BEFORE_PATH */],i:[3,0
|
63 |
+
/* Actions.APPEND */],"[":[4
|
64 |
+
/* States.IN_SUB_PATH */],o:[7
|
65 |
+
/* States.AFTER_PATH */]},Ue[1
|
66 |
+
/* States.IN_PATH */]={w:[1
|
67 |
+
/* States.IN_PATH */],".":[2
|
68 |
+
/* States.BEFORE_IDENT */],"[":[4
|
69 |
+
/* States.IN_SUB_PATH */],o:[7
|
70 |
+
/* States.AFTER_PATH */]},Ue[2
|
71 |
+
/* States.BEFORE_IDENT */]={w:[2
|
72 |
+
/* States.BEFORE_IDENT */],i:[3,0
|
73 |
+
/* Actions.APPEND */],0:[3,0
|
74 |
+
/* Actions.APPEND */]},Ue[3
|
75 |
+
/* States.IN_IDENT */]={i:[3,0
|
76 |
+
/* Actions.APPEND */],0:[3,0
|
77 |
+
/* Actions.APPEND */],w:[1,1
|
78 |
+
/* Actions.PUSH */],".":[2,1
|
79 |
+
/* Actions.PUSH */],"[":[4,1
|
80 |
+
/* Actions.PUSH */],o:[7,1
|
81 |
+
/* Actions.PUSH */]},Ue[4
|
82 |
+
/* States.IN_SUB_PATH */]={"'":[5,0
|
83 |
+
/* Actions.APPEND */],'"':[6,0
|
84 |
+
/* Actions.APPEND */],"[":[4,2
|
85 |
+
/* Actions.INC_SUB_PATH_DEPTH */],"]":[1,3
|
86 |
+
/* Actions.PUSH_SUB_PATH */],o:8,l:[4,0
|
87 |
+
/* Actions.APPEND */]},Ue[5
|
88 |
+
/* States.IN_SINGLE_QUOTE */]={"'":[4,0
|
89 |
+
/* Actions.APPEND */],o:8,l:[5,0
|
90 |
+
/* Actions.APPEND */]},Ue[6
|
91 |
+
/* States.IN_DOUBLE_QUOTE */]={'"':[4,0
|
92 |
+
/* Actions.APPEND */],o:8,l:[6,0
|
93 |
+
/* Actions.APPEND */]};const Ge=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Ze(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:
|
94 |
+
// [
|
95 |
+
case 93:
|
96 |
+
// ]
|
97 |
+
case 46:
|
98 |
+
// .
|
99 |
+
case 34:
|
100 |
+
// "
|
101 |
+
case 39:return e;case 95:
|
102 |
+
// _
|
103 |
+
case 36:
|
104 |
+
// $
|
105 |
+
case 45:return"i";case 9:
|
106 |
+
// Tab (HT)
|
107 |
+
case 10:
|
108 |
+
// Newline (LF)
|
109 |
+
case 13:
|
110 |
+
// Return (CR)
|
111 |
+
case 160:
|
112 |
+
// No-break space (NBSP)
|
113 |
+
case 65279:
|
114 |
+
// Byte Order Mark (BOM)
|
115 |
+
case 8232:
|
116 |
+
// Line Separator (LS)
|
117 |
+
case 8233:return"w"}return"i"}function qe(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,Ge.test(n)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t);var n}const Be=new Map;function Qe(e,t){return b(e)?e[t]:null}function Xe(e,t){if(!b(e))return null;let n=Be.get(t);if(n||(n=function(e){const t=[];let n,r,o,s,c,a,l,u=-1,i=0,f=0;const d=[];function m(){const t=e[u+1];if(5===i&&"'"===t||6===i&&'"'===t)return u++,o="\\"+t,d[0
|
118 |
+
/* Actions.APPEND */](),!0}for(d[0
|
119 |
+
/* Actions.APPEND */]=()=>{void 0===r?r=o:r+=o},d[1
|
120 |
+
/* Actions.PUSH */]=()=>{void 0!==r&&(t.push(r),r=void 0)},d[2
|
121 |
+
/* Actions.INC_SUB_PATH_DEPTH */]=()=>{d[0
|
122 |
+
/* Actions.APPEND */](),f++},d[3
|
123 |
+
/* Actions.PUSH_SUB_PATH */]=()=>{if(f>0)f--,i=4,d[0
|
124 |
+
/* Actions.APPEND */]();else{if(f=0,void 0===r)return!1;if(r=qe(r),!1===r)return!1;d[1
|
125 |
+
/* Actions.PUSH */]()}};null!==i;)if(u++,n=e[u],"\\"!==n||!m()){if(s=Ze(n),l=Ue[i],c=l[s]||l.l||8,8===c)return;if(i=c[0],void 0!==c[1]&&(a=d[c[1]],a&&(o=n,!1===a())))return;if(7===i)return t}}(t),n&&Be.set(t,n)),!n)return null;const r=n.length;let o=e,s=0;for(;s<r;){const e=n[s];if(ge.includes(e)&&ae(o))return null;const t=o[e];if(void 0===t)return null;if(h(o))return null;o=t,s++}return o}const et=-1,tt="en-US",nt="",rt=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let ot,st,ct;function at(e){ot=e}function lt(e){st=e}function ut(e){ct=e}let it=null;const ft=/* @__NO_SIDE_EFFECTS__ */e=>{it=e},dt=/* @__NO_SIDE_EFFECTS__ */()=>it;let mt=null;const pt=e=>{mt=e},ht=()=>mt;let kt=0;function yt(e={}){const t=h(e.onWarn)?e.onWarn:x,n=k(e.version)?e.version:"11.1.7",r=k(e.locale)||h(e.locale)?e.locale:tt,s=h(r)?tt:r,a=p(e.fallbackLocale)||v(e.fallbackLocale)||k(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:s,u=v(e.messages)?e.messages:bt(s),i=v(e.datetimeFormats)?e.datetimeFormats:bt(s),f=v(e.numberFormats)?e.numberFormats:bt(s),d=c(l(),e.modifiers,{upper:(e,t)=>"text"===t&&k(e)?e.toUpperCase():"vnode"===t&&b(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&k(e)?e.toLowerCase():"vnode"===t&&b(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&k(e)?rt(e):"vnode"===t&&b(e)&&"__v_isVNode"in e?rt(e.children):e}),m=e.pluralRules||l(),g=h(e.missing)?e.missing:null,_=!y(e.missingWarn)&&!o(e.missingWarn)||e.missingWarn,L=!y(e.fallbackWarn)&&!o(e.fallbackWarn)||e.fallbackWarn,w=!!e.fallbackFormat,C=!!e.unresolving,T=h(e.postTranslation)?e.postTranslation:null,O=v(e.processor)?e.processor:null,P=!y(e.warnHtmlMessage)||e.warnHtmlMessage,S=!!e.escapeParameter,F=h(e.messageCompiler)?e.messageCompiler:ot,I=h(e.messageResolver)?e.messageResolver:st||Qe,N=h(e.localeFallbacker)?e.localeFallbacker:ct||He,$=b(e.fallbackContext)?e.fallbackContext:void 0,W=e,E=b(W.__datetimeFormatters)?W.__datetimeFormatters:new Map,D=b(W.__numberFormatters)?W.__numberFormatters:new Map,M=b(W.__meta)?W.__meta:{};kt++;const R={version:n,cid:kt,locale:r,fallbackLocale:a,messages:u,modifiers:d,pluralRules:m,missing:g,missingWarn:_,fallbackWarn:L,fallbackFormat:w,unresolving:C,postTranslation:T,processor:O,warnHtmlMessage:P,escapeParameter:S,messageCompiler:F,messageResolver:I,localeFallbacker:N,fallbackContext:$,onWarn:t,__meta:M};return R.datetimeFormats=i,R.numberFormats=f,R.__datetimeFormatters=E,R.__numberFormatters=D,__INTLIFY_PROD_DEVTOOLS__&&function(e,t,n){Oe&&Oe.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}(R,n,M),R}const bt=e=>({[e]:l()});function gt(e,t,n,r,o){const{missing:s,onWarn:c}=e;if(null!==s){const r=s(e,n,t,o);return k(r)?r:t}return t}function _t(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function vt(e,t){return e!==t&&e.split("-")[0]===t.split("-")[0]}function Lt(e,t){const n=t.indexOf(e);if(-1===n)return!1;for(let r=n+1;r<t.length;r++)if(vt(e,t[r]))return!0;return!1}function xt(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:l}=e,{__datetimeFormatters:u}=e,[i,f,d,m]=Ct(...t);y(d.missingWarn)?d.missingWarn:e.missingWarn;y(d.fallbackWarn)?d.fallbackWarn:e.fallbackWarn;const p=!!d.part,h=Ae(e,d),b=l(e,
|
126 |
+
// eslint-disable-line @typescript-eslint/no-explicit-any
|
127 |
+
o,h);if(!k(i)||""===i)return new Intl.DateTimeFormat(h,m).format(f);let g,_={},L=null;for(let s=0;s<b.length&&(g=b[s],_=n[g]||{},L=_[i],!v(L));s++)gt(e,i,g,0,"datetime format");if(!v(L)||!k(g))return r?-1:i;let x=`${g}__${i}`;s(m)||(x=`${x}__${JSON.stringify(m)}`);let w=u.get(x);return w||(w=new Intl.DateTimeFormat(g,c({},L,m)),u.set(x,w)),p?w.formatToParts(f):w.format(f)}const wt=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Ct(...e){const[t,n,o,s]=e,c=l();let a,u=l();if(k(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Re($e);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();a=new Date(n);try{a.toISOString()}catch{throw Re($e)}}else if("[object Date]"===_(t)){if(isNaN(t.getTime()))throw Re(Ne);a=t}else{if(!r(t))throw Re(Ie);a=t}return k(n)?c.key=n:v(n)&&Object.keys(n).forEach(e=>{wt.includes(e)?u[e]=n[e]:c[e]=n[e]}),k(o)?c.locale=o:v(o)&&(u=o),v(s)&&(u=s),[c.key||"",a,c,u]}function Tt(e,t,n){const r=e;for(const o in n){const e=`${t}__${o}`;r.__datetimeFormatters.has(e)&&r.__datetimeFormatters.delete(e)}}function Ot(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:l}=e,{__numberFormatters:u}=e,[i,f,d,m]=St(...t);y(d.missingWarn)?d.missingWarn:e.missingWarn;y(d.fallbackWarn)?d.fallbackWarn:e.fallbackWarn;const p=!!d.part,h=Ae(e,d),b=l(e,
|
128 |
+
// eslint-disable-line @typescript-eslint/no-explicit-any
|
129 |
+
o,h);if(!k(i)||""===i)return new Intl.NumberFormat(h,m).format(f);let g,_={},L=null;for(let s=0;s<b.length&&(g=b[s],_=n[g]||{},L=_[i],!v(L));s++)gt(e,i,g,0,"number format");if(!v(L)||!k(g))return r?-1:i;let x=`${g}__${i}`;s(m)||(x=`${x}__${JSON.stringify(m)}`);let w=u.get(x);return w||(w=new Intl.NumberFormat(g,c({},L,m)),u.set(x,w)),p?w.formatToParts(f):w.format(f)}const Pt=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function St(...e){const[t,n,o,s]=e,c=l();let a=l();if(!r(t))throw Re(Ie);const u=t;return k(n)?c.key=n:v(n)&&Object.keys(n).forEach(e=>{Pt.includes(e)?a[e]=n[e]:c[e]=n[e]}),k(o)?c.locale=o:v(o)&&(a=o),v(s)&&(a=s),[c.key||"",u,c,a]}function Ft(e,t,n){const r=e;for(const o in n){const e=`${t}__${o}`;r.__numberFormatters.has(e)&&r.__numberFormatters.delete(e)}}const It=e=>e,Nt=e=>"",$t=e=>0===e.length?"":L(e),Wt=e=>null==e?"":p(e)||v(e)&&e.toString===g?JSON.stringify(e,null,2):String(e);function Et(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function Dt(e={}){const t=e.locale,n=function(e){const t=r(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(r(e.named.count)||r(e.named.n))?r(e.named.count)?e.named.count:r(e.named.n)?e.named.n:t:t}(e),o=b(e.pluralRules)&&k(t)&&h(e.pluralRules[t])?e.pluralRules[t]:Et,s=b(e.pluralRules)&&k(t)&&h(e.pluralRules[t])?Et:void 0,a=e.list||[],u=e.named||l();r(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,u);function i(t,n){const r=h(e.messages)?e.messages(t,!!n):!!b(e.messages)&&e.messages[t];return r||(e.parent?e.parent.message(t):Nt)}const f=v(e.processor)&&h(e.processor.normalize)?e.processor.normalize:$t,d=v(e.processor)&&h(e.processor.interpolate)?e.processor.interpolate:Wt,m={list:e=>a[e],named:e=>u[e],plural:e=>e[o(n,e.length,s)],linked:(t,...n)=>{const[r,o]=n;let s="text",c="";1===n.length?b(r)?(c=r.modifier||c,s=r.type||s):k(r)&&(c=r||c):2===n.length&&(k(r)&&(c=r||c),k(o)&&(s=o||s));const a=i(t,!0)(m),l=
|
130 |
+
// The message in vnode resolved with linked are returned as an array by processor.nomalize
|
131 |
+
"vnode"===s&&p(a)&&c?a[0]:a;return c?(u=c,e.modifiers?e.modifiers[u]:It)(l,s):l;var u},message:i,type:v(e.processor)&&k(e.processor.type)?e.processor.type:"text",interpolate:d,normalize:f,values:c(l(),a,u)};return m}const Mt=()=>"",Rt=e=>h(e);function At(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:s,messageCompiler:a,fallbackLocale:u,messages:i}=e,[d,m]=Ht(...t),g=y(m.missingWarn)?m.missingWarn:e.missingWarn,_=y(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn,v=y(m.escapeParameter)?m.escapeParameter:e.escapeParameter,L=!!m.resolvedMessage,x=k(m.default)||y(m.default)?y(m.default)?a?d:()=>d:m.default:n?a?d:()=>d:null,w=n||null!=x&&(k(x)||h(x)),C=Ae(e,m);v&&function(e){p(e.list)?e.list=e.list.map(e=>k(e)?f(e):e):b(e.named)&&Object.keys(e.named).forEach(t=>{k(e.named[t])&&(e.named[t]=f(e.named[t]))})}(m);let[T,O,P]=L?[d,C,i[C]||l()]:jt(e,d,C,u,_,g),S=T,F=d;if(L||k(S)||ae(S)||Rt(S)||w&&(S=x,F=S),!(L||(k(S)||ae(S)||Rt(S))&&k(O)))return s?-1:d;let I=!1;const N=Rt(S)?S:zt(e,d,O,S,F,()=>{I=!0});if(I)return S;const $=function(e,t,n,o){const{modifiers:s,pluralRules:c,messageResolver:a,fallbackLocale:l,fallbackWarn:u,missingWarn:i,fallbackContext:f}=e,d=(r,o)=>{let s=a(n,r);if(null==s&&(f||o)){const[,,n]=jt(f||e,
|
132 |
+
// NOTE: if has fallbackContext, fallback to root, else if use linked, fallback to local context
|
133 |
+
r,t,l,u,i);s=a(n,r)}if(k(s)||ae(s)){let n=!1;const o=zt(e,r,t,s,r,()=>{n=!0});return n?Mt:o}return Rt(s)?s:Mt},m={locale:t,modifiers:s,pluralRules:c,messages:d};e.processor&&(m.processor=e.processor);o.list&&(m.list=o.list);o.named&&(m.named=o.named);r(o.plural)&&(m.pluralIndex=o.plural);return m}(e,O,P,m),W=function(e,t,n){const r=t(n);return r}(0,N,Dt($)),E=o?o(W,d):W;if(__INTLIFY_PROD_DEVTOOLS__){const t={timestamp:Date.now(),key:k(d)?d:Rt(S)?S.key:"",locale:O||(Rt(S)?S.locale:""),format:k(S)?S:Rt(S)?S.source:"",message:E};t.meta=c({},e.__meta,dt()||{}),Se(t)}return E}function jt(e,t,n,r,o,s){const{messages:c,onWarn:a,messageResolver:u,localeFallbacker:i}=e,f=i(e,r,n);let d,m=l(),p=null;for(let h=0;h<f.length&&(d=f[h],m=c[d]||l(),null===(p=u(m,t))&&(p=m[t]),!(k(p)||ae(p)||Rt(p)));h++)if(!Lt(d,f)){const n=gt(e,
|
134 |
+
// eslint-disable-line @typescript-eslint/no-explicit-any
|
135 |
+
t,d,0,"translate");n!==t&&(p=n)}return[p,d,m]}function zt(e,t,r,o,s,c){const{messageCompiler:a,warnHtmlMessage:l}=e;if(Rt(o)){const e=o;return e.locale=e.locale||r,e.key=e.key||t,e}if(null==a){const e=()=>o;return e.locale=r,e.key=t,e}const u=a(o,function(e,t,r,o,s,c){return{locale:t,key:r,warnHtmlMessage:s,onError:e=>{throw c&&c(e),e},onCacheKey:e=>((e,t,r)=>n({l:e,k:t,s:r}))(t,r,e)}}(0,r,s,0,l,c));return u.locale=r,u.key=t,u.source=o,u}function Ht(...e){const[t,n,o]=e,a=l();if(!(k(t)||r(t)||Rt(t)||ae(t)))throw Re(Ie);const u=r(t)?String(t):(Rt(t),t);return r(n)?a.plural=n:k(n)?a.default=n:v(n)&&!s(n)?a.named=n:p(n)&&(a.list=n),r(o)?a.plural=o:k(o)?a.default=o:v(o)&&c(a,o),[u,a]}"boolean"!=typeof __INTLIFY_PROD_DEVTOOLS__&&(i().__INTLIFY_PROD_DEVTOOLS__=!1),"boolean"!=typeof __INTLIFY_DROP_MESSAGE_COMPILER__&&(i().__INTLIFY_DROP_MESSAGE_COMPILER__=!1);export{ge as A,Ct as B,Me as C,tt as D,xt as E,St as F,Ot as G,Rt as H,Pt as I,s as J,wt as K,at as L,nt as M,et as N,lt as O,ut as P,i as Q,Pe as R,Te as S,Xe as T,v as a,k as b,p as c,o as d,h as e,e as f,z as g,c as h,y as i,l as j,C as k,m as l,t as m,yt as n,b as o,Tt as p,Ft as q,r,ae as s,ft as t,_t as u,ht as v,Je as w,pt as x,Ht as y,At as z};
|
.output/public/assets/@mermaid-js-CShQflH_.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
var e,r,t,a,n,l,s,i,u,m,p,y,o;import{A as d,D as f,a as $,l as g,E as c,i as R,c as T,b as h}from"./langium-D_NGP6iM.js";const v={},C=function(e,r,t){let a=Promise.resolve();if(r&&r.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e}))))};const n=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),s=(null==l?void 0:l.nonce)||(null==l?void 0:l.getAttribute("nonce"));a=e(r.map(e=>{if(e=function(e,r){return new URL(e,r).href}(e,t),e in v)return;v[e]=!0;const r=e.endsWith(".css"),a=r?'[rel="stylesheet"]':"";if(!!t)for(let t=n.length-1;t>=0;t--){const a=n[t];if(a.href===e&&(!r||"stylesheet"===a.rel))return}else if(document.querySelector(`link[href="${e}"]${a}`))return;const l=document.createElement("link");return l.rel=r?"stylesheet":"modulepreload",r||(l.as="script"),l.crossOrigin="",l.href=e,s&&l.setAttribute("nonce",s),document.head.appendChild(l),r?new Promise((r,t)=>{l.addEventListener("load",r),l.addEventListener("error",()=>t(new Error(`Unable to preload CSS for ${e}`)))}):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 re.isInstance(e,x)},"isArchitecture");var E="Axis",G="Branch";k(function(e){return re.isInstance(e,G)},"isBranch");var I="Checkout",P="CherryPicking",S="Commit";k(function(e){return re.isInstance(e,S)},"isCommit");var L="Curve",K="Edge",_="Entry",b="GitGraph";k(function(e){return re.isInstance(e,b)},"isGitGraph");var D="Group",N="Info";k(function(e){return re.isInstance(e,N)},"isInfo");var O="Junction",H="Merge";k(function(e){return re.isInstance(e,H)},"isMerge");var M="Option",V="Packet";k(function(e){return re.isInstance(e,V)},"isPacket");var B="PacketBlock";k(function(e){return re.isInstance(e,B)},"isPacketBlock");var W="Pie";k(function(e){return re.isInstance(e,W)},"isPie");var j="PieSection";k(function(e){return re.isInstance(e,j)},"isPieSection");var F,U,Y,q,J,X,z="Radar",Q="Service",Z="Direction",ee=(k(e=class extends d{getAllTypes(){return[x,E,G,I,P,S,L,Z,K,_,b,D,N,O,H,M,V,B,W,j,z,Q,w]}computeIsSubtype(e,r){switch(e){case G:case I:case P:case S:case H:return this.isSubtype(w,r);case Z:return this.isSubtype(b,r);default:return!1}}getReferenceType(e){const r=`${e.container.$type}:${e.property}`;if("Entry:axis"===r)return E;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 E:return{name:E,properties:[{name:"label"},{name:"name"}]};case G:return{name:G,properties:[{name:"name"},{name:"order"}]};case I:return{name:I,properties:[{name:"branch"}]};case P:return{name:P,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case S:return{name:S,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case L:return{name:L,properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case K:return{name:K,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 _:return{name:_,properties:[{name:"axis"},{name:"value"}]};case b:return{name:b,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case D:return{name:D,properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case N:return{name:N,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case O:return{name:O,properties:[{name:"id"},{name:"in"}]};case H:return{name:H,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case M:return{name:M,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case V:return{name:V,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case B:return{name:B,properties:[{name:"bits"},{name:"end"},{name:"label"},{name:"start"}]};case W:return{name:W,properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case j:return{name:j,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 Z:return{name:Z,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:e,properties:[]}}}},"MermaidAstReflection"),e),re=new ee,te=k(()=>F??(F=g('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":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@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":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":"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","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":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":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/"},"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":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"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":[],"types":[],"usedGrammars":[]}')),"InfoGrammar"),ae=k(()=>U??(U=g('{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":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@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":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":"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","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":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":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/"},"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":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"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":[],"types":[],"usedGrammars":[]}')),"PacketGrammar"),ne=k(()=>Y??(Y=g('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@11"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":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@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":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":"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","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":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":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/"},"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":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"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":[],"types":[],"usedGrammars":[]}')),"PieGrammar"),le=k(()=>q??(q=g('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"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@11"},"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@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"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@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"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@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"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@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"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@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"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":"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":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":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@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":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":"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","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":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":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/"},"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":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"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":"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}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}')),"ArchitectureGrammar"),se=k(()=>J??(J=g('{"$type":"Grammar","isDeclared":true,"name":"GitGraph","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"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@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"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@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"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@8"},"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@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"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@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"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@8"},"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@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"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@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":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@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":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":"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","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":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":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/"},"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":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"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":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}')),"GitGraphGrammar"),ie=k(()=>X??(X=g('{"$type":"Grammar","isDeclared":true,"name":"Radar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"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@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"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@18"},"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@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"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@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"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@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"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@11"},"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@17"},"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@17"},"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@17"},"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@8"},"arguments":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":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":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":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@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":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":"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","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":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":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/"},"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":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"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}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"types":[],"usedGrammars":[]}')),"RadarGrammar"),ue={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},me={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},pe={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ye={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},oe={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},de={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},fe={AstReflection:k(()=>new ee,"AstReflection")},$e={Grammar:k(()=>te(),"Grammar"),LanguageMetaData:k(()=>ue,"LanguageMetaData"),parser:{}},ge={Grammar:k(()=>ae(),"Grammar"),LanguageMetaData:k(()=>me,"LanguageMetaData"),parser:{}},ce={Grammar:k(()=>ne(),"Grammar"),LanguageMetaData:k(()=>pe,"LanguageMetaData"),parser:{}},Re={Grammar:k(()=>le(),"Grammar"),LanguageMetaData:k(()=>ye,"LanguageMetaData"),parser:{}},Te={Grammar:k(()=>se(),"Grammar"),LanguageMetaData:k(()=>oe,"LanguageMetaData"),parser:{}},he={Grammar:k(()=>ie(),"Grammar"),LanguageMetaData:k(()=>de,"LanguageMetaData"),parser:{}},ve={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},Ce=(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=ve[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),Ae=(k(t=class extends Ce{runCustomConverter(e,r,t){}},"CommonValueConverter"),t),ke=(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 ke{},"CommonTokenBuilder");var we=(k(n=class extends ke{constructor(){super(["gitGraph"])}},"GitGraphTokenBuilder"),n),xe={parser:{TokenBuilder:k(()=>new we,"TokenBuilder"),ValueConverter:k(()=>new Ae,"ValueConverter")}};function Ee(e=c){const r=R(T(e),fe),t=R(h({shared:r}),Te,xe);return r.ServiceRegistry.register(t),{shared:r,GitGraph:t}}k(Ee,"createGitGraphServices");var Ge=(k(l=class extends ke{constructor(){super(["info","showInfo"])}},"InfoTokenBuilder"),l),Ie={parser:{TokenBuilder:k(()=>new Ge,"TokenBuilder"),ValueConverter:k(()=>new Ae,"ValueConverter")}};function Pe(e=c){const r=R(T(e),fe),t=R(h({shared:r}),$e,Ie);return r.ServiceRegistry.register(t),{shared:r,Info:t}}k(Pe,"createInfoServices");var Se=(k(s=class extends ke{constructor(){super(["packet-beta"])}},"PacketTokenBuilder"),s),Le={parser:{TokenBuilder:k(()=>new Se,"TokenBuilder"),ValueConverter:k(()=>new Ae,"ValueConverter")}};function Ke(e=c){const r=R(T(e),fe),t=R(h({shared:r}),ge,Le);return r.ServiceRegistry.register(t),{shared:r,Packet:t}}k(Ke,"createPacketServices");var _e=(k(i=class extends ke{constructor(){super(["pie","showData"])}},"PieTokenBuilder"),i),be=(k(u=class extends Ce{runCustomConverter(e,r,t){if("PIE_SECTION_LABEL"===e.name)return r.replace(/"/g,"").trim()}},"PieValueConverter"),u),De={parser:{TokenBuilder:k(()=>new _e,"TokenBuilder"),ValueConverter:k(()=>new be,"ValueConverter")}};function Ne(e=c){const r=R(T(e),fe),t=R(h({shared:r}),ce,De);return r.ServiceRegistry.register(t),{shared:r,Pie:t}}k(Ne,"createPieServices");var Oe=(k(m=class extends ke{constructor(){super(["architecture"])}},"ArchitectureTokenBuilder"),m),He=(k(p=class extends Ce{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"),p),Me={parser:{TokenBuilder:k(()=>new Oe,"TokenBuilder"),ValueConverter:k(()=>new He,"ValueConverter")}};function Ve(e=c){const r=R(T(e),fe),t=R(h({shared:r}),Re,Me);return r.ServiceRegistry.register(t),{shared:r,Architecture:t}}k(Ve,"createArchitectureServices");var Be=(k(y=class extends ke{constructor(){super(["radar-beta"])}},"RadarTokenBuilder"),y),We={parser:{TokenBuilder:k(()=>new Be,"TokenBuilder"),ValueConverter:k(()=>new Ae,"ValueConverter")}};function je(e=c){const r=R(T(e),fe),t=R(h({shared:r}),he,We);return r.ServiceRegistry.register(t),{shared:r,Radar:t}}k(je,"createRadarServices");var Fe={},Ue={info:k(async()=>{const{createInfoServices:e}=await C(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 C(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 C(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 C(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 C(async()=>{const{createGitGraphServices:e}=await Promise.resolve().then(()=>Ze);return{createGitGraphServices:e}},void 0,import.meta.url),r=e().GitGraph.parser.LangiumParser;Fe.gitGraph=r},"gitGraph"),radar:k(async()=>{const{createRadarServices:e}=await C(async()=>{const{createRadarServices:e}=await Promise.resolve().then(()=>er);return{createRadarServices:e}},void 0,import.meta.url),r=e().Radar.parser.LangiumParser;Fe.radar=r},"radar")};async function Ye(e,r){const t=Ue[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 qe(a);return a.value}k(Ye,"parse");var qe=(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:Ie,createInfoServices:Pe},Symbol.toStringTag,{value:"Module"}),Xe=Object.defineProperty({__proto__:null,PacketModule:Le,createPacketServices:Ke},Symbol.toStringTag,{value:"Module"}),ze=Object.defineProperty({__proto__:null,PieModule:De,createPieServices:Ne},Symbol.toStringTag,{value:"Module"}),Qe=Object.defineProperty({__proto__:null,ArchitectureModule:Me,createArchitectureServices:Ve},Symbol.toStringTag,{value:"Module"}),Ze=Object.defineProperty({__proto__:null,GitGraphModule:xe,createGitGraphServices:Ee},Symbol.toStringTag,{value:"Module"}),er=Object.defineProperty({__proto__:null,RadarModule:We,createRadarServices:je},Symbol.toStringTag,{value:"Module"});export{C as _,Ye as p};
|
.output/public/assets/@mozilla-5yaQRYvZ.js
ADDED
@@ -0,0 +1,385 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var e,t={exports:{}};var i,a,r,n={exports:{}};var s=function(){if(r)return a;r=1;var s=(e||(e=1,function(e){function t(e,t){if(t&&t.documentElement)e=t,t=arguments[2];else if(!e||!e.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(t=t||{},this._doc=e,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!t.debug,this._maxElemsToParse=t.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=t.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=t.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(t.classesToPreserve||[]),this._keepClasses=!!t.keepClasses,this._serializer=t.serializer||function(e){return e.innerHTML},this._disableJSONLD=!!t.disableJSONLD,this._allowedVideoRegex=t.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let e=function(e){if(e.nodeType==e.TEXT_NODE)return`${e.nodeName} ("${e.textContent}")`;let t=Array.from(e.attributes||[],function(e){return`${e.name}="${e.value}"`}).join(" ");return`<${e.localName} ${t}>`};this.log=function(){if("undefined"!=typeof console)Array.from(arguments,t=>t&&t.nodeType==this.ELEMENT_NODE?e(t):t).unshift("Reader: (Readability)");else if("undefined"!=typeof dump){var t=Array.prototype.map.call(arguments,function(t){return t&&t.nodeName?e(t):t}).join(" ");dump("Reader: (Readability) "+t+"\n")}}}else this.log=function(){}}t.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,
|
2 |
+
// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType
|
3 |
+
ELEMENT_NODE:1,TEXT_NODE:3,
|
4 |
+
// Max number of nodes supported by this parser. Default: 0 (no limit)
|
5 |
+
DEFAULT_MAX_ELEMS_TO_PARSE:0,
|
6 |
+
// The number of top candidates to consider when analysing how
|
7 |
+
// tight the competition is among candidates.
|
8 |
+
DEFAULT_N_TOP_CANDIDATES:5,
|
9 |
+
// Element tags to score by default.
|
10 |
+
DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),
|
11 |
+
// The default number of chars an article must have in order to return a result
|
12 |
+
DEFAULT_CHAR_THRESHOLD:500,
|
13 |
+
// All of the regular expressions in use within readability.
|
14 |
+
// Defined up here so we don't instantiate them repeatedly in loops.
|
15 |
+
REGEXPS:{
|
16 |
+
// NOTE: These two regular expressions are duplicated in
|
17 |
+
// Readability-readerable.js. Please keep both copies in sync.
|
18 |
+
unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,
|
19 |
+
// Commas as used in Latin, Sindhi, Chinese and various other scripts.
|
20 |
+
// see: https://en.wikipedia.org/wiki/Comma#Comma_variants
|
21 |
+
commas:/\u002C|\u060C|\uFE50|\uFE10|\uFE11|\u2E41|\u2E34|\u2E32|\uFF0C/g,
|
22 |
+
// See: https://schema.org/Article
|
23 |
+
jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],
|
24 |
+
// The commented out elements qualify as phrasing content but tend to be
|
25 |
+
// removed by readability when put into paragraphs, so we ignore them here.
|
26 |
+
PHRASING_ELEMS:[
|
27 |
+
// "CANVAS", "IFRAME", "SVG", "VIDEO",
|
28 |
+
"ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],
|
29 |
+
// These are the classes that readability sets itself.
|
30 |
+
CLASSES_TO_PRESERVE:["page"],
|
31 |
+
// These are the list of HTML entities that need to be escaped.
|
32 |
+
HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},
|
33 |
+
/**
|
34 |
+
* Run any post-process modifications to article content as necessary.
|
35 |
+
*
|
36 |
+
* @param Element
|
37 |
+
* @return void
|
38 |
+
**/
|
39 |
+
_postProcessContent:function(e){this._fixRelativeUris(e),this._simplifyNestedElements(e),this._keepClasses||this._cleanClasses(e)},
|
40 |
+
/**
|
41 |
+
* Iterates over a NodeList, calls `filterFn` for each node and removes node
|
42 |
+
* if function returned `true`.
|
43 |
+
*
|
44 |
+
* If function is not passed, removes all the nodes in node list.
|
45 |
+
*
|
46 |
+
* @param NodeList nodeList The nodes to operate on
|
47 |
+
* @param Function filterFn the function to use as a filter
|
48 |
+
* @return void
|
49 |
+
*/
|
50 |
+
_removeNodes:function(e,t){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=e.length-1;i>=0;i--){var a=e[i],r=a.parentNode;r&&(t&&!t.call(this,a,i,e)||r.removeChild(a))}},
|
51 |
+
/**
|
52 |
+
* Iterates over a NodeList, and calls _setNodeTag for each node.
|
53 |
+
*
|
54 |
+
* @param NodeList nodeList The nodes to operate on
|
55 |
+
* @param String newTagName the new tag name to use
|
56 |
+
* @return void
|
57 |
+
*/
|
58 |
+
_replaceNodeTags:function(e,t){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(const i of e)this._setNodeTag(i,t)},
|
59 |
+
/**
|
60 |
+
* Iterate over a NodeList, which doesn't natively fully implement the Array
|
61 |
+
* interface.
|
62 |
+
*
|
63 |
+
* For convenience, the current object context is applied to the provided
|
64 |
+
* iterate function.
|
65 |
+
*
|
66 |
+
* @param NodeList nodeList The NodeList.
|
67 |
+
* @param Function fn The iterate function.
|
68 |
+
* @return void
|
69 |
+
*/
|
70 |
+
_forEachNode:function(e,t){Array.prototype.forEach.call(e,t,this)},
|
71 |
+
/**
|
72 |
+
* Iterate over a NodeList, and return the first node that passes
|
73 |
+
* the supplied test function
|
74 |
+
*
|
75 |
+
* For convenience, the current object context is applied to the provided
|
76 |
+
* test function.
|
77 |
+
*
|
78 |
+
* @param NodeList nodeList The NodeList.
|
79 |
+
* @param Function fn The test function.
|
80 |
+
* @return void
|
81 |
+
*/
|
82 |
+
_findNode:function(e,t){return Array.prototype.find.call(e,t,this)},
|
83 |
+
/**
|
84 |
+
* Iterate over a NodeList, return true if any of the provided iterate
|
85 |
+
* function calls returns true, false otherwise.
|
86 |
+
*
|
87 |
+
* For convenience, the current object context is applied to the
|
88 |
+
* provided iterate function.
|
89 |
+
*
|
90 |
+
* @param NodeList nodeList The NodeList.
|
91 |
+
* @param Function fn The iterate function.
|
92 |
+
* @return Boolean
|
93 |
+
*/
|
94 |
+
_someNode:function(e,t){return Array.prototype.some.call(e,t,this)},
|
95 |
+
/**
|
96 |
+
* Iterate over a NodeList, return true if all of the provided iterate
|
97 |
+
* function calls return true, false otherwise.
|
98 |
+
*
|
99 |
+
* For convenience, the current object context is applied to the
|
100 |
+
* provided iterate function.
|
101 |
+
*
|
102 |
+
* @param NodeList nodeList The NodeList.
|
103 |
+
* @param Function fn The iterate function.
|
104 |
+
* @return Boolean
|
105 |
+
*/
|
106 |
+
_everyNode:function(e,t){return Array.prototype.every.call(e,t,this)},
|
107 |
+
/**
|
108 |
+
* Concat all nodelists passed as arguments.
|
109 |
+
*
|
110 |
+
* @return ...NodeList
|
111 |
+
* @return Array
|
112 |
+
*/
|
113 |
+
_concatNodeLists:function(){var e=Array.prototype.slice,t=e.call(arguments).map(function(t){return e.call(t)});return Array.prototype.concat.apply([],t)},_getAllNodesWithTag:function(e,t){return e.querySelectorAll?e.querySelectorAll(t.join(",")):[].concat.apply([],t.map(function(t){var i=e.getElementsByTagName(t);return Array.isArray(i)?i:Array.from(i)}))},
|
114 |
+
/**
|
115 |
+
* Removes the class="" attribute from every element in the given
|
116 |
+
* subtree, except those that match CLASSES_TO_PRESERVE and
|
117 |
+
* the classesToPreserve array from the options object.
|
118 |
+
*
|
119 |
+
* @param Element
|
120 |
+
* @return void
|
121 |
+
*/
|
122 |
+
_cleanClasses:function(e){var t=this._classesToPreserve,i=(e.getAttribute("class")||"").split(/\s+/).filter(function(e){return-1!=t.indexOf(e)}).join(" ");for(i?e.setAttribute("class",i):e.removeAttribute("class"),e=e.firstElementChild;e;e=e.nextElementSibling)this._cleanClasses(e)},
|
123 |
+
/**
|
124 |
+
* Converts each <a> and <img> uri in the given element to an absolute URI,
|
125 |
+
* ignoring #ref URIs.
|
126 |
+
*
|
127 |
+
* @param Element
|
128 |
+
* @return void
|
129 |
+
*/
|
130 |
+
_fixRelativeUris:function(e){var t=this._doc.baseURI,i=this._doc.documentURI;function a(e){if(t==i&&"#"==e.charAt(0))return e;try{return new URL(e,t).href}catch(a){}return e}var r=this._getAllNodesWithTag(e,["a"]);this._forEachNode(r,function(e){var t=e.getAttribute("href");if(t)if(0===t.indexOf("javascript:"))if(1===e.childNodes.length&&e.childNodes[0].nodeType===this.TEXT_NODE){var i=this._doc.createTextNode(e.textContent);e.parentNode.replaceChild(i,e)}else{for(var r=this._doc.createElement("span");e.firstChild;)r.appendChild(e.firstChild);e.parentNode.replaceChild(r,e)}else e.setAttribute("href",a(t))});var n=this._getAllNodesWithTag(e,["img","picture","figure","video","audio","source"]);this._forEachNode(n,function(e){var t=e.getAttribute("src"),i=e.getAttribute("poster"),r=e.getAttribute("srcset");if(t&&e.setAttribute("src",a(t)),i&&e.setAttribute("poster",a(i)),r){var n=r.replace(this.REGEXPS.srcsetUrl,function(e,t,i,r){return a(t)+(i||"")+r});e.setAttribute("srcset",n)}})},_simplifyNestedElements:function(e){for(var t=e;t;){if(t.parentNode&&["DIV","SECTION"].includes(t.tagName)&&(!t.id||!t.id.startsWith("readability"))){if(this._isElementWithoutContent(t)){t=this._removeAndGetNext(t);continue}if(this._hasSingleTagInsideElement(t,"DIV")||this._hasSingleTagInsideElement(t,"SECTION")){for(var i=t.children[0],a=0;a<t.attributes.length;a++)i.setAttribute(t.attributes[a].name,t.attributes[a].value);t.parentNode.replaceChild(i,t),t=i;continue}}t=this._getNextNode(t)}},
|
131 |
+
/**
|
132 |
+
* Get the article title as an H1.
|
133 |
+
*
|
134 |
+
* @return string
|
135 |
+
**/
|
136 |
+
_getArticleTitle:function(){var e=this._doc,t="",i="";try{"string"!=typeof(t=i=e.title.trim())&&(t=i=this._getInnerText(e.getElementsByTagName("title")[0]))}catch(h){}var a=!1;function r(e){return e.split(/\s+/).length}if(/ [\|\-\\\/>»] /.test(t))a=/ [\\\/>»] /.test(t),r(t=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"))<3&&(t=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(-1!==t.indexOf(": ")){var n=this._concatNodeLists(e.getElementsByTagName("h1"),e.getElementsByTagName("h2")),s=t.trim();this._someNode(n,function(e){return e.textContent.trim()===s})||(r(t=i.substring(i.lastIndexOf(":")+1))<3?t=i.substring(i.indexOf(":")+1):r(i.substr(0,i.indexOf(":")))>5&&(t=i))}else if(t.length>150||t.length<15){var l=e.getElementsByTagName("h1");1===l.length&&(t=this._getInnerText(l[0]))}var o=r(t=t.trim().replace(this.REGEXPS.normalize," "));return o<=4&&(!a||o!=r(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(t=i),t},
|
137 |
+
/**
|
138 |
+
* Prepare the HTML document for readability to scrape it.
|
139 |
+
* This includes things like stripping javascript, CSS, and handling terrible markup.
|
140 |
+
*
|
141 |
+
* @return void
|
142 |
+
**/
|
143 |
+
_prepDocument:function(){var e=this._doc;this._removeNodes(this._getAllNodesWithTag(e,["style"])),e.body&&this._replaceBrs(e.body),this._replaceNodeTags(this._getAllNodesWithTag(e,["font"]),"SPAN")},
|
144 |
+
/**
|
145 |
+
* Finds the next node, starting from the given node, and ignoring
|
146 |
+
* whitespace in between. If the given node is an element, the same node is
|
147 |
+
* returned.
|
148 |
+
*/
|
149 |
+
_nextNode:function(e){for(var t=e;t&&t.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(t.textContent);)t=t.nextSibling;return t},
|
150 |
+
/**
|
151 |
+
* Replaces 2 or more successive <br> elements with a single <p>.
|
152 |
+
* Whitespace between <br> elements are ignored. For example:
|
153 |
+
* <div>foo<br>bar<br> <br><br>abc</div>
|
154 |
+
* will become:
|
155 |
+
* <div>foo<br>bar<p>abc</p></div>
|
156 |
+
*/
|
157 |
+
_replaceBrs:function(e){this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(e){for(var t=e.nextSibling,i=!1;(t=this._nextNode(t))&&"BR"==t.tagName;){i=!0;var a=t.nextSibling;t.parentNode.removeChild(t),t=a}if(i){var r=this._doc.createElement("p");for(e.parentNode.replaceChild(r,e),t=r.nextSibling;t;){if("BR"==t.tagName){var n=this._nextNode(t.nextSibling);if(n&&"BR"==n.tagName)break}if(!this._isPhrasingContent(t))break;var s=t.nextSibling;r.appendChild(t),t=s}for(;r.lastChild&&this._isWhitespace(r.lastChild);)r.removeChild(r.lastChild);"P"===r.parentNode.tagName&&this._setNodeTag(r.parentNode,"DIV")}})},_setNodeTag:function(e,t){if(this.log("_setNodeTag",e,t),this._docJSDOMParser)return e.localName=t.toLowerCase(),e.tagName=t.toUpperCase(),e;for(var i=e.ownerDocument.createElement(t);e.firstChild;)i.appendChild(e.firstChild);e.parentNode.replaceChild(i,e),e.readability&&(i.readability=e.readability);for(var a=0;a<e.attributes.length;a++)try{i.setAttribute(e.attributes[a].name,e.attributes[a].value)}catch(r){}return i},
|
158 |
+
/**
|
159 |
+
* Prepare the article node for display. Clean out any inline styles,
|
160 |
+
* iframes, forms, strip extraneous <p> tags, etc.
|
161 |
+
*
|
162 |
+
* @param Element
|
163 |
+
* @return void
|
164 |
+
**/
|
165 |
+
_prepArticle:function(e){this._cleanStyles(e),this._markDataTables(e),this._fixLazyImages(e),this._cleanConditionally(e,"form"),this._cleanConditionally(e,"fieldset"),this._clean(e,"object"),this._clean(e,"embed"),this._clean(e,"footer"),this._clean(e,"link"),this._clean(e,"aside");var t=this.DEFAULT_CHAR_THRESHOLD;this._forEachNode(e.children,function(e){this._cleanMatchedNodes(e,function(e,i){return this.REGEXPS.shareElements.test(i)&&e.textContent.length<t})}),this._clean(e,"iframe"),this._clean(e,"input"),this._clean(e,"textarea"),this._clean(e,"select"),this._clean(e,"button"),this._cleanHeaders(e),this._cleanConditionally(e,"table"),this._cleanConditionally(e,"ul"),this._cleanConditionally(e,"div"),this._replaceNodeTags(this._getAllNodesWithTag(e,["h1"]),"h2"),this._removeNodes(this._getAllNodesWithTag(e,["p"]),function(e){return 0===e.getElementsByTagName("img").length+e.getElementsByTagName("embed").length+e.getElementsByTagName("object").length+e.getElementsByTagName("iframe").length&&!this._getInnerText(e,!1)}),this._forEachNode(this._getAllNodesWithTag(e,["br"]),function(e){var t=this._nextNode(e.nextSibling);t&&"P"==t.tagName&&e.parentNode.removeChild(e)}),this._forEachNode(this._getAllNodesWithTag(e,["table"]),function(e){var t=this._hasSingleTagInsideElement(e,"TBODY")?e.firstElementChild:e;if(this._hasSingleTagInsideElement(t,"TR")){var i=t.firstElementChild;if(this._hasSingleTagInsideElement(i,"TD")){var a=i.firstElementChild;a=this._setNodeTag(a,this._everyNode(a.childNodes,this._isPhrasingContent)?"P":"DIV"),e.parentNode.replaceChild(a,e)}}})},
|
166 |
+
/**
|
167 |
+
* Initialize a node with the readability object. Also checks the
|
168 |
+
* className/id for special names to add to its score.
|
169 |
+
*
|
170 |
+
* @param Element
|
171 |
+
* @return void
|
172 |
+
**/
|
173 |
+
_initializeNode:function(e){switch(e.readability={contentScore:0},e.tagName){case"DIV":e.readability.contentScore+=5;break;case"PRE":case"TD":case"BLOCKQUOTE":e.readability.contentScore+=3;break;case"ADDRESS":case"OL":case"UL":case"DL":case"DD":case"DT":case"LI":case"FORM":e.readability.contentScore-=3;break;case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"TH":e.readability.contentScore-=5}e.readability.contentScore+=this._getClassWeight(e)},_removeAndGetNext:function(e){var t=this._getNextNode(e,!0);return e.parentNode.removeChild(e),t},
|
174 |
+
/**
|
175 |
+
* Traverse the DOM from node to node, starting at the node passed in.
|
176 |
+
* Pass true for the second parameter to indicate this node itself
|
177 |
+
* (and its kids) are going away, and we want the next node over.
|
178 |
+
*
|
179 |
+
* Calling this in a loop will traverse the DOM depth-first.
|
180 |
+
*/
|
181 |
+
_getNextNode:function(e,t){if(!t&&e.firstElementChild)return e.firstElementChild;if(e.nextElementSibling)return e.nextElementSibling;do{e=e.parentNode}while(e&&!e.nextElementSibling);return e&&e.nextElementSibling},
|
182 |
+
// compares second text to first one
|
183 |
+
// 1 = same text, 0 = completely different text
|
184 |
+
// works the way that it splits both texts into words and then finds words that are unique in second text
|
185 |
+
// the result is given by the lower length of unique parts
|
186 |
+
_textSimilarity:function(e,t){var i=e.toLowerCase().split(this.REGEXPS.tokenize).filter(Boolean),a=t.toLowerCase().split(this.REGEXPS.tokenize).filter(Boolean);return i.length&&a.length?1-a.filter(e=>!i.includes(e)).join(" ").length/a.join(" ").length:0},_checkByline:function(e,t){if(this._articleByline)return!1;if(void 0!==e.getAttribute)var i=e.getAttribute("rel"),a=e.getAttribute("itemprop");return!(!("author"===i||a&&-1!==a.indexOf("author")||this.REGEXPS.byline.test(t))||!this._isValidByline(e.textContent)||(this._articleByline=e.textContent.trim(),0))},_getNodeAncestors:function(e,t){t=t||0;for(var i=0,a=[];e.parentNode&&(a.push(e.parentNode),!t||++i!==t);)e=e.parentNode;return a},
|
187 |
+
/***
|
188 |
+
* grabArticle - Using a variety of metrics (content score, classname, element types), find the content that is
|
189 |
+
* most likely to be the stuff a user wants to read. Then return it wrapped up in a div.
|
190 |
+
*
|
191 |
+
* @param page a document to run upon. Needs to be a full document, complete with body.
|
192 |
+
* @return Element
|
193 |
+
**/
|
194 |
+
_grabArticle:function(e){this.log("**** grabArticle ****");var t=this._doc,i=null!==e;if(!(e=e||this._doc.body))return this.log("No body found in document. Abort."),null;for(var a=e.innerHTML;;){this.log("Starting grabArticle loop");var r=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),n=[],s=this._doc.documentElement;let V=!0;for(;s;){"HTML"===s.tagName&&(this._articleLang=s.getAttribute("lang"));var l=s.className+" "+s.id;if(this._isProbablyVisible(s))if("true"!=s.getAttribute("aria-modal")||"dialog"!=s.getAttribute("role"))if(this._checkByline(s,l))s=this._removeAndGetNext(s);else if(V&&this._headerDuplicatesTitle(s))this.log("Removing header: ",s.textContent.trim(),this._articleTitle.trim()),V=!1,s=this._removeAndGetNext(s);else{if(r){if(this.REGEXPS.unlikelyCandidates.test(l)&&!this.REGEXPS.okMaybeItsACandidate.test(l)&&!this._hasAncestorTag(s,"table")&&!this._hasAncestorTag(s,"code")&&"BODY"!==s.tagName&&"A"!==s.tagName){this.log("Removing unlikely candidate - "+l),s=this._removeAndGetNext(s);continue}if(this.UNLIKELY_ROLES.includes(s.getAttribute("role"))){this.log("Removing content with role "+s.getAttribute("role")+" - "+l),s=this._removeAndGetNext(s);continue}}if("DIV"!==s.tagName&&"SECTION"!==s.tagName&&"HEADER"!==s.tagName&&"H1"!==s.tagName&&"H2"!==s.tagName&&"H3"!==s.tagName&&"H4"!==s.tagName&&"H5"!==s.tagName&&"H6"!==s.tagName||!this._isElementWithoutContent(s)){if(-1!==this.DEFAULT_TAGS_TO_SCORE.indexOf(s.tagName)&&n.push(s),"DIV"===s.tagName){for(var o=null,h=s.firstChild;h;){var c=h.nextSibling;if(this._isPhrasingContent(h))null!==o?o.appendChild(h):this._isWhitespace(h)||(o=t.createElement("p"),s.replaceChild(o,h),o.appendChild(h));else if(null!==o){for(;o.lastChild&&this._isWhitespace(o.lastChild);)o.removeChild(o.lastChild);o=null}h=c}if(this._hasSingleTagInsideElement(s,"P")&&this._getLinkDensity(s)<.25){var d=s.children[0];s.parentNode.replaceChild(d,s),s=d,n.push(s)}else this._hasChildBlockElement(s)||(s=this._setNodeTag(s,"P"),n.push(s))}s=this._getNextNode(s)}else s=this._removeAndGetNext(s)}else s=this._removeAndGetNext(s);else this.log("Removing hidden node - "+l),s=this._removeAndGetNext(s)}var g=[];this._forEachNode(n,function(e){if(e.parentNode&&void 0!==e.parentNode.tagName){var t=this._getInnerText(e);if(!(t.length<25)){var i=this._getNodeAncestors(e,5);if(0!==i.length){var a=0;a+=1,a+=t.split(this.REGEXPS.commas).length,a+=Math.min(Math.floor(t.length/100),3),this._forEachNode(i,function(e,t){if(e.tagName&&e.parentNode&&void 0!==e.parentNode.tagName){if(void 0===e.readability&&(this._initializeNode(e),g.push(e)),0===t)var i=1;else i=1===t?2:3*t;e.readability.contentScore+=a/i}})}}}});for(var u=[],m=0,_=g.length;m<_;m+=1){var f=g[m],p=f.readability.contentScore*(1-this._getLinkDensity(f));f.readability.contentScore=p,this.log("Candidate:",f,"with score "+p);for(var N=0;N<this._nbTopCandidates;N++){var E=u[N];if(!E||p>E.readability.contentScore){u.splice(N,0,f),u.length>this._nbTopCandidates&&u.pop();break}}}var b,T=u[0]||null,A=!1;if(null===T||"BODY"===T.tagName){for(T=t.createElement("DIV"),A=!0;e.firstChild;)this.log("Moving child out:",e.firstChild),T.appendChild(e.firstChild);e.appendChild(T),this._initializeNode(T)}else if(T){for(var v=[],y=1;y<u.length;y++)u[y].readability.contentScore/T.readability.contentScore>=.75&&v.push(this._getNodeAncestors(u[y]));if(v.length>=3)for(b=T.parentNode;"BODY"!==b.tagName;){for(var S=0,C=0;C<v.length&&S<3;C++)S+=Number(v[C].includes(b));if(S>=3){T=b;break}b=b.parentNode}T.readability||this._initializeNode(T),b=T.parentNode;for(var L=T.readability.contentScore,x=L/3;"BODY"!==b.tagName;)if(b.readability){var I=b.readability.contentScore;if(I<x)break;if(I>L){T=b;break}L=b.readability.contentScore,b=b.parentNode}else b=b.parentNode;for(b=T.parentNode;"BODY"!=b.tagName&&1==b.children.length;)b=(T=b).parentNode;T.readability||this._initializeNode(T)}var D=t.createElement("DIV");i&&(D.id="readability-content");for(var R=Math.max(10,.2*T.readability.contentScore),P=(b=T.parentNode).children,O=0,w=P.length;O<w;O++){var B=P[O],M=!1;if(this.log("Looking at sibling node:",B,B.readability?"with score "+B.readability.contentScore:""),this.log("Sibling has score",B.readability?B.readability.contentScore:"Unknown"),B===T)M=!0;else{var G=0;if(B.className===T.className&&""!==T.className&&(G+=.2*T.readability.contentScore),B.readability&&B.readability.contentScore+G>=R)M=!0;else if("P"===B.nodeName){var k=this._getLinkDensity(B),H=this._getInnerText(B),U=H.length;(U>80&&k<.25||U<80&&U>0&&0===k&&-1!==H.search(/\.( |$)/))&&(M=!0)}}M&&(this.log("Appending node:",B),-1===this.ALTER_TO_DIV_EXCEPTIONS.indexOf(B.nodeName)&&(this.log("Altering sibling:",B,"to div."),B=this._setNodeTag(B,"DIV")),D.appendChild(B),P=b.children,O-=1,w-=1)}if(this._debug&&this.log("Article content pre-prep: "+D.innerHTML),this._prepArticle(D),this._debug&&this.log("Article content post-prep: "+D.innerHTML),A)T.id="readability-page-1",T.className="page";else{var F=t.createElement("DIV");for(F.id="readability-page-1",F.className="page";D.firstChild;)F.appendChild(D.firstChild);D.appendChild(F)}this._debug&&this.log("Article content after paging: "+D.innerHTML);var W=!0,X=this._getInnerText(D,!0).length;if(X<this._charThreshold)if(W=!1,e.innerHTML=a,this._flagIsActive(this.FLAG_STRIP_UNLIKELYS))this._removeFlag(this.FLAG_STRIP_UNLIKELYS),this._attempts.push({articleContent:D,textLength:X});else if(this._flagIsActive(this.FLAG_WEIGHT_CLASSES))this._removeFlag(this.FLAG_WEIGHT_CLASSES),this._attempts.push({articleContent:D,textLength:X});else if(this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY))this._removeFlag(this.FLAG_CLEAN_CONDITIONALLY),this._attempts.push({articleContent:D,textLength:X});else{if(this._attempts.push({articleContent:D,textLength:X}),this._attempts.sort(function(e,t){return t.textLength-e.textLength}),!this._attempts[0].textLength)return null;D=this._attempts[0].articleContent,W=!0}if(W){var j=[b,T].concat(this._getNodeAncestors(b));return this._someNode(j,function(e){if(!e.tagName)return!1;var t=e.getAttribute("dir");return!!t&&(this._articleDir=t,!0)}),D}}},
|
195 |
+
/**
|
196 |
+
* Check whether the input string could be a byline.
|
197 |
+
* This verifies that the input is a string, and that the length
|
198 |
+
* is less than 100 chars.
|
199 |
+
*
|
200 |
+
* @param possibleByline {string} - a string to check whether its a byline.
|
201 |
+
* @return Boolean - whether the input string is a byline.
|
202 |
+
*/
|
203 |
+
_isValidByline:function(e){return("string"==typeof e||e instanceof String)&&(e=e.trim()).length>0&&e.length<100},
|
204 |
+
/**
|
205 |
+
* Converts some of the common HTML entities in string to their corresponding characters.
|
206 |
+
*
|
207 |
+
* @param str {string} - a string to unescape.
|
208 |
+
* @return string without HTML entity.
|
209 |
+
*/
|
210 |
+
_unescapeHtmlEntities:function(e){if(!e)return e;var t=this.HTML_ESCAPE_MAP;return e.replace(/&(quot|amp|apos|lt|gt);/g,function(e,i){return t[i]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(e,t,i){var a=parseInt(t||i,t?16:10);return String.fromCharCode(a)})},
|
211 |
+
/**
|
212 |
+
* Try to extract metadata from JSON-LD object.
|
213 |
+
* For now, only Schema.org objects of type Article or its subtypes are supported.
|
214 |
+
* @return Object with any metadata that could be extracted (possibly none)
|
215 |
+
*/
|
216 |
+
_getJSONLD:function(e){var t,i=this._getAllNodesWithTag(e,["script"]);return this._forEachNode(i,function(e){if(!t&&"application/ld+json"===e.getAttribute("type"))try{var i=e.textContent.replace(/^\s*<!\[CDATA\[|\]\]>\s*$/g,""),a=JSON.parse(i);if(!a["@context"]||!a["@context"].match(/^https?\:\/\/schema\.org$/))return;if(!a["@type"]&&Array.isArray(a["@graph"])&&(a=a["@graph"].find(function(e){return(e["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!a||!a["@type"]||!a["@type"].match(this.REGEXPS.jsonLdArticleTypes))return;if(t={},"string"==typeof a.name&&"string"==typeof a.headline&&a.name!==a.headline){var r=this._getArticleTitle(),n=this._textSimilarity(a.name,r)>.75,s=this._textSimilarity(a.headline,r)>.75;t.title=s&&!n?a.headline:a.name}else"string"==typeof a.name?t.title=a.name.trim():"string"==typeof a.headline&&(t.title=a.headline.trim());return a.author&&("string"==typeof a.author.name?t.byline=a.author.name.trim():Array.isArray(a.author)&&a.author[0]&&"string"==typeof a.author[0].name&&(t.byline=a.author.filter(function(e){return e&&"string"==typeof e.name}).map(function(e){return e.name.trim()}).join(", "))),"string"==typeof a.description&&(t.excerpt=a.description.trim()),a.publisher&&"string"==typeof a.publisher.name&&(t.siteName=a.publisher.name.trim()),void("string"==typeof a.datePublished&&(t.datePublished=a.datePublished.trim()))}catch(l){this.log(l.message)}}),t||{}},
|
217 |
+
/**
|
218 |
+
* Attempts to get excerpt and byline metadata for the article.
|
219 |
+
*
|
220 |
+
* @param {Object} jsonld — object containing any metadata that
|
221 |
+
* could be extracted from JSON-LD object.
|
222 |
+
*
|
223 |
+
* @return Object with optional "excerpt" and "byline" properties
|
224 |
+
*/
|
225 |
+
_getArticleMetadata:function(e){var t={},i={},a=this._doc.getElementsByTagName("meta"),r=/\s*(article|dc|dcterm|og|twitter)\s*:\s*(author|creator|description|published_time|title|site_name)\s*/gi,n=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(a,function(e){var t=e.getAttribute("name"),a=e.getAttribute("property"),s=e.getAttribute("content");if(s){var l=null,o=null;a&&(l=a.match(r))&&(o=l[0].toLowerCase().replace(/\s/g,""),i[o]=s.trim()),!l&&t&&n.test(t)&&(o=t,s&&(o=o.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),i[o]=s.trim()))}}),t.title=e.title||i["dc:title"]||i["dcterm:title"]||i["og:title"]||i["weibo:article:title"]||i["weibo:webpage:title"]||i.title||i["twitter:title"],t.title||(t.title=this._getArticleTitle()),t.byline=e.byline||i["dc:creator"]||i["dcterm:creator"]||i.author,t.excerpt=e.excerpt||i["dc:description"]||i["dcterm:description"]||i["og:description"]||i["weibo:article:description"]||i["weibo:webpage:description"]||i.description||i["twitter:description"],t.siteName=e.siteName||i["og:site_name"],t.publishedTime=e.datePublished||i["article:published_time"]||null,t.title=this._unescapeHtmlEntities(t.title),t.byline=this._unescapeHtmlEntities(t.byline),t.excerpt=this._unescapeHtmlEntities(t.excerpt),t.siteName=this._unescapeHtmlEntities(t.siteName),t.publishedTime=this._unescapeHtmlEntities(t.publishedTime),t},
|
226 |
+
/**
|
227 |
+
* Check if node is image, or if node contains exactly only one image
|
228 |
+
* whether as a direct child or as its descendants.
|
229 |
+
*
|
230 |
+
* @param Element
|
231 |
+
**/
|
232 |
+
_isSingleImage:function(e){return"IMG"===e.tagName||1===e.children.length&&""===e.textContent.trim()&&this._isSingleImage(e.children[0])},
|
233 |
+
/**
|
234 |
+
* Find all <noscript> that are located after <img> nodes, and which contain only one
|
235 |
+
* <img> element. Replace the first image with the image from inside the <noscript> tag,
|
236 |
+
* and remove the <noscript> tag. This improves the quality of the images we use on
|
237 |
+
* some sites (e.g. Medium).
|
238 |
+
*
|
239 |
+
* @param Element
|
240 |
+
**/
|
241 |
+
_unwrapNoscriptImages:function(e){var t=Array.from(e.getElementsByTagName("img"));this._forEachNode(t,function(e){for(var t=0;t<e.attributes.length;t++){var i=e.attributes[t];switch(i.name){case"src":case"srcset":case"data-src":case"data-srcset":return}if(/\.(jpg|jpeg|png|webp)/i.test(i.value))return}e.parentNode.removeChild(e)});var i=Array.from(e.getElementsByTagName("noscript"));this._forEachNode(i,function(t){var i=e.createElement("div");if(i.innerHTML=t.innerHTML,this._isSingleImage(i)){var a=t.previousElementSibling;if(a&&this._isSingleImage(a)){var r=a;"IMG"!==r.tagName&&(r=a.getElementsByTagName("img")[0]);for(var n=i.getElementsByTagName("img")[0],s=0;s<r.attributes.length;s++){var l=r.attributes[s];if(""!==l.value&&("src"===l.name||"srcset"===l.name||/\.(jpg|jpeg|png|webp)/i.test(l.value))){if(n.getAttribute(l.name)===l.value)continue;var o=l.name;n.hasAttribute(o)&&(o="data-old-"+o),n.setAttribute(o,l.value)}}t.parentNode.replaceChild(i.firstElementChild,a)}}})},
|
242 |
+
/**
|
243 |
+
* Removes script tags from the document.
|
244 |
+
*
|
245 |
+
* @param Element
|
246 |
+
**/
|
247 |
+
_removeScripts:function(e){this._removeNodes(this._getAllNodesWithTag(e,["script","noscript"]))},
|
248 |
+
/**
|
249 |
+
* Check if this node has only whitespace and a single element with given tag
|
250 |
+
* Returns false if the DIV node contains non-empty text nodes
|
251 |
+
* or if it contains no element with given tag or more than 1 element.
|
252 |
+
*
|
253 |
+
* @param Element
|
254 |
+
* @param string tag of child element
|
255 |
+
**/
|
256 |
+
_hasSingleTagInsideElement:function(e,t){return 1==e.children.length&&e.children[0].tagName===t&&!this._someNode(e.childNodes,function(e){return e.nodeType===this.TEXT_NODE&&this.REGEXPS.hasContent.test(e.textContent)})},_isElementWithoutContent:function(e){return e.nodeType===this.ELEMENT_NODE&&0==e.textContent.trim().length&&(0==e.children.length||e.children.length==e.getElementsByTagName("br").length+e.getElementsByTagName("hr").length)},
|
257 |
+
/**
|
258 |
+
* Determine whether element has any children block level elements.
|
259 |
+
*
|
260 |
+
* @param Element
|
261 |
+
*/
|
262 |
+
_hasChildBlockElement:function(e){return this._someNode(e.childNodes,function(e){return this.DIV_TO_P_ELEMS.has(e.tagName)||this._hasChildBlockElement(e)})},
|
263 |
+
/***
|
264 |
+
* Determine if a node qualifies as phrasing content.
|
265 |
+
* https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Phrasing_content
|
266 |
+
**/
|
267 |
+
_isPhrasingContent:function(e){return e.nodeType===this.TEXT_NODE||-1!==this.PHRASING_ELEMS.indexOf(e.tagName)||("A"===e.tagName||"DEL"===e.tagName||"INS"===e.tagName)&&this._everyNode(e.childNodes,this._isPhrasingContent)},_isWhitespace:function(e){return e.nodeType===this.TEXT_NODE&&0===e.textContent.trim().length||e.nodeType===this.ELEMENT_NODE&&"BR"===e.tagName},
|
268 |
+
/**
|
269 |
+
* Get the inner text of a node - cross browser compatibly.
|
270 |
+
* This also strips out any excess whitespace to be found.
|
271 |
+
*
|
272 |
+
* @param Element
|
273 |
+
* @param Boolean normalizeSpaces (default: true)
|
274 |
+
* @return string
|
275 |
+
**/
|
276 |
+
_getInnerText:function(e,t){t=void 0===t||t;var i=e.textContent.trim();return t?i.replace(this.REGEXPS.normalize," "):i},
|
277 |
+
/**
|
278 |
+
* Get the number of times a string s appears in the node e.
|
279 |
+
*
|
280 |
+
* @param Element
|
281 |
+
* @param string - what to split on. Default is ","
|
282 |
+
* @return number (integer)
|
283 |
+
**/
|
284 |
+
_getCharCount:function(e,t){return t=t||",",this._getInnerText(e).split(t).length-1},
|
285 |
+
/**
|
286 |
+
* Remove the style attribute on every e and under.
|
287 |
+
* TODO: Test if getElementsByTagName(*) is faster.
|
288 |
+
*
|
289 |
+
* @param Element
|
290 |
+
* @return void
|
291 |
+
**/
|
292 |
+
_cleanStyles:function(e){if(e&&"svg"!==e.tagName.toLowerCase()){for(var t=0;t<this.PRESENTATIONAL_ATTRIBUTES.length;t++)e.removeAttribute(this.PRESENTATIONAL_ATTRIBUTES[t]);-1!==this.DEPRECATED_SIZE_ATTRIBUTE_ELEMS.indexOf(e.tagName)&&(e.removeAttribute("width"),e.removeAttribute("height"));for(var i=e.firstElementChild;null!==i;)this._cleanStyles(i),i=i.nextElementSibling}},
|
293 |
+
/**
|
294 |
+
* Get the density of links as a percentage of the content
|
295 |
+
* This is the amount of text that is inside a link divided by the total text in the node.
|
296 |
+
*
|
297 |
+
* @param Element
|
298 |
+
* @return number (float)
|
299 |
+
**/
|
300 |
+
_getLinkDensity:function(e){var t=this._getInnerText(e).length;if(0===t)return 0;var i=0;return this._forEachNode(e.getElementsByTagName("a"),function(e){var t=e.getAttribute("href"),a=t&&this.REGEXPS.hashUrl.test(t)?.3:1;i+=this._getInnerText(e).length*a}),i/t},
|
301 |
+
/**
|
302 |
+
* Get an elements class/id weight. Uses regular expressions to tell if this
|
303 |
+
* element looks good or bad.
|
304 |
+
*
|
305 |
+
* @param Element
|
306 |
+
* @return number (Integer)
|
307 |
+
**/
|
308 |
+
_getClassWeight:function(e){if(!this._flagIsActive(this.FLAG_WEIGHT_CLASSES))return 0;var t=0;return"string"==typeof e.className&&""!==e.className&&(this.REGEXPS.negative.test(e.className)&&(t-=25),this.REGEXPS.positive.test(e.className)&&(t+=25)),"string"==typeof e.id&&""!==e.id&&(this.REGEXPS.negative.test(e.id)&&(t-=25),this.REGEXPS.positive.test(e.id)&&(t+=25)),t},
|
309 |
+
/**
|
310 |
+
* Clean a node of all elements of type "tag".
|
311 |
+
* (Unless it's a youtube/vimeo video. People love movies.)
|
312 |
+
*
|
313 |
+
* @param Element
|
314 |
+
* @param string tag to clean
|
315 |
+
* @return void
|
316 |
+
**/
|
317 |
+
_clean:function(e,t){var i=-1!==["object","embed","iframe"].indexOf(t);this._removeNodes(this._getAllNodesWithTag(e,[t]),function(e){if(i){for(var t=0;t<e.attributes.length;t++)if(this._allowedVideoRegex.test(e.attributes[t].value))return!1;if("object"===e.tagName&&this._allowedVideoRegex.test(e.innerHTML))return!1}return!0})},
|
318 |
+
/**
|
319 |
+
* Check if a given node has one of its ancestor tag name matching the
|
320 |
+
* provided one.
|
321 |
+
* @param HTMLElement node
|
322 |
+
* @param String tagName
|
323 |
+
* @param Number maxDepth
|
324 |
+
* @param Function filterFn a filter to invoke to determine whether this node 'counts'
|
325 |
+
* @return Boolean
|
326 |
+
*/
|
327 |
+
_hasAncestorTag:function(e,t,i,a){i=i||3,t=t.toUpperCase();for(var r=0;e.parentNode;){if(i>0&&r>i)return!1;if(e.parentNode.tagName===t&&(!a||a(e.parentNode)))return!0;e=e.parentNode,r++}return!1},
|
328 |
+
/**
|
329 |
+
* Return an object indicating how many rows and columns this table has.
|
330 |
+
*/
|
331 |
+
_getRowAndColumnCount:function(e){for(var t=0,i=0,a=e.getElementsByTagName("tr"),r=0;r<a.length;r++){var n=a[r].getAttribute("rowspan")||0;n&&(n=parseInt(n,10)),t+=n||1;for(var s=0,l=a[r].getElementsByTagName("td"),o=0;o<l.length;o++){var h=l[o].getAttribute("colspan")||0;h&&(h=parseInt(h,10)),s+=h||1}i=Math.max(i,s)}return{rows:t,columns:i}},
|
332 |
+
/**
|
333 |
+
* Look for 'data' (as opposed to 'layout') tables, for which we use
|
334 |
+
* similar checks as
|
335 |
+
* https://searchfox.org/mozilla-central/rev/f82d5c549f046cb64ce5602bfd894b7ae807c8f8/accessible/generic/TableAccessible.cpp#19
|
336 |
+
*/
|
337 |
+
_markDataTables:function(e){for(var t=e.getElementsByTagName("table"),i=0;i<t.length;i++){var a=t[i];if("presentation"!=a.getAttribute("role"))if("0"!=a.getAttribute("datatable"))if(a.getAttribute("summary"))a._readabilityDataTable=!0;else{var r=a.getElementsByTagName("caption")[0];if(r&&r.childNodes.length>0)a._readabilityDataTable=!0;else if(["col","colgroup","tfoot","thead","th"].some(function(e){return!!a.getElementsByTagName(e)[0]}))this.log("Data table because found data-y descendant"),a._readabilityDataTable=!0;else if(a.getElementsByTagName("table")[0])a._readabilityDataTable=!1;else{var n=this._getRowAndColumnCount(a);n.rows>=10||n.columns>4?a._readabilityDataTable=!0:a._readabilityDataTable=n.rows*n.columns>10}}else a._readabilityDataTable=!1;else a._readabilityDataTable=!1}},
|
338 |
+
/* convert images and figures that have properties like data-src into images that can be loaded without JS */
|
339 |
+
_fixLazyImages:function(e){this._forEachNode(this._getAllNodesWithTag(e,["img","picture","figure"]),function(e){if(e.src&&this.REGEXPS.b64DataUrl.test(e.src)){if("image/svg+xml"===this.REGEXPS.b64DataUrl.exec(e.src)[1])return;for(var t=!1,i=0;i<e.attributes.length;i++){var a=e.attributes[i];if("src"!==a.name&&/\.(jpg|jpeg|png|webp)/i.test(a.value)){t=!0;break}}if(t){var r=e.src.search(/base64\s*/i)+7;e.src.length-r<133&&e.removeAttribute("src")}}if(!(e.src||e.srcset&&"null"!=e.srcset)||-1!==e.className.toLowerCase().indexOf("lazy"))for(var n=0;n<e.attributes.length;n++)if("src"!==(a=e.attributes[n]).name&&"srcset"!==a.name&&"alt"!==a.name){var s=null;if(/\.(jpg|jpeg|png|webp)\s+\d/.test(a.value)?s="srcset":/^\s*\S+\.(jpg|jpeg|png|webp)\S*\s*$/.test(a.value)&&(s="src"),s)if("IMG"===e.tagName||"PICTURE"===e.tagName)e.setAttribute(s,a.value);else if("FIGURE"===e.tagName&&!this._getAllNodesWithTag(e,["img","picture"]).length){var l=this._doc.createElement("img");l.setAttribute(s,a.value),e.appendChild(l)}}})},_getTextDensity:function(e,t){var i=this._getInnerText(e,!0).length;if(0===i)return 0;var a=0,r=this._getAllNodesWithTag(e,t);return this._forEachNode(r,e=>a+=this._getInnerText(e,!0).length),a/i},
|
340 |
+
/**
|
341 |
+
* Clean an element of all tags of type "tag" if they look fishy.
|
342 |
+
* "Fishy" is an algorithm based on content length, classnames, link density, number of images & embeds, etc.
|
343 |
+
*
|
344 |
+
* @return void
|
345 |
+
**/
|
346 |
+
_cleanConditionally:function(e,t){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(e,[t]),function(e){var i=function(e){return e._readabilityDataTable},a="ul"===t||"ol"===t;if(!a){var r=0,n=this._getAllNodesWithTag(e,["ul","ol"]);this._forEachNode(n,e=>r+=this._getInnerText(e).length),a=r/this._getInnerText(e).length>.9}if("table"===t&&i(e))return!1;if(this._hasAncestorTag(e,"table",-1,i))return!1;if(this._hasAncestorTag(e,"code"))return!1;var s=this._getClassWeight(e);if(this.log("Cleaning Conditionally",e),s+0<0)return!0;if(this._getCharCount(e,",")<10){for(var l=e.getElementsByTagName("p").length,o=e.getElementsByTagName("img").length,h=e.getElementsByTagName("li").length-100,c=e.getElementsByTagName("input").length,d=this._getTextDensity(e,["h1","h2","h3","h4","h5","h6"]),g=0,u=this._getAllNodesWithTag(e,["object","embed","iframe"]),m=0;m<u.length;m++){for(var _=0;_<u[m].attributes.length;_++)if(this._allowedVideoRegex.test(u[m].attributes[_].value))return!1;if("object"===u[m].tagName&&this._allowedVideoRegex.test(u[m].innerHTML))return!1;g++}var f=this._getLinkDensity(e),p=this._getInnerText(e).length,N=o>1&&l/o<.5&&!this._hasAncestorTag(e,"figure")||!a&&h>l||c>Math.floor(l/3)||!a&&d<.9&&p<25&&(0===o||o>2)&&!this._hasAncestorTag(e,"figure")||!a&&s<25&&f>.2||s>=25&&f>.5||1===g&&p<75||g>1;if(a&&N){for(var E=0;E<e.children.length;E++)if(e.children[E].children.length>1)return N;if(o==e.getElementsByTagName("li").length)return!1}return N}return!1})},
|
347 |
+
/**
|
348 |
+
* Clean out elements that match the specified conditions
|
349 |
+
*
|
350 |
+
* @param Element
|
351 |
+
* @param Function determines whether a node should be removed
|
352 |
+
* @return void
|
353 |
+
**/
|
354 |
+
_cleanMatchedNodes:function(e,t){for(var i=this._getNextNode(e,!0),a=this._getNextNode(e);a&&a!=i;)a=t.call(this,a,a.className+" "+a.id)?this._removeAndGetNext(a):this._getNextNode(a)},
|
355 |
+
/**
|
356 |
+
* Clean out spurious headers from an Element.
|
357 |
+
*
|
358 |
+
* @param Element
|
359 |
+
* @return void
|
360 |
+
**/
|
361 |
+
_cleanHeaders:function(e){let t=this._getAllNodesWithTag(e,["h1","h2"]);this._removeNodes(t,function(e){let t=this._getClassWeight(e)<0;return t&&this.log("Removing header with low class weight:",e),t})},
|
362 |
+
/**
|
363 |
+
* Check if this node is an H1 or H2 element whose content is mostly
|
364 |
+
* the same as the article title.
|
365 |
+
*
|
366 |
+
* @param Element the node to check.
|
367 |
+
* @return boolean indicating whether this is a title-like header.
|
368 |
+
*/
|
369 |
+
_headerDuplicatesTitle:function(e){if("H1"!=e.tagName&&"H2"!=e.tagName)return!1;var t=this._getInnerText(e,!1);return this.log("Evaluating similarity of header:",t,this._articleTitle),this._textSimilarity(this._articleTitle,t)>.75},_flagIsActive:function(e){return(this._flags&e)>0},_removeFlag:function(e){this._flags=this._flags&~e},_isProbablyVisible:function(e){return(!e.style||"none"!=e.style.display)&&(!e.style||"hidden"!=e.style.visibility)&&!e.hasAttribute("hidden")&&(!e.hasAttribute("aria-hidden")||"true"!=e.getAttribute("aria-hidden")||e.className&&e.className.indexOf&&-1!==e.className.indexOf("fallback-image"))},
|
370 |
+
/**
|
371 |
+
* Runs readability.
|
372 |
+
*
|
373 |
+
* Workflow:
|
374 |
+
* 1. Prep the document by removing script tags, css, etc.
|
375 |
+
* 2. Build readability's DOM tree.
|
376 |
+
* 3. Grab the article content from the current dom tree.
|
377 |
+
* 4. Replace the current DOM tree with the new one.
|
378 |
+
* 5. Read peacefully.
|
379 |
+
*
|
380 |
+
* @return void
|
381 |
+
**/
|
382 |
+
parse:function(){if(this._maxElemsToParse>0){var e=this._doc.getElementsByTagName("*").length;if(e>this._maxElemsToParse)throw new Error("Aborting parsing document; "+e+" elements found")}this._unwrapNoscriptImages(this._doc);var t=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var i=this._getArticleMetadata(t);this._articleTitle=i.title;var a=this._grabArticle();if(!a)return null;if(this.log("Grabbed: "+a.innerHTML),this._postProcessContent(a),!i.excerpt){var r=a.getElementsByTagName("p");r.length>0&&(i.excerpt=r[0].textContent.trim())}var n=a.textContent;return{title:this._articleTitle,byline:i.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(a),textContent:n,length:n.length,excerpt:i.excerpt,siteName:i.siteName||this._articleSiteName,publishedTime:i.publishedTime}}},e.exports=t}(t)),t.exports),l=(i||(i=1,function(){var e={
|
383 |
+
// NOTE: These two regular expressions are duplicated in
|
384 |
+
// Readability.js. Please keep both copies in sync.
|
385 |
+
unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function t(e){return(!e.style||"none"!=e.style.display)&&!e.hasAttribute("hidden")&&(!e.hasAttribute("aria-hidden")||"true"!=e.getAttribute("aria-hidden")||e.className&&e.className.indexOf&&-1!==e.className.indexOf("fallback-image"))}n.exports=function(i,a={}){"function"==typeof a&&(a={visibilityChecker:a});var r={minScore:20,minContentLength:140,visibilityChecker:t};a=Object.assign(r,a);var n=i.querySelectorAll("p, pre, article"),s=i.querySelectorAll("div > br");if(s.length){var l=new Set(n);[].forEach.call(s,function(e){l.add(e.parentNode)}),n=Array.from(l)}var o=0;return[].some.call(n,function(t){if(!a.visibilityChecker(t))return!1;var i=t.className+" "+t.id;if(e.unlikelyCandidates.test(i)&&!e.okMaybeItsACandidate.test(i))return!1;if(t.matches("li p"))return!1;var r=t.textContent.trim().length;return!(r<a.minContentLength)&&(o+=Math.sqrt(r-a.minContentLength))>a.minScore})}}()),n.exports);return a={Readability:s,isProbablyReaderable:l}}();export{s as r};
|
.output/public/assets/@popperjs-CRf0lzMe.js
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var e="top",t="bottom",n="right",r="left",o="auto",i=[e,t,n,r],a="start",s="end",f="viewport",c="popper",p=i.reduce(function(e,t){return e.concat([t+"-"+a,t+"-"+s])},[]),u=[].concat(i,[o]).reduce(function(e,t){return e.concat([t,t+"-"+a,t+"-"+s])},[]),l=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function d(e){return e?(e.nodeName||"").toLowerCase():null}function h(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function m(e){return e instanceof h(e).Element||e instanceof Element}function v(e){return e instanceof h(e).HTMLElement||e instanceof HTMLElement}function g(e){return"undefined"!=typeof ShadowRoot&&(e instanceof h(e).ShadowRoot||e instanceof ShadowRoot)}const y={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];v(o)&&d(o)&&(Object.assign(o.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});v(r)&&d(r)&&(Object.assign(r.style,i),Object.keys(o).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]};function b(e){return e.split("-")[0]}var x=Math.max,w=Math.min,O=Math.round;function j(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function E(){return!/^((?!chrome|android).)*safari/i.test(j())}function D(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&v(e)&&(o=e.offsetWidth>0&&O(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&O(r.height)/e.offsetHeight||1);var a=(m(e)?h(e):window).visualViewport,s=!E()&&n,f=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,p=r.width/o,u=r.height/i;return{width:p,height:u,top:c,right:f+p,bottom:c+u,left:f,x:f,y:c}}function A(e){var t=D(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function k(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&g(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function L(e){return h(e).getComputedStyle(e)}function W(e){return["table","td","th"].indexOf(d(e))>=0}function M(e){return((m(e)?e.ownerDocument:
|
2 |
+
// $FlowFixMe[prop-missing]
|
3 |
+
e.document)||window.document).documentElement}function P(e){return"html"===d(e)?e:
|
4 |
+
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
5 |
+
// $FlowFixMe[incompatible-return]
|
6 |
+
// $FlowFixMe[prop-missing]
|
7 |
+
e.assignedSlot||// step into the shadow DOM of the parent of a slotted node
|
8 |
+
e.parentNode||(// DOM Element detected
|
9 |
+
g(e)?e.host:null)||// ShadowRoot detected
|
10 |
+
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
11 |
+
M(e)}function B(e){return v(e)&&// https://github.com/popperjs/popper-core/issues/837
|
12 |
+
"fixed"!==L(e).position?e.offsetParent:null}function H(e){for(var t=h(e),n=B(e);n&&W(n)&&"static"===L(n).position;)n=B(n);return n&&("html"===d(n)||"body"===d(n)&&"static"===L(n).position)?t:n||function(e){var t=/firefox/i.test(j());if(/Trident/i.test(j())&&v(e)&&"fixed"===L(e).position)return null;var n=P(e);for(g(n)&&(n=n.host);v(n)&&["html","body"].indexOf(d(n))<0;){var r=L(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function R(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function T(e,t,n){return x(e,w(t,n))}function S(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function V(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function q(e){return e.split("-")[1]}var C={top:"auto",right:"auto",bottom:"auto",left:"auto"};function N(o){var i,a=o.popper,f=o.popperRect,c=o.placement,p=o.variation,u=o.offsets,l=o.position,d=o.gpuAcceleration,m=o.adaptive,v=o.roundOffsets,g=o.isFixed,y=u.x,b=void 0===y?0:y,x=u.y,w=void 0===x?0:x,j="function"==typeof v?v({x:b,y:w}):{x:b,y:w};b=j.x,w=j.y;var E=u.hasOwnProperty("x"),D=u.hasOwnProperty("y"),A=r,k=e,W=window;if(m){var P=H(a),B="clientHeight",R="clientWidth";if(P===h(a)&&"static"!==L(P=M(a)).position&&"absolute"===l&&(B="scrollHeight",R="scrollWidth"),c===e||(c===r||c===n)&&p===s)k=t,w-=(g&&P===W&&W.visualViewport?W.visualViewport.height:
|
13 |
+
// $FlowFixMe[prop-missing]
|
14 |
+
P[B])-f.height,w*=d?1:-1;if(c===r||(c===e||c===t)&&p===s)A=n,b-=(g&&P===W&&W.visualViewport?W.visualViewport.width:
|
15 |
+
// $FlowFixMe[prop-missing]
|
16 |
+
P[R])-f.width,b*=d?1:-1}var T,S=Object.assign({position:l},m&&C),V=!0===v?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:O(n*o)/o||0,y:O(r*o)/o||0}}({x:b,y:w},h(a)):{x:b,y:w};return b=V.x,w=V.y,d?Object.assign({},S,((T={})[k]=D?"0":"",T[A]=E?"0":"",T.transform=(W.devicePixelRatio||1)<=1?"translate("+b+"px, "+w+"px)":"translate3d("+b+"px, "+w+"px, 0)",T)):Object.assign({},S,((i={})[k]=D?w+"px":"",i[A]=E?b+"px":"",i.transform="",i))}var I={passive:!0};var F={left:"right",right:"left",bottom:"top",top:"bottom"};function U(e){return e.replace(/left|right|bottom|top/g,function(e){return F[e]})}var z={start:"end",end:"start"};function _(e){return e.replace(/start|end/g,function(e){return z[e]})}function X(e){var t=h(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Y(e){return D(M(e)).left+X(e).scrollLeft}function G(e){var t=L(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function J(e){return["html","body","#document"].indexOf(d(e))>=0?e.ownerDocument.body:v(e)&&G(e)?e:J(P(e))}function K(e,t){var n;void 0===t&&(t=[]);var r=J(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=h(r),a=o?[i].concat(i.visualViewport||[],G(r)?r:[]):r,s=t.concat(a);return o?s:
|
17 |
+
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
18 |
+
s.concat(K(P(a)))}function Q(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Z(e,t,n){return t===f?Q(function(e,t){var n=h(e),r=M(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,f=0;if(o){i=o.width,a=o.height;var c=E();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,f=o.offsetTop)}return{width:i,height:a,x:s+Y(e),y:f}}(e,n)):m(t)?function(e,t){var n=D(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Q(function(e){var t,n=M(e),r=X(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=x(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=x(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Y(e),f=-r.scrollTop;return"rtl"===L(o||n).direction&&(s+=x(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:f}}(M(e)))}function $(e,t,n,r){var o="clippingParents"===t?function(e){var t=K(P(e)),n=["absolute","fixed"].indexOf(L(e).position)>=0&&v(e)?H(e):e;return m(n)?t.filter(function(e){return m(e)&&k(e,n)&&"body"!==d(e)}):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(t,n){var o=Z(e,n,r);return t.top=x(o.top,t.top),t.right=w(o.right,t.right),t.bottom=w(o.bottom,t.bottom),t.left=x(o.left,t.left),t},Z(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function ee(o){var i,f=o.reference,c=o.element,p=o.placement,u=p?b(p):null,l=p?q(p):null,d=f.x+f.width/2-c.width/2,h=f.y+f.height/2-c.height/2;switch(u){case e:i={x:d,y:f.y-c.height};break;case t:i={x:d,y:f.y+f.height};break;case n:i={x:f.x+f.width,y:h};break;case r:i={x:f.x-c.width,y:h};break;default:i={x:f.x,y:f.y}}var m=u?R(u):null;if(null!=m){var v="y"===m?"height":"width";switch(l){case a:i[m]=i[m]-(f[v]/2-c[v]/2);break;case s:i[m]=i[m]+(f[v]/2-c[v]/2)}}return i}function te(r,o){void 0===o&&(o={});var a=o,s=a.placement,p=void 0===s?r.placement:s,u=a.strategy,l=void 0===u?r.strategy:u,d=a.boundary,h=void 0===d?"clippingParents":d,v=a.rootBoundary,g=void 0===v?f:v,y=a.elementContext,b=void 0===y?c:y,x=a.altBoundary,w=void 0!==x&&x,O=a.padding,j=void 0===O?0:O,E=S("number"!=typeof j?j:V(j,i)),A=b===c?"reference":c,k=r.rects.popper,L=r.elements[w?A:b],W=$(m(L)?L:L.contextElement||M(r.elements.popper),h,g,l),P=D(r.elements.reference),B=ee({reference:P,element:k,placement:p}),H=Q(Object.assign({},k,B)),R=b===c?H:P,T={top:W.top-R.top+E.top,bottom:R.bottom-W.bottom+E.bottom,left:W.left-R.left+E.left,right:R.right-W.right+E.right},q=r.modifiersData.offset;if(b===c&&q){var C=q[p];Object.keys(T).forEach(function(r){var o=[n,t].indexOf(r)>=0?1:-1,i=[e,t].indexOf(r)>=0?"y":"x";T[r]+=C[i]*o})}return T}function ne(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function re(o){return[e,n,t,r].some(function(e){return o[e]>=0})}function oe(e,t,n){void 0===n&&(n=!1);var r,o,i=v(t),a=v(t)&&function(e){var t=e.getBoundingClientRect(),n=O(t.width)/e.offsetWidth||1,r=O(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=M(t),f=D(e,a,n),c={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(i||!i&&!n)&&(("body"!==d(t)||// https://github.com/popperjs/popper-core/issues/1078
|
19 |
+
G(s))&&(c=(r=t)!==h(r)&&v(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:X(r)),v(t)?((p=D(t,!0)).x+=t.clientLeft,p.y+=t.clientTop):s&&(p.x=Y(s))),{x:f.left+c.scrollLeft-p.x,y:f.top+c.scrollTop-p.y,width:f.width,height:f.height}}function ie(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||o(e)}),r}var ae={placement:"bottom",modifiers:[],strategy:"absolute"};function se(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function fe(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?ae:o;return function(e,t,n){void 0===n&&(n=i);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},ae,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],c=!1,p={state:s,setOptions:function(n){var o="function"==typeof n?n(s.options):n;u(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:m(e)?K(e):e.contextElement?K(e.contextElement):[],popper:K(t)};var a,c,d=function(e){var t=ie(e);return l.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}((a=[].concat(r,s.options.modifiers),c=a.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{}),Object.keys(c).map(function(e){return c[e]})));return s.orderedModifiers=d.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:s,name:t,instance:p,options:r}),a=function(){};f.push(i||a)}}),p.update()},
|
20 |
+
// Sync update – it will always be executed, even if not necessary. This
|
21 |
+
// is useful for low frequency updates where sync behavior simplifies the
|
22 |
+
// logic.
|
23 |
+
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
24 |
+
// prefer the async Popper#update method
|
25 |
+
forceUpdate:function(){if(!c){var e=s.elements,t=e.reference,n=e.popper;if(se(t,n)){s.rects={reference:oe(t,H(n),"fixed"===s.options.strategy),popper:A(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<s.orderedModifiers.length;r++)if(!0!==s.reset){var o=s.orderedModifiers[r],i=o.fn,a=o.options,f=void 0===a?{}:a,u=o.name;"function"==typeof i&&(s=i({state:s,options:f,name:u,instance:p})||s)}else s.reset=!1,r=-1}}},
|
26 |
+
// Async and optimistically optimized update – it will not be executed if
|
27 |
+
// not necessary (debounced to run at most once-per-tick)
|
28 |
+
update:(o=function(){return new Promise(function(e){p.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(o())})})),a}),destroy:function(){u(),c=!0}};if(!se(e,t))return p;function u(){f.forEach(function(e){return e()}),f=[]}return p.setOptions(n).then(function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)}),p}}var ce=fe({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,f=h(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(e){e.addEventListener("scroll",n.update,I)}),s&&f.addEventListener("resize",n.update,I),function(){i&&c.forEach(function(e){e.removeEventListener("scroll",n.update,I)}),s&&f.removeEventListener("resize",n.update,I)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=ee({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,f=void 0===s||s,c={placement:b(t.placement),variation:q(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,N(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:f})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,N(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},y,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var o=t.state,i=t.options,a=t.name,s=i.offset,f=void 0===s?[0,0]:s,c=u.reduce(function(t,i){return t[i]=function(t,o,i){var a=b(t),s=[r,e].indexOf(a)>=0?-1:1,f="function"==typeof i?i(Object.assign({},o,{placement:t})):i,c=f[0],p=f[1];return c=c||0,p=(p||0)*s,[r,n].indexOf(a)>=0?{x:p,y:c}:{x:c,y:p}}(i,o.rects,f),t},{}),p=c[o.placement],l=p.x,d=p.y;null!=o.modifiersData.popperOffsets&&(o.modifiersData.popperOffsets.x+=l,o.modifiersData.popperOffsets.y+=d),o.modifiersData[a]=c}},{name:"flip",enabled:!0,phase:"main",fn:function(s){var f=s.state,c=s.options,l=s.name;if(!f.modifiersData[l]._skip){for(var d=c.mainAxis,h=void 0===d||d,m=c.altAxis,v=void 0===m||m,g=c.fallbackPlacements,y=c.padding,x=c.boundary,w=c.rootBoundary,O=c.altBoundary,j=c.flipVariations,E=void 0===j||j,D=c.allowedAutoPlacements,A=f.options.placement,k=b(A),L=g||(k===A||!E?[U(A)]:function(e){if(b(e)===o)return[];var t=U(e);return[_(e),t,_(t)]}(A)),W=[A].concat(L).reduce(function(e,t){return e.concat(b(t)===o?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,s=n.padding,f=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?u:c,d=q(r),h=d?f?p:p.filter(function(e){return q(e)===d}):i,m=h.filter(function(e){return l.indexOf(e)>=0});0===m.length&&(m=h);var v=m.reduce(function(t,n){return t[n]=te(e,{placement:n,boundary:o,rootBoundary:a,padding:s})[b(n)],t},{});return Object.keys(v).sort(function(e,t){return v[e]-v[t]})}(f,{placement:t,boundary:x,rootBoundary:w,padding:y,flipVariations:E,allowedAutoPlacements:D}):t)},[]),M=f.rects.reference,P=f.rects.popper,B=new Map,H=!0,R=W[0],T=0;T<W.length;T++){var S=W[T],V=b(S),C=q(S)===a,N=[e,t].indexOf(V)>=0,I=N?"width":"height",F=te(f,{placement:S,boundary:x,rootBoundary:w,altBoundary:O,padding:y}),z=N?C?n:r:C?t:e;M[I]>P[I]&&(z=U(z));var X=U(z),Y=[];if(h&&Y.push(F[V]<=0),v&&Y.push(F[z]<=0,F[X]<=0),Y.every(function(e){return e})){R=S,H=!1;break}B.set(S,Y)}if(H)for(var G=function(e){var t=W.find(function(t){var n=B.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return R=t,"break"},J=E?3:1;J>0;J--){if("break"===G(J))break}f.placement!==R&&(f.modifiersData[l]._skip=!0,f.placement=R,f.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(o){var i=o.state,s=o.options,f=o.name,c=s.mainAxis,p=void 0===c||c,u=s.altAxis,l=void 0!==u&&u,d=s.boundary,h=s.rootBoundary,m=s.altBoundary,v=s.padding,g=s.tether,y=void 0===g||g,O=s.tetherOffset,j=void 0===O?0:O,E=te(i,{boundary:d,rootBoundary:h,padding:v,altBoundary:m}),D=b(i.placement),k=q(i.placement),L=!k,W=R(D),M="x"===W?"y":"x",P=i.modifiersData.popperOffsets,B=i.rects.reference,S=i.rects.popper,V="function"==typeof j?j(Object.assign({},i.rects,{placement:i.placement})):j,C="number"==typeof V?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),N=i.modifiersData.offset?i.modifiersData.offset[i.placement]:null,I={x:0,y:0};if(P){if(p){var F,U="y"===W?e:r,z="y"===W?t:n,_="y"===W?"height":"width",X=P[W],Y=X+E[U],G=X-E[z],J=y?-S[_]/2:0,K=k===a?B[_]:S[_],Q=k===a?-S[_]:-B[_],Z=i.elements.arrow,$=y&&Z?A(Z):{width:0,height:0},ee=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ne=ee[U],re=ee[z],oe=T(0,B[_],$[_]),ie=L?B[_]/2-J-oe-ne-C.mainAxis:K-oe-ne-C.mainAxis,ae=L?-B[_]/2+J+oe+re+C.mainAxis:Q+oe+re+C.mainAxis,se=i.elements.arrow&&H(i.elements.arrow),fe=se?"y"===W?se.clientTop||0:se.clientLeft||0:0,ce=null!=(F=null==N?void 0:N[W])?F:0,pe=X+ae-ce,ue=T(y?w(Y,X+ie-ce-fe):Y,X,y?x(G,pe):G);P[W]=ue,I[W]=ue-X}if(l){var le,de="x"===W?e:r,he="x"===W?t:n,me=P[M],ve="y"===M?"height":"width",ge=me+E[de],ye=me-E[he],be=-1!==[e,r].indexOf(D),xe=null!=(le=null==N?void 0:N[M])?le:0,we=be?ge:me-B[ve]-S[ve]-xe+C.altAxis,Oe=be?me+B[ve]+S[ve]-xe-C.altAxis:ye,je=y&&be?(De=T(we,me,Ee=Oe))>Ee?Ee:De:T(y?we:ge,me,y?Oe:ye);P[M]=je,I[M]=je-me}var Ee,De;i.modifiersData[f]=I}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(o){var a,s=o.state,f=o.name,c=o.options,p=s.elements.arrow,u=s.modifiersData.popperOffsets,l=b(s.placement),d=R(l),h=[r,n].indexOf(l)>=0?"height":"width";if(p&&u){var m=function(e,t){return S("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:V(e,i))}(c.padding,s),v=A(p),g="y"===d?e:r,y="y"===d?t:n,x=s.rects.reference[h]+s.rects.reference[d]-u[d]-s.rects.popper[h],w=u[d]-s.rects.reference[d],O=H(p),j=O?"y"===d?O.clientHeight||0:O.clientWidth||0:0,E=x/2-w/2,D=m[g],k=j-v[h]-m[y],L=j/2-v[h]/2+E,W=T(D,L,k),M=d;s.modifiersData[f]=((a={})[M]=W,a.centerOffset=W-L,a)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&k(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=te(t,{elementContext:"reference"}),s=te(t,{altBoundary:!0}),f=ne(a,r),c=ne(s,o,i),p=re(f),u=re(c);t.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":u})}}]});export{ce as c};
|
.output/public/assets/@traptitech-B3kbI6Qt.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{g as r}from"./@babel-Cvfd6jjG.js";import{r as e}from"./katex-CrhcM6Ws.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/@vue-D4KNhCYp.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
.output/public/assets/@vueuse-GpL_9d7-.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-D4KNhCYp.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(",");return void(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}))}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-Bgg_AWFD.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-YsHH5-3J.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,X as r,F as i,aa as u,J as c,a9 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-D4KNhCYp.js";import{t as k,u as A,e as b,m as C}from"./mermaid-render-X-MOXnA6.js";import{$ as P,b as M,Y as z,x as V,U as L,s as U}from"./tdesign-vue-next-naVa2zv2.js";import{c as B,P as D,af as R}from"./tdesign-icons-vue-next-BrEXHWAJ.js";import{m as j}from"./mammoth-DStLgpIA.js";import{r as N,u as F}from"./xlsx-80LBlKxU.js";import{_ as T,a as S}from"./pdfjs-dist-Be5_ovpP.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 E={key:0,class:"flex gap-2 flex-wrap"},G=["onClick"],I={class:"max-w-[160px] overflow-hidden text-ellipsis text-nowrap"},_={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"},q=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=M,A=z,b=V;return e.files.length>0?(o(),s("div",E,[(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",I,f(a.name),1),v("div",_,[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(B),{slot:"icon"})]),_:2},1032,["onClick"])):n("",!0)],8,G)]),_: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(B),{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)}}}),W={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}){T.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 z=e,V=l(""),B=l([]),E=l(-1);l("");const G=a,I=()=>{const e=V.value.trim();G("input",{content:e,files:_.value.map(e=>({content:e.content,url:e.url,id:e.raw.path,name:e.name,type:e.type,size:e.size}))}),e&&(B.value.push(e),B.value.length>50&&B.value.shift(),localStorage.setItem("chatHistory",JSON.stringify(B.value)),V.value="",_.value=[],E.value=-1)},_=l([]),K=async e=>{try{for(const a of e){const e=await J(a.raw);a.content=e,_.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 j.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=F.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(z.autoCompleteEnabled&&e.startsWith("@")&&(oe.value.includes(e)||"@"===e))return void t.preventDefault();t.preventDefault(),I()}else if("ArrowUp"===t.key||"ArrowDown"===t.key){if(-1===E.value&&V.value)return;if(t.preventDefault(),"ArrowUp"===t.key){if(0===B.value.length)return;E.value<B.value.length-1&&E.value++}else E.value>-1&&E.value--;-1===E.value?V.value="":V.value=B.value[B.value.length-1-E.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(E.value=-1,!z.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&&(B.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=M,g=L,w=U;return o(),s("div",W,[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(q,{files:_.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(D),{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:I,size:"large",variant:"base"},{default:p(()=>[r(m(R),{slot:"icon"})]),_:1})])],32)])}}});export{ee as _,q as a,H as c};
|
.output/public/assets/FrameContent-CKkluf0G.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{c as e}from"./@vueuse-GpL_9d7-.js";import{d as t}from"./lodash-BNwhaWF2.js";import{p as a,u as r,_ as o}from"./mermaid-render-X-MOXnA6.js";import{V as s}from"./tdesign-vue-next-naVa2zv2.js";import{l as n,a as i,f as m,w as u,v as l,y as d,X as p,a9 as c,A as f,I as g,B as h,u as v}from"./@vue-D4KNhCYp.js";const y=["src"],w=o(n({__name:"FrameContent",props:{frameSrc:String,offset:{type:Number,default:0}},setup(o){const n=o,{width:w,height:x}=e(),_=i(!0),F=i(window.innerHeight),b=i(),j=m(()=>[`${a}-iframe-page`]),B=r(),I=m(()=>({height:`${F.value}px`})),S=getComputedStyle(document.documentElement),H=S.getPropertyValue("--td-comp-size-xxxl"),V=S.getPropertyValue("--td-comp-size-xxl"),$=S.getPropertyValue("--td-comp-paddingTB-m");function z(){const e=v(b);if(!e)return;let t=0;const{showLayoutHeader:a,showFooter:r,showBreadcrumb:o}=B,s=a?parseFloat(H):0,i=document.querySelector(".t-breadcrumb"),m=s+(o?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($)+(r?parseFloat(V):0)+2+n.offset;F.value=window.innerHeight-m,t=document.documentElement.clientHeight-m,e.style.height=`${t}px`}function C(){_.value=!1,z()}return u([w,x],t(z,250)),u([()=>B.showFooter,()=>B.showBreadcrumb],t(z,250)),(e,t)=>{const a=s;return d(),l("div",{class:g(j.value),style:h(I.value)},[p(a,{loading:_.value,size:"large",style:h(I.value)},{default:c(()=>[f("iframe",{ref_key:"frameRef",ref:b,src:o.frameSrc,class:g(`${j.value}__main`),onLoad:C},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-CkN0N_Db.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{l as e,K as t,a,U 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,X as f,a9 as g,u as h,aa as x,J as y,G as w,n as b,ai as _,I as k,ad as C,B as j}from"./@vue-D4KNhCYp.js";import{m as T}from"./markdown-BriXMo42.js";import{s as $,b as B,Y as R,I as S,Z as z,_ as M,E,c as V,j as A,m as H,K as L,e as O}from"./tdesign-vue-next-naVa2zv2.js";import{c as U,ad as q,v as I,l as D,$ as P,W as F,af as Y}from"./tdesign-icons-vue-next-BrEXHWAJ.js";import{_ as K,b as N,t as W}from"./mermaid-render-X-MOXnA6.js";import{a as Z}from"./ChatInput.vue_vue_type_style_index_0_lang-YsHH5-3J.js";import{U as G}from"./@wdns-Bgg_AWFD.js";import{f as J,b as X}from"./fetch-hZBedsIY.js";import{v as Q}from"./uuid-_R2nDvl_.js";import{a as ee}from"./main-CsAWi2Wi.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=_,F=a(j.content.text),Y=()=>{P("save",F.value)},K=()=>{F.value=j.content.text,P("cancel")},N=(e,t)=>{},W=a(null);return n(()=>j.isEditing,e=>{e&&(F.value=j.content.text,b(()=>{W.value.$el.querySelector("textarea").focus()}))}),(t,a)=>{const l=$,n=B,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:F.value,"onUpdate:modelValue":a[0]||(a[0]=e=>F.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(U),{slot:"icon"})]),_:1}),f(n,{shape:"circle",size:"medium",onClick:Y},{default:g(()=>[f(h(q),{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(I),{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=B,s=$;return c(),i(r,null,[f(Z,{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(U),{slot:"icon"})]),_:1}),f(n,{size:"large",shape:"circle",variant:"text",onClick:V},{default:g(()=>[f(h(q),{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=B;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(G),{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(U),{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"},$e={class:"flex flex-col gap-2 p-2"},Be={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(""),q=()=>{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`}},I=a(!1),D=a(!1),K=a(""),Z=()=>{R.value=!1,I.value=!1},G=()=>{const e=window.getSelection();navigator.clipboard.writeText(e.toString()),Z(),O.success(W("components.toolBar.copySuccessMsg"))},te=()=>{navigator.clipboard.writeText(M.value),Z(),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(()=>{q()})},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(),I.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 J(ne,e=>{M.value=e,b(()=>{q()})})):O.error(W("components.toolBar.noAssistModel"))},de=a(!1),pe=async()=>{he(),de.value=!0,oe.value=window.getSelection().toString(),b(()=>{q()})},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 X(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=()=>{I.value=!1,D.value=!1,K.value="",de.value=!1,ve.value=""};return n([M,D,de],()=>{(I.value||D.value||de.value)&&b(()=>{q()})},{deep:!0}),s(()=>{if(_.parent){new ResizeObserver(()=>{R.value&&q()}).observe(_.parent),_.parent.addEventListener("scroll",()=>{R.value&&q()})}}),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:Z}),(e,t)=>{const a=B,l=E,n=$,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:G},{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(F),{slot:"icon"})]),_:1}),f(a,{size:"small",variant:"outline",onClick:Z},{default:g(()=>[f(h(U),{slot:"icon"})]),_:1})])],512),[[m,I.value]]),u(p("div",$e,[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",Be,[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(Y),{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,__:[4]}),f(a,{onClick:ge,theme:"default",variant:"outline"},{default:g(()=>t[5]||(t[5]=[w("添加到笔记")])),_:1,__:[5]}),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/about-t2NQzCul.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{F as s}from"./FrameContent-CKkluf0G.js";import{l as t,J as o,y as r}from"./@vue-D4KNhCYp.js";import"./@vueuse-GpL_9d7-.js";import"./lodash-BNwhaWF2.js";import"./@babel-Cvfd6jjG.js";import"./core-js-pure-rpEbRaqb.js";import"./mermaid-render-X-MOXnA6.js";import"./mermaid-DztoBDuM.js";import"./@mermaid-js-CShQflH_.js";import"./langium-D_NGP6iM.js";import"./vscode-jsonrpc-CS8KotVf.js";import"./chevrotain-CHpUImcB.js";import"./@chevrotain-DMqKfIoR.js";import"./lodash-es-Cacf3aVv.js";import"./chevrotain-allstar-uapKNRlC.js";import"./vscode-languageserver-types-C-xsT5l6.js";import"./vscode-languageserver-textdocument-CJhEy_xW.js";import"./vscode-uri-CnGyqFWr.js";import"./ts-dedent-CXZ4_2mJ.js";import"./d3-transition-B7gMhpAH.js";import"./d3-timer-CJv_AqWU.js";import"./d3-dispatch-Q6TpkW-B.js";import"./d3-interpolate-DP-dmwpU.js";import"./d3-color-rIUEC1ZR.js";import"./d3-selection-CfLXJeJu.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-BJNDRQ4C.js";import"./dompurify-CFl8TL3V.js";import"./stylis-D4WAY683.js";import"./dagre-d3-es-D6GBqVHj.js";import"./@braintree-vxCX0osh.js";import"./khroma-XwI2cIem.js";import"./dayjs-BlFCBw8z.js";import"./d3-scale-DWiW64kU.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-Dy1FNIg7.js";import"./d3-format-CtKB2kpq.js";import"./d3-time-format-BMc3Utpi.js";import"./d3-time-BRbAhEAC.js";import"./d3-axis-DxpTsFyd.js";import"./d3-shape-zSUJvKTl.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-2lhqfhfB.js";import"./cytoscape-D0Lf_MdX.js";import"./cytoscape-cose-bilkent-CIWZ1EOj.js";import"./cose-base-Cjsls_Nj.js";import"./layout-base-DcgC6mbs.js";import"./d3-sankey-BFhHcGrm.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./marked-YT4AcBAC.js";import"./@iconify-ol6u86He.js";import"./cytoscape-fcose-C-UBqLtC.js";import"./pinia-CbUtajqx.js";import"./pinia-plugin-persistedstate-4rZCtVM2.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-CDZeMyKV.js";import"./tdesign-vue-next-naVa2zv2.js";import"./tdesign-icons-vue-next-BrEXHWAJ.js";import"./sortablejs-C1FtBwbv.js";import"./@popperjs-CRf0lzMe.js";import"./vue-i18n-ln5WyIOQ.js";import"./@intlify-CtDSkVkn.js";import"./@mozilla-5yaQRYvZ.js";import"./tvision-color-DZgSNFWO.js";import"./chroma-js-CAQMm5d7.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-DvN6YyXp.js";const i=t({__name:"about",setup:t=>(t,i)=>(r(),o(s,{frameSrc:"http://www.openseed.top/about"}))});export{i as default};
|
.output/public/assets/avatar.vue_vue_type_script_setup_true_lang-DlbJhpTb.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-Dldv2b64.js";import{A as p,b as v}from"./tdesign-vue-next-naVa2zv2.js";import{$ as d}from"./tdesign-icons-vue-next-BrEXHWAJ.js";import{v as g}from"./uuid-_R2nDvl_.js";import{l as b,a as f,w as h,v as j,y as x,X as _,a9 as k,u as w}from"./@vue-D4KNhCYp.js";const y={class:"h-[80px] w-[80px] relative"},E=b({__name:"avatar",props:{url:String},emits:["update"],setup(b,{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},M=b,S=f(M.url),A=E,C=async()=>{const s=Object.keys(z),e=s[Math.floor(Math.random()*s.length)],t=a(z[e],{seed:g()});S.value=await t.toDataUri(),A("update",S.value)};return M.url||C(),h(()=>M.url,a=>{M.url?S.value=a:C()}),(a,s)=>{const e=p,t=v;return x(),j("div",y,[_(e,{image:S.value,size:"80px"},null,8,["image"]),_(t,{shape:"circle",variant:"dashed",onClick:C,class:"absolute bottom-0 right-[-15px] z-50"},{default:k(()=>[_(w(d),{slot:"icon"})]),_:1})])}}});export{E as _};
|
.output/public/assets/bezier-easing-DvN6YyXp.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{g as r}from"./@babel-Cvfd6jjG.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-B5ck2R4n.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{F as s}from"./FrameContent-CKkluf0G.js";import{l as t,J as o,y as r}from"./@vue-D4KNhCYp.js";import"./@vueuse-GpL_9d7-.js";import"./lodash-BNwhaWF2.js";import"./@babel-Cvfd6jjG.js";import"./core-js-pure-rpEbRaqb.js";import"./mermaid-render-X-MOXnA6.js";import"./mermaid-DztoBDuM.js";import"./@mermaid-js-CShQflH_.js";import"./langium-D_NGP6iM.js";import"./vscode-jsonrpc-CS8KotVf.js";import"./chevrotain-CHpUImcB.js";import"./@chevrotain-DMqKfIoR.js";import"./lodash-es-Cacf3aVv.js";import"./chevrotain-allstar-uapKNRlC.js";import"./vscode-languageserver-types-C-xsT5l6.js";import"./vscode-languageserver-textdocument-CJhEy_xW.js";import"./vscode-uri-CnGyqFWr.js";import"./ts-dedent-CXZ4_2mJ.js";import"./d3-transition-B7gMhpAH.js";import"./d3-timer-CJv_AqWU.js";import"./d3-dispatch-Q6TpkW-B.js";import"./d3-interpolate-DP-dmwpU.js";import"./d3-color-rIUEC1ZR.js";import"./d3-selection-CfLXJeJu.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-BJNDRQ4C.js";import"./dompurify-CFl8TL3V.js";import"./stylis-D4WAY683.js";import"./dagre-d3-es-D6GBqVHj.js";import"./@braintree-vxCX0osh.js";import"./khroma-XwI2cIem.js";import"./dayjs-BlFCBw8z.js";import"./d3-scale-DWiW64kU.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-Dy1FNIg7.js";import"./d3-format-CtKB2kpq.js";import"./d3-time-format-BMc3Utpi.js";import"./d3-time-BRbAhEAC.js";import"./d3-axis-DxpTsFyd.js";import"./d3-shape-zSUJvKTl.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-2lhqfhfB.js";import"./cytoscape-D0Lf_MdX.js";import"./cytoscape-cose-bilkent-CIWZ1EOj.js";import"./cose-base-Cjsls_Nj.js";import"./layout-base-DcgC6mbs.js";import"./d3-sankey-BFhHcGrm.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./marked-YT4AcBAC.js";import"./@iconify-ol6u86He.js";import"./cytoscape-fcose-C-UBqLtC.js";import"./pinia-CbUtajqx.js";import"./pinia-plugin-persistedstate-4rZCtVM2.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-CDZeMyKV.js";import"./tdesign-vue-next-naVa2zv2.js";import"./tdesign-icons-vue-next-BrEXHWAJ.js";import"./sortablejs-C1FtBwbv.js";import"./@popperjs-CRf0lzMe.js";import"./vue-i18n-ln5WyIOQ.js";import"./@intlify-CtDSkVkn.js";import"./@mozilla-5yaQRYvZ.js";import"./tvision-color-DZgSNFWO.js";import"./chroma-js-CAQMm5d7.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-DvN6YyXp.js";const i=t({__name:"changelog",setup:t=>(t,i)=>(r(),o(s,{frameSrc:"http://www.openseed.top/changelog"}))});export{i as default};
|
.output/public/assets/chat-PBdUl7xn.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,X as u,a9 as d,u as v,A as p,H as m,aa as h,G as f,ac as g,ad as _,j as x,a0 as b,I as w,a1 as y,U as j,B as k,n as C}from"./@vue-D4KNhCYp.js";import{c as M,e as z,m as S,t as T,_ as A,b as I,g as V,h as E,j as R,u as P,k as U,f as H}from"./mermaid-render-X-MOXnA6.js";import{u as O,a as B}from"./vue-router-C6tQ8LXb.js";import{c as q,_ as N}from"./ChatInput.vue_vue_type_style_index_0_lang-YsHH5-3J.js";import{_ as $}from"./avatar.vue_vue_type_script_setup_true_lang-DlbJhpTb.js";import{u as D}from"./app-_ksMLlTy.js";import{p as L,q as W,r as F,T as K,b as J,s as G,t as X,u as Y,O as Z,A as Q,v as ee,w as te,n as ae,D as le,x as oe,e as ne,P as se,l as ie,y as ce,E as re,G as ue,m as de,J as ve,c as pe,j as me,K as he}from"./tdesign-vue-next-naVa2zv2.js";import{V as fe,W as ge,X as _e,Y as xe,Z as be,$ as we,a0 as ye,a1 as je,a2 as ke,a3 as Ce,a4 as Me,_ as ze,a5 as Se,a6 as Te,a7 as Ae,a8 as Ie,E as Ve,b as Ee}from"./tdesign-icons-vue-next-BrEXHWAJ.js";import{v as Re}from"./uuid-_R2nDvl_.js";import{u as Pe,a as Ue}from"./main-CsAWi2Wi.js";import{g as He,r as Oe,s as Be,a as qe,c as Ne,b as $e}from"./fetch-hZBedsIY.js";import{U as De,A as Le,_ as We,a as Fe}from"./ToolBar.vue_vue_type_style_index_0_lang-CkN0N_Db.js";import{d as Ke}from"./vuedraggable-B1GBoFxF.js";import{g as Je}from"./lyihub-rnUskFTf.js";import"./@babel-Cvfd6jjG.js";import"./core-js-pure-rpEbRaqb.js";import"./mermaid-DztoBDuM.js";import"./@mermaid-js-CShQflH_.js";import"./langium-D_NGP6iM.js";import"./vscode-jsonrpc-CS8KotVf.js";import"./chevrotain-CHpUImcB.js";import"./@chevrotain-DMqKfIoR.js";import"./lodash-es-Cacf3aVv.js";import"./chevrotain-allstar-uapKNRlC.js";import"./vscode-languageserver-types-C-xsT5l6.js";import"./vscode-languageserver-textdocument-CJhEy_xW.js";import"./vscode-uri-CnGyqFWr.js";import"./ts-dedent-CXZ4_2mJ.js";import"./d3-transition-B7gMhpAH.js";import"./d3-timer-CJv_AqWU.js";import"./d3-dispatch-Q6TpkW-B.js";import"./d3-interpolate-DP-dmwpU.js";import"./d3-color-rIUEC1ZR.js";import"./d3-selection-CfLXJeJu.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-BJNDRQ4C.js";import"./dompurify-CFl8TL3V.js";import"./stylis-D4WAY683.js";import"./dagre-d3-es-D6GBqVHj.js";import"./@braintree-vxCX0osh.js";import"./khroma-XwI2cIem.js";import"./dayjs-BlFCBw8z.js";import"./d3-scale-DWiW64kU.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-Dy1FNIg7.js";import"./d3-format-CtKB2kpq.js";import"./d3-time-format-BMc3Utpi.js";import"./d3-time-BRbAhEAC.js";import"./d3-axis-DxpTsFyd.js";import"./d3-shape-zSUJvKTl.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-2lhqfhfB.js";import"./cytoscape-D0Lf_MdX.js";import"./cytoscape-cose-bilkent-CIWZ1EOj.js";import"./cose-base-Cjsls_Nj.js";import"./layout-base-DcgC6mbs.js";import"./d3-sankey-BFhHcGrm.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./marked-YT4AcBAC.js";import"./@iconify-ol6u86He.js";import"./cytoscape-fcose-C-UBqLtC.js";import"./pinia-CbUtajqx.js";import"./pinia-plugin-persistedstate-4rZCtVM2.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-CDZeMyKV.js";import"./lodash-BNwhaWF2.js";import"./@vueuse-GpL_9d7-.js";import"./vue-i18n-ln5WyIOQ.js";import"./@intlify-CtDSkVkn.js";import"./@mozilla-5yaQRYvZ.js";import"./tvision-color-DZgSNFWO.js";import"./chroma-js-CAQMm5d7.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-DvN6YyXp.js";import"./mammoth-DStLgpIA.js";import"./xlsx-80LBlKxU.js";import"./pdfjs-dist-Be5_ovpP.js";import"./@dicebear-Dldv2b64.js";import"./sortablejs-C1FtBwbv.js";import"./@popperjs-CRf0lzMe.js";import"./vue-56_dnnO9.js";import"./eventsource-parser-CfH4qYUx.js";import"./markdown-BriXMo42.js";import"./markdown-it-link-attributes-B-tIhhZ5.js";import"./markdown-it-C25eAjLO.js";import"./mdurl-BndtMXuZ.js";import"./uc.micro-CLkLCS2f.js";import"./entities-zpoy7YfM.js";import"./linkify-it-_4qA_eNI.js";import"./punycode.js-BkBFhtvi.js";import"./@traptitech-B3kbI6Qt.js";import"./katex-CrhcM6Ws.js";import"./markdown-it-highlightjs-Df5sQmvJ.js";import"./highlight.js-CmZye5Z9.js";import"./@wdns-Bgg_AWFD.js";import"./ua-parser-js-B9IsvYgS.js";const Ge={key:0,class:"flex flex-col items-center justify-center mb-[var(--td-comp-margin-xxl)] gap-3"},Xe={class:"text-lg font-bold"},Ye={class:"overflow-y-auto overflow-x-hidden max-h-60 custom-scrollbar"},Ze={class:"flex"},Qe={class:"flex flex-row justify-between gap-3 w-full"},et=A(e({__name:"ConversationDrawer",setup(e){const x=M(),b=t({get:()=>x.showEditorDrawer,set(e){x.showEditorDrawer=e}}),w=()=>{x.showEditorDrawer=!1},y=q(),j=a(null),k=O(),C=()=>{const e=x.find(k.query.id);A.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}},A=a({});l(()=>{var e;return null==(e=j.value)?void 0:e.models},e=>{const t=Object.keys(A.value);t.forEach(t=>{e.includes(t)||delete A.value[t]}),e.forEach(e=>{t.includes(e)||(A.value[e]=!1)})});const I=t(()=>{if(!j.value)return!1;return Object.values(A.value).filter(e=>e).length>=D});l(()=>x.showEditorDrawer,e=>{e&&C()}),z();const V=t(()=>S.availableModels.value.map(e=>({value:e.id,label:S.getModelItemTitle(e),...e}))),E=Pe(),R=t(()=>{let e=E.find(j.value.agentId);return e=e||E.defaultAgent,e}),P=e=>{j.value.avatar=e},U=()=>{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=A.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:A.value[a],modelSetting:{temperature:-1,topP:-1,maxTokens:-1},status:{responseWating:!1,chating:!1,stop:!1}})}),e.models=t,j.value.saveToAgent&&(R.value.content=j.value.content),C(),ne.success(T("pages.conversation.save_conversation_success"))},H=a(!1),B=a(""),N=()=>{if(""===B.value.trim())return void ne.warning(T("pages.conversation.enter_agent_name"));const e=Re();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,ne.success(T("pages.conversation.create_agent_success"))},se=()=>{j.value.content=R.value.content},ie=()=>{j.value.saveToAgent=!j.value.saveToAgent};return o(()=>{x.showEditorDrawer=!1}),(e,t)=>{const a=F,l=W,o=J,x=K,k=G,C=X,M=Z,z=Y,E=te,O=ee,q=Q,D=ae,ne=L,ce=le,re=oe;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(T)("pages.conversation.current_conversation"),"close-btn":!0,class:"",onCloseBtnClick:w},{default:d(()=>[u(ne,{ref:"form",data:j.value,"label-width":100,"label-align":"top"},{default:d(()=>[v(y)?r("",!0):(s(),n("div",Ge,[u($,{ref:"avatarRef",url:j.value.avatar,onUpdate:P},null,8,["url"]),p("h1",Xe,m(v(T)("pages.conversation.agent"))+": "+m(R.value.name),1)])),u(l,{label:v(T)("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(T)("pages.conversation.conversation_description"),name:"content",class:"relative"},{default:d(()=>[u(x,{content:v(T)("pages.conversation.rollback_from_agent")},{default:d(()=>[u(o,{shape:"circle",variant:"text",class:"absolute z-50 right-0 top-[-32px]",onClick:se},{default:d(()=>[u(v(fe),{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(T)("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(z,{modelValue:j.value.aspectRatio,"onUpdate:modelValue":t[3]||(t[3]=e=>j.value.aspectRatio=e)},{default:d(()=>[u(M,{value:"IMAGE_ASPECT_RATIO_SQUARE",label:"方形 (1:1)"}),u(M,{value:"IMAGE_ASPECT_RATIO_PORTRAIT",label:"竖屏 (9:16)"}),u(M,{value:"IMAGE_ASPECT_RATIO_LANDSCAPE",label:"横屏 (16:9)"}),u(M,{value:"IMAGE_ASPECT_RATIO_PORTRAIT_THREE_FOUR",label:"竖屏 (3:4)"}),u(M,{value:"IMAGE_ASPECT_RATIO_LANDSCAPE_FOUR_THREE",label:"横屏 (4:3)"})]),_:1},8,["modelValue"])]),_:1}),u(l,{label:v(T)("pages.conversation.model"),name:"models"},{default:d(()=>[u(z,{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",Ye,[(s(!0),n(i,null,h(e,(e,l)=>(s(),c(O,{key:l,closable:!0,"on-close":({e:e})=>{e.stopPropagation(),a(l)}},{default:d(()=>[u(E,{disabled:I.value&&!A.value[e.value],onClick:t[4]||(t[4]=_(()=>{},["stop"])),class:"mr-1",size:"small",modelValue:A.value[e.value],"onUpdate:modelValue":t=>A.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(V.value,e=>(s(),c(M,{key:e.value,value:e.value,label:e.label},{default:d(()=>[p("div",Ze,[u(q,{size:"20px",class:"mr-1"},{icon:d(()=>[(s(),c(g(v(S).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",Qe,[R.value.isDefault?r("",!0):(s(),c(D,{key:0,onChange:ie},{default:d(()=>[f(m(v(T)("pages.conversation.save_to_agent")),1)]),_:1})),u(o,{theme:"primary",type:"submit",onClick:U,class:"flex-1"},{default:d(()=>[f(m(v(T)("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(T)("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(T)("pages.conversation.create_new_agent"),"on-confirm":N},{default:d(()=>[u(ne,{ref:"form","label-width":100},{default:d(()=>[u(l,{label:v(T)("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-ebc2d770"]]),tt={class:"h-full flex flex-col chat-model-container relative"},at={class:"cursor-pointer handle p-2 bg-color-container rounded-t-lg shadow-2xl chat-model-header z-20"},lt={class:"flex flex-wrap justify-between w-full overflow-x-hidden"},ot={class:"flex gap-1"},nt={class:"max-w-[120px]"},st={class:"model-info flex flex-col gap-1"},it={class:"flex items-center justify-between gap-1 api-key-container"},ct=["title"],rt={class:"flex gap-1 flex-wrap"},ut={key:0,class:"flex w-full justify-end items-start flex-row-reverse gap-2 chat-item"},dt=["data-index"],vt={class:"flex justify-between overflow-hidden h-[24px]"},pt={class:"flex chat-item-tools gap-2"},mt={class:"user-chat-content p-2 rounded-lg"},ht={class:"w-[24px] h-[24px]"},ft={key:1,class:"flex w-full flex-col gap-2 chat-item"},gt={class:"flex justify-start align-middle items-center gap-2 h-[24px]"},_t={class:"flex flex-row justify-between gap-5"},xt={class:"flex flex-col w-full"},bt=["data-index"],wt={key:0,class:"loader"},yt={key:2,class:"flex gap-5 overflow-x-auto scrollbar p-1"},jt=["onClick"],kt={class:"flex flex-row w-full"},Ct={class:"w-12 h-2"},Mt=["src"],zt={class:"w-44"},St={class:"w-full text-ellipsis overflow-hidden text-nowrap"},Tt={class:"text-ellipsis overflow-hidden whitespace-nowrap"},At={class:"max-h-10 overflow-hidden mt-2"},It={class:"h-[24px] mt-1 chat-item-tools"},Vt={class:"flex justify-end gap-2"},Et={key:3,class:"flex justify-center w-full"},Rt={class:"fixed-scroll-buttons"},Pt=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=q(),k=I();O();const C=e,M=a(null);Ue(),z();const A=t(()=>C.chatModel.chat.chats);const P=l,U=e=>{P("re-chat",e.model.id)},H=a(-1),B=e=>{H.value=e},N=e=>{A.value[H.value].content.text=e,H.value=-1},$=()=>{H.value=-1},D=t(()=>S.getModelItemTitle(C.chatModel.model)),L=t({get(){const e=C.chatModel.chat.modelSetting;return e&&-1!==e.temperature?e.temperature:C.chatModel.model.temperature||V},set(e){C.chatModel.chat.modelSetting||(C.chatModel.chat.modelSetting={temperature:-1,topP:-1,maxTokens:-1}),C.chatModel.chat.modelSetting.temperature=e}}),F=t({get(){const e=C.chatModel.chat.modelSetting;return e&&-1!==e.topP?e.topP:C.chatModel.model.topP||E},set(e){C.chatModel.chat.modelSetting||(C.chatModel.chat.modelSetting={temperature:-1,topP:-1,maxTokens:-1}),C.chatModel.chat.modelSetting.topP=e}}),G=t({get(){const e=C.chatModel.chat.modelSetting;return e&&-1!==e.maxTokens?e.maxTokens:C.chatModel.model.maxTokens||R},set(e){C.chatModel.chat.modelSetting||(C.chatModel.chat.modelSetting={temperature:-1,topP:-1,maxTokens:-1}),C.chatModel.chat.modelSetting.maxTokens=e}}),Y=e=>{navigator.clipboard.writeText(e.content.text),ne.success(T("pages.note.noteCopySuccess"))},Z=()=>{navigator.clipboard.writeText(te.value.apiKey),ne.success(T("pages.note.noteCopySuccess"))},te=t(()=>{let e="",t="";if(C.chatModel.model.apiBase.startsWith("http"))e=C.chatModel.model.apiBase,t=C.chatModel.model.apiKey;else{let l=He(C.chatModel.model.apiBase||S.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}}),ae=t(()=>C.chatModel.model.apiBase.startsWith("http")?"ApiBase":"LocalApi"),le=t(()=>C.chatModel.model.apiBase.startsWith("http")?"ApiKey":"LocalKey"),oe=a(!1),de=a("");x(()=>{if(!A.value||0===A.value.length)return;const e=A.value[A.value.length-1];"assistant"===e.role&&(de.value=e.content.text)});const ve=()=>{oe.value=!1};async function pe(){await window.ipcRenderer.invoke("refresh-vercel-view")?ne.success("Refresh succeed"):ne.error("Refresh failed")}async function me(){await window.ipcRenderer.invoke("refresh-coze-com-view")?ne.success("Refresh succeed"):ne.error("Refresh failed")}async function he(){await window.ipcRenderer.invoke("refresh-coze-cn-view")?ne.success("Refresh succeed"):ne.error("Refresh failed")}async function fe(){const e=S.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,ne.success("Refresh succeed")}async function Ie(){const e=S.dict.magai,t=await window.ipcRenderer.invoke("login-get-token",{url:e.tokenUrl,userAgent:"",script:"",show:!1,autoClose:!0});e.playground.apiKey=t.token,ne.success("Refresh succeed")}const Ve=a(!1),Ee=a(!1),Re=a(!1),Pe=a(!1),Oe=()=>{if(!M.value)return;const e=M.value.querySelector(".chat-container-content"),t=e.scrollTop,a=e.scrollHeight,l=e.clientHeight;Ve.value=t>200,Ee.value=a-t-l>200,Re.value=Ve.value||Ee.value},Be=()=>{const e=M.value.querySelector(".chat-container-content"),t=e.getAttribute("data-chat-id");t&&P("update-scroll-flag",t,!1),e.scrollTo({top:0,behavior:"smooth"}),setTimeout(()=>{e.scrollTo({top:0,behavior:"instant"})},500)},qe=()=>{const e=M.value.querySelector(".chat-container-content"),t=e.getAttribute("data-chat-id");t&&P("update-scroll-flag",t,!0),e.scrollTo({top:e.scrollHeight,behavior:"smooth"}),setTimeout(()=>{e.scrollTo({top:e.scrollHeight,behavior:"instant"})},500)},Ne=e=>{Pe.value=e};return o(()=>{M.value.querySelector(".chat-container-content").addEventListener("scroll",Oe)}),(t,a)=>{const l=Q,o=X,x=W,C=J,z=ie,I=se,V=K,E=ee,R=re,O=ue,q=ce;return s(),n("div",tt,[p("div",at,[p("div",lt,[p("div",ot,[u(l,{size:"20px"},{icon:d(()=>[(s(),c(g(v(S).icons[e.chatModel.model.type])))]),_:1}),p("div",nt,[u(I,{placement:"bottom","cancel-btn":null,"confirm-btn":null},{content:d(()=>[p("div",st,[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(T)("pages.conversation.temperature"),name:"temperature",labelAlign:"left",labelWidth:"64px"},{default:d(()=>[u(o,{modelValue:L.value,"onUpdate:modelValue":a[0]||(a[0]=e=>L.value=e),inputNumberProps:"",showStep:"",min:0,max:2,step:.05},null,8,["modelValue"])]),_:1},8,["label"]),u(x,{label:v(T)("pages.conversation.maxTokens"),name:"maxTokens",labelAlign:"left",labelWidth:"64px"},{default:d(()=>[u(o,{modelValue:G.value,"onUpdate:modelValue":a[1]||(a[1]=e=>G.value=e),inputNumberProps:"",showStep:"",min:1024,max:61440,step:1024},null,8,["modelValue"])]),_:1},8,["label"]),u(x,{label:v(T)("pages.conversation.topP"),name:"topP",labelAlign:"left",labelWidth:"64px"},{default:d(()=>[u(o,{modelValue:F.value,"onUpdate:modelValue":a[2]||(a[2]=e=>F.value=e),inputNumberProps:"",showStep:"",min:0,max:1,step:.05},null,8,["modelValue"])]),_:1},8,["label"]),p("p",null,[p("span",null,m(ae.value),1),f(m(te.value.apiBase),1)]),p("div",it,[p("p",{class:"whitespace-nowrap overflow-hidden text-ellipsis flex-1",title:te.value.apiKey},[p("span",null,m(le.value),1),f(m(te.value.apiKey),1)],8,ct),u(C,{shape:"circle",size:"small",variant:"text",onClick:Z},{icon:d(()=>[u(v(ge))]),_: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:pe},{default:d(()=>a[16]||(a[16]=[f("refresh vercel.ai ")])),_:1,__:[16]})):r("",!0),"coze.com"===e.chatModel.model.type?(s(),c(C,{key:1,theme:"primary",onClick:me},{default:d(()=>a[17]||(a[17]=[f("refresh coze.com ")])),_:1,__:[17]})):r("",!0),"coze.cn"===e.chatModel.model.type?(s(),c(C,{key:2,theme:"primary",onClick:he},{default:d(()=>a[18]||(a[18]=[f("refresh coze.cn ")])),_:1,__:[18]})):r("",!0),"chatgpt.com"===e.chatModel.model.type?(s(),c(C,{key:3,theme:"primary",onClick:fe},{default:d(()=>a[19]||(a[19]=[f("refresh chatgpt.com ")])),_:1,__:[19]})):r("",!0),"magai"===e.chatModel.model.type?(s(),c(C,{key:4,theme:"primary",onClick:Ie},{default:d(()=>a[20]||(a[20]=[f("refresh magai.co ")])),_:1,__:[20]})):r("",!0)])]),default:d(()=>[u(z,{theme:"primary",title:D.value,class:"block w-full whitespace-nowrap text-ellipsis overflow-hidden"},{default:d(()=>[f(m(D.value),1)]),_:1},8,["title"])]),_:1})])]),p("div",rt,[u(V,{content:v(T)("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 P("change-size",a.model.id);var a},["stop"]))},{default:d(()=>[e.chatModel.chat.modelId==e.fullScreenModelId?(s(),c(v(_e),{key:0,slot:"icon"})):(s(),c(v(xe),{key:1,slot:"icon"}))]),_:1})]),_:1},8,["content"]),u(V,{content:v(T)("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 P("stop-chat",a.model.id);var a},["stop"]))},{default:d(()=>[u(v(be),{slot:"icon"})]),_:1})]),_:1},8,["content"]),u(V,{content:v(T)("pages.conversation.regenerate_last_conversation")},{default:d(()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[5]||(a[5]=_(t=>U(e.chatModel),["stop"]))},{default:d(()=>[u(v(we),{slot:"icon"})]),_:1})]),_:1},8,["content"]),u(I,{theme:"danger",content:v(T)("pages.conversation.confirm_delete_chat_history"),placement:"top",onConfirm:a[6]||(a[6]=t=>{return a=e.chatModel,void P("clear-chat-history",a.model.id);var a})},{default:d(()=>[u(V,{content:v(T)("pages.conversation.delete_chat_history")},{default:d(()=>[u(C,{size:"small",shape:"circle",variant:"outline"},{default:d(()=>[u(v(ye),{slot:"icon"})]),_:1})]),_:1},8,["content"])]),_:1},8,["content"]),u(I,{theme:"warning",content:v(T)("pages.conversation.confirm_clear_context"),placement:"top",onConfirm:a[7]||(a[7]=t=>{return a=e.chatModel,void P("clear-chat-context",a.model.id);var a})},{default:d(()=>[u(V,{content:v(T)("pages.conversation.clear_context")},{default:d(()=>[u(C,{size:"small",shape:"circle",variant:"outline"},{default:d(()=>[u(v(je),{slot:"icon"})]),_:1})]),_:1},8,["content"])]),_:1},8,["content"]),u(V,{content:v(T)("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 P("extend-model-visible",a.model.id);var a},["stop"]))},{default:d(()=>[u(v(ke),{slot:"icon"})]),_:1})]),_:1},8,["content"]),u(V,{content:v(T)("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 P("api-setting-visible",a.model.id);var a},["stop"]))},{default:d(()=>[u(v(Ce),{slot:"icon"})]),_:1})]),_:1},8,["content"]),u(V,{content:v(T)("pages.conversation.toggle_artifacts")},{default:d(()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[10]||(a[10]=_(e=>{oe.value=!oe.value},["stop"]))},{default:d(()=>[u(v(Me),{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=>Ne(!0)),onMouseleave:a[14]||(a[14]=e=>Ne(!1))},[p("div",{class:"flex-1 relative h-full overflow-hidden",ref_key:"scrollable_chat",ref:M},[u(q,{"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(A.value,(t,o)=>(s(),c(O,{key:`${e.chatModel.model.id}-${o}`,class:"w-full"},{default:d(()=>["user"===t.role?(s(),n("div",ut,[p("div",{class:"flex flex-col gap-2 w-[calc(100%-24px-1rem)]","data-index":`${o}`},[p("div",vt,[f(m(v(k).name)+" ",1),p("div",pt,[u(I,{theme:"danger",content:v(T)("pages.conversation.dialog_confirm_delete_record"),placement:"bottom",onConfirm:e=>(e=>{const t=A.value.findIndex(t=>t===e);-1!==t&&(A.value.splice(t,1),t<A.value.length&&"assistant"===A.value[t].role&&A.value.splice(t,1))})(t)},{default:d(()=>[u(V,{content:v(T)("pages.conversation.button_tooltip_delete"),placement:"bottom"},{default:d(()=>[u(C,{size:"small",shape:"circle",variant:"outline"},{default:d(()=>[u(v(ze),{slot:"icon"})]),_:1})]),_:1},8,["content"])]),_:2},1032,["content","onConfirm"]),u(V,{content:v(T)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:d(()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:e=>B(o)},{default:d(()=>[u(v(Se),{slot:"icon"})]),_:2},1032,["onClick"])]),_:2},1032,["content"]),u(V,{content:v(T)("pages.conversation.button_tooltip_copy")},{default:d(()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:e=>Y(t)},{default:d(()=>[u(v(ge),{slot:"icon"})]),_:2},1032,["onClick"])]),_:2},1032,["content"]),u(V,{content:v(T)("pages.conversation.button_tooltip_favourite"),placement:"bottom"},{default:d(()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a=>{return l=e.chatModel,void P("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(V,{key:0,content:v(T)("pages.conversation.button_tooltip_refresh")},{default:d(()=>[u(C,{size:"small",shape:"circle",variant:"outline",onClick:a[11]||(a[11]=t=>U(e.chatModel))},{default:d(()=>[u(v(we),{slot:"icon"})]),_:1})]),_:1},8,["content"])):r("",!0)])]),p("div",mt,[u(De,{content:t.content,isEditing:H.value===o,onSave:N,onCancel:$},null,8,["content","isEditing"])])],8,dt),p("div",ht,[u(l,{size:"24px",image:v(k).avatar},null,8,["image"])])])):"assistant"===t.role?(s(),n("div",ft,[p("div",gt,[u(l,{size:"24px",image:e.conversation.avatar},null,8,["image"]),p("div",_t,m(e.conversation.name),1)]),p("div",xt,[p("div",{"data-index":`${o}`},[e.chatModel.chat.status.responseWating&&o===e.chatModel.chat.chats.length-1?(s(),n("span",wt)):(s(),c(Le,{key:1,content:t.content,isEditing:H.value===o,onSave:N,onCancel:$},null,8,["content","isEditing"])),t.content.webs&&t.content.webs.length>0?(s(),n("div",yt,[(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",kt,[p("div",Ct,[p("img",{src:e.icon,alt:""},null,8,Mt)]),p("div",zt,[p("div",St,m(e.title),1),p("div",Tt,m(e.url),1)])]),p("div",At,m(e.excerpt),1)],8,jt))),256))])):r("",!0)],8,bt),p("div",It,[p("div",Vt,[t.model?(s(),c(E,{key:0,class:"max-w-60 model-tag"},{default:d(()=>[f(m(t.model),1)]),_:2},1024)):r("",!0),u(V,{content:v(T)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:d(()=>[u(C,{size:"small",variant:"outline",onClick:e=>B(o)},{default:d(()=>[u(v(Se),{slot:"icon"})]),_:2},1032,["onClick"])]),_:2},1032,["content"]),u(V,{content:v(T)("pages.conversation.button_tooltip_copy")},{default:d(()=>[u(C,{size:"small",variant:"outline",onClick:e=>Y(t)},{default:d(()=>[u(v(ge),{slot:"icon"})]),_:2},1032,["onClick"])]),_:2},1032,["content"]),u(V,{content:v(T)("pages.conversation.toggle_artifacts")},{default:d(()=>[u(C,{size:"small",variant:"outline",onClick:e=>{var a;"assistant"===(a=t).role&&(de.value=a.content.text,oe.value=!0)}},{default:d(()=>[u(v(Me),{slot:"icon"})]),_:2},1032,["onClick"])]),_:2},1032,["content"]),o===e.chatModel.chat.chats.length-1?(s(),c(V,{key:1,content:v(T)("pages.conversation.button_tooltip_refresh")},{default:d(()=>[u(C,{size:"small",variant:"outline",onClick:a[12]||(a[12]=t=>U(e.chatModel))},{default:d(()=>[u(v(we),{slot:"icon"})]),_:1})]),_:1},8,["content"])):r("",!0)])])])])):"verbose"===t.role?(s(),c(R,{key:2},{default:d(()=>[f(m(t.content.text),1)]),_:2},1024)):(s(),n("div",Et,m(t.role)+" - "+m(t.content.text),1))]),_:2},1024))),128))]),_:1},8,["data-chat-id","class"]),a[21]||(a[21]=p("div",{class:"absolute z-50 bottom-0 w-full h-20 rounded-b-lg chat-model-footer pointer-events-none"},null,-1))],512),oe.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(We,{content:de.value,closeBtn:ve},null,8,["content"])],2)):r("",!0),b(p("div",Rt,[b(u(C,{class:"scroll-top-btn",shape:"circle",onClick:Be},{icon:d(()=>[u(v(Ae))]),_:1},512),[[y,Ve.value]]),b(u(C,{class:"scroll-bottom-btn",shape:"circle",onClick:qe},{icon:d(()=>[u(v(Ae),{style:{transform:"rotateX(180deg)"}})]),_:1},512),[[y,Ee.value]])],512),[[y,Re.value&&Pe.value]])],32)])}}}),Ut={class:"w-full flex gap-2 absolute bottom-0 z-50"},Ht={class:"rounded-lg px-1 bg-color-container bordered flex items-center align-middle"},Ot={class:"flex flex-col justify-center items-center w-full"},Bt={class:"flex flex-col gap-5 w-full overflow-hidden"},qt={class:"max-h-96 scrollbar overflow-y-auto overflow-x-hidden bordered p-2 shadow-sm"},Nt=e({name:"ListConversation",setup(e){const o=I(),r=P(),A=Ue(),V=M(),E=O();B();const R=a(null),$=a(null),D=a({}),G=t(()=>!!$.value&&!0===D.value[$.value.id]),X=a([]),Y=z(),Z=q(),ee=a(!1),te=async e=>{if(e.content)if(G.value&&""===Ye.value)ne.warning("等待上个问题回答完成");else try{X.value.forEach(t=>{if(""!==Ye.value&&Ye.value!==t.model.id)return;const a=Ne(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:Ne(""),id:"",liked:!1,model:""})}),U.setPause(!0);const t=X.value.map((e,t)=>{if((""===Ye.value||Ye.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 ht(0),mt();let a="";if($.value.internet){const l=await Be(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=qe($.value,e,a);l(t)},100*t)}));await Promise.all(l)}finally{$.value&&(D.value[$.value.id]=!1),U.setPause(!1),V.$persist()}else ne.error(T("pages.conversation.question_cannot_be_empty"))},ae=async()=>{try{if(""!==Ye.value)return void le(Ye.value);if(G.value&&""===Ye.value)return void ne.warning("等待上个问题回答完成");U.setPause(!0);const e=X.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 Oe(a.content),a.model="",e.chat.status.chating=!0,e.chat.status.stop=!1,e.chat.status.responseWating=!0,e;ne.error(T("pages.conversation.please_start_question_again"))}).filter(e=>e);if(0===e.length)return;await ht(0),mt();let t="";if($.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 Be(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=qe($.value,e,t);l(a)},100*a)}));await Promise.all(a)}finally{$.value&&(D.value[$.value.id]=!1),U.setPause(!1),V.$persist()}},le=async e=>{try{const t=X.value.find(t=>t.model.id===e);if(0===t.chat.chats.length)return;U.setPause(!0);const a=t.chat.chats[t.chat.chats.length-1];if("assistant"!=a.role)return void ne.error(T("pages.conversation.please_start_question_again"));if(!0===t.chat.status.chating)return;Oe(a.content),a.model="",t.chat.status.chating=!0,t.chat.status.stop=!1,t.chat.status.responseWating=!0;let l="";if(mt(),$.value.internet){const e=await Be(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 qe($.value,t,l)}finally{$.value&&(D.value[$.value.id]=!1),U.setPause(!1),V.$persist()}},ie=async()=>{""===Ye.value?(X.value.forEach(e=>{e.chat.chats.push({role:"verbose",content:Ne(T("pages.conversation.context_cleared")),id:"",liked:!1,model:""}),e.chat.startContext=e.chat.chats.length}),ne.success(T("pages.conversation.context_cleared_success")),await ht(0)):_e(Ye.value)},ce=()=>{V.showEditorDrawer=!0},re=e=>{const t=X.value.find(t=>t.chat.modelId===e);t.chat.status.stop=!0,t.chat.status.responseWating=!1,t.chat.status.chating=!1},ue=()=>{""===Ye.value?($.value&&(D.value[$.value.id]=!1),X.value.forEach(e=>{e.chat.status.stop=!0,e.chat.status.responseWating=!1,e.chat.status.chating=!1})):re(Ye.value)},fe=()=>{$.value.internet=!$.value.internet},ge=()=>{""===Ye.value?X.value.forEach(e=>{e.chat.chats=[],e.chat.startContext=0}):xe(Ye.value)},_e=e=>{const t=X.value.find(t=>t.chat.modelId===e).chat;t.chats.push({role:"verbose",content:Ne(T("pages.conversation.context_cleared")),id:"",liked:!1,model:""}),t.startContext=t.chats.length,ne.success(T("pages.conversation.context_cleared_success")),C(()=>{const t=document.querySelector(`[data-chat-id="${e}"]`);t&&t.scrollTo({top:t.scrollHeight,behavior:"smooth"})})},xe=e=>{const t=X.value.find(t=>t.chat.modelId===e).chat;t.chats=[],t.startContext=0},Ce=a(!1),Me=a(""),ze=a(""),Se=e=>{Ce.value=!0,ze.value="",Me.value=e},Te=async()=>{if(!ze.value)return void(Ce.value=!1);const e=$.value.models.find(e=>e.modelId===ze.value);if(Me.value){const t=$.value.models.find(e=>e.modelId===Me.value);t.chats=JSON.parse(JSON.stringify(e.chats)),t.startContext=0}else $.value.models.forEach(t=>{t.modelId!=ze.value&&(t.chats=JSON.parse(JSON.stringify(e.chats)),t.startContext=0)});Ce.value=!1,await ht(0)},Ae=a(!1),Pe=a(""),He=a(""),De=a("");let Le="";const We=e=>{Ae.value=!0,Le=e;const t=$.value.models.find(e=>e.modelId===Le);He.value=t.apiConversationId,Pe.value=t.apiAgentId,De.value=t.apiNote},Ge=()=>{var e,t,a;const l=$.value.models.find(e=>e.modelId===Le);l.apiConversationId=null==(e=He.value)?void 0:e.trim(),l.apiAgentId=null==(t=Pe.value)?void 0:t.trim(),l.apiNote=null==(a=De.value)?void 0:a.trim(),Ae.value=!1};async function Xe(){const e=X.value.find(e=>e.chat.modelId===Le);if("lyihub"===e.model.type){const t=await Je(e.model.apiKey);He.value=t.id}else He.value=Re()}const Ye=a(""),Ze=e=>{1!==X.value.length&&(""===Ye.value?Ye.value=e:Ye.value="")},Qe=a(!1),tt=a(""),at=A.list;let lt=null,ot=null;const nt=async(e,t)=>{Qe.value=!0,tt.value="",lt=e,ot=t},st=async()=>{const e=lt.chat.chats,t=e.findIndex(e=>e===ot),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:Re(),title:a,time:(new Date).getTime(),conversationId:$.value.id,conversationName:$.value.name,conversationAvatar:$.value.avatar,chats:[{...e[t],content:{...e[t].content}},{...e[n],content:{...e[n].content}}],notes:[]};if(A.add(s),ne.success(T("pages.conversation.favorite_success")),o.assistModel){const e=T("pages.conversation.extract_core_conversation",{question:a,answer:l});await $e(e,e=>{s.title=e,s.title=s.title.replaceAll("###",""),s.title=s.title.trim(),A.update(s)})}Qe.value=!1},it=async()=>{if(!tt.value)return void ne.warning("需要先选中笔记");const e=at.find(e=>e.id==tt.value),t=lt.chat.chats,a=t.findIndex(e=>e===ot),l=a+1;e.chats.push({...t[a],content:{...t[a].content}}),e.chats.push({...t[l],content:{...t[l].content}}),A.update(e),ne.success(T("pages.conversation.favorite_success")),Qe.value=!1},ct=t(()=>P().isSidebarCompact),rt=t(()=>""!==Ye.value||1===X.value.length||ct.value?12:2===X.value.length?6:3===X.value.length?4:4===X.value.length?3:5===X.value.length||6===X.value.length?4:7===X.value.length||8===X.value.length?3:12),ut=t(()=>""!==Ye.value||1===X.value.length||ct.value||2===X.value.length||3===X.value.length||4===X.value.length?"h-[calc(100%-10px)]":5===X.value.length||6===X.value.length||7===X.value.length||8===X.value.length?"h-[calc(50%-10px)]":"h-[calc(100%-10px)]"),dt=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":ct.value&&X.value.length>1&&!Ye.value}]}),vt=()=>{const e=X.value.map(e=>e.chat),t=new Set(e),a=$.value.models.filter(e=>!t.has(e));$.value.models=[...e,...a]},pt=new Map,mt=async()=>{if(!R.value||!$.value)return;D.value[$.value.id]=!0,await C();const e=R.value.querySelectorAll(".chating");e.forEach(e=>{const t=e.getAttribute("data-chat-id");if(t&&!pt.has(t)){pt.set(t,!0);const a=()=>{const a=e.scrollHeight-e.scrollTop-e.clientHeight;a>100?pt.set(t,!1):a<100&&pt.set(t,!0),e.setAttribute("data-last-scroll-time",Date.now().toString())};e._scrollHandler=a,e.addEventListener("scroll",a)}});const t=()=>{$.value&&D.value[$.value.id]&&(e.forEach(e=>{const t=e.getAttribute("data-chat-id");if(t&&pt.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){}}),$.value&&D.value[$.value.id]&&requestAnimationFrame(()=>{setTimeout(t,200)}))};t()};async function ht(e){await new Promise(t=>setTimeout(t,e)),R.value&&requestAnimationFrame(()=>{R.value.querySelectorAll(".scrollable-chat").forEach(e=>{if(e)try{e.scrollTo({top:e.scrollHeight,behavior:"instant"})}catch(t){}})})}j(()=>{ft()});const ft=()=>{(()=>{if(!R.value)return;R.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),pt.delete(t)}})})(),pt.clear()};x(()=>{$.value&&(ft(),gt())});const gt=()=>{X.value=$.value.models.map(e=>{const t=Y.find(e.modelId);if(t&&e.showing)return{model:t,chat:e,id:e.modelId}}).filter(Boolean)};l(()=>E.query.id,async e=>{if("/conversation/chat"!==E.path)return $.value=null,void ft();let t=e;requestAnimationFrame(async()=>{$.value=V.find(t),Ye.value="",setTimeout(()=>{var e;gt();!E.query.isNew||!(null==(e=H.data)?void 0:e.content)||0===$.value.models.length||$.value.models[0].chats.length>0?ht(1e3):""!==H.data.content&&te(H.data)},50)})},{immediate:!0});const _t=t(()=>$.value&&$.value.internet?{color:"green"}:{}),xt=a(null),bt=()=>{var e;null==(e=xt.value)||e.showToolbox()},wt=()=>{var e;null==(e=xt.value)||e.hideToolbox()},yt=(e,t)=>{if(pt.set(e,t),R.value){const a=R.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?pt.set(e,!1):t<100&&pt.set(e,!0)};a._scrollHandler=t,a.addEventListener("scroll",t)},1e3)};a.addEventListener("scroll",l)}}};return(e,t)=>{const a=de,l=J,o=K,r=se,x=ve,j=Q,C=he,M=me,z=pe,A=oe,I=F,V=W,E=L;return b((s(),n("div",{class:"flex flex-col items-center h-full relative",onMousedown:wt},[p("div",{class:w(["w-full",dt.value]),ref_key:"chatContainer",ref:R,onMouseup:bt},[u(Fe,{ref_key:"toolbar",ref:xt,parent:R.value},null,8,["parent"]),u(v(Ke),{tag:"t-row",modelValue:X.value,"onUpdate:modelValue":t[0]||(t[0]=e=>X.value=e),handle:".handle","component-data":{align:"top",gutter:10},onEnd:vt,"item-key":"id",class:"h-full"},{item:d(({element:e})=>[(s(),c(a,{span:rt.value,key:`${$.value.id}-${e.model.id}`,class:w([ut.value,{hidden:""!==Ye.value&&Ye.value!==e.model.id}])},{default:d(()=>[u(Pt,{"chat-model":e,conversation:$.value,"data-index":`${e.model.id}`,"full-screen-model-id":Ye.value,"is-single-model":1===X.value.length,onStopChat:re,onExtendModelVisible:Se,onReChat:le,onChangeSize:Ze,onApiSettingVisible:We,onFavNoteVisible:nt,onClearChatContext:_e,onClearChatHistory:xe,onUpdateScrollFlag:yt},null,8,["chat-model","conversation","data-index","full-screen-model-id","is-single-model"])]),_:2},1032,["span","class"]))]),_:1},8,["modelValue"])],34),p("div",Ut,[u(N,{class:"flex-1",onInput:te}),p("div",Ht,[v(Z)?(s(),c(x,{key:1,delay:0,modelValue:ee.value,"onUpdate:modelValue":t[7]||(t[7]=e=>ee.value=e),onOverlayClick:t[8]||(t[8]=e=>ee.value=!1)},{content:d(()=>[p("div",Ot,[u(l,{size:"large",shape:"circle",variant:"text",onClick:fe},{default:d(()=>[u(v(Ie),{slot:"icon",style:k(_t.value)},null,8,["style"])]),_:1}),u(l,{size:"large",shape:"circle",variant:"text",onClick:ue},{default:d(()=>[u(v(be),{slot:"icon"})]),_:1}),u(l,{size:"large",shape:"circle",variant:"text",onClick:ae},{default:d(()=>[u(v(we),{slot:"icon"})]),_:1}),u(l,{size:"large",shape:"circle",variant:"text",onClick:t[2]||(t[2]=e=>Se(""))},{default:d(()=>[u(v(ke),{slot:"icon"})]),_:1}),u(r,{theme:"danger",content:v(T)("pages.conversation.confirm_delete_all_chat_records"),placement:"left",onConfirm:t[4]||(t[4]=()=>{ge(),ee.value=!1})},{default:d(()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:t[3]||(t[3]=_(()=>{},["stop"]))},{default:d(()=>[u(v(ye),{slot:"icon"})]),_:1})]),_:1},8,["content"]),u(r,{theme:"warning",content:v(T)("pages.conversation.confirm_clear_all_context"),placement:"left",onConfirm:t[6]||(t[6]=()=>{ie(),ee.value=!1})},{default:d(()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:t[5]||(t[5]=_(()=>{},["stop"]))},{default:d(()=>[u(v(je),{slot:"icon"})]),_:1})]),_:1},8,["content"]),u(l,{size:"large",shape:"circle",variant:"text",onClick:ce},{default:d(()=>[u(v(Ve),{slot:"icon"})]),_:1})])]),default:d(()=>[u(l,{size:"large",shape:"circle",variant:"text"},{default:d(()=>[u(v(Ee),{slot:"icon"})]),_:1})]),_:1},8,["modelValue"])):(s(),n(i,{key:0},[u(o,{content:v(T)("pages.conversation.internet_search")},{default:d(()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:_(fe,["stop"])},{default:d(()=>[u(v(Ie),{slot:"icon",style:k(_t.value)},null,8,["style"])]),_:1})]),_:1},8,["content"]),u(o,{content:v(T)("pages.conversation.stop_answering")},{default:d(()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:_(ue,["stop"])},{default:d(()=>[u(v(be),{slot:"icon"})]),_:1})]),_:1},8,["content"]),u(o,{content:v(T)("pages.conversation.regenerate_last_conversation")},{default:d(()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:_(ae,["stop"])},{default:d(()=>[u(v(we),{slot:"icon"})]),_:1})]),_:1},8,["content"]),u(o,{content:v(T)("pages.conversation.inherit_other_model_conversation"),placement:"top"},{default:d(()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:t[1]||(t[1]=_(e=>Se(""),["stop"]))},{default:d(()=>[u(v(ke),{slot:"icon"})]),_:1})]),_:1},8,["content"]),u(r,{theme:"danger",content:v(T)("pages.conversation.confirm_delete_all_chat_records"),placement:"top",onConfirm:ge},{default:d(()=>[u(o,{content:v(T)("pages.conversation.delete_all_chat_records"),placement:"top"},{default:d(()=>[u(l,{size:"large",shape:"circle",variant:"text"},{default:d(()=>[u(v(ye),{slot:"icon"})]),_:1})]),_:1},8,["content"])]),_:1},8,["content"]),u(r,{theme:"warning",content:v(T)("pages.conversation.confirm_clear_all_context"),placement:"top",onConfirm:ie},{default:d(()=>[u(o,{content:v(T)("pages.conversation.clear_all_context"),placement:"top"},{default:d(()=>[u(l,{size:"large",shape:"circle",variant:"text"},{default:d(()=>[u(v(je),{slot:"icon"})]),_:1})]),_:1},8,["content"])]),_:1},8,["content"]),u(o,{content:v(T)("pages.conversation.edit_current_conversation"),placement:"top"},{default:d(()=>[u(l,{size:"large",shape:"circle",variant:"text",onClick:ce},{default:d(()=>[u(v(Ve),{slot:"icon"})]),_:1})]),_:1},8,["content"])],64))])]),u(et),u(A,{header:v(T)("pages.conversation.inherit_model_dialog"),visible:Ce.value,"onUpdate:visible":t[10]||(t[10]=e=>Ce.value=e),"on-confirm":Te,class:"extend-model"},{default:d(()=>[u(z,{class:"w-full",modelValue:ze.value,"onUpdate:modelValue":t[9]||(t[9]=e=>ze.value=e)},{default:d(()=>[u(M,{gutter:[16,16],class:"w-full"},{default:d(()=>[(s(!0),n(i,null,h(X.value,e=>(s(),c(a,{span:12},{default:d(()=>[u(C,{value:e.model.id,disabled:Me.value===e.model.id},{default:d(()=>[u(j,{size:"20px",class:"mr-1"},{icon:d(()=>[(s(),c(g(v(S).icons[e.model.type])))]),_:2},1024),f(" "+m(v(S).getModelItemTitle(e.model)),1)]),_:2},1032,["value","disabled"])]),_:2},1024))),256))]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["header","visible"]),u(A,{header:v(T)("pages.conversation.api_conversation_settings"),visible:Ae.value,"onUpdate:visible":t[14]||(t[14]=e=>Ae.value=e),"on-confirm":Ge},{default:d(()=>[u(E,{"label-align":"top"},{default:d(()=>[u(V,{label:v(T)("pages.conversation.api_agent"),name:"apiSettingAgent"},{default:d(()=>[u(I,{modelValue:Pe.value,"onUpdate:modelValue":t[11]||(t[11]=e=>Pe.value=e)},null,8,["modelValue"])]),_:1},8,["label"]),u(V,{label:v(T)("pages.conversation.api_conversation_id"),name:"apiSettingConversation"},{default:d(()=>[u(I,{modelValue:He.value,"onUpdate:modelValue":t[12]||(t[12]=e=>He.value=e)},null,8,["modelValue"]),u(l,{class:"ml-2",onClick:Xe},{default:d(()=>[f(m(v(T)("pages.conversation.api_conversation_id_random")),1)]),_:1})]),_:1},8,["label"]),u(V,{label:v(T)("pages.conversation.remarks"),name:"apiSettingNode"},{default:d(()=>[u(I,{modelValue:De.value,"onUpdate:modelValue":t[13]||(t[13]=e=>De.value=e)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1},8,["header","visible"]),u(A,{header:v(T)("pages.conversation.button_tooltip_favourite"),visible:Qe.value,"onUpdate:visible":t[16]||(t[16]=e=>Qe.value=e),confirmBtn:null},{default:d(()=>[p("div",Bt,[u(l,{onClick:st,theme:"default",variant:"outline"},{default:d(()=>t[17]||(t[17]=[f("创建新的笔记")])),_:1,__:[17]}),u(l,{onClick:it,theme:"default",variant:"outline"},{default:d(()=>t[18]||(t[18]=[f("添加到笔记")])),_:1,__:[18]}),p("div",qt,[u(z,{modelValue:tt.value,"onUpdate:modelValue":t[15]||(t[15]=e=>tt.value=e)},{default:d(()=>[u(M,{gutter:[16,16]},{default:d(()=>[(s(!0),n(i,null,h(v(at),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,$.value]])}}});export{Nt as default};
|
.output/public/assets/chevrotain-CHpUImcB.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-DMqKfIoR.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-Cacf3aVv.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-uapKNRlC.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{L as t,g as n,t as e,a as o}from"./chevrotain-CHpUImcB.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-DMqKfIoR.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-Cacf3aVv.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=q(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 q(t,n=!0){return`${n?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(t=>t.stateNumber.toString()).join("_")}`}function G(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]=G(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=et(i,tt(function(t){const n=new F,e=t.transitions.length;for(let o=0;o<e;o++){ot({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=X(i,a);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++)}}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=Z(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)ot(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 nt(t,n,e,W),W;let a=tt(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=q(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=nt(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){return t.edges[n.tokenTypeIdx]}function Z(t,n){if(t instanceof x&&e(n,t.tokenType))return t.target}function tt(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function nt(t,n,e,o){return o=et(t,o),n.edges[e.tokenTypeIdx]=o,o}function et(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 ot(t,n){const e=t.state;if(7===e.type){if(t.stack.length>0){const e=[...t.stack];ot({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=it(t,e.transitions[i]);void 0!==o&&ot(o,n)}}function it(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/chroma-js-CAQMm5d7.js
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import{g as r}from"./@babel-Cvfd6jjG.js";var e,n={exports:{}};
|
2 |
+
/**
|
3 |
+
* chroma.js - JavaScript library for color conversions
|
4 |
+
*
|
5 |
+
* Copyright (c) 2011-2019, Gregor Aisch
|
6 |
+
* All rights reserved.
|
7 |
+
*
|
8 |
+
* Redistribution and use in source and binary forms, with or without
|
9 |
+
* modification, are permitted provided that the following conditions are met:
|
10 |
+
*
|
11 |
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
12 |
+
* list of conditions and the following disclaimer.
|
13 |
+
*
|
14 |
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
15 |
+
* this list of conditions and the following disclaimer in the documentation
|
16 |
+
* and/or other materials provided with the distribution.
|
17 |
+
*
|
18 |
+
* 3. The name Gregor Aisch may not be used to endorse or promote products
|
19 |
+
* derived from this software without specific prior written permission.
|
20 |
+
*
|
21 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
22 |
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
23 |
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
24 |
+
* DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
25 |
+
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
26 |
+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
27 |
+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
28 |
+
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
29 |
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
30 |
+
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
31 |
+
*
|
32 |
+
* -------------------------------------------------------
|
33 |
+
*
|
34 |
+
* chroma.js includes colors from colorbrewer2.org, which are released under
|
35 |
+
* the following license:
|
36 |
+
*
|
37 |
+
* Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
|
38 |
+
* and The Pennsylvania State University.
|
39 |
+
*
|
40 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
41 |
+
* you may not use this file except in compliance with the License.
|
42 |
+
* You may obtain a copy of the License at
|
43 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
44 |
+
*
|
45 |
+
* Unless required by applicable law or agreed to in writing,
|
46 |
+
* software distributed under the License is distributed on an
|
47 |
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
48 |
+
* either express or implied. See the License for the specific
|
49 |
+
* language governing permissions and limitations under the License.
|
50 |
+
*
|
51 |
+
* ------------------------------------------------------
|
52 |
+
*
|
53 |
+
* Named colors are taken from X11 Color Names.
|
54 |
+
* http://www.w3.org/TR/css3-color/#svg-color
|
55 |
+
*
|
56 |
+
* @preserve
|
57 |
+
*/var t=(e||(e=1,n.exports=function(){for(var r=function(r,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),r<e?e:r>n?n:r},e=function(e){e._clipped=!1,e._unclipped=e.slice(0);for(var n=0;n<=3;n++)n<3?((e[n]<0||e[n]>255)&&(e._clipped=!0),e[n]=r(e[n],0,255)):3===n&&(e[n]=r(e[n],0,1));return e},n={},t=0,a=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];t<a.length;t+=1){var f=a[t];n["[object "+f+"]"]=f.toLowerCase()}var o=function(r){return n[Object.prototype.toString.call(r)]||"object"},u=function(r,e){return void 0===e&&(e=null),r.length>=3?Array.prototype.slice.call(r):"object"==o(r[0])&&e?e.split("").filter(function(e){return void 0!==r[0][e]}).map(function(e){return r[0][e]}):r[0]},c=function(r){if(r.length<2)return null;var e=r.length-1;return"string"==o(r[e])?r[e].toLowerCase():null},i=Math.PI,l={clip_rgb:e,limit:r,type:o,unpack:u,last:c,TWOPI:2*i,PITHIRD:i/3,DEG2RAD:i/180,RAD2DEG:180/i},h={format:{},autodetect:[]},s=l.last,d=l.clip_rgb,b=l.type,p=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=this;if("object"===b(r[0])&&r[0].constructor&&r[0].constructor===this.constructor)return r[0];var t=s(r),a=!1;if(!t){a=!0,h.sorted||(h.autodetect=h.autodetect.sort(function(r,e){return e.p-r.p}),h.sorted=!0);for(var f=0,o=h.autodetect;f<o.length;f+=1){var u=o[f];if(t=u.test.apply(u,r))break}}if(!h.format[t])throw new Error("unknown format: "+r);var c=h.format[t].apply(null,a?r:r.slice(0,-1));n._rgb=d(c),3===n._rgb.length&&n._rgb.push(1)};p.prototype.toString=function(){return"function"==b(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var g=p,v=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(v.Color,[null].concat(r)))};v.Color=g,v.version="2.1.2";var m=v,y=l.unpack,w=Math.max,k=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=y(r,"rgb"),t=n[0],a=n[1],f=n[2],o=1-w(t/=255,w(a/=255,f/=255)),u=o<1?1/(1-o):0;return[(1-t-o)*u,(1-a-o)*u,(1-f-o)*u,o]},M=k,N=l.unpack,_=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=N(r,"cmyk"))[0],t=r[1],a=r[2],f=r[3],o=r.length>4?r[4]:1;return 1===f?[0,0,0,o]:[n>=1?0:255*(1-n)*(1-f),
|
58 |
+
// r
|
59 |
+
t>=1?0:255*(1-t)*(1-f),
|
60 |
+
// g
|
61 |
+
a>=1?0:255*(1-a)*(1-f),
|
62 |
+
// b
|
63 |
+
o]},x=_,A=l.unpack,E=l.type;g.prototype.cmyk=function(){return M(this._rgb)},m.cmyk=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["cmyk"])))},h.format.cmyk=x,h.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=A(r,"cmyk"),"array"===E(r)&&4===r.length)return"cmyk"}});var F=l.unpack,P=l.last,O=function(r){return Math.round(100*r)/100},j=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=F(r,"hsla"),t=P(r)||"lsa";return n[0]=O(n[0]||0),n[1]=O(100*n[1])+"%",n[2]=O(100*n[2])+"%","hsla"===t||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,t="hsla"):n.length=3,t+"("+n.join(",")+")"},G=j,q=l.unpack,L=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=q(r,"rgba"))[0],t=r[1],a=r[2];n/=255,t/=255,a/=255;var f,o,u=Math.min(n,t,a),c=Math.max(n,t,a),i=(c+u)/2;return c===u?(f=0,o=Number.NaN):f=i<.5?(c-u)/(c+u):(c-u)/(2-c-u),n==c?o=(t-a)/(c-u):t==c?o=2+(a-n)/(c-u):a==c&&(o=4+(n-t)/(c-u)),(o*=60)<0&&(o+=360),r.length>3&&void 0!==r[3]?[o,f,i,r[3]]:[o,f,i]},R=L,B=l.unpack,C=l.last,I=Math.round,D=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=B(r,"rgba"),t=C(r)||"rgb";return"hsl"==t.substr(0,3)?G(R(n),t):(n[0]=I(n[0]),n[1]=I(n[1]),n[2]=I(n[2]),("rgba"===t||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,t="rgba"),t+"("+n.slice(0,"rgb"===t?3:4).join(",")+")")},Y=D,S=l.unpack,$=Math.round,z=function(){for(var r,e=[],n=arguments.length;n--;)e[n]=arguments[n];var t,a,f,o=(e=S(e,"hsl"))[0],u=e[1],c=e[2];if(0===u)t=a=f=255*c;else{var i=[0,0,0],l=[0,0,0],h=c<.5?c*(1+u):c+u-c*u,s=2*c-h,d=o/360;i[0]=d+1/3,i[1]=d,i[2]=d-1/3;for(var b=0;b<3;b++)i[b]<0&&(i[b]+=1),i[b]>1&&(i[b]-=1),6*i[b]<1?l[b]=s+6*(h-s)*i[b]:2*i[b]<1?l[b]=h:3*i[b]<2?l[b]=s+(h-s)*(2/3-i[b])*6:l[b]=s;t=(r=[$(255*l[0]),$(255*l[1]),$(255*l[2])])[0],a=r[1],f=r[2]}return e.length>3?[t,a,f,e[3]]:[t,a,f,1]},T=z,X=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,U=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,V=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,W=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,K=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Z=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,H=Math.round,J=function(r){var e;if(r=r.toLowerCase().trim(),h.format.named)try{return h.format.named(r)}catch(p){}if(e=r.match(X)){for(var n=e.slice(1,4),t=0;t<3;t++)n[t]=+n[t];return n[3]=1,n}if(e=r.match(U)){for(var a=e.slice(1,5),f=0;f<4;f++)a[f]=+a[f];return a}if(e=r.match(V)){for(var o=e.slice(1,4),u=0;u<3;u++)o[u]=H(2.55*o[u]);return o[3]=1,o}if(e=r.match(W)){for(var c=e.slice(1,5),i=0;i<3;i++)c[i]=H(2.55*c[i]);return c[3]=+c[3],c}if(e=r.match(K)){var l=e.slice(1,4);l[1]*=.01,l[2]*=.01;var s=T(l);return s[3]=1,s}if(e=r.match(Z)){var d=e.slice(1,4);d[1]*=.01,d[2]*=.01;var b=T(d);return b[3]=+e[4],b}};J.test=function(r){return X.test(r)||U.test(r)||V.test(r)||W.test(r)||K.test(r)||Z.test(r)};var Q=J,rr=l.type;g.prototype.css=function(r){return Y(this._rgb,r)},m.css=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["css"])))},h.format.css=Q,h.autodetect.push({p:5,test:function(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];if(!e.length&&"string"===rr(r)&&Q.test(r))return"css"}});var er=l.unpack;h.format.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=er(r,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},m.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["gl"])))},g.prototype.gl=function(){var r=this._rgb;return[r[0]/255,r[1]/255,r[2]/255,r[3]]};var nr=l.unpack,tr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t=nr(r,"rgb"),a=t[0],f=t[1],o=t[2],u=Math.min(a,f,o),c=Math.max(a,f,o),i=c-u,l=100*i/255,h=u/(255-i)*100;return 0===i?n=Number.NaN:(a===c&&(n=(f-o)/i),f===c&&(n=2+(o-a)/i),o===c&&(n=4+(a-f)/i),(n*=60)<0&&(n+=360)),[n,l,h]},ar=tr,fr=l.unpack,or=Math.floor,ur=function(){for(var r,e,n,t,a,f,o=[],u=arguments.length;u--;)o[u]=arguments[u];var c,i,l,h=(o=fr(o,"hcg"))[0],s=o[1],d=o[2];d*=255;var b=255*s;if(0===s)c=i=l=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var p=or(h/=60),g=h-p,v=d*(1-s),m=v+b*(1-g),y=v+b*g,w=v+b;switch(p){case 0:c=(r=[w,y,v])[0],i=r[1],l=r[2];break;case 1:c=(e=[m,w,v])[0],i=e[1],l=e[2];break;case 2:c=(n=[v,w,y])[0],i=n[1],l=n[2];break;case 3:c=(t=[v,m,w])[0],i=t[1],l=t[2];break;case 4:c=(a=[y,v,w])[0],i=a[1],l=a[2];break;case 5:c=(f=[w,v,m])[0],i=f[1],l=f[2]}}return[c,i,l,o.length>3?o[3]:1]},cr=ur,ir=l.unpack,lr=l.type;g.prototype.hcg=function(){return ar(this._rgb)},m.hcg=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["hcg"])))},h.format.hcg=cr,h.autodetect.push({p:1,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=ir(r,"hcg"),"array"===lr(r)&&3===r.length)return"hcg"}});var hr=l.unpack,sr=l.last,dr=Math.round,br=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=hr(r,"rgba"),t=n[0],a=n[1],f=n[2],o=n[3],u=sr(r)||"auto";void 0===o&&(o=1),"auto"===u&&(u=o<1?"rgba":"rgb");var c="000000"+((t=dr(t))<<16|(a=dr(a))<<8|(f=dr(f))).toString(16);c=c.substr(c.length-6);var i="0"+dr(255*o).toString(16);switch(i=i.substr(i.length-2),u.toLowerCase()){case"rgba":return"#"+c+i;case"argb":return"#"+i+c;default:return"#"+c}},pr=br,gr=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,vr=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,mr=function(r){if(r.match(gr)){4!==r.length&&7!==r.length||(r=r.substr(1)),3===r.length&&(r=(r=r.split(""))[0]+r[0]+r[1]+r[1]+r[2]+r[2]);var e=parseInt(r,16);return[e>>16,e>>8&255,255&e,1]}if(r.match(vr)){5!==r.length&&9!==r.length||(r=r.substr(1)),4===r.length&&(r=(r=r.split(""))[0]+r[0]+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]);var n=parseInt(r,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+r)},yr=l.type;g.prototype.hex=function(r){return pr(this._rgb,r)},m.hex=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["hex"])))},h.format.hex=mr,h.autodetect.push({p:4,test:function(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];if(!e.length&&"string"===yr(r)&&[3,4,5,6,7,8,9].indexOf(r.length)>=0)return"hex"}});var wr=l.unpack,kr=l.TWOPI,Mr=Math.min,Nr=Math.sqrt,_r=Math.acos,xr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t=wr(r,"rgb"),a=t[0],f=t[1],o=t[2],u=Mr(a/=255,f/=255,o/=255),c=(a+f+o)/3,i=c>0?1-u/c:0;return 0===i?n=NaN:(n=(a-f+(a-o))/2,n/=Nr((a-f)*(a-f)+(a-o)*(f-o)),n=_r(n),o>f&&(n=kr-n),n/=kr),[360*n,i,c]},Ar=xr,Er=l.unpack,Fr=l.limit,Pr=l.TWOPI,Or=l.PITHIRD,jr=Math.cos,Gr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,f=(r=Er(r,"hsi"))[0],o=r[1],u=r[2];return isNaN(f)&&(f=0),isNaN(o)&&(o=0),f>360&&(f-=360),f<0&&(f+=360),(f/=360)<1/3?t=1-((a=(1-o)/3)+(n=(1+o*jr(Pr*f)/jr(Or-Pr*f))/3)):f<2/3?a=1-((n=(1-o)/3)+(t=(1+o*jr(Pr*(f-=1/3))/jr(Or-Pr*f))/3)):n=1-((t=(1-o)/3)+(a=(1+o*jr(Pr*(f-=2/3))/jr(Or-Pr*f))/3)),[255*(n=Fr(u*n*3)),255*(t=Fr(u*t*3)),255*(a=Fr(u*a*3)),r.length>3?r[3]:1]},qr=Gr,Lr=l.unpack,Rr=l.type;g.prototype.hsi=function(){return Ar(this._rgb)},m.hsi=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["hsi"])))},h.format.hsi=qr,h.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Lr(r,"hsi"),"array"===Rr(r)&&3===r.length)return"hsi"}});var Br=l.unpack,Cr=l.type;g.prototype.hsl=function(){return R(this._rgb)},m.hsl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["hsl"])))},h.format.hsl=T,h.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Br(r,"hsl"),"array"===Cr(r)&&3===r.length)return"hsl"}});var Ir=l.unpack,Dr=Math.min,Yr=Math.max,Sr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,f=(r=Ir(r,"rgb"))[0],o=r[1],u=r[2],c=Dr(f,o,u),i=Yr(f,o,u),l=i-c;return a=i/255,0===i?(n=Number.NaN,t=0):(t=l/i,f===i&&(n=(o-u)/l),o===i&&(n=2+(u-f)/l),u===i&&(n=4+(f-o)/l),(n*=60)<0&&(n+=360)),[n,t,a]},$r=Sr,zr=l.unpack,Tr=Math.floor,Xr=function(){for(var r,e,n,t,a,f,o=[],u=arguments.length;u--;)o[u]=arguments[u];var c,i,l,h=(o=zr(o,"hsv"))[0],s=o[1],d=o[2];if(d*=255,0===s)c=i=l=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var b=Tr(h/=60),p=h-b,g=d*(1-s),v=d*(1-s*p),m=d*(1-s*(1-p));switch(b){case 0:c=(r=[d,m,g])[0],i=r[1],l=r[2];break;case 1:c=(e=[v,d,g])[0],i=e[1],l=e[2];break;case 2:c=(n=[g,d,m])[0],i=n[1],l=n[2];break;case 3:c=(t=[g,v,d])[0],i=t[1],l=t[2];break;case 4:c=(a=[m,g,d])[0],i=a[1],l=a[2];break;case 5:c=(f=[d,g,v])[0],i=f[1],l=f[2]}}return[c,i,l,o.length>3?o[3]:1]},Ur=Xr,Vr=l.unpack,Wr=l.type;g.prototype.hsv=function(){return $r(this._rgb)},m.hsv=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["hsv"])))},h.format.hsv=Ur,h.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Vr(r,"hsv"),"array"===Wr(r)&&3===r.length)return"hsv"}});var Kr={
|
64 |
+
// Corresponds roughly to RGB brighter/darker
|
65 |
+
Kn:18,
|
66 |
+
// D65 standard referent
|
67 |
+
Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,
|
68 |
+
// 4 / 29
|
69 |
+
t1:.206896552,
|
70 |
+
// 6 / 29
|
71 |
+
t2:.12841855,
|
72 |
+
// 3 * t1 * t1
|
73 |
+
t3:.008856452},Zr=l.unpack,Hr=Math.pow,Jr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Zr(r,"rgb"),t=n[0],a=n[1],f=n[2],o=ee(t,a,f),u=o[0],c=o[1],i=116*c-16;return[i<0?0:i,500*(u-c),200*(c-o[2])]},Qr=function(r){return(r/=255)<=.04045?r/12.92:Hr((r+.055)/1.055,2.4)},re=function(r){return r>Kr.t3?Hr(r,1/3):r/Kr.t2+Kr.t0},ee=function(r,e,n){return r=Qr(r),e=Qr(e),n=Qr(n),[re((.4124564*r+.3575761*e+.1804375*n)/Kr.Xn),re((.2126729*r+.7151522*e+.072175*n)/Kr.Yn),re((.0193339*r+.119192*e+.9503041*n)/Kr.Zn)]},ne=Jr,te=l.unpack,ae=Math.pow,fe=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,f=(r=te(r,"lab"))[0],o=r[1],u=r[2];return t=(f+16)/116,n=isNaN(o)?t:t+o/500,a=isNaN(u)?t:t-u/200,t=Kr.Yn*ue(t),n=Kr.Xn*ue(n),a=Kr.Zn*ue(a),[oe(3.2404542*n-1.5371385*t-.4985314*a),oe(-.969266*n+1.8760108*t+.041556*a),oe(.0556434*n-.2040259*t+1.0572252*a),r.length>3?r[3]:1]},oe=function(r){return 255*(r<=.00304?12.92*r:1.055*ae(r,1/2.4)-.055)},ue=function(r){return r>Kr.t1?r*r*r:Kr.t2*(r-Kr.t0)},ce=fe,ie=l.unpack,le=l.type;g.prototype.lab=function(){return ne(this._rgb)},m.lab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["lab"])))},h.format.lab=ce,h.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=ie(r,"lab"),"array"===le(r)&&3===r.length)return"lab"}});var he=l.unpack,se=l.RAD2DEG,de=Math.sqrt,be=Math.atan2,pe=Math.round,ge=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=he(r,"lab"),t=n[0],a=n[1],f=n[2],o=de(a*a+f*f),u=(be(f,a)*se+360)%360;return 0===pe(1e4*o)&&(u=Number.NaN),[t,o,u]},ve=ge,me=l.unpack,ye=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=me(r,"rgb"),t=n[0],a=n[1],f=n[2],o=ne(t,a,f),u=o[0],c=o[1],i=o[2];return ve(u,c,i)},we=ye,ke=l.unpack,Me=l.DEG2RAD,Ne=Math.sin,_e=Math.cos,xe=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=ke(r,"lch"),t=n[0],a=n[1],f=n[2];return isNaN(f)&&(f=0),[t,_e(f*=Me)*a,Ne(f)*a]},Ae=xe,Ee=l.unpack,Fe=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=Ee(r,"lch"))[0],t=r[1],a=r[2],f=Ae(n,t,a),o=f[0],u=f[1],c=f[2],i=ce(o,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},Pe=Fe,Oe=l.unpack,je=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Oe(r,"hcl").reverse();return Pe.apply(void 0,n)},Ge=je,qe=l.unpack,Le=l.type;g.prototype.lch=function(){return we(this._rgb)},g.prototype.hcl=function(){return we(this._rgb).reverse()},m.lch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["lch"])))},m.hcl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["hcl"])))},h.format.lch=Pe,h.format.hcl=Ge,["lch","hcl"].forEach(function(r){return h.autodetect.push({p:2,test:function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];if(e=qe(e,r),"array"===Le(e)&&3===e.length)return r}})});var Re={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",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#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",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",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",maroon2:"#7f0000",maroon3:"#b03060",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",purple2:"#7f007f",purple3:"#a020f0",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",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Be=l.type;g.prototype.name=function(){for(var r=pr(this._rgb,"rgb"),e=0,n=Object.keys(Re);e<n.length;e+=1){var t=n[e];if(Re[t]===r)return t.toLowerCase()}return r},h.format.named=function(r){if(r=r.toLowerCase(),Re[r])return mr(Re[r]);throw new Error("unknown color name: "+r)},h.autodetect.push({p:5,test:function(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];if(!e.length&&"string"===Be(r)&&Re[r.toLowerCase()])return"named"}});var Ce=l.unpack,Ie=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Ce(r,"rgb");return(n[0]<<16)+(n[1]<<8)+n[2]},De=Ie,Ye=l.type,Se=function(r){if("number"==Ye(r)&&r>=0&&r<=16777215)return[r>>16,r>>8&255,255&r,1];throw new Error("unknown num color: "+r)},$e=l.type;g.prototype.num=function(){return De(this._rgb)},m.num=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["num"])))},h.format.num=Se,h.autodetect.push({p:5,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(1===r.length&&"number"===$e(r[0])&&r[0]>=0&&r[0]<=16777215)return"num"}});var ze=l.unpack,Te=l.type,Xe=Math.round;g.prototype.rgb=function(r){return void 0===r&&(r=!0),!1===r?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Xe)},g.prototype.rgba=function(r){return void 0===r&&(r=!0),this._rgb.slice(0,4).map(function(e,n){return n<3?!1===r?e:Xe(e):e})},m.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["rgb"])))},h.format.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=ze(r,"rgba");return void 0===n[3]&&(n[3]=1),n},h.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=ze(r,"rgba"),"array"===Te(r)&&(3===r.length||4===r.length&&"number"==Te(r[3])&&r[3]>=0&&r[3]<=1))return"rgb"}});var Ue=Math.log,Ve=function(r){var e,n,t,a=r/100;return a<66?(e=255,n=-155.25485562709179-.44596950469579133*(n=a-2)+104.49216199393888*Ue(n),t=a<20?0:.8274096064007395*(t=a-10)-254.76935184120902+115.67994401066147*Ue(t)):(e=351.97690566805693+.114206453784165*(e=a-55)-40.25366309332127*Ue(e),n=325.4494125711974+.07943456536662342*(n=a-50)-28.0852963507957*Ue(n),t=255),[e,n,t,1]},We=l.unpack,Ke=Math.round,Ze=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];for(var n,t=We(r,"rgb"),a=t[0],f=t[2],o=1e3,u=4e4,c=.4;u-o>c;){var i=Ve(n=.5*(u+o));i[2]/i[0]>=f/a?u=n:o=n}return Ke(n)},He=Ze;g.prototype.temp=g.prototype.kelvin=g.prototype.temperature=function(){return He(this._rgb)},m.temp=m.kelvin=m.temperature=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(g,[null].concat(r,["temp"])))},h.format.temp=h.format.kelvin=h.format.temperature=Ve;var Je=l.type;g.prototype.alpha=function(r,e){return void 0===e&&(e=!1),void 0!==r&&"number"===Je(r)?e?(this._rgb[3]=r,this):new g([this._rgb[0],this._rgb[1],this._rgb[2],r],"rgb"):this._rgb[3]},g.prototype.clipped=function(){return this._rgb._clipped||!1},g.prototype.darken=function(r){void 0===r&&(r=1);var e=this,n=e.lab();return n[0]-=Kr.Kn*r,new g(n,"lab").alpha(e.alpha(),!0)},g.prototype.brighten=function(r){return void 0===r&&(r=1),this.darken(-r)},g.prototype.darker=g.prototype.darken,g.prototype.brighter=g.prototype.brighten,g.prototype.get=function(r){var e=r.split("."),n=e[0],t=e[1],a=this[n]();if(t){var f=n.indexOf(t);if(f>-1)return a[f];throw new Error("unknown channel "+t+" in mode "+n)}return a};var Qe=l.type,rn=Math.pow,en=1e-7,nn=20;g.prototype.luminance=function(r){if(void 0!==r&&"number"===Qe(r)){if(0===r)return new g([0,0,0,this._rgb[3]],"rgb");if(1===r)return new g([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),n="rgb",t=nn,a=function(e,f){var o=e.interpolate(f,.5,n),u=o.luminance();return Math.abs(r-u)<en||!t--?o:u>r?a(e,o):a(o,f)},f=(e>r?a(new g([0,0,0]),this):a(this,new g([255,255,255]))).rgb();return new g(f.concat([this._rgb[3]]))}return tn.apply(void 0,this._rgb.slice(0,3))};var tn=function(r,e,n){return.2126*(r=an(r))+.7152*(e=an(e))+.0722*(n=an(n))},an=function(r){return(r/=255)<=.03928?r/12.92:rn((r+.055)/1.055,2.4)},fn={},on=l.type,un=function(r,e,n){void 0===n&&(n=.5);for(var t=[],a=arguments.length-3;a-- >0;)t[a]=arguments[a+3];var f=t[0]||"lrgb";if(fn[f]||t.length||(f=Object.keys(fn)[0]),!fn[f])throw new Error("interpolation mode "+f+" is not defined");return"object"!==on(r)&&(r=new g(r)),"object"!==on(e)&&(e=new g(e)),fn[f](r,e,n).alpha(r.alpha()+n*(e.alpha()-r.alpha()))};g.prototype.mix=g.prototype.interpolate=function(r,e){void 0===e&&(e=.5);for(var n=[],t=arguments.length-2;t-- >0;)n[t]=arguments[t+2];return un.apply(void 0,[this,r,e].concat(n))},g.prototype.premultiply=function(r){void 0===r&&(r=!1);var e=this._rgb,n=e[3];return r?(this._rgb=[e[0]*n,e[1]*n,e[2]*n,n],this):new g([e[0]*n,e[1]*n,e[2]*n,n],"rgb")},g.prototype.saturate=function(r){void 0===r&&(r=1);var e=this,n=e.lch();return n[1]+=Kr.Kn*r,n[1]<0&&(n[1]=0),new g(n,"lch").alpha(e.alpha(),!0)},g.prototype.desaturate=function(r){return void 0===r&&(r=1),this.saturate(-r)};var cn=l.type;g.prototype.set=function(r,e,n){void 0===n&&(n=!1);var t=r.split("."),a=t[0],f=t[1],o=this[a]();if(f){var u=a.indexOf(f);if(u>-1){if("string"==cn(e))switch(e.charAt(0)){case"+":case"-":o[u]+=+e;break;case"*":o[u]*=+e.substr(1);break;case"/":o[u]/=+e.substr(1);break;default:o[u]=+e}else{if("number"!==cn(e))throw new Error("unsupported value for Color.set");o[u]=e}var c=new g(o,a);return n?(this._rgb=c._rgb,this):c}throw new Error("unknown channel "+f+" in mode "+a)}return o};var ln=function(r,e,n){var t=r._rgb,a=e._rgb;return new g(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"rgb")};fn.rgb=ln;var hn=Math.sqrt,sn=Math.pow,dn=function(r,e,n){var t=r._rgb,a=t[0],f=t[1],o=t[2],u=e._rgb,c=u[0],i=u[1],l=u[2];return new g(hn(sn(a,2)*(1-n)+sn(c,2)*n),hn(sn(f,2)*(1-n)+sn(i,2)*n),hn(sn(o,2)*(1-n)+sn(l,2)*n),"rgb")};fn.lrgb=dn;var bn=function(r,e,n){var t=r.lab(),a=e.lab();return new g(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"lab")};fn.lab=bn;var pn=function(r,e,n,t){var a,f,o,u,c,i,l,h,s,d,b,p;return"hsl"===t?(o=r.hsl(),u=e.hsl()):"hsv"===t?(o=r.hsv(),u=e.hsv()):"hcg"===t?(o=r.hcg(),u=e.hcg()):"hsi"===t?(o=r.hsi(),u=e.hsi()):"lch"!==t&&"hcl"!==t||(t="hcl",o=r.hcl(),u=e.hcl()),"h"===t.substr(0,1)&&(c=(a=o)[0],l=a[1],s=a[2],i=(f=u)[0],h=f[1],d=f[2]),isNaN(c)||isNaN(i)?isNaN(c)?isNaN(i)?p=Number.NaN:(p=i,1!=s&&0!=s||"hsv"==t||(b=h)):(p=c,1!=d&&0!=d||"hsv"==t||(b=l)):p=c+n*(i>c&&i-c>180?i-(c+360):i<c&&c-i>180?i+360-c:i-c),void 0===b&&(b=l+n*(h-l)),new g([p,b,s+n*(d-s)],t)},gn=function(r,e,n){return pn(r,e,n,"lch")};fn.lch=gn,fn.hcl=gn;var vn=function(r,e,n){var t=r.num(),a=e.num();return new g(t+n*(a-t),"num")};fn.num=vn;var mn=function(r,e,n){return pn(r,e,n,"hcg")};fn.hcg=mn;var yn=function(r,e,n){return pn(r,e,n,"hsi")};fn.hsi=yn;var wn=function(r,e,n){return pn(r,e,n,"hsl")};fn.hsl=wn;var kn=function(r,e,n){return pn(r,e,n,"hsv")};fn.hsv=kn;var Mn=l.clip_rgb,Nn=Math.pow,_n=Math.sqrt,xn=Math.PI,An=Math.cos,En=Math.sin,Fn=Math.atan2,Pn=function(r,e,n){void 0===e&&(e="lrgb"),void 0===n&&(n=null);var t=r.length;n||(n=Array.from(new Array(t)).map(function(){return 1}));var a=t/n.reduce(function(r,e){return r+e});if(n.forEach(function(r,e){n[e]*=a}),r=r.map(function(r){return new g(r)}),"lrgb"===e)return On(r,n);for(var f=r.shift(),o=f.get(e),u=[],c=0,i=0,l=0;l<o.length;l++)if(o[l]=(o[l]||0)*n[0],u.push(isNaN(o[l])?0:n[0]),"h"===e.charAt(l)&&!isNaN(o[l])){var h=o[l]/180*xn;c+=An(h)*n[0],i+=En(h)*n[0]}var s=f.alpha()*n[0];r.forEach(function(r,t){var a=r.get(e);s+=r.alpha()*n[t+1];for(var f=0;f<o.length;f++)if(!isNaN(a[f]))if(u[f]+=n[t+1],"h"===e.charAt(f)){var l=a[f]/180*xn;c+=An(l)*n[t+1],i+=En(l)*n[t+1]}else o[f]+=a[f]*n[t+1]});for(var d=0;d<o.length;d++)if("h"===e.charAt(d)){for(var b=Fn(i/u[d],c/u[d])/xn*180;b<0;)b+=360;for(;b>=360;)b-=360;o[d]=b}else o[d]=o[d]/u[d];return s/=t,new g(o,e).alpha(s>.99999?1:s,!0)},On=function(r,e){for(var n=r.length,t=[0,0,0,0],a=0;a<r.length;a++){var f=r[a],o=e[a]/n,u=f._rgb;t[0]+=Nn(u[0],2)*o,t[1]+=Nn(u[1],2)*o,t[2]+=Nn(u[2],2)*o,t[3]+=u[3]*o}return t[0]=_n(t[0]),t[1]=_n(t[1]),t[2]=_n(t[2]),t[3]>.9999999&&(t[3]=1),new g(Mn(t))},jn=l.type,Gn=Math.pow,qn=function(r){var e="rgb",n=m("#ccc"),t=0,a=[0,1],f=[],o=[0,0],u=!1,c=[],i=!1,l=0,h=1,s=!1,d={},b=!0,p=1,g=function(r){if((r=r||["#fff","#000"])&&"string"===jn(r)&&m.brewer&&m.brewer[r.toLowerCase()]&&(r=m.brewer[r.toLowerCase()]),"array"===jn(r)){1===r.length&&(r=[r[0],r[0]]),r=r.slice(0);for(var e=0;e<r.length;e++)r[e]=m(r[e]);f.length=0;for(var n=0;n<r.length;n++)f.push(n/(r.length-1))}return M(),c=r},v=function(r){if(null!=u){for(var e=u.length-1,n=0;n<e&&r>=u[n];)n++;return n-1}return 0},y=function(r){return r},w=function(r){return r},k=function(r,t){var a,i;if(null==t&&(t=!1),isNaN(r)||null===r)return n;i=t?r:u&&u.length>2?v(r)/(u.length-2):h!==l?(r-l)/(h-l):1,i=w(i),t||(i=y(i)),1!==p&&(i=Gn(i,p)),i=o[0]+i*(1-o[0]-o[1]),i=Math.min(1,Math.max(0,i));var s=Math.floor(1e4*i);if(b&&d[s])a=d[s];else{if("array"===jn(c))for(var g=0;g<f.length;g++){var k=f[g];if(i<=k){a=c[g];break}if(i>=k&&g===f.length-1){a=c[g];break}if(i>k&&i<f[g+1]){i=(i-k)/(f[g+1]-k),a=m.interpolate(c[g],c[g+1],i,e);break}}else"function"===jn(c)&&(a=c(i));b&&(d[s]=a)}return a},M=function(){return d={}};g(r);var N=function(r){var e=m(k(r));return i&&e[i]?e[i]():e};return N.classes=function(r){if(null!=r){if("array"===jn(r))u=r,a=[r[0],r[r.length-1]];else{var e=m.analyze(a);u=0===r?[e.min,e.max]:m.limits(e,"e",r)}return N}return u},N.domain=function(r){if(!arguments.length)return a;l=r[0],h=r[r.length-1],f=[];var e=c.length;if(r.length===e&&l!==h)for(var n=0,t=Array.from(r);n<t.length;n+=1){var o=t[n];f.push((o-l)/(h-l))}else{for(var u=0;u<e;u++)f.push(u/(e-1));if(r.length>2){var i=r.map(function(e,n){return n/(r.length-1)}),s=r.map(function(r){return(r-l)/(h-l)});s.every(function(r,e){return i[e]===r})||(w=function(r){if(r<=0||r>=1)return r;for(var e=0;r>=s[e+1];)e++;var n=(r-s[e])/(s[e+1]-s[e]);return i[e]+n*(i[e+1]-i[e])})}}return a=[l,h],N},N.mode=function(r){return arguments.length?(e=r,M(),N):e},N.range=function(r,e){return g(r),N},N.out=function(r){return i=r,N},N.spread=function(r){return arguments.length?(t=r,N):t},N.correctLightness=function(r){return null==r&&(r=!0),s=r,M(),y=s?function(r){for(var e=k(0,!0).lab()[0],n=k(1,!0).lab()[0],t=e>n,a=k(r,!0).lab()[0],f=e+(n-e)*r,o=a-f,u=0,c=1,i=20;Math.abs(o)>.01&&i-- >0;)(function(){t&&(o*=-1),o<0?(u=r,r+=.5*(c-r)):(c=r,r+=.5*(u-r)),a=k(r,!0).lab()[0],o=a-f})();return r}:function(r){return r},N},N.padding=function(r){return null!=r?("number"===jn(r)&&(r=[r,r]),o=r,N):o},N.colors=function(e,n){arguments.length<2&&(n="hex");var t=[];if(0===arguments.length)t=c.slice(0);else if(1===e)t=[N(.5)];else if(e>1){var f=a[0],o=a[1]-f;t=Ln(0,e).map(function(r){return N(f+r/(e-1)*o)})}else{r=[];var i=[];if(u&&u.length>2)for(var l=1,h=u.length,s=1<=h;s?l<h:l>h;s?l++:l--)i.push(.5*(u[l-1]+u[l]));else i=a;t=i.map(function(r){return N(r)})}return m[n]&&(t=t.map(function(r){return r[n]()})),t},N.cache=function(r){return null!=r?(b=r,N):b},N.gamma=function(r){return null!=r?(p=r,N):p},N.nodata=function(r){return null!=r?(n=m(r),N):n},N};function Ln(r,e,n){for(var t=[],a=r<e,f=e,o=r;a?o<f:o>f;a?o++:o--)t.push(o);return t}var Rn=function(r){var e,n,t,a,f,o,u;if(2===(r=r.map(function(r){return new g(r)})).length)e=r.map(function(r){return r.lab()}),f=e[0],o=e[1],a=function(r){var e=[0,1,2].map(function(e){return f[e]+r*(o[e]-f[e])});return new g(e,"lab")};else if(3===r.length)n=r.map(function(r){return r.lab()}),f=n[0],o=n[1],u=n[2],a=function(r){var e=[0,1,2].map(function(e){return(1-r)*(1-r)*f[e]+2*(1-r)*r*o[e]+r*r*u[e]});return new g(e,"lab")};else if(4===r.length){var c;t=r.map(function(r){return r.lab()}),f=t[0],o=t[1],u=t[2],c=t[3],a=function(r){var e=[0,1,2].map(function(e){return(1-r)*(1-r)*(1-r)*f[e]+3*(1-r)*(1-r)*r*o[e]+3*(1-r)*r*r*u[e]+r*r*r*c[e]});return new g(e,"lab")}}else if(5===r.length){var i=Rn(r.slice(0,3)),l=Rn(r.slice(2,5));a=function(r){return r<.5?i(2*r):l(2*(r-.5))}}return a},Bn=function(r){var e=Rn(r);return e.scale=function(){return qn(e)},e},Cn=function(r,e,n){if(!Cn[n])throw new Error("unknown blend mode "+n);return Cn[n](r,e)},In=function(r){return function(e,n){var t=m(n).rgb(),a=m(e).rgb();return m.rgb(r(t,a))}},Dn=function(r){return function(e,n){var t=[];return t[0]=r(e[0],n[0]),t[1]=r(e[1],n[1]),t[2]=r(e[2],n[2]),t}},Yn=function(r){return r},Sn=function(r,e){return r*e/255},$n=function(r,e){return r>e?e:r},zn=function(r,e){return r>e?r:e},Tn=function(r,e){return 255*(1-(1-r/255)*(1-e/255))},Xn=function(r,e){return e<128?2*r*e/255:255*(1-2*(1-r/255)*(1-e/255))},Un=function(r,e){return 255*(1-(1-e/255)/(r/255))},Vn=function(r,e){return 255===r||(r=e/255*255/(1-r/255))>255?255:r};Cn.normal=In(Dn(Yn)),Cn.multiply=In(Dn(Sn)),Cn.screen=In(Dn(Tn)),Cn.overlay=In(Dn(Xn)),Cn.darken=In(Dn($n)),Cn.lighten=In(Dn(zn)),Cn.dodge=In(Dn(Vn)),Cn.burn=In(Dn(Un));for(var Wn=Cn,Kn=l.type,Zn=l.clip_rgb,Hn=l.TWOPI,Jn=Math.pow,Qn=Math.sin,rt=Math.cos,et=function(r,e,n,t,a){void 0===r&&(r=300),void 0===e&&(e=-1.5),void 0===n&&(n=1),void 0===t&&(t=1),void 0===a&&(a=[0,1]);var f,o=0;"array"===Kn(a)?f=a[1]-a[0]:(f=0,a=[a,a]);var u=function(u){var c=Hn*((r+120)/360+e*u),i=Jn(a[0]+f*u,t),l=(0!==o?n[0]+u*o:n)*i*(1-i)/2,h=rt(c),s=Qn(c);return m(Zn([255*(i+l*(-.14861*h+1.78277*s)),255*(i+l*(-.29227*h-.90649*s)),255*(i+l*(1.97294*h)),1]))};return u.start=function(e){return null==e?r:(r=e,u)},u.rotations=function(r){return null==r?e:(e=r,u)},u.gamma=function(r){return null==r?t:(t=r,u)},u.hue=function(r){return null==r?n:("array"===Kn(n=r)?0===(o=n[1]-n[0])&&(n=n[1]):o=0,u)},u.lightness=function(r){return null==r?a:("array"===Kn(r)?(a=r,f=r[1]-r[0]):(a=[r,r],f=0),u)},u.scale=function(){return m.scale(u)},u.hue(n),u},nt="0123456789abcdef",tt=Math.floor,at=Math.random,ft=function(){for(var r="#",e=0;e<6;e++)r+=nt.charAt(tt(16*at()));return new g(r,"hex")},ot=Math.log,ut=Math.pow,ct=Math.floor,it=Math.abs,lt=function(r,e){void 0===e&&(e=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===o(r)&&(r=Object.values(r)),r.forEach(function(r){e&&"object"===o(r)&&(r=r[e]),null==r||isNaN(r)||(n.values.push(r),n.sum+=r,r<n.min&&(n.min=r),r>n.max&&(n.max=r),n.count+=1)}),n.domain=[n.min,n.max],n.limits=function(r,e){return ht(n,r,e)},n},ht=function(r,e,n){void 0===e&&(e="equal"),void 0===n&&(n=7),"array"==o(r)&&(r=lt(r));var t=r.min,a=r.max,f=r.values.sort(function(r,e){return r-e});if(1===n)return[t,a];var u=[];if("c"===e.substr(0,1)&&(u.push(t),u.push(a)),"e"===e.substr(0,1)){u.push(t);for(var c=1;c<n;c++)u.push(t+c/n*(a-t));u.push(a)}else if("l"===e.substr(0,1)){if(t<=0)throw new Error("Logarithmic scales are only possible for values > 0");var i=Math.LOG10E*ot(t),l=Math.LOG10E*ot(a);u.push(t);for(var h=1;h<n;h++)u.push(ut(10,i+h/n*(l-i)));u.push(a)}else if("q"===e.substr(0,1)){u.push(t);for(var s=1;s<n;s++){var d=(f.length-1)*s/n,b=ct(d);if(b===d)u.push(f[b]);else{var p=d-b;u.push(f[b]*(1-p)+f[b+1]*p)}}u.push(a)}else if("k"===e.substr(0,1)){var g,v=f.length,m=new Array(v),y=new Array(n),w=!0,k=0,M=null;(M=[]).push(t);for(var N=1;N<n;N++)M.push(t+N/n*(a-t));for(M.push(a);w;){for(var _=0;_<n;_++)y[_]=0;for(var x=0;x<v;x++)for(var A=f[x],E=Number.MAX_VALUE,F=void 0,P=0;P<n;P++){var O=it(M[P]-A);O<E&&(E=O,F=P),y[F]++,m[x]=F}for(var j=new Array(n),G=0;G<n;G++)j[G]=null;for(var q=0;q<v;q++)null===j[g=m[q]]?j[g]=f[q]:j[g]+=f[q];for(var L=0;L<n;L++)j[L]*=1/y[L];w=!1;for(var R=0;R<n;R++)if(j[R]!==M[R]){w=!0;break}M=j,++k>200&&(w=!1)}for(var B={},C=0;C<n;C++)B[C]=[];for(var I=0;I<v;I++)B[g=m[I]].push(f[I]);for(var D=[],Y=0;Y<n;Y++)D.push(B[Y][0]),D.push(B[Y][B[Y].length-1]);D=D.sort(function(r,e){return r-e}),u.push(D[0]);for(var S=1;S<D.length;S+=2){var $=D[S];isNaN($)||-1!==u.indexOf($)||u.push($)}}return u},st={analyze:lt,limits:ht},dt=function(r,e){r=new g(r),e=new g(e);var n=r.luminance(),t=e.luminance();return n>t?(n+.05)/(t+.05):(t+.05)/(n+.05)},bt=Math.sqrt,pt=Math.atan2,gt=Math.abs,vt=Math.cos,mt=Math.PI,yt=function(r,e,n,t){void 0===n&&(n=1),void 0===t&&(t=1),r=new g(r),e=new g(e);for(var a=Array.from(r.lab()),f=a[0],o=a[1],u=a[2],c=Array.from(e.lab()),i=c[0],l=c[1],h=c[2],s=bt(o*o+u*u),d=bt(l*l+h*h),b=f<16?.511:.040975*f/(1+.01765*f),p=.0638*s/(1+.0131*s)+.638,v=s<1e-6?0:180*pt(u,o)/mt;v<0;)v+=360;for(;v>=360;)v-=360;var m=v>=164&&v<=345?.56+gt(.2*vt(mt*(v+168)/180)):.36+gt(.4*vt(mt*(v+35)/180)),y=s*s*s*s,w=bt(y/(y+1900)),k=p*(w*m+1-w),M=s-d,N=o-l,_=u-h,x=(f-i)/(n*b),A=M/(t*p);return bt(x*x+A*A+(N*N+_*_-M*M)/(k*k))},wt=function(r,e,n){void 0===n&&(n="lab"),r=new g(r),e=new g(e);var t=r.get(n),a=e.get(n),f=0;for(var o in t){var u=(t[o]||0)-(a[o]||0);f+=u*u}return Math.sqrt(f)},kt=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];try{return new(Function.prototype.bind.apply(g,[null].concat(r))),!0}catch(n){return!1}},Mt={cool:function(){return qn([m.hsl(180,1,.9),m.hsl(250,.7,.4)])},hot:function(){return qn(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Nt={
|
74 |
+
// sequential
|
75 |
+
OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],
|
76 |
+
// diverging
|
77 |
+
Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],
|
78 |
+
// qualitative
|
79 |
+
Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},_t=0,xt=Object.keys(Nt);_t<xt.length;_t+=1){var At=xt[_t];Nt[At.toLowerCase()]=Nt[At]}var Et=Nt;return m.average=Pn,m.bezier=Bn,m.blend=Wn,m.cubehelix=et,m.mix=m.interpolate=un,m.random=ft,m.scale=qn,m.analyze=st.analyze,m.contrast=dt,m.deltaE=yt,m.distance=wt,m.limits=st.limits,m.valid=kt,m.scales=Mt,m.colors=Re,m.brewer=Et,m}()),n.exports);const a=r(t);export{t as c,a as l};
|
.output/public/assets/content-CgNX0a7-.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-CkN0N_Db.js";import{_ as l}from"./ChatInput.vue_vue_type_style_index_0_lang-YsHH5-3J.js";import{b as s,u as n,e as i,t as r,m as u}from"./mermaid-render-X-MOXnA6.js";import{a as c,u as m}from"./vue-router-C6tQ8LXb.js";import{m as p}from"./markdown-BriXMo42.js";import{s as d,b as v,P as f,T as j,A as g,r as h,f as x,e as y}from"./tdesign-vue-next-naVa2zv2.js";import{c as _,ad as w,_ as b,a5 as k,W as C,a4 as T,ae as z}from"./tdesign-icons-vue-next-BrEXHWAJ.js";import{l as E,a as B,U as $,w as H,o as I,v as S,y as M,z as L,A as O,X as A,a9 as F,u as R,F as V,n as q,f as D,J as P,aa as U,I as J,H as N}from"./@vue-D4KNhCYp.js";import{e as W}from"./fetch-hZBedsIY.js";import{a as X}from"./main-CsAWi2Wi.js";import"./@wdns-Bgg_AWFD.js";import"./@mermaid-js-CShQflH_.js";import"./langium-D_NGP6iM.js";import"./vscode-jsonrpc-CS8KotVf.js";import"./chevrotain-CHpUImcB.js";import"./@chevrotain-DMqKfIoR.js";import"./lodash-es-Cacf3aVv.js";import"./chevrotain-allstar-uapKNRlC.js";import"./vscode-languageserver-types-C-xsT5l6.js";import"./vscode-languageserver-textdocument-CJhEy_xW.js";import"./vscode-uri-CnGyqFWr.js";import"./ua-parser-js-B9IsvYgS.js";import"./@babel-Cvfd6jjG.js";import"./core-js-pure-rpEbRaqb.js";import"./uuid-_R2nDvl_.js";import"./mammoth-DStLgpIA.js";import"./xlsx-80LBlKxU.js";import"./pdfjs-dist-Be5_ovpP.js";import"./mermaid-DztoBDuM.js";import"./ts-dedent-CXZ4_2mJ.js";import"./d3-transition-B7gMhpAH.js";import"./d3-timer-CJv_AqWU.js";import"./d3-dispatch-Q6TpkW-B.js";import"./d3-interpolate-DP-dmwpU.js";import"./d3-color-rIUEC1ZR.js";import"./d3-selection-CfLXJeJu.js";import"./d3-ease-Cx6bG2vu.js";import"./d3-zoom-BJNDRQ4C.js";import"./dompurify-CFl8TL3V.js";import"./stylis-D4WAY683.js";import"./dagre-d3-es-D6GBqVHj.js";import"./@braintree-vxCX0osh.js";import"./khroma-XwI2cIem.js";import"./dayjs-BlFCBw8z.js";import"./d3-scale-DWiW64kU.js";import"./internmap-B8oPgqVZ.js";import"./d3-array-Dy1FNIg7.js";import"./d3-format-CtKB2kpq.js";import"./d3-time-format-BMc3Utpi.js";import"./d3-time-BRbAhEAC.js";import"./d3-axis-DxpTsFyd.js";import"./d3-shape-zSUJvKTl.js";import"./d3-path-QSrLXsQ3.js";import"./roughjs-2lhqfhfB.js";import"./cytoscape-D0Lf_MdX.js";import"./cytoscape-cose-bilkent-CIWZ1EOj.js";import"./cose-base-Cjsls_Nj.js";import"./layout-base-DcgC6mbs.js";import"./d3-sankey-BFhHcGrm.js";import"./d3-scale-chromatic-FDBKL9jm.js";import"./marked-YT4AcBAC.js";import"./@iconify-ol6u86He.js";import"./cytoscape-fcose-C-UBqLtC.js";import"./pinia-CbUtajqx.js";import"./pinia-plugin-persistedstate-4rZCtVM2.js";import"./destr-WfmzGWA8.js";import"./deep-pick-omit-CDZeMyKV.js";import"./lodash-BNwhaWF2.js";import"./@vueuse-GpL_9d7-.js";import"./vue-i18n-ln5WyIOQ.js";import"./@intlify-CtDSkVkn.js";import"./@mozilla-5yaQRYvZ.js";import"./tvision-color-DZgSNFWO.js";import"./chroma-js-CAQMm5d7.js";import"./@material-C_XhzpVg.js";import"./bezier-easing-DvN6YyXp.js";import"./markdown-it-link-attributes-B-tIhhZ5.js";import"./markdown-it-C25eAjLO.js";import"./mdurl-BndtMXuZ.js";import"./uc.micro-CLkLCS2f.js";import"./entities-zpoy7YfM.js";import"./linkify-it-_4qA_eNI.js";import"./punycode.js-BkBFhtvi.js";import"./@traptitech-B3kbI6Qt.js";import"./katex-CrhcM6Ws.js";import"./markdown-it-highlightjs-Df5sQmvJ.js";import"./highlight.js-CmZye5Z9.js";import"./sortablejs-C1FtBwbv.js";import"./@popperjs-CRf0lzMe.js";import"./eventsource-parser-CfH4qYUx.js";import"./vuedraggable-B1GBoFxF.js";import"./vue-56_dnnO9.js";const Y={key:0,class:"markdown-body"},Z=["innerHTML"],G={key:1},K={class:"flex justify-end mt-2 gap-5"},Q=E({__name:"NoteContent",props:{content:{},isEditing:{type:Boolean,default:!1}},emits:["save","cancel"],setup(e,{emit:t}){const o=e,a=B(""),l=B(!1),s=B(!1);let n=null;const i=async()=>{o.content&&(n&&clearTimeout(n),n=window.setTimeout(async()=>{try{l.value=!0,a.value=await p.render(o.content)}catch(e){s.value=!0}finally{l.value=!1}},100))};$(()=>{n&&clearTimeout(n)}),H(()=>o.content,()=>{i()},{immediate:!0}),I(()=>{o.content&&!a.value&&i()});const r=t,u=B(o.content),c=()=>{r("save",u.value)},m=()=>{u.value=o.content,r("cancel")},f=(e,t)=>{t.e.relatedTarget||m()},j=B(null);return H(()=>o.isEditing,e=>{e&&(u.value=o.content,q(()=>{j.value.$el.querySelector("textarea").focus()}))}),(e,t)=>{const o=d,l=v;return M(),S(V,null,[e.isEditing?L("",!0):(M(),S("div",Y,[O("div",{innerHTML:a.value},null,8,Z)])),e.isEditing?(M(),S("div",G,[A(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:f},null,8,["modelValue"]),O("div",K,[A(l,{size:"large",shape:"circle",variant:"text",onClick:m},{default:F(()=>[A(R(_),{slot:"icon"})]),_:1}),A(l,{size:"large",shape:"circle",variant:"text",onClick:c},{default:F(()=>[A(R(w),{slot:"icon"})]),_:1})])])):L("",!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=E({__name:"content",setup(p){var d;const _=B(null),E=B(null),$=s(),I=X();c();const Y=m(),Z=B(),G=n(),K=B(!1),ke=i();H(()=>Y.query.id,e=>{if("/note/content"!==Y.path)return void(Z.value=null);let t=e;Z.value=I.find(t)},{immediate:!0});const Ce=D(()=>G.showLayoutHeader&&G.showFooter?"h-[calc(100vh-var(--td-comp-size-xxl)-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]":G.showLayoutHeader&&!G.showFooter?"h-[calc(100vh-var(--td-comp-size-xxxl)-2*var(--td-comp-paddingTB-m))]":!G.showLayoutHeader&&G.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=B(!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($.assistModel):ke.enableModels.find(e=>u.getModelItemTitle(e)===t);let l=o;Z.value.notes.push(`# ${l}`);try{let e="";for(let t=0;t<Z.value.chats.length;t++){const o=Z.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<Z.value.notes.length;t++){e+=`<|im_start|>user\n${Z.value.notes[t]}<|im_end|>`}e+=`<|im_start|>user\n${o}<|im_end|>`,Te=setInterval(Be,0),ze.value=!0,await W(a,e,e=>{ze.value&&(ze.value=!1),Z.value.notes[Z.value.notes.length-1]=`# ${l}\n`+e})}finally{null!==Te&&(clearInterval(Te),Te=null)}}else Z.value.notes.push(e.content),t=0,q(()=>{setTimeout(()=>{var e;null==(e=_.value)||e.scrollTo({top:_.value.scrollHeight,behavior:"smooth"})},t)});else y.error(r("pages.note.noteEmptyError"))},Be=async()=>{for(var e;null!==Te;)await new Promise(e=>setTimeout(e,300)),null==(e=_.value)||e.scrollTo({top:_.value.scrollHeight,behavior:"instant"})},$e=B(!1);let He=B("");const Ie=()=>{$e.value=!1},Se=B(null),Me=B(null==(d=Z.value)?void 0:d.title),Le=(e,t)=>{t.e.relatedTarget||(K.value=!1)},Oe=()=>{Z.value.title=Me.value,K.value=!1},Ae=()=>{var e;Me.value=null==(e=Z.value)?void 0:e.title,K.value=!0,q(()=>{Se.value.$el.querySelector("input").focus()})},Fe=B(-1),Re=e=>{Fe.value=e},Ve=e=>{Z.value.chats[Fe.value].content.text=e,Fe.value=-1},qe=()=>{Fe.value=-1},De=B(-1),Pe=e=>{Z.value.notes[De.value]=e,De.value=-1},Ue=()=>{De.value=-1},Je=()=>{navigator.clipboard.writeText(JSON.stringify(Z.value)),y.success(r("pages.note.noteCopySuccess"))};return(s,n)=>{const i=h,u=v,c=j,m=f,p=g;return Z.value?(M(),P(R(x),{key:0,class:J(["note-page overflow-hidden flex flex-col",[Ce.value]]),"header-bordered":"",title:Z.value.title,bordered:!1},{header:F(()=>[O("div",ee,[O("div",te,[K.value?(M(),P(i,{key:1,ref_key:"inputTitleRef",ref:Se,type:"text",modelValue:Me.value,"onUpdate:modelValue":n[0]||(n[0]=e=>Me.value=e),onEnter:Oe,onBlur:Le},null,8,["modelValue"])):(M(),S("h1",oe,N(Z.value.title),1))]),O("div",ae,[A(c,{content:R(r)("pages.note.noteRenameTooltip"),placement:"top"},{default:F(()=>[K.value?(M(),P(u,{key:1,size:"small",shape:"circle",variant:"text",onClick:Oe},{default:F(()=>[A(R(w),{slot:"icon"})]),_:1})):(M(),P(u,{key:0,size:"small",shape:"circle",variant:"text",onClick:Ae},{default:F(()=>[A(R(z),{slot:"icon"})]),_:1}))]),_:1},8,["content"]),A(u,{size:"small",shape:"circle",variant:"text",onClick:Je},{default:F(()=>[A(R(C),{slot:"icon"})]),_:1})])])]),content:F(()=>[O("div",{ref_key:"scrollable_chat",ref:_,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=E.value)?void 0:t.showToolbox)&&(null==(o=E.value)?void 0:o.showToolbox(...e))}),onMousedownPassive:n[2]||(n[2]=//@ts-ignore
|
3 |
+
(...e)=>{var t,o;return(null==(t=E.value)?void 0:t.hideToolbox)&&(null==(o=E.value)?void 0:o.hideToolbox(...e))})},[O("div",le,[O("div",se,[(M(!0),S(V,null,U(Z.value.chats,(o,a)=>(M(),S(V,null,["user"===o.role?(M(),S("div",ne,[O("div",{class:J(["flex flex-col gap-2",Fe.value===a?"w-full":""])},[O("div",ie,N(R($).name),1),O("div",re,[A(e,{content:o.content,isEditing:Fe.value===a,onSave:Ve,onCancel:qe},null,8,["content","isEditing"])]),O("div",ue,[A(m,{theme:"danger",content:R(r)("pages.note.noteDeleteConfirm"),placement:"bottom",onConfirm:e=>(e=>{const t=Z.value.chats.findIndex(t=>t===e);-1!==t&&Z.value.chats.splice(t,2)})(o)},{default:F(()=>[A(c,{content:R(r)("pages.note.noteDeleteTooltip")},{default:F(()=>[A(u,{size:"small",variant:"outline"},{default:F(()=>[A(R(b),{slot:"icon"})]),_:1})]),_:1},8,["content"])]),_:2},1032,["content","onConfirm"]),A(c,{content:R(r)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:F(()=>[A(u,{size:"small",variant:"outline",onClick:e=>Re(a)},{default:F(()=>[A(R(k),{slot:"icon"})]),_:2},1032,["onClick"])]),_:2},1032,["content"])])],2),O("div",ce,[A(p,{size:"24px",image:R($).avatar},null,8,["image"])])])):"assistant"===o.role?(M(),S("div",me,[O("div",pe,[O("div",de,[O("div",null,N(Z.value.conversationName),1)]),O("div",ve,[A(t,{content:o.content,isEditing:Fe.value===a,onSave:Ve,onCancel:qe},null,8,["content","isEditing"])]),O("div",fe,[A(c,{content:R(r)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:F(()=>[A(u,{size:"small",variant:"outline",onClick:e=>Re(a)},{default:F(()=>[A(R(k),{slot:"icon"})]),_:2},1032,["onClick"])]),_:2},1032,["content"]),A(c,{content:R(r)("pages.note.noteCopyTooltip")},{default:F(()=>[A(u,{size:"small",variant:"outline",onClick:e=>{return t=o,navigator.clipboard.writeText(t.content.text),void y.success(r("pages.note.noteCopySuccess"));var t}},{default:F(()=>[A(R(C),{slot:"icon"})]),_:2},1032,["onClick"])]),_:2},1032,["content"]),A(c,{content:R(r)("pages.conversation.toggle_artifacts")},{default:F(()=>[A(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:F(()=>[A(R(T),{slot:"icon"})]),_:2},1032,["onClick"])]),_:2},1032,["content"])])]),O("div",je,[A(p,{size:"24px",image:Z.value.conversationAvatar},null,8,["image"])])])):L("",!0)],64))),256)),(M(!0),S(V,null,U(Z.value.notes,(e,t)=>(M(),S("div",ge,[O("div",{class:J(["flex flex-col gap-2 min-w-[300px]",De.value===t?"w-full":""])},[O("div",he,N(R($).name),1),O("div",xe,[ze.value&&t===Z.value.notes.length-1?(M(),S("span",ye)):(M(),P(Q,{key:1,content:e,isEditing:De.value===t,onSave:Pe,onCancel:Ue},null,8,["content","isEditing"]))]),O("div",_e,[A(m,{theme:"danger",content:R(r)("pages.note.noteDeleteConfirm"),placement:"bottom",onConfirm:e=>(e=>{Z.value.notes.splice(e,1)})(t)},{default:F(()=>[A(c,{content:R(r)("pages.note.noteDeleteTooltip")},{default:F(()=>[A(u,{size:"small",variant:"outline"},{default:F(()=>[A(R(b),{slot:"icon"})]),_:1})]),_:1},8,["content"])]),_:2},1032,["content","onConfirm"]),A(c,{content:R(r)("pages.conversation.button_tooltip_editor"),placement:"bottom"},{default:F(()=>[A(u,{size:"small",variant:"outline",onClick:e=>(e=>{De.value=e})(t)},{default:F(()=>[A(R(k),{slot:"icon"})]),_:2},1032,["onClick"])]),_:2},1032,["content"])])],2),O("div",we,[A(p,{size:"24px",image:R($).avatar},null,8,["image"])])]))),256))]),$e.value?(M(),S("div",be,[A(o,{content:R(He),closeBtn:Ie},null,8,["content"])])):L("",!0)]),A(a,{ref_key:"toolbar",ref:E,parent:_.value},null,8,["parent"])],544)]),footer:F(()=>[A(l,{"show-upload":!1,"auto-complete-enabled":!0,placeholder:s.$t("pages.note.notePlaceholder"),onInput:Ee},null,8,["placeholder"])]),_:1},8,["class","title"])):L("",!0)}}});export{ke as default};
|
.output/public/assets/core-js-pure-rpEbRaqb.js
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import{c as r}from"./@babel-Cvfd6jjG.js";var t,n,e,u,i,o,f,c,a,s,v,l,p,y,h,d;function g(){if(n)return t;n=1;var e=function(r){return r&&r.Math===Math&&r};return t=// eslint-disable-next-line es/no-global-this -- safe
|
2 |
+
e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||// eslint-disable-next-line no-restricted-globals -- safe
|
3 |
+
e("object"==typeof self&&self)||e("object"==typeof r&&r)||e("object"==typeof t&&t)||// eslint-disable-next-line no-new-func -- fallback
|
4 |
+
function(){return this}()||Function("return this")()}function b(){return u?e:(u=1,e=function(r){try{return!!r()}catch(t){return!0}})}function m(){return o?i:(o=1,i=!b()(function(){var r=function(){}.bind();return"function"!=typeof r||r.hasOwnProperty("prototype")}))}function S(){if(c)return f;c=1;var r=m(),t=Function.prototype,n=t.apply,e=t.call;return f="object"==typeof Reflect&&Reflect.apply||(r?e.bind(n):function(){return e.apply(n,arguments)}),f}function w(){if(s)return a;s=1;var r=m(),t=Function.prototype,n=t.call,e=r&&t.bind.bind(n,n);return a=r?e:function(r){return function(){return n.apply(r,arguments)}},a}function O(){if(l)return v;l=1;var r=w(),t=r({}.toString),n=r("".slice);return v=function(r){return n(t(r),8,-1)}}function A(){if(y)return p;y=1;var r=O(),t=w();return p=function(n){if("Function"===r(n))return t(n)}}function j(){if(d)return h;d=1;var r="object"==typeof document&&document.all;return h=void 0===r&&void 0!==r?function(t){return"function"==typeof t||t===r}:function(r){return"function"==typeof r}}var x,E,P,T,k={};function I(){return E?x:(E=1,x=!b()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function F(){if(T)return P;T=1;var r=m(),t=Function.prototype.call;return P=r?t.bind(t):function(){return t.apply(t,arguments)},P}var R,z,L,D,C,M,_,N,G,W,B,K,V,U,H,J,q,Y,X,$,Q,Z,rr,tr,nr,er,ur,ir,or,fr,cr,ar,sr,vr,lr,pr,yr,hr={};function dr(){if(R)return hr;R=1;var r={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!r.call({1:2},1);return hr.f=n?function(r){var n=t(this,r);return!!n&&n.enumerable}:r,hr}function gr(){return L?z:(L=1,z=function(r,t){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:t}})}function br(){if(C)return D;C=1;var r=w(),t=b(),n=O(),e=Object,u=r("".split);return D=t(function(){return!e("z").propertyIsEnumerable(0)})?function(r){return"String"===n(r)?u(r,""):e(r)}:e}function mr(){return _?M:(_=1,M=function(r){return null==r})}function Sr(){if(G)return N;G=1;var r=mr(),t=TypeError;return N=function(n){if(r(n))throw new t("Can't call method on "+n);return n}}function wr(){if(B)return W;B=1;var r=br(),t=Sr();return W=function(n){return r(t(n))}}function Or(){if(V)return K;V=1;var r=j();return K=function(t){return"object"==typeof t?null!==t:r(t)}}function Ar(){return H?U:(H=1,U={})}function jr(){if(q)return J;q=1;var r=Ar(),t=g(),n=j(),e=function(r){return n(r)?r:void 0};return J=function(n,u){return arguments.length<2?e(r[n])||e(t[n]):r[n]&&r[n][u]||t[n]&&t[n][u]},J}function xr(){return X?Y:(X=1,Y=w()({}.isPrototypeOf))}function Er(){if(Q)return $;Q=1;var r=g().navigator,t=r&&r.userAgent;return $=t?String(t):""}function Pr(){if(rr)return Z;rr=1;var r,t,n=g(),e=Er(),u=n.process,i=n.Deno,o=u&&u.versions||i&&i.version,f=o&&o.v8;return f&&(t=(r=f.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!t&&e&&(!(r=e.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=e.match(/Chrome\/(\d+)/))&&(t=+r[1]),Z=t}function Tr(){if(nr)return tr;nr=1;var r=Pr(),t=b(),n=g().String;return tr=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
5 |
+
!Symbol.sham&&r&&r<41})}function kr(){return ur?er:(ur=1,er=Tr()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function Ir(){if(or)return ir;or=1;var r=jr(),t=j(),n=xr(),e=Object;return ir=kr()?function(r){return"symbol"==typeof r}:function(u){var i=r("Symbol");return t(i)&&n(i.prototype,e(u))}}function Fr(){if(cr)return fr;cr=1;var r=String;return fr=function(t){try{return r(t)}catch(n){return"Object"}}}function Rr(){if(sr)return ar;sr=1;var r=j(),t=Fr(),n=TypeError;return ar=function(e){if(r(e))return e;throw new n(t(e)+" is not a function")}}function zr(){if(lr)return vr;lr=1;var r=Rr(),t=mr();return vr=function(n,e){var u=n[e];return t(u)?void 0:r(u)}}function Lr(){if(yr)return pr;yr=1;var r=F(),t=j(),n=Or(),e=TypeError;return pr=function(u,i){var o,f;if("string"===i&&t(o=u.toString)&&!n(f=r(o,u)))return f;if(t(o=u.valueOf)&&!n(f=r(o,u)))return f;if("string"!==i&&t(o=u.toString)&&!n(f=r(o,u)))return f;throw new e("Can't convert object to primitive value")}}var Dr,Cr,Mr,_r,Nr,Gr,Wr,Br,Kr,Vr,Ur,Hr,Jr,qr,Yr,Xr,$r,Qr,Zr,rt,tt,nt,et,ut,it,ot,ft,ct,at={exports:{}};function st(){return Cr?Dr:(Cr=1,Dr=!0)}function vt(){if(_r)return Mr;_r=1;var r=g(),t=Object.defineProperty;return Mr=function(n,e){try{t(r,n,{value:e,configurable:!0,writable:!0})}catch(u){r[n]=e}return e}}function lt(){if(Nr)return at.exports;Nr=1;var r=st(),t=g(),n=vt(),e="__core-js_shared__",u=at.exports=t[e]||n(e,{});return(u.versions||(u.versions=[])).push({version:"3.43.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"}),at.exports}function pt(){if(Wr)return Gr;Wr=1;var r=lt();return Gr=function(t,n){return r[t]||(r[t]=n||{})}}function yt(){if(Kr)return Br;Kr=1;var r=Sr(),t=Object;return Br=function(n){return t(r(n))}}function ht(){if(Ur)return Vr;Ur=1;var r=w(),t=yt(),n=r({}.hasOwnProperty);return Vr=Object.hasOwn||function(r,e){return n(t(r),e)}}function dt(){if(Jr)return Hr;Jr=1;var r=w(),t=0,n=Math.random(),e=r(1.1.toString);return Hr=function(r){return"Symbol("+(void 0===r?"":r)+")_"+e(++t+n,36)}}function gt(){if(Yr)return qr;Yr=1;var r=g(),t=pt(),n=ht(),e=dt(),u=Tr(),i=kr(),o=r.Symbol,f=t("wks"),c=i?o.for||o:o&&o.withoutSetter||e;return qr=function(r){return n(f,r)||(f[r]=u&&n(o,r)?o[r]:c("Symbol."+r)),f[r]}}function bt(){if($r)return Xr;$r=1;var r=F(),t=Or(),n=Ir(),e=zr(),u=Lr(),i=TypeError,o=gt()("toPrimitive");return Xr=function(f,c){if(!t(f)||n(f))return f;var a,s=e(f,o);if(s){if(void 0===c&&(c="default"),a=r(s,f,c),!t(a)||n(a))return a;throw new i("Can't convert object to primitive value")}return void 0===c&&(c="number"),u(f,c)}}function mt(){if(Zr)return Qr;Zr=1;var r=bt(),t=Ir();return Qr=function(n){var e=r(n,"string");return t(e)?e:e+""}}function St(){if(tt)return rt;tt=1;var r=g(),t=Or(),n=r.document,e=t(n)&&t(n.createElement);return rt=function(r){return e?n.createElement(r):{}}}function wt(){if(et)return nt;et=1;var r=I(),t=b(),n=St();return nt=!r&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function Ot(){if(ut)return k;ut=1;var r=I(),t=F(),n=dr(),e=gr(),u=wr(),i=mt(),o=ht(),f=wt(),c=Object.getOwnPropertyDescriptor;return k.f=r?c:function(r,a){if(r=u(r),a=i(a),f)try{return c(r,a)}catch(s){}if(o(r,a))return e(!t(n.f,r,a),r[a])},k}function At(){if(ot)return it;ot=1;var r=b(),t=j(),n=/#|\.prototype\./,e=function(n,e){var c=i[u(n)];return c===f||c!==o&&(t(e)?r(e):!!e)},u=e.normalize=function(r){return String(r).replace(n,".").toLowerCase()},i=e.data={},o=e.NATIVE="N",f=e.POLYFILL="P";return it=e}function jt(){if(ct)return ft;ct=1;var r=A(),t=Rr(),n=m(),e=r(r.bind);return ft=function(r,u){return t(r),void 0===u?r:n?e(r,u):function(){return r.apply(u,arguments)}},ft}var xt,Et,Pt,Tt,kt,It,Ft,Rt,zt,Lt,Dt,Ct,Mt,_t,Nt,Gt,Wt,Bt,Kt,Vt,Ut,Ht,Jt={};function qt(){return Et?xt:(Et=1,xt=I()&&b()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function Yt(){if(Tt)return Pt;Tt=1;var r=Or(),t=String,n=TypeError;return Pt=function(e){if(r(e))return e;throw new n(t(e)+" is not an object")}}function Xt(){if(kt)return Jt;kt=1;var r=I(),t=wt(),n=qt(),e=Yt(),u=mt(),i=TypeError,o=Object.defineProperty,f=Object.getOwnPropertyDescriptor,c="enumerable",a="configurable",s="writable";return Jt.f=r?n?function(r,t,n){if(e(r),t=u(t),e(n),"function"==typeof r&&"prototype"===t&&"value"in n&&s in n&&!n[s]){var i=f(r,t);i&&i[s]&&(r[t]=n.value,n={configurable:a in n?n[a]:i[a],enumerable:c in n?n[c]:i[c],writable:!1})}return o(r,t,n)}:o:function(r,n,f){if(e(r),n=u(n),e(f),t)try{return o(r,n,f)}catch(c){}if("get"in f||"set"in f)throw new i("Accessors not supported");return"value"in f&&(r[n]=f.value),r},Jt}function $t(){if(Ft)return It;Ft=1;var r=I(),t=Xt(),n=gr();return It=r?function(r,e,u){return t.f(r,e,n(1,u))}:function(r,t,n){return r[t]=n,r}}function Qt(){if(zt)return Rt;zt=1;var r=g(),t=S(),n=A(),e=j(),u=Ot().f,i=At(),o=Ar(),f=jt(),c=$t(),a=ht(),s=function(r){var n=function(e,u,i){if(this instanceof n){switch(arguments.length){case 0:return new r;case 1:return new r(e);case 2:return new r(e,u)}return new r(e,u,i)}return t(r,this,arguments)};return n.prototype=r.prototype,n};return Rt=function(t,v){var l,p,y,h,d,g,b,m,S,w=t.target,O=t.global,A=t.stat,j=t.proto,x=O?r:A?r[w]:r[w]&&r[w].prototype,E=O?o:o[w]||c(o,w,{})[w],P=E.prototype;for(h in v)p=!(l=i(O?h:w+(A?".":"#")+h,t.forced))&&x&&a(x,h),g=E[h],p&&(b=t.dontCallGetSet?(S=u(x,h))&&S.value:x[h]),d=p&&b?b:v[h],(l||j||typeof g!=typeof d)&&(m=t.bind&&p?f(d,r):t.wrap&&p?s(d):j&&e(d)?n(d):d,(t.sham||d&&d.sham||g&&g.sham)&&c(m,"sham",!0),c(E,h,m),j&&(a(o,y=w+"Prototype")||c(o,y,{}),c(o[y],h,d),t.real&&P&&(l||!P[h])&&c(P,h,d)))}}function Zt(){if(Dt)return Lt;Dt=1;var r=O();return Lt=Array.isArray||function(t){return"Array"===r(t)}}function rn(){return _t?Mt:(_t=1,Ct||(Ct=1,Qt()({target:"Array",stat:!0},{isArray:Zt()})),Mt=Ar().Array.isArray)}function tn(){return Gt?Nt:(Gt=1,Nt=rn())}function nn(){return Bt?Wt:(Bt=1,Wt=tn())}function en(){return Vt?Kt:(Vt=1,Kt=nn())}function un(){return Ht?Ut:(Ht=1,Ut=en())}var on,fn,cn,an,sn,vn,ln,pn,yn,hn,dn,gn,bn,mn,Sn,wn,On,An,jn,xn,En,Pn,Tn,kn,In,Fn,Rn,zn={};function Ln(){if(fn)return on;fn=1;var r=Math.ceil,t=Math.floor;return on=Math.trunc||function(n){var e=+n;return(e>0?t:r)(e)}}function Dn(){if(an)return cn;an=1;var r=Ln();return cn=function(t){var n=+t;return n!=n||0===n?0:r(n)}}function Cn(){if(vn)return sn;vn=1;var r=Dn(),t=Math.min;return sn=function(n){var e=r(n);return e>0?t(e,9007199254740991):0}}function Mn(){if(pn)return ln;pn=1;var r=Cn();return ln=function(t){return r(t.length)}}function _n(){if(hn)return yn;hn=1;var r=TypeError;return yn=function(t){if(t>9007199254740991)throw r("Maximum allowed index exceeded");return t}}function Nn(){if(gn)return dn;gn=1;var r=I(),t=Xt(),n=gr();return dn=function(e,u,i){r?t.f(e,u,n(0,i)):e[u]=i}}function Gn(){if(mn)return bn;mn=1;var r={};return r[gt()("toStringTag")]="z",bn="[object z]"===String(r)}function Wn(){if(wn)return Sn;wn=1;var r=Gn(),t=j(),n=O(),e=gt()("toStringTag"),u=Object,i="Arguments"===n(function(){return arguments}());return Sn=r?n:function(r){var o,f,c;return void 0===r?"Undefined":null===r?"Null":"string"==typeof(f=function(r,t){try{return r[t]}catch(n){}}(o=u(r),e))?f:i?n(o):"Object"===(c=n(o))&&t(o.callee)?"Arguments":c}}function Bn(){if(An)return On;An=1;var r=w(),t=j(),n=lt(),e=r(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(r){return e(r)}),On=n.inspectSource}function Kn(){if(xn)return jn;xn=1;var r=w(),t=b(),n=j(),e=Wn(),u=jr(),i=Bn(),o=function(){},f=u("Reflect","construct"),c=/^\s*(?:class|function)\b/,a=r(c.exec),s=!c.test(o),v=function(r){if(!n(r))return!1;try{return f(o,[],r),!0}catch(t){return!1}},l=function(r){if(!n(r))return!1;switch(e(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return s||!!a(c,i(r))}catch(t){return!0}};return l.sham=!0,jn=!f||t(function(){var r;return v(v.call)||!v(Object)||!v(function(){r=!0})||r})?l:v}function Vn(){if(Pn)return En;Pn=1;var r=Zt(),t=Kn(),n=Or(),e=gt()("species"),u=Array;return En=function(i){var o;return r(i)&&(o=i.constructor,(t(o)&&(o===u||r(o.prototype))||n(o)&&null===(o=o[e]))&&(o=void 0)),void 0===o?u:o}}function Un(){if(kn)return Tn;kn=1;var r=Vn();return Tn=function(t,n){return new(r(t))(0===n?0:n)}}function Hn(){if(Fn)return In;Fn=1;var r=b(),t=gt(),n=Pr(),e=t("species");return In=function(t){return n>=51||!r(function(){var r=[];return(r.constructor={})[e]=function(){return{foo:1}},1!==r[t](Boolean).foo})}}function Jn(){if(Rn)return zn;Rn=1;var r=Qt(),t=b(),n=Zt(),e=Or(),u=yt(),i=Mn(),o=_n(),f=Nn(),c=Un(),a=Hn(),s=gt(),v=Pr(),l=s("isConcatSpreadable"),p=v>=51||!t(function(){var r=[];return r[l]=!1,r.concat()[0]!==r}),y=function(r){if(!e(r))return!1;var t=r[l];return void 0!==t?!!t:n(r)};return r({target:"Array",proto:!0,arity:1,forced:!p||!a("concat")},{
|
6 |
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
7 |
+
concat:function(r){var t,n,e,a,s,v=u(this),l=c(v,0),p=0;for(t=-1,e=arguments.length;t<e;t++)if(y(s=-1===t?v:arguments[t]))for(a=i(s),o(p+a),n=0;n<a;n++,p++)n in s&&f(l,p,s[n]);else o(p+1),f(l,p++,s);return l.length=p,l}}),zn}var qn,Yn,Xn={},$n={};function Qn(){if(Yn)return qn;Yn=1;var r=Wn(),t=String;return qn=function(n){if("Symbol"===r(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}var Zn,re,te,ne,ee,ue,ie,oe,fe,ce,ae,se,ve,le,pe,ye,he,de,ge,be={};function me(){if(re)return Zn;re=1;var r=Dn(),t=Math.max,n=Math.min;return Zn=function(e,u){var i=r(e);return i<0?t(i+u,0):n(i,u)}}function Se(){if(ne)return te;ne=1;var r=wr(),t=me(),n=Mn(),e=function(e){return function(u,i,o){var f=r(u),c=n(f);if(0===c)return!e&&-1;var a,s=t(o,c);if(e&&i!=i){for(;c>s;)if((a=f[s++])!=a)return!0}else for(;c>s;s++)if((e||s in f)&&f[s]===i)return e||s||0;return!e&&-1}};return te={
|
8 |
+
// `Array.prototype.includes` method
|
9 |
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
10 |
+
includes:e(!0),
|
11 |
+
// `Array.prototype.indexOf` method
|
12 |
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
13 |
+
indexOf:e(!1)}}function we(){return ue?ee:(ue=1,ee={})}function Oe(){if(oe)return ie;oe=1;var r=w(),t=ht(),n=wr(),e=Se().indexOf,u=we(),i=r([].push);return ie=function(r,o){var f,c=n(r),a=0,s=[];for(f in c)!t(u,f)&&t(c,f)&&i(s,f);for(;o.length>a;)t(c,f=o[a++])&&(~e(s,f)||i(s,f));return s}}function Ae(){return ce?fe:(ce=1,fe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function je(){if(se)return ae;se=1;var r=Oe(),t=Ae();return ae=Object.keys||function(n){return r(n,t)}}function xe(){if(ve)return be;ve=1;var r=I(),t=qt(),n=Xt(),e=Yt(),u=wr(),i=je();return be.f=r&&!t?Object.defineProperties:function(r,t){e(r);for(var o,f=u(t),c=i(t),a=c.length,s=0;a>s;)n.f(r,o=c[s++],f[o]);return r},be}function Ee(){return pe?le:(pe=1,le=jr()("document","documentElement"))}function Pe(){if(he)return ye;he=1;var r=pt(),t=dt(),n=r("keys");return ye=function(r){return n[r]||(n[r]=t(r))}}function Te(){if(ge)return de;ge=1;var r,t=Yt(),n=xe(),e=Ae(),u=we(),i=Ee(),o=St(),f="prototype",c="script",a=Pe()("IE_PROTO"),s=function(){},v=function(r){return"<"+c+">"+r+"</"+c+">"},l=function(r){r.write(v("")),r.close();var t=r.parentWindow.Object;return r=null,t},p=function(){try{r=new ActiveXObject("htmlfile")}catch(s){}var t,n,u;p="undefined"!=typeof document?document.domain&&r?l(r):(n=o("iframe"),u="java"+c+":",n.style.display="none",i.appendChild(n),n.src=String(u),(t=n.contentWindow.document).open(),t.write(v("document.F=Object")),t.close(),t.F):l(r);for(var a=e.length;a--;)delete p[f][e[a]];return p()};return u[a]=!0,de=Object.create||function(r,e){var u;return null!==r?(s[f]=t(r),u=new s,s[f]=null,u[a]=r):u=p(),void 0===e?u:n.f(u,e)}}var ke,Ie={};function Fe(){if(ke)return Ie;ke=1;var r=Oe(),t=Ae().concat("length","prototype");return Ie.f=Object.getOwnPropertyNames||function(n){return r(n,t)},Ie}var Re,ze,Le,De={};function Ce(){return ze?Re:(ze=1,Re=w()([].slice))}function Me(){if(Le)return De;Le=1;var r=O(),t=wr(),n=Fe().f,e=Ce(),u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return De.f=function(i){return u&&"Window"===r(i)?function(r){try{return n(r)}catch(t){return e(u)}}(i):n(t(i))},De}var _e,Ne,Ge,We,Be,Ke={};function Ve(){return _e||(_e=1,Ke.f=Object.getOwnPropertySymbols),Ke}function Ue(){if(Ge)return Ne;Ge=1;var r=$t();return Ne=function(t,n,e,u){return u&&u.enumerable?t[n]=e:r(t,n,e),t}}function He(){if(Be)return We;Be=1;var r=Xt();return We=function(t,n,e){return r.f(t,n,e)}}var Je,qe,Ye,Xe,$e,Qe,Ze,ru,tu,nu,eu,uu,iu,ou,fu,cu,au={};function su(){if(Je)return au;Je=1;var r=gt();return au.f=r,au}function vu(){if(Ye)return qe;Ye=1;var r=Ar(),t=ht(),n=su(),e=Xt().f;return qe=function(u){var i=r.Symbol||(r.Symbol={});t(i,u)||e(i,u,{value:n.f(u)})}}function lu(){if($e)return Xe;$e=1;var r=F(),t=jr(),n=gt(),e=Ue();return Xe=function(){var u=t("Symbol"),i=u&&u.prototype,o=i&&i.valueOf,f=n("toPrimitive");i&&!i[f]&&e(i,f,function(t){return r(o,this)},{arity:1})}}function pu(){if(Ze)return Qe;Ze=1;var r=Gn(),t=Wn();return Qe=r?{}.toString:function(){return"[object "+t(this)+"]"}}function yu(){if(tu)return ru;tu=1;var r=Gn(),t=Xt().f,n=$t(),e=ht(),u=pu(),i=gt()("toStringTag");return ru=function(o,f,c,a){var s=c?o:o&&o.prototype;s&&(e(s,i)||t(s,i,{configurable:!0,value:f}),a&&!r&&n(s,"toString",u))}}function hu(){if(eu)return nu;eu=1;var r=g(),t=j(),n=r.WeakMap;return nu=t(n)&&/native code/.test(String(n))}function du(){if(iu)return uu;iu=1;var r,t,n,e=hu(),u=g(),i=Or(),o=$t(),f=ht(),c=lt(),a=Pe(),s=we(),v="Object already initialized",l=u.TypeError,p=u.WeakMap;if(e||c.state){var y=c.state||(c.state=new p);y.get=y.get,y.has=y.has,y.set=y.set,r=function(r,t){if(y.has(r))throw new l(v);return t.facade=r,y.set(r,t),t},t=function(r){return y.get(r)||{}},n=function(r){return y.has(r)}}else{var h=a("state");s[h]=!0,r=function(r,t){if(f(r,h))throw new l(v);return t.facade=r,o(r,h,t),t},t=function(r){return f(r,h)?r[h]:{}},n=function(r){return f(r,h)}}return uu={set:r,get:t,has:n,enforce:function(e){return n(e)?t(e):r(e,{})},getterFor:function(r){return function(n){var e;if(!i(n)||(e=t(n)).type!==r)throw new l("Incompatible receiver, "+r+" required");return e}}}}function gu(){if(fu)return ou;fu=1;var r=jt(),t=w(),n=br(),e=yt(),u=Mn(),i=Un(),o=t([].push),f=function(t){var f=1===t,c=2===t,a=3===t,s=4===t,v=6===t,l=7===t,p=5===t||v;return function(y,h,d,g){for(var b,m,S=e(y),w=n(S),O=u(w),A=r(h,d),j=0,x=g||i,E=f?x(y,O):c||l?x(y,0):void 0;O>j;j++)if((p||j in w)&&(m=A(b=w[j],j,S),t))if(f)E[j]=m;else if(m)switch(t){case 3:return!0;
|
14 |
+
// some
|
15 |
+
case 5:return b;
|
16 |
+
// find
|
17 |
+
case 6:return j;
|
18 |
+
// findIndex
|
19 |
+
case 2:o(E,b)}else switch(t){case 4:return!1;
|
20 |
+
// every
|
21 |
+
case 7:o(E,b)}return v?-1:a||s?s:E}};return ou={
|
22 |
+
// `Array.prototype.forEach` method
|
23 |
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
24 |
+
forEach:f(0),
|
25 |
+
// `Array.prototype.map` method
|
26 |
+
// https://tc39.es/ecma262/#sec-array.prototype.map
|
27 |
+
map:f(1),
|
28 |
+
// `Array.prototype.filter` method
|
29 |
+
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
30 |
+
filter:f(2),
|
31 |
+
// `Array.prototype.some` method
|
32 |
+
// https://tc39.es/ecma262/#sec-array.prototype.some
|
33 |
+
some:f(3),
|
34 |
+
// `Array.prototype.every` method
|
35 |
+
// https://tc39.es/ecma262/#sec-array.prototype.every
|
36 |
+
every:f(4),
|
37 |
+
// `Array.prototype.find` method
|
38 |
+
// https://tc39.es/ecma262/#sec-array.prototype.find
|
39 |
+
find:f(5),
|
40 |
+
// `Array.prototype.findIndex` method
|
41 |
+
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
|
42 |
+
findIndex:f(6),
|
43 |
+
// `Array.prototype.filterReject` method
|
44 |
+
// https://github.com/tc39/proposal-array-filtering
|
45 |
+
filterReject:f(7)}}var bu,mu,Su,wu={};function Ou(){return mu?bu:(mu=1,bu=Tr()&&!!Symbol.for&&!!Symbol.keyFor)}var Au,ju={};var xu,Eu,Pu,Tu={};function ku(){if(Eu)return xu;Eu=1;var r=w(),t=Zt(),n=j(),e=O(),u=Qn(),i=r([].push);return xu=function(r){if(n(r))return r;if(t(r)){for(var o=r.length,f=[],c=0;c<o;c++){var a=r[c];"string"==typeof a?i(f,a):"number"!=typeof a&&"Number"!==e(a)&&"String"!==e(a)||i(f,u(a))}var s=f.length,v=!0;return function(r,n){if(v)return v=!1,n;if(t(this))return n;for(var e=0;e<s;e++)if(f[e]===r)return n}}}}var Iu,Fu,Ru={};function zu(){return Fu||(Fu=1,function(){if(cu)return $n;cu=1;var r=Qt(),t=g(),n=F(),e=w(),u=st(),i=I(),o=Tr(),f=b(),c=ht(),a=xr(),s=Yt(),v=wr(),l=mt(),p=Qn(),y=gr(),h=Te(),d=je(),m=Fe(),S=Me(),O=Ve(),A=Ot(),j=Xt(),x=xe(),E=dr(),P=Ue(),T=He(),k=pt(),R=Pe(),z=we(),L=dt(),D=gt(),C=su(),M=vu(),_=lu(),N=yu(),G=du(),W=gu().forEach,B=R("hidden"),K="Symbol",V="prototype",U=G.set,H=G.getterFor(K),J=Object[V],q=t.Symbol,Y=q&&q[V],X=t.RangeError,$=t.TypeError,Q=t.QObject,Z=A.f,rr=j.f,tr=S.f,nr=E.f,er=e([].push),ur=k("symbols"),ir=k("op-symbols"),or=k("wks"),fr=!Q||!Q[V]||!Q[V].findChild,cr=function(r,t,n){var e=Z(J,t);e&&delete J[t],rr(r,t,n),e&&r!==J&&rr(J,t,e)},ar=i&&f(function(){return 7!==h(rr({},"a",{get:function(){return rr(this,"a",{value:7}).a}})).a})?cr:rr,sr=function(r,t){var n=ur[r]=h(Y);return U(n,{type:K,tag:r,description:t}),i||(n.description=t),n},vr=function(r,t,n){r===J&&vr(ir,t,n),s(r);var e=l(t);return s(n),c(ur,e)?(n.enumerable?(c(r,B)&&r[B][e]&&(r[B][e]=!1),n=h(n,{enumerable:y(0,!1)})):(c(r,B)||rr(r,B,y(1,h(null))),r[B][e]=!0),ar(r,e,n)):rr(r,e,n)},lr=function(r,t){s(r);var e=v(t),u=d(e).concat(br(e));return W(u,function(t){i&&!n(pr,e,t)||vr(r,t,e[t])}),r},pr=function(r){var t=l(r),e=n(nr,this,t);return!(this===J&&c(ur,t)&&!c(ir,t))&&(!(e||!c(this,t)||!c(ur,t)||c(this,B)&&this[B][t])||e)},yr=function(r,t){var n=v(r),e=l(t);if(n!==J||!c(ur,e)||c(ir,e)){var u=Z(n,e);return!u||!c(ur,e)||c(n,B)&&n[B][e]||(u.enumerable=!0),u}},hr=function(r){var t=tr(v(r)),n=[];return W(t,function(r){c(ur,r)||c(z,r)||er(n,r)}),n},br=function(r){var t=r===J,n=tr(t?ir:v(r)),e=[];return W(n,function(r){!c(ur,r)||t&&!c(J,r)||er(e,ur[r])}),e};o||(q=function(){if(a(Y,this))throw new $("Symbol is not a constructor");var r=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,e=L(r),u=function(r){var i=void 0===this?t:this;i===J&&n(u,ir,r),c(i,B)&&c(i[B],e)&&(i[B][e]=!1);var o=y(1,r);try{ar(i,e,o)}catch(f){if(!(f instanceof X))throw f;cr(i,e,o)}};return i&&fr&&ar(J,e,{configurable:!0,set:u}),sr(e,r)},P(Y=q[V],"toString",function(){return H(this).tag}),P(q,"withoutSetter",function(r){return sr(L(r),r)}),E.f=pr,j.f=vr,x.f=lr,A.f=yr,m.f=S.f=hr,O.f=br,C.f=function(r){return sr(D(r),r)},i&&(T(Y,"description",{configurable:!0,get:function(){return H(this).description}}),u||P(J,"propertyIsEnumerable",pr,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:q}),W(d(or),function(r){M(r)}),r({target:K,stat:!0,forced:!o},{useSetter:function(){fr=!0},useSimple:function(){fr=!1}}),r({target:"Object",stat:!0,forced:!o,sham:!i},{
|
46 |
+
// `Object.create` method
|
47 |
+
// https://tc39.es/ecma262/#sec-object.create
|
48 |
+
create:function(r,t){return void 0===t?h(r):lr(h(r),t)},
|
49 |
+
// `Object.defineProperty` method
|
50 |
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
51 |
+
defineProperty:vr,
|
52 |
+
// `Object.defineProperties` method
|
53 |
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
54 |
+
defineProperties:lr,
|
55 |
+
// `Object.getOwnPropertyDescriptor` method
|
56 |
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
|
57 |
+
getOwnPropertyDescriptor:yr}),r({target:"Object",stat:!0,forced:!o},{
|
58 |
+
// `Object.getOwnPropertyNames` method
|
59 |
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
60 |
+
getOwnPropertyNames:hr}),_(),N(q,K),z[B]=!0}(),function(){if(Su)return wu;Su=1;var r=Qt(),t=jr(),n=ht(),e=Qn(),u=pt(),i=Ou(),o=u("string-to-symbol-registry"),f=u("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!i},{for:function(r){var u=e(r);if(n(o,u))return o[u];var i=t("Symbol")(u);return o[u]=i,f[i]=u,i}})}(),function(){if(Au)return ju;Au=1;var r=Qt(),t=ht(),n=Ir(),e=Fr(),u=pt(),i=Ou(),o=u("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!i},{keyFor:function(r){if(!n(r))throw new TypeError(e(r)+" is not a symbol");if(t(o,r))return o[r]}})}(),function(){if(Pu)return Tu;Pu=1;var r=Qt(),t=jr(),n=S(),e=F(),u=w(),i=b(),o=j(),f=Ir(),c=Ce(),a=ku(),s=Tr(),v=String,l=t("JSON","stringify"),p=u(/./.exec),y=u("".charAt),h=u("".charCodeAt),d=u("".replace),g=u(1.1.toString),m=/[\uD800-\uDFFF]/g,O=/^[\uD800-\uDBFF]$/,A=/^[\uDC00-\uDFFF]$/,x=!s||i(function(){var r=t("Symbol")("stringify detection");return"[null]"!==l([r])||"{}"!==l({a:r})||"{}"!==l(Object(r))}),E=i(function(){return'"\\udf06\\ud834"'!==l("\udf06\ud834")||'"\\udead"'!==l("\udead")}),P=function(r,t){var u=c(arguments),i=a(t);if(o(i)||void 0!==r&&!f(r))return u[1]=function(r,t){if(o(i)&&(t=e(i,this,v(r),t)),!f(t))return t},n(l,null,u)},T=function(r,t,n){var e=y(n,t-1),u=y(n,t+1);return p(O,r)&&!p(A,u)||p(A,r)&&!p(O,e)?"\\u"+g(h(r,0),16):r};l&&r({target:"JSON",stat:!0,arity:3,forced:x||E},{
|
61 |
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
62 |
+
stringify:function(r,t,e){var u=c(arguments),i=n(x?P:l,null,u);return E&&"string"==typeof i?d(i,m,T):i}})}(),function(){if(Iu)return Ru;Iu=1;var r=Qt(),t=Tr(),n=b(),e=Ve(),u=yt();r({target:"Object",stat:!0,forced:!t||n(function(){e.f(1)})},{getOwnPropertySymbols:function(r){var t=e.f;return t?t(u(r)):[]}})}()),Xn}var Lu,Du={};function Cu(){return Lu||(Lu=1,vu()("asyncDispose")),Du}var Mu;var _u,Nu={};function Gu(){return _u||(_u=1,vu()("dispose")),Nu}var Wu;var Bu;var Ku;var Vu;var Uu;var Hu;var Ju;var qu;var Yu;var Xu,$u={};var Qu,Zu={};var ri;var ti,ni,ei,ui={};function ii(){return ei?ni:(ei=1,Jn(),zu(),Cu(),Mu||(Mu=1,vu()("asyncIterator")),Gu(),Wu||(Wu=1,vu()("hasInstance")),Bu||(Bu=1,vu()("isConcatSpreadable")),Ku||(Ku=1,vu()("iterator")),Vu||(Vu=1,vu()("match")),Uu||(Uu=1,vu()("matchAll")),Hu||(Hu=1,vu()("replace")),Ju||(Ju=1,vu()("search")),qu||(qu=1,vu()("species")),Yu||(Yu=1,vu()("split")),function(){if(Xu)return $u;Xu=1;var r=vu(),t=lu();r("toPrimitive"),t()}(),function(){if(Qu)return Zu;Qu=1;var r=jr(),t=vu(),n=yu();t("toStringTag"),n(r("Symbol"),"Symbol")}(),ri||(ri=1,vu()("unscopables")),function(){if(ti)return ui;ti=1;var r=g();yu()(r.JSON,"JSON",!0)}(),ni=Ar().Symbol)}var oi,fi,ci,ai,si,vi,li,pi,yi,hi,di,gi,bi,mi,Si,wi,Oi,Ai,ji,xi,Ei,Pi,Ti,ki,Ii,Fi,Ri,zi,Li,Di,Ci,Mi,_i,Ni={};function Gi(){return fi?oi:(fi=1,oi=function(){})}function Wi(){return ai?ci:(ai=1,ci={})}function Bi(){if(vi)return si;vi=1;var r=I(),t=ht(),n=Function.prototype,e=r&&Object.getOwnPropertyDescriptor,u=t(n,"name"),i=u&&"something"===function(){}.name,o=u&&(!r||r&&e(n,"name").configurable);return si={EXISTS:u,PROPER:i,CONFIGURABLE:o}}function Ki(){return pi?li:(pi=1,li=!b()(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}))}function Vi(){if(hi)return yi;hi=1;var r=ht(),t=j(),n=yt(),e=Pe(),u=Ki(),i=e("IE_PROTO"),o=Object,f=o.prototype;return yi=u?o.getPrototypeOf:function(e){var u=n(e);if(r(u,i))return u[i];var c=u.constructor;return t(c)&&u instanceof c?c.prototype:u instanceof o?f:null}}function Ui(){if(gi)return di;gi=1;var r,t,n,e=b(),u=j(),i=Or(),o=Te(),f=Vi(),c=Ue(),a=gt(),s=st(),v=a("iterator"),l=!1;return[].keys&&("next"in(n=[].keys())?(t=f(f(n)))!==Object.prototype&&(r=t):l=!0),!i(r)||e(function(){var t={};return r[v].call(t)!==t})?r={}:s&&(r=o(r)),u(r[v])||c(r,v,function(){return this}),di={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:l}}function Hi(){if(mi)return bi;mi=1;var r=Ui().IteratorPrototype,t=Te(),n=gr(),e=yu(),u=Wi(),i=function(){return this};return bi=function(o,f,c,a){var s=f+" Iterator";return o.prototype=t(r,{next:n(+!a,c)}),e(o,s,!1,!0),u[s]=i,o}}function Ji(){if(wi)return Si;wi=1;var r=w(),t=Rr();return Si=function(n,e,u){try{return r(t(Object.getOwnPropertyDescriptor(n,e)[u]))}catch(i){}}}function qi(){if(Ai)return Oi;Ai=1;var r=Or();return Oi=function(t){return r(t)||null===t}}function Yi(){if(xi)return ji;xi=1;var r=qi(),t=String,n=TypeError;return ji=function(e){if(r(e))return e;throw new n("Can't set "+t(e)+" as a prototype")}}function Xi(){if(Pi)return Ei;Pi=1;var r=Ji(),t=Or(),n=Sr(),e=Yi();return Ei=Object.setPrototypeOf||("__proto__"in{}?function(){var u,i=!1,o={};try{(u=r(Object.prototype,"__proto__","set"))(o,[]),i=o instanceof Array}catch(f){}return function(r,o){return n(r),e(o),t(r)?(i?u(r,o):r.__proto__=o,r):r}}():void 0)}function $i(){if(ki)return Ti;ki=1;var r=Qt(),t=F(),n=st(),e=Bi(),u=j(),i=Hi(),o=Vi(),f=Xi(),c=yu(),a=$t(),s=Ue(),v=gt(),l=Wi(),p=Ui(),y=e.PROPER,h=e.CONFIGURABLE,d=p.IteratorPrototype,g=p.BUGGY_SAFARI_ITERATORS,b=v("iterator"),m="keys",S="values",w="entries",O=function(){return this};return Ti=function(e,v,p,A,j,x,E){i(p,v,A);var P,T,k,I=function(r){if(r===j&&D)return D;if(!g&&r&&r in z)return z[r];switch(r){case m:case S:case w:return function(){return new p(this,r)}}return function(){return new p(this)}},F=v+" Iterator",R=!1,z=e.prototype,L=z[b]||z["@@iterator"]||j&&z[j],D=!g&&L||I(j),C="Array"===v&&z.entries||L;if(C&&(P=o(C.call(new e)))!==Object.prototype&&P.next&&(n||o(P)===d||(f?f(P,d):u(P[b])||s(P,b,O)),c(P,F,!0,!0),n&&(l[F]=O)),y&&j===S&&L&&L.name!==S&&(!n&&h?a(z,"name",S):(R=!0,D=function(){return t(L,this)})),j)if(T={values:I(S),keys:x?D:I(m),entries:I(w)},E)for(k in T)(g||R||!(k in z))&&s(z,k,T[k]);else r({target:v,proto:!0,forced:g||R},T);return n&&!E||z[b]===D||s(z,b,D,{name:j}),l[v]=D,T}}function Qi(){return Fi?Ii:(Fi=1,Ii=function(r,t){return{value:r,done:t}})}function Zi(){if(zi)return Ri;zi=1;var r=wr(),t=Gi(),n=Wi(),e=du(),u=Xt().f,i=$i(),o=Qi(),f=st(),c=I(),a="Array Iterator",s=e.set,v=e.getterFor(a);Ri=i(Array,"Array",function(t,n){s(this,{type:a,target:r(t),
|
63 |
+
// target
|
64 |
+
index:0,
|
65 |
+
// next index
|
66 |
+
kind:n})},function(){var r=v(this),t=r.target,n=r.index++;if(!t||n>=t.length)return r.target=null,o(void 0,!0);switch(r.kind){case"keys":return o(n,!1);case"values":return o(t[n],!1)}return o([n,t[n]],!1)},"values");var l=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!f&&c&&"values"!==l.name)try{u(l,"name",{value:"values"})}catch(p){}return Ri}function ro(){return Di?Li:(Di=1,Li={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})}function to(){if(Ci)return Ni;Ci=1,Zi();var r=ro(),t=g(),n=yu(),e=Wi();for(var u in r)n(t[u],u),e[u]=e.Array;return Ni}function no(){if(_i)return Mi;_i=1;var r=ii();return to(),Mi=r}var eo,uo={};var io;var oo;var fo,co,ao;function so(){if(ao)return co;ao=1;var r=no();return function(){if(eo)return uo;eo=1;var r=gt(),t=Xt().f,n=r("metadata"),e=Function.prototype;void 0===e[n]&&t(e,n,{value:null})}(),io||(io=1,Cu()),oo||(oo=1,Gu()),fo||(fo=1,vu()("metadata")),co=r}var vo,lo,po;function yo(){if(lo)return vo;lo=1;var r=jr(),t=w(),n=r("Symbol"),e=n.keyFor,u=t(n.prototype.valueOf);return vo=n.isRegisteredSymbol||function(r){try{return void 0!==e(u(r))}catch(t){return!1}}}var ho,go,bo;function mo(){if(go)return ho;go=1;for(var r=pt(),t=jr(),n=w(),e=Ir(),u=gt(),i=t("Symbol"),o=i.isWellKnownSymbol,f=t("Object","getOwnPropertyNames"),c=n(i.prototype.valueOf),a=r("wks"),s=0,v=f(i),l=v.length;s<l;s++)try{var p=v[s];e(i[p])&&u(p)}catch(y){}return ho=function(r){if(o&&o(r))return!0;try{for(var t=c(r),n=0,e=f(a),u=e.length;n<u;n++)if(a[e[n]]==t)return!0}catch(y){}return!1}}var So;var wo;var Oo;var Ao;var jo;var xo;var Eo;var Po,To,ko,Io,Fo;function Ro(){if(ko)return To;ko=1;var r=so();return po||(po=1,Qt()({target:"Symbol",stat:!0},{isRegisteredSymbol:yo()})),bo||(bo=1,Qt()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:mo()})),So||(So=1,vu()("customMatcher")),wo||(wo=1,vu()("observable")),Oo||(Oo=1,Qt()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:yo()})),Ao||(Ao=1,Qt()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:mo()})),jo||(jo=1,vu()("matcher")),xo||(xo=1,vu()("metadataKey")),Eo||(Eo=1,vu()("patternMatch")),Po||(Po=1,vu()("replaceAll")),To=r}function zo(){return Fo?Io:(Fo=1,Io=Ro())}var Lo,Do,Co,Mo,_o,No,Go,Wo,Bo,Ko,Vo,Uo,Ho,Jo,qo,Yo={};function Xo(){if(Co)return Yo;Co=1;var r=function(){if(Do)return Lo;Do=1;var r=w(),t=Dn(),n=Qn(),e=Sr(),u=r("".charAt),i=r("".charCodeAt),o=r("".slice),f=function(r){return function(f,c){var a,s,v=n(e(f)),l=t(c),p=v.length;return l<0||l>=p?r?"":void 0:(a=i(v,l))<55296||a>56319||l+1===p||(s=i(v,l+1))<56320||s>57343?r?u(v,l):a:r?o(v,l,l+2):s-56320+(a-55296<<10)+65536}};return Lo={
|
67 |
+
// `String.prototype.codePointAt` method
|
68 |
+
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
69 |
+
codeAt:f(!1),
|
70 |
+
// `String.prototype.at` method
|
71 |
+
// https://github.com/mathiasbynens/String.prototype.at
|
72 |
+
charAt:f(!0)}}().charAt,t=Qn(),n=du(),e=$i(),u=Qi(),i="String Iterator",o=n.set,f=n.getterFor(i);return e(String,"String",function(r){o(this,{type:i,string:t(r),index:0})},function(){var t,n=f(this),e=n.string,i=n.index;return i>=e.length?u(void 0,!0):(t=r(e,i),n.index+=t.length,u(t,!1))}),Yo}function $o(){if(_o)return Mo;_o=1;var r=Wn(),t=zr(),n=mr(),e=Wi(),u=gt()("iterator");return Mo=function(i){if(!n(i))return t(i,u)||t(i,"@@iterator")||e[r(i)]}}function Qo(){return Go?No:(Go=1,Zi(),Xo(),No=$o())}function Zo(){if(Bo)return Wo;Bo=1;var r=Qo();return to(),Wo=r}function rf(){return Vo?Ko:(Vo=1,Ko=Zo())}function tf(){return Ho?Uo:(Ho=1,Uo=rf())}function nf(){return qo?Jo:(qo=1,Jo=tf())}var ef,uf,of,ff,cf,af,sf,vf,lf,pf,yf,hf,df,gf,bf,mf,Sf,wf,Of,Af,jf,xf,Ef,Pf={};function Tf(){if(uf)return ef;uf=1;var r=F(),t=Yt(),n=zr();return ef=function(e,u,i){var o,f;t(e);try{if(!(o=n(e,"return"))){if("throw"===u)throw i;return i}o=r(o,e)}catch(c){f=!0,o=c}if("throw"===u)throw i;if(f)throw o;return t(o),i}}function kf(){if(ff)return of;ff=1;var r=Yt(),t=Tf();return of=function(n,e,u,i){try{return i?e(r(u)[0],u[1]):e(u)}catch(o){t(n,"throw",o)}}}function If(){if(af)return cf;af=1;var r=gt(),t=Wi(),n=r("iterator"),e=Array.prototype;return cf=function(r){return void 0!==r&&(t.Array===r||e[n]===r)}}function Ff(){if(vf)return sf;vf=1;var r=F(),t=Rr(),n=Yt(),e=Fr(),u=$o(),i=TypeError;return sf=function(o,f){var c=arguments.length<2?u(o):f;if(t(c))return n(r(c,o));throw new i(e(o)+" is not iterable")},sf}function Rf(){if(pf)return lf;pf=1;var r=jt(),t=F(),n=yt(),e=kf(),u=If(),i=Kn(),o=Mn(),f=Nn(),c=Ff(),a=$o(),s=Array;return lf=function(v){var l=n(v),p=i(this),y=arguments.length,h=y>1?arguments[1]:void 0,d=void 0!==h;d&&(h=r(h,y>2?arguments[2]:void 0));var g,b,m,S,w,O,A=a(l),j=0;if(!A||this===s&&u(A))for(g=o(l),b=p?new this(g):s(g);g>j;j++)O=d?h(l[j],j):l[j],f(b,j,O);else for(b=p?new this:[],w=(S=c(l,A)).next;!(m=t(w,S)).done;j++)O=d?e(S,h,[m.value,j],!0):m.value,f(b,j,O);return b.length=j,b},lf}function zf(){if(hf)return yf;hf=1;var r=gt()("iterator"),t=!1;try{var n=0,e={next:function(){return{done:!!n++}},return:function(){t=!0}};e[r]=function(){return this},Array.from(e,function(){throw 2})}catch(u){}return yf=function(n,e){try{if(!e&&!t)return!1}catch(u){return!1}var i=!1;try{var o={};o[r]=function(){return{next:function(){return{done:i=!0}}}},n(o)}catch(u){}return i}}function Lf(){return bf?gf:(bf=1,Xo(),function(){if(df)return Pf;df=1;var r=Qt(),t=Rf();r({target:"Array",stat:!0,forced:!zf()(function(r){Array.from(r)})},{from:t})}(),gf=Ar().Array.from)}function Df(){return Sf?mf:(Sf=1,mf=Lf())}function Cf(){return Of?wf:(Of=1,wf=Df())}function Mf(){return jf?Af:(jf=1,Af=Cf())}function _f(){return Ef?xf:(Ef=1,xf=Mf())}var Nf,Gf,Wf,Bf,Kf,Vf,Uf,Hf,Jf,qf,Yf,Xf,$f,Qf,Zf,rc={};function tc(){if(Wf)return Gf;Wf=1;var r=g(),t=Ar();return Gf=function(n,e){var u=t[n+"Prototype"],i=u&&u[e];if(i)return i;var o=r[n],f=o&&o.prototype;return f&&f[e]}}function nc(){return Kf?Bf:(Kf=1,function(){if(Nf)return rc;Nf=1;var r=Qt(),t=Zt(),n=Kn(),e=Or(),u=me(),i=Mn(),o=wr(),f=Nn(),c=gt(),a=Hn(),s=Ce(),v=a("slice"),l=c("species"),p=Array,y=Math.max;r({target:"Array",proto:!0,forced:!v},{slice:function(r,c){var a,v,h,d=o(this),g=i(d),b=u(r,g),m=u(void 0===c?g:c,g);if(t(d)&&(a=d.constructor,(n(a)&&(a===p||t(a.prototype))||e(a)&&null===(a=a[l]))&&(a=void 0),a===p||void 0===a))return s(d,b,m);for(v=new(void 0===a?p:a)(y(m-b,0)),h=0;b<m;b++,h++)b in d&&f(v,h,d[b]);return v.length=h,v}})}(),Bf=tc()("Array","slice"))}function ec(){if(Uf)return Vf;Uf=1;var r=xr(),t=nc(),n=Array.prototype;return Vf=function(e){var u=e.slice;return e===n||r(n,e)&&u===n.slice?t:u}}function uc(){return Jf?Hf:(Jf=1,Hf=ec())}function ic(){return Yf?qf:(Yf=1,qf=uc())}function oc(){return $f?Xf:($f=1,Xf=ic())}function fc(){return Zf?Qf:(Zf=1,Qf=oc())}var cc,ac,sc,vc,lc,pc,yc,hc,dc,gc,bc={exports:{}},mc={};function Sc(){if(ac)return bc.exports;ac=1,function(){if(cc)return mc;cc=1;var r=Qt(),t=I(),n=Xt().f;r({target:"Object",stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n})}();var r=Ar().Object,t=bc.exports=function(t,n,e){return r.defineProperty(t,n,e)};return r.defineProperty.sham&&(t.sham=!0),bc.exports}function wc(){return vc?sc:(vc=1,sc=Sc())}function Oc(){return pc?lc:(pc=1,lc=wc())}function Ac(){return hc?yc:(hc=1,yc=Oc())}function jc(){return gc?dc:(gc=1,dc=Ac())}var xc,Ec,Pc,Tc,kc,Ic,Fc,Rc={};function zc(){return Pc?Ec:(Pc=1,function(){if(xc)return Rc;xc=1;var r=Qt(),t=gu().map;r({target:"Array",proto:!0,forced:!Hn()("map")},{map:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}})}(),Ec=tc()("Array","map"))}function Lc(){if(kc)return Tc;kc=1;var r=xr(),t=zc(),n=Array.prototype;return Tc=function(e){var u=e.map;return e===n||r(n,e)&&u===n.map?t:u}}function Dc(){return Fc?Ic:(Fc=1,Ic=Lc())}var Cc,Mc,_c,Nc={};function Gc(){return _c?Mc:(_c=1,function(){if(Cc)return Nc;Cc=1;var r=Qt(),t=Se().includes,n=b(),e=Gi();r({target:"Array",proto:!0,forced:n(function(){return!Array(1).includes()})},{includes:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}}),e("includes")}(),Mc=tc()("Array","includes"))}var Wc,Bc,Kc,Vc,Uc,Hc,Jc,qc,Yc,Xc,$c,Qc,Zc,ra,ta,na,ea,ua,ia,oa={};function fa(){if(Bc)return Wc;Bc=1;var r=Or(),t=O(),n=gt()("match");return Wc=function(e){var u;return r(e)&&(void 0!==(u=e[n])?!!u:"RegExp"===t(e))}}function ca(){if(Vc)return Kc;Vc=1;var r=fa(),t=TypeError;return Kc=function(n){if(r(n))throw new t("The method doesn't accept regular expressions");return n}}function aa(){if(Hc)return Uc;Hc=1;var r=gt()("match");return Uc=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,"/./"[t](n)}catch(u){}}return!1}}function sa(){return Yc?qc:(Yc=1,function(){if(Jc)return oa;Jc=1;var r=Qt(),t=w(),n=ca(),e=Sr(),u=Qn(),i=aa(),o=t("".indexOf);r({target:"String",proto:!0,forced:!i("includes")},{includes:function(r){return!!~o(u(e(this)),u(n(r)),arguments.length>1?arguments[1]:void 0)}})}(),qc=tc()("String","includes"))}function va(){if($c)return Xc;$c=1;var r=xr(),t=Gc(),n=sa(),e=Array.prototype,u=String.prototype;return Xc=function(i){var o=i.includes;return i===e||r(e,i)&&o===e.includes?t:"string"==typeof i||i===u||r(u,i)&&o===u.includes?n:o}}function la(){return Zc?Qc:(Zc=1,Qc=va())}function pa(){return ta?ra:(ta=1,Jn(),ra=tc()("Array","concat"))}function ya(){if(ea)return na;ea=1;var r=xr(),t=pa(),n=Array.prototype;return na=function(e){var u=e.concat;return e===n||r(n,e)&&u===n.concat?t:u}}function ha(){return ia?ua:(ia=1,ua=ya())}var da,ga,ba,ma,Sa,wa,Oa,Aa,ja,xa,Ea,Pa={};function Ta(){if(ga)return da;ga=1;var r=I(),t=Zt(),n=TypeError,e=Object.getOwnPropertyDescriptor,u=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(r){return r instanceof TypeError}}();return da=u?function(r,u){if(t(r)&&!e(r,"length").writable)throw new n("Cannot set read only .length");return r.length=u}:function(r,t){return r.length=t}}function ka(){if(ma)return ba;ma=1;var r=Fr(),t=TypeError;return ba=function(n,e){if(!delete n[e])throw new t("Cannot delete property "+r(e)+" of "+r(n))}}function Ia(){return Oa?wa:(Oa=1,function(){if(Sa)return Pa;Sa=1;var r=Qt(),t=yt(),n=me(),e=Dn(),u=Mn(),i=Ta(),o=_n(),f=Un(),c=Nn(),a=ka(),s=Hn()("splice"),v=Math.max,l=Math.min;r({target:"Array",proto:!0,forced:!s},{splice:function(r,s){var p,y,h,d,g,b,m=t(this),S=u(m),w=n(r,S),O=arguments.length;for(0===O?p=y=0:1===O?(p=0,y=S-w):(p=O-2,y=l(v(e(s),0),S-w)),o(S+p-y),h=f(m,y),d=0;d<y;d++)(g=w+d)in m&&c(h,d,m[g]);if(h.length=y,p<y){for(d=w;d<S-y;d++)b=d+p,(g=d+y)in m?m[b]=m[g]:a(m,b);for(d=S;d>S-y+p;d--)a(m,d-1)}else if(p>y)for(d=S-y;d>w;d--)b=d+p-1,(g=d+y-1)in m?m[b]=m[g]:a(m,b);for(d=0;d<p;d++)m[d+w]=arguments[d+2];return i(m,S-y+p),h}})}(),wa=tc()("Array","splice"))}function Fa(){if(ja)return Aa;ja=1;var r=xr(),t=Ia(),n=Array.prototype;return Aa=function(e){var u=e.splice;return e===n||r(n,e)&&u===n.splice?t:u}}function Ra(){return Ea?xa:(Ea=1,xa=Fa())}var za,La,Da,Ca,Ma,_a,Na,Ga={};function Wa(){return Da?La:(Da=1,function(){if(za)return Ga;za=1;var r=Qt(),t=gu().filter;r({target:"Array",proto:!0,forced:!Hn()("filter")},{filter:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}})}(),La=tc()("Array","filter"))}function Ba(){if(Ma)return Ca;Ma=1;var r=xr(),t=Wa(),n=Array.prototype;return Ca=function(e){var u=e.filter;return e===n||r(n,e)&&u===n.filter?t:u}}function Ka(){return Na?_a:(Na=1,_a=Ba())}var Va,Ua,Ha,Ja,qa,Ya,Xa,$a,Qa,Za,rs,ts,ns,es,us,is,os,fs={};function cs(){if(Ua)return Va;Ua=1;var r=Ce(),t=Math.floor,n=function(e,u){var i=e.length;if(i<8)for(var o,f,c=1;c<i;){for(f=c,o=e[c];f&&u(e[f-1],o)>0;)e[f]=e[--f];f!==c++&&(e[f]=o)}else for(var a=t(i/2),s=n(r(e,0,a),u),v=n(r(e,a),u),l=s.length,p=v.length,y=0,h=0;y<l||h<p;)e[y+h]=y<l&&h<p?u(s[y],v[h])<=0?s[y++]:v[h++]:y<l?s[y++]:v[h++];return e};return Va=n}function as(){if(Ja)return Ha;Ja=1;var r=b();return Ha=function(t,n){var e=[][t];return!!e&&r(function(){e.call(null,n||function(){return 1},1)})}}function ss(){if(Ya)return qa;Ya=1;var r=Er().match(/firefox\/(\d+)/i);return qa=!!r&&+r[1]}function vs(){return $a?Xa:($a=1,Xa=/MSIE|Trident/.test(Er()))}function ls(){if(Za)return Qa;Za=1;var r=Er().match(/AppleWebKit\/(\d+)\./);return Qa=!!r&&+r[1]}function ps(){if(rs)return fs;rs=1;var r=Qt(),t=w(),n=Rr(),e=yt(),u=Mn(),i=ka(),o=Qn(),f=b(),c=cs(),a=as(),s=ss(),v=vs(),l=Pr(),p=ls(),y=[],h=t(y.sort),d=t(y.push),g=f(function(){y.sort(void 0)}),m=f(function(){y.sort(null)}),S=a("sort"),O=!f(function(){if(l)return l<70;if(!(s&&s>3)){if(v)return!0;if(p)return p<603;var r,t,n,e,u="";for(r=65;r<76;r++){switch(t=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(e=0;e<47;e++)y.push({k:t+e,v:n})}for(y.sort(function(r,t){return t.v-r.v}),e=0;e<y.length;e++)t=y[e].k.charAt(0),u.charAt(u.length-1)!==t&&(u+=t);return"DGBEFHACIJK"!==u}});return r({target:"Array",proto:!0,forced:g||!m||!S||!O},{sort:function(r){void 0!==r&&n(r);var t=e(this);if(O)return void 0===r?h(t):h(t,r);var f,a,s=[],v=u(t);for(a=0;a<v;a++)a in t&&d(s,t[a]);for(c(s,function(r){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==r?+r(t,n)||0:o(t)>o(n)?1:-1}}(r)),f=u(s),a=0;a<f;)t[a]=s[a++];for(;a<v;)i(t,a++);return t}}),fs}function ys(){return ns?ts:(ns=1,ps(),ts=tc()("Array","sort"))}function hs(){if(us)return es;us=1;var r=xr(),t=ys(),n=Array.prototype;return es=function(e){var u=e.sort;return e===n||r(n,e)&&u===n.sort?t:u}}function ds(){return os?is:(os=1,is=hs())}var gs,bs,ms,Ss,ws,Os,As,js,xs,Es,Ps,Ts,ks,Is,Fs,Rs,zs,Ls,Ds,Cs,Ms,_s={},Ns={exports:{}};function Gs(){return bs?gs:(bs=1,gs=b()(function(){if("function"==typeof ArrayBuffer){var r=new ArrayBuffer(8);Object.isExtensible(r)&&Object.defineProperty(r,"a",{value:8})}}))}function Ws(){if(Ss)return ms;Ss=1;var r=b(),t=Or(),n=O(),e=Gs(),u=Object.isExtensible,i=r(function(){});return ms=i||e?function(r){return!!t(r)&&((!e||"ArrayBuffer"!==n(r))&&(!u||u(r)))}:u}function Bs(){return Os?ws:(Os=1,ws=!b()(function(){return Object.isExtensible(Object.preventExtensions({}))}))}function Ks(){if(As)return Ns.exports;As=1;var r=Qt(),t=w(),n=we(),e=Or(),u=ht(),i=Xt().f,o=Fe(),f=Me(),c=Ws(),a=dt(),s=Bs(),v=!1,l=a("meta"),p=0,y=function(r){i(r,l,{value:{objectID:"O"+p++,
|
73 |
+
// object ID
|
74 |
+
weakData:{}}})},h=Ns.exports={enable:function(){h.enable=function(){},v=!0;var n=o.f,e=t([].splice),u={};u[l]=1,n(u).length&&(o.f=function(r){for(var t=n(r),u=0,i=t.length;u<i;u++)if(t[u]===l){e(t,u,1);break}return t},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:f.f}))},fastKey:function(r,t){if(!e(r))return"symbol"==typeof r?r:("string"==typeof r?"S":"P")+r;if(!u(r,l)){if(!c(r))return"F";if(!t)return"E";y(r)}return r[l].objectID},getWeakData:function(r,t){if(!u(r,l)){if(!c(r))return!0;if(!t)return!1;y(r)}return r[l].weakData},onFreeze:function(r){return s&&v&&c(r)&&!u(r,l)&&y(r),r}};return n[l]=!0,Ns.exports}function Vs(){if(xs)return js;xs=1;var r=jt(),t=F(),n=Yt(),e=Fr(),u=If(),i=Mn(),o=xr(),f=Ff(),c=$o(),a=Tf(),s=TypeError,v=function(r,t){this.stopped=r,this.result=t},l=v.prototype;return js=function(p,y,h){var d,g,b,m,S,w,O,A=h&&h.that,j=!(!h||!h.AS_ENTRIES),x=!(!h||!h.IS_RECORD),E=!(!h||!h.IS_ITERATOR),P=!(!h||!h.INTERRUPTED),T=r(y,A),k=function(r){return d&&a(d,"normal"),new v(!0,r)},I=function(r){return j?(n(r),P?T(r[0],r[1],k):T(r[0],r[1])):P?T(r,k):T(r)};if(x)d=p.iterator;else if(E)d=p;else{if(!(g=c(p)))throw new s(e(p)+" is not iterable");if(u(g)){for(b=0,m=i(p);m>b;b++)if((S=I(p[b]))&&o(l,S))return S;return new v(!1)}d=f(p,g)}for(w=x?p.next:d.next;!(O=t(w,d)).done;){try{S=I(O.value)}catch(F){a(d,"throw",F)}if("object"==typeof S&&S&&o(l,S))return S}return new v(!1)}}function Us(){if(Ps)return Es;Ps=1;var r=xr(),t=TypeError;return Es=function(n,e){if(r(e,n))return n;throw new t("Incorrect invocation")}}function Hs(){if(ks)return Ts;ks=1;var r=Qt(),t=g(),n=Ks(),e=b(),u=$t(),i=Vs(),o=Us(),f=j(),c=Or(),a=mr(),s=yu(),v=Xt().f,l=gu().forEach,p=I(),y=du(),h=y.set,d=y.getterFor;return Ts=function(y,g,b){var m,S=-1!==y.indexOf("Map"),w=-1!==y.indexOf("Weak"),O=S?"set":"add",A=t[y],j=A&&A.prototype,x={};if(p&&f(A)&&(w||j.forEach&&!e(function(){(new A).entries().next()}))){var E=(m=g(function(r,t){h(o(r,E),{type:y,collection:new A}),a(t)||i(t,r[O],{that:r,AS_ENTRIES:S})})).prototype,P=d(y);l(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(r){var t="add"===r||"set"===r;!(r in j)||w&&"clear"===r||u(E,r,function(n,e){var u=P(this).collection;if(!t&&w&&!c(n))return"get"===r&&void 0;var i=u[r](0===n?0:n,e);return t?this:i})}),w||v(E,"size",{configurable:!0,get:function(){return P(this).collection.size}})}else m=b.getConstructor(g,y,S,O),n.enable();return s(m,y,!1,!0),x[y]=m,r({global:!0,forced:!0},x),w||b.setStrong(m,y,S),m}}function Js(){if(Fs)return Is;Fs=1;var r=Ue();return Is=function(t,n,e){for(var u in n)e&&e.unsafe&&t[u]?t[u]=n[u]:r(t,u,n[u],e);return t}}function qs(){if(zs)return Rs;zs=1;var r=jr(),t=He(),n=gt(),e=I(),u=n("species");return Rs=function(n){var i=r(n);e&&i&&!i[u]&&t(i,u,{configurable:!0,get:function(){return this}})}}function Ys(){if(Ds)return Ls;Ds=1;var r=Te(),t=He(),n=Js(),e=jt(),u=Us(),i=mr(),o=Vs(),f=$i(),c=Qi(),a=qs(),s=I(),v=Ks().fastKey,l=du(),p=l.set,y=l.getterFor;return Ls={getConstructor:function(f,c,a,l){var h=f(function(t,n){u(t,d),p(t,{type:c,index:r(null),first:null,last:null,size:0}),s||(t.size=0),i(n)||o(n,t[l],{that:t,AS_ENTRIES:a})}),d=h.prototype,g=y(c),b=function(r,t,n){var e,u,i=g(r),o=m(r,t);return o?o.value=n:(i.last=o={index:u=v(t,!0),key:t,value:n,previous:e=i.last,next:null,removed:!1},i.first||(i.first=o),e&&(e.next=o),s?i.size++:r.size++,"F"!==u&&(i.index[u]=o)),r},m=function(r,t){var n,e=g(r),u=v(t);if("F"!==u)return e.index[u];for(n=e.first;n;n=n.next)if(n.key===t)return n};return n(d,{
|
75 |
+
// `{ Map, Set }.prototype.clear()` methods
|
76 |
+
// https://tc39.es/ecma262/#sec-map.prototype.clear
|
77 |
+
// https://tc39.es/ecma262/#sec-set.prototype.clear
|
78 |
+
clear:function(){for(var t=g(this),n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=null),n=n.next;t.first=t.last=null,t.index=r(null),s?t.size=0:this.size=0},
|
79 |
+
// `{ Map, Set }.prototype.delete(key)` methods
|
80 |
+
// https://tc39.es/ecma262/#sec-map.prototype.delete
|
81 |
+
// https://tc39.es/ecma262/#sec-set.prototype.delete
|
82 |
+
delete:function(r){var t=this,n=g(t),e=m(t,r);if(e){var u=e.next,i=e.previous;delete n.index[e.index],e.removed=!0,i&&(i.next=u),u&&(u.previous=i),n.first===e&&(n.first=u),n.last===e&&(n.last=i),s?n.size--:t.size--}return!!e},
|
83 |
+
// `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods
|
84 |
+
// https://tc39.es/ecma262/#sec-map.prototype.foreach
|
85 |
+
// https://tc39.es/ecma262/#sec-set.prototype.foreach
|
86 |
+
forEach:function(r){for(var t,n=g(this),u=e(r,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(u(t.value,t.key,this);t&&t.removed;)t=t.previous},
|
87 |
+
// `{ Map, Set}.prototype.has(key)` methods
|
88 |
+
// https://tc39.es/ecma262/#sec-map.prototype.has
|
89 |
+
// https://tc39.es/ecma262/#sec-set.prototype.has
|
90 |
+
has:function(r){return!!m(this,r)}}),n(d,a?{
|
91 |
+
// `Map.prototype.get(key)` method
|
92 |
+
// https://tc39.es/ecma262/#sec-map.prototype.get
|
93 |
+
get:function(r){var t=m(this,r);return t&&t.value},
|
94 |
+
// `Map.prototype.set(key, value)` method
|
95 |
+
// https://tc39.es/ecma262/#sec-map.prototype.set
|
96 |
+
set:function(r,t){return b(this,0===r?0:r,t)}}:{
|
97 |
+
// `Set.prototype.add(value)` method
|
98 |
+
// https://tc39.es/ecma262/#sec-set.prototype.add
|
99 |
+
add:function(r){return b(this,r=0===r?0:r,r)}}),s&&t(d,"size",{configurable:!0,get:function(){return g(this).size}}),h},setStrong:function(r,t,n){var e=t+" Iterator",u=y(t),i=y(e);f(r,t,function(r,t){p(this,{type:e,target:r,state:u(r),kind:t,last:null})},function(){for(var r=i(this),t=r.kind,n=r.last;n&&n.removed;)n=n.previous;return r.target&&(r.last=n=n?n.next:r.state.first)?c("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(r.target=null,c(void 0,!0))},n?"entries":"values",!n,!0),a(t)}},Ls}function Xs(){return Ms||(Ms=1,Cs||(Cs=1,Hs()("Set",function(r){return function(){return r(this,arguments.length?arguments[0]:void 0)}},Ys()))),_s}var $s,Qs,Zs,rv,tv,nv,ev,uv,iv,ov,fv,cv,av,sv,vv,lv,pv,yv,hv,dv,gv,bv,mv,Sv={};function wv(){if(Qs)return $s;Qs=1;var r=Fr(),t=TypeError;return $s=function(n){if("object"==typeof n&&"size"in n&&"has"in n&&"add"in n&&"delete"in n&&"keys"in n)return n;throw new t(r(n)+" is not a set")}}function Ov(){return rv?Zs:(rv=1,Zs=function(r,t){return 1===t?function(t,n){return t[r](n)}:function(t,n,e){return t[r](n,e)}})}function Av(){if(nv)return tv;nv=1;var r=jr(),t=Ov(),n=r("Set"),e=n.prototype;return tv={Set:n,add:t("add",1),has:t("has",1),remove:t("delete",1),proto:e}}function jv(){if(uv)return ev;uv=1;var r=F();return ev=function(t,n,e){for(var u,i,o=e?t:t.iterator,f=t.next;!(u=r(f,o)).done;)if(void 0!==(i=n(u.value)))return i}}function xv(){if(ov)return iv;ov=1;var r=jv();return iv=function(t,n,e){return e?r(t.keys(),n,!0):t.forEach(n)}}function Ev(){if(cv)return fv;cv=1;var r=Av(),t=xv(),n=r.Set,e=r.add;return fv=function(r){var u=new n;return t(r,function(r){e(u,r)}),u}}function Pv(){return sv?av:(sv=1,av=function(r){return r.size})}function Tv(){return lv?vv:(lv=1,vv=function(r){return{iterator:r,next:r.next,done:!1}})}function kv(){if(yv)return pv;yv=1;var r=Rr(),t=Yt(),n=F(),e=Dn(),u=Tv(),i="Invalid size",o=RangeError,f=TypeError,c=Math.max,a=function(t,n){this.set=t,this.size=c(n,0),this.has=r(t.has),this.keys=r(t.keys)};return a.prototype={getIterator:function(){return u(t(n(this.keys,this.set)))},includes:function(r){return n(this.has,this.set,r)}},pv=function(r){t(r);var n=+r.size;if(n!=n)throw new f(i);var u=e(n);if(u<0)throw new o(i);return new a(r,u)}}function Iv(){if(dv)return hv;dv=1;var r=wv(),t=Av(),n=Ev(),e=Pv(),u=kv(),i=xv(),o=jv(),f=t.has,c=t.remove;return hv=function(t){var a=r(this),s=u(t),v=n(a);return e(a)<=s.size?i(a,function(r){s.includes(r)&&c(v,r)}):o(s.getIterator(),function(r){f(v,r)&&c(v,r)}),v}}function Fv(){return bv?gv:(bv=1,gv=function(){return!1})}var Rv,zv,Lv,Dv={};function Cv(){if(zv)return Rv;zv=1;var r=wv(),t=Av(),n=Pv(),e=kv(),u=xv(),i=jv(),o=t.Set,f=t.add,c=t.has;return Rv=function(t){var a=r(this),s=e(t),v=new o;return n(a)>s.size?i(s.getIterator(),function(r){c(a,r)&&f(v,r)}):u(a,function(r){s.includes(r)&&f(v,r)}),v}}var Mv,_v,Nv,Gv={};function Wv(){if(_v)return Mv;_v=1;var r=wv(),t=Av().has,n=Pv(),e=kv(),u=xv(),i=jv(),o=Tf();return Mv=function(f){var c=r(this),a=e(f);if(n(c)<=a.size)return!1!==u(c,function(r){if(a.includes(r))return!1},!0);var s=a.getIterator();return!1!==i(s,function(r){if(t(c,r))return o(s,"normal",!1)})}}var Bv,Kv,Vv,Uv={};function Hv(){if(Kv)return Bv;Kv=1;var r=wv(),t=Pv(),n=xv(),e=kv();return Bv=function(u){var i=r(this),o=e(u);return!(t(i)>o.size)&&!1!==n(i,function(r){if(!o.includes(r))return!1},!0)}}var Jv,qv,Yv,Xv={};function $v(){if(qv)return Jv;qv=1;var r=wv(),t=Av().has,n=Pv(),e=kv(),u=jv(),i=Tf();return Jv=function(o){var f=r(this),c=e(o);if(n(f)<c.size)return!1;var a=c.getIterator();return!1!==u(a,function(r){if(!t(f,r))return i(a,"normal",!1)})}}var Qv,Zv,rl,tl,nl,el={};function ul(){if(Zv)return Qv;Zv=1;var r=wv(),t=Av(),n=Ev(),e=kv(),u=jv(),i=t.add,o=t.has,f=t.remove;return Qv=function(t){var c=r(this),a=e(t).getIterator(),s=n(c);return u(a,function(r){o(c,r)?f(s,r):i(s,r)}),s}}function il(){return tl?rl:(tl=1,rl=function(r){try{var t=new Set,n={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}},e=t[r](n);return 1!==e.size||4!==e.values().next().value}catch(u){return!1}})}var ol,fl,cl,al,sl,vl,ll,pl={};function yl(){if(fl)return ol;fl=1;var r=wv(),t=Av().add,n=Ev(),e=kv(),u=jv();return ol=function(i){var o=r(this),f=e(i).getIterator(),c=n(o);return u(f,function(r){t(c,r)}),c}}function hl(){return sl?al:(sl=1,Zi(),Xs(),function(){if(mv)return Sv;mv=1;var r=Qt(),t=Iv(),n=b();r({target:"Set",proto:!0,real:!0,forced:!Fv()("difference",function(r){return 0===r.size})||n(function(){var r={size:1,has:function(){return!0},keys:function(){var r=0;return{next:function(){var n=r++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return 3!==t.difference(r).size})},{difference:t})}(),function(){if(Lv)return Dv;Lv=1;var r=Qt(),t=b(),n=Cv();r({target:"Set",proto:!0,real:!0,forced:!Fv()("intersection",function(r){return 2===r.size&&r.has(1)&&r.has(2)})||t(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:n})}(),function(){if(Nv)return Gv;Nv=1;var r=Qt(),t=Wv();r({target:"Set",proto:!0,real:!0,forced:!Fv()("isDisjointFrom",function(r){return!r})},{isDisjointFrom:t})}(),function(){if(Vv)return Uv;Vv=1;var r=Qt(),t=Hv();r({target:"Set",proto:!0,real:!0,forced:!Fv()("isSubsetOf",function(r){return r})},{isSubsetOf:t})}(),function(){if(Yv)return Xv;Yv=1;var r=Qt(),t=$v();r({target:"Set",proto:!0,real:!0,forced:!Fv()("isSupersetOf",function(r){return!r})},{isSupersetOf:t})}(),function(){if(nl)return el;nl=1;var r=Qt(),t=ul(),n=il();r({target:"Set",proto:!0,real:!0,forced:!Fv()("symmetricDifference")||!n("symmetricDifference")},{symmetricDifference:t})}(),function(){if(cl)return pl;cl=1;var r=Qt(),t=yl(),n=il();r({target:"Set",proto:!0,real:!0,forced:!Fv()("union")||!n("union")},{union:t})}(),Xo(),al=Ar().Set)}function dl(){if(ll)return vl;ll=1;var r=hl();return to(),vl=r}var gl,bl,ml,Sl,wl,Ol={};function Al(){return ml?bl:(ml=1,function(){if(gl)return Ol;gl=1;var r=Qt(),t=yt(),n=je();r({target:"Object",stat:!0,forced:b()(function(){n(1)})},{keys:function(r){return n(t(r))}})}(),bl=Ar().Object.keys)}function jl(){return wl?Sl:(wl=1,Sl=Al())}var xl,El,Pl,Tl,kl,Il,Fl,Rl={};function zl(){if(El)return xl;El=1;var r=I(),t=w(),n=F(),e=b(),u=je(),i=Ve(),o=dr(),f=yt(),c=br(),a=Object.assign,s=Object.defineProperty,v=t([].concat);return xl=!a||e(function(){if(r&&1!==a({b:1},a(s({},"a",{enumerable:!0,get:function(){s(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},n={},e=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[e]=7,i.split("").forEach(function(r){n[r]=r}),7!==a({},t)[e]||u(a({},n)).join("")!==i})?function(t,e){for(var a=f(t),s=arguments.length,l=1,p=i.f,y=o.f;s>l;)for(var h,d=c(arguments[l++]),g=p?v(u(d),p(d)):u(d),b=g.length,m=0;b>m;)h=g[m++],r&&!n(y,d,h)||(a[h]=d[h]);return a}:a,xl}function Ll(){return kl?Tl:(kl=1,function(){if(Pl)return Rl;Pl=1;var r=Qt(),t=zl();r({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t})}(),Tl=Ar().Object.assign)}function Dl(){return Fl?Il:(Fl=1,Il=Ll())}var Cl,Ml,_l,Nl,Gl,Wl,Bl,Kl,Vl,Ul={};function Hl(){if(Ml)return Cl;Ml=1;var r=yt(),t=me(),n=Mn();return Cl=function(e){for(var u=r(this),i=n(u),o=arguments.length,f=t(o>1?arguments[1]:void 0,i),c=o>2?arguments[2]:void 0,a=void 0===c?i:t(c,i);a>f;)u[f++]=e;return u},Cl}function Jl(){return Gl?Nl:(Gl=1,function(){if(_l)return Ul;_l=1;var r=Qt(),t=Hl(),n=Gi();r({target:"Array",proto:!0},{fill:t}),n("fill")}(),Nl=tc()("Array","fill"))}function ql(){if(Bl)return Wl;Bl=1;var r=xr(),t=Jl(),n=Array.prototype;return Wl=function(e){var u=e.fill;return e===n||r(n,e)&&u===n.fill?t:u}}function Yl(){return Vl?Kl:(Vl=1,Kl=ql())}var Xl,$l,Ql,Zl,rp,tp,np,ep={};function up(){return Ql?$l:(Ql=1,function(){if(Xl)return ep;Xl=1;var r=Qt(),t=gu().find,n=Gi(),e="find",u=!0;e in[]&&Array(1)[e](function(){u=!1}),r({target:"Array",proto:!0,forced:u},{find:function(r){return t(this,r,arguments.length>1?arguments[1]:void 0)}}),n(e)}(),$l=tc()("Array","find"))}function ip(){if(rp)return Zl;rp=1;var r=xr(),t=up(),n=Array.prototype;return Zl=function(e){var u=e.find;return e===n||r(n,e)&&u===n.find?t:u}}function op(){return np?tp:(np=1,tp=ip())}export{zo as a,nf as b,_f as c,fc as d,jc as e,Dc as f,la as g,Df as h,no as i,uc as j,ha as k,Ra as l,Ka as m,ds as n,dl as o,jl as p,Dl as q,un as r,Yl as s,op as t};
|
.output/public/assets/cose-base-Cjsls_Nj.js
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import{r as t}from"./layout-base-DcgC6mbs.js";var e,i={exports:{}};function r(){return e?i.exports:(e=1,r=function(t){
|
2 |
+
/******/
|
3 |
+
return function(t){var e={};function i(r){if(e[r])return e[r].exports;var o=e[r]={
|
4 |
+
/******/
|
5 |
+
i:r,
|
6 |
+
/******/
|
7 |
+
l:!1,
|
8 |
+
/******/
|
9 |
+
exports:{}
|
10 |
+
/******/};return t[r].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{
|
11 |
+
/******/
|
12 |
+
configurable:!1,
|
13 |
+
/******/
|
14 |
+
enumerable:!0,
|
15 |
+
/******/
|
16 |
+
get:r
|
17 |
+
/******/})},i.n=function(t){var e=t&&t.__esModule?
|
18 |
+
/******/function(){return t.default}:
|
19 |
+
/******/function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=7)}([
|
20 |
+
/* 0 */
|
21 |
+
/***/
|
22 |
+
function(e,i){e.exports=t},
|
23 |
+
/* 1 */
|
24 |
+
/***/
|
25 |
+
function(t,e,i){var r=i(0).FDLayoutConstants;function o(){}for(var n in r)o[n]=r[n];o.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,o.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,o.DEFAULT_COMPONENT_SEPERATION=60,o.TILE=!0,o.TILING_PADDING_VERTICAL=10,o.TILING_PADDING_HORIZONTAL=10,o.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=o},
|
26 |
+
/* 2 */
|
27 |
+
/***/
|
28 |
+
function(t,e,i){var r=i(0).FDLayoutEdge;function o(t,e,i){r.call(this,t,e,i)}for(var n in o.prototype=Object.create(r.prototype),r)o[n]=r[n];t.exports=o},
|
29 |
+
/* 3 */
|
30 |
+
/***/
|
31 |
+
function(t,e,i){var r=i(0).LGraph;function o(t,e,i){r.call(this,t,e,i)}for(var n in o.prototype=Object.create(r.prototype),r)o[n]=r[n];t.exports=o},
|
32 |
+
/* 4 */
|
33 |
+
/***/
|
34 |
+
function(t,e,i){var r=i(0).LGraphManager;function o(t){r.call(this,t)}for(var n in o.prototype=Object.create(r.prototype),r)o[n]=r[n];t.exports=o},
|
35 |
+
/* 5 */
|
36 |
+
/***/
|
37 |
+
function(t,e,i){var r=i(0).FDLayoutNode,o=i(0).IMath;function n(t,e,i,o){r.call(this,t,e,i,o)}for(var a in n.prototype=Object.create(r.prototype),r)n[a]=r[a];n.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*o.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*o.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},n.prototype.propogateDisplacementToChildren=function(t,e){for(var i,r=this.getChild().getNodes(),o=0;o<r.length;o++)null==(i=r[o]).getChild()?(i.moveBy(t,e),i.displacementX+=t,i.displacementY+=e):i.propogateDisplacementToChildren(t,e)},n.prototype.setPred1=function(t){this.pred1=t},n.prototype.getPred1=function(){return pred1},n.prototype.getPred2=function(){return pred2},n.prototype.setNext=function(t){this.next=t},n.prototype.getNext=function(){return next},n.prototype.setProcessed=function(t){this.processed=t},n.prototype.isProcessed=function(){return processed},t.exports=n},
|
38 |
+
/* 6 */
|
39 |
+
/***/
|
40 |
+
function(t,e,i){var r=i(0).FDLayout,o=i(4),n=i(3),a=i(5),s=i(2),h=i(1),d=i(0).FDLayoutConstants,g=i(0).LayoutConstants,l=i(0).Point,p=i(0).PointD,c=i(0).Layout,u=i(0).Integer,f=i(0).IGeometry,v=i(0).LGraph,T=i(0).Transform;function E(){r.call(this),this.toBeTiled={}}for(var m in E.prototype=Object.create(r.prototype),r)E[m]=r[m];E.prototype.newGraphManager=function(){var t=new o(this);return this.graphManager=t,t},E.prototype.newGraph=function(t){return new n(null,this.graphManager,t)},E.prototype.newNode=function(t){return new a(this.graphManager,t)},E.prototype.newEdge=function(t){return new s(null,null,t)},E.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=d.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=d.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=d.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},E.prototype.layout=function(){return g.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},E.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(i));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},E.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},E.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i<t.length;i++){var r=t[i].rect,o=t[i].id;e[o]={id:o,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return e},E.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===d.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},E.prototype.calculateNodesToApplyGravitationTo=function(){var t,e,i=[],r=this.graphManager.getGraphs(),o=r.length;for(e=0;e<o;e++)(t=r[e]).updateConnected(),t.isConnected||(i=i.concat(t.getNodes()));return i},E.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var e,i=new Set;for(e=0;e<t.length;e++){var r=t[e];if(!i.has(r)){var o=r.getSource(),n=r.getTarget();if(o==n)r.getBendpoints().push(new p),r.getBendpoints().push(new p),this.createDummyNodesForBendpoints(r),i.add(r);else{var a=[];if(a=(a=a.concat(o.getEdgeListToNode(n))).concat(n.getEdgeListToNode(o)),!i.has(a[0])){var s;if(a.length>1)for(s=0;s<a.length;s++){var h=a[s];h.getBendpoints().push(new p),this.createDummyNodesForBendpoints(h)}a.forEach(function(t){i.add(t)})}}}if(i.size==t.length)break}},E.prototype.positionNodesRadially=function(t){for(var e=new l(0,0),i=Math.ceil(Math.sqrt(t.length)),r=0,o=0,n=0,a=new p(0,0),s=0;s<t.length;s++){s%i==0&&(n=0,o=r,0!=s&&(o+=h.DEFAULT_COMPONENT_SEPERATION),r=0);var d=t[s],u=c.findCenterOfTree(d);e.x=n,e.y=o,(a=E.radialLayout(d,u,e)).y>r&&(r=Math.floor(a.y)),n=Math.floor(a.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(g.WORLD_CENTER_X-a.x/2,g.WORLD_CENTER_Y-a.y/2))},E.radialLayout=function(t,e,i){var r=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);E.branchRadialLayout(e,null,0,359,0,r);var o=v.calculateBounds(t),n=new T;n.setDeviceOrgX(o.getMinX()),n.setDeviceOrgY(o.getMinY()),n.setWorldOrgX(i.x),n.setWorldOrgY(i.y);for(var a=0;a<t.length;a++)t[a].transform(n);var s=new p(o.getMaxX(),o.getMaxY());return n.inverseTransformPoint(s)},E.branchRadialLayout=function(t,e,i,r,o,n){var a=(r-i+1)/2;a<0&&(a+=180);var s=(a+i)%360*f.TWO_PI/360,h=o*Math.cos(s),d=o*Math.sin(s);t.setCenter(h,d);var g=[],l=(g=g.concat(t.getEdges())).length;null!=e&&l--;for(var p,c=0,u=g.length,v=t.getEdgesBetween(e);v.length>1;){var T=v[0];v.splice(0,1);var m=g.indexOf(T);m>=0&&g.splice(m,1),u--,l--}p=null!=e?(g.indexOf(v[0])+1)%u:0;for(var N=Math.abs(r-i)/l,y=p;c!=l;y=++y%u){var w=g[y].getOtherEnd(t);if(w!=e){var A=(i+c*N)%360,C=(A+N)%360;E.branchRadialLayout(w,t,A,C,o+n,n),c++}}},E.maxDiagonalInTree=function(t){for(var e=u.MIN_VALUE,i=0;i<t.length;i++){var r=t[i].getDiagonal();r>e&&(e=r)}return e},E.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},E.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],r=this.graphManager.getAllNodes(),o=0;o<r.length;o++){var n=(s=r[o]).getParent();0!==this.getNodeDegreeWithChildren(s)||null!=n.id&&this.getToBeTiled(n)||i.push(s)}for(o=0;o<i.length;o++){var s,h=(s=i[o]).getParent().id;void 0===e[h]&&(e[h]=[]),e[h]=e[h].concat(s)}Object.keys(e).forEach(function(i){if(e[i].length>1){var r="DummyCompound_"+i;t.memberGroups[r]=e[i];var o=e[i][0].getParent(),n=new a(t.graphManager);n.id=r,n.paddingLeft=o.paddingLeft||0,n.paddingRight=o.paddingRight||0,n.paddingBottom=o.paddingBottom||0,n.paddingTop=o.paddingTop||0,t.idToDummyNode[r]=n;var s=t.getGraphManager().add(t.newGraph(),n),h=o.getChild();h.add(n);for(var d=0;d<e[i].length;d++){var g=e[i][d];h.remove(g),s.add(g)}}})},E.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var i=0;i<this.compoundOrder.length;i++)e[this.compoundOrder[i].id]=this.compoundOrder[i],t[this.compoundOrder[i].id]=[].concat(this.compoundOrder[i].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[i].getChild()),this.compoundOrder[i].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},E.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(i){var r=t.idToDummyNode[i];e[i]=t.tileNodes(t.memberGroups[i],r.paddingLeft+r.paddingRight),r.rect.width=e[i].width,r.rect.height=e[i].height})},E.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],i=e.id,r=e.paddingLeft,o=e.paddingTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,r,o)}},E.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(i){var r=t.idToDummyNode[i],o=r.paddingLeft,n=r.paddingTop;t.adjustLocations(e[i],r.rect.x,r.rect.y,o,n)})},E.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var r=i.getNodes(),o=0;o<r.length;o++){var n=r[o];if(this.getNodeDegree(n)>0)return this.toBeTiled[e]=!1,!1;if(null!=n.getChild()){if(!this.getToBeTiled(n))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[n.id]=!1}return this.toBeTiled[e]=!0,!0},E.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,r=0;r<e.length;r++){var o=e[r];o.getSource().id!==o.getTarget().id&&(i+=1)}return i},E.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null==t.getChild())return e;for(var i=t.getChild().getNodes(),r=0;r<i.length;r++){var o=i[r];e+=this.getNodeDegreeWithChildren(o)}return e},E.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},E.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var i=t[e];null!=i.getChild()&&this.fillCompexOrderByDFS(i.getChild().getNodes()),this.getToBeTiled(i)&&this.compoundOrder.push(i)}},E.prototype.adjustLocations=function(t,e,i,r,o){i+=o;for(var n=e+=r,a=0;a<t.rows.length;a++){var s=t.rows[a];e=n;for(var h=0,d=0;d<s.length;d++){var g=s[d];g.rect.x=e,g.rect.y=i,e+=g.rect.width+t.horizontalPadding,g.rect.height>h&&(h=g.rect.height)}i+=h+t.verticalPadding}},E.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(r){var o=e[r];i.tiledMemberPack[r]=i.tileNodes(t[r],o.paddingLeft+o.paddingRight),o.rect.width=i.tiledMemberPack[r].width,o.rect.height=i.tiledMemberPack[r].height})},E.prototype.tileNodes=function(t,e){var i={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,
|
41 |
+
// assume minHeight equals to minWidth
|
42 |
+
verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height<e.rect.width*e.rect.height?1:0});for(var r=0;r<t.length;r++){var o=t[r];0==i.rows.length?this.insertNodeToRow(i,o,0,e):this.canAddHorizontal(i,o.rect.width,o.rect.height)?this.insertNodeToRow(i,o,this.getShortestRowIndex(i),e):this.insertNodeToRow(i,o,i.rows.length,e),this.shiftToLastRow(i)}return i},E.prototype.insertNodeToRow=function(t,e,i,r){var o=r;i==t.rows.length&&(t.rows.push([]),t.rowWidth.push(o),t.rowHeight.push(0));var n=t.rowWidth[i]+e.rect.width;t.rows[i].length>0&&(n+=t.horizontalPadding),t.rowWidth[i]=n,t.width<n&&(t.width=n);var a=e.rect.height;i>0&&(a+=t.verticalPadding);var s=0;a>t.rowHeight[i]&&(s=t.rowHeight[i],t.rowHeight[i]=a,s=t.rowHeight[i]-s),t.height+=s,t.rows[i].push(e)},E.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,r=0;r<t.rows.length;r++)t.rowWidth[r]<i&&(e=r,i=t.rowWidth[r]);return e},E.prototype.getLongestRowIndex=function(t){for(var e=-1,i=Number.MIN_VALUE,r=0;r<t.rows.length;r++)t.rowWidth[r]>i&&(e=r,i=t.rowWidth[r]);return e},E.prototype.canAddHorizontal=function(t,e,i){var r=this.getShortestRowIndex(t);if(r<0)return!0;var o=t.rowWidth[r];if(o+t.horizontalPadding+e<=t.width)return!0;var n,a,s=0;return t.rowHeight[r]<i&&r>0&&(s=i+t.verticalPadding-t.rowHeight[r]),n=t.width-o>=e+t.horizontalPadding?(t.height+s)/(o+e+t.horizontalPadding):(t.height+s)/t.width,s=i+t.verticalPadding,(a=t.width<e?(t.height+s)/e:(t.height+s)/t.width)<1&&(a=1/a),n<1&&(n=1/n),n<a},E.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),i=t.rowWidth.length-1,r=t.rows[e],o=r[r.length-1],n=o.width+t.horizontalPadding;if(t.width-t.rowWidth[i]>n&&e!=i){r.splice(-1,1),t.rows[i].push(o),t.rowWidth[e]=t.rowWidth[e]-n,t.rowWidth[i]=t.rowWidth[i]+n,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var a=Number.MIN_VALUE,s=0;s<r.length;s++)r[s].height>a&&(a=r[s].height);e>0&&(a+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=a,t.rowHeight[i]<o.height+t.verticalPadding&&(t.rowHeight[i]=o.height+t.verticalPadding);var d=t.rowHeight[e]+t.rowHeight[i];t.height+=d-h,this.shiftToLastRow(t)}},E.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},E.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},E.prototype.reduceTrees=function(){for(var t,e=[],i=!0;i;){var r=this.graphManager.getAllNodes(),o=[];i=!1;for(var n=0;n<r.length;n++)1!=(t=r[n]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(o.push([t,t.getEdges()[0],t.getOwner()]),i=!0);if(1==i){for(var a=[],s=0;s<o.length;s++)1==o[s][0].getEdges().length&&(a.push(o[s]),o[s][0].getOwner().remove(o[s][0]));e.push(a),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},E.prototype.growTree=function(t){for(var e,i=t[t.length-1],r=0;r<i.length;r++)e=i[r],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},E.prototype.findPlaceforPrunedNode=function(t){var e,i,r=t[0],o=(i=r==t[1].source?t[1].target:t[1].source).startX,n=i.finishX,a=i.startY,s=i.finishY,h=[0,0,0,0];if(a>0)for(var g=o;g<=n;g++)h[0]+=this.grid[g][a-1].length+this.grid[g][a].length-1;if(n<this.grid.length-1)for(g=a;g<=s;g++)h[1]+=this.grid[n+1][g].length+this.grid[n][g].length-1;if(s<this.grid[0].length-1)for(g=o;g<=n;g++)h[2]+=this.grid[g][s+1].length+this.grid[g][s].length-1;if(o>0)for(g=a;g<=s;g++)h[3]+=this.grid[o-1][g].length+this.grid[o][g].length-1;for(var l,p,c=u.MAX_VALUE,f=0;f<h.length;f++)h[f]<c?(c=h[f],l=1,p=f):h[f]==c&&l++;if(3==l&&0==c)0==h[0]&&0==h[1]&&0==h[2]?e=1:0==h[0]&&0==h[1]&&0==h[3]?e=0:0==h[0]&&0==h[2]&&0==h[3]?e=3:0==h[1]&&0==h[2]&&0==h[3]&&(e=2);else if(2==l&&0==c){var v=Math.floor(2*Math.random());e=0==h[0]&&0==h[1]?0==v?0:1:0==h[0]&&0==h[2]?0==v?0:2:0==h[0]&&0==h[3]?0==v?0:3:0==h[1]&&0==h[2]?0==v?1:2:0==h[1]&&0==h[3]?0==v?1:3:0==v?2:3}else e=4==l&&0==c?v=Math.floor(4*Math.random()):p;0==e?r.setCenter(i.getCenterX(),i.getCenterY()-i.getHeight()/2-d.DEFAULT_EDGE_LENGTH-r.getHeight()/2):1==e?r.setCenter(i.getCenterX()+i.getWidth()/2+d.DEFAULT_EDGE_LENGTH+r.getWidth()/2,i.getCenterY()):2==e?r.setCenter(i.getCenterX(),i.getCenterY()+i.getHeight()/2+d.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(i.getCenterX()-i.getWidth()/2-d.DEFAULT_EDGE_LENGTH-r.getWidth()/2,i.getCenterY())},t.exports=E},
|
43 |
+
/* 7 */
|
44 |
+
/***/
|
45 |
+
function(t,e,i){var r={};r.layoutBase=i(0),r.CoSEConstants=i(1),r.CoSEEdge=i(2),r.CoSEGraph=i(3),r.CoSEGraphManager=i(4),r.CoSELayout=i(6),r.CoSENode=i(5),t.exports=r}
|
46 |
+
/******/])},i.exports=r(t()));var r}export{r};
|
.output/public/assets/cytoscape-D0Lf_MdX.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
.output/public/assets/cytoscape-cose-bilkent-CIWZ1EOj.js
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import{g as t}from"./@babel-Cvfd6jjG.js";import{r as n}from"./cose-base-Cjsls_Nj.js";var e,o,i={exports:{}};const a=t(e?i.exports:(e=1,i.exports=(o=n(),
|
2 |
+
/******/function(t){var n={};function e(o){if(n[o])return n[o].exports;var i=n[o]={
|
3 |
+
/******/
|
4 |
+
i:o,
|
5 |
+
/******/
|
6 |
+
l:!1,
|
7 |
+
/******/
|
8 |
+
exports:{}
|
9 |
+
/******/};return t[o].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{
|
10 |
+
/******/
|
11 |
+
configurable:!1,
|
12 |
+
/******/
|
13 |
+
enumerable:!0,
|
14 |
+
/******/
|
15 |
+
get:o
|
16 |
+
/******/})},e.n=function(t){var n=t&&t.__esModule?
|
17 |
+
/******/function(){return t.default}:
|
18 |
+
/******/function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=1)}([
|
19 |
+
/* 0 */
|
20 |
+
/***/
|
21 |
+
function(t,n){t.exports=o},
|
22 |
+
/* 1 */
|
23 |
+
/***/
|
24 |
+
function(t,n,e){var o=e(0).layoutBase.LayoutConstants,i=e(0).layoutBase.FDLayoutConstants,a=e(0).CoSEConstants,r=e(0).CoSELayout,s=e(0).CoSENode,d=e(0).layoutBase.PointD,l=e(0).layoutBase.DimensionD,u={
|
25 |
+
// Called on `layoutready`
|
26 |
+
ready:function(){},
|
27 |
+
// Called on `layoutstop`
|
28 |
+
stop:function(){},
|
29 |
+
// 'draft', 'default' or 'proof"
|
30 |
+
// - 'draft' fast cooling rate
|
31 |
+
// - 'default' moderate cooling rate
|
32 |
+
// - "proof" slow cooling rate
|
33 |
+
quality:"default",
|
34 |
+
// include labels in node dimensions
|
35 |
+
nodeDimensionsIncludeLabels:!1,
|
36 |
+
// number of ticks per frame; higher is faster but more jerky
|
37 |
+
refresh:30,
|
38 |
+
// Whether to fit the network view after when done
|
39 |
+
fit:!0,
|
40 |
+
// Padding on fit
|
41 |
+
padding:10,
|
42 |
+
// Whether to enable incremental mode
|
43 |
+
randomize:!0,
|
44 |
+
// Node repulsion (non overlapping) multiplier
|
45 |
+
nodeRepulsion:4500,
|
46 |
+
// Ideal edge (non nested) length
|
47 |
+
idealEdgeLength:50,
|
48 |
+
// Divisor to compute edge forces
|
49 |
+
edgeElasticity:.45,
|
50 |
+
// Nesting factor (multiplier) to compute ideal edge length for nested edges
|
51 |
+
nestingFactor:.1,
|
52 |
+
// Gravity force (constant)
|
53 |
+
gravity:.25,
|
54 |
+
// Maximum number of iterations to perform
|
55 |
+
numIter:2500,
|
56 |
+
// For enabling tiling
|
57 |
+
tile:!0,
|
58 |
+
// Type of layout animation. The option set is {'during', 'end', false}
|
59 |
+
animate:"end",
|
60 |
+
// Duration for animate:end
|
61 |
+
animationDuration:500,
|
62 |
+
// Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
|
63 |
+
tilingPaddingVertical:10,
|
64 |
+
// Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
|
65 |
+
tilingPaddingHorizontal:10,
|
66 |
+
// Gravity range (constant) for compounds
|
67 |
+
gravityRangeCompound:1.5,
|
68 |
+
// Gravity force (constant) for compounds
|
69 |
+
gravityCompound:1,
|
70 |
+
// Gravity range (constant)
|
71 |
+
gravityRange:3.8,
|
72 |
+
// Initial cooling factor for incremental layout
|
73 |
+
initialEnergyOnIncremental:.5};function p(t){this.options=function(t,n){var e={};for(var o in t)e[o]=t[o];for(var o in n)e[o]=n[o];return e}(u,t),g(this.options)}var g=function(t){null!=t.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?o.QUALITY=0:"proof"==t.quality?o.QUALITY=2:o.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!t.randomize,a.ANIMATE=i.ANIMATE=o.ANIMATE=t.animate,a.TILE=t.tile,a.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal};p.prototype.run=function(){var t,n,e=this.options;this.idToLNode={};var o=this.layout=new r,i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var a=o.newGraphManager();this.gm=a;var s=this.options.eles.nodes(),d=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),o);for(var l=0;l<d.length;l++){var u=d[l],p=this.idToLNode[u.data("source")],g=this.idToLNode[u.data("target")];p!==g&&0==p.getEdgesBetween(g).length&&(a.add(o.newEdge(),p,g).id=u.id())}var c=function(t,n){"number"==typeof t&&(t=n);var e=t.data("id"),o=i.idToLNode[e];return{x:o.getRect().getCenterX(),y:o.getRect().getCenterY()}},E=function a(){for(var r,s=function(){e.fit&&e.cy.fit(e.eles,e.padding),t||(t=!0,i.cy.one("layoutready",e.ready),i.cy.trigger({type:"layoutready",layout:i}))},d=i.options.refresh,l=0;l<d&&!r;l++)r=i.stopped||i.layout.tick();if(r)return o.checkLayoutSuccess()&&!o.isSubLayout&&o.doPostLayout(),o.tilingPostLayout&&o.tilingPostLayout(),o.isLayoutFinished=!0,i.options.eles.nodes().positions(c),s(),i.cy.one("layoutstop",i.options.stop),i.cy.trigger({type:"layoutstop",layout:i}),n&&cancelAnimationFrame(n),void(t=!1);var u=i.layout.getPositionsData();e.eles.nodes().positions(function(t,n){if("number"==typeof t&&(t=n),!t.isParent()){for(var e=t.id(),o=u[e],i=t;null==o&&(o=u[i.data("parent")]||u["DummyCompound_"+i.data("parent")],u[e]=o,null!=(i=i.parent()[0])););return null!=o?{x:o.x,y:o.y}:{x:t.position("x"),y:t.position("y")}}}),s(),n=requestAnimationFrame(a)};return o.addListener("layoutstarted",function(){"during"===i.options.animate&&(n=requestAnimationFrame(E))}),o.runLayout(),"during"!==this.options.animate&&(i.options.eles.nodes().not(":parent").layoutPositions(i,i.options,c),t=!1),this},p.prototype.getTopMostNodes=function(t){for(var n={},e=0;e<t.length;e++)n[t[e].id()]=!0;return t.filter(function(t,e){"number"==typeof t&&(t=e);for(var o=t.parent()[0];null!=o;){if(n[o.id()])return!1;o=o.parent()[0]}return!0})},p.prototype.processChildrenList=function(t,n,e){for(var o=n.length,i=0;i<o;i++){var a,r,u=n[i],p=u.children(),g=u.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((a=null!=u.outerWidth()&&null!=u.outerHeight()?t.add(new s(e.graphManager,new d(u.position("x")-g.w/2,u.position("y")-g.h/2),new l(parseFloat(g.w),parseFloat(g.h)))):t.add(new s(this.graphManager))).id=u.data("id"),a.paddingLeft=parseInt(u.css("padding")),a.paddingTop=parseInt(u.css("padding")),a.paddingRight=parseInt(u.css("padding")),a.paddingBottom=parseInt(u.css("padding")),this.options.nodeDimensionsIncludeLabels&&u.isParent()){var c=u.boundingBox({includeLabels:!0,includeNodes:!1}).w,E=u.boundingBox({includeLabels:!0,includeNodes:!1}).h,y=u.css("text-halign");a.labelWidth=c,a.labelHeight=E,a.labelPos=y}this.idToLNode[u.data("id")]=a,isNaN(a.rect.x)&&(a.rect.x=0),isNaN(a.rect.y)&&(a.rect.y=0),null!=p&&p.length>0&&(r=e.getGraphManager().add(e.newGraph(),a),this.processChildrenList(r,p,e))}},p.prototype.stop=function(){return this.stopped=!0,this};var c=function(t){t("layout","cose-bilkent",p)};"undefined"!=typeof cytoscape&&c(cytoscape),t.exports=c}
|
74 |
+
/******/]))));export{a as c};
|
.output/public/assets/cytoscape-fcose-C-UBqLtC.js
ADDED
The diff for this file is too large to render.
See raw diff
|
|
.output/public/assets/d3-DQzaeFuQ.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import"./d3-transition-B7gMhpAH.js";import"./d3-zoom-BJNDRQ4C.js";
|
.output/public/assets/d3-array-Dy1FNIg7.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-axis-DxpTsFyd.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
function t(t){return t}var n=1e-6;function r(t){return"translate("+t+",0)"}function e(t){return"translate(0,"+t+")"}function i(t){return n=>+t(n)}function a(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),r=>+t(r)+n}function o(){return!this.__axis}function u(u,c){var l=[],s=null,f=null,d=6,m=6,h=3,g="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,p=1===u||4===u?-1:1,k=4===u||2===u?"x":"y",x=1===u||3===u?r:e;function y(r){var e=null==s?c.ticks?c.ticks.apply(c,l):c.domain():s,y=null==f?c.tickFormat?c.tickFormat.apply(c,l):t:f,A=Math.max(d,0)+h,M=c.range(),v=+M[0]+g,w=+M[M.length-1]+g,_=(c.bandwidth?a:i)(c.copy(),g),F=r.selection?r.selection():r,V=F.selectAll(".domain").data([null]),b=F.selectAll(".tick").data(e,c).order(),z=b.exit(),H=b.enter().append("g").attr("class","tick"),C=b.select("line"),S=b.select("text");V=V.merge(V.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(H),C=C.merge(H.append("line").attr("stroke","currentColor").attr(k+"2",p*d)),S=S.merge(H.append("text").attr("fill","currentColor").attr(k,p*A).attr("dy",1===u?"0em":3===u?"0.71em":"0.32em")),r!==F&&(V=V.transition(r),b=b.transition(r),C=C.transition(r),S=S.transition(r),z=z.transition(r).attr("opacity",n).attr("transform",function(t){return isFinite(t=_(t))?x(t+g):this.getAttribute("transform")}),H.attr("opacity",n).attr("transform",function(t){var n=this.parentNode.__axis;return x((n&&isFinite(n=n(t))?n:_(t))+g)})),z.remove(),V.attr("d",4===u||2===u?m?"M"+p*m+","+v+"H"+g+"V"+w+"H"+p*m:"M"+g+","+v+"V"+w:m?"M"+v+","+p*m+"V"+g+"H"+w+"V"+p*m:"M"+v+","+g+"H"+w),b.attr("opacity",1).attr("transform",function(t){return x(_(t)+g)}),C.attr(k+"2",p*d),S.attr(k,p*A).text(y),F.filter(o).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===u?"start":4===u?"end":"middle"),F.each(function(){this.__axis=_})}return y.scale=function(t){return arguments.length?(c=t,y):c},y.ticks=function(){return l=Array.from(arguments),y},y.tickArguments=function(t){return arguments.length?(l=null==t?[]:Array.from(t),y):l.slice()},y.tickValues=function(t){return arguments.length?(s=null==t?null:Array.from(t),y):s&&s.slice()},y.tickFormat=function(t){return arguments.length?(f=t,y):f},y.tickSize=function(t){return arguments.length?(d=m=+t,y):d},y.tickSizeInner=function(t){return arguments.length?(d=+t,y):d},y.tickSizeOuter=function(t){return arguments.length?(m=+t,y):m},y.tickPadding=function(t){return arguments.length?(h=+t,y):h},y.offset=function(t){return arguments.length?(g=+t,y):g},y}function c(t){return u(1,t)}function l(t){return u(3,t)}export{l as a,c as b};
|
.output/public/assets/d3-brush-nFNI3W3g.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import"./d3-transition-B7gMhpAH.js";
|
.output/public/assets/d3-color-rIUEC1ZR.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function t(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function e(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function r(){}var i=.7,n=1/i,a="\\s*([+-]?\\d+)\\s*",s="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",h="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",o=/^#([0-9a-f]{3,8})$/,l=new RegExp(`^rgb\\(${a},${a},${a}\\)$`),u=new RegExp(`^rgb\\(${h},${h},${h}\\)$`),c=new RegExp(`^rgba\\(${a},${a},${a},${s}\\)$`),g=new RegExp(`^rgba\\(${h},${h},${h},${s}\\)$`),p=new RegExp(`^hsl\\(${s},${h},${h}\\)$`),b=new RegExp(`^hsla\\(${s},${h},${h},${s}\\)$`),d={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function f(){return this.rgb().formatHex()}function y(){return this.rgb().formatRgb()}function w(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=o.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?m(e):3===r?new x(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?$(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?$(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=l.exec(t))?new x(e[1],e[2],e[3],1):(e=u.exec(t))?new x(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=c.exec(t))?$(e[1],e[2],e[3],e[4]):(e=g.exec(t))?$(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=p.exec(t))?E(e[1],e[2]/100,e[3]/100,1):(e=b.exec(t))?E(e[1],e[2]/100,e[3]/100,e[4]):d.hasOwnProperty(t)?m(d[t]):"transparent"===t?new x(NaN,NaN,NaN,0):null}function m(t){return new x(t>>16&255,t>>8&255,255&t,1)}function $(t,e,r,i){return i<=0&&(t=e=r=NaN),new x(t,e,r,i)}function k(t){return t instanceof r||(t=w(t)),t?new x((t=t.rgb()).r,t.g,t.b,t.opacity):new x}function N(t,e,r,i){return 1===arguments.length?k(t):new x(t,e,r,null==i?1:i)}function x(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function v(){return`#${R(this.r)}${R(this.g)}${R(this.b)}`}function M(){const t=q(this.opacity);return`${1===t?"rgb(":"rgba("}${H(this.r)}, ${H(this.g)}, ${H(this.b)}${1===t?")":`, ${t})`}`}function q(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function H(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function R(t){return((t=H(t))<16?"0":"")+t.toString(16)}function E(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new I(t,e,r,i)}function j(t){if(t instanceof I)return new I(t.h,t.s,t.l,t.opacity);if(t instanceof r||(t=w(t)),!t)return new I;if(t instanceof I)return t;var e=(t=t.rgb()).r/255,i=t.g/255,n=t.b/255,a=Math.min(e,i,n),s=Math.max(e,i,n),h=NaN,o=s-a,l=(s+a)/2;return o?(h=e===s?(i-n)/o+6*(i<n):i===s?(n-e)/o+2:(e-i)/o+4,o/=l<.5?s+a:2-s-a,h*=60):o=l>0&&l<1?0:h,new I(h,o,l,t.opacity)}function I(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function O(t){return(t=(t||0)%360)<0?t+360:t}function P(t){return Math.max(0,Math.min(1,t||0))}function S(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}t(r,w,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:f,
|
2 |
+
// Deprecated! Use color.formatHex.
|
3 |
+
formatHex:f,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return j(this).formatHsl()},formatRgb:y,toString:y}),t(x,N,e(r,{brighter(t){return t=null==t?n:Math.pow(n,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?i:Math.pow(i,t),new x(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new x(H(this.r),H(this.g),H(this.b),q(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:v,
|
4 |
+
// Deprecated! Use color.formatHex.
|
5 |
+
formatHex:v,formatHex8:function(){return`#${R(this.r)}${R(this.g)}${R(this.b)}${R(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:M,toString:M})),t(I,function(t,e,r,i){return 1===arguments.length?j(t):new I(t,e,r,null==i?1:i)},e(r,{brighter(t){return t=null==t?n:Math.pow(n,t),new I(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?i:Math.pow(i,t),new I(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new x(S(t>=240?t-240:t+120,n,i),S(t,n,i),S(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new I(O(this.h),P(this.s),P(this.l),q(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=q(this.opacity);return`${1===t?"hsl(":"hsla("}${O(this.h)}, ${100*P(this.s)}%, ${100*P(this.l)}%${1===t?")":`, ${t})`}`}}));const z=Math.PI/180,C=180/Math.PI,L=.96422,A=.82521,B=4/29,D=6/29,F=3*D*D,G=D*D*D;function J(t){if(t instanceof K)return new K(t.l,t.a,t.b,t.opacity);if(t instanceof X)return Y(t);t instanceof x||(t=k(t));var e,r,i=V(t.r),n=V(t.g),a=V(t.b),s=Q((.2225045*i+.7168786*n+.0606169*a)/1);return i===n&&n===a?e=r=s:(e=Q((.4360747*i+.3850649*n+.1430804*a)/L),r=Q((.0139322*i+.0971045*n+.7141733*a)/A)),new K(116*s-16,500*(e-s),200*(s-r),t.opacity)}function K(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}function Q(t){return t>G?Math.pow(t,1/3):t/F+B}function T(t){return t>D?t*t*t:F*(t-B)}function U(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function V(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function W(t,e,r,i){return 1===arguments.length?function(t){if(t instanceof X)return new X(t.h,t.c,t.l,t.opacity);if(t instanceof K||(t=J(t)),0===t.a&&0===t.b)return new X(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*C;return new X(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new X(t,e,r,null==i?1:i)}function X(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function Y(t){if(isNaN(t.h))return new K(t.l,0,0,t.opacity);var e=t.h*z;return new K(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t(K,function(t,e,r,i){return 1===arguments.length?J(t):new K(t,e,r,null==i?1:i)},e(r,{brighter(t){return new K(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new K(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new x(U(3.1338561*(e=L*T(e))-1.6168667*(t=1*T(t))-.4906146*(r=A*T(r))),U(-.9787684*e+1.9161415*t+.033454*r),U(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),t(X,W,e(r,{brighter(t){return new X(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new X(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return Y(this).rgb()}}));export{w as c,W as h,N as r};
|
.output/public/assets/d3-dispatch-Q6TpkW-B.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
var n={value:()=>{}};function r(){for(var n,r=0,e=arguments.length,o={};r<e;++r){if(!(n=arguments[r]+"")||n in o||/[\s.]/.test(n))throw new Error("illegal type: "+n);o[n]=[]}return new t(o)}function t(n){this._=n}function e(n,r){for(var t,e=0,o=n.length;e<o;++e)if((t=n[e]).name===r)return t.value}function o(r,t,e){for(var o=0,i=r.length;o<i;++o)if(r[o].name===t){r[o]=n,r=r.slice(0,o).concat(r.slice(o+1));break}return null!=e&&r.push({name:t,value:e}),r}t.prototype=r.prototype={constructor:t,on:function(n,r){var t,i,l=this._,a=(i=l,(n+"").trim().split(/^|\s+/).map(function(n){var r="",t=n.indexOf(".");if(t>=0&&(r=n.slice(t+1),n=n.slice(0,t)),n&&!i.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})),f=-1,u=a.length;if(!(arguments.length<2)){if(null!=r&&"function"!=typeof r)throw new Error("invalid callback: "+r);for(;++f<u;)if(t=(n=a[f]).type)l[t]=o(l[t],n.name,r);else if(null==r)for(t in l)l[t]=o(l[t],n.name,null);return this}for(;++f<u;)if((t=(n=a[f]).type)&&(t=e(l[t],n.name)))return t},copy:function(){var n={},r=this._;for(var e in r)n[e]=r[e].slice();return new t(n)},call:function(n,r){if((t=arguments.length-2)>0)for(var t,e,o=new Array(t),i=0;i<t;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(i=0,t=(e=this._[n]).length;i<t;++i)e[i].value.apply(r,o)},apply:function(n,r,t){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var e=this._[n],o=0,i=e.length;o<i;++o)e[o].value.apply(r,t)}};export{r as d};
|
.output/public/assets/d3-format-CtKB2kpq.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
function t(t,i){if((n=(t=i?t.toExponential(i-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function i(i){return(i=t(Math.abs(i)))?i[1]:NaN}var n,r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function e(t){if(!(i=r.exec(t)))throw new Error("invalid format: "+t);var i;return new a({fill:i[1],align:i[2],sign:i[3],symbol:i[4],zero:i[5],width:i[6],comma:i[7],precision:i[8]&&i[8].slice(1),trim:i[9],type:i[10]})}function a(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function o(i,n){var r=t(i,n);if(!r)return i+"";var e=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+e:e.length>a+1?e.slice(0,a+1)+"."+e.slice(a+1):e+new Array(a-e.length+2).join("0")}e.prototype=a.prototype,a.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const s={"%":(t,i)=>(100*t).toFixed(i),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,i)=>t.toExponential(i),f:(t,i)=>t.toFixed(i),g:(t,i)=>t.toPrecision(i),o:t=>Math.round(t).toString(8),p:(t,i)=>o(100*t,i),r:o,s:function(i,r){var e=t(i,r);if(!e)return i+"";var a=e[0],o=e[1],s=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,h=a.length;return s===h?a:s>h?a+new Array(s-h+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+new Array(1-s).join("0")+t(i,Math.max(0,r+s-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function h(t){return t}var c,l,u,f=Array.prototype.map,m=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function d(t){var r,a,o=void 0===t.grouping||void 0===t.thousands?h:(r=f.call(t.grouping,Number),a=t.thousands+"",function(t,i){for(var n=t.length,e=[],o=0,s=r[0],h=0;n>0&&s>0&&(h+s+1>i&&(s=Math.max(1,i-h)),e.push(t.substring(n-=s,n+s)),!((h+=s+1)>i));)s=r[o=(o+1)%r.length];return e.reverse().join(a)}),c=void 0===t.currency?"":t.currency[0]+"",l=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",d=void 0===t.numerals?h:function(t){return function(i){return i.replace(/[0-9]/g,function(i){return t[+i]})}}(f.call(t.numerals,String)),g=void 0===t.percent?"%":t.percent+"",p=void 0===t.minus?"−":t.minus+"",v=void 0===t.nan?"NaN":t.nan+"";function M(t){var i=(t=e(t)).fill,r=t.align,a=t.sign,h=t.symbol,f=t.zero,M=t.width,y=t.comma,b=t.precision,x=t.trim,w=t.type;"n"===w?(y=!0,w="g"):s[w]||(void 0===b&&(b=12),x=!0,w="g"),(f||"0"===i&&"="===r)&&(f=!0,i="0",r="=");var S="$"===h?c:"#"===h&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k="$"===h?l:/[%p]/.test(w)?g:"",z=s[w],A=/[defgprs%]/.test(w);function N(t){var e,s,h,c=S,l=k;if("c"===w)l=z(t)+l,t="";else{var g=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:z(Math.abs(t),b),x&&(t=function(t){t:for(var i,n=t.length,r=1,e=-1;r<n;++r)switch(t[r]){case".":e=i=r;break;case"0":0===e&&(e=r),i=r;break;default:if(!+t[r])break t;e>0&&(e=0)}return e>0?t.slice(0,e)+t.slice(i+1):t}(t)),g&&0===+t&&"+"!==a&&(g=!1),c=(g?"("===a?a:p:"-"===a||"("===a?"":a)+c,l=("s"===w?m[8+n/3]:"")+l+(g&&"("===a?")":""),A)for(e=-1,s=t.length;++e<s;)if(48>(h=t.charCodeAt(e))||h>57){l=(46===h?u+t.slice(e+1):t.slice(e))+l,t=t.slice(0,e);break}}y&&!f&&(t=o(t,1/0));var N=c.length+t.length+l.length,j=N<M?new Array(M-N+1).join(i):"";switch(y&&f&&(t=o(j+t,j.length?M-l.length:1/0),j=""),r){case"<":t=c+t+l+j;break;case"=":t=c+j+t+l;break;case"^":t=j.slice(0,N=j.length>>1)+c+t+l+j.slice(N);break;default:t=j+c+t+l}return d(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),N.toString=function(){return t+""},N}return{format:M,formatPrefix:function(t,n){var r=M(((t=e(t)).type="f",t)),a=3*Math.max(-8,Math.min(8,Math.floor(i(n)/3))),o=Math.pow(10,-a),s=m[8+a/3];return function(t){return r(o*t)+s}}}}function g(t){return Math.max(0,-i(Math.abs(t)))}function p(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(i(n)/3)))-i(Math.abs(t)))}function v(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,i(n)-i(t))+1}c=d({thousands:",",grouping:[3],currency:["$",""]}),l=c.format,u=c.formatPrefix;export{v as a,p as b,u as c,l as d,e as f,g as p};
|
.output/public/assets/d3-interpolate-DP-dmwpU.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{r as n,c as t,h as r}from"./d3-color-rIUEC1ZR.js";const e=n=>()=>n;function a(n,t){return function(r){return n+r*t}}function u(n){return 1===(n=+n)?o:function(t,r){return r-t?function(n,t,r){return n=Math.pow(n,r),t=Math.pow(t,r)-n,r=1/r,function(e){return Math.pow(n+e*t,r)}}(t,r,n):e(isNaN(t)?r:t)}}function o(n,t){var r=t-n;return r?a(n,r):e(isNaN(n)?t:n)}const i=function t(r){var e=u(r);function a(t,r){var a=e((t=n(t)).r,(r=n(r)).r),u=e(t.g,r.g),i=e(t.b,r.b),c=o(t.opacity,r.opacity);return function(n){return t.r=a(n),t.g=u(n),t.b=i(n),t.opacity=c(n),t+""}}return a.gamma=t,a}(1);function c(n,t){t||(t=[]);var r,e=n?Math.min(t.length,n.length):0,a=t.slice();return function(u){for(r=0;r<e;++r)a[r]=n[r]*(1-u)+t[r]*u;return a}}function s(n,t){var r,e=t?t.length:0,a=n?Math.min(e,n.length):0,u=new Array(a),o=new Array(e);for(r=0;r<a;++r)u[r]=v(n[r],t[r]);for(;r<e;++r)o[r]=t[r];return function(n){for(r=0;r<a;++r)o[r]=u[r](n);return o}}function f(n,t){var r=new Date;return n=+n,t=+t,function(e){return r.setTime(n*(1-e)+t*e),r}}function l(n,t){return n=+n,t=+t,function(r){return n*(1-r)+t*r}}function h(n,t){var r,e={},a={};for(r in null!==n&&"object"==typeof n||(n={}),null!==t&&"object"==typeof t||(t={}),t)r in n?e[r]=v(n[r],t[r]):a[r]=t[r];return function(n){for(r in e)a[r]=e[r](n);return a}}var p=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,x=new RegExp(p.source,"g");function g(n,t){var r,e,a,u=p.lastIndex=x.lastIndex=0,o=-1,i=[],c=[];for(n+="",t+="";(r=p.exec(n))&&(e=x.exec(t));)(a=e.index)>u&&(a=t.slice(u,a),i[o]?i[o]+=a:i[++o]=a),(r=r[0])===(e=e[0])?i[o]?i[o]+=e:i[++o]=e:(i[++o]=null,c.push({i:o,x:l(r,e)})),u=x.lastIndex;return u<t.length&&(a=t.slice(u),i[o]?i[o]+=a:i[++o]=a),i.length<2?c[0]?function(n){return function(t){return n(t)+""}}(c[0].x):function(n){return function(){return n}}(t):(t=c.length,function(n){for(var r,e=0;e<t;++e)i[(r=c[e]).i]=r.x(n);return i.join("")})}function v(n,r){var a,u,o=typeof r;return null==r||"boolean"===o?e(r):("number"===o?l:"string"===o?(a=t(r))?(r=a,i):g:r instanceof t?i:r instanceof Date?f:(u=r,!ArrayBuffer.isView(u)||u instanceof DataView?Array.isArray(r)?s:"function"!=typeof r.valueOf&&"function"!=typeof r.toString||isNaN(r)?h:l:c))(n,r)}function w(n,t){return n=+n,t=+t,function(r){return Math.round(n*(1-r)+t*r)}}var d,y=180/Math.PI,M={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function X(n,t,r,e,a,u){var o,i,c;return(o=Math.sqrt(n*n+t*t))&&(n/=o,t/=o),(c=n*r+t*e)&&(r-=n*c,e-=t*c),(i=Math.sqrt(r*r+e*e))&&(r/=i,e/=i,c/=i),n*e<t*r&&(n=-n,t=-t,c=-c,o=-o),{translateX:a,translateY:u,rotate:Math.atan2(t,n)*y,skewX:Math.atan(c)*y,scaleX:o,scaleY:i}}function b(n,t,r,e){function a(n){return n.length?n.pop()+" ":""}return function(u,o){var i=[],c=[];return u=n(u),o=n(o),function(n,e,a,u,o,i){if(n!==a||e!==u){var c=o.push("translate(",null,t,null,r);i.push({i:c-4,x:l(n,a)},{i:c-2,x:l(e,u)})}else(a||u)&&o.push("translate("+a+t+u+r)}(u.translateX,u.translateY,o.translateX,o.translateY,i,c),function(n,t,r,u){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),u.push({i:r.push(a(r)+"rotate(",null,e)-2,x:l(n,t)})):t&&r.push(a(r)+"rotate("+t+e)}(u.rotate,o.rotate,i,c),function(n,t,r,u){n!==t?u.push({i:r.push(a(r)+"skewX(",null,e)-2,x:l(n,t)}):t&&r.push(a(r)+"skewX("+t+e)}(u.skewX,o.skewX,i,c),function(n,t,r,e,u,o){if(n!==r||t!==e){var i=u.push(a(u)+"scale(",null,",",null,")");o.push({i:i-4,x:l(n,r)},{i:i-2,x:l(t,e)})}else 1===r&&1===e||u.push(a(u)+"scale("+r+","+e+")")}(u.scaleX,u.scaleY,o.scaleX,o.scaleY,i,c),u=o=null,function(n){for(var t,r=-1,e=c.length;++r<e;)i[(t=c[r]).i]=t.x(n);return i.join("")}}}var m=b(function(n){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(n+"");return t.isIdentity?M:X(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),N=b(function(n){return null==n?M:(d||(d=document.createElementNS("http://www.w3.org/2000/svg","g")),d.setAttribute("transform",n),(n=d.transform.baseVal.consolidate())?X((n=n.matrix).a,n.b,n.c,n.d,n.e,n.f):M)},", ",")",")");const Y=(k=function(n,t){var r=t-n;return r?a(n,r>180||r<-180?r-360*Math.round(r/360):r):e(isNaN(n)?t:n)},function(n,t){var e=k((n=r(n)).h,(t=r(t)).h),a=o(n.c,t.c),u=o(n.l,t.l),i=o(n.opacity,t.opacity);return function(t){return n.h=e(t),n.c=a(t),n.l=u(t),n.opacity=i(t),n+""}});var k;export{v as a,w as b,i as c,g as d,N as e,m as f,Y as g,l as i};
|
.output/public/assets/d3-sankey-BFhHcGrm.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-DWiW64kU.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-Dy1FNIg7.js";import{f as i,p as o,a as c,b as f,c as s,d as l}from"./d3-format-CtKB2kpq.js";import{i as h,a as m,b as p}from"./d3-interpolate-DP-dmwpU.js";import{t as g}from"./d3-time-format-BMc3Utpi.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-BRbAhEAC.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 O(n){return+n}var R=[0,1];function B(n){return n}function F(n,r){return(r-=n=+n)?function(t){return(t-n)/r}:(t=isNaN(r)?NaN:.5,function(){return t});var t}function S(n,r,t){var e=n[0],a=n[1],u=r[0],i=r[1];return a<e?(e=F(a,e),u=t(i,u)):(e=F(e,a),u=t(u,i)),function(n){return u(e(n))}}function Y(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]=F(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 Z(){var n,r,t,e,a,u,i=R,o=R,c=m,f=B;function s(){var n,r,t,c=Math.min(i.length,o.length);return f!==B&&(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?Y:S,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,O),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||B,s()):f!==B},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 _(){return Z()(B,B)}function q(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 z(){var n=_();return n.copy=function(){return L(n,z())},j.apply(n,arguments),q(n)}function C(n){return new Date(n)}function E(n){return n instanceof Date?+n:+new Date(+n)}function G(n,r,t,e,a,u,i,o,c,f){var s=_(),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,E)):h().map(C)},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,G(n,r,t,e,a,u,i,o,c,f))},s}function H(){return j.apply(G(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,z as l,D as o,H as t};
|
.output/public/assets/d3-selection-CfLXJeJu.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-zSUJvKTl.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-BRbAhEAC.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import{d as e,t}from"./d3-array-Dy1FNIg7.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 B=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());B.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,B.range;const[A,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,A as g,h,m as i,B 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-BMc3Utpi.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-BRbAhEAC.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 _(n,e){return $(n,e)+"000"}function k(n,e){return M(n.getMonth()+1,e,2)}function z(n,e){return M(n.getMinutes(),e,2)}function E(n,e){return M(n.getSeconds(),e,2)}function R(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:_,g:cn,G:an,H:O,I:P,j:N,L:$,m:k,M:z,p:function(n){return a[+(n.getHours()>=12)]},q:function(n){return 1+~~(n.getMonth()/3)},Q:Yn,s:Zn,S:E,u:R,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-timer-CJv_AqWU.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
var t,n,e=0,o=0,i=0,r=0,a=0,l=0,c="object"==typeof performance&&performance.now?performance:Date,u="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function s(){return a||(u(f),a=c.now()+l)}function f(){a=0}function _(){this._call=this._time=this._next=null}function w(t,n,e){var o=new _;return o.restart(t,n,e),o}function m(){a=(r=c.now())+l,e=o=0;try{!function(){s(),++e;for(var n,o=t;o;)(n=a-o._time)>=0&&o._call.call(void 0,n),o=o._next;--e}()}finally{e=0,function(){var e,o,i=t,r=1/0;for(;i;)i._call?(r>i._time&&(r=i._time),e=i,i=i._next):(o=i._next,i._next=null,i=e?e._next=o:t=o);n=e,p(r)}(),a=0}}function h(){var t=c.now(),n=t-r;n>1e3&&(l-=n,r=t)}function p(t){e||(o&&(o=clearTimeout(o)),t-a>24?(t<1/0&&(o=setTimeout(m,t-c.now()-l)),i&&(i=clearInterval(i))):(i||(r=c.now(),i=setInterval(h,1e3)),e=1,u(m)))}function v(t,n,e){var o=new _;return n=null==n?0:+n,o.restart(e=>{o.stop(),t(e+n)},n,e),o}_.prototype=w.prototype={constructor:_,restart:function(e,o,i){if("function"!=typeof e)throw new TypeError("callback is not a function");i=(null==i?s():+i)+(null==o?0:+o),this._next||n===this||(n?n._next=this:t=this,n=this),this._call=e,this._time=i,p()},stop:function(){this._call&&(this._call=null,this._time=1/0,p())}};export{v as a,s as n,w as t};
|
.output/public/assets/d3-transition-B7gMhpAH.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import{t,a as n,n as e}from"./d3-timer-CJv_AqWU.js";import{d as r}from"./d3-dispatch-Q6TpkW-B.js";import{i,c as o,d as a,e as u,f as s}from"./d3-interpolate-DP-dmwpU.js";import{c as l}from"./d3-color-rIUEC1ZR.js";import{n as f,m as c,s as h,a as _,b as v,c as d}from"./d3-selection-CfLXJeJu.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 F(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 I(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 L(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 R(t,n){return n=+n,function(){A(this,t).duration=n}}var V=v.prototype.constructor;function $(t){return function(){this.style.removeProperty(t)}}var q=0;function B(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function D(){return++q}var G=v.prototype;B.prototype={constructor:B,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 B(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 B(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 B(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 B(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=D(),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 B(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?F:I)(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,$(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=$(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?L:M)(n,t)):b(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?O:R)(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 H={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 B?(n=t._id,t=t._name):(n=D(),(r=H).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 B(i,this._parents,t,n)};
|
.output/public/assets/d3-zoom-BJNDRQ4C.js
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
import"./d3-transition-B7gMhpAH.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-D6GBqVHj.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-Cacf3aVv.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/dayjs-BlFCBw8z.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
import{g as t}from"./@babel-Cvfd6jjG.js";var e,r={exports:{}};var n=(e||(e=1,r.exports=function(){var t=1e3,e=6e4,r=36e5,n="millisecond",s="second",i="minute",a="hour",u="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},v=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},y={s:v,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),s=r%60;return(e<=0?"+":"-")+v(n,2,"0")+":"+v(s,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var n=12*(r.year()-e.year())+(r.month()-e.month()),s=e.clone().add(n,c),i=r-s<0,a=e.clone().add(n+(i?-1:1),c);return+(-(n+(r-s)/(i?s-a:a-s))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:u,D:d,h:a,m:i,s:s,ms:n,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",p={};p[D]=M;var g="$isDayjsObject",w=function(t){return t instanceof O||!(!t||!t[g])},Y=function t(e,r,n){var s;if(!e)return D;if("string"==typeof e){var i=e.toLowerCase();p[i]&&(s=i),r&&(p[i]=r,s=i);var a=e.split("-");if(!s&&a.length>1)return t(a[0])}else{var u=e.name;p[u]=e,s=u}return!n&&s&&(D=s),s||!n&&D},S=function(t,e){if(w(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new O(r)},k=y;k.l=Y,k.i=w,k.w=function(t,e){return S(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var O=function(){function M(t){this.$L=Y(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[g]=!0}var v=M.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(k.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match($);if(n){var s=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(e)}(t),this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return k},v.isValid=function(){return!(this.$d.toString()===l)},v.isSame=function(t,e){var r=S(t);return this.startOf(e)<=r&&r<=this.endOf(e)},v.isAfter=function(t,e){return S(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<S(t)},v.$g=function(t,e,r){return k.u(t)?this[e]:this.set(r,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var r=this,n=!!k.u(e)||e,f=k.p(t),l=function(t,e){var s=k.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return n?s:s.endOf(u)},$=function(t,e){return k.w(r.toDate()[t].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},m=this.$W,M=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(f){case h:return n?l(1,0):l(31,11);case c:return n?l(1,M):l(0,M+1);case o:var D=this.$locale().weekStart||0,p=(m<D?m+7:m)-D;return l(n?v-p:v+(6-p),M);case u:case d:return $(y+"Hours",0);case a:return $(y+"Minutes",1);case i:return $(y+"Seconds",2);case s:return $(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var r,o=k.p(t),f="set"+(this.$u?"UTC":""),l=(r={},r[u]=f+"Date",r[d]=f+"Date",r[c]=f+"Month",r[h]=f+"FullYear",r[a]=f+"Hours",r[i]=f+"Minutes",r[s]=f+"Seconds",r[n]=f+"Milliseconds",r)[o],$=o===u?this.$D+(e-this.$W):e;if(o===c||o===h){var m=this.clone().set(d,1);m.$d[l]($),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[k.p(t)]()},v.add=function(n,f){var d,l=this;n=Number(n);var $=k.p(f),m=function(t){var e=S(l);return k.w(e.date(e.date()+Math.round(t*n)),l)};if($===c)return this.set(c,this.$M+n);if($===h)return this.set(h,this.$y+n);if($===u)return m(1);if($===o)return m(7);var M=(d={},d[i]=e,d[a]=r,d[s]=t,d)[$]||1,v=this.$d.getTime()+n*M;return k.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||l;var n=t||"YYYY-MM-DDTHH:mm:ssZ",s=k.z(this),i=this.$H,a=this.$m,u=this.$M,o=r.weekdays,c=r.months,f=r.meridiem,h=function(t,r,s,i){return t&&(t[r]||t(e,n))||s[r].slice(0,i)},d=function(t){return k.s(i%12||12,t,"0")},$=f||function(t,e,r){var n=t<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(m,function(t,n){return n||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return k.s(e.$y,4,"0");case"M":return u+1;case"MM":return k.s(u+1,2,"0");case"MMM":return h(r.monthsShort,u,c,3);case"MMMM":return h(c,u);case"D":return e.$D;case"DD":return k.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(r.weekdaysMin,e.$W,o,2);case"ddd":return h(r.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(i);case"HH":return k.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(i,a,!0);case"A":return $(i,a,!1);case"m":return String(a);case"mm":return k.s(a,2,"0");case"s":return String(e.$s);case"ss":return k.s(e.$s,2,"0");case"SSS":return k.s(e.$ms,3,"0");case"Z":return s}return null}(t)||s.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,d,l){var $,m=this,M=k.p(d),v=S(n),y=(v.utcOffset()-this.utcOffset())*e,D=this-v,p=function(){return k.m(m,v)};switch(M){case h:$=p()/12;break;case c:$=p();break;case f:$=p()/3;break;case o:$=(D-y)/6048e5;break;case u:$=(D-y)/864e5;break;case a:$=D/r;break;case i:$=D/e;break;case s:$=D/t;break;default:$=D}return l?$:k.a($)},v.daysInMonth=function(){return this.endOf(c).$D},v.$locale=function(){return p[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),n=Y(t,e,!0);return n&&(r.$L=n),r},v.clone=function(){return k.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},M}(),x=O.prototype;return S.prototype=x,[["$ms",n],["$s",s],["$m",i],["$H",a],["$W",u],["$M",c],["$y",h],["$D",d]].forEach(function(t){x[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),S.extend=function(t,e){return t.$i||(t(e,O,S),t.$i=!0),S},S.locale=Y,S.isDayjs=w,S.unix=function(t){return S(1e3*t)},S.en=p[D],S.Ls=p,S.p={},S}()),r.exports);const s=t(n);var i,a,u={exports:{}};const o=t(i?u.exports:(i=1,u.exports=(a="day",function(t,e,r){var n=function(t){return t.add(4-t.isoWeekday(),a)},s=e.prototype;s.isoWeekYear=function(){return n(this).year()},s.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),a);var e,s,i,u=n(this),o=(e=this.isoWeekYear(),i=4-(s=(this.$u?r.utc:r)().year(e).startOf("year")).isoWeekday(),s.isoWeekday()>4&&(i+=7),s.add(i,a));return u.diff(o,"week")+1},s.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var i=s.startOf;s.startOf=function(t,e){var r=this.$utils(),n=!!r.u(e)||e;return"isoweek"===r.p(t)?n?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):i.bind(this)(t,e)}})));var c,f={exports:{}};var h=(c||(c=1,f.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,s=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},u=function(t){return(t=+t)+(t>68?1900:2e3)},o=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),r=60*e[1]+(+e[2]||0);return 0===r?0:"+"===e[0]?-r:r}(t)}],f=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var r,n=a.meridiem;if(n){for(var s=1;s<=24;s+=1)if(t.indexOf(n(s,0,e))>-1){r=s>12;break}}else r=t===(e?"pm":"PM");return r},d={A:[i,function(t){this.afternoon=h(t,!1)}],a:[i,function(t){this.afternoon=h(t,!0)}],Q:[r,function(t){this.month=3*(t-1)+1}],S:[r,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[s,o("seconds")],ss:[s,o("seconds")],m:[s,o("minutes")],mm:[s,o("minutes")],H:[s,o("hours")],h:[s,o("hours")],HH:[s,o("hours")],hh:[s,o("hours")],D:[s,o("day")],DD:[n,o("day")],Do:[i,function(t){var e=a.ordinal,r=t.match(/\d+/);if(this.day=r[0],e)for(var n=1;n<=31;n+=1)e(n).replace(/\[|\]/g,"")===t&&(this.day=n)}],w:[s,o("week")],ww:[n,o("week")],M:[s,o("month")],MM:[n,o("month")],MMM:[i,function(t){var e=f("months"),r=(f("monthsShort")||e.map(function(t){return t.slice(0,3)})).indexOf(t)+1;if(r<1)throw new Error;this.month=r%12||r}],MMMM:[i,function(t){var e=f("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,o("year")],YY:[n,function(t){this.year=u(t)}],YYYY:[/\d{4}/,o("year")],Z:c,ZZ:c};function l(r){var n,s;n=r,s=a&&a.formats;for(var i=(r=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,r,n){var i=n&&n.toUpperCase();return r||s[n]||t[n]||s[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,r){return e||r.slice(1)})})).match(e),u=i.length,o=0;o<u;o+=1){var c=i[o],f=d[c],h=f&&f[0],l=f&&f[1];i[o]=l?{regex:h,parser:l}:c.replace(/^\[|\]$/g,"")}return function(t){for(var e={},r=0,n=0;r<u;r+=1){var s=i[r];if("string"==typeof s)n+=s.length;else{var a=s.regex,o=s.parser,c=t.slice(n),f=a.exec(c)[0];o.call(e,f),t=t.replace(f,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var r=t.hours;e?r<12&&(t.hours+=12):12===r&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,r){r.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(u=t.parseTwoDigitYear);var n=e.prototype,s=n.parse;n.parse=function(t){var e=t.date,n=t.utc,i=t.args;this.$u=n;var u=i[1];if("string"==typeof u){var o=!0===i[2],c=!0===i[3],f=o||c,h=i[2];c&&(h=i[2]),a=this.$locale(),!o&&h&&(a=r.Ls[h]),this.$d=function(t,e,r,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var s=l(e)(t),i=s.year,a=s.month,u=s.day,o=s.hours,c=s.minutes,f=s.seconds,h=s.milliseconds,d=s.zone,$=s.week,m=new Date,M=u||(i||a?1:m.getDate()),v=i||m.getFullYear(),y=0;i&&!a||(y=a>0?a-1:m.getMonth());var D,p=o||0,g=c||0,w=f||0,Y=h||0;return d?new Date(Date.UTC(v,y,M,p,g,w,Y+60*d.offset*1e3)):r?new Date(Date.UTC(v,y,M,p,g,w,Y)):(D=new Date(v,y,M,p,g,w,Y),$&&(D=n(D).week($).toDate()),D)}catch(S){
|
2 |
+
return new Date("")}}(e,u,n,r),this.init(),h&&!0!==h&&(this.$L=this.locale(h).$L),f&&e!=this.format(u)&&(this.$d=new Date("")),a={}}else if(u instanceof Array)for(var d=u.length,$=1;$<=d;$+=1){i[1]=u[$-1];var m=r.apply(this,i);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}$===d&&(this.$d=new Date(""))}else s.call(this,t)}}}()),f.exports);const d=t(h);var l,$={exports:{}};const m=t(l?$.exports:(l=1,$.exports=function(t,e){var r=e.prototype,n=r.format;r.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return n.bind(this)(t);var s=this.$utils(),i=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return r.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return r.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}});return n.bind(this)(i)}}));export{o as a,d as b,m as c,s as d};
|