keating 0.3.6 → 0.3.8
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/dist/src/cli/main.js +3 -0
- package/dist/src/core/config.js +4 -1
- package/dist/src/core/evolution.js +3 -31
- package/dist/src/core/map-elites.js +2 -29
- package/dist/src/core/map.js +3 -1
- package/dist/src/core/mutation.js +29 -0
- package/dist/src/core/policy.js +40 -14
- package/dist/src/core/project.js +21 -23
- package/dist/src/core/topics.js +6 -1
- package/dist/src/pi/hyperteacher-extension.js +1 -1
- package/dist/src/runtime/pi.js +6 -1
- package/package.json +1 -1
- package/web/dist/assets/{anthropic-BT6Vfzb1.js → anthropic-mDOoXVZn.js} +1 -1
- package/web/dist/assets/arc-BgYOxBdg.js +1 -0
- package/web/dist/assets/architecture-YZFGNWBL-MLoSDt-a.js +1 -0
- package/web/dist/assets/architectureDiagram-Q4EWVU46-Yh6i8NsV.js +36 -0
- package/web/dist/assets/{azure-openai-responses-CommX3YJ.js → azure-openai-responses-lDjfaDoj.js} +1 -1
- package/web/dist/assets/band-mY0qgSES.js +1 -0
- package/web/dist/assets/blockDiagram-DXYQGD6D-DUOEnS09.js +132 -0
- package/web/dist/assets/{c4Diagram-AHTNJAMY-VFfRZWWA.js → c4Diagram-AHTNJAMY-XzNOUnLt.js} +6 -6
- package/web/dist/assets/channel-BumC_1wb.js +1 -0
- package/web/dist/assets/{chunk-2KRD3SAO-B-AqvS0u.js → chunk-2KRD3SAO-mLbXjVje.js} +1 -1
- package/web/dist/assets/chunk-336JU56O-CQcnUKNW.js +2 -0
- package/web/dist/assets/chunk-426QAEUC-AjoT_j_q.js +1 -0
- package/web/dist/assets/{chunk-4BX2VUAB-0Z13aFAn.js → chunk-4BX2VUAB-DRZjGMDM.js} +1 -1
- package/web/dist/assets/{chunk-4TB4RGXK-DqC0Zwm7.js → chunk-4TB4RGXK-CAwQq2uM.js} +6 -6
- package/web/dist/assets/chunk-55IACEB6-C19HKnvd.js +1 -0
- package/web/dist/assets/{chunk-5FUZZQ4R-CApli0xX.js → chunk-5FUZZQ4R-Bw3BFJJs.js} +31 -31
- package/web/dist/assets/chunk-5PVQY5BW-Ciel-YVc.js +2 -0
- package/web/dist/assets/{chunk-67CJDMHE-Cx7uJS4d.js → chunk-67CJDMHE-DNZKE79k.js} +1 -1
- package/web/dist/assets/{chunk-7N4EOEYR-CYPNsFus.js → chunk-7N4EOEYR-BGZXIfBD.js} +1 -1
- package/web/dist/assets/{chunk-AA7GKIK3-rU0uhR_u.js → chunk-AA7GKIK3-CLWjm_Gk.js} +1 -1
- package/web/dist/assets/{chunk-BSJP7CBP-5VmcfR4-.js → chunk-BSJP7CBP-DwT1eVSc.js} +1 -1
- package/web/dist/assets/{chunk-CIAEETIT-CHJ-L8H1.js → chunk-CIAEETIT-DaQsGVwH.js} +1 -1
- package/web/dist/assets/{chunk-EDXVE4YY-DZHAJjMI.js → chunk-EDXVE4YY-DNeRJTiS.js} +1 -1
- package/web/dist/assets/{chunk-ENJZ2VHE-DbUDFa7w.js → chunk-ENJZ2VHE-Crfow0Ab.js} +6 -6
- package/web/dist/assets/{chunk-FMBD7UC4-BsYE5e_h.js → chunk-FMBD7UC4-BWSstEYx.js} +1 -1
- package/web/dist/assets/{chunk-FOC6F5B3-Cm6aoTv7.js → chunk-FOC6F5B3-BrTsf5ix.js} +1 -1
- package/web/dist/assets/{chunk-ICPOFSXX-C5eNZ4L6.js → chunk-ICPOFSXX-C04NFfJk.js} +5 -5
- package/web/dist/assets/{chunk-K5T4RW27-R7dAJ4rq.js → chunk-K5T4RW27-C6ErEFB0.js} +1 -1
- package/web/dist/assets/{chunk-KGLVRYIC-MO99YZXL.js → chunk-KGLVRYIC-DWgMrjZr.js} +1 -1
- package/web/dist/assets/{chunk-LIHQZDEY-DUJ656sT.js → chunk-LIHQZDEY-D3DWGnJT.js} +1 -1
- package/web/dist/assets/{chunk-ORNJ4GCN-DXuuEC1n.js → chunk-ORNJ4GCN-D0nhq27e.js} +1 -1
- package/web/dist/assets/{chunk-OYMX7WX6-pJlEprWq.js → chunk-OYMX7WX6-CQLx0cU3.js} +5 -5
- package/web/dist/assets/chunk-QZHKN3VN-X2zPgEFk.js +1 -0
- package/web/dist/assets/{chunk-U2HBQHQK-Mh_l9PLe.js → chunk-U2HBQHQK-FqDOW_Dq.js} +6 -6
- package/web/dist/assets/{chunk-X2U36JSP-BOeiJW0w.js → chunk-X2U36JSP-DiSftNGg.js} +1 -1
- package/web/dist/assets/{chunk-XPW4576I-fQ9SDvr_.js → chunk-XPW4576I-CTCFDURY.js} +1 -1
- package/web/dist/assets/chunk-YZCP3GAM-BhxShnp0.js +1 -0
- package/web/dist/assets/chunk-ZZ45TVLE-DMfGJuPz.js +1 -0
- package/web/dist/assets/classDiagram-6PBFFD2Q-qESk_xyE.js +1 -0
- package/web/dist/assets/classDiagram-v2-HSJHXN6E-BM1nmtfm.js +1 -0
- package/web/dist/assets/clone-CVy2b825.js +1 -0
- package/web/dist/assets/cose-bilkent-S5V4N54A-BWrDpSLZ.js +1 -0
- package/web/dist/assets/custom-tts-DA7XkgNJ.js +1 -0
- package/web/dist/assets/dagre-C_Y5Jrtl.js +1 -0
- package/web/dist/assets/dagre-KV5264BT-DcrvRRX1.js +4 -0
- package/web/dist/assets/diagram-5BDNPKRD-BsChRck6.js +10 -0
- package/web/dist/assets/{diagram-G4DWMVQ6-CtICKUFi.js → diagram-G4DWMVQ6-raeAsgoe.js} +12 -12
- package/web/dist/assets/diagram-MMDJMWI5-CuKsP84I.js +43 -0
- package/web/dist/assets/diagram-TYMM5635-T7ILcS3d.js +24 -0
- package/web/dist/assets/dist-DQ41Rxbw.js +1 -0
- package/web/dist/assets/dist-oYdMaa1U.js +10 -0
- package/web/dist/assets/{erDiagram-SMLLAGMA-uT88sBlT.js → erDiagram-SMLLAGMA-C9z6kYxH.js} +6 -6
- package/web/dist/assets/{flatten-C-u5nd5-.js → flatten-n72VCU_F.js} +1 -1
- package/web/dist/assets/flowDiagram-DWJPFMVM-BA3HBIvp.js +162 -0
- package/web/dist/assets/ganttDiagram-T4ZO3ILL-BXKKRsbk.js +292 -0
- package/web/dist/assets/gemini-live-dK40vCc5.js +2 -0
- package/web/dist/assets/gitGraph-7Q5UKJZL-Cy0KloCM.js +1 -0
- package/web/dist/assets/gitGraphDiagram-UUTBAWPF-CfGAccI8.js +106 -0
- package/web/dist/assets/{google-BdYNeCP_.js → google-BdS4iTyC.js} +1 -1
- package/web/dist/assets/{google-gemini-cli-DpxAL3K4.js → google-gemini-cli-ECA0sP3z.js} +1 -1
- package/web/dist/assets/{google-shared-DyQdgtsI.js → google-shared-DFv4ubOG.js} +1 -1
- package/web/dist/assets/{google-vertex-CKRybaXj.js → google-vertex-Duei77qD.js} +1 -1
- package/web/dist/assets/graphlib-sK54_wxh.js +1 -0
- package/web/dist/assets/index-B_MGHHww.js +3187 -0
- package/web/dist/assets/index-C_k9n6xi.css +2 -0
- package/web/dist/assets/info-OMHHGYJF-DiTlPM51.js +1 -0
- package/web/dist/assets/{infoDiagram-42DDH7IO-BbES7X_c.js → infoDiagram-42DDH7IO-CXoykyfr.js} +1 -1
- package/web/dist/assets/init-DugVGdkd.js +1 -0
- package/web/dist/assets/{isEmpty-DssUW35f.js → isEmpty-Lz_aOZWI.js} +1 -1
- package/web/dist/assets/{ishikawaDiagram-UXIWVN3A-DxQ28rho.js → ishikawaDiagram-UXIWVN3A-BJieXVMt.js} +6 -6
- package/web/dist/assets/{journeyDiagram-VCZTEJTY-D0X8qQ0P.js → journeyDiagram-VCZTEJTY-CwCyrnqT.js} +6 -6
- package/web/dist/assets/{kanban-definition-6JOO6SKY-DWYfSlpl.js → kanban-definition-6JOO6SKY-8ACmDHsl.js} +1 -1
- package/web/dist/assets/line-BqZCcbso.js +1 -0
- package/web/dist/assets/linear-CXf5Bx3D.js +1 -0
- package/web/dist/assets/math-Csj_9zpx.js +1 -0
- package/web/dist/assets/{mermaid-parser.core-Cy4iY_Dy.js → mermaid-parser.core-C8ylgsWV.js} +2 -2
- package/web/dist/assets/mermaid.core-BHCT6V24.js +11 -0
- package/web/dist/assets/{mindmap-definition-QFDTVHPH-BBnKdtQh.js → mindmap-definition-QFDTVHPH-DrDAZL9Q.js} +1 -1
- package/web/dist/assets/{mistral-BWaUMIgd.js → mistral-BCIirCkW.js} +1 -1
- package/web/dist/assets/{openai-codex-responses-CHBgKhmb.js → openai-codex-responses-BgRTWVD_.js} +1 -1
- package/web/dist/assets/{openai-completions-kcXmmaHI.js → openai-completions-D5AUQEua.js} +1 -1
- package/web/dist/assets/openai-realtime-BCZmIToJ.js +1 -0
- package/web/dist/assets/{openai-responses-Cqq3H3p3.js → openai-responses-CTlQ1a-G.js} +1 -1
- package/web/dist/assets/{openai-responses-shared-CTNuo9ci.js → openai-responses-shared-CLzQyVyy.js} +1 -1
- package/web/dist/assets/openai-tts-BRg2goic.js +1 -0
- package/web/dist/assets/{ordinal-_K3x1fkz.js → ordinal-CHOvK70a.js} +1 -1
- package/web/dist/assets/ort.bundle.min-Drf2fDrC.js +2805 -0
- package/web/dist/assets/packet-4T2RLAQJ-EXgAtQjm.js +1 -0
- package/web/dist/assets/path-BVVvcbiy.js +1 -0
- package/web/dist/assets/pie-ZZUOXDRM-dKU8mzlj.js +1 -0
- package/web/dist/assets/pieDiagram-DEJITSTG-CSnulv9o.js +30 -0
- package/web/dist/assets/{quadrantDiagram-34T5L4WZ-DfBSEept.js → quadrantDiagram-34T5L4WZ-DiM-1bw4.js} +6 -6
- package/web/dist/assets/radar-PYXPWWZC-B4d2wh2H.js +1 -0
- package/web/dist/assets/{reduce-836A2NiQ.js → reduce-r7gP4wdg.js} +1 -1
- package/web/dist/assets/renderer-BHoCfdWO-BFpsm4dw.js +1 -0
- package/web/dist/assets/requirementDiagram-MS252O5E-CunJUnIN.js +84 -0
- package/web/dist/assets/{sankeyDiagram-XADWPNL6-He3x9tNT.js → sankeyDiagram-XADWPNL6-DaA_56zq.js} +7 -7
- package/web/dist/assets/{sequenceDiagram-FGHM5R23-DfCDpvrT.js → sequenceDiagram-FGHM5R23-CG_SeqVO.js} +13 -13
- package/web/dist/assets/speech-ZNExxXBR.js +2 -0
- package/web/dist/assets/src-BfaOho0B.js +1 -0
- package/web/dist/assets/state-CrA0YVPh-wJ4Rmm6M.js +27 -0
- package/web/dist/assets/stateDiagram-FHFEXIEX-CSUigMtP.js +1 -0
- package/web/dist/assets/stateDiagram-v2-QKLJ7IA2-CgpYzp7D.js +1 -0
- package/web/dist/assets/step-qalMyYGy.js +1 -0
- package/web/dist/assets/string-DPssBiak.js +1 -0
- package/web/dist/assets/supertonic-hDdNdgtO.js +2 -0
- package/web/dist/assets/time-DaCo2z7n.js +1 -0
- package/web/dist/assets/{timeline-definition-GMOUNBTQ-BWunHgBC.js → timeline-definition-GMOUNBTQ-DcMiH-gG.js} +7 -7
- package/web/dist/assets/transformers.web-R9eWI1xg.js +14 -0
- package/web/dist/assets/treeView-SZITEDCU-V29H5f16.js +1 -0
- package/web/dist/assets/treemap-W4RFUUIX-DsAU74TP.js +1 -0
- package/web/dist/assets/vennDiagram-DHZGUBPP-C6A75Q3q.js +34 -0
- package/web/dist/assets/wardley-RL74JXVD-lGAI4Cps.js +1 -0
- package/web/dist/assets/{wardleyDiagram-NUSXRM2D-DTcVscPH.js → wardleyDiagram-NUSXRM2D-XmYD0oYm.js} +1 -1
- package/web/dist/assets/xychartDiagram-5P7HB3ND-BgSoKcS9.js +7 -0
- package/web/dist/index.html +16 -3
- package/web/dist/sw.js +647 -1
- package/web/dist/workbox-2ae722a1.js +4390 -0
- package/web/dist/assets/arc-x2nTilpc.js +0 -1
- package/web/dist/assets/architecture-YZFGNWBL-B1hlUWjX.js +0 -1
- package/web/dist/assets/architectureDiagram-Q4EWVU46-CMApWFyw.js +0 -36
- package/web/dist/assets/blockDiagram-DXYQGD6D-DOQbsNRY.js +0 -132
- package/web/dist/assets/channel-KY2Tg8Ba.js +0 -1
- package/web/dist/assets/chunk-336JU56O-DlYgPyl6.js +0 -2
- package/web/dist/assets/chunk-426QAEUC-CsVoBkfR.js +0 -1
- package/web/dist/assets/chunk-55IACEB6-CWE_u-IY.js +0 -1
- package/web/dist/assets/chunk-5PVQY5BW-Cbzhfhln.js +0 -2
- package/web/dist/assets/chunk-QZHKN3VN-_pQxbbiW.js +0 -1
- package/web/dist/assets/chunk-YZCP3GAM-eboO4P5S.js +0 -1
- package/web/dist/assets/chunk-ZZ45TVLE-Cky0eqlr.js +0 -1
- package/web/dist/assets/classDiagram-6PBFFD2Q-DEPsZSU3.js +0 -1
- package/web/dist/assets/classDiagram-v2-HSJHXN6E-DhmIOEpX.js +0 -1
- package/web/dist/assets/clone-DeTzYqo8.js +0 -1
- package/web/dist/assets/cose-bilkent-S5V4N54A-N4zWUJ7C.js +0 -1
- package/web/dist/assets/dagre-IpK1aoMm.js +0 -1
- package/web/dist/assets/dagre-KV5264BT-DCytJuju.js +0 -4
- package/web/dist/assets/diagram-5BDNPKRD-Cv4miBae.js +0 -10
- package/web/dist/assets/diagram-MMDJMWI5-Cn7aGorh.js +0 -43
- package/web/dist/assets/diagram-TYMM5635-CCUWDPsC.js +0 -24
- package/web/dist/assets/dist-Dm98VvTW.js +0 -1
- package/web/dist/assets/flowDiagram-DWJPFMVM-Bl3O7S1m.js +0 -162
- package/web/dist/assets/ganttDiagram-T4ZO3ILL-B1FhwV45.js +0 -292
- package/web/dist/assets/gitGraph-7Q5UKJZL-Bc_7vzer.js +0 -1
- package/web/dist/assets/gitGraphDiagram-UUTBAWPF-DfW6svMS.js +0 -106
- package/web/dist/assets/graphlib-CMTVFyOZ.js +0 -1
- package/web/dist/assets/index-Bdb7P7gx.css +0 -2
- package/web/dist/assets/index-DNxepp8B.js +0 -2891
- package/web/dist/assets/info-OMHHGYJF-BGcxeaZt.js +0 -1
- package/web/dist/assets/init-DlZdxViB.js +0 -1
- package/web/dist/assets/line-CuHce5JG.js +0 -1
- package/web/dist/assets/linear-Ca0Vkwuj.js +0 -1
- package/web/dist/assets/mermaid.core-6PGkQdYc.js +0 -11
- package/web/dist/assets/packet-4T2RLAQJ-D35ZLSBH.js +0 -1
- package/web/dist/assets/path-6uRLdFF7.js +0 -1
- package/web/dist/assets/pie-ZZUOXDRM-DRoETpJX.js +0 -1
- package/web/dist/assets/pieDiagram-DEJITSTG-DfMjfTQz.js +0 -30
- package/web/dist/assets/radar-PYXPWWZC-DLKxRJ0V.js +0 -1
- package/web/dist/assets/requirementDiagram-MS252O5E-BPkxJQkz.js +0 -84
- package/web/dist/assets/src-DdOdIreR.js +0 -1
- package/web/dist/assets/stateDiagram-FHFEXIEX-fuww6347.js +0 -1
- package/web/dist/assets/stateDiagram-v2-QKLJ7IA2-U6voafO3.js +0 -1
- package/web/dist/assets/transformers.web-DKUtmSAi.js +0 -2818
- package/web/dist/assets/treeView-SZITEDCU-BCx0xSAm.js +0 -1
- package/web/dist/assets/treemap-W4RFUUIX-2CvghWJK.js +0 -1
- package/web/dist/assets/vennDiagram-DHZGUBPP-CBXRutSP.js +0 -34
- package/web/dist/assets/wardley-RL74JXVD-BkPL_mhd.js +0 -1
- package/web/dist/assets/xychartDiagram-5P7HB3ND-CZLgX9Fe.js +0 -7
- package/web/dist/workbox-66610c77.js +0 -1
- /package/web/dist/assets/{_baseFor-B_cjfMB6.js → _baseFor-2QgQJAzW.js} +0 -0
- /package/web/dist/assets/{array-B9UHiPd-.js → array-B4O_ir3H.js} +0 -0
- /package/web/dist/assets/{cytoscape.esm-BBMd0vGm.js → cytoscape.esm-CdzdaUMP.js} +0 -0
- /package/web/dist/assets/{defaultLocale-5eAKkKJC.js → defaultLocale-Bhb3osZR.js} +0 -0
- /package/web/dist/assets/{github-copilot-headers-L39QqneT.js → github-copilot-headers-BuUn5v2j.js} +0 -0
- /package/web/dist/assets/{hash-kZ2KD_no.js → hash-CQjDwcjR.js} +0 -0
- /package/web/dist/assets/{openai-D4NSaQIs.js → openai-CRGaNv9i.js} +0 -0
- /package/web/dist/assets/{rough.esm-Djo4Abte.js → rough.esm-D5NinLFK.js} +0 -0
- /package/web/dist/assets/{transform-messages-CqKEdRVp.js → transform-messages-DXDWLrnO.js} +0 -0
- /package/web/dist/assets/{web-CMKYLKbT.js → web-jLdm8a1-.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-K5T4RW27-C6ErEFB0.js";import{n as e}from"./chunk-FOC6F5B3-BrTsf5ix.js";export{e as createPacketServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return function(){return e}}var t=Math.PI,n=2*t,r=1e-6,i=n-r;function a(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function o(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return a;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var s=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?a:o(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,n,i,a,o){if(e=+e,n=+n,i=+i,a=+a,o=+o,o<0)throw Error(`negative radius: ${o}`);let s=this._x1,c=this._y1,l=i-e,u=a-n,d=s-e,f=c-n,p=d*d+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(p>r)if(!(Math.abs(f*l-u*d)>r)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let m=i-s,h=a-c,g=l*l+u*u,_=m*m+h*h,v=Math.sqrt(g),y=Math.sqrt(p),b=o*Math.tan((t-Math.acos((g+p-_)/(2*v*y)))/2),x=b/y,S=b/v;Math.abs(x-1)>r&&this._append`L${e+x*d},${n+x*f}`,this._append`A${o},${o},0,0,${+(f*m>d*h)},${this._x1=e+S*l},${this._y1=n+S*u}`}}arc(e,a,o,s,c,l){if(e=+e,a=+a,o=+o,l=!!l,o<0)throw Error(`negative radius: ${o}`);let u=o*Math.cos(s),d=o*Math.sin(s),f=e+u,p=a+d,m=1^l,h=l?s-c:c-s;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>r||Math.abs(this._y1-p)>r)&&this._append`L${f},${p}`,o&&(h<0&&(h=h%n+n),h>i?this._append`A${o},${o},0,1,${m},${e-u},${a-d}A${o},${o},0,1,${m},${this._x1=f},${this._y1=p}`:h>r&&this._append`A${o},${o},0,${+(h>=t)},${m},${this._x1=e+o*Math.cos(c)},${this._y1=a+o*Math.sin(c)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function c(){return new s}c.prototype=s.prototype;function l(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new s(t)}export{e as n,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-K5T4RW27-C6ErEFB0.js";import{n as e}from"./chunk-AA7GKIK3-CLWjm_Gk.js";export{e as createPieServices};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{n as e}from"./path-BVVvcbiy.js";import{p as t}from"./math-Csj_9zpx.js";import{t as n}from"./arc-BgYOxBdg.js";import{t as r}from"./array-B4O_ir3H.js";import{f as i,r as a}from"./chunk-5PVQY5BW-Ciel-YVc.js";import{n as o}from"./ordinal-CHOvK70a.js";import{i as s,r as c}from"./src-BfaOho0B.js";import{B as l,C as u,V as d,W as f,_ as p,a as m,b as h,c as g,d as _,v}from"./chunk-ICPOFSXX-C04NFfJk.js";import{t as y}from"./chunk-426QAEUC-AjoT_j_q.js";import{t as b}from"./chunk-4BX2VUAB-DRZjGMDM.js";import{t as x}from"./mermaid-parser.core-C8ylgsWV.js";function S(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function C(e){return e}function w(){var n=C,i=S,a=null,o=e(0),s=e(t),c=e(0);function l(e){var l,u=(e=r(e)).length,d,f,p=0,m=Array(u),h=Array(u),g=+o.apply(this,arguments),_=Math.min(t,Math.max(-t,s.apply(this,arguments)-g)),v,y=Math.min(Math.abs(_)/u,c.apply(this,arguments)),b=y*(_<0?-1:1),x;for(l=0;l<u;++l)(x=h[m[l]=l]=+n(e[l],l,e))>0&&(p+=x);for(i==null?a!=null&&m.sort(function(t,n){return a(e[t],e[n])}):m.sort(function(e,t){return i(h[e],h[t])}),l=0,f=p?(_-u*b)/p:0;l<u;++l,g=v)d=m[l],x=h[d],v=g+(x>0?x*f:0)+b,h[d]={data:e[d],index:l,value:x,startAngle:g,endAngle:v,padAngle:y};return h}return l.value=function(t){return arguments.length?(n=typeof t==`function`?t:e(+t),l):n},l.sortValues=function(e){return arguments.length?(i=e,a=null,l):i},l.sort=function(e){return arguments.length?(a=e,i=null,l):a},l.startAngle=function(t){return arguments.length?(o=typeof t==`function`?t:e(+t),l):o},l.endAngle=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),l):s},l.padAngle=function(t){return arguments.length?(c=typeof t==`function`?t:e(+t),l):c},l}var T=_.pie,E={sections:new Map,showData:!1,config:T},D=E.sections,O=E.showData,k=structuredClone(T),A={getConfig:c(()=>structuredClone(k),`getConfig`),clear:c(()=>{D=new Map,O=E.showData,m()},`clear`),setDiagramTitle:f,getDiagramTitle:u,setAccTitle:d,getAccTitle:v,setAccDescription:l,getAccDescription:p,addSection:c(({label:e,value:t})=>{if(t<0)throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);D.has(e)||(D.set(e,t),s.debug(`added new section: ${e}, with value: ${t}`))},`addSection`),getSections:c(()=>D,`getSections`),setShowData:c(e=>{O=e},`setShowData`),getShowData:c(()=>O,`getShowData`)},j=c((e,t)=>{b(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},`populateDb`),M={parse:c(async e=>{let t=await x(`pie`,e);s.debug(t),j(t,A)},`parse`)},N=c(e=>`
|
|
2
|
+
.pieCircle{
|
|
3
|
+
stroke: ${e.pieStrokeColor};
|
|
4
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
5
|
+
opacity : ${e.pieOpacity};
|
|
6
|
+
}
|
|
7
|
+
.pieOuterCircle{
|
|
8
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
9
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
10
|
+
fill: none;
|
|
11
|
+
}
|
|
12
|
+
.pieTitleText {
|
|
13
|
+
text-anchor: middle;
|
|
14
|
+
font-size: ${e.pieTitleTextSize};
|
|
15
|
+
fill: ${e.pieTitleTextColor};
|
|
16
|
+
font-family: ${e.fontFamily};
|
|
17
|
+
}
|
|
18
|
+
.slice {
|
|
19
|
+
font-family: ${e.fontFamily};
|
|
20
|
+
fill: ${e.pieSectionTextColor};
|
|
21
|
+
font-size:${e.pieSectionTextSize};
|
|
22
|
+
// fill: white;
|
|
23
|
+
}
|
|
24
|
+
.legend text {
|
|
25
|
+
fill: ${e.pieLegendTextColor};
|
|
26
|
+
font-family: ${e.fontFamily};
|
|
27
|
+
font-size: ${e.pieLegendTextSize};
|
|
28
|
+
}
|
|
29
|
+
`,`getStyles`),P=c(e=>{let t=[...e.values()].reduce((e,t)=>e+t,0),n=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>e.value/t*100>=1);return w().value(e=>e.value).sort(null)(n)},`createPieArcs`),F={parser:M,db:A,renderer:{draw:c((e,t,r,c)=>{s.debug(`rendering pie chart
|
|
30
|
+
`+e);let l=c.db,u=h(),d=a(l.getConfig(),u.pie),f=y(t),p=f.append(`g`);p.attr(`transform`,`translate(225,225)`);let{themeVariables:m}=u,[_]=i(m.pieOuterStrokeWidth);_??=2;let v=d.textPosition,b=n().innerRadius(0).outerRadius(185),x=n().innerRadius(185*v).outerRadius(185*v);p.append(`circle`).attr(`cx`,0).attr(`cy`,0).attr(`r`,185+_/2).attr(`class`,`pieOuterCircle`);let S=l.getSections(),C=P(S),w=[m.pie1,m.pie2,m.pie3,m.pie4,m.pie5,m.pie6,m.pie7,m.pie8,m.pie9,m.pie10,m.pie11,m.pie12],T=0;S.forEach(e=>{T+=e});let E=C.filter(e=>(e.data.value/T*100).toFixed(0)!==`0`),D=o(w).domain([...S.keys()]);p.selectAll(`mySlices`).data(E).enter().append(`path`).attr(`d`,b).attr(`fill`,e=>D(e.data.label)).attr(`class`,`pieCircle`),p.selectAll(`mySlices`).data(E).enter().append(`text`).text(e=>(e.data.value/T*100).toFixed(0)+`%`).attr(`transform`,e=>`translate(`+x.centroid(e)+`)`).style(`text-anchor`,`middle`).attr(`class`,`slice`);let O=p.append(`text`).text(l.getDiagramTitle()).attr(`x`,0).attr(`y`,-400/2).attr(`class`,`pieTitleText`),k=[...S.entries()].map(([e,t])=>({label:e,value:t})),A=p.selectAll(`.legend`).data(k).enter().append(`g`).attr(`class`,`legend`).attr(`transform`,(e,t)=>{let n=22*k.length/2;return`translate(216,`+(t*22-n)+`)`});A.append(`rect`).attr(`width`,18).attr(`height`,18).style(`fill`,e=>D(e.label)).style(`stroke`,e=>D(e.label)),A.append(`text`).attr(`x`,22).attr(`y`,14).text(e=>l.getShowData()?`${e.label} [${e.value}]`:e.label);let j=512+Math.max(...A.selectAll(`text`).nodes().map(e=>e?.getBoundingClientRect().width??0)),M=O.node()?.getBoundingClientRect().width??0,N=450/2-M/2,F=450/2+M/2,I=Math.min(0,N),L=Math.max(j,F)-I;f.attr(`viewBox`,`${I} 0 ${L} 450`),g(f,450,L,d.useMaxWidth)},`draw`)},styles:N};export{F as diagram};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"./linear-CXf5Bx3D.js";import{i as t,r as n,t as r}from"./src-BfaOho0B.js";import{B as i,C as a,E as o,L as s,V as c,W as l,_ as u,a as d,b as f,c as p,d as m,v as h}from"./chunk-ICPOFSXX-C04NFfJk.js";var g=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[1,7],s=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],h=[1,43],g=[1,41],_=[1,14],v=[1,23],y=[1,18],b=[1,19],x=[1,20],S=[1,21],C=[1,22],w=[1,24],T=[1,25],E=[1,26],D=[1,27],O=[1,28],k=[1,29],A=[1,32],j=[1,33],M=[1,34],N=[1,39],P=[1,40],F=[1,42],I=[1,44],L=[1,62],R=[1,61],z=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],B=[1,65],ee=[1,66],te=[1,67],ne=[1,68],re=[1,69],ie=[1,70],ae=[1,71],oe=[1,72],se=[1,73],ce=[1,74],le=[1,75],ue=[1,76],V=[4,5,6,7,8,9,10,11,12,13,14,15,18],H=[1,90],U=[1,91],W=[1,92],G=[1,99],K=[1,93],q=[1,96],J=[1,94],Y=[1,95],X=[1,97],Z=[1,98],de=[1,102],fe=[10,55,56,57],Q=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],pe={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:`error`,4:`ALPHA`,5:`NUM`,6:`NODE_STRING`,7:`DOWN`,8:`MINUS`,9:`DEFAULT`,10:`COMMA`,11:`COLON`,12:`AMP`,13:`BRKT`,14:`MULT`,15:`UNICODE_TEXT`,17:`UNIT`,18:`SPACE`,19:`STYLE`,20:`PCT`,25:`CLASSDEF`,28:`QUADRANT`,35:`title`,36:`title_value`,37:`acc_title`,38:`acc_title_value`,39:`acc_descr`,40:`acc_descr_value`,41:`acc_descr_multiline_value`,42:`section`,44:`point_start`,45:`point_x`,46:`point_y`,47:`class_name`,48:`X-AXIS`,49:`AXIS-TEXT-DELIMITER`,50:`Y-AXIS`,51:`QUADRANT_1`,52:`QUADRANT_2`,53:`QUADRANT_3`,54:`QUADRANT_4`,55:`NEWLINE`,56:`SEMI`,57:`EOF`,60:`STR`,61:`MD_STR`,63:`PUNCTUATION`,64:`PLUS`,65:`EQUALS`,66:`DOT`,67:`UNDERSCORE`},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[{18:t,26:1,27:2,28:r,55:i,56:a,57:o},{1:[3]},{18:t,26:8,27:2,28:r,55:i,56:a,57:o},{18:t,26:9,27:2,28:r,55:i,56:a,57:o},e(s,[2,33],{29:10}),e(c,[2,61]),e(c,[2,62]),e(c,[2,63]),{1:[2,30]},{1:[2,31]},e(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:h,14:g,18:_,25:v,35:y,37:b,39:x,41:S,42:C,48:w,50:T,51:E,52:D,53:O,54:k,60:A,61:j,63:M,64:N,65:P,66:F,67:I}),e(s,[2,34]),{27:45,55:i,56:a,57:o},e(l,[2,37]),e(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:f,10:p,12:m,13:h,14:g,18:_,25:v,35:y,37:b,39:x,41:S,42:C,48:w,50:T,51:E,52:D,53:O,54:k,60:A,61:j,63:M,64:N,65:P,66:F,67:I}),e(l,[2,39]),e(l,[2,40]),e(l,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},e(l,[2,45]),e(l,[2,46]),{18:[1,50]},{4:d,5:f,10:p,12:m,13:h,14:g,43:51,58:31,60:A,61:j,63:M,64:N,65:P,66:F,67:I},{4:d,5:f,10:p,12:m,13:h,14:g,43:52,58:31,60:A,61:j,63:M,64:N,65:P,66:F,67:I},{4:d,5:f,10:p,12:m,13:h,14:g,43:53,58:31,60:A,61:j,63:M,64:N,65:P,66:F,67:I},{4:d,5:f,10:p,12:m,13:h,14:g,43:54,58:31,60:A,61:j,63:M,64:N,65:P,66:F,67:I},{4:d,5:f,10:p,12:m,13:h,14:g,43:55,58:31,60:A,61:j,63:M,64:N,65:P,66:F,67:I},{4:d,5:f,10:p,12:m,13:h,14:g,43:56,58:31,60:A,61:j,63:M,64:N,65:P,66:F,67:I},{4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,44:[1,57],47:[1,58],58:60,59:59,63:M,64:N,65:P,66:F,67:I},e(z,[2,64]),e(z,[2,66]),e(z,[2,67]),e(z,[2,70]),e(z,[2,71]),e(z,[2,72]),e(z,[2,73]),e(z,[2,74]),e(z,[2,75]),e(z,[2,76]),e(z,[2,77]),e(z,[2,78]),e(z,[2,79]),e(z,[2,80]),e(s,[2,35]),e(l,[2,38]),e(l,[2,42]),e(l,[2,43]),e(l,[2,44]),{3:64,4:B,5:ee,6:te,7:ne,8:re,9:ie,10:ae,11:oe,12:se,13:ce,14:le,15:ue,21:63},e(l,[2,53],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,49:[1,77],63:M,64:N,65:P,66:F,67:I}),e(l,[2,56],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,49:[1,78],63:M,64:N,65:P,66:F,67:I}),e(l,[2,57],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,63:M,64:N,65:P,66:F,67:I}),e(l,[2,58],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,63:M,64:N,65:P,66:F,67:I}),e(l,[2,59],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,63:M,64:N,65:P,66:F,67:I}),e(l,[2,60],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,63:M,64:N,65:P,66:F,67:I}),{45:[1,79]},{44:[1,80]},e(z,[2,65]),e(z,[2,81]),e(z,[2,82]),e(z,[2,83]),{3:82,4:B,5:ee,6:te,7:ne,8:re,9:ie,10:ae,11:oe,12:se,13:ce,14:le,15:ue,18:[1,81]},e(V,[2,23]),e(V,[2,1]),e(V,[2,2]),e(V,[2,3]),e(V,[2,4]),e(V,[2,5]),e(V,[2,6]),e(V,[2,7]),e(V,[2,8]),e(V,[2,9]),e(V,[2,10]),e(V,[2,11]),e(V,[2,12]),e(l,[2,52],{58:31,43:83,4:d,5:f,10:p,12:m,13:h,14:g,60:A,61:j,63:M,64:N,65:P,66:F,67:I}),e(l,[2,55],{58:31,43:84,4:d,5:f,10:p,12:m,13:h,14:g,60:A,61:j,63:M,64:N,65:P,66:F,67:I}),{46:[1,85]},{45:[1,86]},{4:H,5:U,6:W,8:G,11:K,13:q,16:89,17:J,18:Y,19:X,20:Z,22:88,23:87},e(V,[2,24]),e(l,[2,51],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,63:M,64:N,65:P,66:F,67:I}),e(l,[2,54],{59:59,58:60,4:d,5:f,8:L,10:p,12:m,13:h,14:g,18:R,63:M,64:N,65:P,66:F,67:I}),e(l,[2,47],{22:88,16:89,23:100,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{46:[1,101]},e(l,[2,29],{10:de}),e(fe,[2,27],{16:103,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),e(Q,[2,25]),e(Q,[2,13]),e(Q,[2,14]),e(Q,[2,15]),e(Q,[2,16]),e(Q,[2,17]),e(Q,[2,18]),e(Q,[2,19]),e(Q,[2,20]),e(Q,[2,21]),e(Q,[2,22]),e(l,[2,49],{10:de}),e(l,[2,48],{22:88,16:89,23:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{4:H,5:U,6:W,8:G,11:K,13:q,16:89,17:J,18:Y,19:X,20:Z,22:105},e(Q,[2,26]),e(l,[2,50],{10:de}),e(fe,[2,28],{16:103,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z})],defaultActions:{8:[2,30],9:[2,31]},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
|
-
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};pe.lexer=(function(){return{EOF:1,parseError:
|
|
4
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:
|
|
5
|
-
`+t+`^`},`showPosition`),test_match:
|
|
6
|
-
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:t(function(){return this.next()||this.lex()},`lex`),begin:t(function(e){this.conditionStack.push(e)},`begin`),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:t(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:t(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:t(function(e){this.begin(e)},`pushState`),stateStackSize:t(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:t(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin(`title`),35;case 5:return this.popState(),`title_value`;case 6:return this.begin(`acc_title`),37;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),39;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin(`md_string`);break;case 22:return`MD_STR`;case 23:this.popState();break;case 24:this.begin(`string`);break;case 25:this.popState();break;case 26:return`STR`;case 27:this.begin(`class_name`);break;case 28:return this.popState(),47;case 29:return this.begin(`point_start`),44;case 30:return this.begin(`point_x`),45;case 31:this.popState();break;case 32:this.popState(),this.begin(`point_y`);break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}})();function $(){this.yy={}}return t($,`Parser`),$.prototype=pe,pe.Parser=$,new $})();g.parser=g;var _=g,v=a(),y=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{t(this,`QuadrantBuilder`)}getDefaultData(){return{titleText:``,quadrant1Text:``,quadrant2Text:``,quadrant3Text:``,quadrant4Text:``,xAxisLeftText:``,xAxisRightText:``,yAxisBottomText:``,yAxisTopText:``,points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:p.quadrantChart?.chartWidth||500,chartWidth:p.quadrantChart?.chartHeight||500,titlePadding:p.quadrantChart?.titlePadding||10,titleFontSize:p.quadrantChart?.titleFontSize||20,quadrantPadding:p.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:p.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:p.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:p.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:p.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:p.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:p.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:p.quadrantChart?.pointTextPadding||5,pointLabelFontSize:p.quadrantChart?.pointLabelFontSize||12,pointRadius:p.quadrantChart?.pointRadius||5,xAxisPosition:p.quadrantChart?.xAxisPosition||`top`,yAxisPosition:p.quadrantChart?.yAxisPosition||`left`,quadrantInternalBorderStrokeWidth:p.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:p.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:v.quadrant1Fill,quadrant2Fill:v.quadrant2Fill,quadrant3Fill:v.quadrant3Fill,quadrant4Fill:v.quadrant4Fill,quadrant1TextFill:v.quadrant1TextFill,quadrant2TextFill:v.quadrant2TextFill,quadrant3TextFill:v.quadrant3TextFill,quadrant4TextFill:v.quadrant4TextFill,quadrantPointFill:v.quadrantPointFill,quadrantPointTextFill:v.quadrantPointTextFill,quadrantXAxisTextFill:v.quadrantXAxisTextFill,quadrantYAxisTextFill:v.quadrantYAxisTextFill,quadrantTitleFill:v.quadrantTitleFill,quadrantInternalBorderStrokeFill:v.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:v.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,e.info(`clear called`)}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(t){e.trace(`setConfig called with: `,t),this.config={...this.config,...t}}setThemeConfig(t){e.trace(`setThemeConfig called with: `,t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(e,t,n,r){let i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:e===`top`&&t?i:0,bottom:e===`bottom`&&t?i:0},o=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,s={left:this.config.yAxisPosition===`left`&&n?o:0,right:this.config.yAxisPosition===`right`&&n?o:0},c=this.config.titleFontSize+this.config.titlePadding*2,l={top:r?c:0},u=this.config.quadrantPadding+s.left,d=this.config.quadrantPadding+a.top+l.top,f=this.config.chartWidth-this.config.quadrantPadding*2-s.left-s.right,p=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-l.top;return{xAxisSpace:a,yAxisSpace:s,titleSpace:l,quadrantSpace:{quadrantLeft:u,quadrantTop:d,quadrantWidth:f,quadrantHalfWidth:f/2,quadrantHeight:p,quadrantHalfHeight:p/2}}}getAxisLabels(e,t,n,r){let{quadrantSpace:i,titleSpace:a}=r,{quadrantHalfHeight:o,quadrantHeight:s,quadrantLeft:c,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:d}=i,f=!!this.data.xAxisRightText,p=!!this.data.yAxisTopText,m=[];return this.data.xAxisLeftText&&t&&m.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+(f?l/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+u+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.xAxisRightText&&t&&m.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+l+(f?l/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+u+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.yAxisBottomText&&n&&m.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+d+this.config.quadrantPadding,y:u+s-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:-90}),this.data.yAxisTopText&&n&&m.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+d+this.config.quadrantPadding,y:u+o-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:-90}),m}getQuadrants(e){let{quadrantSpace:t}=e,{quadrantHalfHeight:n,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:a}=t,o=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a,width:i,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a,width:i,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant4Fill}];for(let e of o)e.text.x=e.x+e.width/2,this.data.points.length===0?(e.text.y=e.y+e.height/2,e.text.horizontalPos=`middle`):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos=`top`);return o}getQuadrantPoints(e){let{quadrantSpace:t}=e,{quadrantHeight:n,quadrantLeft:r,quadrantTop:i,quadrantWidth:a}=t,o=h().domain([0,1]).range([r,a+r]),s=h().domain([0,1]).range([n+i,i]);return this.data.points.map(e=>{let t=this.classes.get(e.className);return t&&(e={...t,...e}),{x:o(e.x),y:s(e.y),fill:e.color??this.themeConfig.quadrantPointFill,radius:e.radius??this.config.pointRadius,text:{text:e.text,fill:this.themeConfig.quadrantPointTextFill,x:o(e.x),y:s(e.y)+this.config.pointTextPadding,verticalPos:`center`,horizontalPos:`top`,fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:e.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:e.strokeWidth??`0px`}})}getBorders(e){let t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:r,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:o,quadrantTop:s,quadrantWidth:c}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s,x2:a+c+t,y2:s},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+c,y1:s+t,x2:a+c,y2:s+i-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s+i,x2:a+c+t,y2:s+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:s+t,x2:a,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+o,y1:s+t,x2:a+o,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+t,y1:s+r,x2:a+c-t,y2:s+r}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:`top`,verticalPos:`center`,rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),t=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,r=this.data.points.length>0?`bottom`:this.config.xAxisPosition,i=this.calculateSpace(r,e,t,n);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(r,e,t,i),borderLines:this.getBorders(i),title:this.getTitle(n)}}},b=class extends Error{static{t(this,`InvalidStyleError`)}constructor(e,t,n){super(`value for ${e} ${t} is invalid, please use a valid ${n}`),this.name=`InvalidStyleError`}};function x(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}t(x,`validateHexCode`);function S(e){return!/^\d+$/.test(e)}t(S,`validateNumber`);function C(e){return!/^\d+px$/.test(e)}t(C,`validateSizeInPixels`);var w=d();function T(e){return o(e.trim(),w)}t(T,`textSanitizer`);var E=new y;function D(e){E.setData({quadrant1Text:T(e.text)})}t(D,`setQuadrant1Text`);function O(e){E.setData({quadrant2Text:T(e.text)})}t(O,`setQuadrant2Text`);function k(e){E.setData({quadrant3Text:T(e.text)})}t(k,`setQuadrant3Text`);function A(e){E.setData({quadrant4Text:T(e.text)})}t(A,`setQuadrant4Text`);function j(e){E.setData({xAxisLeftText:T(e.text)})}t(j,`setXAxisLeftText`);function M(e){E.setData({xAxisRightText:T(e.text)})}t(M,`setXAxisRightText`);function N(e){E.setData({yAxisTopText:T(e.text)})}t(N,`setYAxisTopText`);function P(e){E.setData({yAxisBottomText:T(e.text)})}t(P,`setYAxisBottomText`);function F(e){let t={};for(let n of e){let[e,r]=n.trim().split(/\s*:\s*/);if(e===`radius`){if(S(r))throw new b(e,r,`number`);t.radius=parseInt(r)}else if(e===`color`){if(x(r))throw new b(e,r,`hex code`);t.color=r}else if(e===`stroke-color`){if(x(r))throw new b(e,r,`hex code`);t.strokeColor=r}else if(e===`stroke-width`){if(C(r))throw new b(e,r,`number of pixels (eg. 10px)`);t.strokeWidth=r}else throw Error(`style named ${e} is not supported.`)}return t}t(F,`parseStyles`);function I(e,t,n,r,i){let a=F(i);E.addPoints([{x:n,y:r,text:T(e.text),className:t,...a}])}t(I,`addPoint`);function L(e,t){E.addClass(e,F(t))}t(L,`addClass`);function R(e){E.setConfig({chartWidth:e})}t(R,`setWidth`);function z(e){E.setConfig({chartHeight:e})}t(z,`setHeight`);function B(){let{themeVariables:e,quadrantChart:t}=d();return t&&E.setConfig(t),E.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),E.setData({titleText:i()}),E.build()}t(B,`getQuadrantData`);var ee={parser:_,db:{setWidth:R,setHeight:z,setQuadrant1Text:D,setQuadrant2Text:O,setQuadrant3Text:k,setQuadrant4Text:A,setXAxisLeftText:j,setXAxisRightText:M,setYAxisTopText:N,setYAxisBottomText:P,parseStyles:F,addPoint:I,addClass:L,getQuadrantData:B,clear:t(function(){E.clear(),u()},`clear`),setAccTitle:s,getAccTitle:m,setDiagramTitle:c,getDiagramTitle:i,getAccDescription:l,setAccDescription:r},renderer:{draw:t((r,i,a,o)=>{function s(e){return e===`top`?`hanging`:`middle`}t(s,`getDominantBaseLine`);function c(e){return e===`left`?`start`:`middle`}t(c,`getTextAnchor`);function l(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}t(l,`getTransformation`);let u=d();e.debug(`Rendering quadrant chart
|
|
7
|
-
`+
|
|
3
|
+
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};pe.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(function(e,t){return this.yy=t||this.yy||{},this._input=e,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:n(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(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:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:n(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):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:n(function(){return this.next()||this.lex()},`lex`),begin:n(function(e){this.conditionStack.push(e)},`begin`),popState:n(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:n(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:n(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:n(function(e){this.begin(e)},`pushState`),stateStackSize:n(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:n(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin(`title`),35;case 5:return this.popState(),`title_value`;case 6:return this.begin(`acc_title`),37;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),39;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin(`md_string`);break;case 22:return`MD_STR`;case 23:this.popState();break;case 24:this.begin(`string`);break;case 25:this.popState();break;case 26:return`STR`;case 27:this.begin(`class_name`);break;case 28:return this.popState(),47;case 29:return this.begin(`point_start`),44;case 30:return this.begin(`point_x`),45;case 31:this.popState();break;case 32:this.popState(),this.begin(`point_y`);break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}})();function $(){this.yy={}}return n($,`Parser`),$.prototype=pe,pe.Parser=$,new $})();g.parser=g;var _=g,v=o(),y=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{n(this,`QuadrantBuilder`)}getDefaultData(){return{titleText:``,quadrant1Text:``,quadrant2Text:``,quadrant3Text:``,quadrant4Text:``,xAxisLeftText:``,xAxisRightText:``,yAxisBottomText:``,yAxisTopText:``,points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:m.quadrantChart?.chartWidth||500,chartWidth:m.quadrantChart?.chartHeight||500,titlePadding:m.quadrantChart?.titlePadding||10,titleFontSize:m.quadrantChart?.titleFontSize||20,quadrantPadding:m.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:m.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:m.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:m.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:m.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:m.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:m.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:m.quadrantChart?.pointTextPadding||5,pointLabelFontSize:m.quadrantChart?.pointLabelFontSize||12,pointRadius:m.quadrantChart?.pointRadius||5,xAxisPosition:m.quadrantChart?.xAxisPosition||`top`,yAxisPosition:m.quadrantChart?.yAxisPosition||`left`,quadrantInternalBorderStrokeWidth:m.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:m.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:v.quadrant1Fill,quadrant2Fill:v.quadrant2Fill,quadrant3Fill:v.quadrant3Fill,quadrant4Fill:v.quadrant4Fill,quadrant1TextFill:v.quadrant1TextFill,quadrant2TextFill:v.quadrant2TextFill,quadrant3TextFill:v.quadrant3TextFill,quadrant4TextFill:v.quadrant4TextFill,quadrantPointFill:v.quadrantPointFill,quadrantPointTextFill:v.quadrantPointTextFill,quadrantXAxisTextFill:v.quadrantXAxisTextFill,quadrantYAxisTextFill:v.quadrantYAxisTextFill,quadrantTitleFill:v.quadrantTitleFill,quadrantInternalBorderStrokeFill:v.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:v.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,t.info(`clear called`)}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(e){t.trace(`setConfig called with: `,e),this.config={...this.config,...e}}setThemeConfig(e){t.trace(`setThemeConfig called with: `,e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,n,r){let i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:e===`top`&&t?i:0,bottom:e===`bottom`&&t?i:0},o=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,s={left:this.config.yAxisPosition===`left`&&n?o:0,right:this.config.yAxisPosition===`right`&&n?o:0},c=this.config.titleFontSize+this.config.titlePadding*2,l={top:r?c:0},u=this.config.quadrantPadding+s.left,d=this.config.quadrantPadding+a.top+l.top,f=this.config.chartWidth-this.config.quadrantPadding*2-s.left-s.right,p=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-l.top;return{xAxisSpace:a,yAxisSpace:s,titleSpace:l,quadrantSpace:{quadrantLeft:u,quadrantTop:d,quadrantWidth:f,quadrantHalfWidth:f/2,quadrantHeight:p,quadrantHalfHeight:p/2}}}getAxisLabels(e,t,n,r){let{quadrantSpace:i,titleSpace:a}=r,{quadrantHalfHeight:o,quadrantHeight:s,quadrantLeft:c,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:d}=i,f=!!this.data.xAxisRightText,p=!!this.data.yAxisTopText,m=[];return this.data.xAxisLeftText&&t&&m.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+(f?l/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+u+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.xAxisRightText&&t&&m.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+l+(f?l/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+u+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.yAxisBottomText&&n&&m.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+d+this.config.quadrantPadding,y:u+s-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:-90}),this.data.yAxisTopText&&n&&m.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+d+this.config.quadrantPadding,y:u+o-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:-90}),m}getQuadrants(e){let{quadrantSpace:t}=e,{quadrantHalfHeight:n,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:a}=t,o=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a,width:i,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a,width:i,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant4Fill}];for(let e of o)e.text.x=e.x+e.width/2,this.data.points.length===0?(e.text.y=e.y+e.height/2,e.text.horizontalPos=`middle`):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos=`top`);return o}getQuadrantPoints(t){let{quadrantSpace:n}=t,{quadrantHeight:r,quadrantLeft:i,quadrantTop:a,quadrantWidth:o}=n,s=e().domain([0,1]).range([i,o+i]),c=e().domain([0,1]).range([r+a,a]);return this.data.points.map(e=>{let t=this.classes.get(e.className);return t&&(e={...t,...e}),{x:s(e.x),y:c(e.y),fill:e.color??this.themeConfig.quadrantPointFill,radius:e.radius??this.config.pointRadius,text:{text:e.text,fill:this.themeConfig.quadrantPointTextFill,x:s(e.x),y:c(e.y)+this.config.pointTextPadding,verticalPos:`center`,horizontalPos:`top`,fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:e.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:e.strokeWidth??`0px`}})}getBorders(e){let t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:r,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:o,quadrantTop:s,quadrantWidth:c}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s,x2:a+c+t,y2:s},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+c,y1:s+t,x2:a+c,y2:s+i-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s+i,x2:a+c+t,y2:s+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:s+t,x2:a,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+o,y1:s+t,x2:a+o,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+t,y1:s+r,x2:a+c-t,y2:s+r}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:`top`,verticalPos:`center`,rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),t=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,r=this.data.points.length>0?`bottom`:this.config.xAxisPosition,i=this.calculateSpace(r,e,t,n);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(r,e,t,i),borderLines:this.getBorders(i),title:this.getTitle(n)}}},b=class extends Error{static{n(this,`InvalidStyleError`)}constructor(e,t,n){super(`value for ${e} ${t} is invalid, please use a valid ${n}`),this.name=`InvalidStyleError`}};function x(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}n(x,`validateHexCode`);function S(e){return!/^\d+$/.test(e)}n(S,`validateNumber`);function C(e){return!/^\d+px$/.test(e)}n(C,`validateSizeInPixels`);var w=f();function T(e){return s(e.trim(),w)}n(T,`textSanitizer`);var E=new y;function D(e){E.setData({quadrant1Text:T(e.text)})}n(D,`setQuadrant1Text`);function O(e){E.setData({quadrant2Text:T(e.text)})}n(O,`setQuadrant2Text`);function k(e){E.setData({quadrant3Text:T(e.text)})}n(k,`setQuadrant3Text`);function A(e){E.setData({quadrant4Text:T(e.text)})}n(A,`setQuadrant4Text`);function j(e){E.setData({xAxisLeftText:T(e.text)})}n(j,`setXAxisLeftText`);function M(e){E.setData({xAxisRightText:T(e.text)})}n(M,`setXAxisRightText`);function N(e){E.setData({yAxisTopText:T(e.text)})}n(N,`setYAxisTopText`);function P(e){E.setData({yAxisBottomText:T(e.text)})}n(P,`setYAxisBottomText`);function F(e){let t={};for(let n of e){let[e,r]=n.trim().split(/\s*:\s*/);if(e===`radius`){if(S(r))throw new b(e,r,`number`);t.radius=parseInt(r)}else if(e===`color`){if(x(r))throw new b(e,r,`hex code`);t.color=r}else if(e===`stroke-color`){if(x(r))throw new b(e,r,`hex code`);t.strokeColor=r}else if(e===`stroke-width`){if(C(r))throw new b(e,r,`number of pixels (eg. 10px)`);t.strokeWidth=r}else throw Error(`style named ${e} is not supported.`)}return t}n(F,`parseStyles`);function I(e,t,n,r,i){let a=F(i);E.addPoints([{x:n,y:r,text:T(e.text),className:t,...a}])}n(I,`addPoint`);function L(e,t){E.addClass(e,F(t))}n(L,`addClass`);function R(e){E.setConfig({chartWidth:e})}n(R,`setWidth`);function z(e){E.setConfig({chartHeight:e})}n(z,`setHeight`);function B(){let{themeVariables:e,quadrantChart:t}=f();return t&&E.setConfig(t),E.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),E.setData({titleText:a()}),E.build()}n(B,`getQuadrantData`);var ee={parser:_,db:{setWidth:R,setHeight:z,setQuadrant1Text:D,setQuadrant2Text:O,setQuadrant3Text:k,setQuadrant4Text:A,setXAxisLeftText:j,setXAxisRightText:M,setYAxisTopText:N,setYAxisBottomText:P,parseStyles:F,addPoint:I,addClass:L,getQuadrantData:B,clear:n(function(){E.clear(),d()},`clear`),setAccTitle:c,getAccTitle:h,setDiagramTitle:l,getDiagramTitle:a,getAccDescription:u,setAccDescription:i},renderer:{draw:n((e,i,a,o)=>{function s(e){return e===`top`?`hanging`:`middle`}n(s,`getDominantBaseLine`);function c(e){return e===`left`?`start`:`middle`}n(c,`getTextAnchor`);function l(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}n(l,`getTransformation`);let u=f();t.debug(`Rendering quadrant chart
|
|
7
|
+
`+e);let d=u.securityLevel,m;d===`sandbox`&&(m=r(`#i`+i));let h=r(d===`sandbox`?m.nodes()[0].contentDocument.body:`body`).select(`[id="${i}"]`),g=h.append(`g`).attr(`class`,`main`),_=u.quadrantChart?.chartWidth??500,v=u.quadrantChart?.chartHeight??500;p(h,v,_,u.quadrantChart?.useMaxWidth??!0),h.attr(`viewBox`,`0 0 `+_+` `+v),o.db.setHeight(v),o.db.setWidth(_);let y=o.db.getQuadrantData(),b=g.append(`g`).attr(`class`,`quadrants`),x=g.append(`g`).attr(`class`,`border`),S=g.append(`g`).attr(`class`,`data-points`),C=g.append(`g`).attr(`class`,`labels`),w=g.append(`g`).attr(`class`,`title`);y.title&&w.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,y.title.fill).attr(`font-size`,y.title.fontSize).attr(`dominant-baseline`,s(y.title.horizontalPos)).attr(`text-anchor`,c(y.title.verticalPos)).attr(`transform`,l(y.title)).text(y.title.text),y.borderLines&&x.selectAll(`line`).data(y.borderLines).enter().append(`line`).attr(`x1`,e=>e.x1).attr(`y1`,e=>e.y1).attr(`x2`,e=>e.x2).attr(`y2`,e=>e.y2).style(`stroke`,e=>e.strokeFill).style(`stroke-width`,e=>e.strokeWidth);let T=b.selectAll(`g.quadrant`).data(y.quadrants).enter().append(`g`).attr(`class`,`quadrant`);T.append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill),T.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>s(e.text.horizontalPos)).attr(`text-anchor`,e=>c(e.text.verticalPos)).attr(`transform`,e=>l(e.text)).text(e=>e.text.text),C.selectAll(`g.label`).data(y.axisLabels).enter().append(`g`).attr(`class`,`label`).append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>s(e.horizontalPos)).attr(`text-anchor`,e=>c(e.verticalPos)).attr(`transform`,e=>l(e));let E=S.selectAll(`g.data-point`).data(y.points).enter().append(`g`).attr(`class`,`data-point`);E.append(`circle`).attr(`cx`,e=>e.x).attr(`cy`,e=>e.y).attr(`r`,e=>e.radius).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeColor).attr(`stroke-width`,e=>e.strokeWidth),E.append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text.text).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>s(e.text.horizontalPos)).attr(`text-anchor`,e=>c(e.text.verticalPos)).attr(`transform`,e=>l(e.text))},`draw`)},styles:n(()=>``,`styles`)};export{ee as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-K5T4RW27-C6ErEFB0.js";import{n as e}from"./chunk-2KRD3SAO-mLbXjVje.js";export{e as createRadarServices};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e,O as t,T as n,_ as r,c as i,d as a,f as o,g as s,h as c,i as l,m as u,n as d,p as f,r as p,s as m,t as h,v as g,w as _,y as v}from"./_baseFor-
|
|
1
|
+
import{E as e,O as t,T as n,_ as r,c as i,d as a,f as o,g as s,h as c,i as l,m as u,n as d,p as f,r as p,s as m,t as h,v as g,w as _,y as v}from"./_baseFor-2QgQJAzW.js";import{i as y,n as b,r as x}from"./isEmpty-Lz_aOZWI.js";function ee(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var te=`__lodash_hash_undefined__`;function ne(e){return this.__data__.set(e,te),this}function re(e){return this.__data__.has(e)}function S(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new v;++t<n;)this.add(e[t])}S.prototype.add=S.prototype.push=ne,S.prototype.has=re;function ie(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function C(e,t){return e.has(t)}var ae=1,oe=2;function w(e,t,n,r,i,a){var o=n&ae,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&oe?new S:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!ie(t,function(e,t){if(!C(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function se(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function T(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var ce=1,le=2,ue=`[object Boolean]`,de=`[object Date]`,fe=`[object Error]`,pe=`[object Map]`,me=`[object Number]`,he=`[object RegExp]`,ge=`[object Set]`,_e=`[object String]`,ve=`[object Symbol]`,ye=`[object ArrayBuffer]`,be=`[object DataView]`,E=e?e.prototype:void 0,D=E?E.valueOf:void 0;function xe(e,n,i,a,o,s,c){switch(i){case be:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case ye:return!(e.byteLength!=n.byteLength||!s(new r(e),new r(n)));case ue:case de:case me:return t(+e,+n);case fe:return e.name==n.name&&e.message==n.message;case he:case _e:return e==n+``;case pe:var l=se;case ge:var u=a&ce;if(l||=T,e.size!=n.size&&!u)return!1;var d=c.get(e);if(d)return d==n;a|=le,c.set(e,n);var f=w(l(e),l(n),a,o,s,c);return c.delete(e),f;case ve:if(D)return D.call(e)==D.call(n)}return!1}function O(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function k(e,t,n){var r=t(e);return s(e)?r:O(r,n(e))}function A(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function j(){return[]}var Se=Object.prototype.propertyIsEnumerable,M=Object.getOwnPropertySymbols,N=M?function(e){return e==null?[]:(e=Object(e),A(M(e),function(t){return Se.call(e,t)}))}:j;function P(e){return l(e)?m(e):y(e)}function F(e){return k(e,P,N)}var Ce=1,we=Object.prototype.hasOwnProperty;function Te(e,t,n,r,i,a){var o=n&Ce,s=F(e),c=s.length;if(c!=F(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:we.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var Ee=1,I=`[object Arguments]`,L=`[object Array]`,R=`[object Object]`,z=Object.prototype.hasOwnProperty;function De(e,t,n,r,a,o){var c=s(e),l=s(t),u=c?L:b(e),d=l?L:b(t);u=u==I?R:u,d=d==I?R:d;var p=u==R,m=d==R,h=u==d;if(h&&f(e)){if(!f(t))return!1;c=!0,p=!1}if(h&&!p)return o||=new g,c||i(e)?w(e,t,n,r,a,o):xe(e,t,u,n,r,a,o);if(!(n&Ee)){var _=p&&z.call(e,`__wrapped__`),v=m&&z.call(t,`__wrapped__`);if(_||v){var y=_?e.value():e,x=v?t.value():t;return o||=new g,a(y,x,n,r,o)}}return h?(o||=new g,Te(e,t,n,r,a,o)):!1}function B(e,t,n,r,i){return e===t?!0:e==null||t==null||!c(e)&&!c(t)?e!==e&&t!==t:De(e,t,n,r,B,i)}var Oe=1,ke=2;function Ae(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new g;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?B(u,l,Oe|ke,r,d):f))return!1}}return!0}function V(e){return e===e&&!_(e)}function je(e){for(var t=P(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,V(i)]}return t}function H(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Me(e){var t=je(e);return t.length==1&&t[0][2]?H(t[0][0],t[0][1]):function(n){return n===e||Ae(n,e,t)}}var Ne=`[object Symbol]`;function U(e){return typeof e==`symbol`||c(e)&&n(e)==Ne}var Pe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fe=/^\w*$/;function W(e,t){if(s(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||U(e)?!0:Fe.test(e)||!Pe.test(e)||t!=null&&e in Object(t)}var Ie=500;function Le(e){var t=p(e,function(e){return n.size===Ie&&n.clear(),e}),n=t.cache;return t}var Re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ze=/\\(\\)?/g,Be=Le(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Re,function(e,n,r,i){t.push(r?i.replace(ze,`$1`):n||e)}),t}),Ve=1/0,G=e?e.prototype:void 0,K=G?G.toString:void 0;function q(e){if(typeof e==`string`)return e;if(s(e))return ee(e,q)+``;if(U(e))return K?K.call(e):``;var t=e+``;return t==`0`&&1/e==-Ve?`-0`:t}function He(e){return e==null?``:q(e)}function J(e,t){return s(e)?e:W(e,t)?[e]:Be(He(e))}var Ue=1/0;function Y(e){if(typeof e==`string`||U(e))return e;var t=e+``;return t==`0`&&1/e==-Ue?`-0`:t}function X(e,t){t=J(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Y(t[n++])];return n&&n==r?e:void 0}function We(e,t,n){var r=e==null?void 0:X(e,t);return r===void 0?n:r}function Ge(e,t){return e!=null&&t in Object(e)}function Ke(e,t,n){t=J(t,e);for(var r=-1,i=t.length,c=!1;++r<i;){var l=Y(t[r]);if(!(c=e!=null&&n(e,l)))break;e=e[l]}return c||++r!=i?c:(i=e==null?0:e.length,!!i&&a(i)&&o(l,i)&&(s(e)||u(e)))}function qe(e,t){return e!=null&&Ke(e,t,Ge)}var Je=1,Ye=2;function Xe(e,t){return W(e)&&V(t)?H(Y(e),t):function(n){var r=We(n,e);return r===void 0&&r===t?qe(n,e):B(t,r,Je|Ye)}}function Ze(e){return function(t){return t?.[e]}}function Qe(e){return function(t){return X(t,e)}}function $e(e){return W(e)?Ze(Y(e)):Qe(e)}function Z(e){return typeof e==`function`?e:e==null?d:typeof e==`object`?s(e)?Xe(e[0],e[1]):Me(e):$e(e)}function et(e,t){return e&&h(e,t,P)}function tt(e,t){return function(n,r){if(n==null)return n;if(!l(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var Q=tt(et);function nt(e,t){var n=[];return Q(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function rt(e,t){return(s(e)?A:nt)(e,Z(t,3))}var it=e?e.isConcatSpreadable:void 0;function at(e){return s(e)||u(e)||!!(it&&e&&e[it])}function ot(e,t,n,r,i){var a=-1,o=e.length;for(n||=at,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?ot(s,t-1,n,r,i):O(i,s):r||(i[i.length]=s)}return i}function st(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function ct(e){return e!==e}function lt(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function ut(e,t,n){return t===t?lt(e,t,n):st(e,ct,n)}function dt(e,t){return!!(e!=null&&e.length)&&ut(e,t,0)>-1}function ft(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function pt(){}var mt=x&&1/T(new x([,-0]))[1]==1/0?function(e){return new x(e)}:pt,ht=200;function gt(e,t,n){var r=-1,i=dt,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=ft;else if(a>=ht){var l=t?null:mt(e);if(l)return T(l);o=!1,i=C,c=new S}else c=t?[]:s;outer:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue outer;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}function _t(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function $(e){return typeof e==`function`?e:d}function vt(e,t){return(s(e)?_t:Q)(e,$(t))}function yt(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function bt(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function xt(e,t,n){var r=s(e)?yt:bt,i=arguments.length<3;return r(e,Z(t,4),n,i,Q)}export{j as C,ee as E,N as S,O as T,J as _,gt as a,F as b,rt as c,Z as d,Ze as f,Y as g,X as h,_t as i,Q as l,Ke as m,vt as n,st as o,qe as p,$ as r,ot as s,xt as t,et as u,He as v,k as w,P as x,U as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$t as e,A as t,At as n,B as r,Bt as i,D as a,E as o,Et as s,F as c,G as l,Gt as u,H as d,I as f,It as p,Jt as m,K as h,Kt as g,Mt as _,Nt as v,O as y,Ot as b,Pt as x,Qt as S,Rt as C,S as w,T,U as ee,Ut as te,V as E,W as D,X as O,Xt as ne,Z as re,Zt as k,_ as A,a as j,b as M,c as N,d as P,et as ie,f as F,ft as ae,g as I,h as L,i as oe,jt as se,k as ce,l as R,m as le,mt as ue,n as z,nn as de,nt as fe,o as B,p as pe,q as V,r as H,rn as me,s as U,t as W,ut as he,v as ge,vt as G,w as _e,x as ve,xt as ye,y as be,zt as xe}from"./state-CrA0YVPh-wJ4Rmm6M.js";var Se=(e,t,n)=>e+(t-e)*n,Ce=F(`<canvas data-react-grab-overlay-canvas style=position:fixed;top:0;left:0;pointer-events:none>`),we={borderColor:ue,fillColor:xe,lerpFactor:C},K={drag:{borderColor:te,fillColor:b,lerpFactor:ye},selection:we,grabbed:we,inspect:{borderColor:g,fillColor:G,lerpFactor:C}},Te=e=>{let t,n=null,r=0,a=0,o=1,s=null,c={drag:{canvas:null,context:null},selection:{canvas:null,context:null},grabbed:{canvas:null,context:null},inspect:{canvas:null,context:null}},l=[],u=null,d=[],f=[],h=m()?`display-p3`:`srgb`,g=(e,t,n)=>{let r=new OffscreenCanvas(e*n,t*n),i=r.getContext(`2d`,{colorSpace:h});return i&&i.scale(n,n),{canvas:r,context:i}},v=()=>{if(t){o=Math.max(window.devicePixelRatio||1,2),r=window.innerWidth,a=window.innerHeight,t.width=r*o,t.height=a*o,t.style.width=`${r}px`,t.style.height=`${a}px`,n=t.getContext(`2d`,{colorSpace:h}),n&&n.scale(o,o);for(let e of Object.keys(c))c[e]=g(r,a,o)}},y=e=>{if(!e)return 0;let t=e.match(/^(\d+(?:\.\d+)?)/);return t?parseFloat(t[1]):0},b=(e,t,n)=>({id:e,current:{x:t.x,y:t.y,width:t.width,height:t.height},target:{x:t.x,y:t.y,width:t.width,height:t.height},borderRadius:y(t.borderRadius),opacity:n?.opacity??1,targetOpacity:n?.targetOpacity??n?.opacity??1,createdAt:n?.createdAt,isInitialized:!0}),x=(e,t,n)=>{e.target={x:t.x,y:t.y,width:t.width,height:t.height},e.borderRadius=y(t.borderRadius),n!==void 0&&(e.targetOpacity=n)},S=e=>e.boundsMultiple??[e.bounds],C=(e,t,n,r,i,a,o,s,c=1)=>{if(r<=0||i<=0)return;let l=Math.min(r/2,i/2),u=Math.min(a,l);e.globalAlpha=c,e.beginPath(),u>0?e.roundRect(t,n,r,i,u):e.rect(t,n,r,i),e.fillStyle=o,e.fill(),e.strokeStyle=s,e.lineWidth=1,e.stroke(),e.globalAlpha=1},w=()=>{let t=c.drag;if(!t.context)return;let n=t.context;if(n.clearRect(0,0,r,a),!e.dragVisible||!u)return;let i=K.drag;C(n,u.current.x,u.current.y,u.current.width,u.current.height,u.borderRadius,i.fillColor,i.borderColor)},T=()=>{let t=c.selection;if(!t.context)return;let n=t.context;if(n.clearRect(0,0,r,a),!e.selectionVisible)return;let i=K.selection;for(let t of l){let r=e.selectionIsFading?0:t.opacity;C(n,t.current.x,t.current.y,t.current.width,t.current.height,t.borderRadius,i.fillColor,i.borderColor,r)}},ee=(e,t)=>{let n=c[e];if(!n.context)return;let i=n.context;i.clearRect(0,0,r,a);let o=K[e];for(let e of t)C(i,e.current.x,e.current.y,e.current.width,e.current.height,e.borderRadius,o.fillColor,o.borderColor,e.opacity)},te=()=>{if(!(!n||!t)){n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.width,t.height),n.setTransform(o,0,0,o,0,0),w(),T(),ee(`grabbed`,d),ee(`inspect`,f);for(let e of[`inspect`,`drag`,`selection`,`grabbed`]){let t=c[e];t.canvas&&n.drawImage(t.canvas,0,0,r,a)}}},E=(e,t,n)=>{let r=Se(e.current.x,e.target.x,t),i=Se(e.current.y,e.target.y,t),a=Se(e.current.width,e.target.width,t),o=Se(e.current.height,e.target.height,t),s=Math.abs(r-e.target.x)<.5&&Math.abs(i-e.target.y)<.5&&Math.abs(a-e.target.width)<.5&&Math.abs(o-e.target.height)<.5;e.current.x=s?e.target.x:r,e.current.y=s?e.target.y:i,e.current.width=s?e.target.width:a,e.current.height=s?e.target.height:o;let c=!0;if(n?.interpolateOpacity){let n=Se(e.opacity,e.targetOpacity,t);c=Math.abs(n-e.targetOpacity)<p,e.opacity=c?e.targetOpacity:n}return!s||!c},D=()=>{let e=!1;u?.isInitialized&&E(u,K.drag.lerpFactor)&&(e=!0);for(let t of l)t.isInitialized&&E(t,K.selection.lerpFactor)&&(e=!0);let t=Date.now();d=d.filter(n=>{let r=n.id.startsWith(`label-`);if(n.isInitialized&&E(n,K.grabbed.lerpFactor,{interpolateOpacity:r})&&(e=!0),n.createdAt){let r=t-n.createdAt;return r>=1600?!1:(r>1500&&(n.opacity=1-(r-1500)/100,e=!0),!0)}return r?!(Math.abs(n.opacity-n.targetOpacity)<.01&&n.targetOpacity===0):n.opacity>0});for(let t of f)t.isInitialized&&E(t,K.inspect.lerpFactor)&&(e=!0);te(),s=e?i(D):null},O=()=>{s===null&&(s=i(D))},re=()=>{v(),O()};return H(j(()=>[e.selectionVisible,e.selectionBounds,e.selectionBoundsMultiple,e.selectionIsFading,e.selectionShouldSnap],([e,t,n,,r])=>{if(!e||!t&&(!n||n.length===0)){l=[],O();return}let i;i=n&&n.length>0?n:t?[t]:[],l=i.map((e,t)=>{let n=`selection-${t}`,i=l.find(e=>e.id===n);return i?(x(i,e),r&&(i.current={...i.target}),i):b(n,e)}),O()})),H(j(()=>[e.dragVisible,e.dragBounds],([e,t])=>{if(!e||!t){u=null,O();return}u?x(u,t):u=b(`drag`,t),O()})),H(j(()=>[e.grabbedBoxes,e.labelInstances],([e,t])=>{let n=e??[],r=new Set(n.map(e=>e.id)),i=new Set(d.map(e=>e.id));for(let e of n)i.has(e.id)||d.push(b(e.id,e.bounds,{createdAt:e.createdAt}));for(let e of d){let t=n.find(t=>t.id===e.id);t&&x(e,t.bounds)}let a=t??[];for(let e of a){let t=S(e),n=e.status===`fading`?0:1;for(let r=0;r<t.length;r++){let i=t[r],a=`label-${e.id}-${r}`,o=d.find(e=>e.id===a);o?x(o,i,n):d.push(b(a,i,{opacity:1,targetOpacity:n}))}}let o=new Set;for(let e of a){let t=S(e);for(let n=0;n<t.length;n++)o.add(`label-${e.id}-${n}`)}d=d.filter(e=>e.id.startsWith(`label-`)?o.has(e.id):r.has(e.id)),O()})),H(j(()=>[e.inspectVisible,e.inspectBounds],([e,t])=>{if(!e||!t||t.length===0){f=[],O();return}f=t.map((e,t)=>{let n=`inspect-${t}`,r=f.find(e=>e.id===n);return r?(x(r,e),r):b(n,e)}),O()})),oe(()=>{v(),O(),window.addEventListener(`resize`,re);let e=null,t=()=>{Math.max(window.devicePixelRatio||1,2)!==o&&(re(),n())},n=()=>{e&&e.removeEventListener(`change`,t),e=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),e.addEventListener(`change`,t)};n(),P(()=>{window.removeEventListener(`resize`,re),e&&e.removeEventListener(`change`,t),s!==null&&_(s)})}),(()=>{var e=Ce(),n=t;return typeof n==`function`?M(n,e):t=e,I(t=>N(e,`z-index`,String(ne))),e})()},Ee=(e,t)=>{e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,t)}px`},De=e=>{if(e<=0)return 8;let t=e*k;return Math.max(4,Math.min(8,t))},Oe=e=>{if(typeof e==`string`||typeof e==`number`)return String(e);if(!e||typeof e!=`object`)return``;if(Array.isArray(e)){let t=``;for(let n of e){if(!n)continue;let e=Oe(n);e&&(t=t?`${t} ${e}`:e)}return t}let t=``;for(let n in e)e[n]&&(t=t?`${t} ${n}`:n);return t},q=(...e)=>{let t=``;for(let n of e){if(!n)continue;let e=Oe(n);e&&(t=t?`${t} ${e}`:e)}return t},ke=e=>e.elementsCount&&e.elementsCount>1?{tagName:`${e.elementsCount} elements`,componentName:void 0}:{tagName:e.tagName||e.componentName||`element`,componentName:e.tagName?e.componentName:void 0},Ae=e=>e===`Enter`?`↵`:d()?`⌘${e}`:`Ctrl+${e.replace(`⇧`,`Shift+`)}`,je=F(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 12 12"fill=none><path d="M6 1L6 11M6 1L2 5M6 1L10 5"stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round>`),Me=e=>{let t=()=>e.size??12;return(()=>{var n=je();return I(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&R(n,`width`,r.e=i),a!==r.t&&R(n,`height`,r.t=a),o!==r.a&&R(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},Ne=F(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path class=icon-loader-bar d="M12 2v4"style=animation-delay:0ms></path><path class=icon-loader-bar d="M15 6.8l2-3.5"style=animation-delay:-42ms></path><path class=icon-loader-bar d="M17.2 9l3.5-2"style=animation-delay:-83ms></path><path class=icon-loader-bar d="M18 12h4"style=animation-delay:-125ms></path><path class=icon-loader-bar d="M17.2 15l3.5 2"style=animation-delay:-167ms></path><path class=icon-loader-bar d="M15 17.2l2 3.5"style=animation-delay:-208ms></path><path class=icon-loader-bar d="M12 18v4"style=animation-delay:-250ms></path><path class=icon-loader-bar d="M9 17.2l-2 3.5"style=animation-delay:-292ms></path><path class=icon-loader-bar d="M6.8 15l-3.5 2"style=animation-delay:-333ms></path><path class=icon-loader-bar d="M2 12h4"style=animation-delay:-375ms></path><path class=icon-loader-bar d="M6.8 9l-3.5-2"style=animation-delay:-417ms></path><path class=icon-loader-bar d="M9 6.8l-2-3.5"style=animation-delay:-458ms>`),Pe=e=>{let t=()=>e.size??16;return(()=>{var n=Ne();return n.firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling,I(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&R(n,`width`,r.e=i),a!==r.t&&R(n,`height`,r.t=a),o!==r.a&&R(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},Fe=F(`<div data-react-grab-arrow class="absolute w-0 h-0 z-10">`),Ie=e=>{let t=()=>e.color??`white`,n=()=>e.position===`bottom`,r=()=>De(e.labelWidth??0);return(()=>{var i=Fe();return I(a=>{var o=`calc(${e.leftPercent}% + ${e.leftOffsetPx}px)`,s=n()?`0`:void 0,c=n()?void 0:`0`,l=n()?`translateX(-50%) translateY(-100%)`:`translateX(-50%) translateY(100%)`,u=`${r()}px solid transparent`,d=`${r()}px solid transparent`,f=n()?`${r()}px solid ${t()}`:void 0,p=n()?void 0:`${r()}px solid ${t()}`;return o!==a.e&&N(i,`left`,a.e=o),s!==a.t&&N(i,`top`,a.t=s),c!==a.a&&N(i,`bottom`,a.a=c),l!==a.o&&N(i,`transform`,a.o=l),u!==a.i&&N(i,`border-left`,a.i=u),d!==a.n&&N(i,`border-right`,a.n=d),f!==a.s&&N(i,`border-bottom`,a.s=f),p!==a.h&&N(i,`border-top`,a.h=p),a},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),i})()},Le=F(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2><path d="M12 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6"></path><path d="M11 13l9-9"></path><path d="M15 4h5v5">`),Re=e=>{let t=()=>e.size??12;return(()=>{var n=Le();return I(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&R(n,`width`,r.e=i),a!==r.t&&R(n,`height`,r.t=a),o!==r.a&&R(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},ze=F(`<span class=text-black>`),Be=F(`<span class=text-black/50>.`),Ve=F(`<div><span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0">`),J=e=>{let[t,n]=l(!1),r=()=>{n(!0),e.onHoverChange?.(!0)},i=()=>{n(!1),e.onHoverChange?.(!1)};return(()=>{var n=Ve(),a=n.firstChild;return V(n,`click`,e.onClick,!0),n.addEventListener(`mouseleave`,i),n.addEventListener(`mouseenter`,r),U(a,y(A,{get when(){return e.componentName},get children(){return[(()=>{var t=ze();return U(t,()=>e.componentName),t})(),(()=>{var t=Be();return t.firstChild,U(t,()=>e.tagName,null),t})()]}}),null),U(a,y(A,{get when(){return!e.componentName},get children(){var t=ze();return U(t,()=>e.tagName),t}}),null),U(n,y(A,{get when(){return e.isClickable||e.forceShowIcon},get children(){return y(Re,{size:10,get class(){return q(`text-black transition-all duration-100 shrink-0`,t()||e.forceShowIcon?`opacity-100 scale-100`:`opacity-0 scale-75 -ml-[2px] w-0`)}})}}),null),I(()=>L(n,q(`contain-layout flex items-center gap-1 max-w-[280px] overflow-hidden`,e.shrink&&`shrink-0`,e.isClickable&&`cursor-pointer`))),n})()};B([`click`]);var He=F(`<div class="[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start px-2 py-1.5 w-auto h-fit self-stretch [border-top-width:0.5px] border-t-solid border-t-[#D9D9D9] antialiased rounded-t-none rounded-b-[6px]">`),Ue=e=>(()=>{var t=He();return U(t,()=>e.children),t})(),We=null,Y={claim:e=>{We=e},release:e=>{We===e&&(We=null)},isActive:e=>We===e},Ge=F(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 22 19"fill=none><path d="M6.76263 18.6626C7.48251 18.6626 7.95474 18.1682 7.95474 17.4895C7.95474 17.1207 7.80474 16.8576 7.58683 16.6361L5.3018 14.4137L2.84621 12.3589L2.44374 13.0037L5.92137 13.1622H17.9232C20.4842 13.1622 21.593 12.021 21.593 9.47237V3.66983C21.593 1.10875 20.4842 0 17.9232 0H12.5414C11.8179 0 11.3018 0.545895 11.3018 1.21695C11.3018 1.888 11.8179 2.43389 12.5414 2.43389H17.8424C18.7937 2.43389 19.1897 2.83653 19.1897 3.78784V9.35747C19.1897 10.3257 18.7937 10.7314 17.8424 10.7314H5.92137L2.44374 10.8832L2.84621 11.5281L5.3018 9.47993L7.58683 7.2606C7.80474 7.03914 7.95474 6.7693 7.95474 6.40049C7.95474 5.72854 7.48251 5.22747 6.76263 5.22747C6.46129 5.22747 6.12975 5.36905 5.89231 5.6096L0.376815 11.0425C0.134921 11.2777 0 11.6141 0 11.9452C0 12.2728 0.134921 12.6158 0.376815 12.848L5.89231 18.2871C6.12975 18.5276 6.46129 18.6626 6.76263 18.6626Z"fill=currentColor>`),Ke=e=>{let t=()=>e.size??12;return(()=>{var n=Ge();return I(r=>{var i=t(),a=t()*19/22,o=e.class;return i!==r.e&&R(n,`width`,r.e=i),a!==r.t&&R(n,`height`,r.t=a),o!==r.a&&R(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},qe=F(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit"><button data-react-grab-discard-no class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] press-scale h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">No</span></button><button data-react-grab-discard-yes class="contain-layout shrink-0 flex items-center justify-center gap-0.5 px-[3px] py-px rounded-sm bg-[#FEF2F2] cursor-pointer transition-all hover:bg-[#FEE2E2] press-scale h-[17px]"><span class="text-[#B91C1C] text-[13px] leading-3.5 font-sans font-medium">Yes`),Je=F(`<div data-react-grab-discard-prompt class="contain-layout shrink-0 flex flex-col justify-center items-end w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 px-2 w-full h-fit"><span class="text-black text-[13px] leading-4 shrink-0 font-sans font-medium w-fit h-fit">`),Ye=e=>{let t=Symbol(),n=n=>{if(!Y.isActive(t)||E(n))return;let r=n.code===`Enter`,i=n.code===`Escape`;(r||i)&&(n.preventDefault(),n.stopPropagation(),i&&e.cancelOnEscape?e.onCancel?.():e.onConfirm?.())},r=()=>{Y.claim(t)};return oe(()=>{Y.claim(t),window.addEventListener(`keydown`,n,{capture:!0})}),P(()=>{Y.release(t),window.removeEventListener(`keydown`,n,{capture:!0})}),(()=>{var t=Je(),n=t.firstChild.firstChild;return t.$$click=r,t.$$pointerdown=r,U(n,()=>e.label??`Discard?`),U(t,y(Ue,{get children(){var t=qe(),n=t.firstChild,r=n.nextSibling;return r.firstChild,V(n,`click`,e.onCancel,!0),V(r,`click`,e.onConfirm,!0),U(r,y(Ke,{size:10,class:`text-[#B91C1C]/50`}),null),t}}),null),t})()};B([`pointerdown`,`click`]);var Xe=F(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4C7.58 4 4.01 7.58 4.01 12C4.01 16.42 7.58 20 12 20C15.73 20 18.84 17.45 19.73 14H17.65C16.83 16.33 14.61 18 12 18C8.69 18 6 15.31 6 12C6 8.69 8.69 6 12 6C13.66 6 15.14 6.69 16.22 7.78L13 11H20V4L17.65 6.35Z"fill=currentColor>`),Ze=e=>{let t=()=>e.size??12;return(()=>{var n=Xe();return I(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&R(n,`width`,r.e=i),a!==r.t&&R(n,`height`,r.t=a),o!==r.a&&R(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},Qe=F(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit"><button data-react-grab-retry class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] press-scale h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">Retry</span></button><button data-react-grab-error-ok class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] press-scale h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">Ok`),X=F(`<div data-react-grab-error class="contain-layout shrink-0 flex flex-col justify-center items-end w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-start gap-1 px-2 w-full h-fit"><span class="text-[#B91C1C] text-[13px] leading-4 font-sans font-medium overflow-hidden line-clamp-5">`),$e=e=>{let t=Symbol(),n=n=>{if(!Y.isActive(t)||E(n))return;let r=n.code===`Enter`,i=n.code===`Escape`;r?(n.preventDefault(),n.stopPropagation(),e.onRetry?.()):i&&(n.preventDefault(),n.stopPropagation(),e.onAcknowledge?.())},r=()=>{Y.claim(t)};oe(()=>{Y.claim(t),window.addEventListener(`keydown`,n,{capture:!0})}),P(()=>{Y.release(t),window.removeEventListener(`keydown`,n,{capture:!0})});let i=()=>!!(e.onRetry||e.onAcknowledge);return(()=>{var t=X(),n=t.firstChild,a=n.firstChild;return t.$$click=r,t.$$pointerdown=r,U(a,()=>e.error),U(t,y(A,{get when(){return i()},get children(){return y(Ue,{get children(){var t=Qe(),n=t.firstChild;n.firstChild;var r=n.nextSibling;return V(n,`click`,e.onRetry,!0),U(n,y(Ze,{size:10,class:`text-black/50`}),null),V(r,`click`,e.onAcknowledge,!0),t}})}}),null),I(t=>{var r={"pt-1.5 pb-1":i(),"py-1.5":!i()},o=e.error;return t.e=z(n,r,t.e),o!==t.t&&R(a,`title`,t.t=o),t},{e:void 0,t:void 0}),t})()};B([`pointerdown`,`click`]);var et=F(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><circle cx=5 cy=12 r=2></circle><circle cx=12 cy=12 r=2></circle><circle cx=19 cy=12 r=2>`),tt=e=>{let t=()=>e.size??12;return(()=>{var n=et();return I(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&R(n,`width`,r.e=i),a!==r.t&&R(n,`height`,r.t=a),o!==r.a&&R(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},nt=F(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 21 21"fill=none><g clip-path=url(#clip0_icon_check)><path d="M20.1767 10.0875C20.1767 15.6478 15.6576 20.175 10.0875 20.175C4.52715 20.175 0 15.6478 0 10.0875C0 4.51914 4.52715 0 10.0875 0C15.6576 0 20.1767 4.51914 20.1767 10.0875ZM13.0051 6.23867L8.96699 12.7041L7.08476 10.3143C6.83358 9.99199 6.59941 9.88828 6.28984 9.88828C5.79414 9.88828 5.39961 10.2918 5.39961 10.7893C5.39961 11.0367 5.48925 11.2621 5.66386 11.4855L8.05703 14.3967C8.33027 14.7508 8.63183 14.9103 8.99902 14.9103C9.36445 14.9103 9.68105 14.7312 9.90546 14.3896L14.4742 7.27206C14.6107 7.04765 14.7289 6.80898 14.7289 6.58359C14.7289 6.07187 14.281 5.72968 13.7934 5.72968C13.4937 5.72968 13.217 5.90527 13.0051 6.23867Z"fill=currentColor></path></g><defs><clipPath id=clip0_icon_check><rect width=20.5381 height=20.1848 fill=white>`),rt=e=>{let t=()=>e.size??21;return(()=>{var n=nt();return I(r=>{var i=t(),a=t()*20.1848/20.5381,o=e.class;return i!==r.e&&R(n,`width`,r.e=i),a!==r.t&&R(n,`height`,r.t=a),o!==r.a&&R(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},it=F(`<button data-react-grab-ignore-events data-react-grab-more-options class="flex items-center justify-center size-[18px] rounded-sm cursor-pointer bg-transparent hover:bg-black/10 text-black/30 hover:text-black border-none outline-none p-0 shrink-0 press-scale">`),at=F(`<button data-react-grab-dismiss class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] press-scale h-[17px]"><span class="text-black text-[13px] leading-3.5 font-sans font-medium">Keep`),ot=F(`<div class="contain-layout shrink-0 flex items-center justify-between gap-2 pt-1.5 pb-1 px-2 w-full h-fit"><span class="text-black text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0"></span><div class="contain-layout shrink-0 flex items-center gap-2 h-fit">`),st=F(`<div class="contain-layout shrink-0 flex items-center gap-0.5 py-1.5 px-2 w-full h-fit"><span class="text-black text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap min-w-0">`),ct=F(`<div data-react-grab-completion>`),lt=e=>(()=>{var t=it();return V(t,`click`,t=>{t.stopImmediatePropagation(),e.onClick()}),V(t,`pointerdown`,e=>{e.stopImmediatePropagation()}),U(t,y(tt,{size:14})),t})(),Z=e=>{let t=Symbol(),n,r,[i,a]=l(!1),[o,s]=l(!1),c=()=>i()?`Copied`:e.statusText,u=()=>{n!==void 0&&window.clearTimeout(n),r!==void 0&&window.clearTimeout(r),s(!0),e.onFadingChange?.(!0),e.onShowContextMenu?.()},d=()=>{i()||(a(!0),n=window.setTimeout(()=>{s(!0),e.onFadingChange?.(!0),r=window.setTimeout(()=>{e.onDismiss?.()},100)},1400))},f=n=>{if(!Y.isActive(t))return;let r=n.code===`Enter`,i=n.code===`Escape`;E(n)||(r?(n.preventDefault(),n.stopPropagation(),d()):i&&(n.preventDefault(),n.stopPropagation(),e.onDismiss?.()))},p=()=>{Y.claim(t)};return oe(()=>{Y.claim(t),window.addEventListener(`keydown`,f,{capture:!0})}),P(()=>{Y.release(t),window.removeEventListener(`keydown`,f,{capture:!0}),n!==void 0&&window.clearTimeout(n),r!==void 0&&window.clearTimeout(r)}),(()=>{var t=ct();return t.$$click=p,t.$$pointerdown=p,U(t,y(A,{get when(){return W(()=>!i())()&&e.onDismiss},get children(){var t=ot(),n=t.firstChild,r=n.nextSibling;return U(n,c),U(r,y(A,{get when(){return e.onShowContextMenu},get children(){return y(lt,{onClick:u})}}),null),U(r,y(A,{get when(){return e.onDismiss},get children(){var e=at();return e.firstChild,e.$$click=d,U(e,y(A,{get when(){return!i()},get children(){return y(Ke,{size:10,class:`text-black/50`})}}),null),I(()=>e.disabled=i()),e}}),null),t}}),null),U(t,y(A,{get when(){return i()||!e.onDismiss},get children(){var t=st(),n=t.firstChild;return U(t,y(rt,{size:14,class:`text-black/85 shrink-0 animate-success-pop`}),n),U(n,c),U(t,y(A,{get when(){return e.onShowContextMenu},get children(){return y(lt,{onClick:u})}}),null),t}}),null),I(e=>{var n=q(`contain-layout shrink-0 flex flex-col justify-center items-end rounded-[10px] antialiased w-fit h-fit max-w-[280px] transition-opacity duration-100 ease-out [font-synthesis:none] [corner-shape:superellipse(1.25)]`,`bg-white`),r=+!o();return n!==e.e&&L(t,e.e=n),r!==e.t&&N(t,`opacity`,e.t=r),e},{e:void 0,t:void 0}),t})()};B([`pointerdown`,`click`]);var ut=({hiddenOpacity:e=`0`,visibleOpacity:t=`1`}={})=>{let n,r,i=()=>{r&&(r.style.opacity=e)};return{containerRef:e=>{n=e},followerRef:e=>{r=e},followElement:e=>{if(!r||!n)return;if(!e){i();return}let a=n.getBoundingClientRect(),o=e.getBoundingClientRect(),s=o.top-a.top+n.scrollTop,c=o.left-a.left+n.scrollLeft;r.style.opacity=t,r.style.top=`${s}px`,r.style.left=`${c}px`,r.style.width=`${o.width}px`,r.style.height=`${o.height}px`},hideFollower:i}},Q=()=>{let{containerRef:e,followerRef:t,followElement:n,hideFollower:r}=ut();return{containerRef:e,highlightRef:t,updateHighlight:n,clearHighlight:r}},dt=F(`<div class="relative flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">`),ft=F(`<span class=text-black/40>.`),pt=F(`<button data-react-grab-ignore-events class="relative z-1 contain-layout flex items-center w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent"><span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0 transition-colors">`),mt=e=>{let{containerRef:t,highlightRef:n,updateHighlight:r,clearHighlight:i}=Q(),a,o=!1,s=e=>{if(a)return a.querySelector(`[data-react-grab-arrow-nav-index="${e}"]`)??void 0};return H(()=>{e.items,o=!1}),H(()=>{let t=s(e.activeIndex);t&&r(t)}),y(Ue,{get children(){var c=dt(),l=c.firstChild;return c.$$pointermove=()=>{o=!0},M(e=>{a=e,t(e)},c),M(n,l),U(c,y(_e,{get each(){return e.items},children:(t,n)=>(()=>{var a=pt(),c=a.firstChild;return a.$$click=t=>{t.stopPropagation(),e.onSelect(n())},a.addEventListener(`pointerleave`,()=>{let t=s(e.activeIndex);t?r(t):i()}),a.addEventListener(`pointerenter`,t=>{r(t.currentTarget),o&&e.onSelect(n())}),a.$$pointerdown=e=>e.stopPropagation(),U(c,y(A,{get when(){return t.componentName},get children(){return[W(()=>t.componentName),ft()]}}),null),U(c,()=>t.tagName,null),I(r=>{var i=t.tagName,o=n(),s=n()===e.activeIndex,l=n()!==e.activeIndex;return i!==r.e&&R(a,`data-react-grab-arrow-nav-item`,r.e=i),o!==r.t&&R(a,`data-react-grab-arrow-nav-index`,r.t=o),s!==r.a&&c.classList.toggle(`text-black`,r.a=s),l!==r.o&&c.classList.toggle(`text-black/30`,r.o=l),r},{e:void 0,t:void 0,a:void 0,o:void 0}),a})()}),null),c}})};B([`pointermove`,`pointerdown`,`click`]);var ht=F(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 py-1.5 px-2 w-full h-fit"><span class="shimmer-text text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap">`),gt=F(`<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5">`),_t=F(`<div class="contain-layout shrink-0 flex flex-col items-start w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 w-fit h-fit px-2">`),vt=F(`<button data-react-grab-submit class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-black cursor-pointer ml-1 interactive-scale">`),yt=F(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-input class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"placeholder="Add context"rows=1 style=field-sizing:content;min-height:16px;scrollbar-width:none>`),bt=F(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit min-w-[150px] max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2 max-w-full">`),xt=F(`<div data-react-grab-ignore-events data-react-grab-selection-label><div>`),St=F(`<span class="text-[11px] font-sans text-black/50 ml-4">`),Ct=F(`<div class="contain-layout flex items-center justify-between w-full px-2 py-1 transition-colors"><span class="text-[13px] leading-4 font-sans font-medium text-black">`),wt={left:re,top:re,arrowLeftPercent:50,arrowLeftOffset:0,edgeOffsetX:0},Tt=e=>{let t,r,i,a=!1,[o,s]=l(0),[c,u]=l(0),[d,f]=l(0),[p,m]=l(0),[h,g]=l(!1),[_,v]=l(!1),b=()=>e.status!==`copying`&&e.status!==`copied`&&e.status!==`fading`&&e.status!==`error`,x=()=>e.status===`copied`||e.status===`fading`,S=()=>!!(e.isPromptMode||x()&&(e.onDismiss||e.onShowContextMenu)||e.status===`error`&&(e.onAcknowledgeError||e.onRetry)||e.arrowNavigationState?.isVisible||e.inspectNavigationState?.isVisible),C,w=e=>{a=e},T=()=>{m(e=>e+1)},ee=t=>{E(t)||t.code===`Enter`&&!e.isPromptMode&&b()&&(t.preventDefault(),t.stopImmediatePropagation(),e.onToggleExpand?.())};oe(()=>{if(C=new ResizeObserver(e=>{for(let n of e){let e=n.target.getBoundingClientRect();n.target===t&&!a?(s(e.width),u(e.height)):n.target===r&&f(e.width)}}),t){let e=t.getBoundingClientRect();s(e.width),u(e.height),C.observe(t)}r&&(f(r.getBoundingClientRect().width),C.observe(r)),window.addEventListener(`scroll`,T,!0),window.addEventListener(`resize`,T),window.visualViewport?.addEventListener(`resize`,T),window.visualViewport?.addEventListener(`scroll`,T),window.addEventListener(`keydown`,ee,{capture:!0})}),P(()=>{C?.disconnect(),window.removeEventListener(`scroll`,T,!0),window.removeEventListener(`resize`,T),window.visualViewport?.removeEventListener(`resize`,T),window.visualViewport?.removeEventListener(`scroll`,T),window.removeEventListener(`keydown`,ee,{capture:!0})});let te=()=>`${e.tagName??``}:${e.componentName??``}`,O=D(t=>{p();let n=te(),r=n===t.elementIdentity?t:{position:wt,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:n},i=e.selectionBounds,a=o(),s=c(),l=a>0&&s>0,u=i&&i.width>0&&i.height>0;if(!l||!u)return{position:r.hadValidBounds?r.position:wt,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let f=window.visualViewport,m=f?.offsetLeft??0,h=f?.offsetTop??0,g=m+(f?.width??window.innerWidth),_=h+(f?.height??window.innerHeight);if(!(i.x+i.width>m&&i.x<g&&i.y+i.height>h&&i.y<_))return{position:wt,computedArrowPosition:r.computedArrowPosition,hadValidBounds:r.hadValidBounds,elementIdentity:n};let v=i.x+i.width/2,y=e.mouseX??v,b=i.y+i.height,x=i.y,S=e.hideArrow?0:De(d()),C=y,w=0,T=b+S+4;if(a>0){let e=C-a/2,t=C+a/2;t>g-8&&(w=g-8-t),e+w<m+8&&(w=m+8-e)}let ee=s+S+4,E=T+s<=_-8;E||(T=x-ee),T<h+8&&(T=h+8);let D=a/2,O=D-w,ne=Math.min(16,D),re=Math.max(a-16,D),k=Math.max(ne,Math.min(re,O))-D;return{position:{left:C,top:T,arrowLeftPercent:50,arrowLeftOffset:k,edgeOffsetX:w},computedArrowPosition:E?`bottom`:`top`,hadValidBounds:!0,elementIdentity:n}},{position:wt,computedArrowPosition:null,hadValidBounds:!1,elementIdentity:``}),ne=()=>O().computedArrowPosition??`bottom`,re=()=>O().hadValidBounds;H(j(()=>e.selectionLabelShakeCount,()=>v(!0),{defer:!0}));let k=t=>{if(t.isComposing||t.keyCode===229)return;t.stopImmediatePropagation();let n=t.code===`Enter`&&!t.shiftKey,r=t.code===`Escape`;n?(t.preventDefault(),e.onSubmit?.()):r&&(t.preventDefault(),e.onConfirmDismiss?.())},ie=t=>{let n=t.target;n instanceof HTMLTextAreaElement&&(Ee(n,95),e.onInputChange?.(n.value))},F=()=>ke({tagName:e.tagName,componentName:e.componentName,elementsCount:e.elementsCount}),ae=()=>!!e.arrowNavigationState?.isVisible,se=()=>!!e.inspectNavigationState?.isVisible,ce=t=>{t.stopImmediatePropagation(),e.filePath&&e.onOpen&&e.onOpen()},le=t=>{t.stopImmediatePropagation(),b()&&e.isPromptMode&&!e.isPendingDismiss&&e.onSubmit&&i&&i.focus({preventScroll:!0})},ue=()=>re()&&(x()||e.status===`error`);return y(A,{get when(){return W(()=>e.visible!==!1)()&&(e.selectionBounds||ue())},get children(){var a=xt(),o=a.firstChild;a.addEventListener(`mouseleave`,()=>e.onHoverChange?.(!1)),a.addEventListener(`mouseenter`,()=>e.onHoverChange?.(!0)),a.$$click=e=>{e.stopImmediatePropagation()},a.$$pointerdown=le;var s=t;typeof s==`function`?M(s,a):t=a,N(a,`z-index`,`${n}`),U(a,y(A,{get when(){return!e.hideArrow},get children(){return y(Ie,{get position(){return ne()},get leftPercent(){return O().position.arrowLeftPercent},get leftOffsetPx(){return O().position.arrowLeftOffset},get labelWidth(){return d()}})}}),o),U(a,y(A,{get when(){return W(()=>!!x())()&&!e.error},get children(){return y(Z,{get statusText(){return e.statusText??`Copied`},get onDismiss(){return e.onDismiss},onFadingChange:g,get onShowContextMenu(){return e.onShowContextMenu}})}}),o),o.addEventListener(`animationend`,()=>v(!1));var c=r;return typeof c==`function`?M(c,o):r=o,U(o,y(A,{get when(){return e.status===`copying`},get children(){var t=ht(),n=t.firstChild,r=n.firstChild;return U(n,y(Pe,{size:13,class:`text-[#71717a] shrink-0`}),r),U(r,()=>e.statusText??`Grabbing…`),t}}),null),U(o,y(A,{get when(){return W(()=>!!b())()&&!e.isPromptMode},get children(){var t=_t(),n=t.firstChild;return U(n,y(J,{get tagName(){return F().tagName},get componentName(){return F().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:ce,onHoverChange:w,shrink:!0,get forceShowIcon(){return W(()=>!!(ae()||se()))()?!!(e.filePath&&e.onOpen):!!e.isContextMenuOpen}})),U(t,y(A,{get when(){return e.arrowNavigationState?.isVisible},get children(){return y(mt,{get items(){return e.arrowNavigationState.items},get activeIndex(){return e.arrowNavigationState.activeIndex},onSelect:t=>e.onArrowNavigationSelect?.(t)})}}),null),U(t,y(A,{get when(){return W(()=>!!(!ae()&&se()))()&&e.inspectNavigationState},children:t=>y(mt,{get items(){return t().items},get activeIndex(){return t().activeIndex},onSelect:t=>e.onInspectSelect?.(t)})}),null),U(t,y(A,{get when(){return W(()=>!ae()&&!se())()&&!!e.actionCycleState?.isVisible},get children(){return y(Ue,{get children(){var t=gt();return U(t,y(_e,{get each(){return e.actionCycleState?.items??[]},children:(t,n)=>(()=>{var r=Ct(),i=r.firstChild;return U(i,()=>t.label),U(r,y(A,{get when(){return t.shortcut},get children(){var e=St();return U(e,()=>Ae(t.shortcut)),e}}),null),I(i=>{var a=t.label.toLowerCase(),o=n()===(e.actionCycleState?.activeIndex??0),s=n()===(e.actionCycleState?.items??[]).length-1;return a!==i.e&&R(r,`data-react-grab-action-cycle-item`,i.e=a),o!==i.t&&r.classList.toggle(`bg-black/5`,i.t=o),s!==i.a&&r.classList.toggle(`rounded-b-[6px]`,i.a=s),i},{e:void 0,t:void 0,a:void 0}),r})()})),t}})}}),null),I(e=>{var r=!!(ae()||se()),i={"py-1.5":!ae()&&!se(),"pt-1.5 pb-1":ae()||se()};return r!==e.e&&t.classList.toggle(`min-w-[100px]`,e.e=r),e.t=z(n,i,e.t),e},{e:void 0,t:void 0}),t}}),null),U(o,y(A,{get when(){return W(()=>!!(b()&&e.isPromptMode))()&&!e.isPendingDismiss},get children(){var t=bt(),n=t.firstChild;return U(n,y(J,{get tagName(){return F().tagName},get componentName(){return F().componentName},get isClickable(){return!!(e.filePath&&e.onOpen)},onClick:ce,onHoverChange:w,forceShowIcon:!0})),U(t,y(Ue,{get children(){var t=yt(),n=t.firstChild;return n.$$keydown=k,n.$$input=ie,M(t=>{i=t,e.onSubmit&&queueMicrotask(()=>{t.focus({preventScroll:!0}),Ee(t,95)})},n),N(n,`max-height`,`95px`),U(t,y(A,{get when(){return e.onSubmit},get children(){var t=vt();return t.$$click=()=>e.onSubmit?.(),U(t,y(Me,{size:10,class:`text-white`})),t}}),null),I(()=>n.readOnly=!e.onSubmit),I(()=>n.value=e.inputValue??``),t}}),null),t}}),null),U(o,y(A,{get when(){return e.isPendingDismiss},get children(){return y(Ye,{get onConfirm(){return e.onConfirmDismiss},onCancel:()=>{e.onCancelDismiss?.(),i?.focus({preventScroll:!0})}})}}),null),U(o,y(A,{get when(){return e.error},get children(){return y($e,{get error(){return e.error},get onAcknowledge(){return e.onAcknowledgeError},get onRetry(){return e.onRetry}})}}),null),I(t=>{var n=q(`fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-opacity duration-100 ease-out`),r=`${O().position.top}px`,i=`${O().position.left}px`,s=`translateX(calc(-50% + ${O().position.edgeOffsetX}px))`,c=S()?`auto`:`none`,l=e.status===`fading`||h()?0:1,u=q(`contain-layout flex items-center gap-[5px] rounded-[10px] antialiased w-fit h-fit p-0 [font-synthesis:none] [corner-shape:superellipse(1.25)]`,`bg-white`,_()&&`animate-shake`),d=x()&&!e.error?`none`:void 0;return n!==t.e&&L(a,t.e=n),r!==t.t&&N(a,`top`,t.t=r),i!==t.a&&N(a,`left`,t.a=i),s!==t.o&&N(a,`transform`,t.o=s),c!==t.i&&N(a,`pointer-events`,t.i=c),l!==t.n&&N(a,`opacity`,t.n=l),u!==t.s&&L(o,t.s=u),d!==t.h&&N(o,`display`,t.h=d),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),a}})};B([`pointerdown`,`click`,`input`,`keydown`]);var Et=F(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 18 18"fill=currentColor><path opacity=0.4 d="M7.65631 10.9565C7.31061 10.0014 7.54012 8.96635 8.25592 8.25195C8.74522 7.76615 9.38771 7.49951 10.0694 7.49951C10.3682 7.49951 10.6641 7.55171 10.9483 7.65381L16.0001 9.49902V4.75C16.0001 3.2334 14.7667 2 13.2501 2H4.75012C3.23352 2 2.00012 3.2334 2.00012 4.75V13.25C2.00012 14.7666 3.23352 16 4.75012 16H9.49962L7.65631 10.9565Z"></path><path d="M17.296 11.5694L10.4415 9.06545C10.0431 8.92235 9.61441 9.01658 9.31551 9.31338C9.01671 9.61168 8.92101 10.0429 9.06551 10.4413L11.5704 17.2948C11.7247 17.7191 12.128 18.0004 12.5772 18.0004C12.585 18.0004 12.5918 17.9999 12.5987 17.9999C13.0577 17.9906 13.4591 17.6913 13.5987 17.2543L14.4854 14.4857L17.2559 13.5985C17.6914 13.4589 17.9903 13.057 18 12.599C18.0097 12.141 17.7267 11.7276 17.296 11.5694Z">`),Dt=e=>{let t=()=>e.size??14;return(()=>{var n=Et();return I(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&R(n,`width`,r.e=i),a!==r.t&&R(n,`height`,r.t=a),o!==r.a&&R(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},Ot=F(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path d="M9.85 1.75H14.15C18.2041 1.75 20.2311 1.75 21.4906 3.01407C22.75 4.27813 22.75 6.31261 22.75 10.3816V10.9211C22.75 14.99 22.75 17.0245 21.4906 18.2886C20.2311 19.5526 18.2041 19.5526 14.15 19.5526C13.5475 19.5661 13.0676 19.6121 12.5962 19.7199C11.5124 19.9703 10.4961 20.4783 9.49881 20.9768L9.4985 20.977C9.31046 21.071 9.12311 21.1646 8.93611 21.2562C7.25633 22.0782 6.41645 22.4893 5.88937 22.1045C5.38644 21.7285 5.36431 21.0194 5.5044 20.2351C5.56226 19.9112 5.5912 19.7492 5.52074 19.6474C5.45029 19.5457 5.28808 19.5158 4.96365 19.4558C3.90736 19.2607 3.09038 18.8716 2.50944 18.2886C1.25 17.0245 1.25 14.99 1.25 10.9211V10.3816C1.25 6.31261 1.25 4.27813 2.50944 3.01407C3.76888 1.75 5.79592 1.75 9.85 1.75Z">`),kt=e=>{let t=()=>e.size??14;return(()=>{var n=Ot();return I(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&R(n,`width`,r.e=i),a!==r.t&&R(n,`height`,r.t=a),o!==r.a&&R(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},At=F(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path d="M16.0549 8.25C17.4225 8.24998 18.5248 8.24996 19.3918 8.36652C20.2919 8.48754 21.0497 8.74643 21.6517 9.34835C22.2536 9.95027 22.5125 10.7081 22.6335 11.6083C22.75 12.4752 22.75 13.5775 22.75 14.9451V14.9451V16.0549V16.0549C22.75 17.4225 22.75 18.5248 22.6335 19.3918C22.5125 20.2919 22.2536 21.0497 21.6517 21.6517C21.0497 22.2536 20.2919 22.5125 19.3918 22.6335C18.5248 22.75 17.4225 22.75 16.0549 22.75H16.0549H14.9451H14.9451C13.5775 22.75 12.4752 22.75 11.6082 22.6335C10.7081 22.5125 9.95027 22.2536 9.34835 21.6516C8.74643 21.0497 8.48754 20.2919 8.36652 19.3918C8.24996 18.5248 8.24998 17.4225 8.25 16.0549V16.0549V14.9451V14.9451C8.24998 13.5775 8.24996 12.4752 8.36652 11.6082C8.48754 10.7081 8.74643 9.95027 9.34835 9.34835C9.95027 8.74643 10.7081 8.48754 11.6083 8.36652C12.4752 8.24996 13.5775 8.24998 14.9451 8.25H14.9451H16.0549H16.0549Z"></path><path d="M6.75 14.8569C6.74991 13.5627 6.74983 12.3758 6.8799 11.4084C7.0232 10.3425 7.36034 9.21504 8.28769 8.28769C9.21504 7.36034 10.3425 7.0232 11.4084 6.8799C12.3758 6.74983 13.5627 6.74991 14.8569 6.75L17.0931 6.75C17.3891 6.75 17.5371 6.75 17.6261 6.65419C17.7151 6.55838 17.7045 6.4142 17.6833 6.12584C17.6648 5.87546 17.6412 5.63892 17.6111 5.41544C17.4818 4.45589 17.2232 3.6585 16.6718 2.98663C16.4744 2.74612 16.2539 2.52558 16.0134 2.3282C15.3044 1.74638 14.4557 1.49055 13.4248 1.36868C12.4205 1.24998 11.1512 1.24999 9.54893 1.25H9.45109C7.84883 1.24999 6.57947 1.24998 5.57525 1.36868C4.54428 1.49054 3.69558 1.74638 2.98663 2.3282C2.74612 2.52558 2.52558 2.74612 2.3282 2.98663C1.74638 3.69558 1.49055 4.54428 1.36868 5.57525C1.24998 6.57947 1.24999 7.84882 1.25 9.45108V9.54891C1.24999 11.1512 1.24998 12.4205 1.36868 13.4247C1.49054 14.4557 1.74638 15.3044 2.3282 16.0134C2.52558 16.2539 2.74612 16.4744 2.98663 16.6718C3.6585 17.2232 4.45589 17.4818 5.41544 17.6111C5.63892 17.6412 5.87546 17.6648 6.12584 17.6833C6.4142 17.7045 6.55838 17.7151 6.65419 17.6261C6.75 17.5371 6.75 17.3891 6.75 17.0931V14.8569Z">`),jt=e=>{let t=()=>e.size??14;return(()=>{var n=At();return I(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&R(n,`width`,r.e=i),a!==r.t&&R(n,`height`,r.t=a),o!==r.a&&R(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},Mt=(e,t,n)=>(e.x-n.x)*(t.y-n.y)-(t.x-n.x)*(e.y-n.y),Nt=(e,t,n,r)=>{let i=Mt(e,t,n),a=Mt(e,n,r),o=Mt(e,r,t);return!(i<0||a<0||o<0)||!(i>0||a>0||o>0)},Pt=(e,t)=>e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height,Ft=(e,t)=>{let n=t.y+t.height,r=t.x+t.width;return e.y<=t.y?[{x:t.x,y:n},{x:r,y:n}]:e.y>=n?[{x:t.x,y:t.y},{x:r,y:t.y}]:e.x<=t.x?[{x:r,y:t.y},{x:r,y:n}]:[{x:t.x,y:t.y},{x:t.x,y:n}]},It=()=>{let e=null,t=()=>{e?.(),e=null};return{start:(n,r,i)=>{t();let a=r[0];if(!a||Pt(n,a))return;let[o,s]=Ft(n,a),c=e=>r.some(t=>Pt(e,t)),l=e=>{let r={x:e.clientX,y:e.clientY};if(c(r)){Pt(r,a)&&t();return}Nt(r,n,o,s)||(t(),i())};window.addEventListener(`mousemove`,l),e=()=>{window.removeEventListener(`mousemove`,l)}},stop:t}},Lt=F(`<div>`),Rt=0,zt=()=>Date.now()-Rt<100,Bt=e=>{let[t,r]=l(!1),[i,a]=l(!0),o;H(j(()=>e.visible,e=>{o!==void 0&&(clearTimeout(o),o=void 0),e?zt()?(a(!1),r(!0)):(a(!0),o=setTimeout(()=>{r(!0)},400)):(t()&&(Rt=Date.now()),r(!1))})),P(()=>{o!==void 0&&clearTimeout(o),t()&&(Rt=Date.now())});let s=()=>e.position===`top`||e.position===`bottom`?{left:`50%`,translate:`-50%`,"z-index":`${n}`}:{top:`50%`,translate:`0 -50%`,"z-index":`${n}`};return y(A,{get when(){return t()},get children(){var t=Lt();return U(t,()=>e.children),I(n=>{var r=q(S,`bg-white`,e.position===`top`&&`bottom-full mb-2.5`,e.position===`bottom`&&`top-full mt-2.5`,e.position===`left`&&`right-full mr-2.5`,e.position===`right`&&`left-full ml-2.5`,i()&&`animate-tooltip-fade-in`),a=s();return r!==n.e&&L(t,n.e=r),n.t=be(t,a,n.t),n},{e:void 0,t:void 0}),t}})},Vt=F(`<kbd class="inline-flex items-center justify-center px-[3px] h-3.5 rounded-sm [border-width:0.5px] border-solid border-[#B3B3B3] text-black/70 text-[10px] font-medium leading-none">`),Ht=e=>(()=>{var t=Vt();return U(t,()=>e.children),t})(),Ut=(e,t,n)=>{if(t)return e?`grid-rows-[1fr] opacity-100`:`grid-cols-[1fr] opacity-100`;let r=e?`grid-rows-[0fr] opacity-0`:`grid-cols-[0fr] opacity-0`;return n?`${r} ${n}`:r},Wt=e=>e?`mb-1.5`:`mr-1.5`,Gt=e=>e?`min-h-0`:`min-w-0`,Kt=e=>e?`before:!min-h-full`:`before:!min-w-full`,qt=F(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><path d="m18 15-6-6-6 6">`),Jt=e=>{let t=()=>e.size??12;return(()=>{var n=qt();return I(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&R(n,`width`,r.e=i),a!==r.t&&R(n,`height`,r.t=a),o!==r.a&&R(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},Yt=F(`<button data-react-grab-ignore-events data-react-grab-toolbar-collapse class="contain-layout shrink-0 flex items-center justify-center cursor-pointer interactive-scale">`),Xt=F(`<div><div><div><div><div><div></div></div><div><div></div></div><div><div></div></div></div><div class="relative shrink-0 overflow-visible">`),Zt=e=>{let t=()=>e.snapEdge??`bottom`,n=()=>t()===`left`||t()===`right`,r=(e,t)=>Ut(n(),e,t),i=()=>e.disableGridTransitions?``:n()?`transition-[grid-template-rows,opacity] duration-150 ease-out`:`transition-[grid-template-columns,opacity] duration-150 ease-out`,a=()=>e.disableGridTransitions?``:n()?`transition-[grid-template-rows] duration-150 ease-out`:`transition-[grid-template-columns] duration-150 ease-out`,o=()=>Gt(n()),s=()=>e.isCollapsed?`${{top:`rounded-t-none rounded-b-[10px]`,bottom:`rounded-b-none rounded-t-[10px]`,left:`rounded-l-none rounded-r-[10px]`,right:`rounded-r-none rounded-l-[10px]`}[t()]} ${n()?`px-0.25 py-2`:`px-2 py-0.25`}`:``,c=()=>{let n=e.isCollapsed;switch(t()){case`top`:return n?`rotate-180`:`rotate-0`;case`bottom`:return n?`rotate-0`:`rotate-180`;case`left`:return n?`rotate-90`:`-rotate-90`;case`right`:return n?`-rotate-90`:`rotate-90`;default:return`rotate-0`}},l=()=>(()=>{var t=Yt();return V(t,`click`,e.onCollapseClick,!0),U(t,y(Jt,{size:14,get class(){return q(`text-[#B3B3B3] transition-transform duration-150`,c())}})),I(()=>R(t,`aria-label`,e.isCollapsed?`Expand toolbar`:`Collapse toolbar`)),t})();return(()=>{var t=Xt(),c=t.firstChild,u=c.firstChild,d=u.firstChild,f=d.firstChild,p=f.firstChild,m=f.nextSibling,h=m.firstChild,g=m.nextSibling,_=g.firstChild,v=d.nextSibling;return V(t,`click`,e.onPanelClick,!0),V(t,`animationend`,e.onAnimationEnd),M(t=>e.onExpandableButtonsRef?.(t),d),U(p,()=>e.selectButton),U(h,()=>e.commentsButton),U(_,()=>e.copyAllButton),U(v,()=>e.toggleButton),U(t,()=>e.collapseButton??l(),null),I(l=>{var v=q(`flex items-center justify-center rounded-[10px] antialiased relative overflow-visible [font-synthesis:none] filter-[drop-shadow(0px_1px_2px_#51515140)] [corner-shape:superellipse(1.25)]`,n()&&`flex-col`,`bg-white`,!e.isCollapsed&&(n()?`px-1.5 gap-1.5 py-2`:`py-1.5 gap-1.5 px-2`),s(),e.isShaking&&`animate-shake`),y=e.transformOrigin,b=q(`grid relative overflow-visible`,a(),e.isCollapsed?n()?`grid-rows-[0fr] pointer-events-none`:`grid-cols-[0fr] pointer-events-none`:n()?`grid-rows-[1fr]`:`grid-cols-[1fr]`),x=q(`flex`,n()?`flex-col items-center min-h-0`:`items-center min-w-0`,e.isCollapsed?`opacity-0`:`opacity-100`,!e.disableGridTransitions&&`transition-opacity duration-150 ease-out`),S=q(`flex items-center`,n()&&`flex-col`),C=q(`grid`,i(),r(!!e.enabled)),w=q(`relative overflow-visible`,o()),T=q(`grid`,i(),r(!!e.enabled&&!!e.isCommentsExpanded,`pointer-events-none`)),ee=q(`relative overflow-visible`,o()),te=q(`grid`,i(),r(!!e.isCopyAllExpanded,`pointer-events-none`)),E=q(`relative overflow-visible`,o());return v!==l.e&&L(t,l.e=v),y!==l.t&&N(t,`transform-origin`,l.t=y),b!==l.a&&L(c,l.a=b),x!==l.o&&L(u,l.o=x),S!==l.i&&L(d,l.i=S),C!==l.n&&L(f,l.n=C),w!==l.s&&L(p,l.s=w),T!==l.h&&L(m,l.h=T),ee!==l.r&&L(h,l.r=ee),te!==l.d&&L(g,l.d=te),E!==l.l&&L(_,l.l=E),l},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),t})()};B([`click`]);var Qt=e=>{let[n,r]=l(!1),[a,o]=l(!1),[s,c]=l(!1),[u,d]=l({x:0,y:0}),f={x:0,y:0},p={x:0,y:0,time:0},m={x:0,y:0},h=!1,g,_=null,v=()=>{_?.abort(),_=null},y=t=>{if(!s()){if(Math.hypot(t.clientX-m.x,t.clientY-m.y)<=5)return;c(!0),e.onDragStart()}let n=performance.now(),r=n-p.time;r>0&&d({x:(t.clientX-p.x)/r,y:(t.clientY-p.y)/r}),p={x:t.clientX,y:t.clientY,time:n};let i=t.clientX-f.x,a=t.clientY-f.y;e.onPositionUpdate({x:i,y:a})},b=()=>{v();let n=s();if(r(!1),!n)return;h=!0;let a=e.getContainerRef(),c=a?.getBoundingClientRect();if(!c)return;let l=u(),d=T(c.left,c.top,c.width,c.height,l.x,l.y),f=w(d.edge,d.x,d.y,c.width,c.height);e.onSnapEdgeChange(d.edge,f),o(!0),i(()=>{let n=a?.getBoundingClientRect(),r=n?{width:n.width,height:n.height}:e.getExpandedDimensions();i(()=>{let n=t(d.edge,f,r.width,r.height);e.onSnapComplete({edge:d.edge,ratio:f,position:n,expandedDimensions:r}),g=setTimeout(()=>{o(!1),e.onSnapAnimationEnd()},300)})})};return P(()=>{v(),clearTimeout(g)}),{isDragging:n,isSnapping:a,handlePointerDown:t=>{if(t.button!==0||e.isCollapsed())return;let n=e.getContainerRef()?.getBoundingClientRect();if(!n)return;m={x:t.clientX,y:t.clientY},f={x:t.clientX-n.left,y:t.clientY-n.top},r(!0),c(!1),d({x:0,y:0}),p={x:t.clientX,y:t.clientY,time:performance.now()},v(),_=new AbortController;let{signal:i}=_;window.addEventListener(`pointermove`,y,{signal:i}),window.addEventListener(`pointerup`,b,{signal:i}),window.addEventListener(`pointercancel`,b,{signal:i})},createDragAwareHandler:e=>t=>{if(t.stopImmediatePropagation(),h){h=!1;return}e()}}},$t=F(`<span>Click or<!>to capture`),en=F(`<span>to fine-tune target`),tn=F(`<span>to cancel`),nn=F(`<div>`),rn=F(`<div>Enable to continue`),an=F(`<div data-react-grab-ignore-events data-react-grab-toolbar>`),on=F(`<button data-react-grab-ignore-events data-react-grab-toolbar-toggle>`),sn=F(`<span data-react-grab-unread-indicator class="absolute -top-1 -right-1 min-w-2.5 h-2.5 px-0.5 flex items-center justify-center rounded-full bg-black text-white text-[8px] font-semibold leading-none">`),cn=F(`<button data-react-grab-ignore-events data-react-grab-toolbar-comments aria-haspopup=menu><span class="inline-flex relative">`),ln=F(`<button data-react-grab-ignore-events data-react-grab-toolbar-copy-all aria-label="Copy all comments">`),un=F(`<button data-react-grab-ignore-events data-react-grab-toolbar-enabled><div><div>`),dn=e=>{let o,d,f=null,p=0,m=0,h=It(),g=e=>{if(!o)return null;let t=o.getRootNode().querySelector(e);if(!t)return null;let n=t.getBoundingClientRect();return{x:n.x-8,y:n.y-8,width:n.width+16,height:n.height+16}},b=(...e)=>{let t=[];for(let n of e){let e=g(n);e&&t.push(e)}return t.length>0?t:null},C=ce(),[T,te]=l(!1),[E,D]=l(!1),[ne,re]=l(!1),[k,F]=l(C?.edge??`bottom`),[se,le]=l(C?.ratio??.5),[ue,z]=l({x:0,y:0}),[fe,B]=l(!1),[he,G]=l(!1),[_e,ye]=l(!1),[xe,Se]=l(!1),[Ce,we]=l(!1),[K,Te]=l(!1),[Ee,De]=l(!1),[Oe,ke]=l(!1),[je,Me]=l(!1),Ne,[Pe,Fe]=l(0),[Ie,Le]=l(!1),Re=Qt({getContainerRef:()=>o,isCollapsed:E,getExpandedDimensions:()=>X,onDragStart:()=>{f&&(f(),f=null,s(),O())},onPositionUpdate:e=>z(e),onSnapEdgeChange:(e,t)=>{F(e),le(t)},onSnapComplete:t=>{X=t.expandedDimensions,z(t.position),pt({edge:t.edge,ratio:t.ratio,collapsed:E(),enabled:e.enabled??!0})},onSnapAnimationEnd:()=>{e.enabled&&He()}}),ze=()=>(e.clockFlashTrigger??0)>0;H(j(()=>[e.isActive,ze()],([e,t])=>{if(Fe(0),Le(!1),!e||t)return;let n=setInterval(()=>{Ie()||Le(!0),Fe(e=>(e+1)%3)},ae);P(()=>clearInterval(n))},{defer:!0}));let Be=()=>{let t=e.commentItemCount??0;return t>0?`Comments (${t})`:`Comments`},Ve=()=>q(`transition-colors`,e.isCommentsPinned?`text-black/50`:`text-[#B3B3B3]`),J=()=>k()===`left`||k()===`right`,He=()=>{if(!d)return;let e=d.getBoundingClientRect();J()?m=e.height:p=e.width},Ue=()=>!E()&&!e.isCommentsDropdownOpen&&!e.isToolbarMenuOpen&&!e.isClearPromptOpen,We=()=>{switch(k()){case`top`:return`bottom`;case`bottom`:return`top`;case`left`:return`right`;case`right`:return`left`}},Y=()=>Wt(J()),Ge=()=>Kt(J()),Ke=()=>{let e=We();return J()?e===`left`?`right-full mr-0.5`:`left-full ml-0.5`:e===`top`?`bottom-full mb-0.5`:`top-full mt-0.5`},qe=()=>J()?{top:`50%`,translate:`0 -50%`}:{left:`50%`,translate:`-50%`},Je=e=>{e.stopImmediatePropagation()},Ye=(t,n)=>({onMouseEnter:e=>{Re.isDragging()||(h.stop(),t(!0),n?.shouldFreezeInteractions!==!1&&!f&&(f=ie(),x(),me(e.clientX,e.clientY)),n?.onHoverChange?.(!0))},onMouseLeave:r=>{t(!1),n?.shouldFreezeInteractions!==!1&&!e.isActive&&!e.isContextMenuOpen&&(f?.(),f=null,s(),O());let i=n?.safePolygonTargets?.();if(i){h.start({x:r.clientX,y:r.clientY},i,()=>n?.onHoverChange?.(!1));return}n?.onHoverChange?.(!1)}}),Xe,Ze=()=>{Xe!==void 0&&(clearTimeout(Xe),Xe=void 0)};H(j(()=>e.shakeCount,t=>{t&&!e.enabled&&(B(!0),we(!0),Ze(),Xe=setTimeout(()=>{we(!1)},1500),P(()=>{Ze()}))})),H(j(()=>e.enabled,e=>{e&&Ce()&&(we(!1),Ze())})),H(j(()=>[e.isActive,e.isContextMenuOpen],([e,t])=>{!e&&!t&&f&&(f(),f=null)}));let Qe=()=>{if(!o)return;let e=o.getBoundingClientRect();X={width:e.width,height:e.height};let t=ue(),n=ve(),r=k(),a=t.x,s=t.y;if(r===`top`||r===`bottom`){let i=n.offsetLeft+16,o=Math.max(i,n.offsetLeft+n.width-e.width-16);a=pe(t.x,i,o),s=r===`top`?n.offsetTop+16:n.offsetTop+n.height-e.height-16}else{let i=n.offsetTop+16,o=Math.max(i,n.offsetTop+n.height-e.height-16);s=pe(t.y,i,o),a=r===`left`?n.offsetLeft+16:n.offsetLeft+n.width-e.width-16}le(w(r,a,s,e.width,e.height)),(a!==t.x||s!==t.y)&&(G(!0),i(()=>{i(()=>{z({x:a,y:s}),Z&&clearTimeout(Z),Z=setTimeout(()=>{G(!1)},150)})}))};H(j(()=>e.clockFlashTrigger??0,()=>{if(e.isCommentsDropdownOpen)return;Ne&&(Ne.classList.remove(`animate-clock-flash`),Ne.offsetHeight,Ne.classList.add(`animate-clock-flash`)),ke(!0);let t=setTimeout(()=>{Ne?.classList.remove(`animate-clock-flash`),ke(!1)},u);P(()=>{clearTimeout(t),ke(!1)})},{defer:!0})),H(j(()=>e.commentItemCount??0,()=>{E()||(dt&&clearTimeout(dt),dt=setTimeout(()=>{He(),Qe()},150),P(()=>{dt&&clearTimeout(dt)}))},{defer:!0}));let X={width:78,height:28},[$e,et]=l({width:14,height:14}),tt=(e,t)=>{let n=o?.getBoundingClientRect(),r=n?.width??14,i=n?.height??14;return c(e,t,X,r,i)},nt=()=>{z(t(k(),se(),X.width,X.height))},rt=Re.createDragAwareHandler(()=>e.onToggle?.()),it=Re.createDragAwareHandler(()=>e.onToggleComments?.()),at=Re.createDragAwareHandler(()=>e.onCopyAll?.()),ot=Re.createDragAwareHandler(()=>{let t=o?.getBoundingClientRect(),n=E(),r=se();if(n){let{position:e,ratio:t}=tt(mt(),k());r=t,z(e),le(r)}else t&&(X={width:t.width,height:t.height});G(!0),D(e=>!e),pt({edge:k(),ratio:r,collapsed:!n,enabled:e.enabled??!0}),Z&&clearTimeout(Z),Z=setTimeout(()=>{if(G(!1),E()){let e=o?.getBoundingClientRect();e&&et({width:e.width,height:e.height})}},150)}),st=Re.createDragAwareHandler(()=>{let t=!!e.enabled,n=k(),r=ue(),a=n===`left`||n===`right`,o=()=>a?m:p;t&&d&&!K()&&He();let s=o(),c=s>0,l=0;if(d){let e=d.getBoundingClientRect();l=a?e.height:e.width}if(!t&&s===0&&d){let t=(e.commentItemCount??0)>0,n=Array.from(d.children).filter(n=>n instanceof HTMLElement?n.querySelector(`[data-react-grab-toolbar-comments]`)?t:n.querySelector(`[data-react-grab-toolbar-copy-all]`)?!!e.isCommentsDropdownOpen:!0:!1),r=a?`gridTemplateRows`:`gridTemplateColumns`;for(let e of n)e.style.transition=`none`,e.style[r]=`1fr`;d.offsetWidth,He(),s=o();for(let e of n)e.style[r]=``;d.offsetWidth;for(let e of n)e.style.transition=``;c=s>0}if(c&&(De(K()),Te(!0)),e.onToggleEnabled?.(),c){let e=t?-s:s;X=a?{width:X.width,height:X.height+e}:{width:X.width+e,height:X.height};let o=a?r.y+l:r.x+l,c=e=>{let t=ve(),n=o-e;if(a){let e=t.offsetTop+16,i=t.offsetTop+t.height-X.height-16;return{x:r.x,y:pe(n,e,i)}}return{x:pe(n,t.offsetLeft+16,t.offsetLeft+t.width-X.width-16),y:r.y}};if(Q!==void 0&&_(Q),Ee())z(c(t?0:s)),Q=void 0;else{let e=performance.now(),t=()=>{if(performance.now()-e>200){Q=void 0;return}d&&z(c(a?d.getBoundingClientRect().height:d.getBoundingClientRect().width)),Q=i(t)};Q=i(t)}clearTimeout(ut),ut=setTimeout(()=>{Q!==void 0&&(_(Q),Q=void 0),z(c(t?0:s)),Te(!1),De(!1);let e=w(n,ue().x,ue().y,X.width,X.height);le(e),pt({edge:n,ratio:e,collapsed:E(),enabled:!t})},150)}else pt({edge:n,ratio:se(),collapsed:E(),enabled:!t})}),ct=()=>r(k(),ue(),X,$e()),lt,Z,ut,Q,dt,ft=()=>{Re.isDragging()||(re(!0),nt(),lt&&clearTimeout(lt),lt=setTimeout(()=>{re(!1);let t=w(k(),ue().x,ue().y,X.width,X.height);le(t),pt({edge:k(),ratio:t,collapsed:E(),enabled:e.enabled??!0})},500))},pt=t=>{a(t),e.onStateChange?.(t)};oe(()=>{o&&e.onContainerRef?.(o);let n=o?.getBoundingClientRect(),r=ve();if(C){if(n&&(X={width:n.width,height:n.height}),C.collapsed){let e=C.edge===`top`||C.edge===`bottom`;et({width:e?28:14,height:e?14:28})}D(C.collapsed),z(t(C.edge,C.ratio,X.width,X.height))}else n?(X={width:n.width,height:n.height},z({x:r.offsetLeft+(r.width-n.width)/2,y:r.offsetTop+r.height-n.height-16}),le(v)):z(t(`bottom`,v,X.width,X.height));e.enabled&&He(),e.onSubscribeToStateChanges&&P(e.onSubscribeToStateChanges(e=>{if(he()||K()||!o?.getBoundingClientRect())return;let n=E()!==e.collapsed;if(F(e.edge),n&&!e.collapsed){let t=mt();G(!0),D(e.collapsed);let{position:n,ratio:r}=tt(t,e.edge);z(n),le(r),clearTimeout(Z),Z=setTimeout(()=>{G(!1)},150)}else n&&(G(!0),clearTimeout(Z),Z=setTimeout(()=>{G(!1)},150)),D(e.collapsed),z(t(e.edge,e.ratio,X.width,X.height)),le(e.ratio)})),window.addEventListener(`resize`,ft),window.visualViewport?.addEventListener(`resize`,ft),window.visualViewport?.addEventListener(`scroll`,ft);let i=setTimeout(()=>{te(!0)},500);P(()=>{clearTimeout(i)})}),P(()=>{window.removeEventListener(`resize`,ft),window.visualViewport?.removeEventListener(`resize`,ft),window.visualViewport?.removeEventListener(`scroll`,ft),clearTimeout(lt),clearTimeout(Z),Ze(),clearTimeout(ut),clearTimeout(dt),Q!==void 0&&_(Q),f?.(),h.stop()});let mt=()=>E()?ct():ue(),ht=()=>E()?`cursor-pointer`:Re.isDragging()?`cursor-grabbing`:`cursor-grab`,gt=()=>ne()?``:Re.isSnapping()?`transition-[transform,opacity] duration-300 ease-out`:he()?`transition-[transform,opacity] duration-150 ease-out`:K()?`transition-opacity duration-150 ease-out`:`transition-opacity duration-300 ease-out`,_t=()=>{switch(k()){case`top`:return`center top`;case`bottom`:return`center bottom`;case`left`:return`left center`;case`right`:return`right center`;default:return`center center`}};return(()=>{var t=an();t.addEventListener(`mouseleave`,()=>e.onSelectHoverChange?.(!1)),t.addEventListener(`mouseenter`,()=>!E()&&e.onSelectHoverChange?.(!0)),V(t,`mousedown`,Je),V(t,`pointerdown`,e=>{Je(e),Re.handlePointerDown(e)});var r=o;return typeof r==`function`?M(r,t):o=t,U(t,y(Zt,{get isActive(){return e.isActive},get enabled(){return e.enabled},get isCollapsed(){return E()},get snapEdge(){return k()},get isShaking(){return fe()},get isCommentsExpanded(){return(e.commentItemCount??0)>0},get isCopyAllExpanded(){return!!e.isCommentsDropdownOpen},get isCommentsPinned(){return e.isCommentsPinned},get disableGridTransitions(){return Ee()},get transformOrigin(){return _t()},onAnimationEnd:()=>B(!1),onCollapseClick:ot,onExpandableButtonsRef:e=>{d=e},onPanelClick:t=>{if(E()){t.stopPropagation();let{position:n,ratio:r}=tt(mt(),k());z(n),le(r),G(!0),D(!1),pt({edge:k(),ratio:r,collapsed:!1,enabled:e.enabled??!0}),Z&&clearTimeout(Z),Z=setTimeout(()=>{G(!1)},150)}},get selectButton(){return[(()=>{var t=on();return V(t,`contextmenu`,t=>{t.preventDefault(),t.stopPropagation(),ye(!1),e.onToggleToolbarMenu?.()}),t.$$click=e=>{ye(!1),rt(e)},ge(t,ee({get"aria-label"(){return e.isActive?`Stop selecting element`:`Select element`},get"aria-pressed"(){return!!e.isActive},get class(){return q(`contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox`,Y(),Ge())}},()=>Ye(ye)),!1,!0),U(t,y(Dt,{size:14,get class(){return q(`transition-colors`,e.isActive?`text-black`:`text-black/70`)}})),t})(),y(Bt,{get visible(){return W(()=>!!_e())()&&Ue()},get position(){return We()},get children(){return[`Select element `,y(Ht,{get children(){return Ae(`C`)}})]}})]},get commentsButton(){return[(()=>{var t=cn(),n=t.firstChild;t.$$click=e=>{ke(!1),it(e)},ge(t,ee({get"aria-label"(){return`Open comments${(e.commentItemCount??0)>0?` (${e.commentItemCount??0} items)`:``}`},get"aria-expanded"(){return!!e.isCommentsDropdownOpen},get class(){return q(`contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox`,Y(),Ge())}},()=>Ye(t=>{t&&e.isCommentsDropdownOpen||ke(t)},{onHoverChange:t=>e.onCommentsButtonHover?.(t),shouldFreezeInteractions:!1,safePolygonTargets:()=>e.isCommentsDropdownOpen?b(`[data-react-grab-comments-dropdown]`,`[data-react-grab-toolbar-copy-all]`):null})),!1,!0);var r=Ne;return typeof r==`function`?M(r,n):Ne=n,U(n,y(kt,{size:14,get class(){return Ve()}}),null),U(n,y(A,{get when(){return(e.commentItemCount??0)>0},get children(){var t=sn();return U(t,()=>e.commentItemCount),t}}),null),t})(),y(Bt,{get visible(){return W(()=>!!Oe())()&&Ue()},get position(){return We()},get children(){return Be()}})]},get copyAllButton(){return[(()=>{var t=ln();return t.$$click=e=>{Me(!1),at(e)},ge(t,ee({get class(){return q(`contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox`,Y(),Ge())}},()=>Ye(Me,{onHoverChange:t=>e.onCopyAllHover?.(t),shouldFreezeInteractions:!1,safePolygonTargets:()=>e.isCommentsDropdownOpen?b(`[data-react-grab-comments-dropdown]`,`[data-react-grab-toolbar-comments]`):null})),!1,!0),U(t,y(jt,{size:14,class:`text-[#B3B3B3] transition-colors`})),t})(),y(Bt,{get visible(){return W(()=>!!je())()&&Ue()},get position(){return We()},children:`Copy all`})]},get toggleButton(){return[(()=>{var t=un(),n=t.firstChild,r=n.firstChild;return t.addEventListener(`mouseleave`,()=>Se(!1)),t.addEventListener(`mouseenter`,()=>Se(!0)),t.$$click=e=>{Se(!1),st(e)},I(i=>{var a=e.enabled?`Disable React Grab`:`Enable React Grab`,o=!!e.enabled,s=q(`contain-layout flex items-center justify-center cursor-pointer interactive-scale outline-none`,J()?`my-0.5`:`mx-0.5`),c=q(`relative rounded-full transition-colors`,J()?`w-3.5 h-2.5`:`w-5 h-3`,e.enabled?`bg-black`:`bg-black/25`),l=q(`absolute top-0.5 rounded-full bg-white transition-transform`,J()?`w-1.5 h-1.5`:`w-2 h-2`,!e.enabled&&`left-0.5`,e.enabled&&(J()?`left-1.5`:`left-2.5`));return a!==i.e&&R(t,`aria-label`,i.e=a),o!==i.t&&R(t,`aria-pressed`,i.t=o),s!==i.a&&L(t,i.a=s),c!==i.o&&L(n,i.o=c),l!==i.i&&L(r,i.i=l),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t})(),y(Bt,{get visible(){return W(()=>!!xe())()&&Ue()},get position(){return We()},get children(){return e.enabled?`Disable`:`Enable`}})]}}),null),U(t,y(A,{get when(){return Ue()},get children(){return[y(A,{get when(){return W(()=>!!e.isActive)()&&!ze()},get children(){var e=nn();return U(e,y(A,{get when(){return Pe()===0},get children(){var e=$t(),t=e.firstChild.nextSibling;return t.nextSibling,U(e,y(Ht,{children:`↵`}),t),I(()=>L(e,q(`flex items-center gap-1`,Ie()&&`animate-[hint-flip-in_var(--transition-normal)_ease-out]`))),e}}),null),U(e,y(A,{get when(){return Pe()===1},get children(){var e=en(),t=e.firstChild;return U(e,y(Ht,{children:`↑`}),t),U(e,y(Ht,{children:`↓`}),t),I(()=>L(e,q(`flex items-center gap-1`,de))),e}}),null),U(e,y(A,{get when(){return Pe()===2},get children(){var e=tn(),t=e.firstChild;return U(e,y(Ht,{children:`esc`}),t),I(()=>L(e,q(`flex items-center gap-1`,de))),e}}),null),I(t=>{var r=q(S,`flex items-center gap-1 animate-tooltip-fade-in [animation-fill-mode:backwards]`,`bg-white`,Ke()),i={"z-index":String(n),...qe()};return r!==t.e&&L(e,t.e=r),t.t=be(e,i,t.t),t},{e:void 0,t:void 0}),e}}),y(A,{get when(){return Ce()},get children(){var e=rn();return I(t=>{var r=q(S,`animate-tooltip-fade-in`,`bg-white`,Ke()),i={"z-index":String(n),...qe()};return r!==t.e&&L(e,t.e=r),t.t=be(e,i,t.t),t},{e:void 0,t:void 0}),e}})]}}),null),I(e=>{var r=q(`fixed left-0 top-0 font-sans text-[13px] antialiased select-none`,ht(),gt(),T()?`opacity-100 pointer-events-auto`:`opacity-0 pointer-events-none`),i=String(n),a=`translate(${mt().x}px, ${mt().y}px)`,o=_t();return r!==e.e&&L(t,e.e=r),i!==e.t&&N(t,`z-index`,e.t=i),a!==e.a&&N(t,`transform`,e.a=a),o!==e.o&&N(t,`transform-origin`,e.o=o),e},{e:void 0,t:void 0,a:void 0,o:void 0}),t})()};B([`click`]);var $=e=>{e.type===`contextmenu`&&e.preventDefault(),e.stopImmediatePropagation()},fn=e=>{let t=t=>{if(e.isOpen()&&!(e.shouldIgnoreInputEvents&&E(t))){if(t.code===`Escape`){t.preventDefault(),t.stopImmediatePropagation(),e.onDismiss();return}t.code===`Enter`&&e.onConfirm&&(t.preventDefault(),t.stopImmediatePropagation(),e.onConfirm())}},n=t=>{e.isOpen()&&(o(t,`data-react-grab-ignore-events`)||e.shouldIgnoreRightClick&&t instanceof MouseEvent&&t.button===2||e.onDismiss())},r=i(()=>{window.addEventListener(`mousedown`,n,{capture:!0}),window.addEventListener(`touchstart`,n,{capture:!0})});return window.addEventListener(`keydown`,t,{capture:!0}),()=>{_(r),window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`mousedown`,n,{capture:!0}),window.removeEventListener(`touchstart`,n,{capture:!0})}},pn=F(`<div class="relative flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">`),mn=F(`<div data-react-grab-ignore-events data-react-grab-context-menu class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none"style=pointer-events:auto><div><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2">`),hn=F(`<button data-react-grab-ignore-events class="relative z-1 contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default"><span class="text-[13px] leading-4 font-sans font-medium text-black">`),gn=F(`<span class="text-[11px] font-sans text-black/50 ml-4">`),_n=t=>{let r,{containerRef:a,highlightRef:o,updateHighlight:s,clearHighlight:c}=Q(),[u,d]=l(0),[p,m]=l(0),h=()=>t.position!==null,g=D(()=>ke({tagName:t.tagName,componentName:t.componentName})),_=()=>{if(r){let e=r.getBoundingClientRect();d(e.width),m(e.height)}};H(()=>{h()&&i(_)});let v=D(()=>{let n=t.selectionBounds,r=t.position,i=u(),a=p();if(i===0||a===0||!n||!r)return{left:e.left,top:e.top,arrowLeft:0,arrowPosition:`bottom`};let o=r.x??n.x+n.width/2,s=Math.max(4,Math.min(o-i/2,window.innerWidth-i-4)),c=Math.max(8,Math.min(o-s,i-8)),l=n.y+n.height+8+4,d=n.y-a-8-4,f=l+a>window.innerHeight,m=d>=0,h=f&&m,g=h?d:l,_=h?`top`:`bottom`;if(f&&!m){let e=r.y??n.y+n.height/2;g=Math.max(4,Math.min(e+4,window.innerHeight-a-4)),_=`top`}return{left:s,top:g,arrowLeft:c,arrowPosition:_}}),b=D(()=>{let e=t.actions??[],n=t.actionContext;return e.map(e=>({label:e.label,action:()=>{n&&e.onAction(n)},enabled:f(e,n),shortcut:e.shortcut}))}),x=(e,n)=>{n.stopPropagation(),e.enabled&&(e.action(),t.onHide())};return oe(()=>{_();let e=e=>{if(!h())return;let n=e.key===`Enter`,r=e.metaKey||e.ctrlKey,i=e.key.toLowerCase(),a=t.actions??[],o=t.actionContext,s=n=>{o&&f(n,o)&&(e.preventDefault(),e.stopPropagation(),n.onAction(o),t.onHide())};if(n){let e=a.find(e=>e.shortcut===`Enter`);e&&s(e);return}if(!r||e.repeat)return;let c=a.find(e=>e.shortcut&&e.shortcut!==`Enter`&&i===e.shortcut.toLowerCase());c&&s(c)},n=fn({isOpen:h,onDismiss:t.onDismiss,shouldIgnoreRightClick:!0});window.addEventListener(`keydown`,e,{capture:!0}),P(()=>{n(),window.removeEventListener(`keydown`,e,{capture:!0})})}),y(A,{get when(){return h()},get children(){var e=mn(),i=e.firstChild,l=i.firstChild;V(e,`contextmenu`,$,!0),V(e,`click`,$,!0),V(e,`mousedown`,$,!0),V(e,`pointerdown`,$,!0);var u=r;return typeof u==`function`?M(u,e):r=e,N(e,`z-index`,`${n}`),U(e,y(Ie,{get position(){return v().arrowPosition},leftPercent:0,get leftOffsetPx(){return v().arrowLeft}}),i),U(l,y(J,{get tagName(){return g().tagName},get componentName(){return g().componentName},get isClickable(){return t.hasFilePath},onClick:e=>{e.stopPropagation(),t.hasFilePath&&t.actionContext&&(t.actions?.find(e=>e.id===`open`))?.onAction(t.actionContext)},shrink:!0,get forceShowIcon(){return t.hasFilePath}})),U(i,y(Ue,{get children(){var e=pn(),t=e.firstChild;return M(a,e),M(o,t),U(e,y(_e,{get each(){return b()},children:e=>(()=>{var t=hn(),n=t.firstChild;return t.$$click=t=>x(e,t),V(t,`pointerleave`,c),t.addEventListener(`pointerenter`,t=>{e.enabled&&s(t.currentTarget)}),t.$$pointerdown=e=>e.stopPropagation(),U(n,()=>e.label),U(t,y(A,{get when(){return e.shortcut},children:e=>(()=>{var t=gn();return U(t,()=>Ae(e())),t})()}),null),I(n=>{var r=e.label.toLowerCase(),i=!e.enabled;return r!==n.e&&R(t,`data-react-grab-menu-item`,n.e=r),i!==n.t&&(t.disabled=n.t=i),n},{e:void 0,t:void 0}),t})()}),null),e}}),null),I(t=>{var n=`${v().top}px`,r=`${v().left}px`,a=q(`contain-layout flex flex-col justify-center items-start rounded-[10px] antialiased w-fit h-fit min-w-[100px] [font-synthesis:none] [corner-shape:superellipse(1.25)]`,`bg-white`);return n!==t.e&&N(e,`top`,t.e=n),r!==t.t&&N(e,`left`,t.t=r),a!==t.a&&L(i,t.a=a),t},{e:void 0,t:void 0,a:void 0}),e}})};B([`pointerdown`,`mousedown`,`click`,`contextmenu`]);var vn=(e,t,n,r)=>Math.max(r,Math.min(e,n-t-r)),yn=({anchor:e,measuredWidth:t,measuredHeight:n,viewportWidth:r,viewportHeight:i,anchorGapPx:a,viewportPaddingPx:o,offscreenPosition:s})=>{if(!e||t===0||n===0)return s;let c,l;return e.edge===`left`||e.edge===`right`?(c=e.edge===`left`?e.x+a:e.x-t-a,l=e.y-n/2):(c=e.x-t/2,l=e.edge===`top`?e.y+a:e.y-n-a),{left:vn(c,t,r,o),top:vn(l,n,i,o)}},bn=(t,n)=>{let[r,a]=l(0),[o,s]=l(0),[c,u]=l(!1),[d,f]=l(!1),[p,m]=l(0),[h,g]=l(`bottom`),v,y,b=()=>{clearTimeout(v),y!==void 0&&(_(y),y=void 0)},x=()=>{let e=t();e&&(a(e.offsetWidth),s(e.offsetHeight))},S=()=>{m(e=>e+1),x()};return H(()=>{let e=n();e?(g(e.edge),clearTimeout(v),u(!0),y!==void 0&&_(y),y=i(()=>{x(),t()?.offsetHeight,f(!0)})):(y!==void 0&&_(y),f(!1),v=setTimeout(()=>{u(!1)},100)),P(b)}),H(()=>{n()&&(window.addEventListener(`resize`,S),window.visualViewport?.addEventListener(`resize`,S),window.visualViewport?.addEventListener(`scroll`,S),P(()=>{window.removeEventListener(`resize`,S),window.visualViewport?.removeEventListener(`resize`,S),window.visualViewport?.removeEventListener(`scroll`,S)}))}),{shouldMount:c,isAnimatedIn:d,lastAnchorEdge:h,displayPosition:D(t=>{p();let i=yn({anchor:n(),measuredWidth:r(),measuredHeight:o(),viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,anchorGapPx:8,viewportPaddingPx:8,offscreenPosition:e});return i.left===e.left?t:i},e),measure:x,clearAnimationHandles:b}},xn=F(`<div data-react-grab-ignore-events data-react-grab-toolbar-menu class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"><div><div class="relative flex flex-col py-1"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">`),Sn=F(`<button data-react-grab-ignore-events class="relative z-1 contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent"><span>`),Cn=F(`<span class="text-[11px] font-sans text-black/50 ml-4">`),wn=e=>{let t,{containerRef:r,highlightRef:i,updateHighlight:a,clearHighlight:o}=Q(),s=bn(()=>t,()=>e.position),c=(t,n)=>{n.stopPropagation(),e.onSetDefaultAction(t.id),e.onDismiss()};return oe(()=>{s.measure();let t=fn({isOpen:()=>!!e.position,onDismiss:e.onDismiss});P(()=>{s.clearAnimationHandles(),t()})}),y(A,{get when(){return s.shouldMount()},get children(){var l=xn(),u=l.firstChild,d=u.firstChild,f=d.firstChild;V(l,`contextmenu`,$,!0),V(l,`click`,$,!0),V(l,`mousedown`,$,!0),V(l,`pointerdown`,$,!0);var p=t;return typeof p==`function`?M(p,l):t=l,N(l,`z-index`,`${n}`),N(u,`min-width`,`100px`),M(r,d),M(i,f),U(d,y(_e,{get each(){return e.actions},children:t=>{let n=()=>t.id===e.defaultActionId;return(()=>{var e=Sn(),r=e.firstChild;return e.$$click=e=>c(t,e),V(e,`pointerleave`,o),e.addEventListener(`pointerenter`,e=>a(e.currentTarget)),e.$$pointerdown=e=>e.stopPropagation(),U(r,()=>t.label),U(e,y(A,{get when(){return t.shortcut},children:e=>(()=>{var t=Cn();return U(t,()=>Ae(e())),t})()}),null),I(i=>{var a=t.id,o=q(`text-[13px] leading-4 font-sans font-medium`,n()?`text-black`:`text-black/60`);return a!==i.e&&R(e,`data-react-grab-menu-item`,i.e=a),o!==i.t&&L(r,i.t=o),i},{e:void 0,t:void 0}),e})()}}),null),I(e=>{var t=`${s.displayPosition().top}px`,n=`${s.displayPosition().left}px`,r=s.isAnimatedIn()?`auto`:`none`,i=he[s.lastAnchorEdge()],a=s.isAnimatedIn()?`1`:`0`,o=s.isAnimatedIn()?`scale(1)`:`scale(0.95)`,c=q(`contain-layout flex flex-col rounded-[10px] antialiased w-fit h-fit overflow-hidden [font-synthesis:none] [corner-shape:superellipse(1.25)]`,`bg-white`);return t!==e.e&&N(l,`top`,e.e=t),n!==e.t&&N(l,`left`,e.t=n),r!==e.a&&N(l,`pointer-events`,e.a=r),i!==e.o&&N(l,`transform-origin`,e.o=i),a!==e.i&&N(l,`opacity`,e.i=a),o!==e.n&&N(l,`transform`,e.n=o),c!==e.s&&L(u,e.s=c),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),l}})};B([`pointerdown`,`mousedown`,`click`,`contextmenu`]);var Tn=F(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M4.63751 20.1665L3.82444 6.75092L3.73431 5.06621C3.72513 4.89447 3.8619 4.75018 4.03388 4.75018H19.9945C20.1685 4.75018 20.306 4.89769 20.2938 5.07124L20.1756 6.75092L19.3625 20.1665C19.2745 21.618 18.0717 22.7502 16.6176 22.7502H7.38247C5.9283 22.7502 4.72548 21.618 4.63751 20.1665ZM8.74963 16.5002C8.74963 16.9144 9.08542 17.2502 9.49963 17.2502C9.91385 17.2502 10.2496 16.9144 10.2496 16.5002V10.5002C10.2496 10.086 9.91385 9.75018 9.49963 9.75018C9.08542 9.75018 8.74963 10.086 8.74963 10.5002V16.5002ZM14.4996 9.75018C14.9138 9.75018 15.2496 10.086 15.2496 10.5002V16.5002C15.2496 16.9144 14.9138 17.2502 14.4996 17.2502C14.0854 17.2502 13.7496 16.9144 13.7496 16.5002V10.5002C13.7496 10.086 14.0854 9.75018 14.4996 9.75018Z"></path><path fill-rule=evenodd clip-rule=evenodd d="M8.31879 2.46286C8.63394 1.7275 9.35702 1.2507 10.1571 1.2507H13.8383C14.6383 1.2507 15.3614 1.7275 15.6766 2.46286L16.6569 4.75034H19.2239C19.2903 4.75034 19.3523 4.75034 19.4102 4.7507H19.4637C19.4857 4.74973 19.5079 4.74972 19.5303 4.7507H20.9977C21.55 4.7507 21.9977 5.19842 21.9977 5.7507C21.9977 6.30299 21.55 6.7507 20.9977 6.7507H2.99768C2.4454 6.7507 1.99768 6.30299 1.99768 5.7507C1.99768 5.19842 2.4454 4.7507 2.99768 4.7507H4.46507C4.48746 4.74972 4.50968 4.74973 4.53167 4.7507H4.58469C4.6426 4.75034 4.70457 4.75034 4.77093 4.75034H7.33844L8.31879 2.46286ZM13.8903 3.37192L14.481 4.75034H9.5144L10.1052 3.37192C10.1367 3.29838 10.209 3.2507 10.289 3.2507L13.7064 3.2507C13.7864 3.2507 13.8587 3.29838 13.8903 3.37192Z">`),En=e=>{let t=()=>e.size??14;return(()=>{var n=Tn();return I(r=>{var i=t(),a=t(),o=e.class;return i!==r.e&&R(n,`width`,r.e=i),a!==r.t&&R(n,`height`,r.t=a),o!==r.a&&R(n,`class`,r.a=o),r},{e:void 0,t:void 0,a:void 0}),n})()},Dn=e=>{let t=Math.floor((Date.now()-e)/1e3);if(t<60)return`now`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<24?`${r}h`:`${Math.floor(r/24)}d`},On=F(`<div class="flex items-center gap-[5px]"><div class=relative><button data-react-grab-ignore-events data-react-grab-comments-clear class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-[#FEF2F2] cursor-pointer transition-all hover:bg-[#FEE2E2] press-scale h-[17px] text-[#B91C1C]"></button></div><div class=relative><button data-react-grab-ignore-events data-react-grab-comments-copy-all class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] press-scale h-[17px]">`),kn=F(`<div data-react-grab-ignore-events data-react-grab-comments-dropdown class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"><div><div class="contain-layout shrink-0 flex items-center justify-between px-2 pt-1.5 pb-1"><span class="text-[11px] font-medium text-black/40">Comments</span></div><div class="min-h-0 [border-top-width:0.5px] border-t-solid border-t-[#D9D9D9] px-2 py-1.5"><div class="relative flex flex-col max-h-[240px] overflow-y-auto -mx-2 -my-1.5 [scrollbar-width:thin] [scrollbar-color:transparent_transparent] hover:[scrollbar-color:rgba(0,0,0,0.15)_transparent]"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">`),An=F(`<span class="text-black text-[13px] leading-3.5 font-sans font-medium">Copy`),jn=F(`<span class="text-[11px] leading-3 font-sans text-black/40 truncate mt-0.5">`),Mn=F(`<div data-react-grab-ignore-events data-react-grab-comment-item class="group relative z-1 contain-layout flex items-start justify-between w-full px-2 py-1 cursor-pointer text-left gap-2"tabindex=0><span class="flex flex-col min-w-0 flex-1"><span class="text-[12px] leading-4 font-sans font-medium text-black truncate"></span></span><span class="shrink-0 text-[10px] font-sans text-black/25 flex items-center justify-end">`),Nn=e=>e.elementsCount&&e.elementsCount>1?`${e.elementsCount} elements`:e.componentName??e.tagName,Pn=e=>{let t,{containerRef:r,highlightRef:i,updateHighlight:a,clearHighlight:o}=Q(),s=It(),c=()=>{if(!t)return null;let e=t.getRootNode().querySelector(`[data-react-grab-toolbar]`);if(!e)return null;let n=e.getBoundingClientRect();return[{x:n.x-8,y:n.y-8,width:n.width+16,height:n.height+16}]},d=bn(()=>t,()=>e.position),[f,p]=l(null),[m,h]=l(!1),g;H(j(()=>d.isAnimatedIn(),n=>{n&&t?.matches(`:hover`)&&e.onDropdownHover?.(!0)},{defer:!0}));let _=()=>Math.min(280,window.innerWidth-d.displayPosition().left-8),v=()=>window.innerHeight-d.displayPosition().top-8,b=()=>Math.max(180,e.position?.toolbarWidth??0);return oe(()=>{d.measure();let t=t=>{e.position&&t.code===`Escape`&&(t.preventDefault(),t.stopPropagation(),e.onDismiss?.())};window.addEventListener(`keydown`,t,{capture:!0}),P(()=>{clearTimeout(g),d.clearAnimationHandles(),window.removeEventListener(`keydown`,t,{capture:!0}),s.stop()})}),y(A,{get when(){return d.shouldMount()},get children(){var l=kn(),x=l.firstChild,S=x.firstChild;S.firstChild;var C=S.nextSibling.firstChild,w=C.firstChild;l.addEventListener(`mouseleave`,t=>{let n=c();if(n){s.start({x:t.clientX,y:t.clientY},n,()=>e.onDropdownHover?.(!1));return}e.onDropdownHover?.(!1)}),l.addEventListener(`mouseenter`,()=>{s.stop(),e.onDropdownHover?.(!0)}),V(l,`contextmenu`,$,!0),V(l,`click`,$,!0),V(l,`mousedown`,$,!0),V(l,`pointerdown`,$,!0);var T=t;return typeof T==`function`?M(T,l):t=l,N(l,`z-index`,`${n}`),U(S,y(A,{get when(){return e.items.length>0},get children(){var t=On(),n=t.firstChild,r=n.firstChild,i=n.nextSibling,a=i.firstChild;return r.addEventListener(`mouseleave`,()=>p(null)),r.addEventListener(`mouseenter`,()=>p(`clear`)),r.$$click=t=>{t.stopPropagation(),p(null),e.onClearAll?.()},U(r,y(En,{size:11})),U(n,y(Bt,{get visible(){return f()===`clear`},position:`top`,children:`Clear all`}),null),a.addEventListener(`mouseleave`,()=>{p(null),e.onCopyAllHover?.(!1)}),a.addEventListener(`mouseenter`,()=>{p(`copy`),m()||e.onCopyAllHover?.(!0)}),a.$$click=t=>{t.stopPropagation(),p(null),e.onCopyAll?.(),h(!0),clearTimeout(g),g=setTimeout(()=>{h(!1)},u)},U(a,y(A,{get when(){return m()},get fallback(){return An()},get children(){return y(rt,{size:11,class:`text-black`})}})),U(i,y(Bt,{get visible(){return f()===`copy`},position:`top`,children:`Copy all`}),null),t}}),null),M(r,C),M(i,w),U(C,y(_e,{get each(){return e.items},children:t=>(()=>{var n=Mn(),r=n.firstChild,i=r.firstChild,s=r.nextSibling;return V(n,`blur`,o),n.addEventListener(`focus`,e=>a(e.currentTarget)),n.addEventListener(`mouseleave`,()=>{e.onItemHover?.(null),o()}),n.addEventListener(`mouseenter`,n=>{e.disconnectedItemIds?.has(t.id)||e.onItemHover?.(t.id),a(n.currentTarget)}),n.$$keydown=n=>{n.code===`Space`&&n.currentTarget===n.target&&(n.preventDefault(),n.stopPropagation(),e.onSelectItem?.(t))},n.$$click=n=>{n.stopPropagation(),e.onSelectItem?.(t)},n.$$pointerdown=e=>e.stopPropagation(),U(i,()=>Nn(t)),U(r,y(A,{get when(){return t.commentText},get children(){var e=jn();return U(e,()=>t.commentText),e}}),null),U(s,()=>Dn(t.timestamp)),I(r=>z(n,{"opacity-40 hover:opacity-100":!!e.disconnectedItemIds?.has(t.id)},r)),n})()}),null),I(e=>{var t=`${d.displayPosition().top}px`,n=`${d.displayPosition().left}px`,r=d.isAnimatedIn()?`auto`:`none`,i=he[d.lastAnchorEdge()],a=d.isAnimatedIn()?`1`:`0`,o=d.isAnimatedIn()?`scale(1)`:`scale(0.95)`,s=q(`contain-layout flex flex-col rounded-[10px] antialiased w-fit h-fit overflow-hidden [font-synthesis:none] [corner-shape:superellipse(1.25)]`,`bg-white`),c=`${b()}px`,u=`${_()}px`,f=`${v()}px`;return t!==e.e&&N(l,`top`,e.e=t),n!==e.t&&N(l,`left`,e.t=n),r!==e.a&&N(l,`pointer-events`,e.a=r),i!==e.o&&N(l,`transform-origin`,e.o=i),a!==e.i&&N(l,`opacity`,e.i=a),o!==e.n&&N(l,`transform`,e.n=o),s!==e.s&&L(x,e.s=s),c!==e.h&&N(x,`min-width`,e.h=c),u!==e.r&&N(x,`max-width`,e.r=u),f!==e.d&&N(x,`max-height`,e.d=f),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),l}})};B([`pointerdown`,`mousedown`,`click`,`contextmenu`,`keydown`]);var Fn=F(`<div data-react-grab-ignore-events data-react-grab-clear-comments-prompt class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"><div>`),In=e=>{let t,r=bn(()=>t,()=>e.position);return oe(()=>{r.measure();let t=fn({isOpen:()=>!!e.position,onDismiss:e.onCancel,onConfirm:e.onConfirm,shouldIgnoreInputEvents:!0});P(()=>{r.clearAnimationHandles(),t()})}),y(A,{get when(){return r.shouldMount()},get children(){var i=Fn(),a=i.firstChild;V(i,`contextmenu`,$,!0),V(i,`click`,$,!0),V(i,`mousedown`,$,!0),V(i,`pointerdown`,$,!0);var o=t;return typeof o==`function`?M(o,i):t=i,N(i,`z-index`,`${n}`),U(a,y(Ye,{label:`Clear comments?`,cancelOnEscape:!0,get onConfirm(){return e.onConfirm},get onCancel(){return e.onCancel}})),I(e=>{var t=`${r.displayPosition().top}px`,n=`${r.displayPosition().left}px`,o=r.isAnimatedIn()?`auto`:`none`,s=he[r.lastAnchorEdge()],c=r.isAnimatedIn()?`1`:`0`,l=r.isAnimatedIn()?`scale(1)`:`scale(0.95)`,u=q(`contain-layout flex flex-col rounded-[10px] antialiased w-fit h-fit [font-synthesis:none] [corner-shape:superellipse(1.25)]`,`bg-white`);return t!==e.e&&N(i,`top`,e.e=t),n!==e.t&&N(i,`left`,e.t=n),o!==e.a&&N(i,`pointer-events`,e.a=o),s!==e.o&&N(i,`transform-origin`,e.o=s),c!==e.i&&N(i,`opacity`,e.i=c),l!==e.n&&N(i,`transform`,e.n=l),u!==e.s&&L(a,e.s=u),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),i}})};B([`pointerdown`,`mousedown`,`click`,`contextmenu`]);var Ln=F(`<div style=position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;will-change:opacity;contain:strict;transform:translateZ(0)>`),Rn=e=>[y(Te,{get selectionVisible(){return e.selectionVisible},get selectionBounds(){return e.selectionBounds},get selectionBoundsMultiple(){return e.selectionBoundsMultiple},get selectionShouldSnap(){return e.selectionShouldSnap},get selectionIsFading(){return e.selectionLabelStatus===`fading`},get inspectVisible(){return e.inspectVisible},get inspectBounds(){return e.inspectBounds},get dragVisible(){return e.dragVisible},get dragBounds(){return e.dragBounds},get grabbedBoxes(){return e.grabbedBoxes},get labelInstances(){return e.labelInstances}}),(()=>{var t=Ln();return N(t,`z-index`,ne),N(t,`transition`,`opacity 100ms ease-out`),N(t,`box-shadow`,`inset 0 0 50px ${se}`),I(n=>N(t,`opacity`,+!!e.isFrozen)),t})(),y(A,{get when(){return W(()=>!!e.selectionLabelVisible)()&&e.selectionBounds},get children(){return y(Tt,{get tagName(){return e.selectionTagName},get componentName(){return e.selectionComponentName},get elementsCount(){return e.selectionElementsCount},get selectionBounds(){return e.selectionBounds},get mouseX(){return e.mouseX},get visible(){return e.selectionLabelVisible},get isPromptMode(){return e.isPromptMode},get inputValue(){return e.inputValue},get status(){return e.selectionLabelStatus},get actionCycleState(){return e.selectionActionCycleState},get arrowNavigationState(){return e.selectionArrowNavigationState},get onArrowNavigationSelect(){return e.onArrowNavigationSelect},get inspectNavigationState(){return e.inspectNavigationState},get onInspectSelect(){return e.onInspectSelect},get filePath(){return e.selectionFilePath},get onInputChange(){return e.onInputChange},get onSubmit(){return e.onInputSubmit},get onToggleExpand(){return e.onToggleExpand},get isPendingDismiss(){return e.isPendingDismiss},get selectionLabelShakeCount(){return e.selectionLabelShakeCount},get onConfirmDismiss(){return e.onConfirmDismiss},get onCancelDismiss(){return e.onCancelDismiss},onOpen:()=>{e.selectionFilePath&&fe(e.selectionFilePath,e.selectionLineNumber)},get isContextMenuOpen(){return e.contextMenuPosition!==null}})}}),y(h,{get each(){return e.labelInstances??[]},children:t=>y(Tt,{get tagName(){return t().tagName},get componentName(){return t().componentName},get elementsCount(){return t().elementsCount},get selectionBounds(){return t().bounds},get mouseX(){return t().mouseX},visible:!0,get status(){return t().status},get statusText(){return t().statusText},get isPromptMode(){return t().isPromptMode},get inputValue(){return t().inputValue},get error(){return t().errorMessage},get hideArrow(){return t().hideArrow},get onShowContextMenu(){let n=t();if(!(!(n.status===`copied`||n.status===`fading`)||!le(n.element)))return()=>e.onShowContextMenuInstance?.(n.id)},onHoverChange:n=>e.onLabelInstanceHoverChange?.(t().id,n)})}),y(A,{get when(){return e.toolbarVisible!==!1},get children(){return y(dn,{get isActive(){return e.isActive},get isContextMenuOpen(){return e.contextMenuPosition!==null},get onToggle(){return e.onToggleActive},get enabled(){return e.enabled},get onToggleEnabled(){return e.onToggleEnabled},get shakeCount(){return e.shakeCount},get onStateChange(){return e.onToolbarStateChange},get onSubscribeToStateChanges(){return e.onSubscribeToToolbarStateChanges},get onSelectHoverChange(){return e.onToolbarSelectHoverChange},get onContainerRef(){return e.onToolbarRef},get commentItemCount(){return e.commentItemCount},get clockFlashTrigger(){return e.clockFlashTrigger},get onToggleComments(){return e.onToggleComments},get onCopyAll(){return e.onCopyAll},get onCopyAllHover(){return e.onCopyAllHover},get onCommentsButtonHover(){return e.onCommentsButtonHover},get isCommentsDropdownOpen(){return!!e.commentsDropdownPosition},get isCommentsPinned(){return e.isCommentsPinned},get onToggleToolbarMenu(){return e.onToggleToolbarMenu},get isToolbarMenuOpen(){return!!e.toolbarMenuPosition},get isClearPromptOpen(){return!!e.clearPromptPosition}})}}),y(_n,{get position(){return e.contextMenuPosition??null},get selectionBounds(){return e.contextMenuBounds??null},get tagName(){return e.contextMenuTagName},get componentName(){return e.contextMenuComponentName},get hasFilePath(){return e.contextMenuHasFilePath??!1},get actions(){return e.actions},get actionContext(){return e.actionContext},get onDismiss(){return e.onContextMenuDismiss??(()=>{})},get onHide(){return e.onContextMenuHide??(()=>{})}}),y(wn,{get position(){return e.toolbarMenuPosition??null},get actions(){return e.toolbarMenuActions??[]},get defaultActionId(){return e.defaultActionId??`comment`},get onSetDefaultAction(){return e.onSetDefaultAction??(()=>{})},get onDismiss(){return e.onToolbarMenuDismiss??(()=>{})}}),y(In,{get position(){return e.clearPromptPosition??null},get onConfirm(){return e.onClearCommentsConfirm??(()=>{})},get onCancel(){return e.onClearCommentsCancel??(()=>{})}}),y(Pn,{get position(){return e.commentsDropdownPosition??null},get items(){return e.commentItems??[]},get disconnectedItemIds(){return e.commentsDisconnectedItemIds},get onSelectItem(){return e.onCommentItemSelect},get onItemHover(){return e.onCommentItemHover},get onCopyAll(){return e.onCommentsCopyAll},get onCopyAllHover(){return e.onCommentsCopyAllHover},get onClearAll(){return e.onCommentsClear},get onDismiss(){return e.onCommentsDismiss},get onDropdownHover(){return e.onCommentsDropdownHover}})];export{Rn as ReactGrabRenderer};
|