lookatstudy-mobile 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.cjs +410 -309
- package/web/assets/Tableau10-Cz3F1amA.js +1 -0
- package/web/assets/_commonjs-dynamic-modules-TDtrdbi3.js +1 -0
- package/web/assets/abnfDiagram-N423BO3Z-BqeMquUh.js +1 -0
- package/web/assets/abnfDiagram-VCTEODGH-ODA7YWAP-BuesB7xR.js +1 -0
- package/web/assets/api-web-DeJFZI02.js +1 -0
- package/web/assets/arc-Bb-hQPAI.js +1 -0
- package/web/assets/architectureDiagram-5GKGNRK7-C4PU3XN7-0sZWP2Gt.js +36 -0
- package/web/assets/{architectureDiagram-T3A2C74G-djSyr1mz.js → architectureDiagram-T3A2C74G-BUX7eVzV.js} +3 -3
- package/web/assets/band-dPffDWoQ.js +1 -0
- package/web/assets/blockDiagram-NRAW4CY4-UMJ6PMQQ-DMEi53vA.js +129 -0
- package/web/assets/{blockDiagram-VBNYF7ZC-CMyKXBrP.js → blockDiagram-VBNYF7ZC-CquWGiud.js} +4 -4
- package/web/assets/c-BIGW1oBm.js +1 -0
- package/web/assets/{c4Diagram-5PPSVZJV-BIkHBEIX.js → c4Diagram-5PPSVZJV-DwhWxb7s.js} +2 -2
- package/web/assets/c4Diagram-UCG6FXSJ-75X3U2P3-Cw6KuLDN.js +38 -0
- package/web/assets/channel-BTMwuCXz.js +1 -0
- package/web/assets/chunk-2GRJ4B5K-CzGtEVrd.js +1 -0
- package/web/assets/{chunk-2Q5K7J3B-5KwfG7mC.js → chunk-2Q5K7J3B-svQDV2bG.js} +1 -1
- package/web/assets/{chunk-5RXB4S5H-BfjkbTOR.js → chunk-5RXB4S5H-CkBumCja.js} +3 -3
- package/web/assets/{chunk-5VM5RSS4-CknJ0UrM.js → chunk-5VM5RSS4-DmqVK3OP.js} +1 -1
- package/web/assets/{chunk-6Q2QTUOP-PEKlwd8q.js → chunk-6Q2QTUOP-j-yShG78.js} +3 -3
- package/web/assets/chunk-7XDTSPCN-BF54U_Qe.js +338 -0
- package/web/assets/chunk-CTNIYPP6-BLGT5nzg.js +1 -0
- package/web/assets/chunk-CXNFBKHE-CHtCVUVZ.js +15 -0
- package/web/assets/{chunk-GF5L2VYU-FwREiZq-.js → chunk-GF5L2VYU-HY4EUgWS.js} +4 -4
- package/web/assets/chunk-ISA7TJRJ-AUc9mrxX.js +1 -0
- package/web/assets/{chunk-JWPE2WC7-Df8WvQEt.js → chunk-JWPE2WC7-DmzvUH3q.js} +1 -1
- package/web/assets/chunk-KBJHAD2P-C3HnMhHX.js +1 -0
- package/web/assets/chunk-LV3HUYFY-D3kDosNp.js +1 -0
- package/web/assets/chunk-M3IUQBOH-CMBqYbjd.js +231 -0
- package/web/assets/chunk-NDIOYS4C-D4XcxlS5.js +1 -0
- package/web/assets/chunk-RE4WF27V-ANjTafEs.js +1 -0
- package/web/assets/{chunk-RYQCIY6F-w-ex678p.js → chunk-RYQCIY6F-CV9wg8xs.js} +1 -1
- package/web/assets/chunk-VII2H2IX-DK2MWM1y.js +1 -0
- package/web/assets/chunk-X5GNSKZ3-YRz76YFi.js +206 -0
- package/web/assets/chunk-XCWWM2C3-CSRjUbE8.js +88 -0
- package/web/assets/chunk-XXDRQBXY-j9X99vQo.js +1 -0
- package/web/assets/classDiagram-DTDB5LWJ-LWRDKZ5K-D00H1X9p.js +1 -0
- package/web/assets/classDiagram-JCYQIIEL-ClQHMNoR.js +1 -0
- package/web/assets/classDiagram-v2-JRS7N3AN-2BZHGRP2-D00H1X9p.js +1 -0
- package/web/assets/classDiagram-v2-OCEON4UE-ClQHMNoR.js +1 -0
- package/web/assets/colors-Cc3OSVma.js +1 -0
- package/web/assets/core-Drxo65nc.js +12 -0
- package/web/assets/{cose-bilkent-JH36ORCC-CuRVnite.js → cose-bilkent-JH36ORCC-CN6Mp4ds.js} +1 -1
- package/web/assets/cose-bilkent-JH36ORCC-OB24KH3T-Bvxs1RhI.js +1 -0
- package/web/assets/cpp-DddhVWhK.js +1 -0
- package/web/assets/csharp-DSvCPggb.js +1 -0
- package/web/assets/css-CLj8gQPS.js +1 -0
- package/web/assets/cynefin-OW5HDTMX-GVF3BKWE-BVXFZGhi.js +178 -0
- package/web/assets/{cynefin-VYW2F7L2-deqxDK2d.js → cynefin-VYW2F7L2-CBHvDLlv.js} +1 -1
- package/web/assets/cynefinDiagram-5FMLGOSQ-H3WIRU3N-CM4Mj-Vd.js +62 -0
- package/web/assets/cynefinDiagram-MW4NZA55-aMzbAFWs.js +62 -0
- package/web/assets/dagre-3AP2YEHR-DCERTXHT-BMVGWTPf.js +4 -0
- package/web/assets/{dagre-VZM6K2ZE-CGNHDakS.js → dagre-VZM6K2ZE-DhQcrBKB.js} +2 -2
- package/web/assets/{defaultLocale-DX6XiGOO.js → defaultLocale-5voVPcsN.js} +1 -1
- package/web/assets/{diagram-7IWD3JNH-D_gUTAQc.js → diagram-7IWD3JNH-neTaugq1.js} +4 -4
- package/web/assets/{diagram-B4RE2ZJO-YGyPH2BM.js → diagram-B4RE2ZJO-D9KmoYBV.js} +3 -3
- package/web/assets/diagram-LBJQPF4R-9J-F2MVE.js +24 -0
- package/web/assets/diagram-Q27KOJAE-Dz9KITJh.js +24 -0
- package/web/assets/diagram-S7CK7UJ4-MULGZGEL-r3BljA8e.js +30 -0
- package/web/assets/diagram-UB23O5K3-BA5gPgQ7.js +41 -0
- package/web/assets/diagram-UQ7AKVKN-YQBY353J-IIvT6Y42.js +41 -0
- package/web/assets/diagram-VSXAHHWV-WLNH2ELY-BMCz6ope.js +3 -0
- package/web/assets/diagram-VX7I27RA-XW6YQV5G-Z3lYjMVR.js +24 -0
- package/web/assets/diagram-Z3DM3KII-HG7RF65D-CsLqhzUJ.js +24 -0
- package/web/assets/diff-D97Zzqfu.js +1 -0
- package/web/assets/dockerfile-BcOcwvcX.js +1 -0
- package/web/assets/ebnfDiagram-BXEA7PRR-BoUlG0c_.js +1 -0
- package/web/assets/ebnfDiagram-PWID7BFC-OKY4VHYD-CgMcEf9P.js +1 -0
- package/web/assets/elk.bundled-DjGexDyy.js +24 -0
- package/web/assets/engine-javascript-DBd1bXLz.js +141 -0
- package/web/assets/{erDiagram-JOGREHBK-BuY7vR4r.js → erDiagram-JOGREHBK-DV_Tzdk0.js} +4 -4
- package/web/assets/erDiagram-SSCWMZ5O-PIPKOIK7-Ct9t5yN5.js +99 -0
- package/web/assets/flowDiagram-A5DVABFB-2Z4AVO5R-C4iDReFc.js +168 -0
- package/web/assets/{flowDiagram-UKHOOZJN-TxEOjs8K.js → flowDiagram-UKHOOZJN-DvQGnBrF.js} +10 -10
- package/web/assets/ganttDiagram-EL5Y4UJY-JZNG7GOG-BPWBTDqB.js +292 -0
- package/web/assets/ganttDiagram-PKOTCBZU-7gjvaw6I.js +292 -0
- package/web/assets/{gitGraphDiagram-DS77QQ5N-rZzK4UXV.js → gitGraphDiagram-DS77QQ5N-B54T3l5T.js} +7 -7
- package/web/assets/gitGraphDiagram-WWUBYQGX-DMWMLL3G-CmG0_dMg.js +106 -0
- package/web/assets/github-dark-DHJKELXO.js +1 -0
- package/web/assets/github-light-DAi9KRSo.js +1 -0
- package/web/assets/go-C27-OAKa.js +1 -0
- package/web/assets/graphql-ChdNCCLP.js +1 -0
- package/web/assets/html-pp8916En.js +1 -0
- package/web/assets/{index-DFfbtrtQ.js → index-B6q9ygFx.js} +9 -9
- package/web/assets/index-CU6ublfJ.js +1 -0
- package/web/assets/index-CvYzv8kf.js +1 -0
- package/web/assets/index-Cz8nGS3-.css +1 -0
- package/web/assets/index-H1bePBGl.js +3 -0
- package/web/assets/index-yzG6be5R.js +416 -0
- package/web/assets/infoDiagram-6WML65LV-BJSGxY2D.js +2 -0
- package/web/assets/infoDiagram-RXCK75RN-HANS5KVC-Cz3Y1Unl.js +2 -0
- package/web/assets/ini-BEwlwnbL.js +1 -0
- package/web/assets/ishikawaDiagram-5VMMS53U-7GCIT7WU-BT6MsYfb.js +70 -0
- package/web/assets/{ishikawaDiagram-WSZJBQD7-B4Ja0YPZ.js → ishikawaDiagram-WSZJBQD7-BsYCRLYP.js} +6 -6
- package/web/assets/java-CylS5w8V.js +1 -0
- package/web/assets/javascript-wDzz0qaB.js +1 -0
- package/web/assets/journeyDiagram-EYS64GPL-OAPELBT7-Bx1wxARt.js +139 -0
- package/web/assets/{journeyDiagram-NVQOT4AX-BmhpGG29.js → journeyDiagram-NVQOT4AX-DkJv2QF6.js} +2 -2
- package/web/assets/json-Cp-IABpG.js +1 -0
- package/web/assets/jsx-g9-lgVsj.js +1 -0
- package/web/assets/{kanban-definition-27J2QSJJ-CiuTLc9W.js → kanban-definition-27J2QSJJ-BCWiZznF.js} +8 -8
- package/web/assets/kanban-definition-3QL26DDD-I7RKWQQY-uHjeKCG_.js +89 -0
- package/web/assets/katex-N6JRN4PM-D4hrRJKq.js +257 -0
- package/web/assets/kotlin-BdnUsdx6.js +1 -0
- package/web/assets/latex-B2nUCzCX.js +1 -0
- package/web/assets/linear-BHfMepXe.js +1 -0
- package/web/assets/lua-BaeVxFsk.js +1 -0
- package/web/assets/main-B239_4z1.js +796 -0
- package/web/assets/makefile-CHLpvVh8.js +1 -0
- package/web/assets/markdown-Cvjx9yec.js +1 -0
- package/web/assets/mermaid-layout-elk.core-C4McJve2.js +2 -0
- package/web/assets/mermaid.core-CmjrekXI.js +314 -0
- package/web/assets/min-tv6RD-6E.js +1 -0
- package/web/assets/{mindmap-definition-FAOFIHXS-Bt-VPht2.js → mindmap-definition-FAOFIHXS-PIVNjK20.js} +4 -4
- package/web/assets/mindmap-definition-FBJOCRG2-KIYZG64Y-C8ko7Fkc.js +96 -0
- package/web/assets/pegDiagram-VL7TDLO6-D0oejFBc.js +1 -0
- package/web/assets/pegDiagram-XKGWAZYB-OIP57N6J-Cqs1jeYc.js +1 -0
- package/web/assets/{pet-a4xGZJ4o.js → pet-CZ36ImJS.js} +1 -1
- package/web/assets/php-Csjmro_R.js +1 -0
- package/web/assets/pie-xhYaZtwS.js +1 -0
- package/web/assets/pieDiagram-7S7Q4E2Y-CdvhM-aN.js +39 -0
- package/web/assets/pieDiagram-E7YTZNPT-2UOTW327-BMlCBlPI.js +39 -0
- package/web/assets/python-B6aJPvgy.js +1 -0
- package/web/assets/quadrantDiagram-AXDQQJYC-SN3ASJJK-CEEgxhrf.js +7 -0
- package/web/assets/{quadrantDiagram-CIZ2JOQS-B-1McWhJ.js → quadrantDiagram-CIZ2JOQS-BrKm5erH.js} +2 -2
- package/web/assets/r-Cf5RLm7j.js +1 -0
- package/web/assets/railroadDiagram-AXF67PYL-CJudf8AD.js +1 -0
- package/web/assets/railroadDiagram-O6MQD6OU-34742W6X-C8RacTGn.js +1 -0
- package/web/assets/render-O7CIS3YK-BtRzL6gS.js +354 -0
- package/web/assets/requirementDiagram-EFPCY7ZU-NGAFFSMB-CTXLwcL9.js +84 -0
- package/web/assets/{requirementDiagram-LRYGKXZP-BVqLmmFw.js → requirementDiagram-LRYGKXZP-mS__tKrf.js} +4 -4
- package/web/assets/ruby-B6QtyW_S.js +1 -0
- package/web/assets/rust-B1yitclQ.js +1 -0
- package/web/assets/sankeyDiagram-P5KCCOFB-3D3M4XPB-DyuDtBvQ.js +40 -0
- package/web/assets/sankeyDiagram-W5VNT64P-COKGPXfA.js +40 -0
- package/web/assets/scss-D5BDwBP9.js +1 -0
- package/web/assets/{sequenceDiagram-SI44F4Z6-7pBYtwXq.js → sequenceDiagram-SI44F4Z6-CNMY38eS.js} +3 -3
- package/web/assets/sequenceDiagram-WJ2MYXX4-Q2IOPB4R-_u4WjXk1.js +162 -0
- package/web/assets/shellscript-Yzrsuije.js +1 -0
- package/web/assets/sizeCapture-X5ZJPWSS-DWdLSp6i.js +1 -0
- package/web/assets/sizeCapture-X5ZJPWSS-PSGVOMYM-Cs-f36Xi.js +1 -0
- package/web/assets/sql-CRqJ_cUM.js +1 -0
- package/web/assets/stateDiagram-HBIQ2CUA-4M2S6MAN-D3Vb1Yoi.js +1 -0
- package/web/assets/stateDiagram-OKZ733FA-DWpXAgAW.js +1 -0
- package/web/assets/stateDiagram-v2-4QOOHH4V-LBBLA2WV-C6PXffxU.js +1 -0
- package/web/assets/stateDiagram-v2-UEYNNEHI-D3rCYZ7F.js +1 -0
- package/web/assets/step-SI6FXFD6.js +1 -0
- package/web/assets/swift-C2oV4EkX.js +1 -0
- package/web/assets/swimlanes-SLNWSIFB--qlM3PH1.js +2 -0
- package/web/assets/swimlanes-XN3QIQJK-N6N2CCQ6-Dq7F7g7w.js +1 -0
- package/web/assets/swimlanesDiagram-ULZ7WXOC-C2JzshU-.js +8 -0
- package/web/assets/swimlanesDiagram-VK2B7HYN-E6N4H5SY-C1mY3FR0.js +8 -0
- package/web/assets/time-CLfYygnx.js +1 -0
- package/web/assets/timeline-definition-24CTP7MA-KN7RSRVM-BRP9kk4o.js +120 -0
- package/web/assets/{timeline-definition-Z64GVDOM-CPyFZDbL.js → timeline-definition-Z64GVDOM-CGIURnLx.js} +4 -4
- package/web/assets/toml-vGWfd6FD.js +1 -0
- package/web/assets/transform-CzGDKG_M.js +1 -0
- package/web/assets/tsx-COt5Ahok.js +1 -0
- package/web/assets/typescript-BPQ3VLAy.js +1 -0
- package/web/assets/vennDiagram-4TSXK5OY-AKJ7LXAN-Row28BrM.js +34 -0
- package/web/assets/{vennDiagram-T6HMQDX7-CrYCZIBM.js → vennDiagram-T6HMQDX7-CCAqbOji.js} +5 -5
- package/web/assets/vue-CHlpWS_5.js +1 -0
- package/web/assets/{wardleyDiagram-T6FBY63Y-C-bOW3CV.js → wardleyDiagram-T6FBY63Y-BsHQ7eqA.js} +2 -2
- package/web/assets/wardleyDiagram-VM6X3IG4-3B6A3BN5-DBcNZZDs.js +78 -0
- package/web/assets/xml-sdJ4AIDG.js +1 -0
- package/web/assets/xychartDiagram-ELKLHX3M-Bdjq4REQ.js +7 -0
- package/web/assets/xychartDiagram-S5SC5T6Z-OBDNV6WG-ClGm8SGz.js +7 -0
- package/web/assets/yaml-Buea-lGh.js +1 -0
- package/web/index.html +3 -3
- package/web/pet.html +3 -3
- package/web/assets/abnfDiagram-N423BO3Z-BgfNjjBj.js +0 -1
- package/web/assets/api-web-DI50TDfG.js +0 -1
- package/web/assets/arc-RE7zZVS-.js +0 -1
- package/web/assets/channel-BhfjE8vu.js +0 -1
- package/web/assets/chunk-2GRJ4B5K-Cam0QBnt.js +0 -1
- package/web/assets/chunk-KBJHAD2P-BsrsrevO.js +0 -1
- package/web/assets/chunk-XXDRQBXY-BtPTE4dn.js +0 -1
- package/web/assets/classDiagram-JCYQIIEL-mL7PrSyJ.js +0 -1
- package/web/assets/classDiagram-v2-OCEON4UE-mL7PrSyJ.js +0 -1
- package/web/assets/cynefinDiagram-MW4NZA55-BVpP0nLh.js +0 -62
- package/web/assets/diagram-LBJQPF4R-B32aZsIz.js +0 -24
- package/web/assets/diagram-Q27KOJAE-DwwhihNN.js +0 -24
- package/web/assets/diagram-UB23O5K3-BdxB0b3R.js +0 -41
- package/web/assets/ebnfDiagram-BXEA7PRR-PAN05I_q.js +0 -1
- package/web/assets/ganttDiagram-PKOTCBZU-BqnBC4Aw.js +0 -292
- package/web/assets/index-D8iAKGNi.css +0 -1
- package/web/assets/infoDiagram-6WML65LV-B4sR-B3M.js +0 -2
- package/web/assets/linear-l0VVDmXM.js +0 -1
- package/web/assets/main-5hScumEl.js +0 -792
- package/web/assets/mermaid.core-DZ6Z8vWa.js +0 -314
- package/web/assets/pegDiagram-VL7TDLO6-CANPvqfq.js +0 -1
- package/web/assets/pieDiagram-7S7Q4E2Y-HpK8uEiY.js +0 -39
- package/web/assets/railroadDiagram-AXF67PYL-DA507-no.js +0 -1
- package/web/assets/sankeyDiagram-W5VNT64P-WV_Swfln.js +0 -40
- package/web/assets/sizeCapture-X5ZJPWSS-Ba9eWTxX.js +0 -1
- package/web/assets/stateDiagram-OKZ733FA-lonr0yA-.js +0 -1
- package/web/assets/stateDiagram-v2-UEYNNEHI-Dt1VC3TV.js +0 -1
- package/web/assets/swimlanes-SLNWSIFB-BSQT7r6F.js +0 -2
- package/web/assets/swimlanesDiagram-ULZ7WXOC-Dhdnb080.js +0 -8
- package/web/assets/xychartDiagram-ELKLHX3M-BB-TjDfD.js +0 -7
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
var Fr=Object.defineProperty;var Gr=Object.getPrototypeOf;var Pr=Reflect.get;var De=e=>{throw TypeError(e)};var Rr=(e,r,t)=>r in e?Fr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var se=(e,r,t)=>Rr(e,typeof r!="symbol"?r+"":r,t),ye=(e,r,t)=>r.has(e)||De("Cannot "+t);var E=(e,r,t)=>(ye(e,r,"read from private field"),t?t.call(e):r.get(e)),z=(e,r,t)=>r.has(e)?De("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,t),M=(e,r,t,n)=>(ye(e,r,"write to private field"),n?n.call(e,t):r.set(e,t),t),Ce=(e,r,t)=>(ye(e,r,"access private method"),t);var Te=(e,r,t)=>Pr(Gr(e),t,r);var ar=class{constructor(e,r={}){se(this,"patterns");se(this,"options");se(this,"regexps");this.patterns=e,this.options=r;const{forgiving:t=!1,cache:n,regexConstructor:s}=r;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(o=>{if(typeof o!="string")return o;const a=n==null?void 0:n.get(o);if(a){if(a instanceof RegExp)return a;if(t)return null;throw a}try{const i=s(o);return n==null||n.set(o,i),i}catch(i){if(n==null||n.set(o,i),t)return null;throw i}})}findNextMatchSync(e,r,t){const n=typeof e=="string"?e:e.content,s=[];function o(a,i,u=0){return{index:a,captureIndices:i.indices.map(c=>c==null?{start:4294967295,end:4294967295,length:0}:{start:c[0]+u,end:c[1]+u,length:c[1]-c[0]})}}for(let a=0;a<this.regexps.length;a++){const i=this.regexps[a];if(i)try{i.lastIndex=r;const u=i.exec(n);if(!u)continue;if(u.index===r)return o(a,u,0);s.push([a,u,0])}catch(u){if(this.options.forgiving)continue;throw u}}if(s.length){const a=Math.min(...s.map(i=>i[1].index));for(const[i,u,c]of s)if(u.index===a)return o(i,u,c)}return null}};function re(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Ur(e,r,t){return e.has(r)||e.set(r,t),e.get(r)}const Fe=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),x=String.raw;function te(e,r){if(e==null)throw new Error(r??"Value expected");return e}const ir=x`\[\^?`,ur=`c.? | C(?:-.?)?|${x`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${x`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${x`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${x`o\{[^\}]*\}?`}|${x`\d{1,3}`}`,Ge=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,ce=new RegExp(x`
|
|
2
|
+
\\ (?:
|
|
3
|
+
${ur}
|
|
4
|
+
| [gk]<[^>]*>?
|
|
5
|
+
| [gk]'[^']*'?
|
|
6
|
+
| .
|
|
7
|
+
)
|
|
8
|
+
| \( (?:
|
|
9
|
+
\? (?:
|
|
10
|
+
[:=!>({]
|
|
11
|
+
| <[=!]
|
|
12
|
+
| <[^>]*>
|
|
13
|
+
| '[^']*'
|
|
14
|
+
| ~\|?
|
|
15
|
+
| #(?:[^)\\]|\\.?)*
|
|
16
|
+
| [^:)]*[:)]
|
|
17
|
+
)?
|
|
18
|
+
| \*[^\)]*\)?
|
|
19
|
+
)?
|
|
20
|
+
| (?:${Ge.source})+
|
|
21
|
+
| ${ir}
|
|
22
|
+
| .
|
|
23
|
+
`.replace(/\s+/g,""),"gsu"),be=new RegExp(x`
|
|
24
|
+
\\ (?:
|
|
25
|
+
${ur}
|
|
26
|
+
| .
|
|
27
|
+
)
|
|
28
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
29
|
+
| ${ir}
|
|
30
|
+
| &&
|
|
31
|
+
| .
|
|
32
|
+
`.replace(/\s+/g,""),"gsu");function Or(e,r={}){const t={flags:"",...r,rules:{captureGroup:!1,singleline:!1,...r.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const n=nt(t.flags),s=[n.extended],o={captureGroup:t.rules.captureGroup,getCurrentModX(){return s.at(-1)},numOpenGroups:0,popModX(){s.pop()},pushModX(l){s.push(l)},replaceCurrentModX(l){s[s.length-1]=l},singleline:t.rules.singleline};let a=[],i;for(ce.lastIndex=0;i=ce.exec(e);){const l=Dr(o,e,i[0],ce.lastIndex);l.tokens?a.push(...l.tokens):l.token&&a.push(l.token),l.lastIndex!==void 0&&(ce.lastIndex=l.lastIndex)}const u=[];let c=0;a.filter(l=>l.type==="GroupOpen").forEach(l=>{l.kind==="capturing"?l.number=++c:l.raw==="("&&u.push(l)}),c||u.forEach((l,f)=>{l.kind="capturing",l.number=f+1});const p=c||u.length;return{tokens:a.map(l=>l.type==="EscapedNumber"?ot(l,p):l).flat(),flags:n}}function Dr(e,r,t,n){const[s,o]=t;if(t==="["||t==="[^"){const a=Tr(r,t,n);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(s==="\\"){if("AbBGyYzZ".includes(o))return{token:Be(t,t)};if(/^\\g[<']/.test(t)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(t))throw new Error(`Invalid group name "${t}"`);return{token:qr(t)}}if(/^\\k[<']/.test(t)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(t))throw new Error(`Invalid group name "${t}"`);return{token:lr(t)}}if(o==="K")return{token:pr("keep",t)};if(o==="N"||o==="R")return{token:j("newline",t,{negate:o==="N"})};if(o==="O")return{token:j("any",t)};if(o==="X")return{token:j("text_segment",t)};const a=cr(t,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(s==="("){if(o==="*")return{token:et(t)};if(t==="(?{")throw new Error(`Unsupported callout "${t}"`);if(t.startsWith("(?#")){if(r[n]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:n+1}}if(/^\(\?[-imx]+[:)]$/.test(t))return{token:Yr(t,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,t==="("&&!e.captureGroup||t==="(?:")return{token:Y("group",t)};if(t==="(?>")return{token:Y("atomic",t)};if(t==="(?="||t==="(?!"||t==="(?<="||t==="(?<!")return{token:Y(t[2]==="<"?"lookbehind":"lookahead",t,{negate:t.endsWith("!")})};if(t==="("&&e.captureGroup||t.startsWith("(?<")&&t.endsWith(">")||t.startsWith("(?'")&&t.endsWith("'"))return{token:Y("capturing",t,{...t!=="("&&{name:t.slice(3,-1)}})};if(t.startsWith("(?~")){if(t==="(?~|")throw new Error(`Unsupported absence function kind "${t}"`);return{token:Y("absence_repeater",t)}}throw t==="(?("?new Error(`Unsupported conditional "${t}"`):new Error(`Invalid or unsupported group option "${t}"`)}if(t===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:Xr(t)}}if(e.getCurrentModX()){if(t==="#"){const a=r.indexOf(`
|
|
33
|
+
`,n);return{lastIndex:a===-1?r.length:a}}if(/^\s$/.test(t)){const a=/\s+/y;return a.lastIndex=n,{lastIndex:a.exec(r)?a.lastIndex:n}}}if(t===".")return{token:j("dot",t)};if(t==="^"||t==="$"){const a=e.singleline?{"^":x`\A`,$:x`\Z`}[t]:t;return{token:Be(a,t)}}return t==="|"?{token:Vr(t)}:Ge.test(t)?{tokens:at(t)}:{token:R(re(t),t)}}function Tr(e,r,t){const n=[Ve(r[1]==="^",r)];let s=1,o;for(be.lastIndex=t;o=be.exec(e);){const a=o[0];if(a[0]==="["&&a[1]!==":")s++,n.push(Ve(a[1]==="^",a));else if(a==="]"){if(n.at(-1).type==="CharacterClassOpen")n.push(R(93,a));else if(s--,n.push(zr(a)),!s)break}else{const i=Br(a);Array.isArray(i)?n.push(...i):n.push(i)}}return{tokens:n,lastIndex:be.lastIndex||e.length}}function Br(e){if(e[0]==="\\")return cr(e,{inCharClass:!0});if(e[0]==="["){const r=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!r||!Fe.has(r.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return j("posix",e,{value:r.groups.name,negate:!!r.groups.negate})}return e==="-"?Wr(e):e==="&&"?Hr(e):R(re(e),e)}function cr(e,{inCharClass:r}){const t=e[1];if(t==="c"||t==="C")return Kr(e);if("dDhHsSwW".includes(t))return rt(e);if(e.startsWith(x`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return tt(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const n=e.split(/\\x/).slice(1).map(a=>parseInt(a,16)),s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(n)),o=new TextEncoder;return[...s].map(a=>{const i=[...o.encode(a)].map(u=>`\\x${u.toString(16)}`).join("");return R(re(a),i)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(t==="u"||t==="x")return R(st(e),e);if(ze.has(t))return R(ze.get(t),e);if(/\d/.test(t))return jr(r,e);if(e==="\\")throw new Error(x`Incomplete escape "\"`);if(t==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return R(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Vr(e){return{type:"Alternator",raw:e}}function Be(e,r){return{type:"Assertion",kind:e,raw:r}}function lr(e){return{type:"Backreference",raw:e}}function R(e,r){return{type:"Character",value:e,raw:r}}function zr(e){return{type:"CharacterClassClose",raw:e}}function Wr(e){return{type:"CharacterClassHyphen",raw:e}}function Hr(e){return{type:"CharacterClassIntersector",raw:e}}function Ve(e,r){return{type:"CharacterClassOpen",negate:e,raw:r}}function j(e,r,t={}){return{type:"CharacterSet",kind:e,...t,raw:r}}function pr(e,r,t={}){return e==="keep"?{type:"Directive",kind:e,raw:r}:{type:"Directive",kind:e,flags:te(t.flags),raw:r}}function jr(e,r){return{type:"EscapedNumber",inCharClass:e,raw:r}}function Xr(e){return{type:"GroupClose",raw:e}}function Y(e,r,t={}){return{type:"GroupOpen",kind:e,...t,raw:r}}function Zr(e,r,t,n){return{type:"NamedCallout",kind:e,tag:r,arguments:t,raw:n}}function Qr(e,r,t,n){return{type:"Quantifier",kind:e,min:r,max:t,raw:n}}function qr(e){return{type:"Subroutine",raw:e}}const Jr=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),ze=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Kr(e){const r=e[1]==="c"?e[2]:e[3];if(!r||!/[A-Za-z]/.test(r))throw new Error(`Unsupported control character "${e}"`);return R(re(r.toUpperCase())-64,e)}function Yr(e,r){let{on:t,off:n}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;n??(n="");const s=(r.getCurrentModX()||t.includes("x"))&&!n.includes("x"),o=He(t),a=He(n),i={};if(o&&(i.enable=o),a&&(i.disable=a),e.endsWith(")"))return r.replaceCurrentModX(s),pr("flags",e,{flags:i});if(e.endsWith(":"))return r.pushModX(s),r.numOpenGroups++,Y("group",e,{...(o||a)&&{flags:i}});throw new Error(`Unexpected flag modifier "${e}"`)}function et(e){const r=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!r)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:t,tag:n,args:s}=r.groups;if(!t)throw new Error(`Invalid named callout "${e}"`);if(n==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=s?s.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[a,i,u]=o,c=Jr.has(t)?t.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(o.length===2&&(typeof i=="number"||!/^[<>X]$/.test(i)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${i}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(typeof i=="number"||!/^(?:[<>!=]=|[<>])$/.test(i))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${i}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument three must be a tag or number "${u}"`);break;case"custom":throw new Error(`Undefined callout name "${t}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return Zr(c,n??null,(s==null?void 0:s.split(","))??null,e)}function We(e){let r=null,t,n;if(e[0]==="{"){const{minStr:s,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+s>a||o&&+o>a)throw new Error("Quantifier value unsupported in Oniguruma");if(t=+s,n=o===void 0?+s:o===""?1/0:+o,t>n&&(r="possessive",[t,n]=[n,t]),e.endsWith("?")){if(r==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');r="lazy"}else r||(r="greedy")}else t=e[0]==="+"?1:0,n=e[0]==="?"?1:1/0,r=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Qr(r,t,n,e)}function rt(e){const r=e[1].toLowerCase();return j({d:"digit",h:"hex",s:"space",w:"word"}[r],e,{negate:e[1]!==r})}function tt(e){const{p:r,neg:t,value:n}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return j("property",e,{value:n,negate:r==="P"&&!t||r==="p"&&!!t})}function He(e){const r={};return e.includes("i")&&(r.ignoreCase=!0),e.includes("m")&&(r.dotAll=!0),e.includes("x")&&(r.extended=!0),Object.keys(r).length?r:null}function nt(e){const r={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let t=0;t<e.length;t++){const n=e[t];if(!"imxDPSWy".includes(n))throw new Error(`Invalid flag "${n}"`);if(n==="y"){if(!/^y{[gw]}/.test(e.slice(t)))throw new Error('Invalid or unspecified flag "y" mode');r.textSegmentMode=e[t+2]==="g"?"grapheme":"word",t+=3;continue}r[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[n]]=!0}return r}function st(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const r=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(r,16)}function ot(e,r){const{raw:t,inCharClass:n}=e,s=t.slice(1);if(!n&&(s!=="0"&&s.length===1||s[0]!=="0"&&+s<=r))return[lr(t)];const o=[],a=s.match(/^[0-7]+|\d/g);for(let i=0;i<a.length;i++){const u=a[i];let c;if(i===0&&u!=="8"&&u!=="9"){if(c=parseInt(u,8),c>127)throw new Error(x`Octal encoded byte above 177 unsupported "${t}"`)}else c=re(u);o.push(R(c,(i===0?"\\":"")+u))}return o}function at(e){const r=[],t=new RegExp(Ge,"gy");let n;for(;n=t.exec(e);){const s=n[0];if(s[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(s);if(o){const{min:a,max:i}=o.groups;if(+a>+i&&s.endsWith("?")){t.lastIndex--,r.push(We(s.slice(0,-1)));continue}}}r.push(We(s))}return r}function fr(e,r){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const t=e.body[0];return!r||Object.keys(r).every(n=>r[n]===t[n])}function it(e){return ut.has(e.type)}const ut=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function dr(e,r={}){const t={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...r,rules:{captureGroup:!1,singleline:!1,...r.rules}},n=Or(e,{flags:t.flags,rules:{captureGroup:t.rules.captureGroup,singleline:t.rules.singleline}}),s=(f,g)=>{const d=n.tokens[o.nextIndex];switch(o.parent=f,o.nextIndex++,d.type){case"Alternator":return Q();case"Assertion":return ct(d);case"Backreference":return lt(d,o);case"Character":return ge(d.value,{useLastValid:!!g.isCheckingRangeEnd});case"CharacterClassHyphen":return pt(d,o,g);case"CharacterClassOpen":return ft(d,o,g);case"CharacterSet":return dt(d,o);case"Directive":return Ct(d.kind,{flags:d.flags});case"GroupOpen":return gt(d,o,g);case"NamedCallout":return xt(d.kind,d.tag,d.arguments);case"Quantifier":return ht(d,o);case"Subroutine":return wt(d,o);default:throw new Error(`Unexpected token type "${d.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:t.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:t.skipBackrefValidation,skipLookbehindValidation:t.skipLookbehindValidation,skipPropertyNameValidation:t.skipPropertyNameValidation,subroutines:[],tokens:n.tokens,unicodePropertyMap:t.unicodePropertyMap,walk:s},a=Et(bt(n.flags));let i=a.body[0];for(;o.nextIndex<n.tokens.length;){const f=s(i,{});f.type==="Alternative"?(a.body.push(f),i=f):i.body.push(f)}const{capturingGroups:u,hasNumberedRef:c,namedGroupsByName:p,subroutines:l}=o;if(c&&p.size&&!t.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:f}of l)if(typeof f=="number"){if(f>u.length)throw new Error("Subroutine uses a group number that's not defined");f&&(u[f-1].isSubroutined=!0)}else if(p.has(f)){if(p.get(f).length>1)throw new Error(x`Subroutine uses a duplicate group name "\g<${f}>"`);p.get(f)[0].isSubroutined=!0}else throw new Error(x`Subroutine uses a group name that's not defined "\g<${f}>"`);return a}function ct({kind:e}){return Se(te({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===x`\B`||e===x`\Y`})}function lt({raw:e},r){const t=/^\\k[<']/.test(e),n=t?e.slice(3,-1):e.slice(1),s=(o,a=!1)=>{const i=r.capturingGroups.length;let u=!1;if(o>i)if(r.skipBackrefValidation)u=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return r.hasNumberedRef=!0,ve(a?i+1-o:o,{orphan:u})};if(t){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(n);if(o)return s(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(n))throw new Error(`Invalid backref name "${e}"`);if(!r.namedGroupsByName.has(n))throw new Error(`Group name not defined to the left "${e}"`);return ve(n)}return s(+n)}function pt(e,r,t){const{tokens:n,walk:s}=r,o=r.parent,a=o.body.at(-1),i=n[r.nextIndex];if(!t.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&i&&i.type!=="CharacterClassOpen"&&i.type!=="CharacterClassClose"&&i.type!=="CharacterClassIntersector"){const u=s(o,{...t,isCheckingRangeEnd:!0});if(a.type==="Character"&&u.type==="Character")return o.body.pop(),yt(a,u);throw new Error("Invalid character class range")}return ge(re("-"))}function ft({negate:e},r,t){const{tokens:n,walk:s}=r,o=[fe()],a=n[r.nextIndex];let i=Ze(a);for(;i.type!=="CharacterClassClose";){if(i.type==="CharacterClassIntersector")o.push(fe()),r.nextIndex++;else{const c=o.at(-1);c.body.push(s(c,t))}i=Ze(n[r.nextIndex],a)}const u=fe({negate:e});return o.length===1?u.body=o[0].body:(u.kind="intersection",u.body=o.map(c=>c.body.length===1?c.body[0]:c)),r.nextIndex++,u}function dt({kind:e,negate:r,value:t},n){const{normalizeUnknownPropertyNames:s,skipPropertyNameValidation:o,unicodePropertyMap:a}=n;if(e==="property"){const i=he(t);if(Fe.has(i)&&!(a!=null&&a.has(i)))e="posix",t=i;else return ee(t,{negate:r,normalizeUnknownPropertyNames:s,skipPropertyNameValidation:o,unicodePropertyMap:a})}return e==="posix"?kt(t,{negate:r}):_e(e,{negate:r})}function gt(e,r,t){const{tokens:n,capturingGroups:s,namedGroupsByName:o,skipLookbehindValidation:a,walk:i}=r,u=$t(e),c=u.type==="AbsenceFunction",p=Xe(u),l=p&&u.negate;if(u.type==="CapturingGroup"&&(s.push(u),u.name&&Ur(o,u.name,[]).push(u)),c&&t.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let f=Qe(n[r.nextIndex]);for(;f.type!=="GroupClose";){if(f.type==="Alternator")u.body.push(Q()),r.nextIndex++;else{const g=u.body.at(-1),d=i(g,{...t,isInAbsenceFunction:t.isInAbsenceFunction||c,isInLookbehind:t.isInLookbehind||p,isInNegLookbehind:t.isInNegLookbehind||l});if(g.body.push(d),(p||t.isInLookbehind)&&!a){const w="Lookbehind includes a pattern not allowed by Oniguruma";if(l||t.isInNegLookbehind){if(je(d)||d.type==="CapturingGroup")throw new Error(w)}else if(je(d)||Xe(d)&&d.negate)throw new Error(w)}}f=Qe(n[r.nextIndex])}return r.nextIndex++,u}function ht({kind:e,min:r,max:t},n){const s=n.parent,o=s.body.at(-1);if(!o||!it(o))throw new Error("Quantifier requires a repeatable token");const a=hr(e,r,t,o);return s.body.pop(),a}function wt({raw:e},r){const{capturingGroups:t,subroutines:n}=r;let s=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(s);if(o){const i=+o.groups.num,u=t.length;if(r.hasNumberedRef=!0,s={"":i,"+":u+i,"-":u+1-i}[o.groups.sign],s<1)throw new Error("Invalid subroutine number")}else s==="0"&&(s=0);const a=wr(s);return n.push(a),a}function mt(e,r){return{type:"AbsenceFunction",kind:e,body:ue(r==null?void 0:r.body)}}function Q(e){return{type:"Alternative",body:mr(e==null?void 0:e.body)}}function Se(e,r){const t={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(t.negate=!!(r!=null&&r.negate)),t}function ve(e,r){const t=!!(r!=null&&r.orphan);return{type:"Backreference",ref:e,...t&&{orphan:t}}}function gr(e,r){const t={name:void 0,isSubroutined:!1,...r};if(t.name!==void 0&&!At(t.name))throw new Error(`Group name "${t.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...t.name&&{name:t.name},...t.isSubroutined&&{isSubroutined:t.isSubroutined},body:ue(r==null?void 0:r.body)}}function ge(e,r){const t={useLastValid:!1,...r};if(e>1114111){const n=e.toString(16);if(t.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${n}}"`):new Error(`Invalid code point out of range in JS "\\x{${n}}"`)}return{type:"Character",value:e}}function fe(e){const r={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:r.kind,negate:r.negate,body:mr(e==null?void 0:e.body)}}function yt(e,r){if(r.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:r}}function _e(e,r){const t=!!(r!=null&&r.negate),n={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(n.negate=t),(e==="text_segment"||e==="newline"&&!t)&&(n.variableLength=!0),n}function Ct(e,r={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:te(r.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function bt(e){return{type:"Flags",...e}}function N(e){const r=e==null?void 0:e.atomic,t=e==null?void 0:e.flags;if(r&&t)throw new Error("Atomic group cannot have flags");return{type:"Group",...r&&{atomic:r},...t&&{flags:t},body:ue(e==null?void 0:e.body)}}function H(e){const r={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:r.behind?"lookbehind":"lookahead",negate:r.negate,body:ue(e==null?void 0:e.body)}}function xt(e,r,t){return{type:"NamedCallout",kind:e,tag:r,arguments:t}}function kt(e,r){const t=!!(r!=null&&r.negate);if(!Fe.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:t}}function hr(e,r,t,n){if(r>t)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:r,max:t,body:n}}function Et(e,r){return{type:"Regex",body:ue(r==null?void 0:r.body),flags:e}}function wr(e){return{type:"Subroutine",ref:e}}function ee(e,r){var s;const t={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...r};let n=(s=t.unicodePropertyMap)==null?void 0:s.get(he(e));if(!n){if(t.normalizeUnknownPropertyNames)n=It(e);else if(t.unicodePropertyMap&&!t.skipPropertyNameValidation)throw new Error(x`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:n??e,negate:t.negate}}function $t({flags:e,kind:r,name:t,negate:n,number:s}){switch(r){case"absence_repeater":return mt("repeater");case"atomic":return N({atomic:!0});case"capturing":return gr(s,{name:t});case"group":return N({flags:e});case"lookahead":case"lookbehind":return H({behind:r==="lookbehind",negate:n});default:throw new Error(`Unexpected group kind "${r}"`)}}function ue(e){if(e===void 0)e=[Q()];else if(!Array.isArray(e)||!e.length||!e.every(r=>r.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function mr(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(r=>!!r.type))throw new Error("Invalid body; expected array of nodes");return e}function je(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Xe(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function At(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function It(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,r=>r[0].toUpperCase()+r.slice(1).toLowerCase())}function he(e){return e.replace(/[- _]+/g,"").toLowerCase()}function Ze(e,r){const t=r;return te(e,`Unclosed character class${(t==null?void 0:t.type)==="Character"&&t.value===93&&t.raw==="]"?' (started with "]")':""}`)}function Qe(e){return te(e,"Unclosed group")}function oe(e,r,t=null){function n(o,a){for(let i=0;i<o.length;i++){const u=s(o[i],a,i,o);i=Math.max(-1,i+u)}}function s(o,a=null,i=null,u=null){var $,A;let c=0,p=!1;const l={node:o,parent:a,key:i,container:u,root:e,remove(){le(u).splice(Math.max(0,J(i)+c),1),c--,p=!0},removeAllNextSiblings(){return le(u).splice(J(i)+1)},removeAllPrevSiblings(){const y=J(i)+c;return c-=y,le(u).splice(0,Math.max(0,y))},replaceWith(y,k={}){const v=!!k.traverse;u?u[Math.max(0,J(i)+c)]=y:te(a,"Can't replace root node")[i]=y,v&&s(y,a,i,u),p=!0},replaceWithMultiple(y,k={}){const v=!!k.traverse;if(le(u).splice(Math.max(0,J(i)+c),1,...y),c+=y.length-1,v){let V=0;for(let _=0;_<y.length;_++)V+=s(y[_],a,J(i)+_+V,u)}p=!0},skip(){p=!0}},{type:f}=o,g=r["*"],d=r[f],w=typeof g=="function"?g:g==null?void 0:g.enter,m=typeof d=="function"?d:d==null?void 0:d.enter;if(w==null||w(l,t),m==null||m(l,t),!p)switch(f){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":n(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":s(o.min,o,"min"),s(o.max,o,"max");break;case"Quantifier":s(o.body,o,"body");break;case"Regex":n(o.body,o),s(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${f}"`)}return($=d==null?void 0:d.exit)==null||$.call(d,l,t),(A=g==null?void 0:g.exit)==null||A.call(g,l,t),c}return s(e),e}function le(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function J(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const St=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function vt(e,r){for(let t=0;t<e.length;t++)e[t]>=r&&e[t]++}function _t(e,r,t,n){return e.slice(0,r)+n+e.slice(r+t.length)}const S=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Pe(e,r,t,n){const s=new RegExp(String.raw`${r}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let a=0,i="";for(const u of e.matchAll(s)){const{0:c,groups:{$skip:p}}=u;if(!p&&(!n||n===S.DEFAULT==!a)){t instanceof Function?i+=t(u,{context:a?S.CHAR_CLASS:S.DEFAULT,negated:o[o.length-1]}):i+=t;continue}c[0]==="["?(a++,o.push(c[1]==="^")):c==="]"&&a&&(a--,o.pop()),i+=c}return i}function yr(e,r,t,n){Pe(e,r,t,n)}function Mt(e,r,t=0,n){if(!new RegExp(r,"su").test(e))return null;const s=new RegExp(`${r}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=t;let o=0,a;for(;a=s.exec(e);){const{0:i,groups:{$skip:u}}=a;if(!u&&(!n||n===S.DEFAULT==!o))return a;i==="["?o++:i==="]"&&o&&o--,s.lastIndex==a.index&&s.lastIndex++}return null}function pe(e,r,t){return!!Mt(e,r,0,t)}function Nt(e,r){const t=/\\?./gsu;t.lastIndex=r;let n=e.length,s=0,o=1,a;for(;a=t.exec(e);){const[i]=a;if(i==="[")s++;else if(s)i==="]"&&s--;else if(i==="(")o++;else if(i===")"&&(o--,!o)){n=a.index;break}}return e.slice(r,n)}const qe=new RegExp(String.raw`(?<noncapturingStart>${St})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function Lt(e,r){const t=(r==null?void 0:r.hiddenCaptures)??[];let n=(r==null?void 0:r.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:n,hiddenCaptures:t};const s="(?>",o="(?:(?=(",a=[0],i=[];let u=0,c=0,p=NaN,l;do{l=!1;let f=0,g=0,d=!1,w;for(qe.lastIndex=Number.isNaN(p)?0:p+o.length;w=qe.exec(e);){const{0:m,index:$,groups:{capturingStart:A,noncapturingStart:y}}=w;if(m==="[")f++;else if(f)m==="]"&&f--;else if(m===s&&!d)p=$,d=!0;else if(d&&y)g++;else if(A)d?g++:(u++,a.push(u+c));else if(m===")"&&d){if(!g){c++;const k=u+c;if(e=`${e.slice(0,p)}${o}${e.slice(p+s.length,$)}))<$$${k}>)${e.slice($+1)}`,l=!0,i.push(k),vt(t,k),n.size){const v=new Map;n.forEach((V,_)=>{v.set(_>=k?_+1:_,V.map(q=>q>=k?q+1:q))}),n=v}break}g--}}}while(l);return t.push(...i),e=Pe(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:f,groups:{backrefNum:g,wrappedBackrefNum:d}})=>{if(g){const w=+g;if(w>a.length-1)throw new Error(`Backref "${f}" greater than number of captures`);return`\\${a[w]}`}return`\\${d}`},S.DEFAULT),{pattern:e,captureTransfers:n,hiddenCaptures:t}}const Cr=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,xe=new RegExp(String.raw`
|
|
34
|
+
\\(?: \d+
|
|
35
|
+
| c[A-Za-z]
|
|
36
|
+
| [gk]<[^>]+>
|
|
37
|
+
| [pPu]\{[^\}]+\}
|
|
38
|
+
| u[A-Fa-f\d]{4}
|
|
39
|
+
| x[A-Fa-f\d]{2}
|
|
40
|
+
)
|
|
41
|
+
| \((?: \? (?: [:=!>]
|
|
42
|
+
| <(?:[=!]|[^>]+>)
|
|
43
|
+
| [A-Za-z\-]+:
|
|
44
|
+
| \(DEFINE\)
|
|
45
|
+
))?
|
|
46
|
+
| (?<qBase>${Cr})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
47
|
+
| \\?.
|
|
48
|
+
`.replace(/\s+/g,""),"gsu");function Ft(e){if(!new RegExp(`${Cr}\\+`).test(e))return{pattern:e};const r=[];let t=null,n=null,s="",o=0,a;for(xe.lastIndex=0;a=xe.exec(e);){const{0:i,index:u,groups:{qBase:c,qMod:p,invalidQ:l}}=a;if(i==="[")o||(n=u),o++;else if(i==="]")o?o--:n=null;else if(!o)if(p==="+"&&s&&!s.startsWith("(")){if(l)throw new Error(`Invalid quantifier "${i}"`);let f=-1;if(/^\{\d+\}$/.test(c))e=_t(e,u+c.length,p,"");else{if(s===")"||s==="]"){const g=s===")"?t:n;if(g===null)throw new Error(`Invalid unmatched "${s}"`);e=`${e.slice(0,g)}(?>${e.slice(g,u)}${c})${e.slice(u+i.length)}`}else e=`${e.slice(0,u-s.length)}(?>${s}${c})${e.slice(u+i.length)}`;f+=4}xe.lastIndex+=f}else i[0]==="("?r.push(u):i===")"&&(t=r.length?r.pop():null);s=i}return{pattern:e}}const I=String.raw,Gt=I`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Me=I`\(\?R=(?<rDepth>[^\)]+)\)|${Gt}`,we=I`\(\?<(?![=!])(?<captureName>[^>]+)>`,br=I`${we}|(?<unnamed>\()(?!\?)`,W=new RegExp(I`${we}|${Me}|\(\?|\\?.`,"gsu"),ke="Cannot use multiple overlapping recursions";function Pt(e,r){const{hiddenCaptures:t,mode:n}={hiddenCaptures:[],mode:"plugin",...r};let s=(r==null?void 0:r.captureTransfers)??new Map;if(!new RegExp(Me,"su").test(e))return{pattern:e,captureTransfers:s,hiddenCaptures:t};if(n==="plugin"&&pe(e,I`\(\?\(DEFINE\)`,S.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],a=pe(e,I`\\[1-9]`,S.DEFAULT),i=new Map,u=[];let c=!1,p=0,l=0,f;for(W.lastIndex=0;f=W.exec(e);){const{0:g,groups:{captureName:d,rDepth:w,gRNameOrNum:m,gRDepth:$}}=f;if(g==="[")p++;else if(p)g==="]"&&p--;else if(w){if(Je(w),c)throw new Error(ke);if(a)throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const A=e.slice(0,f.index),y=e.slice(W.lastIndex);if(pe(y,Me,S.DEFAULT))throw new Error(ke);const k=+w-1;e=Ke(A,y,k,!1,t,o,l),s=er(s,A,k,o.length,0,l);break}else if(m){Je($);let A=!1;for(const ne of u)if(ne.name===m||ne.num===+m){if(A=!0,ne.hasRecursedWithin)throw new Error(ke);break}if(!A)throw new Error(I`Recursive \g cannot be used outside the referenced group "${n==="external"?m:I`\g<${m}&R=${$}>`}"`);const y=i.get(m),k=Nt(e,y);if(a&&pe(k,I`${we}|\((?!\?)`,S.DEFAULT))throw new Error(`${n==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const v=e.slice(y,f.index),V=k.slice(v.length+g.length),_=o.length,q=+$-1,Oe=Ke(v,V,q,!0,t,o,l);s=er(s,v,q,o.length-_,_,l);const Nr=e.slice(0,y),Lr=e.slice(y+k.length);e=`${Nr}${Oe}${Lr}`,W.lastIndex+=Oe.length-g.length-v.length-V.length,u.forEach(ne=>ne.hasRecursedWithin=!0),c=!0}else if(d)l++,i.set(String(l),W.lastIndex),i.set(d,W.lastIndex),u.push({num:l,name:d});else if(g[0]==="("){const A=g==="(";A&&(l++,i.set(String(l),W.lastIndex)),u.push(A?{num:l}:{})}else g===")"&&u.pop()}return t.push(...o),{pattern:e,captureTransfers:s,hiddenCaptures:t}}function Je(e){const r=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(r);if(e=+e,e<2||e>100)throw new Error(r)}function Ke(e,r,t,n,s,o,a){const i=new Set;n&&yr(e+r,we,({groups:{captureName:c}})=>{i.add(c)},S.DEFAULT);const u=[t,n?i:null,s,o,a];return`${e}${Ye(`(?:${e}`,"forward",...u)}(?:)${Ye(`${r})`,"backward",...u)}${r}`}function Ye(e,r,t,n,s,o,a){const u=p=>r==="forward"?p+2:t-p+2-1;let c="";for(let p=0;p<t;p++){const l=u(p);c+=Pe(e,I`${br}|\\k<(?<backref>[^>]+)>`,({0:f,groups:{captureName:g,unnamed:d,backref:w}})=>{if(w&&n&&!n.has(w))return f;const m=`_$${l}`;if(d||g){const $=a+o.length+1;return o.push($),Rt(s,$),d?f:`(?<${g}${m}>`}return I`\k<${w}${m}>`},S.DEFAULT)}return c}function Rt(e,r){for(let t=0;t<e.length;t++)e[t]>=r&&e[t]++}function er(e,r,t,n,s,o){if(e.size&&n){let a=0;yr(r,br,()=>a++,S.DEFAULT);const i=o-a+s,u=new Map;return e.forEach((c,p)=>{const l=(n-a*t)/t,f=a*t,g=p>i+a?p+n:p,d=[];for(const w of c)if(w<=i)d.push(w);else if(w>i+a+l)d.push(w+n);else if(w<=i+a)for(let m=0;m<=t;m++)d.push(w+a*m);else for(let m=0;m<=t;m++)d.push(w+f+l*m);u.set(g,d)}),u}return e}var b=String.fromCodePoint,h=String.raw,L={},me=globalThis.RegExp;L.flagGroups=(()=>{try{new me("(?i:)")}catch{return!1}return!0})();L.unicodeSets=(()=>{try{new me("[[]]","v")}catch{return!1}return!0})();L.bugFlagVLiteralHyphenIsRange=L.unicodeSets?(()=>{try{new me(h`[\d\-a]`,"v")}catch{return!0}return!1})():!1;L.bugNestedClassIgnoresNegation=L.unicodeSets&&new me("[[^a]]","v").test("a");function de(e,{enable:r,disable:t}){return{dotAll:!(t!=null&&t.dotAll)&&!!(r!=null&&r.dotAll||e.dotAll),ignoreCase:!(t!=null&&t.ignoreCase)&&!!(r!=null&&r.ignoreCase||e.ignoreCase)}}function ae(e,r,t){return e.has(r)||e.set(r,t),e.get(r)}function Ne(e,r){return rr[e]>=rr[r]}function Ut(e,r){if(e==null)throw new Error(r??"Value expected");return e}var rr={ES2025:2025,ES2024:2024,ES2018:2018},Ot={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function xr(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Ot[e.target])throw new Error(`Unexpected target "${e.target}"`);const r={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return r.target==="auto"&&(r.target=L.flagGroups?"ES2025":L.unicodeSets?"ES2024":"ES2018"),r}var Dt="[ -\r ]",Tt=new Set([b(304),b(305)]),F=h`[\p{L}\p{M}\p{N}\p{Pc}]`;function kr(e){if(Tt.has(e))return[e];const r=new Set,t=e.toLowerCase(),n=t.toUpperCase(),s=zt.get(t),o=Bt.get(t),a=Vt.get(t);return[...n].length===1&&r.add(n),a&&r.add(a),s&&r.add(s),r.add(t),o&&r.add(o),[...r]}var Re=new Map(`C Other
|
|
49
|
+
Cc Control cntrl
|
|
50
|
+
Cf Format
|
|
51
|
+
Cn Unassigned
|
|
52
|
+
Co Private_Use
|
|
53
|
+
Cs Surrogate
|
|
54
|
+
L Letter
|
|
55
|
+
LC Cased_Letter
|
|
56
|
+
Ll Lowercase_Letter
|
|
57
|
+
Lm Modifier_Letter
|
|
58
|
+
Lo Other_Letter
|
|
59
|
+
Lt Titlecase_Letter
|
|
60
|
+
Lu Uppercase_Letter
|
|
61
|
+
M Mark Combining_Mark
|
|
62
|
+
Mc Spacing_Mark
|
|
63
|
+
Me Enclosing_Mark
|
|
64
|
+
Mn Nonspacing_Mark
|
|
65
|
+
N Number
|
|
66
|
+
Nd Decimal_Number digit
|
|
67
|
+
Nl Letter_Number
|
|
68
|
+
No Other_Number
|
|
69
|
+
P Punctuation punct
|
|
70
|
+
Pc Connector_Punctuation
|
|
71
|
+
Pd Dash_Punctuation
|
|
72
|
+
Pe Close_Punctuation
|
|
73
|
+
Pf Final_Punctuation
|
|
74
|
+
Pi Initial_Punctuation
|
|
75
|
+
Po Other_Punctuation
|
|
76
|
+
Ps Open_Punctuation
|
|
77
|
+
S Symbol
|
|
78
|
+
Sc Currency_Symbol
|
|
79
|
+
Sk Modifier_Symbol
|
|
80
|
+
Sm Math_Symbol
|
|
81
|
+
So Other_Symbol
|
|
82
|
+
Z Separator
|
|
83
|
+
Zl Line_Separator
|
|
84
|
+
Zp Paragraph_Separator
|
|
85
|
+
Zs Space_Separator
|
|
86
|
+
ASCII
|
|
87
|
+
ASCII_Hex_Digit AHex
|
|
88
|
+
Alphabetic Alpha
|
|
89
|
+
Any
|
|
90
|
+
Assigned
|
|
91
|
+
Bidi_Control Bidi_C
|
|
92
|
+
Bidi_Mirrored Bidi_M
|
|
93
|
+
Case_Ignorable CI
|
|
94
|
+
Cased
|
|
95
|
+
Changes_When_Casefolded CWCF
|
|
96
|
+
Changes_When_Casemapped CWCM
|
|
97
|
+
Changes_When_Lowercased CWL
|
|
98
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
99
|
+
Changes_When_Titlecased CWT
|
|
100
|
+
Changes_When_Uppercased CWU
|
|
101
|
+
Dash
|
|
102
|
+
Default_Ignorable_Code_Point DI
|
|
103
|
+
Deprecated Dep
|
|
104
|
+
Diacritic Dia
|
|
105
|
+
Emoji
|
|
106
|
+
Emoji_Component EComp
|
|
107
|
+
Emoji_Modifier EMod
|
|
108
|
+
Emoji_Modifier_Base EBase
|
|
109
|
+
Emoji_Presentation EPres
|
|
110
|
+
Extended_Pictographic ExtPict
|
|
111
|
+
Extender Ext
|
|
112
|
+
Grapheme_Base Gr_Base
|
|
113
|
+
Grapheme_Extend Gr_Ext
|
|
114
|
+
Hex_Digit Hex
|
|
115
|
+
IDS_Binary_Operator IDSB
|
|
116
|
+
IDS_Trinary_Operator IDST
|
|
117
|
+
ID_Continue IDC
|
|
118
|
+
ID_Start IDS
|
|
119
|
+
Ideographic Ideo
|
|
120
|
+
Join_Control Join_C
|
|
121
|
+
Logical_Order_Exception LOE
|
|
122
|
+
Lowercase Lower
|
|
123
|
+
Math
|
|
124
|
+
Noncharacter_Code_Point NChar
|
|
125
|
+
Pattern_Syntax Pat_Syn
|
|
126
|
+
Pattern_White_Space Pat_WS
|
|
127
|
+
Quotation_Mark QMark
|
|
128
|
+
Radical
|
|
129
|
+
Regional_Indicator RI
|
|
130
|
+
Sentence_Terminal STerm
|
|
131
|
+
Soft_Dotted SD
|
|
132
|
+
Terminal_Punctuation Term
|
|
133
|
+
Unified_Ideograph UIdeo
|
|
134
|
+
Uppercase Upper
|
|
135
|
+
Variation_Selector VS
|
|
136
|
+
White_Space space
|
|
137
|
+
XID_Continue XIDC
|
|
138
|
+
XID_Start XIDS`.split(/\s/).map(e=>[he(e),e])),Bt=new Map([["s",b(383)],[b(383),"s"]]),Vt=new Map([[b(223),b(7838)],[b(107),b(8490)],[b(229),b(8491)],[b(969),b(8486)]]),zt=new Map([U(453),U(456),U(459),U(498),...Ee(8072,8079),...Ee(8088,8095),...Ee(8104,8111),U(8124),U(8140),U(8188)]),Wt=new Map([["alnum",h`[\p{Alpha}\p{Nd}]`],["alpha",h`\p{Alpha}`],["ascii",h`\p{ASCII}`],["blank",h`[\p{Zs}\t]`],["cntrl",h`\p{Cc}`],["digit",h`\p{Nd}`],["graph",h`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",h`\p{Lower}`],["print",h`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",h`[\p{P}\p{S}]`],["space",h`\p{space}`],["upper",h`\p{Upper}`],["word",h`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",h`\p{AHex}`]]);function Ht(e,r){const t=[];for(let n=e;n<=r;n++)t.push(n);return t}function U(e){const r=b(e);return[r.toLowerCase(),r]}function Ee(e,r){return Ht(e,r).map(t=>U(t))}var Er=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function jt(e,r){const t={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...r};$r(e);const n={accuracy:t.accuracy,asciiWordBoundaries:t.asciiWordBoundaries,avoidSubclass:t.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Ne(t.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};oe(e,Xt,n);const s={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:s,prevFlags:null,globalFlags:s,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:n.subroutineRefMap};oe(e,Zt,o);const a={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return oe(e,Qt,a),e._originMap=o.groupOriginByCopy,e._strategy=n.strategy,e}var Xt={AbsenceFunction({node:e,parent:r,replaceWith:t}){const{body:n,kind:s}=e;if(s==="repeater"){const o=N();o.body[0].body.push(H({negate:!0,body:n}),ee("Any"));const a=N();a.body[0].body.push(hr("greedy",0,1/0,o)),t(C(a,r),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:r,key:t},{flagDirectivesByAlt:n}){const s=e.body.filter(o=>o.kind==="flags");for(let o=t+1;o<r.body.length;o++){const a=r.body[o];ae(n,a,[]).push(...s)}},exit({node:e},{flagDirectivesByAlt:r}){var t;if((t=r.get(e))!=null&&t.length){const n=Ir(r.get(e));if(n){const s=N({flags:n});s.body[0].body=e.body,e.body=[C(s,e)]}}}},Assertion({node:e,parent:r,key:t,container:n,root:s,remove:o,replaceWith:a},i){const{kind:u,negate:c}=e,{asciiWordBoundaries:p,avoidSubclass:l,supportedGNodes:f,wordIsAscii:g}=i;if(u==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if(u==="line_end")a(C(H({body:[Q({body:[Se("string_end")]}),Q({body:[ge(10)]})]}),r));else if(u==="line_start")a(C(G(h`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),r));else if(u==="search_start")if(f.has(e))s.flags.sticky=!0,o();else{const d=n[t-1];if(d&&rn(d))a(C(H({negate:!0}),r));else{if(l)throw new Error(h`Uses "\G" in a way that requires a subclass`);a(O(Se("string_start"),r)),i.strategy="clip_search"}}else if(!(u==="string_end"||u==="string_start"))if(u==="string_end_newline")a(C(G(h`(?=\n?\z)`),r));else if(u==="word_boundary"){if(!g&&!p){const d=`(?:(?<=${F})(?!${F})|(?<!${F})(?=${F}))`,w=`(?:(?<=${F})(?=${F})|(?<!${F})(?!${F}))`;a(C(G(c?w:d),r))}}else throw new Error(`Unexpected assertion kind "${u}"`)},Backreference({node:e},{jsGroupNameMap:r}){let{ref:t}=e;typeof t=="string"&&!Ae(t)&&(t=$e(t,r),e.ref=t)},CapturingGroup({node:e},{jsGroupNameMap:r,subroutineRefMap:t}){let{name:n}=e;n&&!Ae(n)&&(n=$e(n,r),e.name=n),t.set(e.number,e),n&&t.set(n,e)},CharacterClassRange({node:e,parent:r,replaceWith:t}){if(r.kind==="intersection"){const n=fe({body:[e]});t(C(n,r),{traverse:!0})}},CharacterSet({node:e,parent:r,replaceWith:t},{accuracy:n,minTargetEs2024:s,digitIsAscii:o,spaceIsAscii:a,wordIsAscii:i}){const{kind:u,negate:c,value:p}=e;if(o&&(u==="digit"||p==="digit")){t(O(_e("digit",{negate:c}),r));return}if(a&&(u==="space"||p==="space")){t(C(Ie(G(Dt),c),r));return}if(i&&(u==="word"||p==="word")){t(O(_e("word",{negate:c}),r));return}if(u==="any")t(O(ee("Any"),r));else if(u==="digit")t(O(ee("Nd",{negate:c}),r));else if(u!=="dot")if(u==="text_segment"){if(n==="strict")throw new Error(h`Use of "\X" requires non-strict accuracy`);const l="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",f=h`\p{RI}{2}|${l}(?:\u200D${l})*`;t(C(G(h`(?>\r\n|${s?h`\p{RGI_Emoji}`:f}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),r))}else if(u==="hex")t(O(ee("AHex",{negate:c}),r));else if(u==="newline")t(C(G(c?`[^
|
|
139
|
+
]`:`(?>\r
|
|
140
|
+
?|[
|
|
141
|
+
\v\f
\u2028\u2029])`),r));else if(u==="posix")if(!s&&(p==="graph"||p==="print")){if(n==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let l={graph:"!-~",print:" -~"}[p];c&&(l=`\0-${b(l.codePointAt(0)-1)}${b(l.codePointAt(2)+1)}-`),t(C(G(`[${l}]`),r))}else t(C(Ie(G(Wt.get(p)),c),r));else if(u==="property")Re.has(he(p))||(e.key="sc");else if(u==="space")t(O(ee("space",{negate:c}),r));else if(u==="word")t(C(Ie(G(F),c),r));else throw new Error(`Unexpected character set kind "${u}"`)},Directive({node:e,parent:r,root:t,remove:n,replaceWith:s,removeAllPrevSiblings:o,removeAllNextSiblings:a}){const{kind:i,flags:u}=e;if(i==="flags")if(!u.enable&&!u.disable)n();else{const c=N({flags:u});c.body[0].body=a(),s(C(c,r),{traverse:!0})}else if(i==="keep"){const c=t.body[0],l=t.body.length===1&&fr(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:t;if(r.parent!==l||l.body.length>1)throw new Error(h`Uses "\K" in a way that's unsupported`);const f=H({behind:!0});f.body[0].body=o(),s(C(f,r))}else throw new Error(`Unexpected directive kind "${i}"`)},Flags({node:e,parent:r}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),r.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:r,disable:t}=e.flags;r!=null&&r.extended&&delete r.extended,t!=null&&t.extended&&delete t.extended,r!=null&&r.dotAll&&(t!=null&&t.dotAll)&&delete r.dotAll,r!=null&&r.ignoreCase&&(t!=null&&t.ignoreCase)&&delete r.ignoreCase,r&&!Object.keys(r).length&&delete e.flags.enable,t&&!Object.keys(t).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},r){const{kind:t}=e;t==="lookbehind"&&(r.passedLookbehind=!0)},NamedCallout({node:e,parent:r,replaceWith:t}){const{kind:n}=e;if(n==="fail")t(C(H({negate:!0}),r));else throw new Error(`Unsupported named callout "(*${n.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const r=N();r.body[0].body.push(e.body),e.body=C(r,e)}},Regex:{enter({node:e},{supportedGNodes:r}){const t=[];let n=!1,s=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const a=vr(o.body);a?(n=!0,Array.isArray(a)?t.push(...a):t.push(a)):s=!0}n&&!s&&t.forEach(o=>r.add(o))},exit(e,{accuracy:r,passedLookbehind:t,strategy:n}){if(r==="strict"&&t&&n)throw new Error(h`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:r}){let{ref:t}=e;typeof t=="string"&&!Ae(t)&&(t=$e(t,r),e.ref=t)}},Zt={Backreference({node:e},{multiplexCapturesToLeftByRef:r,reffedNodesByReferencer:t}){const{orphan:n,ref:s}=e;n||t.set(e,[...r.get(s).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:r,replaceWith:t,skip:n},{groupOriginByCopy:s,groupsByName:o,multiplexCapturesToLeftByRef:a,openRefs:i,reffedNodesByReferencer:u}){const c=s.get(e);if(c&&i.has(e.number)){const l=O(tr(e.number),r);u.set(l,i.get(e.number)),t(l);return}i.set(e.number,e),a.set(e.number,[]),e.name&&ae(a,e.name,[]);const p=a.get(e.name??e.number);for(let l=0;l<p.length;l++){const f=p[l];if(c===f.node||c&&c===f.origin||e===f.origin){p.splice(l,1);break}}if(a.get(e.number).push({node:e,origin:c}),e.name&&a.get(e.name).push({node:e,origin:c}),e.name){const l=ae(o,e.name,new Map);let f=!1;if(c)f=!0;else for(const g of l.values())if(!g.hasDuplicateNameToRemove){f=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:f})}},exit({node:e},{openRefs:r}){r.get(e.number)===e&&r.delete(e.number)}},Group:{enter({node:e},r){r.prevFlags=r.currentFlags,e.flags&&(r.currentFlags=de(r.currentFlags,e.flags))},exit(e,r){r.currentFlags=r.prevFlags}},Subroutine({node:e,parent:r,replaceWith:t},n){const{isRecursive:s,ref:o}=e;if(s){let p=r;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===o||p.number===o)););n.reffedNodesByReferencer.set(e,p);return}const a=n.subroutineRefMap.get(o),i=o===0,u=i?tr(0):Ar(a,n.groupOriginByCopy,null);let c=u;if(!i){const p=Ir(Kt(a,f=>f.type==="Group"&&!!f.flags)),l=p?de(n.globalFlags,p):n.globalFlags;qt(l,n.currentFlags)||(c=N({flags:Yt(l)}),c.body[0].body.push(u))}t(C(c,r),{traverse:!i})}},Qt={Backreference({node:e,parent:r,replaceWith:t},n){if(e.orphan){n.highestOrphanBackref=Math.max(n.highestOrphanBackref,e.ref);return}const o=n.reffedNodesByReferencer.get(e).filter(a=>Jt(a,e));if(!o.length)t(C(H({negate:!0}),r));else if(o.length>1){const a=N({atomic:!0,body:o.reverse().map(i=>Q({body:[ve(i.number)]}))});t(C(a,r))}else e.ref=o[0].number},CapturingGroup({node:e},r){e.number=++r.numCapturesToLeft,e.name&&r.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},r){const t=Math.max(r.highestOrphanBackref-r.numCapturesToLeft,0);for(let n=0;n<t;n++){const s=gr();e.body.at(-1).body.push(s)}}},Subroutine({node:e},r){!e.isRecursive||e.ref===0||(e.ref=r.reffedNodesByReferencer.get(e).number)}};function $r(e){oe(e,{"*"({node:r,parent:t}){r.parent=t}})}function qt(e,r){return e.dotAll===r.dotAll&&e.ignoreCase===r.ignoreCase}function Jt(e,r){let t=r;do{if(t.type==="Regex")return!1;if(t.type==="Alternative")continue;if(t===e)return!1;const n=Sr(t.parent);for(const s of n){if(s===t)break;if(s===e||_r(s,e))return!0}}while(t=t.parent);throw new Error("Unexpected path")}function Ar(e,r,t,n){const s=Array.isArray(e)?[]:{};for(const[o,a]of Object.entries(e))o==="parent"?s.parent=Array.isArray(t)?n:t:a&&typeof a=="object"?s[o]=Ar(a,r,s,t):(o==="type"&&a==="CapturingGroup"&&r.set(s,r.get(e)??e),s[o]=a);return s}function tr(e){const r=wr(e);return r.isRecursive=!0,r}function Kt(e,r){const t=[];for(;e=e.parent;)(!r||r(e))&&t.push(e);return t}function $e(e,r){if(r.has(e))return r.get(e);const t=`$${r.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return r.set(e,t),t}function Ir(e){const r=["dotAll","ignoreCase"],t={enable:{},disable:{}};return e.forEach(({flags:n})=>{r.forEach(s=>{var o,a;(o=n.enable)!=null&&o[s]&&(delete t.disable[s],t.enable[s]=!0),(a=n.disable)!=null&&a[s]&&(t.disable[s]=!0)})}),Object.keys(t.enable).length||delete t.enable,Object.keys(t.disable).length||delete t.disable,t.enable||t.disable?t:null}function Yt({dotAll:e,ignoreCase:r}){const t={};return(e||r)&&(t.enable={},e&&(t.enable.dotAll=!0),r&&(t.enable.ignoreCase=!0)),(!e||!r)&&(t.disable={},!e&&(t.disable.dotAll=!0),!r&&(t.disable.ignoreCase=!0)),t}function Sr(e){if(!e)throw new Error("Node expected");const{body:r}=e;return Array.isArray(r)?r:r?[r]:null}function vr(e){const r=e.find(t=>t.kind==="search_start"||tn(t,{negate:!1})||!en(t));if(!r)return null;if(r.kind==="search_start")return r;if(r.type==="LookaroundAssertion")return r.body[0].body[0];if(r.type==="CapturingGroup"||r.type==="Group"){const t=[];for(const n of r.body){const s=vr(n.body);if(!s)return null;Array.isArray(s)?t.push(...s):t.push(s)}return t}return null}function _r(e,r){const t=Sr(e)??[];for(const n of t)if(n===r||_r(n,r))return!0;return!1}function en({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function rn(e){const r=["Character","CharacterClass","CharacterSet"];return r.includes(e.type)||e.type==="Quantifier"&&e.min&&r.includes(e.body.type)}function tn(e,r){const t={negate:null,...r};return e.type==="LookaroundAssertion"&&(t.negate===null||e.negate===t.negate)&&e.body.length===1&&fr(e.body[0],{type:"Assertion",kind:"search_start"})}function Ae(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function G(e,r){const n=dr(e,{...r,unicodePropertyMap:Re}).body;return n.length>1||n[0].body.length>1?N({body:n}):n[0].body[0]}function Ie(e,r){return e.negate=r,e}function O(e,r){return e.parent=r,e}function C(e,r){return $r(e),e.parent=r,e}function nn(e,r){const t=xr(r),n=Ne(t.target,"ES2024"),s=Ne(t.target,"ES2025"),o=t.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,i=null;if(!s){const g=[e.flags.ignoreCase];oe(e,sn,{getCurrentModI:()=>g.at(-1),popModI(){g.pop()},pushModI(d){g.push(d)},setHasCasedChar(){g.at(-1)?a=!0:i=!0}})}const u={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!i)};let c=e;const p={accuracy:t.accuracy,appliedGlobalFlags:u,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!s&&a&&i),useFlagMods:s,useFlagV:n,verbose:t.verbose};function l(g){return p.lastNode=c,c=g,Ut(on[g.type],`Unexpected node type "${g.type}"`)(g,p,l)}const f={pattern:e.body.map(l).join("|"),flags:l(e.flags),options:{...e.options}};return n||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],p.captureMap.forEach((g,d)=>{g.hidden&&f._hiddenCaptures.push(d),g.transferTo&&ae(f._captureTransfers,g.transferTo,[]).push(d)}),f}var sn={"*":{enter({node:e},r){if(sr(e)){const t=r.getCurrentModI();r.pushModI(e.flags?de({ignoreCase:t},e.flags).ignoreCase:t)}},exit({node:e},r){sr(e)&&r.popModI()}},Backreference(e,r){r.setHasCasedChar()},Character({node:e},r){Ue(b(e.value))&&r.setHasCasedChar()},CharacterClassRange({node:e,skip:r},t){r(),Mr(e,{firstOnly:!0}).length&&t.setHasCasedChar()},CharacterSet({node:e},r){e.kind==="property"&&Er.has(e.value)&&r.setHasCasedChar()}},on={Alternative({body:e},r,t){return e.map(t).join("")},Assertion({kind:e,negate:r}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return r?h`\B`:h`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},r){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!r.useFlagMods&&r.accuracy==="strict"&&r.currentFlags.ignoreCase&&!r.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,r,t){const{body:n,name:s,number:o}=e,a={ignoreCase:r.currentFlags.ignoreCase},i=r.originMap.get(e);return i&&(a.hidden=!0,o>i.number&&(a.transferTo=i.number)),r.captureMap.set(o,a),`(${s?`?<${s}>`:""}${n.map(t).join("|")})`},Character({value:e},r){const t=b(e),n=K(e,{escDigit:r.lastNode.type==="Backreference",inCharClass:r.inCharClass,useFlagV:r.useFlagV});if(n!==t)return n;if(r.useAppliedIgnoreCase&&r.currentFlags.ignoreCase&&Ue(t)){const s=kr(t);return r.inCharClass?s.join(""):s.length>1?`[${s.join("")}]`:s[0]}return t},CharacterClass(e,r,t){const{kind:n,negate:s,parent:o}=e;let{body:a}=e;if(n==="intersection"&&!r.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");L.bugFlagVLiteralHyphenIsRange&&r.useFlagV&&a.some(or)&&(a=[ge(45),...a.filter(c=>!or(c))]);const i=()=>`[${s?"^":""}${a.map(t).join(n==="intersection"?"&&":"")}]`;if(!r.inCharClass){if((!r.useFlagV||L.bugNestedClassIgnoresNegation)&&!s){const p=a.filter(l=>l.type==="CharacterClass"&&l.kind==="union"&&l.negate);if(p.length){const l=N(),f=l.body[0];return l.parent=o,f.parent=l,a=a.filter(g=>!p.includes(g)),e.body=a,a.length?(e.parent=f,f.body.push(e)):l.body.pop(),p.forEach(g=>{const d=Q({body:[g]});g.parent=d,d.parent=l,l.body.push(d)}),t(l)}}r.inCharClass=!0;const c=i();return r.inCharClass=!1,c}const u=a[0];if(n==="union"&&!s&&u&&((!r.useFlagV||!r.verbose)&&o.kind==="union"&&!(L.bugFlagVLiteralHyphenIsRange&&r.useFlagV)||!r.verbose&&o.kind==="intersection"&&a.length===1&&u.type!=="CharacterClassRange"))return a.map(t).join("");if(!r.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return i()},CharacterClassRange(e,r){const t=e.min.value,n=e.max.value,s={escDigit:!1,inCharClass:!0,useFlagV:r.useFlagV},o=K(t,s),a=K(n,s),i=new Set;if(r.useAppliedIgnoreCase&&r.currentFlags.ignoreCase){const u=Mr(e);pn(u).forEach(p=>{i.add(Array.isArray(p)?`${K(p[0],s)}-${K(p[1],s)}`:K(p,s))})}return`${o}-${a}${[...i].join("")}`},CharacterSet({kind:e,negate:r,value:t,key:n},s){if(e==="dot")return s.currentFlags.dotAll?s.appliedGlobalFlags.dotAll||s.useFlagMods?".":"[^]":h`[^\n]`;if(e==="digit")return r?h`\D`:h`\d`;if(e==="property"){if(s.useAppliedIgnoreCase&&s.currentFlags.ignoreCase&&Er.has(t))throw new Error(`Unicode property "${t}" can't be case-insensitive when other chars have specific case`);return`${r?h`\P`:h`\p`}{${n?`${n}=`:""}${t}}`}if(e==="word")return r?h`\W`:h`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,r){return(r.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:r,flags:t,parent:n},s,o){const a=s.currentFlags;t&&(s.currentFlags=de(a,t));const i=r.map(o).join("|"),u=!s.verbose&&r.length===1&&n.type!=="Quantifier"&&!e&&(!s.useFlagMods||!t)?i:`(?${fn(e,t,s.useFlagMods)}${i})`;return s.currentFlags=a,u},LookaroundAssertion({body:e,kind:r,negate:t},n,s){return`(?${`${r==="lookahead"?"":"<"}${t?"!":"="}`}${e.map(s).join("|")})`},Quantifier(e,r,t){return t(e.body)+dn(e)},Subroutine({isRecursive:e,ref:r},t){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const n=t.recursionLimit;return r===0?`(?R=${n})`:h`\g<${r}&R=${n}>`}},an=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),un=new Set(["-","\\","]","^","["]),cn=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),nr=new Map([[9,h`\t`],[10,h`\n`],[11,h`\v`],[12,h`\f`],[13,h`\r`],[8232,h`\u2028`],[8233,h`\u2029`],[65279,h`\uFEFF`]]),ln=new RegExp("^\\p{Cased}$","u");function Ue(e){return ln.test(e)}function Mr(e,r){const t=!!(r!=null&&r.firstOnly),n=e.min.value,s=e.max.value,o=[];if(n<65&&(s===65535||s>=131071)||n===65536&&s>=131071)return o;for(let a=n;a<=s;a++){const i=b(a);if(!Ue(i))continue;const u=kr(i).filter(c=>{const p=c.codePointAt(0);return p<n||p>s});if(u.length&&(o.push(...u),t))break}return o}function K(e,{escDigit:r,inCharClass:t,useFlagV:n}){if(nr.has(e))return nr.get(e);if(e<32||e>126&&e<160||e>262143||r&&gn(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const s=t?n?cn:un:an,o=b(e);return(s.has(o)?"\\":"")+o}function pn(e){const r=e.map(s=>s.codePointAt(0)).sort((s,o)=>s-o),t=[];let n=null;for(let s=0;s<r.length;s++)r[s+1]===r[s]+1?n??(n=r[s]):n===null?t.push(r[s]):(t.push([n,r[s]]),n=null);return t}function fn(e,r,t){if(e)return">";let n="";if(r&&t){const{enable:s,disable:o}=r;n=(s!=null&&s.ignoreCase?"i":"")+(s!=null&&s.dotAll?"s":"")+(o?"-":"")+(o!=null&&o.ignoreCase?"i":"")+(o!=null&&o.dotAll?"s":"")}return`${n}:`}function dn({kind:e,max:r,min:t}){let n;return!t&&r===1?n="?":!t&&r===1/0?n="*":t===1&&r===1/0?n="+":t===r?n=`{${t}}`:n=`{${t},${r===1/0?"":r}}`,n+{greedy:"",lazy:"?",possessive:"+"}[e]}function sr({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function gn(e){return e>47&&e<58}function or({type:e,value:r}){return e==="Character"&&r===45}var D,P,X,T,Z,ie,Le,B,hn=(B=class extends RegExp{constructor(t,n,s){var r=(...Sn)=>(super(...Sn),z(this,ie),z(this,D,new Map),z(this,P,null),z(this,X),z(this,T,null),z(this,Z,null),se(this,"rawOptions",{}),this);const o=!!(s!=null&&s.lazyCompile);if(t instanceof RegExp){if(s)throw new Error("Cannot provide options when copying a regexp");const a=t;r(a,n),M(this,X,a.source),a instanceof B&&(M(this,D,E(a,D)),M(this,T,E(a,T)),M(this,Z,E(a,Z)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...s};r(o?"":t,n),M(this,X,t),M(this,D,mn(a.hiddenCaptures,a.transfers)),M(this,Z,a.strategy),this.rawOptions=s??{}}o||M(this,P,this)}get source(){return E(this,X)||"(?:)"}exec(t){if(!E(this,P)){const{lazyCompile:o,...a}=this.rawOptions;M(this,P,new B(E(this,X),this.flags,a))}const n=this.global||this.sticky,s=this.lastIndex;if(E(this,Z)==="clip_search"&&n&&s){this.lastIndex=0;const o=Ce(this,ie,Le).call(this,t.slice(s));return o&&(wn(o,s,t,this.hasIndices),this.lastIndex+=s),o}return Ce(this,ie,Le).call(this,t)}},D=new WeakMap,P=new WeakMap,X=new WeakMap,T=new WeakMap,Z=new WeakMap,ie=new WeakSet,Le=function(t){E(this,P).lastIndex=this.lastIndex;const n=Te(B.prototype,this,"exec").call(E(this,P),t);if(this.lastIndex=E(this,P).lastIndex,!n||!E(this,D).size)return n;const s=[...n];n.length=1;let o;this.hasIndices&&(o=[...n.indices],n.indices.length=1);const a=[0];for(let i=1;i<s.length;i++){const{hidden:u,transferTo:c}=E(this,D).get(i)??{};if(u?a.push(null):(a.push(n.length),n.push(s[i]),this.hasIndices&&n.indices.push(o[i])),c&&s[i]!==void 0){const p=a[c];if(!p)throw new Error(`Invalid capture transfer to "${p}"`);if(n[p]=s[i],this.hasIndices&&(n.indices[p]=o[i]),n.groups){E(this,T)||M(this,T,yn(this.source));const l=E(this,T).get(c);l&&(n.groups[l]=s[i],this.hasIndices&&(n.indices.groups[l]=o[i]))}}}return n},B);function wn(e,r,t,n){if(e.index+=r,e.input=t,n){const s=e.indices;for(let a=0;a<s.length;a++){const i=s[a];i&&(s[a]=[i[0]+r,i[1]+r])}const o=s.groups;o&&Object.keys(o).forEach(a=>{const i=o[a];i&&(o[a]=[i[0]+r,i[1]+r])})}}function mn(e,r){const t=new Map;for(const n of e)t.set(n,{hidden:!0});for(const[n,s]of r)for(const o of s)ae(t,o,{}).transferTo=n;return t}function yn(e){const r=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,t=new Map;let n=0,s=0,o;for(;o=r.exec(e);){const{0:a,groups:{capture:i,name:u}}=o;a==="["?n++:n?a==="]"&&n--:i&&(s++,u&&t.set(s,u))}return t}function Cn(e,r){const t=bn(e,r);return t.options?new hn(t.pattern,t.flags,t.options):new RegExp(t.pattern,t.flags)}function bn(e,r){const t=xr(r),n=dr(e,{flags:t.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:t.rules.captureGroup,singleline:t.rules.singleline},skipBackrefValidation:t.rules.allowOrphanBackrefs,unicodePropertyMap:Re}),s=jt(n,{accuracy:t.accuracy,asciiWordBoundaries:t.rules.asciiWordBoundaries,avoidSubclass:t.avoidSubclass,bestEffortTarget:t.target}),o=nn(s,t),a=Pt(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),i=Ft(a.pattern),u=Lt(i.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),c={pattern:u.pattern,flags:`${t.hasIndices?"d":""}${t.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(t.avoidSubclass){if(t.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=u.hiddenCaptures.sort((d,w)=>d-w),l=Array.from(u.captureTransfers),f=s._strategy,g=c.pattern.length>=t.lazyCompileLength;(p.length||l.length||f||g)&&(c.options={...p.length&&{hiddenCaptures:p},...l.length&&{transfers:l},...f&&{strategy:f},...g&&{lazyCompile:g}})}return c}function xn(e,r){return Cn(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...r})}function En(e={}){const r={target:"auto",cache:new Map,...e};return r.regexConstructor||(r.regexConstructor=t=>xn(t,{target:r.target})),{createScanner(t){return new ar(t,r)},createString(t){return{content:t}}}}function $n(){const e={cache:new Map,regexConstructor:()=>{throw new Error("JavaScriptRawEngine: only support precompiled grammar")}};return{createScanner(r){return new ar(r,e)},createString(r){return{content:r}}}}export{ar as JavaScriptScanner,$n as createJavaScriptRawEngine,En as createJavaScriptRegexEngine,xn as defaultJavaScriptRegexConstructor};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{g as Bt}from"./chunk-XXDRQBXY-BtPTE4dn.js";import{s as Ft}from"./chunk-KBJHAD2P-BsrsrevO.js";import{_ as p,b as Yt,a as Pt,s as zt,g as Gt,n as Kt,o as Ut,c as rt,l as V,p as Zt,q as jt,r as Wt,t as qt,u as Qt,v as Xt,d as Ht,x as Jt}from"./mermaid.core-DZ6Z8vWa.js";import{c as $t}from"./channel-BhfjE8vu.js";import"./main-5hScumEl.js";import"./index-DFfbtrtQ.js";var gt=(function(){var s=p(function(I,n,a,l){for(a=a||{},l=I.length;l--;a[I[l]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],o=[1,10],h=[1,11],c=[1,12],u=[1,13],y=[1,23],d=[1,24],m=[1,25],W=[1,26],q=[1,27],S=[1,19],Q=[1,28],B=[1,29],D=[1,20],R=[1,18],T=[1,21],x=[1,22],at=[1,36],ct=[1,37],ot=[1,38],lt=[1,39],ht=[1,40],F=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],Y=[1,55],P=[40,48,50,51,52,71,72],z=[1,66],G=[1,64],A=[1,61],K=[1,65],U=[1,67],X=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],bt=[66,67,68,69,70],kt=[1,85],mt=[1,84],Et=[1,82],St=[1,83],Tt=[6,10,42,47],L=[6,10,13,41,42,47,48,49],H=[1,93],J=[1,92],$=[1,91],Z=[19,58],Ot=[1,102],Nt=[1,101],ut=[19,58,61,63],dt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:p(function(n,a,l,r,f,t,j){var e=t.length-1;switch(f){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 59:case 68:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 80:case 81:this.$=t[e].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=t[e];break;case 60:t[e].push(t[e-1]),this.$=t[e];break;case 61:this.$={type:t[e-1],name:t[e]};break;case 62:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 63:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 64:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 65:case 67:case 70:this.$=t[e];break;case 66:this.$=t[e-1]+t[e];break;case 69:t[e-2].push(t[e]),this.$=t[e-2];break;case 71:this.$=t[e].replace(/"/g,"");break;case 72:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:y,34:d,35:m,36:W,37:q,40:S,43:Q,44:B,48:D,50:R,51:T,52:x},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:30,11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:y,34:d,35:m,36:W,37:q,40:S,43:Q,44:B,48:D,50:R,51:T,52:x},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:at,67:ct,68:ot,69:lt,70:ht}),{23:[1,41]},{25:[1,42]},{27:[1,43]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(F,[2,54]),s(F,[2,55]),s(F,[2,56]),s(F,[2,57]),s(F,[2,58]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},s(i,[2,4]),{11:49,40:S,48:D,50:R,51:T,52:x},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:Y},{11:56,40:S,48:D,50:R,51:T,52:x},{65:57,71:[1,58],72:[1,59]},s(P,[2,73]),s(P,[2,74]),s(P,[2,75]),s(P,[2,76]),s(P,[2,77]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:z,38:60,41:G,42:A,45:62,46:63,48:K,49:U},s(X,[2,37]),s(X,[2,38]),{16:68,40:O,41:N,42:A},{13:z,38:69,41:G,42:A,45:62,46:63,48:K,49:U},{13:[1,70],15:[1,71]},s(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:at,67:ct,68:ot,69:lt,70:ht}),{19:[1,74]},s(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:Y},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:at,67:ct,68:ot,69:lt,70:ht},s(bt,[2,78]),s(bt,[2,79]),{6:kt,10:mt,39:81,42:Et,47:St},{40:[1,86],41:[1,87]},s(Tt,[2,43],{46:88,13:z,41:G,48:K,49:U}),s(L,[2,45]),s(L,[2,50]),s(L,[2,51]),s(L,[2,52]),s(L,[2,53]),s(i,[2,41],{42:A}),{6:kt,10:mt,39:89,42:Et,47:St},{14:90,40:H,50:J,73:$},{16:94,40:O,41:N},{11:95,40:S,48:D,50:R,51:T,52:x},{18:96,19:[1,97],53:53,54:54,58:Y},s(i,[2,12]),{19:[2,60]},s(Z,[2,61],{56:98,57:99,60:100,62:Ot,63:Nt}),s([19,58,62,63],[2,67]),{58:[2,66]},s(i,[2,22],{15:[1,104],17:[1,103]}),s([40,48,50,51,52],[2,72]),s(i,[2,36]),{13:z,41:G,45:105,46:63,48:K,49:U},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(X,[2,39]),s(X,[2,40]),s(L,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,80]),s(i,[2,81]),s(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},s(i,[2,15]),s(Z,[2,62],{57:110,61:[1,111],63:Nt}),s(Z,[2,63]),s(ut,[2,68]),s(Z,[2,71]),s(ut,[2,70]),{18:112,19:[1,113],53:53,54:54,58:Y},{16:114,40:O,41:N},s(Tt,[2,44],{46:88,13:z,41:G,48:K,49:U}),{14:115,40:H,50:J,73:$},{16:116,40:O,41:N},{14:117,40:H,50:J,73:$},s(i,[2,13]),s(Z,[2,64]),{60:118,62:Ot},{19:[1,119]},s(i,[2,20]),s(i,[2,23],{17:[1,120],42:A}),s(i,[2,11]),{13:[1,121],42:A},s(i,[2,10]),s(ut,[2,69]),s(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:Y},{14:124,40:H,50:J,73:$},{19:[1,125]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:p(function(n,a){if(a.recoverable)this.trace(n);else{var l=new Error(n);throw l.hash=a,l}},"parseError"),parse:p(function(n){var a=this,l=[0],r=[],f=[null],t=[],j=this.table,e="",et=0,At=0,Lt=2,It=1,wt=t.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(C.yy[pt]=this.yy[pt]);_.setInput(n,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var ft=_.yylloc;t.push(ft);var Vt=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(b){l.length=l.length-2*b,f.length=f.length-b,t.length=t.length-b}p(Mt,"popStack");function Rt(){var b;return b=r.pop()||_.lex()||It,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}p(Rt,"lex");for(var g,v,k,yt,w={},st,E,xt,it;;){if(v=l[l.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=Rt()),k=j[v]&&j[v][g]),typeof k>"u"||!k.length||!k[0]){var _t="";it=[];for(st in j[v])this.terminals_[st]&&st>Lt&&it.push("'"+this.terminals_[st]+"'");_.showPosition?_t="Parse error on line "+(et+1)+`:
|
|
1
|
+
import{g as Bt}from"./chunk-XXDRQBXY-j9X99vQo.js";import{s as Ft}from"./chunk-KBJHAD2P-C3HnMhHX.js";import{_ as p,b as Yt,a as Pt,s as zt,g as Gt,n as Kt,o as Ut,c as rt,l as V,p as Zt,q as jt,r as Wt,t as qt,u as Qt,v as Xt,x as Ht}from"./mermaid.core-CmjrekXI.js";import{s as Jt}from"./transform-CzGDKG_M.js";import{c as $t}from"./channel-BTMwuCXz.js";import"./main-B239_4z1.js";import"./index-B6q9ygFx.js";import"./step-SI6FXFD6.js";var gt=(function(){var s=p(function(I,n,a,l){for(a=a||{},l=I.length;l--;a[I[l]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],o=[1,10],h=[1,11],c=[1,12],u=[1,13],y=[1,23],d=[1,24],k=[1,25],W=[1,26],q=[1,27],S=[1,19],Q=[1,28],B=[1,29],D=[1,20],R=[1,18],T=[1,21],x=[1,22],at=[1,36],ct=[1,37],ot=[1,38],lt=[1,39],ht=[1,40],F=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],Y=[1,55],P=[40,48,50,51,52,71,72],z=[1,66],G=[1,64],A=[1,61],K=[1,65],U=[1,67],X=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],bt=[66,67,68,69,70],mt=[1,85],kt=[1,84],Et=[1,82],St=[1,83],Tt=[6,10,42,47],L=[6,10,13,41,42,47,48,49],H=[1,93],J=[1,92],$=[1,91],Z=[19,58],Ot=[1,102],Nt=[1,101],ut=[19,58,61,63],dt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:p(function(n,a,l,r,f,t,j){var e=t.length-1;switch(f){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 59:case 68:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 80:case 81:this.$=t[e].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=t[e];break;case 60:t[e].push(t[e-1]),this.$=t[e];break;case 61:this.$={type:t[e-1],name:t[e]};break;case 62:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 63:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 64:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 65:case 67:case 70:this.$=t[e];break;case 66:this.$=t[e-1]+t[e];break;case 69:t[e-2].push(t[e]),this.$=t[e-2];break;case 71:this.$=t[e].replace(/"/g,"");break;case 72:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:y,34:d,35:k,36:W,37:q,40:S,43:Q,44:B,48:D,50:R,51:T,52:x},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:30,11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:y,34:d,35:k,36:W,37:q,40:S,43:Q,44:B,48:D,50:R,51:T,52:x},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:at,67:ct,68:ot,69:lt,70:ht}),{23:[1,41]},{25:[1,42]},{27:[1,43]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(F,[2,54]),s(F,[2,55]),s(F,[2,56]),s(F,[2,57]),s(F,[2,58]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},s(i,[2,4]),{11:49,40:S,48:D,50:R,51:T,52:x},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:Y},{11:56,40:S,48:D,50:R,51:T,52:x},{65:57,71:[1,58],72:[1,59]},s(P,[2,73]),s(P,[2,74]),s(P,[2,75]),s(P,[2,76]),s(P,[2,77]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:z,38:60,41:G,42:A,45:62,46:63,48:K,49:U},s(X,[2,37]),s(X,[2,38]),{16:68,40:O,41:N,42:A},{13:z,38:69,41:G,42:A,45:62,46:63,48:K,49:U},{13:[1,70],15:[1,71]},s(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:at,67:ct,68:ot,69:lt,70:ht}),{19:[1,74]},s(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:Y},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:at,67:ct,68:ot,69:lt,70:ht},s(bt,[2,78]),s(bt,[2,79]),{6:mt,10:kt,39:81,42:Et,47:St},{40:[1,86],41:[1,87]},s(Tt,[2,43],{46:88,13:z,41:G,48:K,49:U}),s(L,[2,45]),s(L,[2,50]),s(L,[2,51]),s(L,[2,52]),s(L,[2,53]),s(i,[2,41],{42:A}),{6:mt,10:kt,39:89,42:Et,47:St},{14:90,40:H,50:J,73:$},{16:94,40:O,41:N},{11:95,40:S,48:D,50:R,51:T,52:x},{18:96,19:[1,97],53:53,54:54,58:Y},s(i,[2,12]),{19:[2,60]},s(Z,[2,61],{56:98,57:99,60:100,62:Ot,63:Nt}),s([19,58,62,63],[2,67]),{58:[2,66]},s(i,[2,22],{15:[1,104],17:[1,103]}),s([40,48,50,51,52],[2,72]),s(i,[2,36]),{13:z,41:G,45:105,46:63,48:K,49:U},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(X,[2,39]),s(X,[2,40]),s(L,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,80]),s(i,[2,81]),s(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},s(i,[2,15]),s(Z,[2,62],{57:110,61:[1,111],63:Nt}),s(Z,[2,63]),s(ut,[2,68]),s(Z,[2,71]),s(ut,[2,70]),{18:112,19:[1,113],53:53,54:54,58:Y},{16:114,40:O,41:N},s(Tt,[2,44],{46:88,13:z,41:G,48:K,49:U}),{14:115,40:H,50:J,73:$},{16:116,40:O,41:N},{14:117,40:H,50:J,73:$},s(i,[2,13]),s(Z,[2,64]),{60:118,62:Ot},{19:[1,119]},s(i,[2,20]),s(i,[2,23],{17:[1,120],42:A}),s(i,[2,11]),{13:[1,121],42:A},s(i,[2,10]),s(ut,[2,69]),s(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:Y},{14:124,40:H,50:J,73:$},{19:[1,125]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:p(function(n,a){if(a.recoverable)this.trace(n);else{var l=new Error(n);throw l.hash=a,l}},"parseError"),parse:p(function(n){var a=this,l=[0],r=[],f=[null],t=[],j=this.table,e="",et=0,At=0,Lt=2,It=1,wt=t.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(C.yy[pt]=this.yy[pt]);_.setInput(n,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var ft=_.yylloc;t.push(ft);var Vt=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(b){l.length=l.length-2*b,f.length=f.length-b,t.length=t.length-b}p(Mt,"popStack");function Rt(){var b;return b=r.pop()||_.lex()||It,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}p(Rt,"lex");for(var g,v,m,yt,w={},st,E,xt,it;;){if(v=l[l.length-1],this.defaultActions[v]?m=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=Rt()),m=j[v]&&j[v][g]),typeof m>"u"||!m.length||!m[0]){var _t="";it=[];for(st in j[v])this.terminals_[st]&&st>Lt&&it.push("'"+this.terminals_[st]+"'");_.showPosition?_t="Parse error on line "+(et+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
|
-
Expecting `+it.join(", ")+", got '"+(this.terminals_[g]||g)+"'":_t="Parse error on line "+(et+1)+": Unexpected "+(g==It?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(_t,{text:_.match,token:this.terminals_[g]||g,line:_.yylineno,loc:ft,expected:it})}if(
|
|
3
|
+
Expecting `+it.join(", ")+", got '"+(this.terminals_[g]||g)+"'":_t="Parse error on line "+(et+1)+": Unexpected "+(g==It?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(_t,{text:_.match,token:this.terminals_[g]||g,line:_.yylineno,loc:ft,expected:it})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(m[0]){case 1:l.push(g),f.push(_.yytext),t.push(_.yylloc),l.push(m[1]),g=null,At=_.yyleng,e=_.yytext,et=_.yylineno,ft=_.yylloc;break;case 2:if(E=this.productions_[m[1]][1],w.$=f[f.length-E],w._$={first_line:t[t.length-(E||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(E||1)].first_column,last_column:t[t.length-1].last_column},Vt&&(w._$.range=[t[t.length-(E||1)].range[0],t[t.length-1].range[1]]),yt=this.performAction.apply(w,[e,At,et,C.yy,m[1],f,t].concat(wt)),typeof yt<"u")return yt;E&&(l=l.slice(0,-1*E*2),f=f.slice(0,-1*E),t=t.slice(0,-1*E)),l.push(this.productions_[m[1]][0]),f.push(w.$),t.push(w._$),xt=j[l[l.length-2]][l[l.length-1]],l.push(xt);break;case 3:return!0}}return!0},"parse")},Dt=(function(){var I={EOF:1,parseError:p(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:p(function(n,a){return this.yy=a||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:p(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:p(function(n){var a=n.length,l=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===r.length?this.yylloc.first_column:0)+r[r.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(n){this.unput(this.match.slice(n))},"less"),pastInput:p(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
|
|
5
5
|
`+a+"^"},"showPosition"),test_match:p(function(n,a){var l,r,f;if(this.options.backtrack_lexer&&(f={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(f.yylloc.range=this.yylloc.range.slice(0))),r=n[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(n[0].length),this.matched+=n[0],l=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var t in f)this[t]=f[t];return!1}return!1},"test_match"),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,a,l,r;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),t=0;t<f.length;t++)if(l=this._input.match(this.rules[f[t]]),l&&(!a||l[0].length>a[0].length)){if(a=l,r=t,this.options.backtrack_lexer){if(n=this.test_match(l,f[t]),n!==!1)return n;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(n=this.test_match(a,f[r]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:p(function(){var a=this.next();return a||this.lex()},"lex"),begin:p(function(a){this.conditionStack.push(a)},"begin"),popState:p(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:p(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:p(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:p(function(a){this.begin(a)},"pushState"),stateStackSize:p(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:p(function(a,l,r,f){switch(r){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 73;case 16:return 4;case 17:return this.begin("block"),17;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 62;case 25:return 58;case 26:return 58;case 27:this.begin("block_bq");break;case 28:return 58;case 29:this.popState();break;case 30:return 63;case 31:break;case 32:return this.popState(),19;case 33:return l.yytext[0];case 34:return 20;case 35:return 21;case 36:return this.begin("style"),44;case 37:return this.popState(),10;case 38:break;case 39:return 13;case 40:return 42;case 41:return 49;case 42:return this.begin("style"),37;case 43:return 43;case 44:return 66;case 45:return 68;case 46:return 68;case 47:return 68;case 48:return 66;case 49:return 66;case 50:return 67;case 51:return 67;case 52:return 67;case 53:return 67;case 54:return 67;case 55:return 68;case 56:return 67;case 57:return 68;case 58:return 69;case 59:return 69;case 60:return 51;case 61:return 69;case 62:return 69;case 63:return 69;case 64:return 52;case 65:return 48;case 66:return 69;case 67:return 66;case 68:return 67;case 69:return 68;case 70:return 70;case 71:return 71;case 72:return 72;case 73:return 72;case 74:return 71;case 75:return 71;case 76:return 71;case 77:return 41;case 78:return 47;case 79:return 40;case 80:return l.yytext[0];case 81:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[37,38,39,40,41,77,78],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[28,29],inclusive:!1},block:{rules:[23,24,25,26,27,30,31,32,33],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,34,35,36,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,79,80,81],inclusive:!0}}};return I})();dt.lexer=Dt;function tt(){this.yy={}}return p(tt,"Parser"),tt.prototype=dt,dt.Parser=tt,new tt})();gt.parser=gt;var te=gt,M,ee=(M=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Yt,this.getAccTitle=Pt,this.setAccDescription=zt,this.getAccDescription=Gt,this.setDiagramTitle=Kt,this.getDiagramTitle=Ut,this.getConfig=p(()=>rt().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}addEntity(i,o=""){var h;return this.entities.has(i)?!((h=this.entities.get(i))!=null&&h.alias)&&o&&(this.entities.get(i).alias=o,V.info(`Add alias '${o}' to entity '${i}'`)):(this.entities.set(i,{id:`entity-${i}-${this.entities.size}`,label:i,attributes:[],alias:o,shape:"erBox",look:rt().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),V.info("Added new entity :",i)),this.entities.get(i)}getEntity(i){return this.entities.get(i)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(i,o){const h=this.addEntity(i);let c;for(c=o.length-1;c>=0;c--)o[c].keys||(o[c].keys=[]),o[c].comment||(o[c].comment=""),h.attributes.push(o[c]),V.debug("Added attribute ",o[c].name)}addRelationship(i,o,h,c){const u=this.entities.get(i),y=this.entities.get(h);if(!u||!y)return;const d={entityA:u.id,roleA:o,entityB:y.id,relSpec:c};this.relationships.push(d),V.debug("Added new relationship :",d)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(i){this.direction=i}getCompiledStyles(i){let o=[];for(const h of i){const c=this.classes.get(h);c!=null&&c.styles&&(o=[...o,...c.styles??[]].map(u=>u.trim())),c!=null&&c.textStyles&&(o=[...o,...c.textStyles??[]].map(u=>u.trim()))}return o}addCssStyles(i,o){for(const h of i){const c=this.entities.get(h);if(!o||!c)return;for(const u of o)c.cssStyles.push(u)}}addClass(i,o){i.forEach(h=>{let c=this.classes.get(h);c===void 0&&(c={id:h,styles:[],textStyles:[]},this.classes.set(h,c)),o&&o.forEach(function(u){if(/color/.exec(u)){const y=u.replace("fill","bgFill");c.textStyles.push(y)}c.styles.push(u)})})}setClass(i,o){for(const h of i){const c=this.entities.get(h);if(c)for(const u of o)c.cssClasses+=" "+u}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],Zt()}getData(){const i=[],o=[],h=rt();let c=0;for(const y of this.entities.keys()){const d=this.entities.get(y);d&&(d.cssCompiledStyles=this.getCompiledStyles(d.cssClasses.split(" ")),d.colorIndex=c++,i.push(d))}let u=0;for(const y of this.relationships){const d={id:jt(y.entityA,y.entityB,{prefix:"id",counter:u++}),type:"normal",curve:"basis",start:y.entityA,end:y.entityB,label:y.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:y.relSpec.cardB.toLowerCase(),arrowTypeEnd:y.relSpec.cardA.toLowerCase(),pattern:y.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:h.look,labelType:"markdown"};o.push(d)}return{nodes:i,edges:o,other:{},config:h,direction:"TB"}}},p(M,"ErDB"),M),vt={};qt(vt,{draw:()=>se});var se=p(async function(s,i,o,h){V.info("REF0:"),V.info("Drawing er diagram (unified)",i);const{securityLevel:c,er:u,layout:y}=rt(),d=h.db.getData(),
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:p(function(){var a=this.next();return a||this.lex()},"lex"),begin:p(function(a){this.conditionStack.push(a)},"begin"),popState:p(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:p(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:p(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:p(function(a){this.begin(a)},"pushState"),stateStackSize:p(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:p(function(a,l,r,f){switch(r){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 73;case 16:return 4;case 17:return this.begin("block"),17;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 62;case 25:return 58;case 26:return 58;case 27:this.begin("block_bq");break;case 28:return 58;case 29:this.popState();break;case 30:return 63;case 31:break;case 32:return this.popState(),19;case 33:return l.yytext[0];case 34:return 20;case 35:return 21;case 36:return this.begin("style"),44;case 37:return this.popState(),10;case 38:break;case 39:return 13;case 40:return 42;case 41:return 49;case 42:return this.begin("style"),37;case 43:return 43;case 44:return 66;case 45:return 68;case 46:return 68;case 47:return 68;case 48:return 66;case 49:return 66;case 50:return 67;case 51:return 67;case 52:return 67;case 53:return 67;case 54:return 67;case 55:return 68;case 56:return 67;case 57:return 68;case 58:return 69;case 59:return 69;case 60:return 51;case 61:return 69;case 62:return 69;case 63:return 69;case 64:return 52;case 65:return 48;case 66:return 69;case 67:return 66;case 68:return 67;case 69:return 68;case 70:return 70;case 71:return 71;case 72:return 72;case 73:return 72;case 74:return 71;case 75:return 71;case 76:return 71;case 77:return 41;case 78:return 47;case 79:return 40;case 80:return l.yytext[0];case 81:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[37,38,39,40,41,77,78],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[28,29],inclusive:!1},block:{rules:[23,24,25,26,27,30,31,32,33],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,34,35,36,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,79,80,81],inclusive:!0}}};return I})();dt.lexer=Dt;function tt(){this.yy={}}return p(tt,"Parser"),tt.prototype=dt,dt.Parser=tt,new tt})();gt.parser=gt;var te=gt,M,ee=(M=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Yt,this.getAccTitle=Pt,this.setAccDescription=zt,this.getAccDescription=Gt,this.setDiagramTitle=Kt,this.getDiagramTitle=Ut,this.getConfig=p(()=>rt().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}addEntity(i,o=""){var h;return this.entities.has(i)?!((h=this.entities.get(i))!=null&&h.alias)&&o&&(this.entities.get(i).alias=o,V.info(`Add alias '${o}' to entity '${i}'`)):(this.entities.set(i,{id:`entity-${i}-${this.entities.size}`,label:i,attributes:[],alias:o,shape:"erBox",look:rt().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),V.info("Added new entity :",i)),this.entities.get(i)}getEntity(i){return this.entities.get(i)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(i,o){const h=this.addEntity(i);let c;for(c=o.length-1;c>=0;c--)o[c].keys||(o[c].keys=[]),o[c].comment||(o[c].comment=""),h.attributes.push(o[c]),V.debug("Added attribute ",o[c].name)}addRelationship(i,o,h,c){const u=this.entities.get(i),y=this.entities.get(h);if(!u||!y)return;const d={entityA:u.id,roleA:o,entityB:y.id,relSpec:c};this.relationships.push(d),V.debug("Added new relationship :",d)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(i){this.direction=i}getCompiledStyles(i){let o=[];for(const h of i){const c=this.classes.get(h);c!=null&&c.styles&&(o=[...o,...c.styles??[]].map(u=>u.trim())),c!=null&&c.textStyles&&(o=[...o,...c.textStyles??[]].map(u=>u.trim()))}return o}addCssStyles(i,o){for(const h of i){const c=this.entities.get(h);if(!o||!c)return;for(const u of o)c.cssStyles.push(u)}}addClass(i,o){i.forEach(h=>{let c=this.classes.get(h);c===void 0&&(c={id:h,styles:[],textStyles:[]},this.classes.set(h,c)),o&&o.forEach(function(u){if(/color/.exec(u)){const y=u.replace("fill","bgFill");c.textStyles.push(y)}c.styles.push(u)})})}setClass(i,o){for(const h of i){const c=this.entities.get(h);if(c)for(const u of o)c.cssClasses+=" "+u}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],Zt()}getData(){const i=[],o=[],h=rt();let c=0;for(const y of this.entities.keys()){const d=this.entities.get(y);d&&(d.cssCompiledStyles=this.getCompiledStyles(d.cssClasses.split(" ")),d.colorIndex=c++,i.push(d))}let u=0;for(const y of this.relationships){const d={id:jt(y.entityA,y.entityB,{prefix:"id",counter:u++}),type:"normal",curve:"basis",start:y.entityA,end:y.entityB,label:y.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:y.relSpec.cardB.toLowerCase(),arrowTypeEnd:y.relSpec.cardA.toLowerCase(),pattern:y.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:h.look,labelType:"markdown"};o.push(d)}return{nodes:i,edges:o,other:{},config:h,direction:"TB"}}},p(M,"ErDB"),M),vt={};qt(vt,{draw:()=>se});var se=p(async function(s,i,o,h){V.info("REF0:"),V.info("Drawing er diagram (unified)",i);const{securityLevel:c,er:u,layout:y}=rt(),d=h.db.getData(),k=Bt(i,c);d.type=h.type,d.layoutAlgorithm=Qt(y),d.config.flowchart.nodeSpacing=(u==null?void 0:u.nodeSpacing)||140,d.config.flowchart.rankSpacing=(u==null?void 0:u.rankSpacing)||80,d.direction=h.db.getDirection();const{config:W}=d,{look:q}=W;q==="neo"?d.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:d.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],d.diagramId=i,await Xt(d,k),d.layoutAlgorithm==="elk"&&k.select(".edges").lower();const S=k.selectAll('[id*="-background"]');Array.from(S).length>0&&S.each(function(){const B=Jt(this),R=B.attr("id").replace("-background",""),T=k.select(`#${CSS.escape(R)}`);if(!T.empty()){const x=T.attr("transform");B.attr("transform",x)}});const Q=8;Ht.insertTitle(k,"erDiagramTitleText",(u==null?void 0:u.titleTopMargin)??25,h.db.getDiagramTitle()),Ft(k,Q,"erDiagram",(u==null?void 0:u.useMaxWidth)??!0)},"draw"),Ct=p((s,i)=>{const o=$t,h=o(s,"r"),c=o(s,"g"),u=o(s,"b");return Wt(h,c,u,i)},"fade"),nt=new Set(["redux-color","redux-dark-color"]),ie=p(s=>{const{theme:i,look:o,bkgColorArray:h,borderColorArray:c}=s;if(!nt.has(i))return"";const u=(h==null?void 0:h.length)>0;let y="";for(let d=0;d<s.THEME_COLOR_LIMIT;d++)y+=`
|
|
7
7
|
|
|
8
8
|
[data-look="${o}"][data-color-id="color-${d}"].node path {
|
|
9
9
|
stroke: ${c[d]};
|
|
@@ -82,4 +82,4 @@ Expecting `+it.join(", ")+", got '"+(this.terminals_[g]||g)+"'":_t="Parse error
|
|
|
82
82
|
[data-look=neo].labelBkg {
|
|
83
83
|
background-color: ${Ct(s.tertiaryColor,.5)};
|
|
84
84
|
}
|
|
85
|
-
`},"getStyles"),ne=re,
|
|
85
|
+
`},"getStyles"),ne=re,fe={parser:te,get db(){return new ee},renderer:vt,styles:ne};export{fe as diagram};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import{g as Kt}from"./chunk-NDIOYS4C-D4XcxlS5.js";import{_ as f,b as Zt,a as jt,s as qt,g as Wt,n as Ht,o as Qt,c as st,l as Y,i as Xt,p as Jt,q as $t,t as te,u as ee,v as se,x as ie,y as re,z as ae}from"./render-O7CIS3YK-BtRzL6gS.js";import{s as ne}from"./chunk-ISA7TJRJ-AUc9mrxX.js";import{s as oe}from"./transform-CzGDKG_M.js";import{_ as E}from"./mermaid-layout-elk.core-C4McJve2.js";import"./main-B239_4z1.js";import"./index-B6q9ygFx.js";import"./step-SI6FXFD6.js";import"./_commonjs-dynamic-modules-TDtrdbi3.js";var Nt=(function(){var s=f(function(F,n,h,d){for(h=h||{},d=F.length;d--;h[F[d]]=n);return h},"o"),a=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],l=[2,2],o=[1,7],r=[1,9],c=[1,10],y=[1,11],b=[1,12],k=[1,30],v=[1,23],p=[1,24],g=[1,25],I=[1,26],D=[1,27],N=[1,19],x=[1,28],A=[1,29],C=[1,20],L=[1,18],w=[1,21],V=[1,22],Ct=[2,6],u=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],ft=[1,36],bt=[1,37],gt=[1,38],yt=[1,39],_t=[1,40],j=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],M=[1,46],B=[1,47],q=[1,57],W=[43,51,53,54,55,74,75],H=[1,70],Q=[1,68],G=[1,65],X=[1,69],J=[1,71],it=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],rt=[1,78],at=[1,77],nt=[1,76],It=[69,70,71,72,73],At=[1,91],Rt=[6,9,45,50],K=[6,9,12,44,45,50,51,52],ot=[1,101],lt=[1,100],ct=[1,99],$=[18,61],vt=[1,110],Dt=[1,109],Lt=[20,43,51,53,54,55],kt=[18,61,64,66],mt={trace:f(E(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:f(E(function(n,h,d,i,_,t,et){var e=t.length-1;switch(_){case 1:break;case 2:this.$=[];break;case 3:this.$=t[e-1].concat(t[e]);break;case 4:this.$=t[e];break;case 5:case 6:this.$=[];break;case 7:i.addEntity(t[e-4]),i.addEntity(t[e-2]),i.addRelationship(t[e-4],t[e],t[e-2],t[e-3]),this.$=[t[e-4],t[e-2]];break;case 8:i.addEntity(t[e-8]),i.addEntity(t[e-4]),i.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),i.setClass([t[e-8]],t[e-6]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-8],t[e-4]];break;case 9:i.addEntity(t[e-6]),i.addEntity(t[e-2]),i.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),i.setClass([t[e-6]],t[e-4]),this.$=[t[e-6],t[e-2]];break;case 10:i.addEntity(t[e-6]),i.addEntity(t[e-4]),i.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-6],t[e-4]];break;case 11:i.addEntity(t[e-3]),i.addAttributes(t[e-3],t[e-1]),this.$=[t[e-3]];break;case 12:i.addEntity(t[e-5]),i.addAttributes(t[e-5],t[e-1]),i.setClass([t[e-5]],t[e-3]),this.$=[t[e-5]];break;case 13:i.addEntity(t[e-2]),this.$=[t[e-2]];break;case 14:i.addEntity(t[e-4]),i.setClass([t[e-4]],t[e-2]),this.$=[t[e-4]];break;case 15:i.addEntity(t[e]),this.$=[t[e]];break;case 16:i.addEntity(t[e-2]),i.setClass([t[e-2]],t[e]),this.$=[t[e-2]];break;case 17:i.addEntity(t[e-6],t[e-4]),i.addAttributes(t[e-6],t[e-1]),this.$=[t[e-6]];break;case 18:i.addEntity(t[e-8],t[e-6]),i.addAttributes(t[e-8],t[e-1]),i.setClass([t[e-8]],t[e-3]),this.$=[t[e-8]];break;case 19:i.addEntity(t[e-5],t[e-3]),this.$=[t[e-5]];break;case 20:i.addEntity(t[e-7],t[e-5]),i.setClass([t[e-7]],t[e-2]),this.$=[t[e-7]];break;case 21:i.addEntity(t[e-3],t[e-1]);break;case 22:i.addEntity(t[e-5],t[e-3]),i.setClass([t[e-5]],t[e]);break;case 23:case 24:this.$=t[e].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=t[e].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=t[e]:(i.setDirection(t[e].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:t[e-2].id},t[e-1],{text:t[e-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-1],text:t[e-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:t[e-4],text:t[e-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[e];break;case 35:this.$=t[e-1]+" "+t[e];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[e-3],i.addClass(t[e-2],t[e-1]);break;case 41:case 42:case 63:case 72:this.$=[t[e]];break;case 43:case 44:this.$=t[e-2].concat([t[e]]);break;case 45:this.$=t[e-2],i.setClass(t[e-1],t[e]);break;case 46:this.$=t[e-3],i.addCssStyles(t[e-2],t[e-1]);break;case 47:this.$=[t[e]];break;case 48:t[e-2].push(t[e]),this.$=t[e-2];break;case 50:this.$=t[e-1]+t[e];break;case 58:case 84:case 85:this.$=t[e].replace(/"/g,"");break;case 64:t[e].push(t[e-1]),this.$=t[e];break;case 65:this.$={type:t[e-1],name:t[e]};break;case 66:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 67:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 68:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 69:case 71:case 74:this.$=t[e];break;case 70:this.$=t[e-1]+t[e];break;case 73:t[e-2].push(t[e]),this.$=t[e-2];break;case 75:this.$=t[e].replace(/"/g,"");break;case 76:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING;break}},"anonymous"),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(a,l,{5:3}),{6:[1,4],7:5,8:6,9:o,10:8,21:r,23:c,25:y,27:b,28:13,29:14,30:15,31:16,32:17,34:k,37:v,38:p,39:g,40:I,41:D,43:N,46:x,47:A,51:C,53:L,54:w,55:V},s(a,Ct,{1:[2,1]}),s(u,[2,3]),s(u,[2,4]),s(u,[2,5]),s(u,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:ft,70:bt,71:gt,72:yt,73:_t}),{22:[1,41]},{24:[1,42]},{26:[1,43]},s(u,[2,26]),s(u,[2,27]),s(u,[2,28]),s(u,[2,29]),s(u,[2,30]),s(u,l,{5:44}),s(j,[2,58]),s(j,[2,59]),s(j,[2,60]),s(j,[2,61]),s(j,[2,62]),s(u,[2,36]),s(u,[2,37]),s(u,[2,38]),s(u,[2,39]),{15:45,43:M,44:B},{15:48,43:M,44:B},{15:49,43:M,44:B},{10:50,43:N,51:C,53:L,54:w,55:V},{10:51,43:N,51:C,53:L,54:w,55:V},{15:52,43:M,44:B},{17:53,18:[1,54],56:55,57:56,61:q},{10:58,43:N,51:C,53:L,54:w,55:V},{68:59,74:[1,60],75:[1,61]},s(W,[2,77]),s(W,[2,78]),s(W,[2,79]),s(W,[2,80]),s(W,[2,81]),s(u,[2,23]),s(u,[2,24]),s(u,[2,25]),{6:[1,63],7:5,8:6,9:o,10:8,21:r,23:c,25:y,27:b,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:k,37:v,38:p,39:g,40:I,41:D,43:N,46:x,47:A,51:C,53:L,54:w,55:V},{12:H,42:64,44:Q,45:G,48:66,49:67,51:X,52:J},s(it,[2,41]),s(it,[2,42]),{15:72,43:M,44:B,45:G},{12:H,42:73,44:Q,45:G,48:66,49:67,51:X,52:J},{6:rt,9:at,19:[1,75],35:74,50:nt},{12:[1,79],14:[1,80]},s(u,[2,16],{67:35,11:81,16:[1,82],45:G,69:ft,70:bt,71:gt,72:yt,73:_t}),{18:[1,83]},s(u,[2,13]),{17:84,18:[2,63],56:55,57:56,61:q},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:ft,70:bt,71:gt,72:yt,73:_t},s(It,[2,82]),s(It,[2,83]),s(u,[2,31]),s(u,Ct),{6:rt,9:at,35:90,45:At,50:nt},{43:[1,92],44:[1,93]},s(Rt,[2,47],{49:94,12:H,44:Q,51:X,52:J}),s(K,[2,49]),s(K,[2,54]),s(K,[2,55]),s(K,[2,56]),s(K,[2,57]),s(u,[2,45],{45:G}),{6:rt,9:at,35:95,45:At,50:nt},s(u,[2,32]),{10:97,36:96,43:N,51:C,53:L,54:w,55:V},s(u,[2,51]),s(u,[2,52]),s(u,[2,53]),{13:98,43:ot,53:lt,76:ct},{15:102,43:M,44:B},{10:103,43:N,51:C,53:L,54:w,55:V},{17:104,18:[1,105],56:55,57:56,61:q},s(u,[2,11]),{18:[2,64]},s($,[2,65],{59:106,60:107,63:108,65:vt,66:Dt}),s([18,61,65,66],[2,71]),{61:[2,70]},s(u,[2,21],{14:[1,112],16:[1,111]}),s([43,51,53,54,55],[2,76]),s(u,[2,40]),{12:H,44:Q,48:113,49:67,51:X,52:J},s(it,[2,43]),s(it,[2,44]),s(K,[2,50]),s(u,[2,46]),{10:115,20:[1,114],43:N,51:C,53:L,54:w,55:V},s(Lt,[2,34]),s(u,[2,7]),s(u,[2,84]),s(u,[2,85]),s(u,[2,86]),{12:[1,116],45:G},{12:[1,118],14:[1,117]},{18:[1,119]},s(u,[2,14]),s($,[2,66],{60:120,64:[1,121],66:Dt}),s($,[2,67]),s(kt,[2,72]),s($,[2,75]),s(kt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:q},{15:124,43:M,44:B},s(Rt,[2,48],{49:94,12:H,44:Q,51:X,52:J}),{6:rt,9:at,35:125,50:nt},s(Lt,[2,35]),{13:126,43:ot,53:lt,76:ct},{15:127,43:M,44:B},{13:128,43:ot,53:lt,76:ct},s(u,[2,12]),s($,[2,68]),{63:129,65:vt},{18:[1,130]},s(u,[2,19]),s(u,[2,22],{16:[1,131],45:G}),s(u,[2,33]),s(u,[2,10]),{12:[1,132],45:G},s(u,[2,9]),s(kt,[2,73]),s(u,[2,17]),{17:133,18:[1,134],56:55,57:56,61:q},{13:135,43:ot,53:lt,76:ct},{18:[1,136]},s(u,[2,20]),s(u,[2,8]),s(u,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:f(E(function(n,h){if(h.recoverable)this.trace(n);else{var d=new Error(n);throw d.hash=h,d}},"parseError"),"parseError"),parse:f(E(function(n){var h=this,d=[0],i=[],_=[null],t=[],et=this.table,e="",ht=0,wt=0,Pt=2,Vt=1,zt=t.slice.call(arguments,1),m=Object.create(this.lexer),P={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(P.yy[Et]=this.yy[Et]);m.setInput(n,P.yy),P.yy.lexer=m,P.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var St=m.yylloc;t.push(St);var Ut=m.options&&m.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(T){d.length=d.length-2*T,_.length=_.length-T,t.length=t.length-T}E(Mt,"popStack"),f(Mt,"popStack");function Tt(){var T;return T=i.pop()||m.lex()||Vt,typeof T!="number"&&(T instanceof Array&&(i=T,T=i.pop()),T=h.symbols_[T]||T),T}E(Tt,"lex"),f(Tt,"lex");for(var S,z,O,xt,Z={},ut,R,Bt,dt;;){if(z=d[d.length-1],this.defaultActions[z]?O=this.defaultActions[z]:((S===null||typeof S>"u")&&(S=Tt()),O=et[z]&&et[z][S]),typeof O>"u"||!O.length||!O[0]){var Ot="";dt=[];for(ut in et[z])this.terminals_[ut]&&ut>Pt&&dt.push("'"+this.terminals_[ut]+"'");m.showPosition?Ot="Parse error on line "+(ht+1)+`:
|
|
2
|
+
`+m.showPosition()+`
|
|
3
|
+
Expecting `+dt.join(", ")+", got '"+(this.terminals_[S]||S)+"'":Ot="Parse error on line "+(ht+1)+": Unexpected "+(S==Vt?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(Ot,{text:m.match,token:this.terminals_[S]||S,line:m.yylineno,loc:St,expected:dt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+S);switch(O[0]){case 1:d.push(S),_.push(m.yytext),t.push(m.yylloc),d.push(O[1]),S=null,wt=m.yyleng,e=m.yytext,ht=m.yylineno,St=m.yylloc;break;case 2:if(R=this.productions_[O[1]][1],Z.$=_[_.length-R],Z._$={first_line:t[t.length-(R||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(R||1)].first_column,last_column:t[t.length-1].last_column},Ut&&(Z._$.range=[t[t.length-(R||1)].range[0],t[t.length-1].range[1]]),xt=this.performAction.apply(Z,[e,wt,ht,P.yy,O[1],_,t].concat(zt)),typeof xt<"u")return xt;R&&(d=d.slice(0,-1*R*2),_=_.slice(0,-1*R),t=t.slice(0,-1*R)),d.push(this.productions_[O[1]][0]),_.push(Z.$),t.push(Z._$),Bt=et[d[d.length-2]][d[d.length-1]],d.push(Bt);break;case 3:return!0}}return!0},"parse"),"parse")},Yt=(function(){var F={EOF:1,parseError:f(E(function(h,d){if(this.yy.parser)this.yy.parser.parseError(h,d);else throw new Error(h)},"parseError"),"parseError"),setInput:f(function(n,h){return this.yy=h||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var h=n.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:f(function(n){var h=n.length,d=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===i.length?this.yylloc.first_column:0)+i[i.length-d.length].length-d[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(n){this.unput(this.match.slice(n))},"less"),pastInput:f(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var n=this.pastInput(),h=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
|
|
5
|
+
`+h+"^"},"showPosition"),test_match:f(function(n,h){var d,i,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),i=n[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(n[0].length),this.matched+=n[0],d=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var t in _)this[t]=_[t];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,h,d,i;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),t=0;t<_.length;t++)if(d=this._input.match(this.rules[_[t]]),d&&(!h||d[0].length>h[0].length)){if(h=d,i=t,this.options.backtrack_lexer){if(n=this.test_match(d,_[t]),n!==!1)return n;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(n=this.test_match(h,_[i]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(E(function(){var h=this.next();return h||this.lex()},"lex"),"lex"),begin:f(E(function(h){this.conditionStack.push(h)},"begin"),"begin"),popState:f(E(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:f(E(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:f(E(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),"topState"),pushState:f(E(function(h){this.begin(h)},"pushState"),"pushState"),stateStackSize:f(E(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:f(E(function(h,d,i,_){switch(i){case 0:return this.begin("acc_title"),23;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),25;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin("block_bq");break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;case 32:return d.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;case 36:return this.popState(),9;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin("style"),41;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return d.yytext[0];case 82:return 6}},"anonymous"),"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}};return F})();mt.lexer=Yt;function tt(){this.yy={}}return E(tt,"Parser"),f(tt,"Parser"),tt.prototype=mt,mt.Parser=tt,new tt})();Nt.parser=Nt;var le=Nt,U,ce=(U=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Zt,this.getAccTitle=jt,this.setAccDescription=qt,this.getAccDescription=Wt,this.setDiagramTitle=Ht,this.getDiagramTitle=Qt,this.getConfig=f(()=>st().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}addEntity(a,l=""){var o;return this.entities.has(a)?!((o=this.entities.get(a))!=null&&o.alias)&&l&&(this.entities.get(a).alias=l,Y.info(`Add alias '${l}' to entity '${a}'`)):(this.entities.set(a,{id:`entity-${a}-${this.entities.size}`,label:a,attributes:[],alias:l,shape:"erBox",look:st().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),Y.info("Added new entity :",a)),this.entities.get(a)}getEntity(a){return this.entities.get(a)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(a,l){const o=this.addEntity(a);let r;for(r=l.length-1;r>=0;r--)l[r].keys||(l[r].keys=[]),l[r].comment||(l[r].comment=""),o.attributes.push(l[r]),Y.debug("Added attribute ",l[r].name)}addRelationship(a,l,o,r){let c;if(this.subGraphLookup.has(a))c=a;else{const k=this.addEntity(a);if(!k)return;c=k.id}let y;if(this.subGraphLookup.has(o))y=o;else{const k=this.addEntity(o);if(!k)return;y=k.id}const b={entityA:c,roleA:l,entityB:y,relSpec:r};this.relationships.push(b),Y.debug("Added new relationship :",b)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(a){this.direction=a}getCompiledStyles(a){let l=[];for(const o of a){const r=this.classes.get(o);r!=null&&r.styles&&(l=[...l,...r.styles??[]].map(c=>c.trim())),r!=null&&r.textStyles&&(l=[...l,...r.textStyles??[]].map(c=>c.trim()))}return l}addCssStyles(a,l){for(const o of a){const r=this.entities.get(o),c=this.subGraphLookup.get(o);if(l){if(r)for(const y of l)r.cssStyles.push(y);if(c){c.cssStyles||(c.cssStyles=[]);for(const y of l)c.cssStyles.push(y)}}}}addClass(a,l){a.forEach(o=>{let r=this.classes.get(o);r===void 0&&(r={id:o,styles:[],textStyles:[]},this.classes.set(o,r)),l&&l.forEach(function(c){if(/color/.exec(c)){const y=c.replace("fill","bgFill");r.textStyles.push(y)}r.styles.push(c)})})}addSubGraph(a,l,o){let r=a.text.trim(),c=o.text;const b=f(g=>{const I=new Set;let D;return{nodeList:g.filter(x=>{if(x!=null&&x.stmt)return x.stmt==="dir"&&(D=x.value),!1;if(typeof x!="string")return!1;const A=x.trim();return!A||I.has(A)?!1:(I.add(A),!0)}),dir:D}},"uniq")(l.flat()),k=b.nodeList,v=b.dir;r=r??"subGraph"+this.subCount,c=c||"",c=this.sanitizeText(c),this.subCount=this.subCount+1;const p={id:r,nodes:k,title:c.trim(),classes:[],cssStyles:[],dir:v,labelType:this.sanitizeNodeLabelType(o==null?void 0:o.type)};return Y.info("Adding",p.id,p.nodes,p.dir),p.nodes=this.makeUniq(p,this.subGraphs).nodes,this.subGraphs.push(p),this.subGraphLookup.set(r,p),r}getSubGraphs(){return this.subGraphs}setClass(a,l){for(const o of a){const r=this.entities.get(o);if(r)for(const y of l)r.cssClasses+=" "+y;const c=this.subGraphLookup.get(o);if(c)for(const y of l)c.classes.push(y)}}subgraphNodeCache(a){const l=new Set;for(const o of a)for(const r of o.nodes)l.add(r);return l}makeUniq(a,l){const o=this.subgraphNodeCache(l),r=[];return a.nodes.forEach((c,y)=>{o.has(c)?Y.warn(`Entity '${c}' already belongs to another subgraph and will be ignored`):r.push(a.nodes[y])}),{nodes:r}}sanitizeText(a){return Xt.sanitizeText(a,st())}sanitizeNodeLabelType(a){switch(a){case"markdown":case"string":case"text":return a;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,Jt()}getData(){const a=[],l=[],o=st(),r=this.getSubGraphs(),c=new Map,y=new Map;for(let p=r.length-1;p>=0;p--){const g=r[p];g.nodes.length>0&&y.set(g.id,!0);for(const I of g.nodes)c.set(I,g.id)}for(let p=r.length-1;p>=0;p--){const g=r[p];a.push({id:g.id,label:g.title,labelStyle:"",labelType:g.labelType,parentId:c.get(g.id),padding:8,cssCompiledStyles:this.getCompiledStyles(g.classes),cssStyles:g.cssStyles,cssClasses:g.classes.join(" "),shape:"rect",dir:g.dir,isGroup:!0,look:o.look})}const b=new Set(r.map(p=>p.id));let k=0;for(const p of this.entities.keys()){if(b.has(p))continue;const g=this.entities.get(p);g&&(g.cssCompiledStyles=this.getCompiledStyles(g.cssClasses.split(" ")),g.colorIndex=k++,a.push({...g,parentId:c.get(p),isGroup:!1}))}let v=0;for(const p of this.relationships){const g={id:$t(p.entityA,p.entityB,{prefix:"id",counter:v++}),type:"normal",curve:"basis",start:p.entityA,end:p.entityB,label:p.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:p.relSpec.cardB.toLowerCase(),arrowTypeEnd:p.relSpec.cardA.toLowerCase(),pattern:p.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:o.look,labelType:"markdown"};l.push(g)}return{nodes:a,edges:l,other:{},config:o,direction:this.direction}}},E(U,"ErDB"),f(U,"ErDB"),U),Ft={};se(Ft,{draw:E(()=>he,"draw")});var he=f(async function(s,a,l,o){Y.info("REF0:"),Y.info("Drawing er diagram (unified)",a);const{securityLevel:r,er:c,layout:y}=st(),b=o.db.getData(),k=Kt(a,r);b.type=o.type,b.layoutAlgorithm=ie(y),b.config.flowchart.nodeSpacing=(c==null?void 0:c.nodeSpacing)||140,b.config.flowchart.rankSpacing=(c==null?void 0:c.rankSpacing)||80,b.direction=o.db.getDirection();const{config:v}=b,{look:p}=v;p==="neo"?b.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:b.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],b.diagramId=a,await re(b,k),b.layoutAlgorithm==="elk"&&k.select(".edges").lower();const g=k.selectAll('[id*="-background"]');Array.from(g).length>0&&g.each(function(){const D=oe(this),x=D.attr("id").replace("-background",""),A=k.select(`#${CSS.escape(x)}`);if(!A.empty()){const C=A.attr("transform");D.attr("transform",C)}});const I=8;ae.insertTitle(k,"erDiagramTitleText",(c==null?void 0:c.titleTopMargin)??25,o.db.getDiagramTitle()),ne(k,I,"erDiagram",(c==null?void 0:c.useMaxWidth)??!0)},"draw"),Gt=f((s,a)=>{const l=ee,o=l(s,"r"),r=l(s,"g"),c=l(s,"b");return te(o,r,c,a)},"fade"),pt=new Set(["redux-color","redux-dark-color"]),ue=f(s=>{const{theme:a,look:l,bkgColorArray:o,borderColorArray:r}=s;if(!pt.has(a))return"";const c=(o==null?void 0:o.length)>0;let y="";for(let b=0;b<s.THEME_COLOR_LIMIT;b++)y+=`
|
|
7
|
+
|
|
8
|
+
[data-look="${l}"][data-color-id="color-${b}"].node path {
|
|
9
|
+
stroke: ${r[b]};
|
|
10
|
+
${c?`fill: ${o[b]};`:""}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-look="${l}"][data-color-id="color-${b}"].node rect {
|
|
14
|
+
stroke: ${r[b]};
|
|
15
|
+
${c?`fill: ${o[b]};`:""}
|
|
16
|
+
}
|
|
17
|
+
`;return y},"genColor"),de=f(s=>{const{look:a,theme:l,erEdgeLabelBackground:o,strokeWidth:r}=s;return`
|
|
18
|
+
${ue(s)}
|
|
19
|
+
.entityBox {
|
|
20
|
+
fill: ${s.mainBkg};
|
|
21
|
+
stroke: ${s.nodeBorder};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.relationshipLabelBox {
|
|
25
|
+
fill: ${s.tertiaryColor};
|
|
26
|
+
opacity: 0.7;
|
|
27
|
+
background-color: ${s.tertiaryColor};
|
|
28
|
+
rect {
|
|
29
|
+
opacity: 0.5;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.labelBkg {
|
|
34
|
+
background-color: ${pt.has(l)&&o?o:Gt(s.tertiaryColor,.5)};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.edgeLabel {
|
|
38
|
+
background-color: ${pt.has(l)&&o?o:s.edgeLabelBackground};
|
|
39
|
+
}
|
|
40
|
+
.edgeLabel .label rect {
|
|
41
|
+
fill: ${pt.has(l)&&o?o:s.edgeLabelBackground};
|
|
42
|
+
}
|
|
43
|
+
.edgeLabel .label text {
|
|
44
|
+
fill: ${s.textColor};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.edgeLabel .label {
|
|
48
|
+
fill: ${s.nodeBorder};
|
|
49
|
+
font-size: 14px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.label {
|
|
53
|
+
font-family: ${s.fontFamily};
|
|
54
|
+
color: ${s.nodeTextColor||s.textColor};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.edge-pattern-dashed {
|
|
58
|
+
stroke-dasharray: 8,8;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.node rect,
|
|
62
|
+
.node circle,
|
|
63
|
+
.node ellipse,
|
|
64
|
+
.node polygon
|
|
65
|
+
{
|
|
66
|
+
fill: ${s.mainBkg};
|
|
67
|
+
stroke: ${s.nodeBorder};
|
|
68
|
+
stroke-width: ${a==="neo"?r:"1px"};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.relationshipLine {
|
|
72
|
+
stroke: ${s.lineColor};
|
|
73
|
+
stroke-width: ${a==="neo"?r:"1px"};
|
|
74
|
+
fill: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.marker {
|
|
78
|
+
fill: none !important;
|
|
79
|
+
stroke: ${s.lineColor} !important;
|
|
80
|
+
stroke-width: 1;
|
|
81
|
+
}
|
|
82
|
+
[data-look=neo].labelBkg {
|
|
83
|
+
background-color: ${Gt(s.tertiaryColor,.5)};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cluster rect {
|
|
87
|
+
fill: ${s.clusterBkg??s.mainBkg};
|
|
88
|
+
stroke: ${s.clusterBorder??s.nodeBorder};
|
|
89
|
+
stroke-width: 1px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.cluster text {
|
|
93
|
+
fill: ${s.titleColor??s.textColor};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.cluster-label text {
|
|
97
|
+
fill: ${s.titleColor??s.textColor};
|
|
98
|
+
}
|
|
99
|
+
`},"getStyles"),pe=de,Te={parser:le,get db(){return new ce},renderer:Ft,styles:pe};export{Te as diagram};
|