@statechange/council 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/infographic.js +2 -2
- package/dist/core/infographic.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist-electron/main.js +2 -2
- package/dist-renderer/assets/{ar-SA-G6X2FPQ2-BgPx2ItE.js → ar-SA-G6X2FPQ2-DJTj94ZY.js} +1 -1
- package/dist-renderer/assets/{arc-uuSymAy6.js → arc-3qXpUeCd.js} +1 -1
- package/dist-renderer/assets/{az-AZ-76LH7QW2-CXxeQJ5N.js → az-AZ-76LH7QW2-1qnzBARG.js} +1 -1
- package/dist-renderer/assets/{bg-BG-XCXSNQG7-B-v6aJJk.js → bg-BG-XCXSNQG7-BIZ5IFAv.js} +1 -1
- package/dist-renderer/assets/{blockDiagram-38ab4fdb-B2x5B_qZ.js → blockDiagram-38ab4fdb-JwSYiuLB.js} +1 -1
- package/dist-renderer/assets/{bn-BD-2XOGV67Q-CmhmKt_C.js → bn-BD-2XOGV67Q-DiYpgYAg.js} +1 -1
- package/dist-renderer/assets/{c4Diagram-3d4e48cf-qv_cNClp.js → c4Diagram-3d4e48cf-DUCtOTzV.js} +1 -1
- package/dist-renderer/assets/{ca-ES-6MX7JW3Y-Cnypgm9v.js → ca-ES-6MX7JW3Y-CV2JFVcm.js} +1 -1
- package/dist-renderer/assets/channel-BFQOS5-A.js +1 -0
- package/dist-renderer/assets/{classDiagram-70f12bd4-DdjxeBAm.js → classDiagram-70f12bd4-DY_je9I9.js} +1 -1
- package/dist-renderer/assets/{classDiagram-v2-f2320105-DjGhSmzz.js → classDiagram-v2-f2320105-Dm2xf0kS.js} +1 -1
- package/dist-renderer/assets/clone-BdgQjyvt.js +1 -0
- package/dist-renderer/assets/{createText-2e5e7dd3-DPeQ2O5Z.js → createText-2e5e7dd3-BU4YlynJ.js} +1 -1
- package/dist-renderer/assets/{cs-CZ-2BRQDIVT-CLjGATXX.js → cs-CZ-2BRQDIVT-DgefxJv2.js} +1 -1
- package/dist-renderer/assets/{da-DK-5WZEPLOC-D5L0qoxT.js → da-DK-5WZEPLOC-CQeMoU_Y.js} +1 -1
- package/dist-renderer/assets/{de-DE-XR44H4JA-C32FRrv8.js → de-DE-XR44H4JA-Cm7XiExL.js} +1 -1
- package/dist-renderer/assets/{edges-e0da2a9e-C9UtuZtL.js → edges-e0da2a9e-DU4SF3SK.js} +1 -1
- package/dist-renderer/assets/{el-GR-BZB4AONW-DbhHCmA8.js → el-GR-BZB4AONW-BKDtOlnf.js} +1 -1
- package/dist-renderer/assets/{erDiagram-9861fffd-BkLC6VUM.js → erDiagram-9861fffd-D_cCijmv.js} +1 -1
- package/dist-renderer/assets/{es-ES-U4NZUMDT-DXQY7ys3.js → es-ES-U4NZUMDT-Blb_L7K-.js} +1 -1
- package/dist-renderer/assets/{eu-ES-A7QVB2H4-B4VgVqIF.js → eu-ES-A7QVB2H4-BZJBLMeO.js} +1 -1
- package/dist-renderer/assets/{fa-IR-HGAKTJCU-elHgBamS.js → fa-IR-HGAKTJCU-C8gu07sI.js} +1 -1
- package/dist-renderer/assets/{fi-FI-Z5N7JZ37-BQe_Oc8x.js → fi-FI-Z5N7JZ37-0j8c6s09.js} +1 -1
- package/dist-renderer/assets/{flowDb-956e92f1-DR2fF74n.js → flowDb-956e92f1-BYeD7SW0.js} +1 -1
- package/dist-renderer/assets/{flowDiagram-66a62f08-wDDwHPpp.js → flowDiagram-66a62f08-D_7wXttk.js} +1 -1
- package/dist-renderer/assets/flowDiagram-v2-96b9c2cf-ue4yLZei.js +1 -0
- package/dist-renderer/assets/{flowchart-elk-definition-4a651766-m7cC1ndJ.js → flowchart-elk-definition-4a651766-G1tSg-iY.js} +1 -1
- package/dist-renderer/assets/{fr-FR-RHASNOE6-U8yDW4RB.js → fr-FR-RHASNOE6-_cfaQNNq.js} +1 -1
- package/dist-renderer/assets/{ganttDiagram-c361ad54-SpXIeRET.js → ganttDiagram-c361ad54-Dk5lBh7P.js} +1 -1
- package/dist-renderer/assets/{gitGraphDiagram-72cf32ee-CqmKGlMY.js → gitGraphDiagram-72cf32ee-BzJAQtIC.js} +1 -1
- package/dist-renderer/assets/{gl-ES-HMX3MZ6V-ti0GznU7.js → gl-ES-HMX3MZ6V-GM5nrSrW.js} +1 -1
- package/dist-renderer/assets/{graph-KjGTQ8qd.js → graph-C_xi4PaI.js} +1 -1
- package/dist-renderer/assets/{he-IL-6SHJWFNN-M5av5hFk.js → he-IL-6SHJWFNN-DvBtF7-G.js} +1 -1
- package/dist-renderer/assets/{hi-IN-IWLTKZ5I-Ci72nkHu.js → hi-IN-IWLTKZ5I-CNEB0-5K.js} +1 -1
- package/dist-renderer/assets/{hu-HU-A5ZG7DT2-CJZteS36.js → hu-HU-A5ZG7DT2-BmzYfJwp.js} +1 -1
- package/dist-renderer/assets/{id-ID-SAP4L64H-DmDvIS5c.js → id-ID-SAP4L64H-CGCjaOLU.js} +1 -1
- package/dist-renderer/assets/{index-3862675e-CCE1hBgs.js → index-3862675e-C8a4355J.js} +1 -1
- package/dist-renderer/assets/index-CYsh274_.css +1 -0
- package/dist-renderer/assets/index-Cc7m7vZn.js +51 -0
- package/dist-renderer/assets/{index-CsJIZuMr.js → index-x_yLI1Xq.js} +4 -4
- package/dist-renderer/assets/{infoDiagram-f8f76790-CcZfsGA-.js → infoDiagram-f8f76790-BsJdteru.js} +1 -1
- package/dist-renderer/assets/{it-IT-JPQ66NNP-Bzpfv7zO.js → it-IT-JPQ66NNP-vK6cBs4I.js} +1 -1
- package/dist-renderer/assets/{ja-JP-DBVTYXUO-Bybhg0KI.js → ja-JP-DBVTYXUO-oUvELdsq.js} +1 -1
- package/dist-renderer/assets/{journeyDiagram-49397b02-D5LB2Wfi.js → journeyDiagram-49397b02-BZcn-joQ.js} +1 -1
- package/dist-renderer/assets/{kaa-6HZHGXH3-n7D3u8lS.js → kaa-6HZHGXH3-39-zh5xR.js} +1 -1
- package/dist-renderer/assets/{kab-KAB-ZGHBKWFO-BsHCeWxt.js → kab-KAB-ZGHBKWFO-DIwwJSlv.js} +1 -1
- package/dist-renderer/assets/{kk-KZ-P5N5QNE5-Dvo1EL3s.js → kk-KZ-P5N5QNE5-jEG0G6v4.js} +1 -1
- package/dist-renderer/assets/{km-KH-HSX4SM5Z-Bo9Koyui.js → km-KH-HSX4SM5Z-f0MtADYu.js} +1 -1
- package/dist-renderer/assets/{ko-KR-MTYHY66A-Dqbq9Ios.js → ko-KR-MTYHY66A-D0sjNbcb.js} +1 -1
- package/dist-renderer/assets/{ku-TR-6OUDTVRD-B_bI20Zq.js → ku-TR-6OUDTVRD-D_uqAOZU.js} +1 -1
- package/dist-renderer/assets/{layout-BMJBnVbc.js → layout-Bho0HnCB.js} +1 -1
- package/dist-renderer/assets/{line-DYvIrKnf.js → line-BvfrpBJA.js} +1 -1
- package/dist-renderer/assets/{linear-CzUW4n8y.js → linear-CzjqC3F_.js} +1 -1
- package/dist-renderer/assets/{lt-LT-XHIRWOB4-DMcSSx20.js → lt-LT-XHIRWOB4-Ct0yC4CT.js} +1 -1
- package/dist-renderer/assets/{lv-LV-5QDEKY6T-WQFa3Exi.js → lv-LV-5QDEKY6T-nkNbPHg0.js} +1 -1
- package/dist-renderer/assets/{mindmap-definition-fc14e90a-CbbLnbfT.js → mindmap-definition-fc14e90a-BHot8rEp.js} +1 -1
- package/dist-renderer/assets/{mr-IN-CRQNXWMA-CeiPk7t6.js → mr-IN-CRQNXWMA-B861rik7.js} +1 -1
- package/dist-renderer/assets/{my-MM-5M5IBNSE-9E7W6sP8.js → my-MM-5M5IBNSE-SOXg7PeE.js} +1 -1
- package/dist-renderer/assets/{nb-NO-T6EIAALU-CmEniZIK.js → nb-NO-T6EIAALU-D22gGzt7.js} +1 -1
- package/dist-renderer/assets/{nl-NL-IS3SIHDZ-zXTYcbKu.js → nl-NL-IS3SIHDZ-CJxOBLb1.js} +1 -1
- package/dist-renderer/assets/{nn-NO-6E72VCQL-h3sqNMWN.js → nn-NO-6E72VCQL-FGcbdlO3.js} +1 -1
- package/dist-renderer/assets/{oc-FR-POXYY2M6-DJ0D2dhd.js → oc-FR-POXYY2M6-s7Swo1Cu.js} +1 -1
- package/dist-renderer/assets/{pa-IN-N4M65BXN-DZ6nLqLL.js → pa-IN-N4M65BXN-DFJMREPh.js} +1 -1
- package/dist-renderer/assets/{percentages-BXMCSKIN-C_WTAk1u.js → percentages-BXMCSKIN-BhceqxTM.js} +7 -7
- package/dist-renderer/assets/{pica-41wOwwIp.js → pica-ej4Z4fjh.js} +1 -1
- package/dist-renderer/assets/{pieDiagram-8a3498a8-DbqgEWOz.js → pieDiagram-8a3498a8-CnDnQfd0.js} +1 -1
- package/dist-renderer/assets/{pl-PL-T2D74RX3-TTq9_VVs.js → pl-PL-T2D74RX3-uXVmB6im.js} +1 -1
- package/dist-renderer/assets/{pt-BR-5N22H2LF-D8eWF-rx.js → pt-BR-5N22H2LF-8kdgECeZ.js} +1 -1
- package/dist-renderer/assets/{pt-PT-UZXXM6DQ-Ck4YSJms.js → pt-PT-UZXXM6DQ-D4vr9vo6.js} +1 -1
- package/dist-renderer/assets/{quadrantDiagram-120e2f19-astysE66.js → quadrantDiagram-120e2f19-DlUESmO2.js} +1 -1
- package/dist-renderer/assets/{requirementDiagram-deff3bca-BczvOV-q.js → requirementDiagram-deff3bca-CfOs9jR8.js} +1 -1
- package/dist-renderer/assets/{ro-RO-JPDTUUEW-Cix9Zgf2.js → ro-RO-JPDTUUEW-CztO0tWv.js} +1 -1
- package/dist-renderer/assets/{ru-RU-B4JR7IUQ-DOEAc_qv.js → ru-RU-B4JR7IUQ-aVURliDr.js} +1 -1
- package/dist-renderer/assets/{sankeyDiagram-04a897e0-BdKNjOGj.js → sankeyDiagram-04a897e0-DRRc8FSN.js} +1 -1
- package/dist-renderer/assets/{sequenceDiagram-704730f1-DmhSJhf3.js → sequenceDiagram-704730f1-BaswaqQO.js} +1 -1
- package/dist-renderer/assets/{si-LK-N5RQ5JYF-CdpuKOSp.js → si-LK-N5RQ5JYF-B2KWtx6N.js} +1 -1
- package/dist-renderer/assets/{sk-SK-C5VTKIMK-B_9Y1a-J.js → sk-SK-C5VTKIMK-DlRzLxRJ.js} +1 -1
- package/dist-renderer/assets/{sl-SI-NN7IZMDC-6_HfcMn2.js → sl-SI-NN7IZMDC-Ox8yiRTS.js} +1 -1
- package/dist-renderer/assets/{stateDiagram-587899a1--iD3nJ-S.js → stateDiagram-587899a1-DSEEonbL.js} +1 -1
- package/dist-renderer/assets/{stateDiagram-v2-d93cdb3a-D_ikJOMZ.js → stateDiagram-v2-d93cdb3a-C135NgbB.js} +1 -1
- package/dist-renderer/assets/{styles-6aaf32cf-CmNrPQpM.js → styles-6aaf32cf-X5nh1pD3.js} +1 -1
- package/dist-renderer/assets/{styles-9a916d00-DF6mmpc8.js → styles-9a916d00-BCZu272E.js} +1 -1
- package/dist-renderer/assets/{styles-c10674c1-DrNd7u60.js → styles-c10674c1-C5JGHSaS.js} +1 -1
- package/dist-renderer/assets/{subset-shared.chunk-DESKTf4i.js → subset-shared.chunk-CzgdV5hf.js} +1 -1
- package/dist-renderer/assets/{subset-worker.chunk-foHYh0Wd.js → subset-worker.chunk-DfLYxc1O.js} +1 -1
- package/dist-renderer/assets/{sv-SE-XGPEYMSR-CIuCW4P8.js → sv-SE-XGPEYMSR-CizFbLCT.js} +1 -1
- package/dist-renderer/assets/{svgDrawCommon-08f97a94-z7vJpB0X.js → svgDrawCommon-08f97a94-Cv5ZIzzk.js} +1 -1
- package/dist-renderer/assets/{ta-IN-2NMHFXQM-BzAn6f_T.js → ta-IN-2NMHFXQM-B66K2LEN.js} +1 -1
- package/dist-renderer/assets/{th-TH-HPSO5L25-F8UKokOj.js → th-TH-HPSO5L25-DvHt1SBY.js} +1 -1
- package/dist-renderer/assets/{timeline-definition-85554ec2-CqgD9A1Q.js → timeline-definition-85554ec2-C955-u4m.js} +1 -1
- package/dist-renderer/assets/{tr-TR-DEFEU3FU-Blb21beE.js → tr-TR-DEFEU3FU-u0AuqRoD.js} +1 -1
- package/dist-renderer/assets/{uk-UA-QMV73CPH-BNT7k4n6.js → uk-UA-QMV73CPH-IwAiPvJL.js} +1 -1
- package/dist-renderer/assets/{vi-VN-M7AON7JQ-Cfx0gaLT.js → vi-VN-M7AON7JQ-Dh6Aj3f5.js} +1 -1
- package/dist-renderer/assets/{xychartDiagram-e933f94c-FbPSsBHD.js → xychartDiagram-e933f94c-Bst4jMma.js} +1 -1
- package/dist-renderer/assets/{zh-CN-LNUGB5OW-CpiybZS1.js → zh-CN-LNUGB5OW-BVXMa9T3.js} +1 -1
- package/dist-renderer/assets/{zh-HK-E62DVLB3-UIQkTr8J.js → zh-HK-E62DVLB3-DYEIu92z.js} +1 -1
- package/dist-renderer/assets/{zh-TW-RAJ6MFWO-GvyNND72.js → zh-TW-RAJ6MFWO-Dm9oSthu.js} +1 -1
- package/dist-renderer/index.html +2 -2
- package/package.json +1 -1
- package/dist-renderer/assets/channel-CbR4ut5U.js +0 -1
- package/dist-renderer/assets/clone-CdbunAYL.js +0 -1
- package/dist-renderer/assets/flowDiagram-v2-96b9c2cf-DYxWopzM.js +0 -1
- package/dist-renderer/assets/index-BUIE-P96.js +0 -51
- package/dist-renderer/assets/index-HXjW9ZG3.css +0 -1
package/dist-renderer/assets/{percentages-BXMCSKIN-C_WTAk1u.js → percentages-BXMCSKIN-BhceqxTM.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./subset-worker.chunk-
|
|
2
|
-
import{r as My,g as Si,a as S,b as H5,c as Bi,_ as ne,j as f,v as Z,$ as k0}from"./index-BUIE-P96.js";function Pt(){return Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Pt.apply(null,arguments)}var Ft=My();const Iy=Si(Ft);function Su(){return typeof window<"u"}function sl(e){return X5(e)?(e.nodeName||"").toLowerCase():"#document"}function In(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ya(e){var t;return(t=(X5(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function X5(e){return Su()?e instanceof Node||e instanceof In(e).Node:!1}function fa(e){return Su()?e instanceof Element||e instanceof In(e).Element:!1}function $a(e){return Su()?e instanceof HTMLElement||e instanceof In(e).HTMLElement:!1}function zU(e){return!Su()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof In(e).ShadowRoot}const _y=new Set(["inline","contents"]);function Vo(e){const{overflow:t,overflowX:n,overflowY:a,display:i}=ha(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!_y.has(i)}const Ty=new Set(["table","td","th"]);function Ay(e){return Ty.has(sl(e))}const jy=[":popover-open",":modal"];function ku(e){return jy.some(t=>{try{return e.matches(t)}catch{return!1}})}const Ry=["transform","translate","scale","rotate","perspective"],Dy=["transform","translate","scale","rotate","perspective","filter"],Ly=["paint","layout","strict","content"];function C0(e){const t=M0(),n=fa(e)?ha(e):e;return Ry.some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Dy.some(a=>(n.willChange||"").includes(a))||Ly.some(a=>(n.contain||"").includes(a))}function Py(e){let t=er(e);for(;$a(t)&&!Hs(t);){if(C0(t))return t;if(ku(t))return null;t=er(t)}return null}function M0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ny=new Set(["html","body","#document"]);function Hs(e){return Ny.has(sl(e))}function ha(e){return In(e).getComputedStyle(e)}function Cu(e){return fa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function er(e){if(sl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zU(e)&&e.host||Ya(e);return zU(t)?t.host:t}function W5(e){const t=er(e);return Hs(t)?e.ownerDocument?e.ownerDocument.body:e.body:$a(t)&&Vo(t)?t:W5(t)}function mo(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=W5(e),r=i===((a=e.ownerDocument)==null?void 0:a.body),s=In(i);if(r){const l=qh(s);return t.concat(s,s.visualViewport||[],Vo(i)?i:[],l&&n?mo(l):[])}return t.concat(i,mo(i,[],n))}function qh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Oy=["top","right","bottom","left"],tr=Math.min,Cn=Math.max,Md=Math.round,bc=Math.floor,Na=e=>({x:e,y:e}),$y={left:"right",right:"left",bottom:"top",top:"bottom"},Fy={start:"end",end:"start"};function Jh(e,t,n){return Cn(e,tr(t,n))}function fi(e,t){return typeof e=="function"?e(t):e}function hi(e){return e.split("-")[0]}function ll(e){return e.split("-")[1]}function I0(e){return e==="x"?"y":"x"}function _0(e){return e==="y"?"height":"width"}const zy=new Set(["top","bottom"]);function La(e){return zy.has(hi(e))?"y":"x"}function T0(e){return I0(La(e))}function By(e,t,n){n===void 0&&(n=!1);const a=ll(e),i=T0(e),r=_0(i);let s=i==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Id(s)),[s,Id(s)]}function Hy(e){const t=Id(e);return[Qh(e),t,Qh(t)]}function Qh(e){return e.replace(/start|end/g,t=>Fy[t])}const BU=["left","right"],HU=["right","left"],Xy=["top","bottom"],Wy=["bottom","top"];function Vy(e,t,n){switch(e){case"top":case"bottom":return n?t?HU:BU:t?BU:HU;case"left":case"right":return t?Xy:Wy;default:return[]}}function Gy(e,t,n,a){const i=ll(e);let r=Vy(hi(e),n==="start",a);return i&&(r=r.map(s=>s+"-"+i),t&&(r=r.concat(r.map(Qh)))),r}function Id(e){return e.replace(/left|right|bottom|top/g,t=>$y[t])}function Yy(e){return{top:0,right:0,bottom:0,left:0,...e}}function V5(e){return typeof e!="number"?Yy(e):{top:e,right:e,bottom:e,left:e}}function _d(e){const{x:t,y:n,width:a,height:i}=e;return{width:a,height:i,top:n,left:t,right:t+a,bottom:n+i,x:t,y:n}}function XU(e,t,n){let{reference:a,floating:i}=e;const r=La(t),s=T0(t),l=_0(s),c=hi(t),d=r==="y",o=a.x+a.width/2-i.width/2,u=a.y+a.height/2-i.height/2,h=a[l]/2-i[l]/2;let p;switch(c){case"top":p={x:o,y:a.y-i.height};break;case"bottom":p={x:o,y:a.y+a.height};break;case"right":p={x:a.x+a.width,y:u};break;case"left":p={x:a.x-i.width,y:u};break;default:p={x:a.x,y:a.y}}switch(ll(t)){case"start":p[s]-=h*(n&&d?-1:1);break;case"end":p[s]+=h*(n&&d?-1:1);break}return p}async function Zy(e,t){var n;t===void 0&&(t={});const{x:a,y:i,platform:r,rects:s,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:o="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=fi(t,e),U=V5(p),g=l[h?u==="floating"?"reference":"floating":u],b=_d(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:d,rootBoundary:o,strategy:c})),x=u==="floating"?{x:a,y:i,width:s.floating.width,height:s.floating.height}:s.reference,v=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),y=await(r.isElement==null?void 0:r.isElement(v))?await(r.getScale==null?void 0:r.getScale(v))||{x:1,y:1}:{x:1,y:1},w=_d(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:v,strategy:c}):x);return{top:(b.top-w.top+U.top)/y.y,bottom:(w.bottom-b.bottom+U.bottom)/y.y,left:(b.left-w.left+U.left)/y.x,right:(w.right-b.right+U.right)/y.x}}const Ky=async(e,t,n)=>{const{placement:a="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:o,y:u}=XU(d,a,c),h=a,p={},U=0;for(let g=0;g<l.length;g++){var m;const{name:b,fn:x}=l[g],{x:v,y,data:w,reset:k}=await x({x:o,y:u,initialPlacement:a,placement:h,strategy:i,middlewareData:p,rects:d,platform:{...s,detectOverflow:(m=s.detectOverflow)!=null?m:Zy},elements:{reference:e,floating:t}});o=v??o,u=y??u,p={...p,[b]:{...p[b],...w}},k&&U<=50&&(U++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(d=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:o,y:u}=XU(d,h,c)),g=-1)}return{x:o,y:u,placement:h,strategy:i,middlewareData:p}},qy=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:i,rects:r,platform:s,elements:l,middlewareData:c}=t,{element:d,padding:o=0}=fi(e,t)||{};if(d==null)return{};const u=V5(o),h={x:n,y:a},p=T0(i),U=_0(p),m=await s.getDimensions(d),g=p==="y",b=g?"top":"left",x=g?"bottom":"right",v=g?"clientHeight":"clientWidth",y=r.reference[U]+r.reference[p]-h[p]-r.floating[U],w=h[p]-r.reference[p],k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let C=k?k[v]:0;(!C||!await(s.isElement==null?void 0:s.isElement(k)))&&(C=l.floating[v]||r.floating[U]);const I=y/2-w/2,A=C/2-m[U]/2-1,_=tr(u[b],A),T=tr(u[x],A),D=_,L=C-m[U]-T,F=C/2-m[U]/2+I,P=Jh(D,F,L),O=!c.arrow&&ll(i)!=null&&F!==P&&r.reference[U]/2-(F<D?_:T)-m[U]/2<0,N=O?F<D?F-D:F-L:0;return{[p]:h[p]+N,data:{[p]:P,centerOffset:F-P-N,...O&&{alignmentOffset:N}},reset:O}}}),Jy=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:o=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:U="none",flipAlignment:m=!0,...g}=fi(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const b=hi(i),x=La(l),v=hi(l)===l,y=await(c.isRTL==null?void 0:c.isRTL(d.floating)),w=h||(v||!m?[Id(l)]:Hy(l)),k=U!=="none";!h&&k&&w.push(...Gy(l,m,U,y));const C=[l,...w],I=await c.detectOverflow(t,g),A=[];let _=((a=r.flip)==null?void 0:a.overflows)||[];if(o&&A.push(I[b]),u){const F=By(i,s,y);A.push(I[F[0]],I[F[1]])}if(_=[..._,{placement:i,overflows:A}],!A.every(F=>F<=0)){var T,D;const F=(((T=r.flip)==null?void 0:T.index)||0)+1,P=C[F];if(P&&(!(u==="alignment"?x!==La(P):!1)||_.every(X=>La(X.placement)===x?X.overflows[0]>0:!0)))return{data:{index:F,overflows:_},reset:{placement:P}};let O=(D=_.filter(N=>N.overflows[0]<=0).sort((N,X)=>N.overflows[1]-X.overflows[1])[0])==null?void 0:D.placement;if(!O)switch(p){case"bestFit":{var L;const N=(L=_.filter(X=>{if(k){const H=La(X.placement);return H===x||H==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(H=>H>0).reduce((H,G)=>H+G,0)]).sort((X,H)=>X[1]-H[1])[0])==null?void 0:L[0];N&&(O=N);break}case"initialPlacement":O=l;break}if(i!==O)return{reset:{placement:O}}}return{}}}};function WU(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function VU(e){return Oy.some(t=>e[t]>=0)}const Qy=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:a}=t,{strategy:i="referenceHidden",...r}=fi(e,t);switch(i){case"referenceHidden":{const s=await a.detectOverflow(t,{...r,elementContext:"reference"}),l=WU(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:VU(l)}}}case"escaped":{const s=await a.detectOverflow(t,{...r,altBoundary:!0}),l=WU(s,n.floating);return{data:{escapedOffsets:l,escaped:VU(l)}}}default:return{}}}}},G5=new Set(["left","top"]);async function ew(e,t){const{placement:n,platform:a,elements:i}=e,r=await(a.isRTL==null?void 0:a.isRTL(i.floating)),s=hi(n),l=ll(n),c=La(n)==="y",d=G5.has(s)?-1:1,o=r&&c?-1:1,u=fi(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:U}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof U=="number"&&(p=l==="end"?U*-1:U),c?{x:p*o,y:h*d}:{x:h*d,y:p*o}}const tw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:i,y:r,placement:s,middlewareData:l}=t,c=await ew(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(a=l.arrow)!=null&&a.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:s}}}}},nw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:i,platform:r}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:b=>{let{x,y:v}=b;return{x,y:v}}},...d}=fi(e,t),o={x:n,y:a},u=await r.detectOverflow(t,d),h=La(hi(i)),p=I0(h);let U=o[p],m=o[h];if(s){const b=p==="y"?"top":"left",x=p==="y"?"bottom":"right",v=U+u[b],y=U-u[x];U=Jh(v,U,y)}if(l){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",v=m+u[b],y=m-u[x];m=Jh(v,m,y)}const g=c.fn({...t,[p]:U,[h]:m});return{...g,data:{x:g.x-n,y:g.y-a,enabled:{[p]:s,[h]:l}}}}}},aw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:i,rects:r,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=fi(e,t),o={x:n,y:a},u=La(i),h=I0(u);let p=o[h],U=o[u];const m=fi(l,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const v=h==="y"?"height":"width",y=r.reference[h]-r.floating[v]+g.mainAxis,w=r.reference[h]+r.reference[v]-g.mainAxis;p<y?p=y:p>w&&(p=w)}if(d){var b,x;const v=h==="y"?"width":"height",y=G5.has(hi(i)),w=r.reference[u]-r.floating[v]+(y&&((b=s.offset)==null?void 0:b[u])||0)+(y?0:g.crossAxis),k=r.reference[u]+r.reference[v]+(y?0:((x=s.offset)==null?void 0:x[u])||0)-(y?g.crossAxis:0);U<w?U=w:U>k&&(U=k)}return{[h]:p,[u]:U}}}},iw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:i,rects:r,platform:s,elements:l}=t,{apply:c=()=>{},...d}=fi(e,t),o=await s.detectOverflow(t,d),u=hi(i),h=ll(i),p=La(i)==="y",{width:U,height:m}=r.floating;let g,b;u==="top"||u==="bottom"?(g=u,b=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(b=u,g=h==="end"?"top":"bottom");const x=m-o.top-o.bottom,v=U-o.left-o.right,y=tr(m-o[g],x),w=tr(U-o[b],v),k=!t.middlewareData.shift;let C=y,I=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(I=v),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(C=x),k&&!h){const _=Cn(o.left,0),T=Cn(o.right,0),D=Cn(o.top,0),L=Cn(o.bottom,0);p?I=U-2*(_!==0||T!==0?_+T:Cn(o.left,o.right)):C=m-2*(D!==0||L!==0?D+L:Cn(o.top,o.bottom))}await c({...t,availableWidth:I,availableHeight:C});const A=await s.getDimensions(l.floating);return U!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function Y5(e){const t=ha(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const i=$a(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:a,l=Md(n)!==r||Md(a)!==s;return l&&(n=r,a=s),{width:n,height:a,$:l}}function A0(e){return fa(e)?e:e.contextElement}function Ds(e){const t=A0(e);if(!$a(t))return Na(1);const n=t.getBoundingClientRect(),{width:a,height:i,$:r}=Y5(t);let s=(r?Md(n.width):n.width)/a,l=(r?Md(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const rw=Na(0);function Z5(e){const t=In(e);return!M0()||!t.visualViewport?rw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==In(e)?!1:t}function Fr(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=A0(e);let s=Na(1);t&&(a?fa(a)&&(s=Ds(a)):s=Ds(e));const l=sw(r,n,a)?Z5(r):Na(0);let c=(i.left+l.x)/s.x,d=(i.top+l.y)/s.y,o=i.width/s.x,u=i.height/s.y;if(r){const h=In(r),p=a&&fa(a)?In(a):a;let U=h,m=qh(U);for(;m&&a&&p!==U;){const g=Ds(m),b=m.getBoundingClientRect(),x=ha(m),v=b.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,y=b.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;c*=g.x,d*=g.y,o*=g.x,u*=g.y,c+=v,d+=y,U=In(m),m=qh(U)}}return _d({width:o,height:u,x:c,y:d})}function Mu(e,t){const n=Cu(e).scrollLeft;return t?t.left+n:Fr(Ya(e)).left+n}function K5(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-Mu(e,n),i=n.top+t.scrollTop;return{x:a,y:i}}function lw(e){let{elements:t,rect:n,offsetParent:a,strategy:i}=e;const r=i==="fixed",s=Ya(a),l=t?ku(t.floating):!1;if(a===s||l&&r)return n;let c={scrollLeft:0,scrollTop:0},d=Na(1);const o=Na(0),u=$a(a);if((u||!u&&!r)&&((sl(a)!=="body"||Vo(s))&&(c=Cu(a)),$a(a))){const p=Fr(a);d=Ds(a),o.x=p.x+a.clientLeft,o.y=p.y+a.clientTop}const h=s&&!u&&!r?K5(s,c):Na(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+o.x+h.x,y:n.y*d.y-c.scrollTop*d.y+o.y+h.y}}function ow(e){return Array.from(e.getClientRects())}function cw(e){const t=Ya(e),n=Cu(e),a=e.ownerDocument.body,i=Cn(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),r=Cn(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let s=-n.scrollLeft+Mu(e);const l=-n.scrollTop;return ha(a).direction==="rtl"&&(s+=Cn(t.clientWidth,a.clientWidth)-i),{width:i,height:r,x:s,y:l}}const GU=25;function dw(e,t){const n=In(e),a=Ya(e),i=n.visualViewport;let r=a.clientWidth,s=a.clientHeight,l=0,c=0;if(i){r=i.width,s=i.height;const o=M0();(!o||o&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const d=Mu(a);if(d<=0){const o=a.ownerDocument,u=o.body,h=getComputedStyle(u),p=o.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,U=Math.abs(a.clientWidth-u.clientWidth-p);U<=GU&&(r-=U)}else d<=GU&&(r+=d);return{width:r,height:s,x:l,y:c}}const uw=new Set(["absolute","fixed"]);function fw(e,t){const n=Fr(e,!0,t==="fixed"),a=n.top+e.clientTop,i=n.left+e.clientLeft,r=$a(e)?Ds(e):Na(1),s=e.clientWidth*r.x,l=e.clientHeight*r.y,c=i*r.x,d=a*r.y;return{width:s,height:l,x:c,y:d}}function YU(e,t,n){let a;if(t==="viewport")a=dw(e,n);else if(t==="document")a=cw(Ya(e));else if(fa(t))a=fw(t,n);else{const i=Z5(e);a={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return _d(a)}function q5(e,t){const n=er(e);return n===t||!fa(n)||Hs(n)?!1:ha(n).position==="fixed"||q5(n,t)}function hw(e,t){const n=t.get(e);if(n)return n;let a=mo(e,[],!1).filter(l=>fa(l)&&sl(l)!=="body"),i=null;const r=ha(e).position==="fixed";let s=r?er(e):e;for(;fa(s)&&!Hs(s);){const l=ha(s),c=C0(s);!c&&l.position==="fixed"&&(i=null),(r?!c&&!i:!c&&l.position==="static"&&!!i&&uw.has(i.position)||Vo(s)&&!c&&q5(e,s))?a=a.filter(o=>o!==s):i=l,s=er(s)}return t.set(e,a),a}function pw(e){let{element:t,boundary:n,rootBoundary:a,strategy:i}=e;const s=[...n==="clippingAncestors"?ku(t)?[]:hw(t,this._c):[].concat(n),a],l=s[0],c=s.reduce((d,o)=>{const u=YU(t,o,i);return d.top=Cn(u.top,d.top),d.right=tr(u.right,d.right),d.bottom=tr(u.bottom,d.bottom),d.left=Cn(u.left,d.left),d},YU(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Uw(e){const{width:t,height:n}=Y5(e);return{width:t,height:n}}function mw(e,t,n){const a=$a(t),i=Ya(t),r=n==="fixed",s=Fr(e,!0,r,t);let l={scrollLeft:0,scrollTop:0};const c=Na(0);function d(){c.x=Mu(i)}if(a||!a&&!r)if((sl(t)!=="body"||Vo(i))&&(l=Cu(t)),a){const p=Fr(t,!0,r,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else i&&d();r&&!a&&i&&d();const o=i&&!a&&!r?K5(i,l):Na(0),u=s.left+l.scrollLeft-c.x-o.x,h=s.top+l.scrollTop-c.y-o.y;return{x:u,y:h,width:s.width,height:s.height}}function Cf(e){return ha(e).position==="static"}function ZU(e,t){if(!$a(e)||ha(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ya(e)===n&&(n=n.ownerDocument.body),n}function J5(e,t){const n=In(e);if(ku(e))return n;if(!$a(e)){let i=er(e);for(;i&&!Hs(i);){if(fa(i)&&!Cf(i))return i;i=er(i)}return n}let a=ZU(e,t);for(;a&&Ay(a)&&Cf(a);)a=ZU(a,t);return a&&Hs(a)&&Cf(a)&&!C0(a)?n:a||Py(e)||n}const gw=async function(e){const t=this.getOffsetParent||J5,n=this.getDimensions,a=await n(e.floating);return{reference:mw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function bw(e){return ha(e).direction==="rtl"}const vw={convertOffsetParentRelativeRectToViewportRelativeRect:lw,getDocumentElement:Ya,getClippingRect:pw,getOffsetParent:J5,getElementRects:gw,getClientRects:ow,getDimensions:Uw,getScale:Ds,isElement:fa,isRTL:bw};function Q5(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xw(e,t){let n=null,a;const i=Ya(e);function r(){var l;clearTimeout(a),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),r();const d=e.getBoundingClientRect(),{left:o,top:u,width:h,height:p}=d;if(l||t(),!h||!p)return;const U=bc(u),m=bc(i.clientWidth-(o+h)),g=bc(i.clientHeight-(u+p)),b=bc(o),v={rootMargin:-U+"px "+-m+"px "+-g+"px "+-b+"px",threshold:Cn(0,tr(1,c))||1};let y=!0;function w(k){const C=k[0].intersectionRatio;if(C!==c){if(!y)return s();C?s(!1,C):a=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!Q5(d,e.getBoundingClientRect())&&s(),y=!1}try{n=new IntersectionObserver(w,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,v)}n.observe(e)}return s(!0),r}function yw(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=a,d=A0(e),o=i||r?[...d?mo(d):[],...mo(t)]:[];o.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),r&&b.addEventListener("resize",n)});const u=d&&l?xw(d,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(b=>{let[x]=b;x&&x.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=p)==null||v.observe(t)})),n()}),d&&!c&&p.observe(d),p.observe(t));let U,m=c?Fr(e):null;c&&g();function g(){const b=Fr(e);m&&!Q5(m,b)&&n(),m=b,U=requestAnimationFrame(g)}return n(),()=>{var b;o.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(b=p)==null||b.disconnect(),p=null,c&&cancelAnimationFrame(U)}}const ww=tw,Ew=nw,Sw=Jy,kw=iw,Cw=Qy,KU=qy,Mw=aw,Iw=(e,t,n)=>{const a=new Map,i={platform:vw,...n},r={...i.platform,_c:a};return Ky(e,t,{...i,platform:r})};var _w=typeof document<"u",Tw=function(){},Gc=_w?S.useLayoutEffect:Tw;function Td(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,a,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!Td(e[a],t[a]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,i[a]))return!1;for(a=n;a--!==0;){const r=i[a];if(!(r==="_owner"&&e.$$typeof)&&!Td(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function eb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qU(e,t){const n=eb(e);return Math.round(t*n)/n}function Mf(e){const t=S.useRef(e);return Gc(()=>{t.current=e}),t}function Aw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:i,elements:{reference:r,floating:s}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[o,u]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=S.useState(a);Td(h,a)||p(a);const[U,m]=S.useState(null),[g,b]=S.useState(null),x=S.useCallback(X=>{X!==k.current&&(k.current=X,m(X))},[]),v=S.useCallback(X=>{X!==C.current&&(C.current=X,b(X))},[]),y=r||U,w=s||g,k=S.useRef(null),C=S.useRef(null),I=S.useRef(o),A=c!=null,_=Mf(c),T=Mf(i),D=Mf(d),L=S.useCallback(()=>{if(!k.current||!C.current)return;const X={placement:t,strategy:n,middleware:h};T.current&&(X.platform=T.current),Iw(k.current,C.current,X).then(H=>{const G={...H,isPositioned:D.current!==!1};F.current&&!Td(I.current,G)&&(I.current=G,Ft.flushSync(()=>{u(G)}))})},[h,t,n,T,D]);Gc(()=>{d===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,u(X=>({...X,isPositioned:!1})))},[d]);const F=S.useRef(!1);Gc(()=>(F.current=!0,()=>{F.current=!1}),[]),Gc(()=>{if(y&&(k.current=y),w&&(C.current=w),y&&w){if(_.current)return _.current(y,w,L);L()}},[y,w,L,_,A]);const P=S.useMemo(()=>({reference:k,floating:C,setReference:x,setFloating:v}),[x,v]),O=S.useMemo(()=>({reference:y,floating:w}),[y,w]),N=S.useMemo(()=>{const X={position:n,left:0,top:0};if(!O.floating)return X;const H=qU(O.floating,o.x),G=qU(O.floating,o.y);return l?{...X,transform:"translate("+H+"px, "+G+"px)",...eb(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:G}},[n,l,O.floating,o.x,o.y]);return S.useMemo(()=>({...o,update:L,refs:P,elements:O,floatingStyles:N}),[o,L,P,O,N])}const jw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:i}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?KU({element:a.current,padding:i}).fn(n):{}:a?KU({element:a,padding:i}).fn(n):{}}}},Rw=(e,t)=>({...ww(e),options:[e,t]}),Dw=(e,t)=>({...Ew(e),options:[e,t]}),Lw=(e,t)=>({...Mw(e),options:[e,t]}),Pw=(e,t)=>({...Sw(e),options:[e,t]}),Nw=(e,t)=>({...kw(e),options:[e,t]}),Ow=(e,t)=>({...Cw(e),options:[e,t]}),$w=(e,t)=>({...jw(e),options:[e,t]});var If={exports:{}},_f={};var JU;function Fw(){if(JU)return _f;JU=1;var e=H5();function t(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,i=e.useEffect,r=e.useLayoutEffect,s=e.useDebugValue;function l(u,h){var p=h(),U=a({inst:{value:p,getSnapshot:h}}),m=U[0].inst,g=U[1];return r(function(){m.value=p,m.getSnapshot=h,c(m)&&g({inst:m})},[u,p,h]),i(function(){return c(m)&&g({inst:m}),u(function(){c(m)&&g({inst:m})})},[u]),s(p),p}function c(u){var h=u.getSnapshot;u=u.value;try{var p=h();return!n(u,p)}catch{return!0}}function d(u,h){return h()}var o=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return _f.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:o,_f}var QU;function zw(){return QU||(QU=1,If.exports=Fw()),If.exports}var Tf={exports:{}},Af={};var em;function Bw(){if(em)return Af;em=1;var e=H5(),t=zw();function n(d,o){return d===o&&(d!==0||1/d===1/o)||d!==d&&o!==o}var a=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,r=e.useRef,s=e.useEffect,l=e.useMemo,c=e.useDebugValue;return Af.useSyncExternalStoreWithSelector=function(d,o,u,h,p){var U=r(null);if(U.current===null){var m={hasValue:!1,value:null};U.current=m}else m=U.current;U=l(function(){function b(k){if(!x){if(x=!0,v=k,k=h(k),p!==void 0&&m.hasValue){var C=m.value;if(p(C,k))return y=C}return y=k}if(C=y,a(v,k))return C;var I=h(k);return p!==void 0&&p(C,I)?(v=k,C):(v=k,y=I)}var x=!1,v,y,w=u===void 0?null:u;return[function(){return b(o())},w===null?void 0:function(){return b(w())}]},[o,u,h,p]);var g=i(d,U[0],U[1]);return s(function(){m.hasValue=!0,m.value=g},[g]),c(g),g},Af}var tm;function Hw(){return tm||(tm=1,Tf.exports=Bw()),Tf.exports}var Xw=Hw();const Ww=Si(Xw);var Aa=function(){return Aa=Object.assign||function(t){for(var n,a=1,i=arguments.length;a<i;a++){n=arguments[a];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Aa.apply(this,arguments)};function tb(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]]);return n}function Vw(e,t,n){if(n||arguments.length===2)for(var a=0,i=t.length,r;a<i;a++)(r||!(a in t))&&(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}var be={VITE_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",VITE_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",VITE_APP_LIBRARY_URL:"https://libraries.excalidraw.com",VITE_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",VITE_APP_PLUS_LP:"https://plus.excalidraw.com",VITE_APP_PLUS_APP:"https://app.excalidraw.com",VITE_APP_AI_BACKEND:"https://oss-ai.excalidraw.com",VITE_APP_WS_SERVER_URL:"https://oss-collab.excalidraw.com",VITE_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',VITE_APP_ENABLE_TRACKING:"false",VITE_APP_PLUS_EXPORT_PUBLIC_KEY:`MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApQ0jM9Qz8TdFLzcuAZZX
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./subset-worker.chunk-DfLYxc1O.js","./subset-shared.chunk-CzgdV5hf.js","./index-Cc7m7vZn.js","./index-CYsh274_.css","./pica-ej4Z4fjh.js","./_commonjs-dynamic-modules-TDtrdbi3.js","./ar-SA-G6X2FPQ2-DJTj94ZY.js","./az-AZ-76LH7QW2-1qnzBARG.js","./bg-BG-XCXSNQG7-BIZ5IFAv.js","./bn-BD-2XOGV67Q-DiYpgYAg.js","./ca-ES-6MX7JW3Y-CV2JFVcm.js","./cs-CZ-2BRQDIVT-DgefxJv2.js","./da-DK-5WZEPLOC-CQeMoU_Y.js","./de-DE-XR44H4JA-Cm7XiExL.js","./el-GR-BZB4AONW-BKDtOlnf.js","./es-ES-U4NZUMDT-Blb_L7K-.js","./eu-ES-A7QVB2H4-BZJBLMeO.js","./fa-IR-HGAKTJCU-C8gu07sI.js","./fi-FI-Z5N7JZ37-0j8c6s09.js","./fr-FR-RHASNOE6-_cfaQNNq.js","./gl-ES-HMX3MZ6V-GM5nrSrW.js","./he-IL-6SHJWFNN-DvBtF7-G.js","./hi-IN-IWLTKZ5I-CNEB0-5K.js","./hu-HU-A5ZG7DT2-BmzYfJwp.js","./id-ID-SAP4L64H-CGCjaOLU.js","./it-IT-JPQ66NNP-vK6cBs4I.js","./ja-JP-DBVTYXUO-oUvELdsq.js","./kaa-6HZHGXH3-39-zh5xR.js","./kab-KAB-ZGHBKWFO-DIwwJSlv.js","./kk-KZ-P5N5QNE5-jEG0G6v4.js","./km-KH-HSX4SM5Z-f0MtADYu.js","./ko-KR-MTYHY66A-D0sjNbcb.js","./ku-TR-6OUDTVRD-D_uqAOZU.js","./lt-LT-XHIRWOB4-Ct0yC4CT.js","./lv-LV-5QDEKY6T-nkNbPHg0.js","./mr-IN-CRQNXWMA-B861rik7.js","./my-MM-5M5IBNSE-SOXg7PeE.js","./nb-NO-T6EIAALU-D22gGzt7.js","./nl-NL-IS3SIHDZ-CJxOBLb1.js","./nn-NO-6E72VCQL-FGcbdlO3.js","./oc-FR-POXYY2M6-s7Swo1Cu.js","./pa-IN-N4M65BXN-DFJMREPh.js","./pl-PL-T2D74RX3-uXVmB6im.js","./pt-BR-5N22H2LF-8kdgECeZ.js","./pt-PT-UZXXM6DQ-D4vr9vo6.js","./ro-RO-JPDTUUEW-CztO0tWv.js","./ru-RU-B4JR7IUQ-aVURliDr.js","./si-LK-N5RQ5JYF-B2KWtx6N.js","./sk-SK-C5VTKIMK-DlRzLxRJ.js","./sl-SI-NN7IZMDC-Ox8yiRTS.js","./sv-SE-XGPEYMSR-CizFbLCT.js","./ta-IN-2NMHFXQM-B66K2LEN.js","./th-TH-HPSO5L25-DvHt1SBY.js","./tr-TR-DEFEU3FU-u0AuqRoD.js","./uk-UA-QMV73CPH-IwAiPvJL.js","./vi-VN-M7AON7JQ-Dh6Aj3f5.js","./zh-CN-LNUGB5OW-BVXMa9T3.js","./zh-HK-E62DVLB3-DYEIu92z.js","./zh-TW-RAJ6MFWO-Dm9oSthu.js","./index-x_yLI1Xq.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as My,g as Si,a as S,b as H5,c as Bi,_ as ne,j as f,v as Z,$ as k0}from"./index-Cc7m7vZn.js";function Pt(){return Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Pt.apply(null,arguments)}var Ft=My();const Iy=Si(Ft);function Su(){return typeof window<"u"}function sl(e){return X5(e)?(e.nodeName||"").toLowerCase():"#document"}function In(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ya(e){var t;return(t=(X5(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function X5(e){return Su()?e instanceof Node||e instanceof In(e).Node:!1}function fa(e){return Su()?e instanceof Element||e instanceof In(e).Element:!1}function $a(e){return Su()?e instanceof HTMLElement||e instanceof In(e).HTMLElement:!1}function zU(e){return!Su()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof In(e).ShadowRoot}const _y=new Set(["inline","contents"]);function Vo(e){const{overflow:t,overflowX:n,overflowY:a,display:i}=ha(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!_y.has(i)}const Ty=new Set(["table","td","th"]);function Ay(e){return Ty.has(sl(e))}const jy=[":popover-open",":modal"];function ku(e){return jy.some(t=>{try{return e.matches(t)}catch{return!1}})}const Ry=["transform","translate","scale","rotate","perspective"],Dy=["transform","translate","scale","rotate","perspective","filter"],Ly=["paint","layout","strict","content"];function C0(e){const t=M0(),n=fa(e)?ha(e):e;return Ry.some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Dy.some(a=>(n.willChange||"").includes(a))||Ly.some(a=>(n.contain||"").includes(a))}function Py(e){let t=er(e);for(;$a(t)&&!Hs(t);){if(C0(t))return t;if(ku(t))return null;t=er(t)}return null}function M0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ny=new Set(["html","body","#document"]);function Hs(e){return Ny.has(sl(e))}function ha(e){return In(e).getComputedStyle(e)}function Cu(e){return fa(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function er(e){if(sl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||zU(e)&&e.host||Ya(e);return zU(t)?t.host:t}function W5(e){const t=er(e);return Hs(t)?e.ownerDocument?e.ownerDocument.body:e.body:$a(t)&&Vo(t)?t:W5(t)}function mo(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=W5(e),r=i===((a=e.ownerDocument)==null?void 0:a.body),s=In(i);if(r){const l=qh(s);return t.concat(s,s.visualViewport||[],Vo(i)?i:[],l&&n?mo(l):[])}return t.concat(i,mo(i,[],n))}function qh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Oy=["top","right","bottom","left"],tr=Math.min,Cn=Math.max,Md=Math.round,bc=Math.floor,Na=e=>({x:e,y:e}),$y={left:"right",right:"left",bottom:"top",top:"bottom"},Fy={start:"end",end:"start"};function Jh(e,t,n){return Cn(e,tr(t,n))}function fi(e,t){return typeof e=="function"?e(t):e}function hi(e){return e.split("-")[0]}function ll(e){return e.split("-")[1]}function I0(e){return e==="x"?"y":"x"}function _0(e){return e==="y"?"height":"width"}const zy=new Set(["top","bottom"]);function La(e){return zy.has(hi(e))?"y":"x"}function T0(e){return I0(La(e))}function By(e,t,n){n===void 0&&(n=!1);const a=ll(e),i=T0(e),r=_0(i);let s=i==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(s=Id(s)),[s,Id(s)]}function Hy(e){const t=Id(e);return[Qh(e),t,Qh(t)]}function Qh(e){return e.replace(/start|end/g,t=>Fy[t])}const BU=["left","right"],HU=["right","left"],Xy=["top","bottom"],Wy=["bottom","top"];function Vy(e,t,n){switch(e){case"top":case"bottom":return n?t?HU:BU:t?BU:HU;case"left":case"right":return t?Xy:Wy;default:return[]}}function Gy(e,t,n,a){const i=ll(e);let r=Vy(hi(e),n==="start",a);return i&&(r=r.map(s=>s+"-"+i),t&&(r=r.concat(r.map(Qh)))),r}function Id(e){return e.replace(/left|right|bottom|top/g,t=>$y[t])}function Yy(e){return{top:0,right:0,bottom:0,left:0,...e}}function V5(e){return typeof e!="number"?Yy(e):{top:e,right:e,bottom:e,left:e}}function _d(e){const{x:t,y:n,width:a,height:i}=e;return{width:a,height:i,top:n,left:t,right:t+a,bottom:n+i,x:t,y:n}}function XU(e,t,n){let{reference:a,floating:i}=e;const r=La(t),s=T0(t),l=_0(s),c=hi(t),d=r==="y",o=a.x+a.width/2-i.width/2,u=a.y+a.height/2-i.height/2,h=a[l]/2-i[l]/2;let p;switch(c){case"top":p={x:o,y:a.y-i.height};break;case"bottom":p={x:o,y:a.y+a.height};break;case"right":p={x:a.x+a.width,y:u};break;case"left":p={x:a.x-i.width,y:u};break;default:p={x:a.x,y:a.y}}switch(ll(t)){case"start":p[s]-=h*(n&&d?-1:1);break;case"end":p[s]+=h*(n&&d?-1:1);break}return p}async function Zy(e,t){var n;t===void 0&&(t={});const{x:a,y:i,platform:r,rects:s,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:o="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=fi(t,e),U=V5(p),g=l[h?u==="floating"?"reference":"floating":u],b=_d(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:d,rootBoundary:o,strategy:c})),x=u==="floating"?{x:a,y:i,width:s.floating.width,height:s.floating.height}:s.reference,v=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),y=await(r.isElement==null?void 0:r.isElement(v))?await(r.getScale==null?void 0:r.getScale(v))||{x:1,y:1}:{x:1,y:1},w=_d(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:v,strategy:c}):x);return{top:(b.top-w.top+U.top)/y.y,bottom:(w.bottom-b.bottom+U.bottom)/y.y,left:(b.left-w.left+U.left)/y.x,right:(w.right-b.right+U.right)/y.x}}const Ky=async(e,t,n)=>{const{placement:a="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,l=r.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:o,y:u}=XU(d,a,c),h=a,p={},U=0;for(let g=0;g<l.length;g++){var m;const{name:b,fn:x}=l[g],{x:v,y,data:w,reset:k}=await x({x:o,y:u,initialPlacement:a,placement:h,strategy:i,middlewareData:p,rects:d,platform:{...s,detectOverflow:(m=s.detectOverflow)!=null?m:Zy},elements:{reference:e,floating:t}});o=v??o,u=y??u,p={...p,[b]:{...p[b],...w}},k&&U<=50&&(U++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(d=k.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:o,y:u}=XU(d,h,c)),g=-1)}return{x:o,y:u,placement:h,strategy:i,middlewareData:p}},qy=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:i,rects:r,platform:s,elements:l,middlewareData:c}=t,{element:d,padding:o=0}=fi(e,t)||{};if(d==null)return{};const u=V5(o),h={x:n,y:a},p=T0(i),U=_0(p),m=await s.getDimensions(d),g=p==="y",b=g?"top":"left",x=g?"bottom":"right",v=g?"clientHeight":"clientWidth",y=r.reference[U]+r.reference[p]-h[p]-r.floating[U],w=h[p]-r.reference[p],k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let C=k?k[v]:0;(!C||!await(s.isElement==null?void 0:s.isElement(k)))&&(C=l.floating[v]||r.floating[U]);const I=y/2-w/2,A=C/2-m[U]/2-1,_=tr(u[b],A),T=tr(u[x],A),D=_,L=C-m[U]-T,F=C/2-m[U]/2+I,P=Jh(D,F,L),O=!c.arrow&&ll(i)!=null&&F!==P&&r.reference[U]/2-(F<D?_:T)-m[U]/2<0,N=O?F<D?F-D:F-L:0;return{[p]:h[p]+N,data:{[p]:P,centerOffset:F-P-N,...O&&{alignmentOffset:N}},reset:O}}}),Jy=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:i,middlewareData:r,rects:s,initialPlacement:l,platform:c,elements:d}=t,{mainAxis:o=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:U="none",flipAlignment:m=!0,...g}=fi(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const b=hi(i),x=La(l),v=hi(l)===l,y=await(c.isRTL==null?void 0:c.isRTL(d.floating)),w=h||(v||!m?[Id(l)]:Hy(l)),k=U!=="none";!h&&k&&w.push(...Gy(l,m,U,y));const C=[l,...w],I=await c.detectOverflow(t,g),A=[];let _=((a=r.flip)==null?void 0:a.overflows)||[];if(o&&A.push(I[b]),u){const F=By(i,s,y);A.push(I[F[0]],I[F[1]])}if(_=[..._,{placement:i,overflows:A}],!A.every(F=>F<=0)){var T,D;const F=(((T=r.flip)==null?void 0:T.index)||0)+1,P=C[F];if(P&&(!(u==="alignment"?x!==La(P):!1)||_.every(X=>La(X.placement)===x?X.overflows[0]>0:!0)))return{data:{index:F,overflows:_},reset:{placement:P}};let O=(D=_.filter(N=>N.overflows[0]<=0).sort((N,X)=>N.overflows[1]-X.overflows[1])[0])==null?void 0:D.placement;if(!O)switch(p){case"bestFit":{var L;const N=(L=_.filter(X=>{if(k){const H=La(X.placement);return H===x||H==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(H=>H>0).reduce((H,G)=>H+G,0)]).sort((X,H)=>X[1]-H[1])[0])==null?void 0:L[0];N&&(O=N);break}case"initialPlacement":O=l;break}if(i!==O)return{reset:{placement:O}}}return{}}}};function WU(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function VU(e){return Oy.some(t=>e[t]>=0)}const Qy=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:a}=t,{strategy:i="referenceHidden",...r}=fi(e,t);switch(i){case"referenceHidden":{const s=await a.detectOverflow(t,{...r,elementContext:"reference"}),l=WU(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:VU(l)}}}case"escaped":{const s=await a.detectOverflow(t,{...r,altBoundary:!0}),l=WU(s,n.floating);return{data:{escapedOffsets:l,escaped:VU(l)}}}default:return{}}}}},G5=new Set(["left","top"]);async function ew(e,t){const{placement:n,platform:a,elements:i}=e,r=await(a.isRTL==null?void 0:a.isRTL(i.floating)),s=hi(n),l=ll(n),c=La(n)==="y",d=G5.has(s)?-1:1,o=r&&c?-1:1,u=fi(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:U}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof U=="number"&&(p=l==="end"?U*-1:U),c?{x:p*o,y:h*d}:{x:h*d,y:p*o}}const tw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:i,y:r,placement:s,middlewareData:l}=t,c=await ew(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(a=l.arrow)!=null&&a.alignmentOffset?{}:{x:i+c.x,y:r+c.y,data:{...c,placement:s}}}}},nw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:i,platform:r}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:b=>{let{x,y:v}=b;return{x,y:v}}},...d}=fi(e,t),o={x:n,y:a},u=await r.detectOverflow(t,d),h=La(hi(i)),p=I0(h);let U=o[p],m=o[h];if(s){const b=p==="y"?"top":"left",x=p==="y"?"bottom":"right",v=U+u[b],y=U-u[x];U=Jh(v,U,y)}if(l){const b=h==="y"?"top":"left",x=h==="y"?"bottom":"right",v=m+u[b],y=m-u[x];m=Jh(v,m,y)}const g=c.fn({...t,[p]:U,[h]:m});return{...g,data:{x:g.x-n,y:g.y-a,enabled:{[p]:s,[h]:l}}}}}},aw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:i,rects:r,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:d=!0}=fi(e,t),o={x:n,y:a},u=La(i),h=I0(u);let p=o[h],U=o[u];const m=fi(l,t),g=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const v=h==="y"?"height":"width",y=r.reference[h]-r.floating[v]+g.mainAxis,w=r.reference[h]+r.reference[v]-g.mainAxis;p<y?p=y:p>w&&(p=w)}if(d){var b,x;const v=h==="y"?"width":"height",y=G5.has(hi(i)),w=r.reference[u]-r.floating[v]+(y&&((b=s.offset)==null?void 0:b[u])||0)+(y?0:g.crossAxis),k=r.reference[u]+r.reference[v]+(y?0:((x=s.offset)==null?void 0:x[u])||0)-(y?g.crossAxis:0);U<w?U=w:U>k&&(U=k)}return{[h]:p,[u]:U}}}},iw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:i,rects:r,platform:s,elements:l}=t,{apply:c=()=>{},...d}=fi(e,t),o=await s.detectOverflow(t,d),u=hi(i),h=ll(i),p=La(i)==="y",{width:U,height:m}=r.floating;let g,b;u==="top"||u==="bottom"?(g=u,b=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(b=u,g=h==="end"?"top":"bottom");const x=m-o.top-o.bottom,v=U-o.left-o.right,y=tr(m-o[g],x),w=tr(U-o[b],v),k=!t.middlewareData.shift;let C=y,I=w;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(I=v),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(C=x),k&&!h){const _=Cn(o.left,0),T=Cn(o.right,0),D=Cn(o.top,0),L=Cn(o.bottom,0);p?I=U-2*(_!==0||T!==0?_+T:Cn(o.left,o.right)):C=m-2*(D!==0||L!==0?D+L:Cn(o.top,o.bottom))}await c({...t,availableWidth:I,availableHeight:C});const A=await s.getDimensions(l.floating);return U!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function Y5(e){const t=ha(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const i=$a(e),r=i?e.offsetWidth:n,s=i?e.offsetHeight:a,l=Md(n)!==r||Md(a)!==s;return l&&(n=r,a=s),{width:n,height:a,$:l}}function A0(e){return fa(e)?e:e.contextElement}function Ds(e){const t=A0(e);if(!$a(t))return Na(1);const n=t.getBoundingClientRect(),{width:a,height:i,$:r}=Y5(t);let s=(r?Md(n.width):n.width)/a,l=(r?Md(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const rw=Na(0);function Z5(e){const t=In(e);return!M0()||!t.visualViewport?rw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==In(e)?!1:t}function Fr(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=A0(e);let s=Na(1);t&&(a?fa(a)&&(s=Ds(a)):s=Ds(e));const l=sw(r,n,a)?Z5(r):Na(0);let c=(i.left+l.x)/s.x,d=(i.top+l.y)/s.y,o=i.width/s.x,u=i.height/s.y;if(r){const h=In(r),p=a&&fa(a)?In(a):a;let U=h,m=qh(U);for(;m&&a&&p!==U;){const g=Ds(m),b=m.getBoundingClientRect(),x=ha(m),v=b.left+(m.clientLeft+parseFloat(x.paddingLeft))*g.x,y=b.top+(m.clientTop+parseFloat(x.paddingTop))*g.y;c*=g.x,d*=g.y,o*=g.x,u*=g.y,c+=v,d+=y,U=In(m),m=qh(U)}}return _d({width:o,height:u,x:c,y:d})}function Mu(e,t){const n=Cu(e).scrollLeft;return t?t.left+n:Fr(Ya(e)).left+n}function K5(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-Mu(e,n),i=n.top+t.scrollTop;return{x:a,y:i}}function lw(e){let{elements:t,rect:n,offsetParent:a,strategy:i}=e;const r=i==="fixed",s=Ya(a),l=t?ku(t.floating):!1;if(a===s||l&&r)return n;let c={scrollLeft:0,scrollTop:0},d=Na(1);const o=Na(0),u=$a(a);if((u||!u&&!r)&&((sl(a)!=="body"||Vo(s))&&(c=Cu(a)),$a(a))){const p=Fr(a);d=Ds(a),o.x=p.x+a.clientLeft,o.y=p.y+a.clientTop}const h=s&&!u&&!r?K5(s,c):Na(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+o.x+h.x,y:n.y*d.y-c.scrollTop*d.y+o.y+h.y}}function ow(e){return Array.from(e.getClientRects())}function cw(e){const t=Ya(e),n=Cu(e),a=e.ownerDocument.body,i=Cn(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),r=Cn(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let s=-n.scrollLeft+Mu(e);const l=-n.scrollTop;return ha(a).direction==="rtl"&&(s+=Cn(t.clientWidth,a.clientWidth)-i),{width:i,height:r,x:s,y:l}}const GU=25;function dw(e,t){const n=In(e),a=Ya(e),i=n.visualViewport;let r=a.clientWidth,s=a.clientHeight,l=0,c=0;if(i){r=i.width,s=i.height;const o=M0();(!o||o&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const d=Mu(a);if(d<=0){const o=a.ownerDocument,u=o.body,h=getComputedStyle(u),p=o.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,U=Math.abs(a.clientWidth-u.clientWidth-p);U<=GU&&(r-=U)}else d<=GU&&(r+=d);return{width:r,height:s,x:l,y:c}}const uw=new Set(["absolute","fixed"]);function fw(e,t){const n=Fr(e,!0,t==="fixed"),a=n.top+e.clientTop,i=n.left+e.clientLeft,r=$a(e)?Ds(e):Na(1),s=e.clientWidth*r.x,l=e.clientHeight*r.y,c=i*r.x,d=a*r.y;return{width:s,height:l,x:c,y:d}}function YU(e,t,n){let a;if(t==="viewport")a=dw(e,n);else if(t==="document")a=cw(Ya(e));else if(fa(t))a=fw(t,n);else{const i=Z5(e);a={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return _d(a)}function q5(e,t){const n=er(e);return n===t||!fa(n)||Hs(n)?!1:ha(n).position==="fixed"||q5(n,t)}function hw(e,t){const n=t.get(e);if(n)return n;let a=mo(e,[],!1).filter(l=>fa(l)&&sl(l)!=="body"),i=null;const r=ha(e).position==="fixed";let s=r?er(e):e;for(;fa(s)&&!Hs(s);){const l=ha(s),c=C0(s);!c&&l.position==="fixed"&&(i=null),(r?!c&&!i:!c&&l.position==="static"&&!!i&&uw.has(i.position)||Vo(s)&&!c&&q5(e,s))?a=a.filter(o=>o!==s):i=l,s=er(s)}return t.set(e,a),a}function pw(e){let{element:t,boundary:n,rootBoundary:a,strategy:i}=e;const s=[...n==="clippingAncestors"?ku(t)?[]:hw(t,this._c):[].concat(n),a],l=s[0],c=s.reduce((d,o)=>{const u=YU(t,o,i);return d.top=Cn(u.top,d.top),d.right=tr(u.right,d.right),d.bottom=tr(u.bottom,d.bottom),d.left=Cn(u.left,d.left),d},YU(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Uw(e){const{width:t,height:n}=Y5(e);return{width:t,height:n}}function mw(e,t,n){const a=$a(t),i=Ya(t),r=n==="fixed",s=Fr(e,!0,r,t);let l={scrollLeft:0,scrollTop:0};const c=Na(0);function d(){c.x=Mu(i)}if(a||!a&&!r)if((sl(t)!=="body"||Vo(i))&&(l=Cu(t)),a){const p=Fr(t,!0,r,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else i&&d();r&&!a&&i&&d();const o=i&&!a&&!r?K5(i,l):Na(0),u=s.left+l.scrollLeft-c.x-o.x,h=s.top+l.scrollTop-c.y-o.y;return{x:u,y:h,width:s.width,height:s.height}}function Cf(e){return ha(e).position==="static"}function ZU(e,t){if(!$a(e)||ha(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ya(e)===n&&(n=n.ownerDocument.body),n}function J5(e,t){const n=In(e);if(ku(e))return n;if(!$a(e)){let i=er(e);for(;i&&!Hs(i);){if(fa(i)&&!Cf(i))return i;i=er(i)}return n}let a=ZU(e,t);for(;a&&Ay(a)&&Cf(a);)a=ZU(a,t);return a&&Hs(a)&&Cf(a)&&!C0(a)?n:a||Py(e)||n}const gw=async function(e){const t=this.getOffsetParent||J5,n=this.getDimensions,a=await n(e.floating);return{reference:mw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function bw(e){return ha(e).direction==="rtl"}const vw={convertOffsetParentRelativeRectToViewportRelativeRect:lw,getDocumentElement:Ya,getClippingRect:pw,getOffsetParent:J5,getElementRects:gw,getClientRects:ow,getDimensions:Uw,getScale:Ds,isElement:fa,isRTL:bw};function Q5(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xw(e,t){let n=null,a;const i=Ya(e);function r(){var l;clearTimeout(a),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),r();const d=e.getBoundingClientRect(),{left:o,top:u,width:h,height:p}=d;if(l||t(),!h||!p)return;const U=bc(u),m=bc(i.clientWidth-(o+h)),g=bc(i.clientHeight-(u+p)),b=bc(o),v={rootMargin:-U+"px "+-m+"px "+-g+"px "+-b+"px",threshold:Cn(0,tr(1,c))||1};let y=!0;function w(k){const C=k[0].intersectionRatio;if(C!==c){if(!y)return s();C?s(!1,C):a=setTimeout(()=>{s(!1,1e-7)},1e3)}C===1&&!Q5(d,e.getBoundingClientRect())&&s(),y=!1}try{n=new IntersectionObserver(w,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(w,v)}n.observe(e)}return s(!0),r}function yw(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=a,d=A0(e),o=i||r?[...d?mo(d):[],...mo(t)]:[];o.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),r&&b.addEventListener("resize",n)});const u=d&&l?xw(d,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(b=>{let[x]=b;x&&x.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var v;(v=p)==null||v.observe(t)})),n()}),d&&!c&&p.observe(d),p.observe(t));let U,m=c?Fr(e):null;c&&g();function g(){const b=Fr(e);m&&!Q5(m,b)&&n(),m=b,U=requestAnimationFrame(g)}return n(),()=>{var b;o.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(b=p)==null||b.disconnect(),p=null,c&&cancelAnimationFrame(U)}}const ww=tw,Ew=nw,Sw=Jy,kw=iw,Cw=Qy,KU=qy,Mw=aw,Iw=(e,t,n)=>{const a=new Map,i={platform:vw,...n},r={...i.platform,_c:a};return Ky(e,t,{...i,platform:r})};var _w=typeof document<"u",Tw=function(){},Gc=_w?S.useLayoutEffect:Tw;function Td(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,a,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!Td(e[a],t[a]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,i[a]))return!1;for(a=n;a--!==0;){const r=i[a];if(!(r==="_owner"&&e.$$typeof)&&!Td(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function eb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qU(e,t){const n=eb(e);return Math.round(t*n)/n}function Mf(e){const t=S.useRef(e);return Gc(()=>{t.current=e}),t}function Aw(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:i,elements:{reference:r,floating:s}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[o,u]=S.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=S.useState(a);Td(h,a)||p(a);const[U,m]=S.useState(null),[g,b]=S.useState(null),x=S.useCallback(X=>{X!==k.current&&(k.current=X,m(X))},[]),v=S.useCallback(X=>{X!==C.current&&(C.current=X,b(X))},[]),y=r||U,w=s||g,k=S.useRef(null),C=S.useRef(null),I=S.useRef(o),A=c!=null,_=Mf(c),T=Mf(i),D=Mf(d),L=S.useCallback(()=>{if(!k.current||!C.current)return;const X={placement:t,strategy:n,middleware:h};T.current&&(X.platform=T.current),Iw(k.current,C.current,X).then(H=>{const G={...H,isPositioned:D.current!==!1};F.current&&!Td(I.current,G)&&(I.current=G,Ft.flushSync(()=>{u(G)}))})},[h,t,n,T,D]);Gc(()=>{d===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,u(X=>({...X,isPositioned:!1})))},[d]);const F=S.useRef(!1);Gc(()=>(F.current=!0,()=>{F.current=!1}),[]),Gc(()=>{if(y&&(k.current=y),w&&(C.current=w),y&&w){if(_.current)return _.current(y,w,L);L()}},[y,w,L,_,A]);const P=S.useMemo(()=>({reference:k,floating:C,setReference:x,setFloating:v}),[x,v]),O=S.useMemo(()=>({reference:y,floating:w}),[y,w]),N=S.useMemo(()=>{const X={position:n,left:0,top:0};if(!O.floating)return X;const H=qU(O.floating,o.x),G=qU(O.floating,o.y);return l?{...X,transform:"translate("+H+"px, "+G+"px)",...eb(O.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:G}},[n,l,O.floating,o.x,o.y]);return S.useMemo(()=>({...o,update:L,refs:P,elements:O,floatingStyles:N}),[o,L,P,O,N])}const jw=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:i}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?KU({element:a.current,padding:i}).fn(n):{}:a?KU({element:a,padding:i}).fn(n):{}}}},Rw=(e,t)=>({...ww(e),options:[e,t]}),Dw=(e,t)=>({...Ew(e),options:[e,t]}),Lw=(e,t)=>({...Mw(e),options:[e,t]}),Pw=(e,t)=>({...Sw(e),options:[e,t]}),Nw=(e,t)=>({...kw(e),options:[e,t]}),Ow=(e,t)=>({...Cw(e),options:[e,t]}),$w=(e,t)=>({...jw(e),options:[e,t]});var If={exports:{}},_f={};var JU;function Fw(){if(JU)return _f;JU=1;var e=H5();function t(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,i=e.useEffect,r=e.useLayoutEffect,s=e.useDebugValue;function l(u,h){var p=h(),U=a({inst:{value:p,getSnapshot:h}}),m=U[0].inst,g=U[1];return r(function(){m.value=p,m.getSnapshot=h,c(m)&&g({inst:m})},[u,p,h]),i(function(){return c(m)&&g({inst:m}),u(function(){c(m)&&g({inst:m})})},[u]),s(p),p}function c(u){var h=u.getSnapshot;u=u.value;try{var p=h();return!n(u,p)}catch{return!0}}function d(u,h){return h()}var o=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return _f.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:o,_f}var QU;function zw(){return QU||(QU=1,If.exports=Fw()),If.exports}var Tf={exports:{}},Af={};var em;function Bw(){if(em)return Af;em=1;var e=H5(),t=zw();function n(d,o){return d===o&&(d!==0||1/d===1/o)||d!==d&&o!==o}var a=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,r=e.useRef,s=e.useEffect,l=e.useMemo,c=e.useDebugValue;return Af.useSyncExternalStoreWithSelector=function(d,o,u,h,p){var U=r(null);if(U.current===null){var m={hasValue:!1,value:null};U.current=m}else m=U.current;U=l(function(){function b(k){if(!x){if(x=!0,v=k,k=h(k),p!==void 0&&m.hasValue){var C=m.value;if(p(C,k))return y=C}return y=k}if(C=y,a(v,k))return C;var I=h(k);return p!==void 0&&p(C,I)?(v=k,C):(v=k,y=I)}var x=!1,v,y,w=u===void 0?null:u;return[function(){return b(o())},w===null?void 0:function(){return b(w())}]},[o,u,h,p]);var g=i(d,U[0],U[1]);return s(function(){m.hasValue=!0,m.value=g},[g]),c(g),g},Af}var tm;function Hw(){return tm||(tm=1,Tf.exports=Bw()),Tf.exports}var Xw=Hw();const Ww=Si(Xw);var Aa=function(){return Aa=Object.assign||function(t){for(var n,a=1,i=arguments.length;a<i;a++){n=arguments[a];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Aa.apply(this,arguments)};function tb(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]]);return n}function Vw(e,t,n){if(n||arguments.length===2)for(var a=0,i=t.length,r;a<i;a++)(r||!(a in t))&&(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}var be={VITE_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",VITE_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",VITE_APP_LIBRARY_URL:"https://libraries.excalidraw.com",VITE_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",VITE_APP_PLUS_LP:"https://plus.excalidraw.com",VITE_APP_PLUS_APP:"https://app.excalidraw.com",VITE_APP_AI_BACKEND:"https://oss-ai.excalidraw.com",VITE_APP_WS_SERVER_URL:"https://oss-collab.excalidraw.com",VITE_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',VITE_APP_ENABLE_TRACKING:"false",VITE_APP_PLUS_EXPORT_PUBLIC_KEY:`MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApQ0jM9Qz8TdFLzcuAZZX
|
|
3
3
|
/WvuKSOJxiw6AR/ZcE3eFQWM/mbFdhQgyK8eHGkKQifKzH1xUZjCxyXcxW6ZO02t
|
|
4
4
|
kPOPxhz+nxUrIoWCD/V4NGmUA1lxwHuO21HN1gzKrN3xHg5EGjyouR9vibT9VDGF
|
|
5
5
|
gq6+4Ic/kJX+AD2MM7Yre2+FsOdysrmuW2Fu3ahuC1uQE7pOe1j0k7auNP0y1q53
|
|
@@ -12,7 +12,7 @@ PQIDAQAB`,VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX:"false",VITE_APP_COL
|
|
|
12
12
|
`),e,t).width+It*2:n+It*2},Y0=(e,t)=>an("",e,t).width+It*2,MI=()=>K0(j8,Xe({fontSize:ki,fontFamily:dr}))>0,Zs=e=>M8(e).replace(/\t/g," "),Z0=e=>Zs(e).split(`
|
|
13
13
|
`),II=e=>{let t=Z0(e.text).length;return e.height/t/e.fontSize},tc=(e,t)=>e*t,D8=(e,t)=>tc(e,t)+It*2,ld,_I=e=>{ld=e},TI=class{constructor(){j(this,"canvas"),this.canvas=document.createElement("canvas")}getLineWidth(e,t){let n=this.canvas.getContext("2d");n.font=t;let a=n.measureText(e).width;return Ui()?a*10:a}},Yr=(e,t)=>(ld||(ld=new TI),ld.getLineWidth(e,t)),K0=(e,t)=>{let n=Z0(e),a=0;return n.forEach(i=>{a=Math.max(a,Yr(i,t))}),a},AI=(e,t,n)=>{let a=Z0(e).length;return tc(t,n)*a},nc=(()=>{let e={};return{calculate:(t,n)=>{let a=t.charCodeAt(0);if(e[n]||(e[n]=[]),!e[n][a]){let i=Yr(t,n);e[n][a]=i}return e[n][a]},getCache:t=>e[t],clearCache:t=>{e[t]=[]}}})(),jI=e=>{let t=nc.getCache(e);if(!t)return 0;let n=t.filter(a=>a!==void 0);return Math.max(...n)},rh,jc,sh,RI=e=>(rh||(rh=$e.class(...Object.values(ti))),rh.test(e)),DI=()=>{if(!jc)try{jc=PI()}catch{jc=LI()}return jc},q0=()=>(sh||(sh=NI()),sh),An={WHITESPACE:/\s/u,HYPHEN:/-/u,OPENING:/<\(\[\{/u,CLOSING:/>\)\]\}.,:;!\?…\//u},ti={CHAR:new RegExp("\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}`'^〃〰〆#&*+-ー/\=|¦〒¬ ̄","u"),OPENING:/([{〈《⦅「「『【〖〔〘〚<〝/u,CLOSING:/)]}〉》⦆」」』】〗〕〙〛>。.,、〟‥?!:;・〜〞/u,CURRENCY:/¥₩£¢$/u},Ur={FLAG:new RegExp("\\p{RI}\\p{RI}","u"),JOINER:new RegExp("(?:\\p{Emoji_Modifier}|\\uFE0F\\u20E3?|[\\u{E0020}-\\u{E007E}]+\\u{E007F})?","u"),ZWJ:/\u200D/u,ANY:/[\p{Emoji}]/u,MOST:/[\p{Extended_Pictographic}\p{Emoji_Presentation}]/u},LI=()=>$e.or(q0(),yt.On(An.HYPHEN,An.WHITESPACE,ti.CHAR)),PI=()=>$e.or(q0(),yt.Before(An.WHITESPACE).Build(),yt.After(An.WHITESPACE,An.HYPHEN).Build(),yt.Before(ti.CHAR,ti.CURRENCY).NotPrecededBy(An.OPENING,ti.OPENING).Build(),yt.After(ti.CHAR).NotFollowedBy(An.HYPHEN,An.CLOSING,ti.CLOSING).Build(),yt.BeforeMany(ti.OPENING).NotPrecededBy(An.OPENING).Build(),yt.AfterMany(ti.CLOSING).NotFollowedBy(An.CLOSING).Build(),yt.AfterMany(An.CLOSING).FollowedBy(An.OPENING).Build()),NI=()=>$e.group($e.or(Ur.FLAG,$e.and(Ur.MOST,Ur.JOINER,$e.build(`(?:${Ur.ZWJ.source}(?:${Ur.FLAG.source}|${Ur.ANY.source}${Ur.JOINER.source}))*`)))),$e={build:e=>new RegExp(e,"u"),join:(...e)=>e.map(t=>t.source).join(""),and:(...e)=>$e.build($e.join(...e)),or:(...e)=>$e.build(e.map(t=>t.source).join("|")),group:(...e)=>$e.build(`(${$e.join(...e)})`),class:(...e)=>$e.build(`[${$e.join(...e)}]`)},yt={On:(...e)=>{let t=$e.join(...e);return $e.build(`([${t}])`)},Before:(...e)=>{let t=$e.join(...e),n=()=>$e.build(`(?=[${t}])`);return yt.Chain(n)},After:(...e)=>{let t=$e.join(...e),n=()=>$e.build(`(?<=[${t}])`);return yt.Chain(n)},BeforeMany:(...e)=>{let t=$e.join(...e),n=()=>$e.build(`(?<![${t}])(?=[${t}])`);return yt.Chain(n)},AfterMany:(...e)=>{let t=$e.join(...e),n=()=>$e.build(`(?<=[${t}])(?![${t}])`);return yt.Chain(n)},NotBefore:(...e)=>{let t=$e.join(...e),n=()=>$e.build(`(?![${t}])`);return yt.Chain(n)},NotAfter:(...e)=>{let t=$e.join(...e),n=()=>$e.build(`(?<![${t}])`);return yt.Chain(n)},Chain:e=>({Build:e,PreceededBy:(...t)=>{let n=e(),a=yt.After(...t).Build(),i=()=>$e.and(a,n);return yt.Chain(i)},FollowedBy:(...t)=>{let n=e(),a=yt.Before(...t).Build(),i=()=>$e.and(n,a);return yt.Chain(i)},NotPrecededBy:(...t)=>{let n=e(),a=yt.NotAfter(...t).Build(),i=()=>$e.and(a,n);return yt.Chain(i)},NotFollowedBy:(...t)=>{let n=e(),a=yt.NotBefore(...t).Build(),i=()=>$e.and(n,a);return yt.Chain(i)}})},OI=e=>{let t=DI();return e.normalize("NFC").split(t).filter(Boolean)},rs=(e,t,n)=>{if(!Number.isFinite(n)||n<0)return e;let a=[],i=e.split(`
|
|
14
14
|
`);for(let r of i){if(Yr(r,t)<=n){a.push(r);continue}let s=$I(r,t,n);a.push(...s)}return a.join(`
|
|
15
|
-
`)},$I=(e,t,n)=>{let a=[],i=OI(e)[Symbol.iterator](),r="",s=0,l=i.next();for(;!l.done;){let c=l.value,d=r+c,o=BI(c)?s+nc.calculate(c,t):Yr(d,t);if(/\s/.test(c)||o<=n){r=d,s=o,l=i.next();continue}if(r)a.push(r.trimEnd()),r="",s=0;else{let u=FI(c,t,n),h=u[u.length-1]??"",p=u.slice(0,-1);a.push(...p),r=h,s=Yr(h,t),l=i.next()}}if(r){let c=zI(r,t,n);a.push(c)}return a},FI=(e,t,n)=>{if(q0().test(e))return[e];HI(e);let a=[],i=Array.from(e),r="",s=0;for(let l of i){let c=nc.calculate(l,t),d=s+c;if(d<=n){r=r+l,s=d;continue}r&&a.push(r),r=l,s=c}return r&&a.push(r),a},zI=(e,t,n)=>{if(!(Yr(e,t)>n))return e;let[,a,i]=e.match(/^(.+?)(\s+)$/)??[e,e.trimEnd(),""],r=Yr(a,t);for(let s of Array.from(i)){let l=nc.calculate(s,t),c=r+l;if(c>n)break;a=a+s,r=c}return a},BI=e=>e.codePointAt(0)!==void 0&&e.codePointAt(1)===void 0,HI=e=>{if((be.MODE===vn.TEST||be.DEV)&&/\s/.test(e))throw new Error("Word should not contain any whitespaces!")},rn=class{};j(rn,"rg",new ko),j(rn,"cache",new WeakMap),j(rn,"get",e=>rn.cache.get(e)),j(rn,"set",(e,t)=>rn.cache.set(e,t)),j(rn,"delete",e=>rn.cache.delete(e)),j(rn,"destroy",()=>{rn.cache=new WeakMap}),j(rn,"generateElementShape",(e,t)=>{let n=t?.isExporting?void 0:rn.get(e);if(n!==void 0)return n;T1.delete(e);let a=JL(e,rn.rg,t||{isExporting:!1,canvasBackgroundColor:Ee.white,embedsValidationStatus:null});return rn.cache.set(e,a),a});var ut=rn,na=e=>"var(--icon-fill-color)",L8=e=>e===Ce.LIGHT?Bt.white:"#1e1e1e",$=(e,t=512)=>{let{width:n=512,height:a=n,mirror:i,style:r,...s}=typeof t=="number"?{width:t}:t;return f.jsx("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${n} ${a}`,className:te({"rtl-mirror":i}),style:r,...s,children:typeof e=="string"?f.jsx("path",{fill:"currentColor",d:e}):e})},K={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},Ue={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"};$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("rect",{x:3,y:8,width:18,height:4,rx:1}),f.jsx("line",{x1:12,y1:8,x2:12,y2:21}),f.jsx("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),f.jsx("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),K);var J0=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),f.jsx("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),f.jsx("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),f.jsx("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),f.jsx("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),K),XI=$(f.jsxs("svg",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),K),WI=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("circle",{cx:"12",cy:"12",r:"1"}),f.jsx("circle",{cx:"12",cy:"19",r:"1"}),f.jsx("circle",{cx:"12",cy:"5",r:"1"})]}),K),VI=$(f.jsxs("svg",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),f.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),f.jsx("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),K),Fu=$(f.jsxs("g",{children:[f.jsx("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),f.jsx("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),f.jsx("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:f.jsx("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),f.jsx("g",{mask:"url(#UnlockedIcon)",children:f.jsx("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),Ue),Q0=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),f.jsx("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),f.jsx("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),Ue),GI=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),f.jsx("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),YI=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),f.jsx("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),ZI=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),f.jsx("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"});$(f.jsx("g",{fill:"currentColor",children:f.jsx("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),{width:40,height:40,fill:"none"});var KI=$(f.jsxs("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),f.jsx("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),qI=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),K),JI=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),K),QI=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("circle",{cx:"12",cy:"12",r:"9"})]}),K),e_=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),f.jsx("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),f.jsx("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),K),t_=$(f.jsx("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),Ue),n_=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),f.jsx("path",{d:"M16 7h4"}),f.jsx("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),K),Ao=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),f.jsx("path",{d:"m11.25 5.417 3.333 3.333"})]}),Ue),P8=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),f.jsx("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),f.jsx("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),f.jsx("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),f.jsx("polyline",{points:"5 20 11 4 13 4 20 20"})]}),K),a_=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{d:"M12.5 6.667h.01"}),f.jsx("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),f.jsx("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),f.jsx("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),Ue),i_=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),f.jsx("path",{d:"M18 13.3l-6.3 -6.3"})]}),K),k2=$(f.jsx("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),Ue),C2=$(f.jsx("path",{d:"M5 10h10",strokeWidth:"1.25"}),Ue),r_=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M21 21l-6 -6"}),f.jsx("path",{d:"M3.268 12.043a7.017 7.017 0 0 0 6.634 4.957a7.012 7.012 0 0 0 7.043 -6.131a7 7 0 0 0 -5.314 -7.672a7.021 7.021 0 0 0 -8.241 4.403"}),f.jsx("path",{d:"M3 4v4h4"})]}),K),Zr=$(f.jsx("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),Ue),s_=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("polyline",{points:"12 16 18 10 12 4"}),f.jsx("polyline",{points:"8 4 2 10 8 16"})]}),Ue),w1=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),f.jsx("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),Ue),E1=$(f.jsx("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),Ue),S1=$(f.jsx("g",{stroke:"currentColor",strokeLinejoin:"round",children:f.jsx("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),{...Ue,strokeWidth:1.5}),N8=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),f.jsx("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),f.jsx("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),K),zu=$(f.jsx("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),Ue),ep=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("circle",{cx:"12",cy:"12",r:"9"}),f.jsx("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),f.jsx("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),K),l_=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("circle",{cx:"12",cy:"12",r:"9"}),f.jsx("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),f.jsx("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),K),M2=$(f.jsx("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),Ue),O8=$(f.jsx("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),Ue),o_=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),f.jsx("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),Ue),c_=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),f.jsx("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),K),d_=$(f.jsx("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),k1=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),f.jsx("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),Ue),u_=$("M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z",{width:448,height:512}),f_=$("M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z",{width:448,height:512}),tp=$(f.jsx("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),Ue);$("M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z",{width:384,height:512});var h_=$("M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"),lh=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),f.jsx("path",{d:"M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z"}),f.jsx("path",{d:"M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"})]}),K),$8=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M15 8h.01"}),f.jsx("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),f.jsx("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),f.jsx("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),f.jsx("path",{d:"M19 16v6"}),f.jsx("path",{d:"M22 19l-3 3l-3 -3"})]}),K),p_=$("M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",{width:512,height:512});$("M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512});$("M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512});var U_=$("M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z");$("M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z");var I2=$(f.jsx("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),Ue),_2=$(f.jsx("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),Ue),m_=$("M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z",{mirror:!0}),g_=$(f.jsx("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),Ue);$("M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z");$("M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z",{width:24,height:24});$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M8 9h-1a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-8a2 2 0 0 0 -2 -2h-1"}),f.jsx("path",{d:"M12 14v-11"}),f.jsx("path",{d:"M9 6l3 -3l3 3"})]}),K);$(f.jsxs(f.Fragment,{children:[f.jsx("path",{fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),f.jsx("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64});$(f.jsx("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024});var F8=f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M12 10l0 10"}),f.jsx("path",{d:"M12 10l4 4"}),f.jsx("path",{d:"M12 10l-4 4"}),f.jsx("path",{d:"M4 4l16 0"})]}),z8=f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M12 5l0 14"}),f.jsx("path",{d:"M16 9l-4 -4"}),f.jsx("path",{d:"M8 9l4 -4"})]}),T2=$(z8,K),A2=$(z8,{...K,style:{transform:"rotate(180deg)"}}),j2=$(F8,K),R2=$(F8,{...K,style:{transform:"rotate(180deg)"}}),D2=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),L2=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),P2=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),N2=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),b_=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),v_=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),O2=$(f.jsxs("g",{stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),f.jsx("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),Ue),$2=$(f.jsxs("g",{stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),f.jsx("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),Ue),B8=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("circle",{cx:"9",cy:"7",r:"4"}),f.jsx("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),f.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),f.jsx("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),K);$("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z");$("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z");var hl=$(f.jsxs(f.Fragment,{children:[f.jsx("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx("path",{d:"M15 5 5 15M5 5l10 10"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue);$("M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z",{mirror:!0});$("M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z",{width:24});$("M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z",{width:384,height:512});var F2=Z.memo(({theme:e})=>$(f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M25 26H111V111H25",fill:na()}),f.jsx("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:na(),strokeWidth:"2"}),f.jsx("path",{d:"M100 100H160V160H100",fill:na()}),f.jsx("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:na(),strokeWidth:"2"}),f.jsxs("g",{fill:L8(e),stroke:na(),strokeWidth:"6",children:[f.jsx("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),f.jsx("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),f.jsx("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),f.jsx("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),z2=Z.memo(({theme:e})=>$(f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M25 26H111V111H25",fill:na()}),f.jsx("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:na(),strokeWidth:"2"}),f.jsx("path",{d:"M100 100H160V160H100",fill:na()}),f.jsx("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:na(),strokeWidth:"2"}),f.jsxs("g",{fill:L8(e),stroke:na(),strokeWidth:"6",children:[f.jsx("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),f.jsx("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),f.jsx("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),f.jsx("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),f.jsx("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),f.jsx("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),x_=$(f.jsx("g",{strokeWidth:1.25,children:f.jsx("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),Ue),y_=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),f.jsx("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:f.jsx("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),f.jsx("g",{mask:"url(#FillHachureIcon)",children:f.jsx("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),Ue),w_=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",children:[f.jsx("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),f.jsx("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:f.jsx("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),f.jsx("g",{mask:"url(#FillCrossHatchIcon)",children:f.jsx("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),E_=$(f.jsxs(f.Fragment,{children:[f.jsx("g",{clipPath:"url(#a)",children:f.jsx("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...Ue,fill:"currentColor"}),H8=$(f.jsx(f.Fragment,{children:f.jsx("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),Ue),S_=$(f.jsx("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),Ue),k_=$(f.jsx("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),Ue);Z.memo(({theme:e})=>$(f.jsx("path",{d:"M6 10H34",stroke:na(),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20}));var C_=$(f.jsxs("g",{strokeWidth:"2",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M5 12h2"}),f.jsx("path",{d:"M17 12h2"}),f.jsx("path",{d:"M11 12h2"})]}),K),M_=$(f.jsxs("g",{strokeWidth:"2",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 12v.01"}),f.jsx("path",{d:"M8 12v.01"}),f.jsx("path",{d:"M12 12v.01"}),f.jsx("path",{d:"M16 12v.01"}),f.jsx("path",{d:"M20 12v.01"})]}),K),I_=$(f.jsx("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),Ue),__=$(f.jsx("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),Ue),T_=$(f.jsx("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),Ue),A_=$(f.jsxs("svg",{strokeWidth:"1.5",children:[f.jsx("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),f.jsx("path",{d:"M13.3333 3.33331V3.34331"}),f.jsx("path",{d:"M16.6667 3.33331V3.34331"}),f.jsx("path",{d:"M16.6667 6.66669V6.67669"}),f.jsx("path",{d:"M16.6667 10V10.01"}),f.jsx("path",{d:"M3.33334 13.3333V13.3433"}),f.jsx("path",{d:"M16.6667 13.3333V13.3433"}),f.jsx("path",{d:"M3.33334 16.6667V16.6767"}),f.jsx("path",{d:"M6.66666 16.6667V16.6767"}),f.jsx("path",{d:"M10 16.6667V16.6767"}),f.jsx("path",{d:"M13.3333 16.6667V16.6767"}),f.jsx("path",{d:"M16.6667 16.6667V16.6767"})]}),Ue),j_=$(f.jsxs("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),f.jsx("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),f.jsx("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),f.jsx("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),f.jsx("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),f.jsx("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),f.jsx("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),f.jsx("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),f.jsx("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),f.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),f.jsx("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),f.jsx("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),K),R_=$(f.jsxs("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[f.jsx("path",{d:"M12 12l9 0"}),f.jsx("path",{d:"M3 9l6 6"}),f.jsx("path",{d:"M3 15l6 -6"})]}),K),D_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[f.jsx("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),f.jsx("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),L_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[f.jsx("path",{d:"M32 10L6 10",strokeWidth:2}),f.jsx("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),P_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[f.jsx("path",{d:"M26 10L6 10"}),f.jsx("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),N_=Z.memo(({flip:e=!1})=>$(f.jsx("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:f.jsx("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),O_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[f.jsx("path",{d:"M32 10L6 10",strokeWidth:2}),f.jsx("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),$_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[f.jsx("path",{d:"M6,9.5H27"}),f.jsx("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),F_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[f.jsx("path",{d:"M6,9.5H20"}),f.jsx("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),z_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[f.jsx("path",{d:"M6,9.5H20"}),f.jsx("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),B_=Z.memo(({flip:e=!1})=>$(f.jsx("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:f.jsx("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),H_=Z.memo(({flip:e=!1})=>$(f.jsx("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:f.jsx("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),X_=Z.memo(({flip:e=!1})=>$(f.jsx("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:f.jsx("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),W_=$(f.jsxs(f.Fragment,{children:[f.jsx("g",{clipPath:"url(#a)",children:f.jsx("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),V_=$(f.jsxs(f.Fragment,{children:[f.jsx("g",{clipPath:"url(#a)",children:f.jsx("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),G_=$(f.jsxs(f.Fragment,{children:[f.jsx("g",{clipPath:"url(#a)",children:f.jsx("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),Y_=$(f.jsx(f.Fragment,{children:f.jsx("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),Ue),Bu=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 7v-2h13v2"}),f.jsx("path",{d:"M10 5v14"}),f.jsx("path",{d:"M12 19h-4"}),f.jsx("path",{d:"M15 13v-1h6v1"}),f.jsx("path",{d:"M18 12v7"}),f.jsx("path",{d:"M17 19h2"})]}),K),Z_=$(f.jsx(f.Fragment,{children:f.jsxs("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M7 12h10"}),f.jsx("path",{d:"M7 5v14"}),f.jsx("path",{d:"M17 5v14"}),f.jsx("path",{d:"M15 19h4"}),f.jsx("path",{d:"M15 5h4"}),f.jsx("path",{d:"M5 19h4"}),f.jsx("path",{d:"M5 5h4"})]})}),K),Zd=$(f.jsx(f.Fragment,{children:f.jsx("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),Ue),C1=$(f.jsxs(f.Fragment,{children:[f.jsx("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),K_=$(f.jsxs("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),f.jsx("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),f.jsx("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),K),q_=$(f.jsxs("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),f.jsx("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),f.jsx("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),K),J_=$(f.jsxs("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),f.jsx("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),f.jsx("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),K),Q_=Z.memo(({theme:e})=>$(f.jsxs("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),f.jsx("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),K)),eT=Z.memo(({theme:e})=>$(f.jsxs("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),f.jsx("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),K)),tT=Z.memo(({theme:e})=>$(f.jsxs("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),f.jsx("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),f.jsx("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),K)),X8=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M21 19h-18l9 -15"}),f.jsx("path",{d:"M20.615 15.171h.015"}),f.jsx("path",{d:"M19.515 11.771h.015"}),f.jsx("path",{d:"M17.715 8.671h.015"}),f.jsx("path",{d:"M15.415 5.971h.015"})]}),K),nT=$(f.jsx("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",fill:"currentColor"}),{width:640,height:512});$(f.jsx("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"}));var W8=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),f.jsx("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),f.jsx("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),f.jsx("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),K),B2=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),f.jsx("path",{d:"M7 11l5 5l5 -5"}),f.jsx("path",{d:"M12 4l0 12"})]}),K),np=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),f.jsx("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),K),aT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),f.jsx("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),f.jsx("path",{d:"M9.15 14.85l8.85 -10.85"}),f.jsx("path",{d:"M6 4l8.85 10.85"})]}),K),iT=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),f.jsx("path",{d:"M12 17l0 .01"}),f.jsx("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),K);$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M7 4v16l13 -8z"})]}),K);$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"})]}),K);var rT=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M5 12l5 5l10 -10"})]}),K),sT=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"}),f.jsx("path",{d:"M12 9v4"}),f.jsx("path",{d:"M12 17h.01"})]}),K),lT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M11 7l6 6"}),f.jsx("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]}),K),oT=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M12 3l-4 7h8z"}),f.jsx("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),f.jsx("path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"})]}),K),V8=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 7l16 0"}),f.jsx("path",{d:"M4 17l16 0"}),f.jsx("path",{d:"M7 4l0 16"}),f.jsx("path",{d:"M17 4l0 16"})]}),K),G8=$(f.jsx("path",{fill:"currentColor",d:"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z"})),od=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{d:"M4.16602 10H15.8327"}),f.jsx("path",{d:"M12.5 13.3333L15.8333 10"}),f.jsx("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),Ue),Y8=$(f.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[f.jsx("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),f.jsx("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"})]}),20),Z8=$(f.jsxs("g",{stroke:"currentColor",fill:"none",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z"}),f.jsx("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),f.jsx("path",{d:"M15 6l3 3"}),f.jsx("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),f.jsx("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),K);$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z"}),f.jsx("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),f.jsx("path",{d:"M15 6l3 3"}),f.jsx("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),f.jsx("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),K);$(f.jsxs("g",{stroke:"currentColor",fill:"none",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),f.jsx("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),f.jsx("path",{d:"M6 7.63c-1.391 -.236 -2.787 .395 -3.534 1.689a3.474 3.474 0 0 0 1.271 4.745l4.263 2.514l6 -3.348"}),f.jsx("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),f.jsx("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),f.jsx("path",{d:"M18 16.302c1.391 .236 2.787 -.395 3.534 -1.689a3.474 3.474 0 0 0 -1.271 -4.745l-4.308 -2.514l-5.955 3.42"})]}),K);var cT=$(f.jsxs("g",{stroke:"currentColor",fill:"none",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),f.jsx("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),f.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),f.jsx("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),K),ap=$(f.jsxs("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),f.jsx("path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"})]}),K),dT=$(f.jsxs("g",{stroke:"currentColor",fill:"none",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),f.jsx("path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"}),f.jsx("path",{d:"M3 3l18 18"})]}),K),uT=$(f.jsxs("g",{stroke:"currentColor",fill:"none",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),f.jsx("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),f.jsx("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),f.jsx("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),f.jsx("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),f.jsx("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),K),fT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),f.jsx("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),f.jsx("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),f.jsx("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),f.jsx("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),f.jsx("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),K),Kr=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),f.jsx("path",{d:"M21 21l-6 -6"})]}),K),hT=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),f.jsx("path",{d:"M12 7v5l3 3"}),f.jsx("path",{d:"M19 16l-2 3h4l-2 3"})]}),K),pT=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M9 2m0 3a3 3 0 0 1 3 -3h0a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3h0a3 3 0 0 1 -3 -3z"}),f.jsx("path",{d:"M5 10a7 7 0 0 0 14 0"}),f.jsx("path",{d:"M8 21l8 0"}),f.jsx("path",{d:"M12 17l0 4"})]}),K),UT=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 3l18 18"}),f.jsx("path",{d:"M9 5a3 3 0 0 1 6 0v5a3 3 0 0 1 -.13 .874m-2 2a3 3 0 0 1 -3.87 -2.872v-1"}),f.jsx("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),f.jsx("path",{d:"M8 21l8 0"}),f.jsx("path",{d:"M12 17l0 4"})]}),K),K8=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),K),mT=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M8 8m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"}),f.jsx("path",{d:"M12 20v.01"}),f.jsx("path",{d:"M16 20v.01"}),f.jsx("path",{d:"M8 20v.01"}),f.jsx("path",{d:"M4 20v.01"}),f.jsx("path",{d:"M4 16v.01"}),f.jsx("path",{d:"M4 12v.01"}),f.jsx("path",{d:"M4 8v.01"}),f.jsx("path",{d:"M4 4v.01"}),f.jsx("path",{d:"M8 4v.01"}),f.jsx("path",{d:"M12 4v.01"}),f.jsx("path",{d:"M16 4v.01"}),f.jsx("path",{d:"M20 4v.01"}),f.jsx("path",{d:"M20 8v.01"}),f.jsx("path",{d:"M20 12v.01"}),f.jsx("path",{d:"M20 16v.01"}),f.jsx("path",{d:"M20 20v.01"})]}),K),gT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M5 3v18"}),f.jsx("path",{d:"M19 21v-18"}),f.jsx("path",{d:"M5 7h14"}),f.jsx("path",{d:"M5 15h14"}),f.jsx("path",{d:"M8 13v4"}),f.jsx("path",{d:"M11 13v4"}),f.jsx("path",{d:"M16 13v4"}),f.jsx("path",{d:"M14 5v4"}),f.jsx("path",{d:"M11 5v4"}),f.jsx("path",{d:"M8 5v4"}),f.jsx("path",{d:"M3 21h18"})]}),K),bT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 12l18 0"}),f.jsx("path",{d:"M7 16l10 0l-10 5l0 -5"}),f.jsx("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),K),vT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M12 3l0 18"}),f.jsx("path",{d:"M16 7l0 10l5 0l-5 -10"}),f.jsx("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),K),q8=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"}),f.jsx("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),f.jsx("path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"})]}),K),ip=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),f.jsx("path",{d:"M22 22l-3 -3"}),f.jsx("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),f.jsx("path",{d:"M3 11v-1"}),f.jsx("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),f.jsx("path",{d:"M10 3h1"}),f.jsx("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),K),xT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),f.jsx("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),f.jsx("path",{d:"M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"}),f.jsx("path",{d:"M10 15l2 6l2 -6"}),f.jsx("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),K),yT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),f.jsx("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),f.jsx("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),f.jsx("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),f.jsx("path",{d:"M11 21v-6l3 6v-6"})]}),K),wT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0"}),f.jsx("path",{d:"M4 8l5 0"}),f.jsx("path",{d:"M15 8l4 0"})]}),K),ET=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1"}),f.jsx("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),f.jsx("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),f.jsx("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),f.jsx("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),K),ST=$(f.jsxs("g",{stroke:"currentColor",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4"})]}),{...K,strokeWidth:1.5});$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"}),f.jsx("path",{d:"M21 12h-13l3 -3"}),f.jsx("path",{d:"M11 15l-3 -3"})]}),K);var kT=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z"}),f.jsx("path",{d:"M10 9l5 3l-5 3z"})]}),K),CT=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 6h18"}),f.jsx("path",{d:"M3 12h18"}),f.jsx("path",{d:"M3 18h18"}),f.jsx("path",{d:"M6 3v18"}),f.jsx("path",{d:"M12 3v18"}),f.jsx("path",{d:"M18 3v18"})]}),K),MT=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M17 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),f.jsx("path",{d:"M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),f.jsx("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),K),IT=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M6 18l12 -12"}),f.jsx("path",{d:"M18 10v-4h-4"})]}),K),_T=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),f.jsx("path",{d:"M18 4l3 3l-3 3"})]}),K),TT=$(f.jsxs("g",{children:[f.jsx("path",{d:"M16,12L20,9L16,6"}),f.jsx("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),K),J8=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M6 9l6 6l6 -6"})]}),K),AT=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M6 15l6 -6l6 6"})]}),K),jT=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M6 15l6 -6l6 6"})]}),K),H2=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),f.jsx("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),K),Q8=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),f.jsx("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),f.jsx("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),f.jsx("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),f.jsx("path",{d:"M5 7l0 10"}),f.jsx("path",{d:"M7 5l10 0"}),f.jsx("path",{d:"M7 19l10 0"}),f.jsx("path",{d:"M19 7l0 10"})]}),K),Kd={[it.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},icon:Ao},[it.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.35},icon:Zd},[it["Lilita One"]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15},icon:Z_},[it["Comic Shanns"]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25},icon:C1},[it.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},icon:Ao,deprecated:!0},[it.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},icon:Zd,deprecated:!0,local:!0},[it.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},icon:C1,deprecated:!0},[it["Liberation Sans"]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},serverSide:!0},[Cs.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.15},fallback:!0},[Cs["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},kr={LATIN:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",LATIN_EXT:"U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF",CYRILIC_EXT:"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F",CYRILIC:"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116",VIETNAMESE:"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB"},rp="local:",RT=class extends Error{constructor(e="Couldn't export canvas.",t="CANVAS_ERROR"){super(),this.name=t,this.message=e}},Hu=class extends DOMException{constructor(e="Request Aborted"){super(e,"AbortError")}},_r=class extends Error{constructor(e="Image Scene Data Error",t="IMAGE_SCENE_DATA_ERROR"){super(e),j(this,"code"),this.name="EncodingError",this.code=t}},DT=class extends Error{constructor(){super(...arguments),j(this,"code","ELEMENT_HAS_INVALID_INDEX")}},e7=class extends Error{constructor(e="Worker URL is not defined!",t="WORKER_URL_NOT_DEFINED"){super(e),j(this,"code"),this.name="WorkerUrlNotDefinedError",this.code=t}},t7=class extends Error{constructor(e="Worker has to be in a separate chunk!",t="WORKER_IN_THE_MAIN_CHUNK"){super(e),j(this,"code"),this.name="WorkerInTheMainChunkError",this.code=t}},X2=class extends Error{constructor(e){super(e),this.name="ExcalidrawError"}},LT=class{constructor(e){j(this,"instance"),j(this,"debounceTerminate"),this.instance=new Worker(e,{type:"module"})}},PT=class n7{constructor(t,n){j(this,"idleWorkers",new Set),j(this,"workerUrl"),j(this,"workerTTL"),this.workerUrl=t,this.workerTTL=n.ttl||1e3}static create(t,n={}){if(!t)throw new e7;if(!import.meta.url||t.toString()===import.meta.url)throw new t7;return new n7(t,n)}async postMessage(t,n){let a,i=Array.from(this.idleWorkers).shift();return i?(this.idleWorkers.delete(i),a=i):a=await this.createWorker(),new Promise((r,s)=>{a.instance.onmessage=this.onMessageHandler(a,r),a.instance.onerror=this.onErrorHandler(a,s),a.instance.postMessage(t,n),a.debounceTerminate(()=>s(new Error(`Active worker did not respond for ${this.workerTTL}ms!`)))})}async clear(){for(let t of this.idleWorkers)t.debounceTerminate.cancel(),t.instance.terminate();this.idleWorkers.clear()}async createWorker(){let t=new LT(this.workerUrl);return t.debounceTerminate=Ys(n=>{t.instance.terminate(),this.idleWorkers.has(t)?(this.idleWorkers.delete(t),console.debug("Job finished! Idle worker has been released from the pool.")):n?n():console.error("Worker has been terminated!")},this.workerTTL),t}onMessageHandler(t,n){return a=>{t.debounceTerminate(),this.idleWorkers.add(t),n(a.data)}}onErrorHandler(t,n){return a=>{t.debounceTerminate(()=>n(a)),t.debounceTerminate.flush(),this.clear()}}},W2=typeof Worker<"u",NT=async(e,t)=>{let{Commands:n,subsetToBase64:a,toBase64:i}=await $T();return W2?ar(async()=>{try{let r=await FT(),s=e.slice(0),l=await r.postMessage({command:n.Subset,arrayBuffer:s,codePoints:t},{transfer:[s]});return i(l)}catch(r){return W2=!1,bI()&&(r instanceof e7||r instanceof t7)||console.error("Failed to use workers for subsetting, falling back to the main thread.",r),a(e,t)}}):a(e,t)},oh=null,ch=null,OT=async()=>(oh||(oh=ne(()=>import("./subset-worker.chunk-foHYh0Wd.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)),oh),$T=async()=>(ch||(ch=ne(()=>import("./subset-shared.chunk-DESKTf4i.js"),__vite__mapDeps([1,2,3]),import.meta.url)),ch),dh=null,FT=()=>(dh||(dh=ar(async()=>{let{WorkerUrl:e}=await OT();return PT.create(e)})),dh),a7=class cd{constructor(t,n,a){j(this,"urls"),j(this,"fontFace"),this.urls=cd.createUrls(n);let i=this.urls.map(r=>`url(${r}) ${cd.getFormat(r)}`).join(", ");this.fontFace=new FontFace(t,i,{display:"swap",style:"normal",weight:"400",...a})}toCSS(t){if(!this.getUnicodeRangeRegex().test(t))return;let n=Array.from(t).map(a=>a.codePointAt(0));return this.getContent(n).then(a=>`@font-face { font-family: ${this.fontFace.family}; src: url(${a}); }`)}async getContent(t){let n=0,a=[];for(;n<this.urls.length;){let i=this.urls[n];try{let r=await this.fetchFont(i);return await NT(r,t)}catch(r){a.push(`"${i.toString()}" returned error "${r}"`)}n++}return console.error(`Failed to fetch font family "${this.fontFace.family}"`,JSON.stringify(a,void 0,2)),this.urls.length?this.urls[this.urls.length-1].toString():""}fetchFont(t){return ar(async()=>{let n=await fetch(t,{cache:"force-cache",headers:{Accept:"font/woff2"}});if(!n.ok){let a=t instanceof URL?t.toString():"dataurl";throw new Error(`Failed to fetch "${a}": ${n.statusText}`)}return await n.arrayBuffer()})}getUnicodeRangeRegex(){let t=this.fontFace.unicodeRange.split(/,\s*/).map(n=>{let[a,i]=n.replace("U+","").split("-");return i?`\\u{${a}}-\\u{${i}}`:`\\u{${a}}`}).join("");return new RegExp(`[${t}]`,"u")}static createUrls(t){if(t.startsWith("data"))return[t];if(t.startsWith(rp))return[];if(t.startsWith("http"))return[new URL(t)];let n=t.replace(/^\/+/,""),a=[];if(typeof window.EXCALIDRAW_ASSET_PATH=="string"){let i=this.normalizeBaseUrl(window.EXCALIDRAW_ASSET_PATH);a.push(new URL(n,i))}else Array.isArray(window.EXCALIDRAW_ASSET_PATH)&&window.EXCALIDRAW_ASSET_PATH.forEach(i=>{let r=this.normalizeBaseUrl(i);a.push(new URL(n,r))});return a.push(new URL(n,cd.ASSETS_FALLBACK_URL)),a}static getFormat(t){if(!(t instanceof URL))return"";try{let n=new URL(t).pathname.split(".");return n.length===1?"":`format('${n.pop()}')`}catch{return""}}static normalizeBaseUrl(t){let n=t;return/^\.?\//.test(n)&&(n=new URL(n.replace(/^\.?\/+/,""),window?.location?.origin).toString()),n=`${n.replace(/\/+$/,"")}/`,n}};j(a7,"ASSETS_FALLBACK_URL",`https://esm.sh/${`${be.PKG_NAME}@${be.PKG_VERSION}`}/dist/prod/`);var zT=a7,BT="./fonts/Cascadia/CascadiaCode-Regular.woff2",HT=[{uri:BT}],XT="./fonts/ComicShanns/ComicShanns-Regular-279a7b317d12eb88de06167bd672b4b4.woff2",WT="./fonts/ComicShanns/ComicShanns-Regular-fcb0fc02dcbee4c9846b3e2508668039.woff2",VT="./fonts/ComicShanns/ComicShanns-Regular-dc6a8806fa96795d7b3be5026f989a17.woff2",GT="./fonts/ComicShanns/ComicShanns-Regular-6e066e8de2ac57ea9283adb9c24d7f0c.woff2",YT=[{uri:XT,descriptors:{unicodeRange:"U+20-7e,U+a1-a6,U+a8,U+ab-ac,U+af-b1,U+b4,U+b8,U+bb-bc,U+bf-cf,U+d1-d7,U+d9-de,U+e0-ef,U+f1-f7,U+f9-ff,U+131,U+152-153,U+2c6,U+2da,U+2dc,U+2013-2014,U+2018-201a,U+201c-201d,U+2020-2022,U+2026,U+2039-203a,U+2044,U+20ac,U+2191,U+2193,U+2212"}},{uri:WT,descriptors:{unicodeRange:"U+100-10f,U+112-125,U+128-130,U+134-137,U+139-13c,U+141-148,U+14c-151,U+154-161,U+164-165,U+168-17f,U+1bf,U+1f7,U+218-21b,U+237,U+1e80-1e85,U+1ef2-1ef3,U+a75b"}},{uri:VT,descriptors:{unicodeRange:"U+2c7,U+2d8-2d9,U+2db,U+2dd,U+315,U+2190,U+2192,U+2200,U+2203-2204,U+2264-2265,U+f6c3"}},{uri:GT,descriptors:{unicodeRange:"U+3bb"}}],ZT=[{uri:rp}],KT="./fonts/Excalifont/Excalifont-Regular-a88b72a24fb54c9f94e3b5fdaa7481c9.woff2",qT="./fonts/Excalifont/Excalifont-Regular-be310b9bcd4f1a43f571c46df7809174.woff2",JT="./fonts/Excalifont/Excalifont-Regular-b9dcf9d2e50a1eaf42fc664b50a3fd0d.woff2",QT="./fonts/Excalifont/Excalifont-Regular-41b173a47b57366892116a575a43e2b6.woff2",eA="./fonts/Excalifont/Excalifont-Regular-3f2c5db56cc93c5a6873b1361d730c16.woff2",tA="./fonts/Excalifont/Excalifont-Regular-349fac6ca4700ffec595a7150a0d1e1d.woff2",nA="./fonts/Excalifont/Excalifont-Regular-623ccf21b21ef6b3a0d87738f77eb071.woff2",aA=[{uri:KT,descriptors:{unicodeRange:"U+20-7e,U+a0-a3,U+a5-a6,U+a8-ab,U+ad-b1,U+b4,U+b6-b8,U+ba-ff,U+131,U+152-153,U+2bc,U+2c6,U+2da,U+2dc,U+304,U+308,U+2013-2014,U+2018-201a,U+201c-201e,U+2020,U+2022,U+2024-2026,U+2030,U+2039-203a,U+20ac,U+2122,U+2212"}},{uri:qT,descriptors:{unicodeRange:"U+100-130,U+132-137,U+139-149,U+14c-151,U+154-17e,U+192,U+1fc-1ff,U+218-21b,U+237,U+1e80-1e85,U+1ef2-1ef3,U+2113"}},{uri:JT,descriptors:{unicodeRange:"U+400-45f,U+490-491,U+2116"}},{uri:QT,descriptors:{unicodeRange:"U+37e,U+384-38a,U+38c,U+38e-393,U+395-3a1,U+3a3-3a8,U+3aa-3cf,U+3d7"}},{uri:eA,descriptors:{unicodeRange:"U+2c7,U+2d8-2d9,U+2db,U+2dd,U+302,U+306-307,U+30a-30c,U+326-328,U+212e,U+2211,U+fb01-fb02"}},{uri:tA,descriptors:{unicodeRange:"U+462-463,U+472-475,U+4d8-4d9,U+4e2-4e3,U+4e6-4e9,U+4ee-4ef"}},{uri:nA,descriptors:{unicodeRange:"U+300-301,U+303"}}],iA=[{uri:rp}],rA="./fonts/Liberation/LiberationSans-Regular.woff2",sA=[{uri:rA}],lA="./fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYEF8RXi4EwQ.woff2",oA="./fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYE98RXi4EwSsbg.woff2",cA=[{uri:oA,descriptors:{unicodeRange:kr.LATIN_EXT}},{uri:lA,descriptors:{unicodeRange:kr.LATIN}}],dA="./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTQ3j6zbXWjgeg.woff2",uA="./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTo3j6zbXWjgevT5.woff2",fA="./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTA3j6zbXWjgevT5.woff2",hA="./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTk3j6zbXWjgevT5.woff2",pA="./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTs3j6zbXWjgevT5.woff2",UA=[{uri:hA,descriptors:{unicodeRange:kr.CYRILIC_EXT,weight:"500"}},{uri:fA,descriptors:{unicodeRange:kr.CYRILIC,weight:"500"}},{uri:pA,descriptors:{unicodeRange:kr.VIETNAMESE,weight:"500"}},{uri:uA,descriptors:{unicodeRange:kr.LATIN_EXT,weight:"500"}},{uri:dA,descriptors:{unicodeRange:kr.LATIN,weight:"500"}}],mA="./fonts/Virgil/Virgil-Regular.woff2",gA=[{uri:mA}],bA="./fonts/Xiaolai/Xiaolai-Regular-09850c4077f3fffe707905872e0e2460.woff2",vA="./fonts/Xiaolai/Xiaolai-Regular-7eb9fffd1aa890d07d0f88cc82e6cfe4.woff2",xA="./fonts/Xiaolai/Xiaolai-Regular-60a3089806700d379f11827ee9843b6b.woff2",yA="./fonts/Xiaolai/Xiaolai-Regular-6fe5c5973cc06f74b2387a631ea36b88.woff2",wA="./fonts/Xiaolai/Xiaolai-Regular-b96d9226ce77ec94ceca043d712182e6.woff2",EA="./fonts/Xiaolai/Xiaolai-Regular-6ae5b42180ad70b971c91e7eefb8eba2.woff2",SA="./fonts/Xiaolai/Xiaolai-Regular-a4c34be6d42152e64b0df90bc4607f64.woff2",kA="./fonts/Xiaolai/Xiaolai-Regular-c69f61a4ab18d0488c8d1fc12e7028e8.woff2",CA="./fonts/Xiaolai/Xiaolai-Regular-e3fcf5180fd466c8915c4e8069491054.woff2",MA="./fonts/Xiaolai/Xiaolai-Regular-c1f94158256bb1f3bf665b053d895af9.woff2",IA="./fonts/Xiaolai/Xiaolai-Regular-544fc28abe2c5c30e62383fd4dac255f.woff2",_A="./fonts/Xiaolai/Xiaolai-Regular-7197d6fda6cba7c3874c53d6381ca239.woff2",TA="./fonts/Xiaolai/Xiaolai-Regular-70c2eb8d64e71a42a834eb857ea9df51.woff2",AA="./fonts/Xiaolai/Xiaolai-Regular-069e77aac84590e2e991d0a0176d34f2.woff2",jA="./fonts/Xiaolai/Xiaolai-Regular-41521fade99856108931b4768b1b2648.woff2",RA="./fonts/Xiaolai/Xiaolai-Regular-a004ddfcb26e67bd6e678c8ed19e25ce.woff2",DA="./fonts/Xiaolai/Xiaolai-Regular-04b718e5623574919c8b0dea5f301444.woff2",LA="./fonts/Xiaolai/Xiaolai-Regular-7e4bde7e9c7f84cd34d8a845e384c746.woff2",PA="./fonts/Xiaolai/Xiaolai-Regular-23686f7f29da6e8008c36dd3a80c83d6.woff2",NA="./fonts/Xiaolai/Xiaolai-Regular-69c09cc5fa3e55c74fc4821f76909cc3.woff2",OA="./fonts/Xiaolai/Xiaolai-Regular-25b7f38e18f035f96cb5e547bd2bd08c.woff2",$A="./fonts/Xiaolai/Xiaolai-Regular-ba3de316d63c7e339987b16f41a0b879.woff2",FA="./fonts/Xiaolai/Xiaolai-Regular-12b52b58eb3df36804b9a654ec9ee194.woff2",zA="./fonts/Xiaolai/Xiaolai-Regular-b1220a3c61f85cc0408deedb4c5f57a2.woff2",BA="./fonts/Xiaolai/Xiaolai-Regular-4535823663ad81405188a528d8f2b1a2.woff2",HA="./fonts/Xiaolai/Xiaolai-Regular-3eaa538115d76932653c21d8dc28f207.woff2",XA="./fonts/Xiaolai/Xiaolai-Regular-7e929f262f30c8ee78bf398150b1a7cd.woff2",WA="./fonts/Xiaolai/Xiaolai-Regular-73e309718fd16cea44b4d54a33581811.woff2",VA="./fonts/Xiaolai/Xiaolai-Regular-9eb5a99df4e76ac3363453ac9ca288b1.woff2",GA="./fonts/Xiaolai/Xiaolai-Regular-3e63ed8162808a9e425ed80a8bc79114.woff2",YA="./fonts/Xiaolai/Xiaolai-Regular-cb17fc3db95f6d139afc9d31a8e93293.woff2",ZA="./fonts/Xiaolai/Xiaolai-Regular-c8b71798409ccc126ee264a00aadcf21.woff2",KA="./fonts/Xiaolai/Xiaolai-Regular-11c345711937f0ba4b8f7b6b919c8440.woff2",qA="./fonts/Xiaolai/Xiaolai-Regular-e480d9c614742d05f0e78f274f1e69e6.woff2",JA="./fonts/Xiaolai/Xiaolai-Regular-95429962233afd82db1c27df1500a28c.woff2",QA="./fonts/Xiaolai/Xiaolai-Regular-2cf96d082d35ea3d8106851223ad0d16.woff2",ej="./fonts/Xiaolai/Xiaolai-Regular-2d43040e86ff03ba677f6f9c04cd0805.woff2",tj="./fonts/Xiaolai/Xiaolai-Regular-2a26d20a23b00898ce82f09d2ee47c3f.woff2",nj="./fonts/Xiaolai/Xiaolai-Regular-a365e82ed54697a52f27adcea1315fe8.woff2",aj="./fonts/Xiaolai/Xiaolai-Regular-f5d079153c99a25b9be5b8583c4cc8a7.woff2",ij="./fonts/Xiaolai/Xiaolai-Regular-10a7ae9a371830a80c3d844acf1c02d7.woff2",rj="./fonts/Xiaolai/Xiaolai-Regular-e4bca6cfa53e499cae0a6be4894a90e9.woff2",sj="./fonts/Xiaolai/Xiaolai-Regular-60a41c7e1c68f22424e6d22df544bc82.woff2",lj="./fonts/Xiaolai/Xiaolai-Regular-7ab2bed91166a9dca83a5ebfbe2a7f38.woff2",oj="./fonts/Xiaolai/Xiaolai-Regular-670ba603758d94268e8606f240a42e12.woff2",cj="./fonts/Xiaolai/Xiaolai-Regular-e656f091b9dc4709722c9f4b84d3c797.woff2",dj="./fonts/Xiaolai/Xiaolai-Regular-15dc6d811c9cd078f9086a740d5a1038.woff2",uj="./fonts/Xiaolai/Xiaolai-Regular-f0f13b5c60e0af5553bd359f5513be1b.woff2",fj="./fonts/Xiaolai/Xiaolai-Regular-8c2f33cee3993174f7e87c28e4bf42ee.woff2",hj="./fonts/Xiaolai/Xiaolai-Regular-761d05e3cd968cf574166867998ef06a.woff2",pj="./fonts/Xiaolai/Xiaolai-Regular-642b26e2e5f5fb780b51b593dbc8c851.woff2",Uj="./fonts/Xiaolai/Xiaolai-Regular-5572b3513ba8df57a3d5d7303ee6b11b.woff2",mj="./fonts/Xiaolai/Xiaolai-Regular-3c9de2ae0ea4bc91a510942dfa4be8d2.woff2",gj="./fonts/Xiaolai/Xiaolai-Regular-671a2c20b1eb9e4ef8a192833940e319.woff2",bj="./fonts/Xiaolai/Xiaolai-Regular-4dc6d5f188d5c96d44815cd1e81aa885.woff2",vj="./fonts/Xiaolai/Xiaolai-Regular-ce4884f96f11589608b76b726a755803.woff2",xj="./fonts/Xiaolai/Xiaolai-Regular-8f476c4c99813d57cbe6eca4727388ad.woff2",yj="./fonts/Xiaolai/Xiaolai-Regular-5935a5775af3d5c6307ac667bd9ae74e.woff2",wj="./fonts/Xiaolai/Xiaolai-Regular-79f007c1c6d07557120982951ea67998.woff2",Ej="./fonts/Xiaolai/Xiaolai-Regular-bafff7a14c27403dcc6cf1432e8ea836.woff2",Sj="./fonts/Xiaolai/Xiaolai-Regular-543fa46ace099a7099dad69123399400.woff2",kj="./fonts/Xiaolai/Xiaolai-Regular-4ddc14ed3eb0c3e46364317dfc0144a3.woff2",Cj="./fonts/Xiaolai/Xiaolai-Regular-0fa55a080fcd0f9dc2e0b0058b793df8.woff2",Mj="./fonts/Xiaolai/Xiaolai-Regular-66493ba5a8367f2928812f446f47b56a.woff2",Ij="./fonts/Xiaolai/Xiaolai-Regular-57862b464a55b18c7bf234ce22907d73.woff2",_j="./fonts/Xiaolai/Xiaolai-Regular-8d3bcabb847b56243b16afe62adaaf21.woff2",Tj="./fonts/Xiaolai/Xiaolai-Regular-2b77e8ebfb2367ab2662396a60e7d320.woff2",Aj="./fonts/Xiaolai/Xiaolai-Regular-0b5d723fdc4e249c140f0909e87d03b4.woff2",jj="./fonts/Xiaolai/Xiaolai-Regular-cdbce89e82cc1ab53a2decbf5819278f.woff2",Rj="./fonts/Xiaolai/Xiaolai-Regular-739bc1a567439c7cffcd1614644593d2.woff2",Dj="./fonts/Xiaolai/Xiaolai-Regular-72252d73220fa3cd856677888cee1635.woff2",Lj="./fonts/Xiaolai/Xiaolai-Regular-08e0dc436ad0ad61ba5558db0674d762.woff2",Pj="./fonts/Xiaolai/Xiaolai-Regular-cf6ff4e0f491ca0cf3038187a997b9b4.woff2",Nj="./fonts/Xiaolai/Xiaolai-Regular-9cfb2a77a4e45025105ad29a1748b90d.woff2",Oj="./fonts/Xiaolai/Xiaolai-Regular-450da755d5bcb70906e1295e559b9602.woff2",$j="./fonts/Xiaolai/Xiaolai-Regular-0986d134c05864f5025962eef9f994a0.woff2",Fj="./fonts/Xiaolai/Xiaolai-Regular-1ee544f0f1dac422545c505baa788992.woff2",zj="./fonts/Xiaolai/Xiaolai-Regular-4806e761d750087c2d734fc64596eaff.woff2",Bj="./fonts/Xiaolai/Xiaolai-Regular-33432927cd87d40cfe393c7482bf221f.woff2",Hj="./fonts/Xiaolai/Xiaolai-Regular-be549ab72f0719d606a5c01e2c0219b6.woff2",Xj="./fonts/Xiaolai/Xiaolai-Regular-019d66dcad46dc156b162d267f981c20.woff2",Wj="./fonts/Xiaolai/Xiaolai-Regular-b5c1596551c256e0e9cf02028595b092.woff2",Vj="./fonts/Xiaolai/Xiaolai-Regular-e5f453bb04da18eed01675eeebd88bf8.woff2",Gj="./fonts/Xiaolai/Xiaolai-Regular-cf2cc71752631e579e35b0e423bf2638.woff2",Yj="./fonts/Xiaolai/Xiaolai-Regular-6f3256af8454371776bc46670d33cc65.woff2",Zj="./fonts/Xiaolai/Xiaolai-Regular-23f228f3999c01983860012330e4be08.woff2",Kj="./fonts/Xiaolai/Xiaolai-Regular-21430ee05a1248901da8d0de08744d47.woff2",qj="./fonts/Xiaolai/Xiaolai-Regular-5330a2119a716e4e7224ed108b085dac.woff2",Jj="./fonts/Xiaolai/Xiaolai-Regular-cd145ce4a0ea18469358df53c207bc1b.woff2",Qj="./fonts/Xiaolai/Xiaolai-Regular-36925dfe329a45086cbb7fc5c20d45ac.woff2",eR="./fonts/Xiaolai/Xiaolai-Regular-4bfaa8ffa64c5ee560aa2daba7c9cbd3.woff2",tR="./fonts/Xiaolai/Xiaolai-Regular-112c051027b2d766c19a519f6ee1f4f7.woff2",nR="./fonts/Xiaolai/Xiaolai-Regular-5b0ed6971aaab9c8ad563230bd5471a7.woff2",aR="./fonts/Xiaolai/Xiaolai-Regular-98f2ad84457de7f3740d9920b8fa8667.woff2",iR="./fonts/Xiaolai/Xiaolai-Regular-733171b4ffcd17ea1fe1c0ba627173bf.woff2",rR="./fonts/Xiaolai/Xiaolai-Regular-684d65f1793cac449dde5d59cb3c47fb.woff2",sR="./fonts/Xiaolai/Xiaolai-Regular-cbaaefaaf326668277aa24dfa93c4d28.woff2",lR="./fonts/Xiaolai/Xiaolai-Regular-58fd02350d0bc52cf1ca3bb32ce9766e.woff2",oR="./fonts/Xiaolai/Xiaolai-Regular-7ccce86603f80a099ddb0cb21d4ae3e3.woff2",cR="./fonts/Xiaolai/Xiaolai-Regular-3717077e38f98d89eae729b6c14e56dc.woff2",dR="./fonts/Xiaolai/Xiaolai-Regular-dbea1af6dcd9860be40c3d18254338f5.woff2",uR="./fonts/Xiaolai/Xiaolai-Regular-4a0fdb40036e87b40aa08dd30584cb85.woff2",fR="./fonts/Xiaolai/Xiaolai-Regular-0f626226ba1272e832aea87bafd9720e.woff2",hR="./fonts/Xiaolai/Xiaolai-Regular-938d90c10ff8c20386af7f242c05d6b0.woff2",pR="./fonts/Xiaolai/Xiaolai-Regular-b6d128682ee29e471486354d486a1b90.woff2",UR="./fonts/Xiaolai/Xiaolai-Regular-e51ef413167c6e14e0c0fdcc585f2fc9.woff2",mR="./fonts/Xiaolai/Xiaolai-Regular-9d81066dd2b337c938df6e90380a00dc.woff2",gR="./fonts/Xiaolai/Xiaolai-Regular-20e7bf72fa05de9adf7dbcc7bf51dde6.woff2",bR="./fonts/Xiaolai/Xiaolai-Regular-4095eb84ef3874e2600247bee0b04026.woff2",vR="./fonts/Xiaolai/Xiaolai-Regular-4ee10ae43505e2e0bc62656ced49c0fa.woff2",xR="./fonts/Xiaolai/Xiaolai-Regular-7494dc504ae00ee9cd0505f990f88c5d.woff2",yR="./fonts/Xiaolai/Xiaolai-Regular-8de5b863cb50dfefdd07cb11c774d579.woff2",wR="./fonts/Xiaolai/Xiaolai-Regular-3e1f8f654357353bf0e04ba5c34b5f7f.woff2",ER="./fonts/Xiaolai/Xiaolai-Regular-2e33e8dc771ef5e1d9127d60a6b73679.woff2",SR="./fonts/Xiaolai/Xiaolai-Regular-173945821411c09f70c95f98d590e697.woff2",kR="./fonts/Xiaolai/Xiaolai-Regular-b358f7a51ece39a3247942b1feabdb29.woff2",CR="./fonts/Xiaolai/Xiaolai-Regular-23ad2d71b280f00b1363b95b7bea94eb.woff2",MR="./fonts/Xiaolai/Xiaolai-Regular-5882ffa04f32584d26109137e2da4352.woff2",IR="./fonts/Xiaolai/Xiaolai-Regular-a203b91dad570bf05a58c3c3ddb529bf.woff2",_R="./fonts/Xiaolai/Xiaolai-Regular-bd77e3c7f9e0b072d96af37f73d1aa32.woff2",TR="./fonts/Xiaolai/Xiaolai-Regular-5a45d991244d4c7140217e1e5f5ca4f4.woff2",AR="./fonts/Xiaolai/Xiaolai-Regular-f56414bf9bced67990def8660e306759.woff2",jR="./fonts/Xiaolai/Xiaolai-Regular-583d166e56ba0de4b77eabb47ef67839.woff2",RR="./fonts/Xiaolai/Xiaolai-Regular-7f855356ab893b0d2b9c1c83b8116f0e.woff2",DR="./fonts/Xiaolai/Xiaolai-Regular-b57aaedfd8ebdf3931f25119dc6a5eb2.woff2",LR="./fonts/Xiaolai/Xiaolai-Regular-b6fd38ca30869792244804b04bc058da.woff2",PR="./fonts/Xiaolai/Xiaolai-Regular-452225341522a7942f0f6aab1a5c91a3.woff2",NR="./fonts/Xiaolai/Xiaolai-Regular-866fa7613df6b3fd272bcfd4530c0bb9.woff2",OR="./fonts/Xiaolai/Xiaolai-Regular-52a84a22fd1369bffeaf21da2d6158dc.woff2",$R="./fonts/Xiaolai/Xiaolai-Regular-829615148e6357d826b9242eb7fbbd1e.woff2",FR="./fonts/Xiaolai/Xiaolai-Regular-c99eda15fc26a2941579560f76c3a5cf.woff2",zR="./fonts/Xiaolai/Xiaolai-Regular-395c35dd584b56b0789f58a0559beaf1.woff2",BR="./fonts/Xiaolai/Xiaolai-Regular-203b0e569e3b14aac86a003dc3fa523e.woff2",HR="./fonts/Xiaolai/Xiaolai-Regular-51a0e808bbc8361236ac521a119758a3.woff2",XR="./fonts/Xiaolai/Xiaolai-Regular-6e092f71c1e634059ada0e52abadce67.woff2",WR="./fonts/Xiaolai/Xiaolai-Regular-0f7fb1e0d5015bb1371343153ecf7ce3.woff2",VR="./fonts/Xiaolai/Xiaolai-Regular-d0cf73942fea1c74edbdf0b3011f4656.woff2",GR="./fonts/Xiaolai/Xiaolai-Regular-968cffdc8ee679da094e77ebf50f58ef.woff2",YR="./fonts/Xiaolai/Xiaolai-Regular-7a07ddc0f0c0f5f4a9bad6ee3dda66b5.woff2",ZR="./fonts/Xiaolai/Xiaolai-Regular-ec181b795ac1fb5a50d700b6e996d745.woff2",KR="./fonts/Xiaolai/Xiaolai-Regular-cfb211578629b7e8153b37240de6a9d5.woff2",qR="./fonts/Xiaolai/Xiaolai-Regular-59e9ff77b0efaf684bc09274fb6908c9.woff2",JR="./fonts/Xiaolai/Xiaolai-Regular-2adbc89c11e65905393d3dfc468b9d5b.woff2",QR="./fonts/Xiaolai/Xiaolai-Regular-70e811fd7994e61f408c923de6ddd078.woff2",eD="./fonts/Xiaolai/Xiaolai-Regular-c4a687ac4f0c2766eefc9f77ed99cddf.woff2",tD="./fonts/Xiaolai/Xiaolai-Regular-51502f1206be09c565f1547c406e9558.woff2",nD="./fonts/Xiaolai/Xiaolai-Regular-1fdc0c67ed57263a80fd108c1f6ccf24.woff2",aD="./fonts/Xiaolai/Xiaolai-Regular-e11567fd2accf9957cd0d3c2be937d87.woff2",iD="./fonts/Xiaolai/Xiaolai-Regular-20cc1bbf50e7efb442756cb605672c1f.woff2",rD="./fonts/Xiaolai/Xiaolai-Regular-5d2898fbc097a7e24c6f38d80587621e.woff2",sD="./fonts/Xiaolai/Xiaolai-Regular-ac9ceb44437becc3e9c4dbfebab7fc2d.woff2",lD="./fonts/Xiaolai/Xiaolai-Regular-c16ed9740b85badf16e86ea782a3062f.woff2",oD="./fonts/Xiaolai/Xiaolai-Regular-aa0d470430e6391eca720c7cfa44446f.woff2",cD="./fonts/Xiaolai/Xiaolai-Regular-f2b54d4e7be0eaefe1c2c56836fa5368.woff2",dD="./fonts/Xiaolai/Xiaolai-Regular-99a16ef6a64934d5781933dbd9c46b2e.woff2",uD="./fonts/Xiaolai/Xiaolai-Regular-c40533fdf4cc57177b12803598af7e59.woff2",fD="./fonts/Xiaolai/Xiaolai-Regular-91ddb2969bf2d31ba02ad82998d1314c.woff2",hD="./fonts/Xiaolai/Xiaolai-Regular-774d4f764a1299da5d28ec2f2ffe0d69.woff2",pD="./fonts/Xiaolai/Xiaolai-Regular-7718fe60986d8b42b1be9c5ace5ccf25.woff2",UD="./fonts/Xiaolai/Xiaolai-Regular-aa5c9ca6cf4fba00433b7aa3fa10671a.woff2",mD="./fonts/Xiaolai/Xiaolai-Regular-4f50e5136e136527280bc902c5817561.woff2",gD="./fonts/Xiaolai/Xiaolai-Regular-093b9ef39a46ceae95a1df18a0a3a326.woff2",bD="./fonts/Xiaolai/Xiaolai-Regular-a0ca5df4258213d7fc9fce80f65ce760.woff2",vD="./fonts/Xiaolai/Xiaolai-Regular-d2666cbed13462c5dc36fa2f15c202ca.woff2",xD="./fonts/Xiaolai/Xiaolai-Regular-1e6fd68f1f3902ce48ce8c69df385622.woff2",yD="./fonts/Xiaolai/Xiaolai-Regular-87599f94b6cc129d505b375798d0d751.woff2",wD="./fonts/Xiaolai/Xiaolai-Regular-06c77b8c66e51ed6c63ccb502dd8b8af.woff2",ED="./fonts/Xiaolai/Xiaolai-Regular-13ae07ed2e272d26d59bc0691cd7117a.woff2",SD="./fonts/Xiaolai/Xiaolai-Regular-353f33792a8f60dc69323ddf635a269e.woff2",kD="./fonts/Xiaolai/Xiaolai-Regular-0facdf1ea213ba40261022f5d5ed4493.woff2",CD="./fonts/Xiaolai/Xiaolai-Regular-f8ee5d36068a42b51d0e4a1116cfcec1.woff2",MD="./fonts/Xiaolai/Xiaolai-Regular-79d494361ae093b69e74ee9dbe65bfd4.woff2",ID="./fonts/Xiaolai/Xiaolai-Regular-74e2263a91439c25b91d5132ce9f4d62.woff2",_D="./fonts/Xiaolai/Xiaolai-Regular-ee8bae97908d5147b423f77ad0d3c1bb.woff2",TD="./fonts/Xiaolai/Xiaolai-Regular-56467a5c8840c4d23a60b2f935114848.woff2",AD="./fonts/Xiaolai/Xiaolai-Regular-145aa02cdd91946e67dc934e1acffe75.woff2",jD="./fonts/Xiaolai/Xiaolai-Regular-54acdfc2166ad7fcbd074f75fd4a56ba.woff2",RD="./fonts/Xiaolai/Xiaolai-Regular-29cec36cd205b211da97acabaa62f055.woff2",DD="./fonts/Xiaolai/Xiaolai-Regular-3756e81d3e149cf6099163ee79944fec.woff2",LD="./fonts/Xiaolai/Xiaolai-Regular-8e9f97f01034820170065b2921b4fb5e.woff2",PD="./fonts/Xiaolai/Xiaolai-Regular-13d2887ec8ee73c43acdabc52a05af7b.woff2",ND="./fonts/Xiaolai/Xiaolai-Regular-72536a3d71b694a0d53dd90ddceae41e.woff2",OD="./fonts/Xiaolai/Xiaolai-Regular-603aefd23e350ba7eb124273e3c9bcf1.woff2",$D="./fonts/Xiaolai/Xiaolai-Regular-095c169f3314805276f603a362766abd.woff2",FD="./fonts/Xiaolai/Xiaolai-Regular-9544732d2e62d1a429674f8ee41b5d3a.woff2",zD="./fonts/Xiaolai/Xiaolai-Regular-d3716376641d615e2995605b29bca7b6.woff2",BD="./fonts/Xiaolai/Xiaolai-Regular-5a1ce3117cfe90c48e8fb4a9a00f694d.woff2",HD="./fonts/Xiaolai/Xiaolai-Regular-b7d203b051eff504ff59ddca7576b6a9.woff2",XD="./fonts/Xiaolai/Xiaolai-Regular-4a38cc3e9cf104e69ba246d37f8cf135.woff2",WD="./fonts/Xiaolai/Xiaolai-Regular-982b630266d87db93d2539affb1275c6.woff2",VD="./fonts/Xiaolai/Xiaolai-Regular-9592bfc861f07bcb8d75c196b370e548.woff2",GD="./fonts/Xiaolai/Xiaolai-Regular-a7accba310e821da5505f71c03b76bdb.woff2",YD="./fonts/Xiaolai/Xiaolai-Regular-dac48066b5883d8b4551fc584f0c2a3e.woff2",ZD="./fonts/Xiaolai/Xiaolai-Regular-a1f916d6039285c4ffb900cd654e418f.woff2",KD="./fonts/Xiaolai/Xiaolai-Regular-95bfd249da4902577b4b7d76ebdd0b44.woff2",qD="./fonts/Xiaolai/Xiaolai-Regular-93fc8f28a33234bcadf1527cafabd502.woff2",JD="./fonts/Xiaolai/Xiaolai-Regular-903bb6865f3452e2fda42e3a25547bc5.woff2",QD="./fonts/Xiaolai/Xiaolai-Regular-4aca6a43e59aceee2166b0c7e4e85ef1.woff2",eL="./fonts/Xiaolai/Xiaolai-Regular-24476a126f129212beb33f66853ea151.woff2",tL="./fonts/Xiaolai/Xiaolai-Regular-1b611157cd46bb184d4fa4dae2d6a2b8.woff2",nL="./fonts/Xiaolai/Xiaolai-Regular-56a32a7689abd0326e57c10c6c069bb4.woff2",aL="./fonts/Xiaolai/Xiaolai-Regular-3cc70dbb64df5b21f1326cc24dee2195.woff2",iL="./fonts/Xiaolai/Xiaolai-Regular-f6032fc06eb20480f096199713f70885.woff2",rL="./fonts/Xiaolai/Xiaolai-Regular-e2ead7ea7da0437f085f42ffc05f8d13.woff2",sL="./fonts/Xiaolai/Xiaolai-Regular-97f7f48ce90c9429bf32ae51469db74d.woff2",lL="./fonts/Xiaolai/Xiaolai-Regular-24a21c1e4449222e8d1898d69ff3a404.woff2",oL="./fonts/Xiaolai/Xiaolai-Regular-726303e0774b4e678bff8c2deb6ca603.woff2",cL="./fonts/Xiaolai/Xiaolai-Regular-5a7fac4b8b23a6e4e5ba0c9bf1756c91.woff2",dL="./fonts/Xiaolai/Xiaolai-Regular-2b7441d46298788ac94e610ffcc709b6.woff2",uL=[{uri:bA,descriptors:{unicodeRange:"U+f9b8-fa6d,U+fe32,U+fe45-fe4f,U+ff02-ff0b,U+ff0d-ff1e,U+ff20-ff2a"}},{uri:vA,descriptors:{unicodeRange:"U+20dd-20de,U+25ef,U+ff2b-ffbe,U+ffc2-ffc7,U+ffca-ffcf,U+ffd2-ffd7,U+ffda-ffdc,U+ffe0-ffe6,U+ffe8-ffee"}},{uri:xA,descriptors:{unicodeRange:"U+d7eb-d7fb,U+f900-f9b7"}},{uri:yA,descriptors:{unicodeRange:"U+d6f2-d7a3,U+d7b0-d7c6,U+d7cb-d7ea"}},{uri:wA,descriptors:{unicodeRange:"U+d609-d6f1"}},{uri:EA,descriptors:{unicodeRange:"U+d520-d608"}},{uri:SA,descriptors:{unicodeRange:"U+d437-d51f"}},{uri:kA,descriptors:{unicodeRange:"U+d34e-d436"}},{uri:CA,descriptors:{unicodeRange:"U+d265-d34d"}},{uri:MA,descriptors:{unicodeRange:"U+d17c-d264"}},{uri:IA,descriptors:{unicodeRange:"U+d093-d17b"}},{uri:_A,descriptors:{unicodeRange:"U+cfaa-d092"}},{uri:TA,descriptors:{unicodeRange:"U+cec1-cfa9"}},{uri:AA,descriptors:{unicodeRange:"U+cdd8-cec0"}},{uri:jA,descriptors:{unicodeRange:"U+ccf1-cdd7"}},{uri:RA,descriptors:{unicodeRange:"U+cc08-ccf0"}},{uri:DA,descriptors:{unicodeRange:"U+cb43-cc07"}},{uri:LA,descriptors:{unicodeRange:"U+ca83-cb42"}},{uri:PA,descriptors:{unicodeRange:"U+c9a1-ca82"}},{uri:NA,descriptors:{unicodeRange:"U+c8b8-c9a0"}},{uri:OA,descriptors:{unicodeRange:"U+c7cf-c8b7"}},{uri:$A,descriptors:{unicodeRange:"U+c6e6-c7ce"}},{uri:FA,descriptors:{unicodeRange:"U+c5fd-c6e5"}},{uri:zA,descriptors:{unicodeRange:"U+c514-c5fc"}},{uri:BA,descriptors:{unicodeRange:"U+c42b-c513"}},{uri:HA,descriptors:{unicodeRange:"U+c341-c34e,U+c350-c42a"}},{uri:XA,descriptors:{unicodeRange:"U+c258-c340"}},{uri:WA,descriptors:{unicodeRange:"U+c16f-c257"}},{uri:VA,descriptors:{unicodeRange:"U+c086-c16e"}},{uri:GA,descriptors:{unicodeRange:"U+bf9d-c085"}},{uri:YA,descriptors:{unicodeRange:"U+beb4-bf9c"}},{uri:ZA,descriptors:{unicodeRange:"U+bdcb-beb3"}},{uri:KA,descriptors:{unicodeRange:"U+bce2-bdca"}},{uri:qA,descriptors:{unicodeRange:"U+bbf9-bce1"}},{uri:JA,descriptors:{unicodeRange:"U+bb10-bbf8"}},{uri:QA,descriptors:{unicodeRange:"U+ba27-bb0f"}},{uri:ej,descriptors:{unicodeRange:"U+b93e-ba26"}},{uri:tj,descriptors:{unicodeRange:"U+b855-b93d"}},{uri:nj,descriptors:{unicodeRange:"U+b76c-b854"}},{uri:aj,descriptors:{unicodeRange:"U+b683-b76b"}},{uri:ij,descriptors:{unicodeRange:"U+b59a-b682"}},{uri:rj,descriptors:{unicodeRange:"U+b4b1-b599"}},{uri:sj,descriptors:{unicodeRange:"U+11fb-11ff,U+b3cd-b4b0"}},{uri:lj,descriptors:{unicodeRange:"U+11e6-11fa,U+b2f9-b3cc"}},{uri:oj,descriptors:{unicodeRange:"U+11d1-11e5,U+b225-b2f8"}},{uri:cj,descriptors:{unicodeRange:"U+11bc-11d0,U+b151-b224"}},{uri:dj,descriptors:{unicodeRange:"U+11a7-11bb,U+b07d-b150"}},{uri:uj,descriptors:{unicodeRange:"U+1191-11a6,U+afaa-b07c"}},{uri:fj,descriptors:{unicodeRange:"U+117c-1190,U+aed6-afa9"}},{uri:hj,descriptors:{unicodeRange:"U+1167-117b,U+ae02-aed5"}},{uri:pj,descriptors:{unicodeRange:"U+1152-115e,U+1160-1166,U+ad2d-ae01"}},{uri:Uj,descriptors:{unicodeRange:"U+113d-1151,U+ac59-ad2c"}},{uri:mj,descriptors:{unicodeRange:"U+1100-113c,U+9f95-9f98,U+9f9c-9f9e,U+9fa1-9fce,U+9fd0,U+a960-a97c,U+ac00-ac58"}},{uri:gj,descriptors:{unicodeRange:"U+9771-9772,U+9775,U+9777-977b,U+977d-9784,U+9786-978a,U+978c,U+978e-9790,U+9793,U+9795-9797,U+9799-979f,U+97a1-97a2,U+97a4-97aa,U+97ac,U+97ae,U+97b0-97b1,U+97b3,U+97b5-97e5,U+97e8,U+97ee-97f2,U+97f4,U+97f7-982d"}},{uri:bj,descriptors:{unicodeRange:"U+9491,U+9496,U+9498,U+94c7,U+94cf,U+94d3-94d4,U+94da,U+94e6,U+94fb,U+951c,U+9520,U+9527,U+9533,U+953d,U+9543,U+9548,U+954b,U+9555,U+955a,U+9560,U+956e,U+9574-9575,U+9577-957e,U+9580-95e7,U+95ec,U+95ff,U+9607,U+9613,U+9618,U+961b,U+961e,U+9620,U+9623-9629,U+962b-962d,U+962f-9630,U+9637-963a,U+963e,U+9641,U+9643,U+964a,U+964e-964f,U+9651-9653,U+9656-965a,U+965c-965e,U+9660,U+9663,U+9665-9666,U+966b,U+966d-9671,U+9673,U+9678-9684,U+9687,U+9689-968a,U+968c,U+968e,U+9691-9693"}},{uri:vj,descriptors:{unicodeRange:"U+923c-9273,U+9275-928d,U+928f-92ad,U+92af-92c7,U+92c9-92ee"}},{uri:xj,descriptors:{unicodeRange:"U+9159,U+915b-915c,U+915f-9160,U+9166-9168,U+916b,U+916d,U+9173,U+917a-917c,U+9180-9184,U+9186,U+9188,U+918a,U+918e-918f,U+9193-9199,U+919c-91a1,U+91a4-91a9,U+91ab-91ac,U+91b0-91b3,U+91b6-91b9,U+91bb-91c6,U+91c8,U+91cb,U+91d0,U+91d2-91db,U+91dd-923b"}},{uri:yj,descriptors:{unicodeRange:"U+902b-902c,U+9030-9034,U+9037,U+9039-903a,U+903d,U+903f-9040,U+9043,U+9045-9046,U+9048-904c,U+904e,U+9054-9056,U+9059-905a,U+905c-9061,U+9064,U+9066-9067,U+9069-906c,U+906f-9073,U+9076-907c,U+907e,U+9081,U+9084-9087,U+9089-908a,U+908c-9090,U+9092,U+9094,U+9096,U+9098,U+909a,U+909c,U+909e-90a0,U+90a4-90a5,U+90a7-90a9,U+90ab,U+90ad,U+90b2,U+90b7,U+90bc-90bd,U+90bf-90c0,U+90c2-90c3,U+90c6,U+90c8-90c9,U+90cb-90cd,U+90d2,U+90d4-90d6,U+90d8-90da,U+90de-90e0,U+90e3-90e5,U+90e9-90ea,U+90ec,U+90ee,U+90f0-90f3,U+90f5-90f7,U+90f9-90fc,U+90ff-9101,U+9103,U+9105-9118,U+911a-911d,U+911f-9121,U+9124-912e,U+9130,U+9132-9138,U+913a-9142,U+9144-9145,U+9147-9148,U+9151,U+9153-9156,U+9158"}},{uri:wj,descriptors:{unicodeRange:"U+8f03-8f65,U+8f6a,U+8f80,U+8f8c,U+8f92,U+8f9d,U+8fa0-8fa2,U+8fa4-8fa7,U+8faa,U+8fac-8faf,U+8fb2-8fb5,U+8fb7-8fb8,U+8fba-8fbc,U+8fbf-8fc0,U+8fc3,U+8fc6,U+8fc9-8fcd,U+8fcf,U+8fd2,U+8fd6-8fd7,U+8fda,U+8fe0-8fe1,U+8fe3,U+8fe7,U+8fec,U+8fef,U+8ff1-8ff2,U+8ff4-8ff6,U+8ffa-8ffc,U+8ffe-8fff,U+9007-9008,U+900c,U+900e,U+9013,U+9015,U+9018-9019,U+901c,U+9023-9025,U+9027-902a"}},{uri:Ej,descriptors:{unicodeRange:"U+8d03-8d1c,U+8d20,U+8d51-8d52,U+8d57,U+8d5f,U+8d65,U+8d68-8d6a,U+8d6c,U+8d6e-8d6f,U+8d71-8d72,U+8d78-8d80,U+8d82-8d83,U+8d86-8d89,U+8d8c-8d90,U+8d92-8d93,U+8d95-8d9e,U+8da0-8da2,U+8da4-8db0,U+8db2,U+8db6-8db7,U+8db9,U+8dbb,U+8dbd,U+8dc0-8dc2,U+8dc5,U+8dc7-8dca,U+8dcd,U+8dd0,U+8dd2-8dd5,U+8dd8-8dd9,U+8ddc,U+8de0-8de2,U+8de5-8de7,U+8de9,U+8ded-8dee,U+8df0-8df2,U+8df4,U+8df6,U+8dfc,U+8dfe-8e04,U+8e06-8e08,U+8e0b,U+8e0d-8e0e,U+8e10-8e13,U+8e15-8e1c,U+8e20-8e21,U+8e24-8e28,U+8e2b,U+8e2d,U+8e30,U+8e32-8e34,U+8e36-8e38,U+8e3b-8e3c,U+8e3e-8e3f,U+8e43,U+8e45-8e46"}},{uri:Sj,descriptors:{unicodeRange:"U+8bea,U+8c09,U+8c1e,U+8c38-8c40,U+8c42-8c45,U+8c48,U+8c4a-8c4b,U+8c4d-8c54,U+8c56-8c59,U+8c5b-8c60,U+8c63-8c69,U+8c6c-8c72,U+8c74-8c77,U+8c7b-8c81,U+8c83-8c84,U+8c86-8c88,U+8c8b,U+8c8d-8c93,U+8c95-8c97,U+8c99-8d02"}},{uri:kj,descriptors:{unicodeRange:"U+8a64-8a78,U+8a7a-8a88,U+8a8b-8a92,U+8a94-8b06,U+8b08-8b1b"}},{uri:Cj,descriptors:{unicodeRange:"U+8987-89c0,U+89c3,U+89cd,U+89d3-89d5,U+89d7-89d9,U+89db,U+89dd,U+89df-89e2,U+89e4,U+89e7-89ea,U+89ec-89ee,U+89f0-89f2,U+89f4-89ff,U+8a01-8a06,U+8a08-8a3d,U+8a3f-8a47,U+8a49-8a63"}},{uri:Mj,descriptors:{unicodeRange:"U+87e3-87e4,U+87e6-87e9,U+87eb-87ed,U+87ef-87f8,U+87fa-87fd,U+87ff-8802,U+8804-8809,U+880b-8812,U+8814,U+8817-881a,U+881c-8820,U+8823-8831,U+8833-8838,U+883a-883b,U+883d-883f,U+8841-8843,U+8846-884b,U+884e-8853,U+8855-8856,U+8858,U+885a-8860,U+8866-8867,U+886a,U+886d,U+886f,U+8871,U+8873-8876,U+8878-887c,U+8880,U+8883,U+8886-8887,U+8889-888a,U+888c,U+888e-8891,U+8893-8895,U+8897-889b,U+889d-88a1,U+88a3,U+88a5-88aa,U+88ac,U+88ae-88b0,U+88b2-88b6,U+88b8-88bb"}},{uri:Ij,descriptors:{unicodeRange:"U+86e7-86e8,U+86ea-86ec,U+86ef,U+86f5-86f7,U+86fa-86fd,U+86ff,U+8701,U+8704-8706,U+870b-870c,U+870e-8711,U+8714,U+8716,U+8719,U+871b,U+871d,U+871f-8720,U+8724,U+8726-8728,U+872a-872d,U+872f-8730,U+8732-8733,U+8735-8736,U+8738-873a,U+873c-873d,U+8740-8746,U+874a-874b,U+874d,U+874f-8752,U+8754-8756,U+8758,U+875a-875f,U+8761-8762,U+8766-876d,U+876f,U+8771-8773,U+8775,U+8777-877a,U+877f-8781,U+8784,U+8786-8787,U+8789-878a,U+878c,U+878e-8792,U+8794-8796,U+8798-879e,U+87a0-87a7,U+87a9-87aa,U+87ae,U+87b0-87b2,U+87b4,U+87b6-87b9,U+87bb-87bc,U+87be-87bf,U+87c1-87c5,U+87c7-87c9,U+87cc-87d0,U+87d4-87da,U+87dc-87df,U+87e1-87e2"}},{uri:_j,descriptors:{unicodeRange:"U+8604,U+8606-8610,U+8612-8615,U+8617-8626,U+8628,U+862a-8637,U+8639-863b,U+863d-864c,U+8652-8653,U+8655-8659,U+865b-865d,U+865f-8661,U+8663-866a,U+866d,U+866f-8670,U+8672-8678,U+8683-8689,U+868e-8692,U+8694,U+8696-869b,U+869e-86a2,U+86a5-86a6,U+86ab,U+86ad-86ae,U+86b2-86b3,U+86b7-86b9,U+86bb-86bf,U+86c1-86c3,U+86c5,U+86c8,U+86cc-86cd,U+86d2-86d3,U+86d5-86d7,U+86da,U+86dc-86dd,U+86e0-86e3,U+86e5-86e6"}},{uri:Tj,descriptors:{unicodeRange:"U+8456,U+8458,U+845d-8460,U+8462,U+8464-8468,U+846a,U+846e-8470,U+8472,U+8474,U+8477,U+8479,U+847b-8481,U+8483-8486,U+848a,U+848d,U+848f-8496,U+8498,U+849a-849b,U+849d-84a0,U+84a2-84ae,U+84b0-84b1,U+84b3,U+84b5-84b7,U+84bb-84bc,U+84be,U+84c0,U+84c2-84c3,U+84c5-84c8,U+84cb-84cc,U+84ce-84cf,U+84d2,U+84d4-84d5,U+84d7-84dc,U+84de,U+84e1-84e2,U+84e4,U+84e7-84eb,U+84ed-84ef,U+84f1-84fb,U+84fd-84fe,U+8500-850b,U+850d-8510,U+8512,U+8514-8516,U+8518-8519,U+851b-851e,U+8520,U+8522-852a,U+852d-8536,U+853e-8542,U+8544-8547,U+854b-854f"}},{uri:Aj,descriptors:{unicodeRange:"U+82c2-82c3,U+82c5-82c6,U+82c9,U+82d0,U+82d6,U+82d9-82da,U+82dd,U+82e2,U+82e7-82ea,U+82ec-82ee,U+82f0,U+82f2-82f3,U+82f5-82f6,U+82f8,U+82fa,U+82fc-8300,U+830a-830b,U+830d,U+8310,U+8312-8313,U+8316,U+8318-8319,U+831d-8326,U+8329-832a,U+832e,U+8330,U+8332,U+8337,U+833b,U+833d-833f,U+8341-8342,U+8344-8345,U+8348,U+834a-834e,U+8353,U+8355-8359,U+835d,U+8362,U+8370-8376,U+8379-837a,U+837e-8384,U+8387-8388,U+838a-838d,U+838f-8391,U+8394-8397,U+8399-839a,U+839d,U+839f,U+83a1-83a7,U+83ac-83af,U+83b5,U+83bb,U+83be-83bf,U+83c2-83c4,U+83c6,U+83c8-83c9,U+83cb,U+83cd-83ce,U+83d0-83d3,U+83d5,U+83d7,U+83d9-83db,U+83de,U+83e2-83e4,U+83e6-83e8,U+83eb-83ef,U+83f3-83f7,U+83fa-83fc,U+83fe-8400,U+8402,U+8405,U+8407-840a,U+8410,U+8412-8417,U+8419-841b,U+841e-8423,U+8429-8430,U+8432-8437,U+8439-843b,U+843e-8445,U+8447-8450,U+8452-8455"}},{uri:jj,descriptors:{unicodeRange:"U+81a4-81a5,U+81a7,U+81a9,U+81ab-81b2,U+81b4-81b9,U+81bc-81bf,U+81c4-81c5,U+81c7-81c9,U+81cb,U+81cd-81e2,U+81e4-81e6,U+81e8-81e9,U+81eb,U+81ee-81f2,U+81f5-81fa,U+81fd,U+81ff,U+8203,U+8207-820b,U+820e-820f,U+8211,U+8213,U+8215-821a,U+821d,U+8220,U+8224-8227,U+8229,U+822e,U+8232,U+823a,U+823c-823d,U+823f-8243,U+8245-8246,U+8248,U+824a,U+824c-824e,U+8250-8257,U+8259,U+825b-825e,U+8260-8267,U+8269-826d,U+8271,U+8275-8278,U+827b-827c,U+8280-8281,U+8283,U+8285-8287,U+8289,U+828c,U+8290,U+8293-8296,U+829a-829b,U+829e,U+82a0,U+82a2-82a3,U+82a7,U+82b2,U+82b5-82b6,U+82ba-82bc,U+82bf-82c0"}},{uri:Rj,descriptors:{unicodeRange:"U+8059,U+805b-8068,U+806b-8070,U+8072-807e,U+8081-8082,U+8085,U+8088,U+808a,U+808d-8092,U+8094-8095,U+8097,U+8099,U+809e,U+80a3,U+80a6-80a8,U+80ac,U+80b0,U+80b3,U+80b5-80b6,U+80b8-80b9,U+80bb,U+80c5,U+80c7-80cb,U+80cf-80d5,U+80d8,U+80df-80e0,U+80e2-80e3,U+80e6,U+80ee,U+80f5,U+80f7,U+80f9,U+80fb,U+80fe-8101,U+8103-8105,U+8107-8108,U+810b-810c,U+8115,U+8117,U+8119,U+811b-811d,U+811f-812b,U+812d-812e,U+8130,U+8133-8135,U+8137,U+8139-813d,U+813f-8145,U+8147,U+8149,U+814d-814f,U+8152,U+8156-8158,U+815b-815f,U+8161-8164,U+8166,U+8168,U+816a-816c,U+816f,U+8172-8173,U+8175-8178,U+8181,U+8183-8187,U+8189,U+818b-818e,U+8190,U+8192-8197,U+8199-819a,U+819e-81a2"}},{uri:Dj,descriptors:{unicodeRange:"U+7f3c-7f41,U+7f43,U+7f46-7f4f,U+7f52-7f53,U+7f56,U+7f59,U+7f5b-7f5e,U+7f60,U+7f63-7f67,U+7f6b-7f6d,U+7f6f-7f70,U+7f73,U+7f75-7f78,U+7f7a-7f7d,U+7f7f-7f80,U+7f82-7f89,U+7f8b,U+7f8d,U+7f8f-7f93,U+7f95-7f99,U+7f9b-7f9c,U+7fa0,U+7fa2-7fa3,U+7fa5-7fa6,U+7fa8-7fae,U+7fb1,U+7fb3-7fb7,U+7fba-7fbb,U+7fbe,U+7fc0,U+7fc2-7fc4,U+7fc6-7fc9,U+7fcb,U+7fcd,U+7fcf-7fd3,U+7fd6-7fd7,U+7fd9-7fde,U+7fe2-7fe4,U+7fe7-7fe8,U+7fea-7fed,U+7fef,U+7ff2,U+7ff4-7ffa,U+7ffd-7fff,U+8002,U+8007-800a,U+800e-800f,U+8011,U+8013,U+801a-801b,U+801d-801f,U+8021,U+8023-8024,U+802b-8030,U+8032,U+8034,U+8039-803a,U+803c,U+803e,U+8040-8041,U+8044-8045,U+8047-8049,U+804e-8051,U+8053,U+8055-8057"}},{uri:Lj,descriptors:{unicodeRange:"U+7cd8,U+7cda-7cdb,U+7cdd-7cde,U+7ce1-7ce7,U+7ce9-7cee,U+7cf0-7cf7,U+7cf9-7cfa,U+7cfc-7d09,U+7d0b-7d1f,U+7d21,U+7d23-7d26,U+7d28-7d2a,U+7d2c-7d2e,U+7d30-7d6d,U+7d6f-7d76,U+7d78-7d94"}},{uri:Pj,descriptors:{unicodeRange:"U+7afe,U+7b00-7b02,U+7b05,U+7b07,U+7b09,U+7b0c-7b0e,U+7b10,U+7b12-7b13,U+7b16-7b18,U+7b1a,U+7b1c-7b1d,U+7b1f,U+7b21-7b23,U+7b27,U+7b29,U+7b2d,U+7b2f-7b30,U+7b32,U+7b34-7b37,U+7b39,U+7b3b,U+7b3d,U+7b3f-7b44,U+7b46,U+7b48,U+7b4a,U+7b4d-7b4e,U+7b53,U+7b55,U+7b57,U+7b59,U+7b5c,U+7b5e-7b5f,U+7b61,U+7b63-7b6d,U+7b6f-7b70,U+7b73-7b74,U+7b76,U+7b78,U+7b7a,U+7b7c-7b7d,U+7b7f,U+7b81-7b84,U+7b86-7b8c,U+7b8e-7b8f,U+7b91-7b93,U+7b96,U+7b98-7b9b,U+7b9e-7ba0,U+7ba3-7ba5,U+7bae-7bb0,U+7bb2-7bb3,U+7bb5-7bb7,U+7bb9-7bc0,U+7bc2-7bc5,U+7bc8-7bcb,U+7bcd-7bd0,U+7bd2,U+7bd4-7bd8,U+7bdb-7bdc,U+7bde-7be0,U+7be2-7be4,U+7be7-7be9,U+7beb-7bed,U+7bef-7bf0,U+7bf2-7bf6,U+7bf8-7bfb,U+7bfd,U+7bff-7c06,U+7c08-7c0a,U+7c0d-7c0e,U+7c10-7c13"}},{uri:Nj,descriptors:{unicodeRange:"U+7a10-7a13,U+7a15-7a16,U+7a18-7a19,U+7a1b-7a1d,U+7a1f,U+7a21-7a22,U+7a24-7a32,U+7a34-7a36,U+7a38,U+7a3a,U+7a3e,U+7a40-7a45,U+7a47-7a50,U+7a52-7a56,U+7a58-7a6f,U+7a71-7a73,U+7a75,U+7a7b-7a7e,U+7a82,U+7a85,U+7a87,U+7a89-7a8c,U+7a8e-7a90,U+7a93-7a94,U+7a99-7a9b,U+7a9e,U+7aa1-7aa4,U+7aa7,U+7aa9-7aab,U+7aae-7ab2,U+7ab4-7abe,U+7ac0-7aca,U+7acc-7ad5,U+7ad7-7ad8,U+7ada-7add,U+7ae1-7ae2,U+7ae4,U+7ae7-7aec,U+7aee,U+7af0-7af8,U+7afb-7afc"}},{uri:Oj,descriptors:{unicodeRange:"U+790d-7912,U+7914-791d,U+791f-7923,U+7925-7933,U+7935-7939,U+793d,U+793f,U+7942-7945,U+7947,U+794a-7952,U+7954-7955,U+7958-7959,U+7961,U+7963-7964,U+7966,U+7969-796c,U+796e,U+7970-7976,U+7979,U+797b-797f,U+7982-7983,U+7986-7989,U+798b-798e,U+7990-7999,U+799b-79a6,U+79a8-79b2,U+79b4-79b8,U+79bc,U+79bf,U+79c2,U+79c4-79c5,U+79c7-79c8,U+79ca,U+79cc,U+79ce-79d0,U+79d3-79d4,U+79d6-79d7,U+79d9-79de,U+79e0-79e2,U+79e5,U+79e8,U+79ea,U+79ec,U+79ee,U+79f1-79f7,U+79f9-79fa,U+79fc,U+79fe-79ff,U+7a01,U+7a04-7a05,U+7a07-7a0a,U+7a0c,U+7a0f"}},{uri:$j,descriptors:{unicodeRange:"U+77d8-77da,U+77dd-77e1,U+77e4,U+77e6,U+77e8,U+77ea,U+77ef-77f2,U+77f4-77f5,U+77f7,U+77f9-77fc,U+7803-7808,U+780a-780b,U+780e-7810,U+7813,U+7815,U+7819,U+781b,U+781e,U+7820-7822,U+7824,U+7828,U+782a-782b,U+782e-782f,U+7831-7833,U+7835-7836,U+783d,U+783f,U+7841-7844,U+7846,U+7848-784b,U+784d,U+784f,U+7851,U+7853-7854,U+7858-785c,U+785e-7869,U+786f-7876,U+7878-787b,U+787d-7886,U+7888,U+788a-788b,U+788f-7890,U+7892,U+7894-7896,U+7899,U+789d-789e,U+78a0,U+78a2,U+78a4,U+78a6,U+78a8-78af,U+78b5-78b8,U+78ba-78bd,U+78bf-78c0,U+78c2-78c4,U+78c6-78c8,U+78cc-78cf,U+78d1-78d3,U+78d6-78d8,U+78da-78e7,U+78e9-78eb,U+78ed-78f1,U+78f3,U+78f5-78f6,U+78f8-78f9,U+78fb-7900,U+7902-7904,U+7906-790c"}},{uri:Fj,descriptors:{unicodeRange:"U+76af-76b0,U+76b3,U+76b5-76be,U+76c0-76c1,U+76c3-76c4,U+76c7,U+76c9,U+76cb-76cc,U+76d3,U+76d5,U+76d9-76da,U+76dc-76de,U+76e0-76e4,U+76e6-76ed,U+76f0,U+76f3,U+76f5-76f7,U+76fa-76fb,U+76fd,U+76ff-7703,U+7705-7706,U+770a,U+770c,U+770e-7718,U+771b-771e,U+7721,U+7723-7725,U+7727,U+772a-772c,U+772e,U+7730-7734,U+7739,U+773b,U+773d-773f,U+7742,U+7744-7746,U+7748-774f,U+7752-7759,U+775c-7760,U+7764,U+7767,U+7769-776a,U+776d-7778,U+777a-777c,U+7781-7783,U+7786-778b,U+778f-7790,U+7793-779e,U+77a1,U+77a3-77a4,U+77a6,U+77a8,U+77ab,U+77ad-77af,U+77b1-77b2,U+77b4,U+77b6-77ba,U+77bc,U+77be,U+77c0-77cc,U+77ce-77d6"}},{uri:zj,descriptors:{unicodeRange:"U+7589-758a,U+758c-758e,U+7590,U+7593,U+7595,U+7598,U+759b-759c,U+759e,U+75a2,U+75a6-75aa,U+75ad,U+75b6-75b7,U+75ba-75bb,U+75bf-75c1,U+75c6,U+75cb-75cc,U+75ce-75d1,U+75d3,U+75d7,U+75d9-75da,U+75dc-75dd,U+75df-75e1,U+75e5,U+75e9,U+75ec-75ef,U+75f2-75f3,U+75f5-75f8,U+75fa-75fb,U+75fd-75fe,U+7602,U+7604,U+7606-7609,U+760b,U+760d-760f,U+7611-7614,U+7616,U+761a,U+761c-761e,U+7621,U+7623,U+7627-7628,U+762c,U+762e-762f,U+7631-7632,U+7636-7637,U+7639-763b,U+763d,U+7641-7642,U+7644-764b,U+764e-7653,U+7655,U+7657-765b,U+765d,U+765f-7662,U+7664-766a,U+766c-766e,U+7670-7677,U+7679-767a,U+767c,U+767f-7681,U+7683,U+7685,U+7689-768a,U+768c-768d,U+768f-7690,U+7692,U+7694-7695,U+7697-7698,U+769a-76a3,U+76a5-76ad"}},{uri:Bj,descriptors:{unicodeRange:"U+7492-749b,U+749d,U+749f-74a6,U+74aa-74b9,U+74bb-74d1,U+74d3-74db,U+74dd,U+74df,U+74e1,U+74e5,U+74e7-74ed,U+74f0-74f3,U+74f5,U+74f8-74fe,U+7500-7503,U+7505-750c,U+750e,U+7510,U+7512,U+7514-7517,U+751b,U+751d-751e,U+7520-7524,U+7526-7527,U+752a,U+752e,U+7534,U+7536,U+7539,U+753c-753d,U+753f,U+7541-7544,U+7546-7547,U+7549-754a,U+754d,U+7550-7553,U+7555-7558,U+755d-7564,U+7567-7569,U+756b-7571,U+7573,U+7575-7577,U+757a-757e,U+7580-7582,U+7584-7585,U+7587-7588"}},{uri:Hj,descriptors:{unicodeRange:"U+7372-737d,U+737f-7383,U+7385-7386,U+7388,U+738a,U+738c-738d,U+738f-7390,U+7392-7395,U+7397-739a,U+739c-739e,U+73a0-73a1,U+73a3-73a8,U+73aa,U+73ac-73ad,U+73b1,U+73b4-73b6,U+73b8-73b9,U+73bc-73bf,U+73c1,U+73c3-73c7,U+73cb-73cc,U+73ce,U+73d2-73d8,U+73da-73dd,U+73df,U+73e1-73e4,U+73e6,U+73e8,U+73ea-73ec,U+73ee-73f1,U+73f3-7402,U+7404,U+7407-7408,U+740b-740e,U+7411-7419,U+741c-7421,U+7423-7424,U+7427,U+7429,U+742b,U+742d,U+742f,U+7431-7432,U+7437-743b,U+743d-7440,U+7442-7454,U+7456,U+7458,U+745d,U+7460-746c,U+746e-746f,U+7471-7475,U+7478-747d,U+747f,U+7482,U+7484-7486,U+7488-748a,U+748c-748d,U+748f,U+7491"}},{uri:Xj,descriptors:{unicodeRange:"U+7054-705d,U+705f-706a,U+706e,U+7071-7074,U+7077,U+7079-707b,U+707d,U+7081-7084,U+7086-7088,U+708b-708d,U+708f-7091,U+7093,U+7097-7098,U+709a-709b,U+709e-70aa,U+70b0,U+70b2,U+70b4-70b6,U+70ba,U+70be-70bf,U+70c4-70c7,U+70c9,U+70cb-70d7,U+70da,U+70dc-70de,U+70e0-70e3,U+70e5,U+70ea,U+70ee,U+70f0-70f6,U+70f8,U+70fa-70fc,U+70fe-7108,U+710b-710f,U+7111-7112,U+7114,U+7117,U+711b-7125,U+7127-712e,U+7132-7135,U+7137-7144,U+7146-7149,U+714b,U+714d,U+714f-715b,U+715d,U+715f-7163,U+7165,U+7169-716d,U+716f-7171,U+7174-7177"}},{uri:Wj,descriptors:{unicodeRange:"U+722e-722f,U+7232-7234,U+723a,U+723c,U+723e,U+7240-7246,U+7249-724b,U+724e-7251,U+7253-7255,U+7257-7258,U+725a,U+725c,U+725e,U+7260,U+7263-7265,U+7268,U+726a-726d,U+7270-7271,U+7273-7274,U+7276-7278,U+727b-727d,U+7282-7283,U+7285-7289,U+728c,U+728e,U+7290-7291,U+7293-729e,U+72a0-72ab,U+72ae,U+72b1-72b3,U+72b5,U+72ba-72c0,U+72c5-72c7,U+72c9-72cc,U+72cf,U+72d1,U+72d3-72d6,U+72d8,U+72da-72dd,U+72df,U+72e2-72e7,U+72ea-72eb,U+72f5-72f6,U+72f9,U+72fd-7300,U+7302,U+7304-7309,U+730b-730d,U+730f-7312,U+7314,U+7318-731a,U+731f-7320,U+7323-7324,U+7326-7328,U+732d,U+732f-7330,U+7332-7333,U+7335-7336,U+733a-733d,U+7340-734c,U+734e-734f,U+7351,U+7353-7356,U+7358-735f,U+7361-736b,U+736e,U+7370-7371"}},{uri:Vj,descriptors:{unicodeRange:"U+6ec5-6ec6,U+6ec8-6eca,U+6ecc-6ece,U+6ed0,U+6ed2,U+6ed6,U+6ed8-6ed9,U+6edb-6edd,U+6ee3,U+6ee7,U+6eea-6ef3,U+6ef5-6ef8,U+6efa-6f01,U+6f03-6f05,U+6f07-6f08,U+6f0a-6f0e,U+6f10-6f12,U+6f16-6f1f,U+6f21-6f23,U+6f25-6f28,U+6f2c,U+6f2e,U+6f30,U+6f32,U+6f34-6f35,U+6f37-6f3d,U+6f3f-6f45,U+6f48-6f4a,U+6f4c,U+6f4e-6f57,U+6f59-6f5b,U+6f5d,U+6f5f-6f61,U+6f63-6f65,U+6f67-6f6c,U+6f6f-6f71,U+6f73,U+6f75-6f77,U+6f79,U+6f7b,U+6f7d-6f83,U+6f85-6f87,U+6f8a-6f8b,U+6f8f-6f9b,U+6f9d-6fa0,U+6fa2-6fa6,U+6fa8-6fb1"}},{uri:Gj,descriptors:{unicodeRange:"U+6d73,U+6d75-6d76,U+6d79-6d7b,U+6d7d-6d81,U+6d83-6d84,U+6d86-6d87,U+6d8a-6d8b,U+6d8d,U+6d8f-6d90,U+6d92,U+6d96-6d9a,U+6d9c,U+6da2,U+6da5,U+6dac-6dad,U+6db0-6db1,U+6db3-6db4,U+6db6-6db7,U+6db9-6dbe,U+6dc1-6dc3,U+6dc8-6dca,U+6dcd-6dd0,U+6dd2-6dd5,U+6dd7,U+6dda-6ddc,U+6ddf,U+6de2-6de3,U+6de5,U+6de7-6dea,U+6ded,U+6def-6df0,U+6df2,U+6df4-6df6,U+6df8,U+6dfa,U+6dfd-6e04,U+6e06-6e09,U+6e0b,U+6e0f,U+6e12-6e13,U+6e15,U+6e18-6e19,U+6e1b-6e1c,U+6e1e-6e1f,U+6e22,U+6e26-6e28,U+6e2a,U+6e2c,U+6e2e,U+6e30-6e31,U+6e33,U+6e35-6e37,U+6e39,U+6e3b-6e42,U+6e45-6e4c,U+6e4f-6e52,U+6e55,U+6e57,U+6e59-6e5a,U+6e5c-6e5e,U+6e60-6e6a,U+6e6c-6e6d,U+6e6f-6e7d,U+6e80-6e82,U+6e84,U+6e87-6e88,U+6e8a-6e8e,U+6e91-6e97,U+6e99-6e9b,U+6e9d-6e9e,U+6ea0-6ea1,U+6ea3-6ea4,U+6ea6,U+6ea8-6ea9,U+6eab-6eae,U+6eb0,U+6eb3,U+6eb5,U+6eb8-6eb9,U+6ebc,U+6ebe-6ec0,U+6ec3-6ec4"}},{uri:Yj,descriptors:{unicodeRange:"U+6bbb-6bbe,U+6bc0,U+6bc3-6bc4,U+6bc6-6bca,U+6bcc,U+6bce,U+6bd0-6bd1,U+6bd8,U+6bda,U+6bdc-6be0,U+6be2-6be9,U+6bec-6bee,U+6bf0-6bf2,U+6bf4,U+6bf6-6bf8,U+6bfa-6bfc,U+6bfe-6c04,U+6c08-6c0c,U+6c0e,U+6c12,U+6c17,U+6c1c-6c1e,U+6c20,U+6c23,U+6c25,U+6c2b-6c2d,U+6c31,U+6c33,U+6c36-6c37,U+6c39-6c3c,U+6c3e-6c3f,U+6c43-6c45,U+6c48,U+6c4b-6c4f,U+6c51-6c53,U+6c56,U+6c58-6c5a,U+6c62-6c63,U+6c65-6c67,U+6c6b-6c6f,U+6c71,U+6c73,U+6c75,U+6c77-6c78,U+6c7a-6c7c,U+6c7f-6c80,U+6c84,U+6c87,U+6c8a-6c8b,U+6c8d-6c8e,U+6c91-6c92,U+6c95-6c98,U+6c9a,U+6c9c-6c9e,U+6ca0,U+6ca2,U+6ca8,U+6cac,U+6caf-6cb0,U+6cb4-6cb7,U+6cba,U+6cc0-6cc3,U+6cc6-6cc8,U+6ccb,U+6ccd-6ccf,U+6cd1-6cd2,U+6cd8-6cda,U+6cdc-6cdd,U+6cdf,U+6ce4,U+6ce6-6ce7,U+6ce9,U+6cec-6ced,U+6cf2,U+6cf4,U+6cf9,U+6cff-6d00,U+6d02-6d03,U+6d05-6d06,U+6d08-6d0a,U+6d0d,U+6d0f-6d11,U+6d13-6d16,U+6d18,U+6d1c-6d1d,U+6d1f-6d24,U+6d26,U+6d28-6d29,U+6d2c-6d2d,U+6d2f-6d30,U+6d34,U+6d36-6d38,U+6d3a,U+6d3f-6d40,U+6d42,U+6d44,U+6d49,U+6d4c,U+6d50,U+6d55-6d58,U+6d5b,U+6d5d,U+6d5f,U+6d61-6d62,U+6d64-6d65,U+6d67-6d68,U+6d6b-6d6d,U+6d70-6d72"}},{uri:Zj,descriptors:{unicodeRange:"U+6967-696a,U+696c-696d,U+696f-6970,U+6972-6976,U+697a-697b,U+697d-697f,U+6981,U+6983,U+6985,U+698a-698c,U+698e-6993,U+6996-6997,U+6999-699a,U+699d-69a6,U+69a9-69aa,U+69ac,U+69ae-69b0,U+69b2-69b3,U+69b5-69b6,U+69b8-69ba,U+69bc-69c0,U+69c2-69c9,U+69cb,U+69cd,U+69cf,U+69d1-69d3,U+69d5-69da,U+69dc-69de,U+69e1-69ec,U+69ee-69f1,U+69f3-69fc,U+69fe,U+6a00-6a09,U+6a0b-6a16,U+6a19-6a1e,U+6a20,U+6a22-6a27,U+6a29,U+6a2b-6a2e,U+6a30,U+6a32-6a34,U+6a36-6a3c,U+6a3f-6a43,U+6a45-6a46,U+6a48-6a4a"}},{uri:Kj,descriptors:{unicodeRange:"U+6830-6831,U+6834-6836,U+683a-683b,U+683f,U+6847,U+684b,U+684d,U+684f,U+6852,U+6856-685f,U+686a,U+686c-6873,U+6875,U+6878-6880,U+6882,U+6884,U+6887-688e,U+6890-6892,U+6894-6896,U+6898-68a1,U+68a3-68a5,U+68a9-68ac,U+68ae,U+68b1-68b2,U+68b4,U+68b6-68bf,U+68c1,U+68c3-68c8,U+68ca,U+68cc,U+68ce-68d1,U+68d3-68d4,U+68d6-68d7,U+68d9,U+68db-68df,U+68e1-68e2,U+68e4-68ed,U+68ef,U+68f2-68f4,U+68f6-68f8,U+68fb,U+68fd-6900,U+6902-6904,U+6906-690a,U+690c,U+690f,U+6911,U+6913-691e,U+6921-6923,U+6925-692c,U+692e-692f,U+6931-6933,U+6935-6938,U+693a-693c,U+693e,U+6940-6941,U+6943-6953,U+6955-6956,U+6958-6959,U+695b-695c,U+695f,U+6961-6962,U+6964-6965"}},{uri:qj,descriptors:{unicodeRange:"U+66b8,U+66ba-66bd,U+66bf-66d8,U+66da,U+66de-66e5,U+66e7-66e8,U+66ea-66ef,U+66f1,U+66f5-66f6,U+66f8,U+66fa-66fb,U+66fd,U+6701-6707,U+670c,U+670e-670f,U+6711-6713,U+6716,U+6718-671a,U+671c,U+671e,U+6720-6725,U+6727,U+6729,U+672e,U+6730,U+6732-6733,U+6736-6739,U+673b-673c,U+673e-673f,U+6741,U+6744-6745,U+6747,U+674a-674b,U+674d,U+6752,U+6754-6755,U+6757-675b,U+675d,U+6762-6764,U+6766-6767,U+676b-676c,U+676e,U+6771,U+6774,U+6776,U+6778-677b,U+677d,U+6780,U+6782-6783,U+6785-6786,U+6788,U+678a,U+678c-678f,U+6791-6794,U+6796,U+6799,U+679b,U+679f-67a1,U+67a4,U+67a6,U+67a9,U+67ac,U+67ae,U+67b1-67b2,U+67b4,U+67b9-67c0,U+67c2,U+67c5-67ce,U+67d5-67d7,U+67db,U+67df,U+67e1,U+67e3-67e4,U+67e6-67e8,U+67ea-67eb,U+67ed-67ee,U+67f2,U+67f5-67fc,U+67fe,U+6801-6804,U+6806,U+680d,U+6810,U+6812,U+6814-6815,U+6818-681c,U+681e-6820,U+6822-6828,U+682b-682f"}},{uri:Jj,descriptors:{unicodeRange:"U+6569-656a,U+656d-656f,U+6571,U+6573,U+6575-6576,U+6578-6586,U+6588-658a,U+658d-658f,U+6592,U+6594-6596,U+6598,U+659a,U+659d-659e,U+65a0,U+65a2-65a3,U+65a6,U+65a8,U+65aa,U+65ac,U+65ae,U+65b1-65b8,U+65ba-65bb,U+65be-65c0,U+65c2,U+65c7-65ca,U+65cd,U+65d0-65d1,U+65d3-65d5,U+65d8-65df,U+65e1,U+65e3-65e4,U+65ea-65eb,U+65f2-65f5,U+65f8-65f9,U+65fb-65ff,U+6601,U+6604-6605,U+6607-6609,U+660b,U+660d,U+6610-6612,U+6616-6618,U+661a-661c,U+661e,U+6621-6624,U+6626,U+6629-662c,U+662e,U+6630,U+6632-6633,U+6637-663b,U+663d,U+663f-6640,U+6642,U+6644-664a,U+664d-664e,U+6650-6651,U+6658-6659,U+665b-665e,U+6660,U+6662-6663,U+6665,U+6667,U+6669-666d,U+6671-6673,U+6675,U+6678-6679,U+667b-667d,U+667f-6681,U+6683,U+6685-6686,U+6688-668b,U+668d-6690,U+6692-6695,U+6698-669c,U+669e-66a6,U+66a9-66ad,U+66af-66b3,U+66b5-66b7"}},{uri:Qj,descriptors:{unicodeRange:"U+5f30,U+5f32-5f38,U+5f3b,U+5f3d-5f3f,U+5f41-5f4f,U+5f51,U+5f54,U+5f59-5f5c,U+5f5e-5f60,U+5f63,U+5f65,U+5f67-5f68,U+5f6b,U+5f6e-5f6f,U+5f72,U+5f74-5f76,U+5f78,U+5f7a,U+5f7d-5f7f,U+5f83,U+5f86,U+5f8d-5f8f,U+5f91,U+5f93-5f94,U+5f96,U+5f9a-5f9b,U+5f9d-5fa0,U+5fa2-5fa7,U+5fa9,U+5fab-5fac,U+5faf-5fb4,U+5fb6,U+5fb8-5fbb,U+5fbe-5fc2,U+5fc7-5fc8,U+5fca-5fcb,U+5fce,U+5fd3-5fd5,U+5fda-5fdc,U+5fde-5fdf,U+5fe2-5fe3,U+5fe5-5fe6,U+5fe8-5fe9,U+5fec,U+5fef-5ff0,U+5ff2-5ff4,U+5ff6-5ff7,U+5ff9-5ffa,U+5ffc,U+6007-6009,U+600b-600c,U+6010-6011,U+6013,U+6017-6018,U+601a,U+601e-601f,U+6022-6024,U+602c-602e,U+6030-6034,U+6036-603a,U+603d-603e,U+6040,U+6044-604a,U+604c,U+604e-604f,U+6051,U+6053-6054,U+6056-6058,U+605b-605c,U+605e-6061,U+6065-6066,U+606e,U+6071-6072,U+6074-6075,U+6077,U+607e,U+6080-6082,U+6085-6088,U+608a-608b,U+608e-6091,U+6093,U+6095,U+6097-6099,U+609c,U+609e,U+60a1-60a2,U+60a4-60a5,U+60a7,U+60a9-60aa,U+60ae,U+60b0,U+60b3,U+60b5-60b7,U+60b9-60ba,U+60bd-60c4,U+60c7-60c9,U+60cc"}},{uri:eR,descriptors:{unicodeRange:"U+635a-635d,U+6360,U+6364-6366,U+6368,U+636a-636c,U+636f-6370,U+6372-6375,U+6378-6379,U+637c-637f,U+6381,U+6383-6386,U+638b,U+638d,U+6391,U+6393-6395,U+6397,U+6399-639f,U+63a1,U+63a4,U+63a6,U+63ab,U+63af,U+63b1-63b2,U+63b5-63b6,U+63b9,U+63bb,U+63bd,U+63bf-63c3,U+63c5,U+63c7-63c8,U+63ca-63cc,U+63d1,U+63d3-63d5,U+63d7-63dd,U+63df,U+63e2,U+63e4-63e8,U+63eb-63ec,U+63ee-63f1,U+63f3,U+63f5,U+63f7,U+63f9-63fc,U+63fe,U+6403-6404,U+6406-640a,U+640d-640e,U+6411-6412,U+6415-641a,U+641d,U+641f,U+6422-6425,U+6427-6429,U+642b,U+642e-6433,U+6435-6439,U+643b-643c,U+643e,U+6440,U+6442-6443,U+6449,U+644b-6451,U+6453,U+6455-6457,U+6459-645d,U+645f-6466,U+6468,U+646a-646c,U+646e-6477,U+647b-6481,U+6483,U+6486,U+6488-648f"}},{uri:tR,descriptors:{unicodeRange:"U+61c5-61c7,U+61c9,U+61cc-61d0,U+61d3,U+61d5-61e5,U+61e7-61f4,U+61f6-61fe,U+6200-6205,U+6207,U+6209,U+6213-6214,U+6219,U+621c-621e,U+6220,U+6223,U+6226-6229,U+622b,U+622d,U+622f-6232,U+6235-6236,U+6238-623c,U+6242,U+6244-6246,U+624a,U+624f-6250,U+6255-6257,U+6259-625a,U+625c-6262,U+6264-6265,U+6268,U+6271-6272,U+6274-6275,U+6277-6278,U+627a-627b,U+627d,U+6281-6283,U+6285-6288,U+628b-6290,U+6294,U+6299,U+629c-629e,U+62a3,U+62a6-62a7,U+62a9-62aa,U+62ad-62b0,U+62b2-62b4,U+62b6-62b8,U+62ba,U+62be,U+62c0-62c1,U+62c3,U+62cb,U+62cf,U+62d1,U+62d5,U+62dd-62de,U+62e0-62e1,U+62e4,U+62ea-62eb,U+62f0,U+62f2,U+62f5,U+62f8-62fb,U+6300,U+6303-6306,U+630a-630d,U+630f-6310,U+6312-6315,U+6317-6319,U+631c,U+6326-6327,U+6329,U+632c-632e,U+6330-6331,U+6333-6338,U+633b-633c,U+633e-6341,U+6344,U+6347-6348,U+634a,U+6351-6354,U+6356-6359"}},{uri:nR,descriptors:{unicodeRange:"U+5dd0-5dda,U+5ddc,U+5ddf-5de0,U+5de3-5de4,U+5dea,U+5dec-5ded,U+5df0,U+5df5-5df6,U+5df8-5dfc,U+5dff-5e00,U+5e04,U+5e07,U+5e09-5e0b,U+5e0d-5e0e,U+5e12-5e13,U+5e17,U+5e1e-5e25,U+5e28-5e2c,U+5e2f-5e30,U+5e32-5e36,U+5e39-5e3a,U+5e3e-5e41,U+5e43,U+5e46-5e4b,U+5e4d-5e53,U+5e56-5e5a,U+5e5c-5e5d,U+5e5f-5e60,U+5e63-5e71,U+5e75,U+5e77,U+5e79,U+5e7e,U+5e81-5e83,U+5e85,U+5e88-5e89,U+5e8c-5e8e,U+5e92,U+5e98,U+5e9b,U+5e9d,U+5ea1-5ea4,U+5ea8-5eac,U+5eae-5eb2,U+5eb4,U+5eba-5ebd,U+5ebf-5ec8,U+5ecb-5ed0,U+5ed4-5ed5,U+5ed7-5eda,U+5edc-5ee7,U+5ee9,U+5eeb-5ef3,U+5ef5,U+5ef8-5ef9,U+5efb-5efd,U+5f05-5f07,U+5f09,U+5f0c-5f0e,U+5f10,U+5f12,U+5f14,U+5f16,U+5f19-5f1a,U+5f1c-5f1e,U+5f21-5f24,U+5f28,U+5f2b-5f2c,U+5f2e"}},{uri:aR,descriptors:{unicodeRange:"U+60cd-60d0,U+60d2-60d4,U+60d6-60d7,U+60d9,U+60db,U+60de,U+60e1-60e5,U+60ea,U+60f1-60f2,U+60f5,U+60f7-60f8,U+60fb-60ff,U+6102-6105,U+6107,U+610a-610c,U+6110-6114,U+6116-6119,U+611b-611e,U+6121-6122,U+6125,U+6128-612a,U+612c-613e,U+6140-6147,U+6149,U+614b,U+614d,U+614f-6150,U+6152-6154,U+6156-615c,U+615e-6161,U+6163-6166,U+6169-616f,U+6171-6174,U+6176,U+6178-618a,U+618c-618d,U+618f-6193,U+6195-619c,U+619e-61a6,U+61aa-61ab,U+61ad-61b6,U+61b8-61bd,U+61bf-61c1,U+61c3-61c4"}},{uri:iR,descriptors:{unicodeRange:"U+5cf4-5cfa,U+5cfc-5d01,U+5d04-5d05,U+5d08-5d0d,U+5d0f-5d13,U+5d15,U+5d17-5d1a,U+5d1c-5d1d,U+5d1f-5d23,U+5d25,U+5d28,U+5d2a-5d2c,U+5d2f-5d33,U+5d35-5d3c,U+5d3f-5d46,U+5d48-5d49,U+5d4d-5d57,U+5d59-5d5a,U+5d5c,U+5d5e-5d68,U+5d6a,U+5d6d-5d6e,U+5d70-5d73,U+5d75-5d81,U+5d83-5d98,U+5d9a-5d9c,U+5d9e-5db6,U+5db8-5dc4,U+5dc6-5dcc,U+5dce-5dcf"}},{uri:rR,descriptors:{unicodeRange:"U+5b52,U+5b56,U+5b5e,U+5b60-5b61,U+5b67-5b68,U+5b6b,U+5b6d-5b6f,U+5b72,U+5b74,U+5b76-5b79,U+5b7b-5b7c,U+5b7e-5b7f,U+5b82,U+5b86,U+5b8a,U+5b8d-5b8e,U+5b90-5b92,U+5b94,U+5b96,U+5b9f,U+5ba7-5ba9,U+5bac-5baf,U+5bb1-5bb2,U+5bb7,U+5bba-5bbc,U+5bc0-5bc1,U+5bc3,U+5bc8-5bcb,U+5bcd-5bcf,U+5bd1,U+5bd4-5bdc,U+5be0,U+5be2-5be3,U+5be6-5be7,U+5be9-5bed,U+5bef,U+5bf1-5bf7,U+5bfd-5bfe,U+5c00,U+5c02-5c03,U+5c05,U+5c07-5c08,U+5c0b-5c0e,U+5c10,U+5c12-5c13,U+5c17,U+5c19,U+5c1b,U+5c1e-5c21,U+5c23,U+5c26,U+5c28-5c2b,U+5c2d-5c30,U+5c32-5c33,U+5c35-5c37,U+5c43-5c44,U+5c46-5c47,U+5c4c-5c4d,U+5c52-5c54,U+5c56-5c58,U+5c5a-5c5d,U+5c5f,U+5c62,U+5c64,U+5c67-5c6d,U+5c70,U+5c72-5c78,U+5c7b-5c7e,U+5c80,U+5c83-5c87,U+5c89-5c8b,U+5c8e-5c8f,U+5c92-5c93,U+5c95,U+5c9d-5ca1,U+5ca4-5ca8,U+5caa,U+5cae-5cb0,U+5cb2,U+5cb4,U+5cb6,U+5cb9-5cbc,U+5cbe,U+5cc0,U+5cc2-5cc3,U+5cc5-5cca,U+5ccc-5cd1,U+5cd3-5cd8,U+5cda-5ce0,U+5ce2-5ce3,U+5ce7,U+5ce9,U+5ceb-5cec,U+5cee-5cef,U+5cf1-5cf3"}},{uri:sR,descriptors:{unicodeRange:"U+593b,U+593d-5940,U+5943,U+5945-5946,U+594a,U+594c-594d,U+5950,U+5952-5953,U+5959,U+595b-595f,U+5961,U+5963-5964,U+5966-5972,U+5975,U+5977,U+597a-597c,U+597e-5980,U+5985,U+5989,U+598b-598c,U+598e-5991,U+5994-5995,U+5998,U+599a-599d,U+599f-59a2,U+59a6-59a7,U+59ac-59ad,U+59b0-59b1,U+59b3-59b8,U+59ba,U+59bc-59bd,U+59bf-59c5,U+59c7-59c9,U+59cc-59cf,U+59d5-59d6,U+59d9,U+59db,U+59de-59e2,U+59e4,U+59e6-59e7,U+59e9-59eb,U+59ed-59f8,U+59fa,U+59fc-59fe,U+5a00,U+5a02,U+5a0a-5a0b,U+5a0d-5a10,U+5a12,U+5a14-5a17,U+5a19-5a1b,U+5a1d-5a1e,U+5a21-5a22,U+5a24,U+5a26-5a28,U+5a2a-5a30,U+5a33,U+5a35,U+5a37-5a3b,U+5a3d-5a3f,U+5a41-5a45,U+5a47-5a48,U+5a4b-5a54,U+5a56-5a59,U+5a5b-5a61,U+5a63-5a66,U+5a68-5a69,U+5a6b-5a73,U+5a78-5a79,U+5a7b-5a7e,U+5a80-5a90"}},{uri:lR,descriptors:{unicodeRange:"U+5a91,U+5a93-5a99,U+5a9c-5aa9,U+5aab-5ab1,U+5ab4,U+5ab6-5ab7,U+5ab9-5abd,U+5abf-5ac0,U+5ac3-5ac8,U+5aca-5acb,U+5acd-5ad1,U+5ad3,U+5ad5,U+5ad7,U+5ad9-5adb,U+5add-5adf,U+5ae2,U+5ae4-5ae5,U+5ae7-5ae8,U+5aea,U+5aec-5af0,U+5af2-5b08,U+5b0a-5b15,U+5b18-5b31,U+5b33,U+5b35-5b36,U+5b38-5b3f,U+5b41-5b4f"}},{uri:oR,descriptors:{unicodeRange:"U+5843,U+5845-584b,U+584e-5850,U+5852-5853,U+5855-5857,U+5859-585d,U+585f-5864,U+5866-586a,U+586d-587d,U+587f,U+5882,U+5884,U+5886-5888,U+588a-5891,U+5894-5898,U+589b-589d,U+58a0-58a7,U+58aa-58bb,U+58bd-58c0,U+58c2-58c4,U+58c6-58d0,U+58d2-58d4,U+58d6-58e3,U+58e5-58ea,U+58ed,U+58ef,U+58f1-58f2,U+58f4-58f5,U+58f7-58f8,U+58fa-5901,U+5903,U+5905-5906,U+5908-590c,U+590e,U+5910-5913,U+5917-5918,U+591b,U+591d-591e,U+5920-5923,U+5926,U+5928,U+592c,U+5930,U+5932-5933,U+5935-5936"}},{uri:cR,descriptors:{unicodeRange:"U+56d0-56d3,U+56d5-56d6,U+56d8-56d9,U+56dc,U+56e3,U+56e5-56ea,U+56ec,U+56ee-56ef,U+56f2-56f3,U+56f6-56f8,U+56fb-56fc,U+5700-5702,U+5705,U+5707,U+570b-571b,U+571d-571e,U+5720-5722,U+5724-5727,U+572b,U+5731-5732,U+5734-5738,U+573c-573d,U+573f,U+5741,U+5743-5746,U+5748-5749,U+574b,U+5752-5756,U+5758-5759,U+5762-5763,U+5765,U+5767,U+576c,U+576e,U+5770-5772,U+5774-5775,U+5778-577a,U+577d-5781,U+5787-578a,U+578d-5791,U+5794-579a,U+579c-579f,U+57a5,U+57a8,U+57aa,U+57ac,U+57af-57b1,U+57b3,U+57b5-57b7,U+57b9-57c1,U+57c4-57ca,U+57cc-57cd,U+57d0-57d1,U+57d3,U+57d6-57d7,U+57db-57dc,U+57de,U+57e1-57e3,U+57e5-57ec,U+57ee,U+57f0-57f3,U+57f5-57f7,U+57fb-57fc,U+57fe-57ff,U+5801,U+5803-5805,U+5808-580a,U+580c,U+580e-5810,U+5812-5814,U+5816-5818,U+581a-581d,U+581f,U+5822-5823,U+5825-5829,U+582b-582f,U+5831-5834,U+5836-5842"}},{uri:dR,descriptors:{unicodeRange:"U+55f9-55fc,U+55ff,U+5602-5607,U+560a-560b,U+560d,U+5610-5617,U+5619-561a,U+561c-561d,U+5620-5622,U+5625-5626,U+5628-562b,U+562e-5630,U+5633,U+5635,U+5637-5638,U+563a,U+563c-563e,U+5640-564b,U+564f-5653,U+5655-5656,U+565a-565b,U+565d-5661,U+5663,U+5665-5667,U+566d-5670,U+5672-5675,U+5677-567a,U+567d-5684,U+5687-568d,U+5690-5692,U+5694-56a2,U+56a4-56ae,U+56b0-56b6,U+56b8-56bb,U+56bd-56c9,U+56cb-56cf"}},{uri:uR,descriptors:{unicodeRange:"U+5286-5287,U+5289-528f,U+5291-5292,U+5294-529a,U+529c,U+52a4-52a7,U+52ae-52b0,U+52b4-52bd,U+52c0-52c2,U+52c4-52c6,U+52c8,U+52ca,U+52cc-52cf,U+52d1,U+52d3-52d5,U+52d7,U+52d9-52de,U+52e0-52e3,U+52e5-52ef,U+52f1-52f8,U+52fb-52fd,U+5301-5304,U+5307,U+5309-530c,U+530e,U+5311-5314,U+5318,U+531b-531c,U+531e-531f,U+5322,U+5324-5325,U+5327-5329,U+532b-532d,U+532f-5338,U+533c-533d,U+5340,U+5342,U+5344,U+5346,U+534b-534d,U+5350,U+5354,U+5358-5359,U+535b,U+535d,U+5365,U+5368,U+536a,U+536c-536d,U+5372,U+5376,U+5379,U+537b-537e,U+5380-5381,U+5383,U+5387-5388,U+538a,U+538e-5394,U+5396-5397,U+5399,U+539b-539c,U+539e,U+53a0-53a1,U+53a4,U+53a7,U+53aa-53ad,U+53af-53b5,U+53b7-53ba,U+53bc-53be,U+53c0,U+53c3-53c7,U+53ce-53d0,U+53d2-53d3,U+53d5,U+53da,U+53dc-53de,U+53e1-53e2,U+53e7,U+53f4,U+53fa,U+53fe-5400,U+5402,U+5405,U+5407,U+540b,U+5414,U+5418-541a,U+541c,U+5422,U+5424-5425,U+542a,U+5430,U+5433,U+5436-5437,U+543a"}},{uri:fR,descriptors:{unicodeRange:"U+5101-5105,U+5108-510a,U+510c-5111,U+5113-5120,U+5122-513e,U+5142,U+5147,U+514a,U+514c,U+514e-5150,U+5152-5153,U+5157-5159,U+515b,U+515d-5161,U+5163-5164,U+5166-5167,U+5169-516a,U+516f,U+5172,U+517a,U+517e-517f,U+5183-5184,U+5186-5187,U+518a-518b,U+518e-5191,U+5193-5194,U+5198,U+519a,U+519d-519f,U+51a1,U+51a3,U+51a6-51aa,U+51ad-51ae,U+51b4,U+51b8-51ba,U+51be-51bf,U+51c1-51c3,U+51c5,U+51c8,U+51ca,U+51cd-51ce,U+51d0,U+51d2-51da,U+51dc,U+51de-51df,U+51e2-51e3,U+51e5-51ea,U+51ec,U+51ee,U+51f1-51f2,U+51f4,U+51f7,U+51fe,U+5204-5205,U+5209,U+520b-520c,U+520f-5210,U+5213-5215,U+521c,U+521e-521f,U+5221-5223,U+5225-5227,U+522a,U+522c,U+522f,U+5231-5232,U+5234-5235,U+523c,U+523e,U+5244-5249,U+524b,U+524e-524f,U+5252-5253,U+5255,U+5257-525b,U+525d,U+525f-5260,U+5262-5264,U+5266,U+5268,U+526b-526e,U+5270-5271,U+5273-527c,U+527e,U+5280,U+5283-5285"}},{uri:hR,descriptors:{unicodeRange:"U+543d,U+543f,U+5441-5442,U+5444-5445,U+5447,U+5449,U+544c-544f,U+5451,U+545a,U+545d-5461,U+5463,U+5465,U+5467,U+5469-5470,U+5474,U+5479-547a,U+547e-547f,U+5481,U+5483,U+5485,U+5487-548a,U+548d,U+5491,U+5493,U+5497-5498,U+549c,U+549e-54a2,U+54a5,U+54ae,U+54b0,U+54b2,U+54b5-54b7,U+54b9-54ba,U+54bc,U+54be,U+54c3,U+54c5,U+54ca-54cb,U+54d6,U+54d8,U+54db,U+54e0-54e4,U+54eb-54ec,U+54ef-54f1,U+54f4-54f9,U+54fb,U+54fe,U+5500,U+5502-5505,U+5508,U+550a-550e,U+5512-5513,U+5515-551a,U+551c-551f,U+5521,U+5525-5526,U+5528-5529,U+552b,U+552d,U+5532,U+5534-5536,U+5538-553b,U+553d,U+5540,U+5542,U+5545,U+5547-5548,U+554b-554f,U+5551-5554,U+5557-555b,U+555d-5560,U+5562-5563,U+5568-5569,U+556b,U+556f-5574,U+5579-557a,U+557d,U+557f,U+5585-5586,U+558c-558e,U+5590,U+5592-5593,U+5595-5597,U+559a-559b,U+559e,U+55a0-55a6,U+55a8-55b0,U+55b2,U+55b4,U+55b6,U+55b8,U+55ba,U+55bc,U+55bf-55c3,U+55c6-55c8,U+55ca-55cb,U+55ce-55d0,U+55d5,U+55d7-55db,U+55de,U+55e0,U+55e2,U+55e7,U+55e9,U+55ed-55ee,U+55f0-55f1,U+55f4,U+55f6,U+55f8"}},{uri:pR,descriptors:{unicodeRange:"U+4fe0,U+4fe2,U+4fe4-4fe5,U+4fe7,U+4feb-4fec,U+4ff0,U+4ff2,U+4ff4-4ff7,U+4ff9,U+4ffb-4ffd,U+4fff-500b,U+500e,U+5010-5011,U+5013,U+5015-5017,U+501b,U+501d-501e,U+5020,U+5022-5024,U+5027,U+502b,U+502f-5039,U+503b,U+503d,U+503f-5042,U+5044-5046,U+5049-504b,U+504d,U+5050-5054,U+5056-5059,U+505b,U+505d-5064,U+5066-506b,U+506d-5075,U+5078-507a,U+507c-507d,U+5081-5084,U+5086-5087,U+5089-508c,U+508e-50a2,U+50a4,U+50a6,U+50aa-50ab,U+50ad-50b1,U+50b3-50b9,U+50bc-50ce,U+50d0-50d5,U+50d7-50d9,U+50db-50e5,U+50e8-50eb,U+50ef-50f2,U+50f4,U+50f6-50fa,U+50fc-5100"}},{uri:UR,descriptors:{unicodeRange:"U+49d5-4a77"}},{uri:mR,descriptors:{unicodeRange:"U+4dac-4dad,U+4daf-4db5,U+4e02,U+4e04-4e06,U+4e0f,U+4e12,U+4e17,U+4e1f-4e21,U+4e23,U+4e26,U+4e29,U+4e2e-4e2f,U+4e31,U+4e33,U+4e35,U+4e37,U+4e3c,U+4e40-4e42,U+4e44,U+4e46,U+4e4a,U+4e51,U+4e55,U+4e57,U+4e5a-4e5b,U+4e62-4e65,U+4e67-4e68,U+4e6a-4e6f,U+4e72,U+4e74-4e7d,U+4e7f-4e85,U+4e87,U+4e8a,U+4e90,U+4e96-4e97,U+4e99,U+4e9c-4e9e,U+4ea3,U+4eaa,U+4eaf-4eb1,U+4eb4,U+4eb6-4eb9,U+4ebc-4ebe,U+4ec8,U+4ecc,U+4ecf-4ed0,U+4ed2,U+4eda-4edc,U+4ee0,U+4ee2,U+4ee6-4ee7,U+4ee9,U+4eed-4eef,U+4ef1,U+4ef4,U+4ef8-4efa,U+4efc,U+4efe,U+4f00,U+4f02-4f08,U+4f0b-4f0c,U+4f12-4f16,U+4f1c-4f1d,U+4f21,U+4f23,U+4f28-4f29,U+4f2c-4f2e,U+4f31,U+4f33,U+4f35,U+4f37,U+4f39,U+4f3b,U+4f3e-4f42,U+4f44-4f45,U+4f47-4f4c,U+4f52,U+4f54,U+4f56,U+4f61-4f62,U+4f66,U+4f68,U+4f6a-4f6b,U+4f6d-4f6e,U+4f71-4f72,U+4f75,U+4f77-4f7a,U+4f7d,U+4f80-4f82,U+4f85-4f87,U+4f8a,U+4f8c,U+4f8e,U+4f90,U+4f92-4f93,U+4f95-4f96,U+4f98-4f9a,U+4f9c,U+4f9e-4f9f,U+4fa1-4fa2,U+4fa4,U+4fab,U+4fad,U+4fb0-4fb4,U+4fb6-4fbe,U+4fc0-4fc2,U+4fc6-4fc9,U+4fcb-4fcd,U+4fd2-4fd6,U+4fd9,U+4fdb"}},{uri:gR,descriptors:{unicodeRange:"U+4933-49d4"}},{uri:bR,descriptors:{unicodeRange:"U+487a-4932"}},{uri:vR,descriptors:{unicodeRange:"U+47d2-4879,U+2ce7c,U+2ce88,U+2ce93"}},{uri:xR,descriptors:{unicodeRange:"U+4756-47d1,U+2ca02,U+2ca0e,U+2ca7d,U+2caa9,U+2cb29,U+2cb2e,U+2cb31,U+2cb38-2cb39,U+2cb3f,U+2cb41,U+2cb4e,U+2cb5a,U+2cb64,U+2cb69,U+2cb6c,U+2cb6f,U+2cb76,U+2cb78,U+2cb7c,U+2cbb1,U+2cbbf-2cbc0,U+2cbce,U+2cc5f,U+2ccf5-2ccf6,U+2ccfd,U+2ccff,U+2cd02-2cd03,U+2cd0a,U+2cd8b,U+2cd8d,U+2cd8f-2cd90,U+2cd9f-2cda0,U+2cda8,U+2cdad-2cdae,U+2cdd5,U+2ce18,U+2ce1a,U+2ce23,U+2ce26,U+2ce2a"}},{uri:yR,descriptors:{unicodeRange:"U+46c3-4755,U+2c488,U+2c494,U+2c497,U+2c542,U+2c613,U+2c618,U+2c621,U+2c629,U+2c62b-2c62d,U+2c62f,U+2c642,U+2c64a-2c64b,U+2c72c,U+2c72f,U+2c79f,U+2c7c1,U+2c7fd,U+2c8d9,U+2c8de,U+2c8e1,U+2c8f3,U+2c907,U+2c90a,U+2c91d"}},{uri:wR,descriptors:{unicodeRange:"U+4629-46c2,U+2bdf7,U+2be29,U+2c029-2c02a,U+2c0a9,U+2c0ca,U+2c1d5,U+2c1d9,U+2c1f9,U+2c27c,U+2c288,U+2c2a4,U+2c317,U+2c35b,U+2c361,U+2c364"}},{uri:ER,descriptors:{unicodeRange:"U+458e-4628,U+2b7a9,U+2b7c5,U+2b7e6,U+2b7f9,U+2b806,U+2b80a,U+2b81c,U+2b8b8,U+2bac7,U+2bb5f,U+2bb62,U+2bb7c,U+2bb83,U+2bc1b,U+2bd77,U+2bd87"}},{uri:SR,descriptors:{unicodeRange:"U+4449-4511,U+2afa2,U+2b127-2b128,U+2b137-2b138,U+2b1ed"}},{uri:kR,descriptors:{unicodeRange:"U+439b-4448,U+2a437,U+2a5f1,U+2a602,U+2a61a,U+2a6b2,U+2a7dd,U+2a8fb,U+2a917,U+2aa30,U+2aa36,U+2aa58"}},{uri:CR,descriptors:{unicodeRange:"U+4275-430d,U+298c6,U+29a72,U+29d98,U+29ddb,U+29e15,U+29e3d,U+29e49"}},{uri:MR,descriptors:{unicodeRange:"U+4132-41de,U+28bef,U+28c47,U+28c4f,U+28c51,U+28c54,U+28d10,U+28d71,U+28dfb,U+28e1f,U+28e36,U+28e89,U+28e99,U+28eeb,U+28f32,U+28ff8,U+292a0"}},{uri:IR,descriptors:{unicodeRange:"U+41df-4274,U+292b1,U+29490,U+295cf,U+2967f,U+296f0,U+29719,U+29750"}},{uri:_R,descriptors:{unicodeRange:"U+408e-4131,U+285c8-285c9,U+28678,U+28695,U+286d7,U+286fa,U+287e0,U+28946,U+28949,U+2896b,U+28987-28988,U+289ba-289bb,U+28a1e,U+28a29,U+28a43,U+28a71,U+28a99,U+28acd,U+28add,U+28ae4,U+28b49,U+28bc1"}},{uri:TR,descriptors:{unicodeRange:"U+3e83-3f2f,U+27139,U+273da-273db,U+273fe,U+27410,U+27449,U+27614-27615,U+27631,U+27684,U+27693,U+2770e,U+27723,U+27752"}},{uri:AR,descriptors:{unicodeRange:"U+3f30-3fdb,U+27985,U+27a84,U+27bb3,U+27bbe,U+27bc7,U+27cb8,U+27da0,U+27e10"}},{uri:jR,descriptors:{unicodeRange:"U+3fdc-408d,U+27fb7,U+27ff9,U+2808a,U+280bb,U+2815d,U+28277,U+28282,U+282e2,U+282f3,U+283cd,U+28408,U+2840c,U+28455,U+28468,U+2856b"}},{uri:RR,descriptors:{unicodeRange:"U+3dd2-3e82,U+26a58,U+26a8c,U+26ab7,U+26aff,U+26b5c,U+26c21,U+26c29,U+26c73,U+26cdd,U+26e40,U+26e65,U+26f94,U+26ff6-26ff8,U+270f4,U+2710d"}},{uri:DR,descriptors:{unicodeRange:"U+3d34-3dd1,U+2648d,U+26676,U+2667e,U+266b0,U+2671d,U+2677c,U+267cc,U+268dd,U+268ea,U+26951,U+2696f,U+269dd,U+269fa,U+26a1e"}},{uri:LR,descriptors:{unicodeRange:"U+3c76-3d33,U+25d0a,U+25da1,U+25e2e,U+25e56,U+25e62,U+25e65,U+25ec2,U+25ed7-25ed8,U+25ee8,U+25f23,U+25f5c,U+25fd4,U+25fe0,U+25ffb,U+2600c,U+26017,U+26060,U+260ed,U+26221,U+26270,U+26286,U+2634c,U+26402"}},{uri:PR,descriptors:{unicodeRange:"U+3bda-3c75,U+25771,U+257a9,U+257b4,U+259c4,U+259d4,U+25ae3-25ae4,U+25af1,U+25bb2,U+25c14,U+25c4b,U+25c64"}},{uri:NR,descriptors:{unicodeRange:"U+3b25-3bd9,U+2504a,U+25055,U+25122,U+2512b,U+251a9,U+251cd,U+251e5,U+2521e,U+2524c,U+2542e,U+2548e,U+254d9,U+2550e,U+25532,U+25562,U+255a7-255a8"}},{uri:OR,descriptors:{unicodeRange:"U+3a6b-3b24,U+24896,U+249db,U+24a4d,U+24a7d,U+24ac9,U+24b56,U+24b6f,U+24c16,U+24d14,U+24dea,U+24e0e,U+24e37,U+24e6a,U+24e8b,U+24eaa"}},{uri:$R,descriptors:{unicodeRange:"U+39a9-3a6a,U+24096,U+24103,U+241ac,U+241c6,U+241fe,U+243bc,U+243f8,U+244d3,U+24629,U+246a5,U+247f1"}},{uri:FR,descriptors:{unicodeRange:"U+38e3-39a8,U+23a98,U+23c7f,U+23c97-23c98,U+23cfe,U+23d00,U+23d0e,U+23d40,U+23dd3,U+23df9-23dfa,U+23e23,U+23f7e"}},{uri:zR,descriptors:{unicodeRange:"U+3760-382a,U+22ab8,U+22b43,U+22b46,U+22b4f-22b50,U+22ba6,U+22bca,U+22c1d,U+22c24,U+22c55,U+22d4c,U+22de1"}},{uri:BR,descriptors:{unicodeRange:"U+382b-38e2,U+231b6,U+231c3-231c4,U+231f5,U+23350,U+23372,U+233d0,U+233d2-233d3,U+233d5,U+233da,U+233df,U+233e4,U+2344a-2344b,U+23451,U+23465,U+234e4,U+2355a,U+23594,U+235c4,U+235cb,U+23638-2363a,U+23647,U+2370c,U+2371c,U+2373f,U+23763-23764,U+237e7,U+237ff,U+23824,U+2383d"}},{uri:HR,descriptors:{unicodeRange:"U+3698-375f,U+22218,U+2231e,U+223ad,U+224dc,U+226f3,U+2285b,U+228ab,U+2298f"}},{uri:XR,descriptors:{unicodeRange:"U+35e6-3697,U+21c56,U+21cde,U+21d2d,U+21d45,U+21d62,U+21d78,U+21d92,U+21d9c,U+21da1,U+21db7,U+21de0,U+21e33-21e34,U+21f1e,U+21f76,U+21ffa,U+2217b"}},{uri:WR,descriptors:{unicodeRange:"U+3444-350e,U+20ad3,U+20b1d,U+20b9f,U+20c41,U+20cbf,U+20cd0,U+20d45,U+20de1,U+20e64,U+20e6d,U+20e95,U+20e9d,U+20ea2,U+20f5f,U+210c1,U+21201,U+2123d,U+21255,U+21274,U+2127b"}},{uri:VR,descriptors:{unicodeRange:"U+350f-35e5,U+212d7,U+212e4,U+212fd,U+2131b,U+21336,U+21344,U+2139a,U+213c4,U+21413,U+2146d-2146e,U+215d7,U+21647,U+216b4,U+21706,U+21742,U+218bd,U+219c3"}},{uri:GR,descriptors:{unicodeRange:"U+336d-3443,U+2032b,U+20371,U+20381,U+203f9,U+2044a,U+20509,U+20547,U+205d6,U+20628,U+20676,U+2074f,U+20779,U+20807,U+2083a,U+20895,U+208b9,U+2097c,U+2099d"}},{uri:YR,descriptors:{unicodeRange:"U+328b-336c,U+2000b,U+20089,U+200a2,U+200a4,U+20164,U+201a2,U+20213"}},{uri:ZR,descriptors:{unicodeRange:"U+3192-31ba,U+31c0-31e3,U+31f0-321e,U+3220-328a,U+1f250-1f251"}},{uri:KR,descriptors:{unicodeRange:"U+2f74-2fd5,U+3000,U+3003-3007,U+3012-3013,U+3018-301c,U+3020-3029,U+302f-303f,U+3041-3096,U+3099-30a1"}},{uri:qR,descriptors:{unicodeRange:"U+30a2-30ff,U+3105-312f,U+3131-318e,U+3190-3191"}},{uri:JR,descriptors:{unicodeRange:"U+4e36,U+4ea0,U+4f74,U+4f91,U+4f94,U+4fc5,U+507e,U+50ed,U+5182,U+51f5,U+525e,U+5282,U+52f9,U+5326,U+537a,U+53a3,U+5423,U+5459,U+54b4,U+54d9,U+55c9,U+57f4,U+580b,U+5902,U+5925,U+5a08,U+5ab5,U+5b84,U+5be4,U+5c22,U+5cb5,U+5cbd,U+5d3e,U+5e31,U+5e5e,U+5e80,U+5ee8,U+5f82,U+5fc9,U+5fed,U+600a,U+605d,U+609b,U+609d,U+60dd,U+6243,U+6322,U+63ce,U+640c,U+643f,U+6445,U+64d7,U+6534,U+6549,U+656b,U+6603,U+674c,U+680a,U+6864,U+69d4,U+6a65,U+6c2a,U+6c46,U+6c5c,U+6d0e,U+6d48,U+6e2b,U+6eb2,U+6eb7,U+6f89,U+706c,U+70b1,U+7113,U+71d4,U+727f,U+72f3,U+7303,U+7321,U+736c,U+736f,U+74a9,U+74de,U+750d,U+7513,U+7592,U+75c4,U+7605,U+760a,U+761b,U+7625,U+762d,U+7643,U+7707,U+7747,U+77b5,U+7839,U+784e,U+78a5,U+7924,U+793b,U+798a,U+7a03,U+7a06,U+7a78,U+7a80,U+7aad,U+7ba8,U+7be5,U+7cc8,U+7ec1,U+7f0b,U+7f0f,U+7f12,U+7f68,U+7f9d,U+8025,U+809c,U+80ad,U+80b7,U+80e8,U+811e,U+8204,U+8223,U+822d,U+823b,U+824b,U+825a,U+827d,U+827f,U+828f,U+82c8,U+8307,U+831b,U+8347,U+837d,U+839b,U+83a9,U+83f9,U+84b9,U+8579,U+864d,U+867f,U+86b0,U+86d1,U+86d8,U+86f2,U+8764,U+8770,U+8788,U+8797,U+87ac-87ad,U+87b5,U+881b,U+8844,U+88bc,U+88fc,U+8930,U+89cf,U+89d6,U+8ba0,U+8bd4,U+8c02,U+8c2b,U+8c85,U+8e23,U+8f81-8f82,U+8fd5,U+90b6,U+90db,U+914e,U+9164,U+91ad,U+943e,U+94b7-94b8,U+94eb,U+950d,U+9514,U+9516,U+9518,U+9529,U+9538,U+953f,U+954e,U+955f,U+95fc,U+9667,U+96b3,U+9792,U+97b2,U+98a1,U+9969,U+9987,U+9998,U+9a80,U+9a92,U+9a96,U+9adf,U+9cb4,U+9cbd,U+9cd0,U+9cd4,U+9e31,U+9e3a,U+9e71,U+9ee5,U+9eea,U+9ef9,U+9fa0"}},{uri:QR,descriptors:{unicodeRange:"U+4e0c,U+4e28,U+4e3f,U+4ec2,U+502e,U+50ba,U+5155,U+5181,U+522d,U+5281,U+5290,U+5369,U+53b6,U+54d5,U+54dc,U+54ff,U+552a,U+553c,U+5588,U+55b5,U+5686,U+570a,U+5776,U+5786,U+57a4,U+5820,U+5865,U+58bc,U+5b32,U+5b65,U+5c1c,U+5c66,U+5c6e,U+5c8d,U+5ddb,U+5f2a,U+5f50,U+5f61,U+6067,U+614a,U+615d,U+619d,U+61d4,U+620b,U+6224-6225,U+6343,U+63ad,U+63f2,U+640b,U+6420,U+6434,U+6496,U+64d0,U+6509,U+652e,U+67a8,U+6833,U+6844,U+684a,U+6920,U+6957,U+6971,U+6a8e,U+6a91,U+6aa0,U+6b43,U+6bea,U+6bf5,U+6c15,U+6cd0,U+6ee0,U+6f24,U+6f2d,U+70c0,U+721d,U+728b,U+72c3,U+72e8,U+730a,U+7338-7339,U+734d,U+746d,U+752f,U+754e,U+770d,U+7735,U+778d,U+77a2,U+77e7,U+7857,U+786d,U+78c9,U+78f2,U+791e,U+7953,U+7b58,U+7b9d,U+7bda,U+7cd7,U+7f32-7f33,U+8022,U+8028-8029,U+8035,U+804d,U+8080,U+80c2,U+80e9,U+80ec,U+80f2,U+810e,U+8221,U+8274,U+82b0,U+82e0,U+83b0,U+8487-8488,U+848e,U+84cd,U+84d0,U+8539,U+857a,U+85a8,U+85b7,U+867c,U+871e,U+8723,U+877e,U+878b,U+8793,U+8803,U+88d2,U+8966,U+89cc,U+89eb,U+8b26,U+8c8a,U+8c98,U+8d33,U+8d47,U+8d55,U+8dbc,U+8e40,U+8e94,U+8f77,U+8f79,U+9058,U+91a2,U+91b5,U+928e,U+9494,U+94b6,U+94de,U+94f4,U+94f9,U+950a,U+950e,U+951e,U+952b,U+953c,U+953e,U+9544,U+9561,U+9564,U+9569,U+95f6,U+9603,U+960d,U+963d,U+9674,U+9794,U+97ab,U+98a5,U+9a9f,U+9ab1,U+9ad1,U+9b0f,U+9b2f,U+9c92,U+9c95,U+9cba,U+9cbc,U+9cc6,U+9ccb,U+9cd8,U+9e32,U+9e38,U+9e5b,U+9e7e,U+9eb4,U+9efb-9efc,U+9f3d"}},{uri:eD,descriptors:{unicodeRange:"U+2e3b,U+2e80-2e99,U+2e9b-2ef3,U+2f00-2f73,U+ffffd"}},{uri:tD,descriptors:{unicodeRange:"U+4e69,U+4f1b,U+4f67,U+4f7e,U+4fdc,U+50e6,U+5196,U+5202,U+5233,U+523f,U+52a2,U+536e,U+5476,U+54ad,U+54cf,U+5537,U+561e,U+56dd,U+56df,U+5709,U+572c,U+57cf,U+57f8,U+580d,U+5881,U+589a,U+5941,U+59b2,U+5c25,U+5d24,U+5d74,U+5e42,U+5e8b,U+5eb3,U+5ed2,U+5fad,U+6003,U+603c,U+6083,U+6100,U+6126,U+6206,U+62ca,U+638e,U+63b4,U+6426,U+646d,U+6535,U+65c4,U+66db,U+6715,U+6769,U+6798,U+67c3,U+6861,U+698d,U+69ca,U+69ed,U+69f2,U+69ff,U+6a18,U+6b39,U+6bb3,U+6c0d,U+6cb2,U+6cd6,U+6cf7,U+6cfa,U+6d33,U+6e16,U+6e53-6e54,U+6ebb,U+6fb6,U+709d,U+72ad,U+72f7,U+72fb,U+7313,U+739f,U+74ba,U+754b,U+755b,U+758b,U+75ac,U+75d6,U+7617,U+7635,U+7640,U+76a4,U+76b2,U+775a,U+77bd,U+781f,U+79b3,U+7b2b,U+7b31,U+7b3e,U+7b6e,U+7b9c,U+7c0b,U+7c9e,U+7cc1,U+7ce8,U+7ea5,U+7f21,U+7f27,U+7f74,U+7fb0,U+8031,U+8071,U+80ea,U+8114,U+8160,U+81a6,U+81c1,U+829f,U+82a4,U+82fb,U+831a,U+8333,U+836c,U+83b6,U+83f8,U+8411,U+841c,U+8489,U+848c,U+85a4,U+8627,U+8629,U+866e,U+86b5,U+872e,U+8731,U+877b,U+877d,U+87ea,U+8813,U+8816,U+8864,U+88ce,U+88e5,U+897b,U+89cb,U+89f3,U+8bfc,U+8c35,U+8d46,U+8d4d,U+8dba,U+8e3a,U+8f75,U+8f7e,U+8fd3,U+9161,U+9179,U+917e,U+91a3,U+94ac,U+94d7,U+94e5,U+952a,U+952c,U+9545,U+9565,U+9568,U+956a,U+961d,U+96e0,U+972a,U+9730,U+989f,U+98e7,U+990d,U+9967,U+9993,U+9aa3,U+9ac0,U+9ae1,U+9aeb,U+9af9,U+9c86,U+9c8b,U+9ca0-9ca1,U+9ca3,U+9ce2,U+9e48,U+9e6a,U+9e87,U+9ee2,U+9ee9,U+9f17,U+9f19,U+9f2c,U+9f80"}},{uri:nD,descriptors:{unicodeRange:"U+4ef3,U+50d6,U+50ec,U+51ab,U+51b1,U+52d6,U+54a9,U+54da,U+55be,U+55cd,U+564d,U+572f,U+574c,U+576b,U+57d8,U+57fd,U+5844,U+59d2,U+5ae0,U+5b16,U+5b37,U+5b5b,U+5b80,U+5d1e,U+5d6b,U+5efe,U+5f11,U+5f56,U+5f58,U+5f73,U+5f8c,U+5fc4,U+5fe4,U+602b,U+6106,U+610d,U+63de,U+63f8,U+641b,U+64e4,U+6634,U+676a,U+67b5,U+681d,U+6883,U+69b1,U+69e0,U+6b37,U+6b9b,U+6d7c,U+6ed7,U+6f36,U+6f72,U+6f8c,U+7035,U+7039,U+7173,U+7178,U+7228,U+728f,U+72b4,U+72ef,U+72f4,U+7331,U+7481,U+74e0,U+7540,U+75c3,U+75e6,U+763c,U+764d,U+76cd,U+7704,U+7743,U+7780,U+7847,U+786a,U+78b9,U+7962,U+7a02,U+7aac,U+7ab3,U+7b0a,U+7b4c,U+7b7b,U+7bfc,U+7c0f,U+7c16,U+7c40,U+7ca2,U+7cc7,U+7cf8,U+7d77,U+7e3b,U+7ea1,U+7ea9,U+7ef2,U+7f02,U+7f07,U+7f0c,U+7f23,U+7f2f,U+7fbc,U+8016,U+8020,U+812c,U+8136,U+8182,U+822f,U+8233,U+825f,U+8268,U+8284,U+8288,U+8291,U+8308,U+8311,U+835b,U+836d,U+83dd,U+8406,U+840f,U+845c,U+84b4,U+84e3,U+850c,U+855e,U+863c,U+86ba,U+86c4,U+86de,U+86f1,U+873e,U+87bd,U+87db,U+880a,U+883c,U+887f,U+88f0,U+890a,U+892b,U+895e,U+89ef,U+8a48,U+8bdc,U+8c18,U+8c33,U+8c94,U+8db1,U+8dcf,U+8dd6,U+8de3,U+8e6f,U+8e90,U+8f7a,U+8fb6,U+902d,U+90be,U+91af,U+936a,U+948b,U+94d8,U+9513,U+953a,U+956c,U+963c,U+9654,U+966c,U+9688,U+97b4,U+996b,U+9a75,U+9a7a,U+9aba,U+9aed,U+9b08,U+9b43,U+9c8e,U+9c94,U+9c9a,U+9e2b,U+9e36,U+9e4b,U+9e4e,U+9e55,U+9e63,U+9e68-9e69,U+9ebd,U+9ec9,U+9f0d,U+9f37,U+9f51"}},{uri:aD,descriptors:{unicodeRange:"U+50a7,U+5240,U+5261,U+52ac,U+531a,U+5363,U+5432,U+5452,U+5456,U+5472,U+5478,U+553f,U+5575,U+5581,U+55cc,U+55fe,U+5601,U+572e,U+57d2,U+57ef,U+581e,U+5924,U+5981,U+5997,U+59a3,U+5aaa,U+5ab8,U+5b34,U+5d5d,U+5def,U+5e11,U+5e91,U+5ed1,U+5ef4,U+5f40,U+600d,U+6019,U+601b,U+605a,U+6092,U+60ab,U+6217,U+623d,U+6369,U+65d2,U+6661,U+670a,U+6753,U+67a7,U+6855,U+68f9,U+6939,U+696e,U+6980,U+6a7c,U+6aab,U+6b82,U+6bf3,U+6bf9,U+6c05,U+6c19-6c1a,U+6ca9,U+6cf6,U+6d1a,U+6dab,U+6f74,U+7085,U+7198,U+71b5,U+7256,U+725d,U+727e,U+72fa,U+7322,U+738e,U+73e5,U+750f,U+755a,U+7594,U+75b3,U+760c,U+7615,U+7630,U+763f,U+77ec,U+7817,U+78a1,U+78d9,U+7905,U+7b2a,U+7b2e,U+7b62,U+7b85,U+7bcc,U+7bea,U+7c26,U+7c74,U+7c9c-7c9d,U+7e47,U+7e9b,U+7e9f,U+7ee0,U+7ee8,U+7ef1,U+7f01,U+7f11,U+7f17,U+7f36,U+7f7e,U+7fee,U+802a,U+80cd,U+8112,U+8169,U+8234,U+8279,U+8298,U+82ca,U+82d8,U+82e1,U+83c0,U+83d4,U+83df,U+8401,U+8451,U+845a,U+8476,U+8478,U+84ba,U+84bd,U+84e0,U+851f,U+8548,U+8556,U+8585,U+868d,U+86e9,U+86f4,U+86f8,U+8765,U+8785,U+87ab,U+87ee,U+8832,U+8872,U+88b7,U+88e2-88e3,U+89da,U+8bce,U+8bd3,U+8bd6,U+8bf9,U+8c16,U+8c73,U+8d5c,U+8dde,U+8f6d,U+8f94,U+8fe8,U+9011,U+915e,U+9185,U+918c,U+94ab,U+94d1,U+94f3,U+9515,U+951d,U+9558,U+9567,U+96ce,U+96e9,U+9785,U+9878,U+987c,U+9883,U+98d1,U+9954,U+9963,U+9a93,U+9ac1,U+9acc,U+9b1f,U+9b49,U+9b4d,U+9b51,U+9ca7,U+9cae,U+9cce,U+9cd3,U+9e37,U+9e39,U+9e41,U+9e46,U+9f22,U+9f2f,U+9f39,U+9f85"}},{uri:iD,descriptors:{unicodeRange:"U+4e5c,U+4edf,U+4f25,U+4f32,U+4f5e,U+4f76,U+4faa,U+4fe6,U+5028,U+5048,U+5250,U+535f,U+538d,U+53c1,U+5412,U+5443,U+54d4,U+54dd,U+5541,U+5550,U+5577,U+55dd,U+55f3,U+560f,U+562c,U+5657-5658,U+5664,U+56af,U+575c,U+577c,U+57b2,U+57da,U+5800,U+5a62,U+5aeb,U+5c3b,U+5ca3,U+5d26,U+5d9d,U+5f01,U+5fb5,U+5fdd,U+5ff8,U+6029,U+6041,U+6079,U+60b1,U+6222,U+629f,U+6332,U+63bc,U+63e0,U+6485,U+65ab,U+65c3,U+65c6,U+668c,U+669d,U+66be,U+67fd,U+6800,U+68fc,U+690b,U+6924,U+6978,U+69a7,U+6a3e,U+6a50,U+6a5b,U+6a97,U+6b24,U+6b8d,U+6baa,U+6c10,U+6c54,U+6ceb,U+6d04,U+6d4d,U+6eb1,U+6ebd,U+7110,U+71b3,U+71f9,U+7230,U+728d,U+7292,U+72b8,U+72d2,U+7360,U+73a2,U+7511,U+75a0,U+75c8,U+779f,U+7826,U+7877,U+7a39,U+7aa8,U+7ae6,U+7b04,U+7b0f,U+7baa,U+7bac,U+7c1f,U+7ccd,U+7ecb,U+7ed4,U+7ed7,U+7efb,U+7f0d,U+7f5f,U+7faf,U+7fd5,U+7fe5,U+8027,U+80bc,U+80dd,U+80fc,U+8132,U+815a,U+8167,U+816d,U+81ca,U+8228,U+82a1,U+82a9,U+82ab,U+82cc,U+8351,U+8368,U+83b8,U+83d8,U+83ea,U+83f0,U+8497,U+84c1,U+858f,U+85ff,U+867b,U+86a8-86a9,U+870a,U+8722,U+876e,U+877c,U+87e5,U+8888,U+88df,U+8919,U+8bcc,U+8bdf,U+8be8,U+8bee,U+8c20,U+8c2f,U+8d36,U+8df8,U+8e05,U+8e2f,U+8f9a,U+9021,U+908b,U+90b4,U+90ba,U+90d0,U+90eb,U+90fe,U+91aa,U+933e,U+9486-9487,U+948d,U+9490,U+94ad,U+94bd,U+94d6,U+94d9,U+9507,U+9546,U+955e,U+956b,U+95e9,U+9604,U+960b,U+9612,U+9615,U+9617,U+96b9,U+989a-989b,U+989e,U+9a78,U+9a7d,U+9aa0,U+9aa2,U+9ac2,U+9b23,U+9b3b,U+9c82,U+9cca,U+9cd9,U+9e28,U+9e5a,U+9e5e,U+9e6c,U+9efe,U+9f0b"}},{uri:rD,descriptors:{unicodeRange:"U+4e47,U+4e8d,U+4f65,U+4f89,U+50ee,U+520e,U+5416,U+5454,U+54bb,U+54c2,U+54d3,U+54de,U+5591,U+55e5,U+560c,U+566b,U+5769,U+578c,U+5793,U+57e4,U+5889,U+593c,U+59ab,U+5ad4,U+5ad8,U+5af1,U+5b53,U+5ba5,U+5c59,U+5c63,U+5d5b,U+5e0f,U+5e14,U+5edb,U+5fbc,U+6004,U+60ad,U+610e,U+61b7,U+624c,U+634c,U+647a,U+64ba,U+65f0,U+6600,U+66f7,U+67e2,U+67f0,U+680c,U+686b,U+6874,U+691f,U+6989,U+6a17,U+6b81,U+6b84,U+6c06-6c07,U+6c3d,U+6d07,U+6d27,U+6d2b,U+6d91,U+6e6b,U+6e8f,U+6fde,U+70bb,U+723b,U+726e,U+72b0,U+72ce,U+72f2,U+7301,U+731e,U+737e,U+7477,U+748e,U+74ff,U+7633,U+7654,U+771a,U+7726,U+7765,U+7768,U+781c,U+7829,U+78d4,U+7913,U+7957,U+79d5,U+79eb,U+7a70,U+7a86,U+7b25,U+7b38,U+7b47,U+7b72,U+7ba6-7ba7,U+7dae,U+7ee1,U+7efe,U+7f26,U+7f31,U+7f35,U+801c,U+8043,U+809f,U+80ab,U+80d7,U+8118,U+8188,U+81cc,U+823e,U+8244,U+824f,U+82b4,U+82c1,U+82e4,U+82f4,U+8306,U+833a,U+835c,U+839c,U+83b3,U+83bc,U+846d,U+867a,U+868b,U+8734,U+87ca,U+886e,U+887e,U+88a2,U+88c9,U+8921,U+8bb5,U+8bf3,U+8c04,U+8c17,U+8c1d,U+8c25,U+8c36,U+8c55,U+8c78,U+8d3d,U+8d40,U+8d59,U+8d67,U+8d91,U+8dbf,U+8deb-8dec,U+8dfd,U+8e14,U+8e41,U+8f8e,U+900b,U+9044,U+9062,U+90cf,U+9123,U+9146,U+9162,U+9172,U+918d,U+9190,U+92c8,U+93ca,U+948c,U+94aa,U+94b2,U+94c8,U+94ca,U+94d5,U+94df,U+94e9-94ea,U+94f7,U+94fc-94fd,U+951b,U+954f,U+9554,U+9559,U+9566,U+9571-9572,U+95f1,U+9608,U+960f,U+97af,U+988f,U+98d5,U+992e,U+9955,U+9ab0,U+9b32,U+9c90,U+9c9e,U+9ca5,U+9ca9,U+9cad,U+9cb1,U+9cc3,U+9e47,U+9ee7,U+9f87"}},{uri:sD,descriptors:{unicodeRange:"U+4e93,U+4ec4,U+4ef5,U+4f27,U+4f7b,U+4fe3,U+5080,U+5121,U+51eb,U+5208,U+52f0,U+53f5,U+5453,U+5466,U+54a6,U+54bf,U+54d0,U+5533,U+5549,U+5556,U+556d,U+558f,U+55f2,U+55f5,U+5627,U+567b,U+56d4,U+571c,U+5739,U+57b4,U+5807,U+58c5,U+59a4,U+59af,U+59d8,U+5a09,U+5a0c,U+5a4a,U+5ad2,U+5b6c,U+5ca2,U+5cac,U+5d03,U+5d6c,U+5db7,U+5ebe,U+5f2d,U+5fea,U+6042,U+6120,U+6175,U+6221,U+623e,U+6339,U+638a,U+643d,U+64b8,U+64e2,U+66e9,U+67b3,U+67c1,U+67d2,U+6832,U+6877,U+68f0,U+6934,U+6966,U+6987,U+6998,U+69c1,U+69ce,U+6a3d,U+6a84,U+6aa9,U+6b87,U+6bd6,U+6c16,U+6c18,U+6cd4,U+6cee,U+6de0,U+6e0c,U+6ecf,U+6f4b,U+70b7,U+7168,U+72d9,U+7352,U+73b3,U+73d0,U+7441,U+74d2,U+75a5,U+75e7-75e8,U+7610,U+7619,U+765e,U+772d,U+7812,U+782c,U+784c,U+7850,U+7856,U+789b,U+78f4,U+7a51,U+7b15,U+7b1e,U+7b24,U+7b5a,U+7bb8,U+7bc1,U+7bd9,U+7ed0,U+7ee6,U+7efa,U+7f1b,U+7f1f,U+7f22,U+7f45,U+7f71,U+7fa7,U+7fbf,U+7ff3,U+8052,U+80b1,U+80db,U+80f4,U+81bb,U+81ec,U+8202,U+8210,U+8249,U+828a,U+828e,U+82e3,U+8315,U+8369,U+8378,U+83a8,U+83aa,U+83b4,U+83e1,U+84fc,U+8538,U+853b,U+859c,U+85ae,U+86b4,U+86c9,U+86cf,U+8725,U+879f,U+87b3,U+887d,U+88fe,U+8a8a,U+8ba7,U+8c07,U+8c14,U+8c30,U+8c47,U+8db5,U+8dd7,U+8e1f,U+8e69,U+8e70,U+8e85,U+8f78,U+8f87,U+8f8b,U+8f8f,U+90c4,U+9143,U+917d,U+948f,U+94cd,U+94d2,U+94ef,U+954a,U+9609-960a,U+96d2,U+9708,U+9765,U+97ea,U+9880,U+98a7,U+996c,U+9980,U+9991,U+9a88,U+9ab6,U+9afb,U+9b47,U+9c87,U+9c9b,U+9cb5,U+9cc7,U+9e2c,U+9e42,U+9e58,U+9ecd,U+9ecf,U+9f8a,U+9f8c"}},{uri:lD,descriptors:{unicodeRange:"U+4ebb,U+4edd,U+4fa9,U+502c,U+50a5,U+51c7,U+51fc,U+523d,U+5241,U+530f,U+5464,U+549d,U+54a3,U+5514,U+5527,U+555c,U+556e,U+5576,U+55b1,U+55b9,U+55eb,U+5624,U+564c,U+5671,U+5685,U+568f,U+56d7,U+56e1,U+57a1,U+57d9,U+5942,U+5a67,U+5c50,U+5c7a,U+5c98,U+5d06,U+5d27,U+5d6f,U+5df3,U+5dfd,U+5e19,U+5ea0,U+5eb9,U+5eea,U+5ffe,U+600f,U+606b,U+6215,U+622c,U+6266,U+62bb,U+62bf,U+6308,U+6387,U+63b8,U+63c4,U+63c6,U+63f6,U+6441,U+6555,U+659b,U+6677,U+66a7,U+6775,U+678b,U+679e,U+6840,U+6849,U+6860,U+68c2,U+6910,U+6a28,U+6a2f,U+6a79,U+6b92-6b93,U+6bc2,U+6bfd,U+6c29,U+6c32,U+6c86,U+6cc5,U+6d0c,U+6d60,U+6da0,U+6ddd,U+6e86,U+6ed3,U+6edf,U+6fb9,U+6fd1,U+6fef,U+7023,U+7080,U+70ca,U+712f,U+7145,U+7284,U+732c,U+73c8,U+73d9,U+740a,U+7457,U+7596,U+759d,U+75a3,U+75d8,U+75e3-75e4,U+75ff,U+7622,U+7688,U+76b4,U+76e5,U+7818,U+7887,U+789a,U+78b2,U+7b08,U+7b33,U+7c2a,U+7ccc,U+7ea8,U+7ec0,U+7fe6,U+8012,U+8084,U+8093,U+80e4,U+80ef,U+8297,U+82a8,U+82be,U+8331,U+8366,U+83c5,U+83fd,U+8473,U+84a1,U+84ca,U+84d1,U+857b,U+85c1,U+85d3,U+8605,U+8662,U+86aa,U+86b1,U+86d4,U+86ed,U+86f3,U+8709,U+8748,U+874c,U+8763,U+89c7,U+89de,U+89e5,U+8a3e,U+8ba6,U+8c00,U+8c21,U+8c49,U+8c7a,U+8d30,U+8df9,U+8e51,U+8e59,U+8f6b,U+8f73,U+8ff3,U+9016,U+9026,U+902f,U+9099,U+909b,U+90c7,U+914a,U+91ae,U+91ba,U+9495,U+94a3,U+94af,U+94ba,U+94bf,U+94cc,U+94e1,U+94f0,U+9531,U+955d,U+95f3,U+9697,U+96bc,U+975b,U+977c,U+98a2,U+998a,U+9994-9995,U+9a9b,U+9ab7,U+9ac5,U+9c91,U+9ccf,U+9cd5,U+9e29,U+9edc,U+9edf,U+9f83,U+9f88-9f89"}},{uri:oD,descriptors:{unicodeRange:"U+4ee8,U+4f22,U+4f43,U+4f57,U+4f5d,U+4f6f,U+4ff8,U+502d,U+507b,U+5345,U+53df,U+53fb,U+544b,U+5482,U+54a7,U+54cc,U+550f,U+5544,U+5555,U+5594,U+55e8,U+55ec,U+55ef,U+564e,U+56f9,U+5704,U+576d,U+5785,U+57ad,U+5914,U+5958,U+599e,U+59aa,U+59be,U+5a06,U+5abe,U+5ae1,U+5b40,U+5bee,U+5cbf,U+5cc4,U+5ccb,U+5d47,U+603f,U+6078,U+607d,U+607f,U+608c,U+609a,U+60fa,U+61ff,U+621b,U+622e,U+626a,U+6371,U+63ae,U+63cd,U+63d6,U+6410,U+6414,U+6421,U+6448,U+64d8,U+6710,U+6748,U+6772,U+680e,U+6954,U+69ab,U+6c68,U+6c8f,U+6ca4,U+6d2e,U+6e4e,U+6e98,U+6fe0,U+7094,U+70e9,U+7116,U+7119,U+723f,U+73c9,U+74e4,U+753e,U+7548,U+75bd,U+75cd,U+7618,U+7634,U+76c5,U+76f1,U+7708,U+7719,U+777e,U+7791,U+77b3,U+7823,U+7827,U+7830,U+7889,U+7893,U+7949,U+795c,U+79e3,U+7a14,U+7a88,U+7a95,U+7aa0,U+7afd,U+7b90,U+7bd1,U+7bfe,U+7da6,U+7ec2,U+7eef,U+7f03-7f04,U+7f08,U+7f58,U+7f61,U+7f9f,U+8174,U+8200,U+828d,U+82c4,U+82d5,U+82dc,U+82f7,U+832d,U+835a,U+840b,U+8438,U+852b,U+869d,U+86ac,U+86d0,U+86f0,U+8782,U+87a8,U+87d1-87d2,U+87e0,U+8839,U+8913,U+891b,U+8934,U+8941,U+89ca,U+89ce,U+8a07,U+8ba3,U+8bc5,U+8bcb,U+8bdb,U+8c11,U+8c15,U+8c29,U+8c32,U+8dc4,U+8dce,U+8ddb,U+8dfa,U+8e09,U+8e1d,U+8e39,U+8e42,U+8e49,U+8e4b,U+8e8f,U+8f71-8f72,U+9004,U+9036,U+9097,U+90dc,U+90e2,U+90e6,U+90ef,U+9104,U+919a,U+91b4,U+938f,U+9497,U+950f,U+9557,U+9562-9563,U+9573,U+9606,U+9649,U+972d,U+973e,U+97a3,U+97eb,U+988c,U+9894,U+98a6,U+9974,U+9977,U+997d,U+9a90,U+9a9d,U+9aef,U+9ca2,U+9ccd,U+9cdf,U+9e20,U+9e4c,U+9e6b,U+9f3e"}},{uri:cD,descriptors:{unicodeRange:"U+4ede,U+4ee1,U+4eeb,U+4fda,U+4ffe,U+5025,U+506c,U+50f3,U+5106,U+520d,U+525c,U+52ad,U+530d,U+5310,U+539d,U+53a9,U+53fc,U+5421,U+5477,U+54e7,U+551b,U+5530,U+557e,U+5599,U+55c4,U+55d1,U+55d4,U+55df,U+55e4,U+55ea,U+5623,U+562d,U+5654,U+56eb,U+56f5,U+57a7,U+57d5,U+57dd,U+584d,U+5880,U+58ec,U+59dd,U+5a32,U+5a55,U+5a75,U+5b51,U+5b71,U+5b73,U+5cd2,U+5ce4,U+5e5b,U+5e96,U+5fd2,U+607b,U+61d1,U+634b,U+636d,U+63b3,U+63ff,U+64c0,U+661d,U+6657,U+66dc,U+67a5,U+6841,U+6867,U+6901,U+699b,U+6a47,U+6b46,U+6c21,U+6c24,U+6c35,U+6c4a,U+6c94,U+6ca3,U+6d39,U+6d63,U+6d6f,U+6d94,U+705e,U+71e7,U+726f,U+72cd,U+72de,U+72f0,U+7325,U+7350,U+7391,U+741a,U+757f,U+7583,U+75b1,U+75b4,U+75b8,U+75c2,U+75f1,U+766f,U+7699,U+7751,U+789c,U+7a17,U+7be6,U+7cb2,U+7ea3,U+7eb0,U+7ebe,U+7eeb,U+7f25,U+7f2c,U+7fb8,U+8026,U+8037,U+8153,U+8171,U+8191,U+8214,U+821b,U+8222,U+826e,U+82eb,U+830c,U+8314,U+8334,U+83d6,U+8418,U+843c,U+84ff,U+8564,U+8572,U+8616,U+866c,U+8693,U+86a3,U+86a7,U+86af,U+86b6,U+86c6,U+86ca,U+8708,U+870d,U+8759,U+8760,U+87af,U+87c6,U+8869,U+88c6,U+89d0,U+8b07,U+8baa-8bab,U+8bc2,U+8be4,U+8bf0,U+8c2a,U+8c62,U+8c89,U+8d49,U+8d6d,U+8d84,U+8d94,U+8db8,U+8dc6,U+8e2e,U+8e3d,U+8e47,U+8e7f,U+9005,U+9051,U+907d,U+9082,U+9088,U+90b0,U+90d3,U+9150,U+949c,U+94a4,U+94b9,U+94cb,U+94e0,U+9509,U+9512,U+951f,U+9534,U+9552-9553,U+965f,U+96b0,U+9791,U+9889,U+9990,U+9a9c,U+9aa7,U+9c88,U+9cb2-9cb3,U+9cb6-9cb7,U+9cc5,U+9cdc,U+9e22,U+9e2a,U+9e57,U+9e67,U+9e73,U+9e82,U+9eb8,U+9ee0,U+9f9b"}},{uri:dD,descriptors:{unicodeRange:"U+4eb5,U+4f09,U+4f5a,U+4f8f,U+4fce,U+4fdf,U+4fea,U+4ff3,U+500c,U+500f,U+504e,U+5088,U+52be,U+5420,U+5457,U+5499,U+549b,U+54c6,U+54d2,U+558b,U+559f,U+55bd,U+55d6,U+565c,U+567c,U+568e,U+5768,U+577b,U+57a9,U+57ed,U+59f9,U+5a11,U+5a40,U+5ae6,U+5b6a,U+5b93,U+5bb8,U+5c15,U+5c99,U+5c9c,U+5cc1,U+5d2e,U+5d4b,U+5d99,U+5e54,U+5e61,U+5fcf-5fd1,U+6002,U+6006,U+6014,U+60af,U+60c6,U+60da,U+60f4,U+621f,U+62c8,U+631b,U+631e,U+63e9,U+64b5,U+655d,U+6619,U+6635,U+6641,U+67ad,U+67b0,U+67b7,U+67e9,U+684e,U+688f,U+695d,U+696b,U+69b7,U+6a58,U+6c26,U+6d35,U+6d43,U+6d9e,U+6dd9,U+6dec,U+6e11,U+6e6e,U+6e9f,U+6ec2,U+6ee2,U+6ef9,U+6f09,U+6f66,U+6f8d,U+6fc2,U+6fc9,U+729f,U+72c8,U+73de,U+7430,U+7566,U+7579,U+75c9,U+75e2,U+75fc,U+762a,U+7638,U+7678,U+76c2,U+76f9,U+778c,U+77cd,U+77dc,U+7800,U+781d,U+782d,U+783b-783c,U+78a3,U+78ec,U+7980,U+7a23,U+7b95,U+7bdd,U+7c0c,U+7c41,U+7c91,U+7cb3,U+7cc5,U+7ecc,U+7f19,U+7fca,U+8006,U+8069,U+807f,U+80bd,U+80ed,U+814b,U+8198,U+82cb,U+82d2,U+834f,U+8360,U+847a,U+84d6,U+84e5,U+8537,U+85d0,U+8671,U+86a4,U+86ce,U+86f9,U+8703,U+8707,U+8737,U+873b,U+8815,U+8936,U+8bc3,U+8bcf,U+8bd2,U+8bd8,U+8be9,U+8c0c,U+8c0f,U+8c4c,U+8d45,U+8d5d,U+8d73,U+8e31,U+8e6d,U+8e76,U+8fe4,U+9041,U+90d7,U+9169,U+92ae,U+94a1,U+94c4,U+94c9,U+94db,U+94e7,U+9503,U+9506,U+9517,U+9528,U+9537,U+9542,U+9549,U+95fe,U+9616,U+961a,U+96c9,U+96f3,U+9701,U+970e,U+9739,U+9753,U+9798,U+98d2-98d3,U+98d9-98da,U+9968,U+996f,U+9984,U+9997,U+9acb,U+9b03,U+9c85,U+9ca8,U+9cab,U+9e49,U+9e51,U+9e66,U+9f10"}},{uri:uD,descriptors:{unicodeRange:"U+4e15,U+4e1e,U+4e2b,U+4eb3,U+4ec9,U+4f0e,U+4f64,U+501c,U+50a9,U+510b,U+51a2,U+51bc,U+527d,U+52d0,U+53fd,U+5429,U+542e,U+5486,U+54af,U+5506,U+5511,U+5522,U+552c,U+556c,U+55b3,U+55d2,U+55e6,U+55fd,U+561f,U+5639,U+5659,U+5662,U+5693,U+572a,U+5892,U+598a,U+5992,U+59a9,U+5a20,U+5ae3,U+5b17,U+5b7d,U+5d34,U+5d3d,U+5d4a,U+5d82,U+5e1a-5e1b,U+5ea5,U+5f0b,U+5f77,U+5fd6,U+5fff,U+6026,U+6035,U+6063,U+60b4,U+60bb,U+60ee,U+612b,U+6194,U+61ca,U+61e6,U+61f5,U+620a,U+6248,U+62a1,U+62d7,U+6376,U+637b,U+652b,U+65bc,U+65cc,U+65ce,U+65d6,U+664c,U+665f,U+6666,U+6684,U+66b9,U+6773,U+6777,U+6787,U+67de,U+6845,U+693d,U+6994,U+6a35,U+6d54,U+6d5c,U+6d8e,U+6dd6,U+6eb4,U+6f2a,U+6f78,U+704f,U+70ec,U+7118,U+714a,U+7172,U+71b9,U+724d,U+728a,U+7337,U+733e,U+7396,U+73b7,U+73cf,U+7428,U+742c,U+742e,U+74ee,U+74f4,U+7525,U+753a,U+7572,U+75d4,U+765c,U+768e,U+7762,U+777d,U+77fd,U+7825,U+7837,U+78b4,U+795f,U+79ed,U+7a1e,U+7b06,U+7b20,U+7ba9,U+7bab,U+7c7c,U+7cbd,U+7cdc,U+7ec9,U+7ef6,U+7f30,U+7f42,U+7f44,U+7f54,U+7f94,U+8004,U+800b,U+8019,U+809b,U+80ae,U+80c4,U+80f1,U+8146,U+816e,U+817c,U+81c0,U+81fc,U+81fe,U+822b,U+830f,U+832f,U+8340,U+8365,U+8385,U+8392,U+83a0,U+8424,U+84af,U+869c,U+8713,U+8717-8718,U+87c0,U+87cb,U+87fe,U+8821,U+8902,U+89d1,U+8bb9,U+8c12,U+8d32,U+8d53,U+8df7,U+8e7c,U+8f7c,U+8f95,U+8fab,U+9052,U+905b,U+9095,U+909d,U+90c5,U+911e,U+9122,U+916a,U+919b,U+948e,U+9492,U+949a,U+94b5,U+94bc,U+94c6,U+94f1,U+9502,U+9511,U+9536,U+956f-9570,U+9602,U+9621,U+9631,U+998b,U+99a5,U+9a81,U+9a9e,U+9ebe,U+9f8b"}},{uri:fD,descriptors:{unicodeRange:"U+4f2b,U+4f3d,U+4fac,U+5043,U+5055,U+5140,U+5156,U+51cb,U+5243,U+531d,U+536f,U+53a5,U+53ae,U+53f1,U+541d,U+5431,U+547b,U+5492,U+5494,U+54a4,U+54aa,U+54ce,U+54fd,U+5509,U+5520,U+553e,U+557b,U+55c5,U+55e1,U+55f7,U+5608,U+5636,U+563b,U+5773,U+57a0,U+5811,U+587e,U+58d5,U+59e3,U+5a29,U+5a6a,U+5a76,U+5a7a,U+5ac9,U+5b62,U+5b95,U+5c49,U+5c8c,U+5cab,U+5cb7,U+5d02,U+5d58,U+5e44,U+5e7a,U+5eff,U+5f29,U+5f89,U+5f9c,U+5fa8,U+6005,U+6043,U+60b8,U+60d8,U+60ec,U+60f0,U+6115,U+618e,U+630e,U+637a,U+6390,U+63ac,U+63b0,U+64de,U+6525,U+6538,U+65ee-65ef,U+6631,U+6636,U+6654,U+677c,U+67b8,U+67d8,U+683e,U+6886,U+68b5,U+692d,U+6963,U+6979,U+6988,U+6b59,U+6b9a,U+6c69,U+6c74,U+6cae,U+6ce0,U+6cef,U+6d95,U+6dc5,U+6dde,U+6de6,U+6dfc,U+6ea7,U+6f15,U+6f29,U+7096,U+70c3,U+7131,U+715c,U+7166,U+7266,U+7317,U+731d,U+7329,U+73e9,U+7425,U+7455,U+7490,U+74ef,U+7519,U+75b5,U+75b9,U+75de,U+7656,U+7663,U+7691,U+7729,U+77fe,U+783e,U+787c,U+795a,U+7a79,U+7abf,U+7b3a,U+7b4f,U+7b60,U+7b75,U+7b8d,U+7bb4,U+7bd3,U+7be1,U+7cbc,U+7edb,U+7f1c,U+7f8c,U+7fb2,U+7fb9,U+7fce,U+7ff1,U+810d,U+81c6,U+82a5,U+82aa,U+82de,U+8317,U+8343,U+835e,U+8364,U+836a,U+853a,U+8543,U+854a,U+8559,U+8568,U+85b0,U+85b9,U+864f,U+86e4,U+8715,U+8845,U+8884,U+88e8,U+88f1,U+8983,U+8be1,U+8c1f,U+8c27,U+8c5a,U+8c82,U+8d58,U+8dbe,U+8f98,U+9035,U+9074,U+90a1,U+9149,U+9157,U+93d6,U+949d,U+94c2,U+94e3-94e4,U+95eb,U+95f0,U+9611,U+9619,U+9642,U+968d,U+9706,U+970f,U+97ed,U+988a,U+9893,U+98e8,U+9a77,U+9a87,U+9aa1,U+9abc,U+9cdd,U+9e2f,U+9e33,U+9e44,U+9e5c,U+9e9d,U+9edd"}},{uri:hD,descriptors:{unicodeRange:"U+4f58,U+4f6c,U+4f70,U+4fd0,U+5014,U+51bd,U+524c,U+5315,U+5323,U+535e,U+540f,U+542d,U+545b,U+548e,U+549a,U+54ab,U+54fc,U+5567,U+556a,U+5600,U+5618,U+563f,U+5669,U+56f1,U+56ff,U+573b,U+574d,U+579b,U+57b8,U+57c2,U+586c,U+58f9,U+595a,U+598d,U+5993,U+5996,U+59d7,U+5b7a,U+5ba6,U+5c4e,U+5c96,U+5ce5,U+5eb6,U+5f08,U+5f99,U+602f,U+6059,U+606c,U+607a,U+60ed,U+61a9,U+620c,U+6249,U+62a8,U+62c4,U+62ed,U+62fd,U+6342,U+6345,U+6396,U+63a3,U+6402,U+6413,U+642a,U+6487,U+64a9,U+64ac,U+64ae,U+64b7,U+659f,U+65a1,U+667e,U+66f3,U+67e0,U+69db,U+69df,U+6aac,U+6b86,U+6c50,U+6c5e,U+6c76,U+6c85,U+6c8c,U+6cde,U+6d19,U+6d52,U+6da7,U+6db8,U+6e1a,U+6e25,U+6e4d,U+6e5f,U+6ec1,U+6f31,U+6f7a,U+6fa7,U+6fe1,U+701b,U+70ab,U+70f7,U+717d,U+71a8,U+7252,U+72c4,U+72e1,U+7315,U+736d,U+73ae,U+73c0,U+73c2,U+740f,U+75a4,U+7600-7601,U+768b,U+76bf,U+76d4,U+7728,U+772f,U+776c,U+77a0,U+77b0,U+77f8,U+783a,U+78d0,U+78fa,U+7977,U+7a37,U+7a92,U+7afa,U+7b71,U+7b94,U+7cef,U+7f28,U+7fe1,U+808b,U+80e5,U+80eb,U+8110,U+8113,U+812f,U+814c,U+81c3,U+8235,U+82d4,U+8309,U+83c1,U+8431,U+8469,U+84bf,U+84d3,U+84df,U+84e6,U+8511,U+8638,U+86c0,U+86db,U+86fe,U+8757,U+8822,U+8882,U+8885,U+8892,U+88f3,U+892a,U+8ba5,U+8bd9,U+8be0,U+8be7,U+8bfd,U+8c1a,U+8d4a,U+8d4e,U+8d66,U+8dda,U+8e0c,U+8e52,U+8e74,U+8e87,U+8f76,U+8fc2,U+8fe6,U+900d,U+9068,U+90ac,U+90b3,U+90b8,U+90e7,U+9119,U+9131,U+915a,U+916e,U+94b4,U+94d0,U+94e2,U+94ec,U+94ff,U+9522,U+9535,U+9556,U+965b,U+96f9,U+9774,U+9981,U+998d,U+998f,U+9a6e,U+9a7f,U+9a8a,U+9b13,U+9c9f,U+9e3e,U+9e43,U+9e6d,U+9e8b,U+9e92,U+9edb,U+9eef"}},{uri:pD,descriptors:{unicodeRange:"U+4e10,U+4e56,U+4e98,U+4ec3,U+4f3a,U+4f5f,U+4f88,U+4f97,U+4fa5,U+4fe8,U+504c,U+5197,U+52fa,U+5364,U+53e8,U+5406,U+543c,U+545c,U+5471,U+5480,U+5495,U+54b3,U+54df,U+54e6,U+54ee,U+557c,U+5583,U+55dc,U+55e3,U+566c,U+592f,U+5944,U+5983,U+59ca,U+59e5,U+5a13,U+5a7f,U+5b09,U+5bd0,U+5e4c,U+5eb5,U+5f1b,U+5f3c,U+608d,U+60cb,U+61a7,U+61ac,U+61cb,U+6233,U+62a0,U+62e7,U+62ee,U+62f4,U+62f7,U+634e,U+6382,U+63c9,U+63ea,U+6400,U+645e,U+6482,U+6556,U+6593,U+6615,U+664f,U+66e6,U+672d,U+675e,U+67da,U+6805,U+6808,U+6868,U+68a2,U+695e,U+69ad,U+6a80,U+6a90,U+6b83,U+6be1,U+6c30,U+6cad,U+6cb1,U+6cf1,U+6d31,U+6d93,U+6dae,U+6dbf,U+6dc6-6dc7,U+6e0d,U+6e32,U+6e3a,U+6e85,U+6eba,U+6f3e,U+6f5e,U+6f7c,U+6fee,U+71ee,U+722a,U+72b7,U+72e9,U+73ba,U+73d1,U+7409,U+7435-7436,U+7459-745a,U+747e,U+7487,U+74e2,U+7504,U+752c-752d,U+7599,U+759f,U+75a1,U+75ca,U+75f0,U+761f,U+7629,U+777f,U+7785,U+77a5,U+77bf,U+78d5,U+7934,U+7940,U+79a7,U+7b19,U+7c38,U+7c95,U+7cb1,U+7ce0,U+7eca,U+7ef7,U+7f2b,U+7f81,U+7fcc,U+8046,U+8148,U+8165,U+819b,U+81ba,U+828b,U+82ae,U+82b7,U+82d3,U+8301,U+830e,U+831c,U+8338,U+837c,U+8393,U+8398,U+83ba,U+83e0,U+83e9,U+853c,U+8654,U+86df,U+8712,U+873f,U+874e,U+8783,U+8859,U+88a4,U+8925,U+8bb7,U+8bff,U+8c19,U+8c1b,U+8c24,U+8c2c,U+8d61,U+8db4,U+8e6c,U+8f8a,U+8fe5,U+8ff8,U+901e,U+90f4,U+912f,U+9163,U+9170,U+91dc,U+949b,U+94a8,U+94b3,U+94c0,U+94e8,U+9525,U+9530,U+9539,U+954c-954d,U+9550,U+955b,U+962a,U+9685,U+96cc,U+9776,U+988d,U+9975,U+9985,U+9a6f,U+9aa5,U+9ab8,U+9c7f,U+9ca4,U+9cb8,U+9e25,U+9e35,U+9e4a"}},{uri:UD,descriptors:{unicodeRange:"U+4ea2,U+4ea5,U+4f36,U+4f84,U+4f8d,U+501a,U+5029,U+516e,U+51a5,U+51c4,U+51f8,U+5201,U+527f,U+5321,U+5352,U+5366,U+53e9,U+54c7,U+5632,U+5676,U+56b7,U+56bc,U+56da,U+56e4,U+5703,U+5729,U+5742,U+57a2-57a3,U+5815,U+58d1,U+5919,U+592d,U+5955,U+5a05,U+5a25,U+5a34,U+5b70,U+5b75,U+5bdd,U+5bf0,U+5c41,U+5c79,U+5c91,U+5c94,U+5ce6,U+5ced,U+5d69,U+5dc5,U+5e16,U+5e27,U+5f27,U+5f95,U+5ffb,U+6020,U+604d,U+6055,U+60e6,U+60eb,U+6123,U+618b,U+61a8,U+620d,U+62c7,U+62ce,U+62d9,U+631f,U+634d,U+6452,U+6479,U+64ce,U+64d2,U+655b,U+660a,U+6726,U+67c4,U+6809,U+6853,U+68e3,U+68f1,U+68fa,U+693f,U+6942,U+6995,U+69a8,U+69b4,U+6a71,U+6b89,U+6bcb,U+6bd3,U+6bd9,U+6c40,U+6cf8,U+6cfe,U+6d85,U+6da3,U+6daa,U+6e0e,U+6e43-6e44,U+6f88,U+7078,U+7099,U+70bd,U+70d9,U+70fd,U+7109,U+7184,U+7239,U+733f,U+73f2,U+748b,U+749c,U+749e,U+759a,U+75d2,U+75eb,U+7620,U+766b,U+7693,U+76cf,U+7738,U+773a,U+776b,U+778e,U+77aa,U+7852,U+78be,U+7948,U+795b,U+7960,U+796f,U+79ba,U+7a20,U+7a96,U+7aa5,U+7b03,U+7b28,U+7b50,U+7b77,U+7bc6,U+7bf1,U+7c27,U+7d0a,U+7ead,U+7ec5,U+7ee2,U+7ef0,U+7efd,U+7f0e,U+7f2e,U+7f79,U+7f9a,U+8098,U+80da,U+80e7,U+80f0,U+80f3,U+80fa,U+818a,U+81e7,U+8237-8238,U+8299,U+82b8,U+82ce,U+837b,U+83bd,U+83cf,U+8426,U+8475,U+85c9,U+85d5,U+85dc,U+85e9,U+871a,U+8747,U+8749,U+888d,U+8910,U+891a,U+8bb4,U+8be3,U+8bec,U+8bf2,U+8c06,U+8c0d,U+8d31,U+8d48,U+8de4,U+8e1e,U+8e4a,U+8e66,U+8f84,U+8f97,U+9083,U+90e1,U+9165,U+91c9,U+94b0,U+94f5,U+9504,U+9532,U+956d,U+95f5,U+95fa,U+9668,U+9698,U+96bd,U+9704,U+9773,U+9890,U+996a,U+997a,U+9a74,U+9a8b,U+9cc4,U+9ccc"}},{uri:mD,descriptors:{unicodeRange:"U+4ea8,U+4f1e,U+4f51,U+4f63,U+4f7c,U+4f83,U+4fa0,U+4fd1,U+4ffa,U+5018,U+5026,U+508d,U+50bb,U+50f5,U+50fb,U+5162,U+5319,U+5320,U+538c,U+5413,U+541f,U+5475,U+54bd,U+54d1,U+5589,U+5598,U+575f,U+57ae,U+57e0,U+5937,U+5974,U+5978,U+59ae,U+5a1f,U+5a49,U+5ab3,U+5b99,U+5b9b,U+5ba0,U+5be1,U+5be5,U+5c09,U+5c27,U+5de2,U+5e9a,U+5f26,U+5f8a,U+5f98,U+6021,U+606d,U+60bc,U+60d5,U+60e7,U+611a,U+614c,U+6254,U+626f,U+6292,U+6296,U+62b9,U+62e2,U+631a,U+631d,U+6320,U+6346,U+63ba,U+6467,U+64bc,U+658b,U+663c,U+6643,U+6652,U+6656,U+6687,U+66d9,U+66dd,U+66f0,U+673d,U+67ab,U+6816-6817,U+68a7,U+68ad,U+68cd,U+68e0,U+6986,U+69fd,U+6b47,U+6bd7,U+6c1f,U+6c2e-6c2f,U+6cbe,U+6de4,U+6e1d,U+6e83,U+6e9c,U+6ed4-6ed5,U+6f4d,U+70f9,U+7130,U+716e,U+718f,U+71ac,U+71e5,U+72fc,U+731c,U+7334,U+73ca,U+7422,U+7426,U+745f,U+7470,U+75af,U+75f4,U+762b,U+763e,U+7696,U+7737,U+7741,U+77a7,U+77bb,U+77ee,U+785d,U+788c,U+78ca,U+7901,U+796d,U+7985,U+79fd,U+7a3c,U+7a57,U+7a74,U+7b5b,U+7caa,U+7cb9,U+7cd5,U+7eac,U+7eb6,U+7ed1,U+7ee5,U+7f20,U+7f2a,U+7f38,U+7f69,U+7fa1,U+8018,U+8038,U+803f,U+804b,U+80a2,U+80be,U+80d6,U+817a,U+81fb,U+820c,U+82ad,U+82af,U+82bd,U+8327,U+8354,U+835f,U+8367,U+836b,U+840c,U+841d,U+8471,U+849c,U+84b2,U+84c9,U+8517,U+851a,U+8549,U+8681,U+8721,U+8776,U+88d9,U+88f9,U+89c5,U+8c1c,U+8c34,U+8d81,U+8d9f,U+8e0a,U+8e72,U+8eb2,U+8fed,U+901b,U+902e,U+906e,U+9091,U+90aa,U+90af,U+915d,U+9171,U+946b,U+9489,U+9499,U+94a5,U+9508,U+9524,U+952d,U+9551,U+9576,U+95f7,U+9600,U+96b6,U+96c0,U+9756,U+97f6,U+98a0,U+98a4,U+997f,U+9a73,U+9a86,U+9ad3,U+9e3d,U+9ed4"}},{uri:gD,descriptors:{unicodeRange:"U+4e4d,U+4e5e,U+4ec7,U+4ed5,U+50da,U+50e7,U+515c,U+51a4,U+51ff,U+5203,U+5254,U+5300,U+533e,U+5375,U+53ee,U+5435,U+543b,U+5455,U+548b,U+548f,U+54d7,U+54fa,U+5578,U+5587,U+55a7,U+560e,U+5760,U+576f,U+5777,U+5830,U+58a9,U+5962,U+59e8,U+5a07,U+5a23,U+5a3c,U+5b5a,U+5bb5,U+5bc5,U+5bde,U+5c7f,U+5cb1,U+5ce8,U+5cea,U+5d29,U+5d4c,U+5e18,U+5f57,U+5f5d,U+5f87,U+5ff1,U+6016,U+601c,U+6064,U+6177,U+61d2,U+625b,U+62e3,U+62f1,U+634f,U+63a0,U+6401,U+6405,U+6495,U+64c2,U+6512,U+6577,U+6590,U+65a7,U+65a9,U+65f7,U+6627,U+6655,U+6714,U+6795,U+67d1,U+67ff,U+68b3,U+68d5,U+68d8,U+6930,U+6960,U+6977,U+69bb,U+69d0,U+6a31,U+6b7c,U+6bb4,U+6c22,U+6c72,U+6c79,U+6c7e,U+6c81,U+6c93,U+6ca5,U+6cbc,U+6ce3,U+6cfb,U+6d3c,U+6da9,U+6df3,U+6e2d,U+6eaf,U+6ec7,U+6f13,U+6f33,U+6f62,U+6fa1,U+7011,U+707c,U+708a,U+70c1,U+70d8,U+70eb,U+711a,U+7194,U+7281,U+7316,U+7357,U+7384,U+7405,U+742a,U+745b,U+7574,U+7578,U+75ea,U+7682,U+7792,U+77d7,U+77e9,U+77eb,U+77f6,U+780c,U+78c5,U+7941,U+79e4,U+7a1a,U+7a9c,U+7ad6,U+7b5d,U+7bf7,U+7c07,U+7c3f,U+7c9f,U+7ca5,U+7cdf,U+7e82,U+7eab,U+7ece,U+7eda,U+7f09,U+7f15,U+7f9e,U+7fdf,U+7fe9,U+803b,U+803d,U+80aa,U+80b4,U+813e,U+8155,U+817b,U+819d,U+821c,U+82b9,U+82df,U+82ef,U+8304,U+83b9,U+8446,U+853d,U+85af,U+85fb,U+8650,U+865e,U+86d9,U+86ee,U+8700,U+8862,U+889c,U+88d4,U+88f8,U+895f,U+8a79,U+8bb3,U+8bb6,U+8bc0,U+8beb,U+8bf5,U+8c23,U+8c79,U+8d1e,U+8dcb,U+8e29,U+8e44,U+8e81,U+8eac,U+8eaf,U+8f8d,U+9050,U+90f8,U+914b,U+948a,U+94be,U+94ee,U+950c,U+9540,U+962e,U+9647,U+9661,U+9699,U+96cf,U+9716,U+9761,U+97a0,U+97e7,U+9a7c,U+9a8f,U+9ae6,U+9cd6,U+9e26"}},{uri:bD,descriptors:{unicodeRange:"U+4fa3,U+4fae,U+4fd8,U+4fef,U+50a3,U+5189,U+5195,U+51db,U+51f3,U+51f9,U+5220,U+5228,U+5288,U+52ff,U+532e,U+533f,U+5351,U+53db,U+53ed,U+5450,U+5484,U+5490,U+54c9,U+54e9,U+5501,U+5507,U+5543,U+55d3,U+56a3,U+575e,U+589f,U+5984,U+59ec,U+5a04,U+5a36,U+5a77,U+5a9a-5a9b,U+5ab2,U+5ac2,U+5ad6,U+5bc7,U+5c2c,U+5c34,U+5c51,U+5cd9,U+5d0e,U+5deb,U+5e3c,U+5e87,U+5ed3,U+5f13,U+5f64,U+5fe1,U+606a,U+6096,U+60df,U+60f6,U+60f9,U+6151,U+620e,U+6241,U+6252,U+6273,U+627c,U+6289,U+62c2,U+62cc,U+62ef,U+6361,U+6363,U+63b7,U+63e3,U+6518,U+66ae,U+6756,U+6789,U+6813,U+6829,U+6862,U+6866,U+6893,U+6897,U+690e,U+6984,U+69cc,U+6a1f,U+6a44,U+6a59,U+6ba1,U+6c13,U+6c90,U+6ca6,U+6cbd,U+6ccc,U+6cd3,U+6cd7,U+6d4a,U+6d4f,U+6d5a,U+6d9f,U+6da1,U+6dcc,U+6ea5,U+6ee4,U+6ee6,U+6f2f,U+6f8e,U+701a,U+7095,U+709c,U+70af,U+70db,U+70e8,U+714e,U+715e,U+71a0,U+71ce,U+7235,U+7280,U+72d0,U+72f8,U+73ab,U+7410,U+745c,U+7480,U+74a7-74a8,U+74e3,U+75ae,U+75f9,U+76b1,U+76ce,U+7736,U+77e2-77e3,U+781a,U+789f,U+797a,U+79be,U+79c3,U+79c6,U+79f8,U+7a8d,U+7a98,U+7aa6,U+7aff,U+7b1b,U+7cd9,U+7d6e,U+7ede,U+7eee,U+7f00,U+7f24,U+7f2d,U+7fd8,U+800d,U+8116,U+8151,U+81b3,U+8205,U+82c7,U+82db,U+832c,U+8335,U+8339,U+8386,U+846b,U+8587,U+8611,U+8682,U+868a,U+868c,U+8774,U+88d8,U+88f4,U+8912,U+8b6c,U+8bbd,U+8c0e,U+8c41,U+8d26,U+8d3b-8d3c,U+8d50,U+8dea,U+8e35,U+8f99,U+8fe2,U+8fe9,U+9017,U+914c,U+916f,U+9175-9176,U+918b,U+94a0,U+94ae,U+94ce,U+94f2,U+951a,U+952f,U+9541,U+9640,U+9672,U+968b,U+96cd,U+96ef,U+9713,U+97ec,U+9885,U+9992,U+9a6d,U+9a79,U+9a85,U+9cbb,U+9cd7,U+9cde,U+9e93,U+9f9f"}},{uri:vD,descriptors:{unicodeRange:"U+4e11,U+4ed7,U+4fcf,U+4fe9,U+4fed,U+50ac,U+50b2,U+5112,U+5180,U+5188,U+51f6,U+522e,U+5265,U+52cb,U+52df,U+5349,U+5367,U+5378,U+537f,U+5395,U+5398,U+53d4,U+543e,U+5440,U+5446,U+54b8,U+5565-5566,U+5580,U+55bb,U+56ca,U+572d,U+573e,U+574e,U+5782-5784,U+58f3,U+5938-5939,U+5948,U+594e,U+5a1c,U+5a74,U+5ae9,U+5b55,U+5b5c,U+5bb0,U+5bd3,U+5bf8,U+5c3f,U+5d14,U+5d2d,U+5df7,U+5dfe,U+5e05-5e06,U+5e1c,U+5e62,U+5e7b,U+5e7d,U+5ed6,U+5f2f,U+5f66,U+5f6c,U+5fa1,U+604b,U+609f,U+60a6,U+60e8,U+6101,U+6124,U+6127,U+6148,U+61be,U+6247,U+62d8,U+62da,U+633d,U+635e,U+6367,U+6380,U+638f,U+63a9,U+63fd,U+641c,U+64e6,U+655e,U+6572,U+6591,U+65a5,U+6691,U+6735,U+67a2-67a3,U+67ef,U+680b,U+6876,U+6905,U+6a0a,U+6a61,U+6b79,U+6bb7,U+6bbf,U+6c41,U+6c55,U+6c83,U+6c9b,U+6ca7,U+6cfc,U+6d46,U+6d51,U+6d74,U+6d9d,U+6daf,U+6dc0,U+6deb,U+6e17,U+6e24,U+6e89,U+6ea2,U+6ef4,U+6f6d,U+707f,U+70b3,U+70e4,U+70ef,U+710a,U+722c,U+725f,U+7261,U+72ee,U+72f1,U+730e,U+732b,U+7433,U+7538,U+75bc,U+7624,U+7709,U+7750,U+7779,U+7802,U+7898,U+78a7,U+78b1,U+78cb,U+78f7,U+7984,U+7a83,U+7aed,U+7b3c,U+7b4b,U+7c92,U+7c98,U+7ca4,U+7eb9,U+7ee3,U+7ef3,U+7ef5,U+7f05,U+7f55,U+7f62,U+7fc1,U+7fd4,U+7fe0,U+8042,U+806a,U+80a0,U+80a4,U+80c3,U+8102,U+8106,U+814a,U+8154,U+8247,U+8258,U+82cd,U+8328,U+832b,U+8389,U+83ca,U+845b,U+846c,U+84b8,U+8574,U+859b,U+8680,U+8695,U+86c7,U+8702,U+886c,U+8896,U+88b1,U+88e4,U+8bc8,U+8c10,U+8c26,U+8c28,U+8c2d,U+8d4c,U+8d63,U+8f67,U+8f74,U+8fc4,U+9006,U+9063,U+90a2,U+90b1,U+90c1,U+9177,U+9189,U+9493,U+949e,U+94fe,U+9610,U+961c,U+96a7,U+96fe,U+978d,U+97f5,U+9888,U+997c,U+9a84,U+9b3c,U+9b44-9b45,U+9b54,U+9e64,U+9f0e,U+9f9a"}},{uri:xD,descriptors:{unicodeRange:"U+4e19,U+4e38,U+4e53,U+4e7e,U+4e9f,U+4ec6,U+4f50,U+4fde,U+502a,U+5154,U+517d,U+51d1,U+51f0,U+5239,U+5256,U+52c9,U+52fe,U+5308,U+532a,U+535c,U+5384,U+53a2,U+53a8,U+53c9,U+53e0,U+5496,U+54ac,U+54c0,U+54c4,U+54e8,U+5561,U+5582,U+561b,U+5631,U+566a,U+5764,U+576a,U+5792,U+57ab,U+584c,U+5885,U+58f6,U+59a8,U+5acc,U+5bc2,U+5c38-5c39,U+5c60,U+5c6f,U+5c82,U+5c90,U+5d16,U+5dcd,U+5e37,U+5e90,U+5eb8,U+5f6a,U+5fcc,U+6012,U+6068,U+6073,U+607c,U+6094,U+6109,U+621a,U+626e,U+6284,U+62d0,U+62e6,U+62fe,U+6321,U+6328,U+632b,U+6349,U+6454,U+65ed,U+660f,U+6674,U+66a8,U+6749,U+674f,U+6760,U+67af,U+6850,U+6854,U+6869,U+68a8,U+68d2,U+68f5,U+6912,U+6b49,U+6b6a,U+6bef,U+6c28,U+6c5d,U+6c82,U+6cab,U+6cb8,U+6cc4,U+6cf5,U+6d47,U+6d78,U+6da4,U+6dc4,U+6dcb,U+6df9,U+6e0a,U+6e23,U+6e5b,U+6eb6,U+6f06,U+6f47,U+6f84,U+6f9c,U+6fd2,U+7076,U+70ac,U+7199,U+723d,U+72ac,U+72ed,U+7476,U+7529,U+752b,U+754f,U+7554,U+75d5,U+7626,U+76ef,U+7720,U+7766,U+7784,U+77ac,U+780d,U+7838,U+7845,U+786b,U+78b3,U+7978,U+79b9,U+79c9,U+79e7,U+7a3d,U+7a84,U+7a9f,U+7b0b,U+7b52,U+7c7d,U+7f1a,U+7fc5,U+7ff0,U+804a,U+8086-8087,U+808c,U+809a,U+80ba,U+810a,U+8180,U+818f,U+81c2,U+81ed,U+8231,U+8292,U+829c,U+82a6,U+82d1,U+8346,U+838e,U+839e,U+83c7,U+83f1,U+8403,U+840e,U+8513,U+857e,U+85e4,U+867e,U+871c,U+87ba,U+87f9,U+884d,U+8944,U+8a93,U+8c05,U+8d2c,U+8d2e,U+8d42-8d43,U+8dfb,U+8e22,U+8eba,U+8f69,U+8f9c,U+8fa3,U+8fa8,U+8fb1,U+900a,U+9038,U+903b,U+9042,U+904f,U+90b5,U+90dd,U+9102,U+9187,U+94a7,U+94c5,U+9523,U+95f8,U+95fd,U+960e,U+964b-964c,U+96c1,U+9709,U+971c,U+97ad,U+9882,U+9965,U+9976,U+9988,U+99a8,U+9a82,U+9a9a,U+9b41,U+9c8d,U+9e45,U+9e70,U+9e9f,U+9f3b,U+9f7f"}},{uri:yD,descriptors:{unicodeRange:"U+4e08,U+4e18,U+4e1b,U+4e22,U+4e27,U+4e32,U+4e52,U+4e73,U+4ead,U+4ed4,U+4ed9,U+4ef0,U+4fa6,U+5076,U+5179,U+51bb,U+51c9,U+51ef,U+51fd,U+524a,U+526a,U+529d,U+52ab,U+5306,U+5339,U+53d9,U+540a,U+5410,U+541e,U+5439,U+54b1,U+54ed,U+5564,U+558a,U+55b7,U+5634,U+574a,U+5751,U+57a6,U+57cb,U+57d4,U+5824,U+582a,U+5835,U+5858,U+5893,U+58e4,U+5951,U+5986,U+59da,U+59fb,U+59ff,U+5a03,U+5a46,U+5ac1,U+5b5d,U+5bfa,U+5c18,U+5c3a,U+5c48,U+5c4f,U+5c61,U+5cb3,U+5d1b,U+5e15,U+5e3d,U+5e99,U+5e9e,U+5eca,U+5f0a,U+5f17-5f18,U+5f25,U+5f7c,U+5fcd,U+6028,U+60a0,U+60ac,U+60d1,U+614e,U+6155,U+6168,U+61c8,U+6208,U+6212,U+6251,U+629a-629b,U+62ab-62ac,U+62fc,U+6323,U+632a,U+63d2,U+643a,U+6491-6492,U+649e,U+64b0,U+64c5,U+659c,U+6614,U+662d,U+6664,U+6670,U+6676,U+6746,U+67cf,U+67d4,U+682a,U+6843,U+6846,U+68da,U+6b3a,U+6b67,U+6c27,U+6c5b,U+6c64,U+6c70,U+6caa,U+6cca,U+6ce1,U+6d12,U+6d45,U+6dd1,U+6dd8,U+6e34,U+6e7f,U+6ee5,U+6f02,U+7092,U+70c2,U+70e6,U+7115,U+7237,U+7272,U+727a,U+72c2,U+739b,U+73b2,U+743c,U+751c,U+758f,U+75b2,U+7686,U+76c6,U+76d2,U+76fc,U+775b,U+77a9,U+7816,U+788e,U+7897,U+78b0,U+79bd,U+7a0d,U+7a91,U+7a9d,U+7ae3,U+7bad,U+7cca,U+7d2b,U+7eb1,U+7f06,U+7f14,U+7f1d,U+7f50,U+7ffc,U+8036,U+80bf,U+80c1,U+80ce,U+80f8,U+8109,U+810f,U+8170,U+8179,U+819c,U+821f,U+8230,U+8236,U+8273,U+829d,U+82f9,U+8305,U+8350,U+83b2,U+83cc,U+8404,U+840d,U+8427,U+8482,U+8679,U+8854,U+886b,U+8bbc,U+8be6,U+8c31,U+8c6b,U+8d4b,U+8dcc,U+8e2a,U+8e48,U+8f90,U+8fb0,U+9022,U+903c,U+903e,U+9065,U+916c,U+917f,U+94a9,U+94c3,U+94dd,U+94ed,U+9510,U+953b,U+96c7,U+970d,U+9738,U+9877,U+987d,U+989c,U+98d8,U+9a70,U+9a91,U+9aa4,U+9b42,U+9b4f,U+9e2d,U+9e3f,U+9e7f,U+9f20"}},{uri:wD,descriptors:{unicodeRange:"U+4e59,U+4ed3,U+4f0f,U+4f38,U+4f69,U+4fa7,U+4faf,U+4ff1,U+5077,U+5085,U+5144,U+5151,U+51af,U+51b6,U+51cc,U+523a,U+5251,U+5269,U+5272,U+52d8,U+5353,U+5389,U+53f9,U+5401,U+5415,U+541b,U+54f2,U+5524,U+554a,U+559d,U+5609,U+5740,U+575d,U+5806,U+5821,U+586b,U+5915,U+594f,U+5960,U+5999,U+59a5,U+59b9,U+59c6,U+59d1,U+59dc,U+5b5f,U+5b64,U+5b87,U+5bb4,U+5bbf,U+5c16,U+5c1d,U+5c3e,U+5c9a,U+5ca9,U+5cad,U+5cfb,U+5de1,U+5de7,U+5de9,U+5ef7,U+5f04,U+5f70,U+5f79,U+5fc6,U+602a,U+6050,U+6052,U+6070,U+6084,U+60b2,U+60dc,U+60e9,U+6167,U+6170,U+61c2,U+6270,U+6291,U+62b1,U+62bc,U+62dc,U+62df,U+62f3,U+6324,U+633a,U+6377,U+6398,U+63cf,U+640f,U+642c-642d,U+6458,U+6478,U+6500,U+654c,U+6566,U+658c,U+65c1,U+65cb,U+65e8,U+65ec,U+6696-6697,U+6734,U+679a,U+679d,U+67dc,U+67f3-67f4,U+680f,U+683d,U+684c,U+68af,U+699c,U+6bc1,U+6c0f,U+6c1b,U+6c57,U+6c6a,U+6d3d,U+6d6e,U+6d82,U+6db5,U+6dee,U+6e58,U+6eaa,U+6ecb,U+6ede,U+6ee9,U+6f0f,U+6f20,U+6f58,U+704c,U+7070,U+70b8,U+718a,U+7238,U+7262,U+7275,U+72b9,U+72d7,U+72e0,U+741b,U+7434,U+7483,U+74f6-74f7,U+75ab,U+764c,U+7761,U+7855,U+7891,U+78c1,U+79d2,U+7a00,U+7a3b,U+7c97,U+7ea4,U+7eb2,U+7ed2,U+7eea,U+7ef8,U+7f18,U+7fbd,U+8000,U+8010,U+8096,U+809d,U+80a9,U+817f,U+81e3,U+8206,U+8212,U+82ac,U+8302,U+8361,U+8377,U+83f2,U+8461,U+848b,U+84ec,U+8521,U+85aa,U+8870,U+8877,U+8881,U+888b,U+88ad,U+88c2,U+8986,U+8bd1,U+8bf1,U+8d24,U+8d2a,U+8d3e-8d3f,U+8d41,U+8d56,U+8d64,U+8d6b,U+8e0f,U+8f70,U+8f85,U+8f88,U+8fa9,U+9003,U+901d,U+90b9,U+90ce,U+94a6,U+94f8,U+9505,U+95ea,U+95ef,U+95f2,U+95f9,U+9601,U+9605,U+9634,U+966a,U+9677,U+9690,U+9694,U+96d5,U+971e,U+9896-9897,U+9972,U+9a71,U+9a76,U+9a7e,U+9e1f,U+9e23"}},{uri:ED,descriptors:{unicodeRange:"U+4e01,U+4e43,U+4ea6,U+4ef2,U+4eff,U+4f26,U+4f2a,U+4f2f,U+4f5b,U+4fa8,U+4fca,U+4fd7,U+5021,U+504f,U+5141,U+51c0,U+51dd,U+51e4,U+51ed,U+5200,U+5237,U+5427,U+5448,U+54a8,U+5706,U+5708,U+5723,U+575b,U+57c3,U+5899,U+58a8,U+58c1,U+5976,U+5988,U+59bb,U+59d0,U+59d3,U+5a18,U+5a31,U+5a92,U+5b54,U+5b85,U+5baa-5bab,U+5bc4,U+5bd2,U+5be8,U+5bff,U+5c65,U+5d07,U+5e1d,U+5e78,U+5e7c,U+5f03,U+5f1f,U+5f39,U+5f6d,U+5f92,U+5faa,U+5fbd,U+5fe7,U+5ffd,U+60a8,U+60ef,U+6108,U+6162,U+622a,U+6234,U+626b,U+626d,U+62c6,U+62d2,U+62d4,U+62d6,U+62e8,U+6316,U+6355,U+63ed,U+6447,U+64a4,U+65f1,U+6606,U+6628,U+664b,U+6668,U+6682,U+66f9,U+66fc,U+66ff,U+6717,U+6740,U+676d,U+67aa,U+67ec,U+67f1,U+6842,U+6851,U+695a,U+6982,U+6a2a,U+6b20,U+6b23,U+6b32,U+6b96,U+6bc5,U+6beb,U+6c60,U+6c9f,U+6cea,U+6cf3,U+6d1e,U+6d53,U+6d66,U+6d69,U+6d8c,U+6d9b,U+6db2,U+6de1,U+6dfb,U+6e14,U+6ed1,U+6eda,U+6ee8,U+6f2b,U+706d,U+7089,U+708e,U+70ad-70ae,U+70e7,U+7126,U+714c,U+71c3,U+71d5,U+7206,U+7259,U+731b,U+73a9,U+73bb,U+74dc,U+7532,U+7545,U+755c,U+75c7,U+7687,U+76d7,U+76f2,U+788d,U+78e8,U+79e6,U+79e9,U+7a3f,U+7a46,U+7a97,U+7af9,U+7bee,U+7c4d,U+7c89,U+7cd6,U+7eb5,U+7ebd,U+7ed8,U+8017,U+8033,U+80c0,U+80de,U+80f6,U+8138,U+817e,U+81a8,U+820d,U+827e,U+82b3,U+82d7,U+83b1,U+84c4,U+84dd,U+8584,U+864e,U+865a,U+866b,U+86cb,U+88d5,U+89e6,U+8bca,U+8bde,U+8bfa,U+8c0a,U+8c37,U+8c46,U+8c6a,U+8c8c,U+8d1d,U+8d29,U+8d4f,U+8d54,U+8d5a,U+8d60,U+8d62,U+8f7f,U+8f96,U+8f9e-8f9f,U+8fc1,U+8fdf,U+8fea,U+8ff7,U+9012,U+906d,U+9075,U+90a6,U+90bb,U+90ca,U+9178,U+9192,U+91ca,U+94bb,U+94dc,U+94fa,U+9501,U+950b,U+9521,U+955c,U+963b,U+9655,U+9675-9676,U+9887,U+9891,U+9971,U+9a97,U+9ece,U+9ed8"}},{uri:SD,descriptors:{unicodeRange:"U+4e1d,U+4e39,U+4e4c,U+4e4f,U+4e54,U+4e58,U+4e95,U+4ea1,U+4eab,U+4eae,U+4ec1,U+4f10,U+4f19,U+4f30,U+4f34,U+4fb5,U+503e,U+518c,U+5192,U+51a0,U+51ac,U+51b0,U+51e1,U+5211,U+5242,U+52a3,U+52b2,U+52c3,U+52c7,U+52d2,U+52e4,U+5377,U+539a,U+53a6,U+53e5,U+5417,U+5510,U+552f,U+5531,U+574f-5750,U+5761,U+5851,U+5854,U+58ee,U+593a,U+5949,U+5954,U+5a5a,U+5b8b,U+5bbd,U+5c04,U+5c0a,U+5c4b,U+5ce1,U+5cf0,U+5e10,U+5e8a,U+5e9f,U+5ec9,U+5f31,U+5f84,U+5fd8-5fd9,U+5fe0,U+6015,U+6062,U+6069,U+6076,U+6089,U+60a3,U+60ca,U+620f,U+624e,U+6263,U+6298,U+62a2,U+62bd,U+6311,U+6350,U+6389,U+638c,U+63f4,U+6446,U+644a,U+6469,U+64cd,U+654f,U+6562,U+656c,U+65d7,U+65e6,U+65fa,U+660c,U+6653,U+66b4,U+670b,U+672b,U+676f-6770,U+6881,U+6885,U+68a6,U+68cb,U+68ee,U+6b8a,U+6c88-6c89,U+6cc9,U+6ce5,U+6d01,U+6d17,U+6d1b,U+6d59,U+6d6a,U+6da8,U+6df7,U+6e10,U+6e20-6e21,U+6f5c,U+706f,U+70bc,U+719f,U+7267,U+732a,U+73cd,U+7518,U+756a,U+7586,U+7591,U+75db,U+76c8,U+76d0,U+76d6,U+76d8,U+76df,U+76fe,U+77db,U+7801,U+786c,U+795d,U+7965,U+79cb,U+7a77,U+7a7f,U+7aef,U+7b11,U+7bb1,U+7bc7,U+7ea0,U+7eaf,U+7ed5,U+7edc,U+7f13,U+7f29,U+7f34,U+7f8a,U+7ffb,U+8015,U+8058,U+805a,U+8083,U+80af,U+80c6,U+80cc,U+811a,U+8150,U+82e5,U+8336,U+8352,U+83ab,U+8428,U+8463,U+852c,U+8861,U+89c8,U+8bcd,U+8bd7,U+8bda,U+8be2,U+8bef,U+8bf8,U+8c0b,U+8c13,U+8d34,U+8d3a,U+8d74,U+8d76,U+8da3,U+8dd1,U+8ddd,U+8ddf,U+8df3,U+8f68,U+8f6f,U+8f7d,U+8f91,U+8f9b,U+8fbd,U+8fc8,U+8fd4,U+8feb,U+8ff9,U+900f,U+9057,U+907f-9080,U+90d1,U+90ed,U+91ce,U+9519,U+9526,U+95ed,U+9614,U+9635,U+9644,U+9686,U+96c5,U+96ea,U+9707,U+9732,U+9759,U+978b,U+9876,U+9881,U+9910,U+996e,U+9970,U+9c81,U+9e21,U+9ebb,U+9f84"}},{uri:kD,descriptors:{unicodeRange:"U+4e3d,U+4e4e,U+4e71,U+4e8f,U+4ed8,U+4eea,U+4f0a,U+4f0d,U+4f11,U+4f1f,U+4f24,U+4f3c,U+4f73,U+4fc4,U+500d,U+5012,U+501f,U+503a,U+505c,U+507f,U+50a8,U+514d,U+5178,U+517c,U+51b2,U+51b7,U+520a,U+5238,U+523b,U+52b1,U+535a,U+5371,U+5385,U+53eb-53ec,U+53f3,U+53f6,U+5409,U+542b,U+542f,U+5434,U+5462,U+5473,U+547c,U+54c8,U+54ea,U+56fa,U+5733,U+5757,U+5766,U+5802,U+585e,U+590f,U+591c,U+591f,U+5947,U+594b,U+5987,U+5a01,U+5b59,U+5b63,U+5b88,U+5b97,U+5b9c,U+5bbe,U+5bfb,U+5c01,U+5c1a,U+5c24,U+5c3c,U+5c97,U+5c9b,U+5cb8,U+5de6,U+5e01,U+5e2e,U+5e45,U+5e55,U+5e84,U+5ef6,U+5f02,U+5f52,U+5f69,U+5f7b,U+5f90,U+5fae,U+6000,U+600e,U+6025,U+60e0,U+6276,U+6297,U+62b5,U+62cd,U+62d3,U+62e5,U+62e9,U+62ff,U+6302,U+632f,U+63e1,U+6444,U+64ad,U+653b,U+6551,U+6563,U+65a4,U+65e7,U+6620,U+667a,U+66f2,U+671d,U+6731,U+6742,U+675f,U+6768,U+677e-677f,U+6790,U+67b6,U+67d3,U+6863,U+68b0,U+68c9,U+690d,U+6b8b,U+6bcd,U+6bd2,U+6bd5,U+6c38,U+6c61,U+6cbf,U+6cdb,U+6cf0,U+6d2a,U+6d89,U+6da6,U+6f6e,U+6fb3,U+7075,U+707e,U+70df,U+7164,U+7236,U+725b,U+7389,U+73e0,U+745e,U+74e6,U+751a,U+7537,U+75be,U+76ae,U+76db,U+793c,U+7956,U+7981,U+79d8,U+79df,U+79fb,U+7adf,U+7ae5,U+7b14,U+7b26,U+7b54,U+7b79,U+7d2f,U+7eb8,U+7eba,U+7ec6,U+7ee9,U+7eff,U+7f5a,U+7f6a,U+7f72,U+8089,U+80a5,U+80e1,U+8111,U+8131,U+821e,U+822c,U+8270,U+8499,U+8651,U+867d,U+8840,U+8857,U+8863,U+88c1,U+89c9,U+89d2,U+8a89,U+8bed,U+8bfe,U+8c01,U+8c22,U+8d21,U+8d25,U+8d2f,U+8d5e,U+8d75,U+8d8b,U+8dc3,U+8de8,U+8df5,U+8f6e,U+8f86,U+8f89,U+8fc5,U+8ff0,U+8ffd,U+9014,U+904d,U+90ae,U+9274,U+949f,U+952e,U+969c,U+96c4,U+96e8,U+96f6-96f7,U+97e9,U+987f,U+996d,U+9a7b,U+9aa8,U+9c7c,U+9c9c,U+9e4f,U+9f13,U+9f50"}},{uri:CD,descriptors:{unicodeRange:"U+4e13,U+4e16,U+4e1c,U+4e24,U+4e3e,U+4e49,U+4e61,U+4e66,U+4e89,U+4e8c,U+4e94,U+4e9b,U+4ea4,U+4eac,U+4ebf,U+4eca,U+4ef6-4ef7,U+4efb,U+4f18,U+4f20,U+4f46,U+4f7f,U+4fe1,U+503c,U+505a,U+5146,U+5148,U+515a,U+5171,U+5177,U+519b,U+51b3,U+51c6,U+51e0,U+5212,U+521b,U+522b,U+529e,U+52bf,U+534e-534f,U+5355,U+5357,U+5382,U+539f,U+53bb,U+53bf,U+53c2,U+53c8,U+53ca,U+53d6-53d8,U+53e3,U+53ea,U+53f0,U+540d,U+5411,U+56db,U+56de,U+56e0,U+56e2,U+578b,U+57ce,U+57fa,U+589e,U+5904,U+5934,U+5982,U+5b89,U+5b8c,U+5bfc,U+5c06,U+5c11,U+5c40,U+5c71,U+5e38,U+5e72,U+5e76,U+5e7f,U+5e94,U+5e9c,U+5f0f,U+5f15,U+5f20,U+5f3a,U+5f62,U+5f88,U+5fc5,U+5fd7,U+5feb,U+601d,U+6027,U+60c5,U+60f3,U+610f,U+6216,U+6218,U+624b,U+624d,U+6279,U+628a,U+6295,U+6301,U+6307,U+636e,U+63a5,U+63a8,U+652f,U+6536,U+653e,U+6548,U+6559,U+6570,U+65bd,U+65e0,U+6602,U+660e,U+6613,U+66f4,U+6700,U+670d,U+671f,U+672f,U+6743,U+674e,U+6751,U+6761,U+6784,U+6797,U+679c,U+67e5,U+6807,U+6837,U+683c,U+6b21,U+6b63-6b65,U+6bcf,U+6bd4,U+6c42,U+6c5f,U+6ca1,U+6cbb,U+6d3b,U+6d41,U+6d88,U+6df1,U+70b9,U+7136,U+7269,U+7279,U+7531,U+754c,U+767e,U+76ca,U+76f8,U+770b,U+7740,U+7814,U+79ef,U+7a0b,U+7a0e,U+7a76,U+7b80,U+7cbe,U+7cfb,U+7e41,U+7ea7,U+7ec4,U+7ec7,U+7ed3,U+7ed9,U+7edf,U+7f8e,U+8001,U+804c,U+8054,U+80b2,U+81f3,U+8425,U+8868,U+88ab,U+897f,U+89c1-89c2,U+89c4,U+89c6,U+89e3,U+8ba1,U+8ba4,U+8bae,U+8bb0,U+8bba,U+8bc1,U+8c03,U+8d28,U+8d39,U+8def,U+8f66,U+8f6c,U+8fd0-8fd1,U+9020,U+9053,U+90a3,U+90fd,U+91cc,U+9500,U+9547,U+95e8,U+95f4,U+961f,U+9645,U+9662,U+96be,U+96c6,U+9700,U+9769,U+97e6,U+9875,U+9879,U+9886,U+9898,U+98ce,U+9996,U+2b5af,U+2cc56,U+2e9f5,U+30edd-30ede"}},{uri:MD,descriptors:{unicodeRange:"U+4e03,U+4e30,U+4e34,U+4e45,U+4e60,U+4e70,U+4e88,U+4e91-4e92,U+4ea9,U+4eb2,U+4ec0,U+4ecb,U+4ecd,U+4ee4,U+4fee,U+5019,U+5047,U+50cf,U+5145,U+516d,U+5170,U+5175,U+5199,U+51cf,U+51fb,U+521a,U+5224,U+5267,U+52aa,U+5347-5348,U+534a,U+5356,U+5361,U+536b,U+5370,U+538b,U+53e4,U+53e6,U+5403,U+5426,U+5428,U+542c,U+5438,U+5668,U+56ed,U+56f4,U+56fe,U+57df,U+592a,U+5957,U+5b69,U+5b81,U+5b8f,U+5b98,U+5b9d,U+5ba1,U+5ba4,U+5bb3,U+5bc6,U+5bdf,U+5c3d,U+5c5e,U+5c81,U+5ddd,U+5de8,U+5dee,U+5e0c,U+5e86,U+5e8f,U+5e93,U+5e95,U+5e97,U+5ea7,U+5ead,U+5eb7,U+5f55,U+5f81,U+5f85,U+5ff5,U+6001,U+613f,U+6258,U+6267,U+6269,U+626c,U+627e,U+62db,U+62ec,U+6325,U+635f,U+6362,U+6388,U+6392,U+63a2,U+63a7,U+63aa,U+641e,U+6545,U+6597,U+65e2,U+65e9,U+661f,U+665a,U+666e-666f,U+66fe,U+6728,U+67d0,U+6811,U+6838,U+6865,U+697c,U+6b22,U+6b27,U+6b4c,U+6b62,U+6b66,U+6b7b,U+6bdb,U+6c47,U+6c49,U+6c7d,U+6c99,U+6cfd,U+6d0b,U+6d25,U+6d32,U+6d3e,U+6d4b,U+6e29,U+6e56,U+6e7e,U+6f14,U+6fc0,U+706b,U+70c8,U+7247,U+72af,U+72b6,U+72ec,U+732e,U+73ed,U+7403,U+7533,U+753b,U+7559,U+7565,U+7597,U+767b,U+773c,U+7763,U+77ed,U+77ff,U+7968,U+798f,U+79bb,U+79c0-79c1,U+7ad9,U+7ae0,U+7b51,U+7b7e,U+7cae,U+7d22,U+7ea2,U+7eb3,U+7eb7,U+7ec3,U+7ec8,U+7ecd,U+7edd,U+7efc,U+7f16,U+7f3a,U+7f51,U+7f57,U+7f6e,U+80dc,U+822a,U+8239,U+826f,U+82cf,U+82e6,U+8349,U+8363,U+83dc,U+8457,U+85cf,U+878d,U+8865,U+8a00,U+8b66,U+8ba2,U+8ba8,U+8bad,U+8bb2,U+8bc9,U+8bd5,U+8bfb,U+8d2b,U+8d35,U+8d37,U+8f7b,U+8f93,U+8fce,U+8fdd,U+9000-9002,U+9010,U+9047,U+9093,U+9152,U+9488,U+94a2,U+9633,U+9636,U+963f,U+9646,U+9648,U+964d,U+9664,U+9669,U+9760,U+97f3,U+987a,U+987e,U+9884,U+98de,U+9986,U+9ed1"}},{uri:ID,descriptors:{unicodeRange:"U+4e14,U+4e25,U+4e48,U+4e50,U+4e5d,U+4e9a,U+4ec5,U+4efd,U+4f17,U+4f4e-4f4f,U+4f55,U+4f59,U+4f60,U+4f8b,U+4f9b,U+4f9d,U+4fbf,U+4fc3,U+5065,U+513f,U+5149,U+514b,U+516b,U+5174,U+517b,U+518d,U+51b5,U+5207,U+5217-5219,U+521d,U+526f,U+529f,U+52a9,U+52b3,U+5305,U+533b,U+5343,U+5360,U+5373-5374,U+5386,U+53cb-53cd,U+53f2,U+53f7,U+544a,U+5468,U+547d,U+54cd,U+552e,U+5584,U+56f0,U+571f,U+5747,U+575a,U+57f9,U+5883,U+58eb,U+58f0,U+5907,U+590d,U+592e,U+5931,U+5956,U+5965,U+5973,U+5979,U+59cb,U+5b57-5b58,U+5b83,U+5ba2-5ba3,U+5bb9,U+5bcc,U+5c42,U+5c45,U+5c4a,U+5dde,U+5df1,U+5df4,U+5e03,U+5e08,U+5e26,U+5e2d,U+5f71,U+5f80,U+5f8b,U+5fb7,U+606f,U+611f,U+6237,U+623f,U+6253,U+627f,U+6293,U+62a4,U+62c5,U+62c9,U+6309,U+6574,U+6599,U+65ad,U+65af,U+65c5,U+65cf,U+6625,U+663e,U+671b,U+672a,U+6750,U+6781,U+6821,U+6839,U+6848,U+68c0,U+6a21,U+6b3e,U+6bb5,U+6c14,U+6cb3,U+6cb9,U+6ce8,U+6e05,U+6e2f,U+6e38,U+6e90,U+6ee1,U+70ed,U+7167,U+7231,U+7248,U+724c,U+7387,U+738b,U+73af,U+7530,U+75c5,U+767d,U+76d1,U+76f4,U+771f,U+77e5,U+77f3,U+7834,U+7840,U+786e,U+793a,U+795e,U+79f0,U+7a33,U+7a7a,U+7a81,U+7ade,U+7b56,U+7b97,U+7c73,U+7c7b,U+7d20,U+7d27,U+7ea6,U+7eaa,U+7ebf,U+7ee7,U+7eed,U+7ef4,U+7fa4,U+8003,U+80a1,U+81f4,U+8272,U+827a,U+8282,U+82b1,U+82f1,U+8303,U+836f,U+83b7,U+843d,U+88c5,U+8ba9,U+8baf,U+8bb8,U+8bbf,U+8bc4,U+8bc6,U+8bdd,U+8be5,U+8bf7,U+8c08,U+8c61,U+8d1f,U+8d22-8d23,U+8d27,U+8d2d,U+8d38,U+8d5b,U+8d70,U+8d85,U+8d8a,U+8db3,U+8eab,U+8f83,U+8fb9,U+8fdc,U+8fde,U+9009,U+901f,U+914d,U+91c7,U+94b1,U+94c1,U+94f6,U+95fb,U+9632,U+9650,U+968f,U+9752,U+975e,U+987b,U+989d,U+98df,U+9999,U+9a6c,U+9a8c,U+9ec4,U+9feb-9fec"}},{uri:_D,descriptors:{unicodeRange:"U+98fb-990c,U+990e-990f,U+9911-992d,U+992f-9953,U+9956-9962,U+9964,U+9966,U+9973,U+9978-9979,U+997b,U+997e,U+9982-9983,U+9989,U+998c,U+998e,U+999a-99a4,U+99a6-99a7,U+99a9-99c8"}},{uri:TD,descriptors:{unicodeRange:"U+8e4c-8e50,U+8e53-8e58,U+8e5a-8e65,U+8e67-8e68,U+8e6a-8e6b,U+8e6e,U+8e71,U+8e73,U+8e75,U+8e77-8e7b,U+8e7d-8e7e,U+8e80,U+8e82-8e84,U+8e86,U+8e88-8e8e,U+8e91-8e93,U+8e95-8e9b,U+8e9d,U+8e9f-8eaa,U+8ead-8eae,U+8eb0-8eb1,U+8eb3-8eb9,U+8ebb-8ecd,U+8ecf-8f02"}},{uri:AD,descriptors:{unicodeRange:"U+2e3a,U+3001-3002,U+3008-3011,U+3014-3017,U+301d-301f,U+4dae,U+4e00,U+4e07,U+4e09-4e0b,U+4e0d-4e0e,U+4e1a,U+4e2a,U+4e2d,U+4e3a-4e3b,U+4e4b,U+4e5f,U+4e86,U+4e8b,U+4e8e,U+4ea7,U+4eba,U+4ece,U+4ed1,U+4ed6,U+4ee3,U+4ee5,U+4eec,U+4f01,U+4f1a,U+4f4d,U+4f53,U+4f5c,U+4fdd,U+5143,U+5165,U+5168,U+516c,U+5173,U+5176,U+5185,U+519c,U+51fa,U+5206,U+5229,U+5230,U+5236,U+524d,U+529b,U+52a0-52a1,U+52a8,U+5316-5317,U+533a,U+5341,U+5362,U+53d1,U+53ef,U+53f8,U+5404,U+5408,U+540c,U+540e,U+5458,U+548c,U+54c1,U+54e5,U+5546,U+559c,U+56fd,U+5728,U+5730,U+573a,U+5916,U+591a,U+5927,U+5929,U+592b,U+597d,U+59d4,U+5b50,U+5b66,U+5b9a,U+5b9e,U+5bb6,U+5bf9,U+5c0f,U+5c14,U+5c31,U+5c55,U+5de5,U+5df2,U+5e02,U+5e73-5e74,U+5ea6,U+5efa,U+5f00,U+5f53,U+5f97,U+5fc3,U+603b,U+6210-6211,U+6240,U+6280,U+62a5,U+63d0,U+6539,U+653f,U+6587,U+65b0,U+65b9,U+65e5,U+65f6,U+662f,U+6708-6709,U+672c,U+673a,U+675c,U+6765,U+6c11,U+6c34,U+6cd5,U+6ce2,U+6d4e,U+6d77,U+73b0,U+7406,U+751f,U+7528,U+7535,U+7684,U+76ee,U+793e,U+79cd,U+79d1,U+7acb,U+7b2c,U+7b49,U+7ba1,U+7ecf,U+8005,U+800c,U+80fd,U+81ea,U+884c,U+8981,U+8bbe,U+8bf4,U+8d44,U+8d77,U+8fbe,U+8fc7,U+8fd8-8fd9,U+8fdb,U+901a,U+90e8,U+91cd,U+91cf,U+91d1,U+9485,U+957f,U+95ee,U+9762,U+9ad8,U+9ea6,U+9f99,U+9fcf,U+9fd4,U+9fed,U+fe10-fe19,U+fe30-fe31,U+fe33-fe44,U+ff01,U+ff0c,U+ff1f,U+2b4e7,U+2b7f7,U+2b7fc,U+2cb2d,U+2cb3b,U+2cb4a,U+2cb5b,U+2cb73"}},{uri:jD,descriptors:{unicodeRange:"U+6490,U+6493-6494,U+6497-6498,U+649a-649d,U+649f-64a3,U+64a5-64a8,U+64aa-64ab,U+64af,U+64b1-64b4,U+64b6,U+64b9,U+64bb,U+64bd-64bf,U+64c1,U+64c3-64c4,U+64c6-64cc,U+64cf,U+64d1,U+64d3-64d6,U+64d9-64dd,U+64df-64e1,U+64e3,U+64e5,U+64e7-64ff,U+6501-6508,U+650a-6511,U+6513-6517,U+6519-6524,U+6526-652a,U+652c-652d,U+6530-6533,U+6537,U+653a,U+653c-653d,U+6540-6544,U+6546-6547,U+654a-654b,U+654d-654e,U+6550,U+6552-6554,U+6557-6558,U+655a,U+655c,U+655f-6561,U+6564-6565,U+6567-6568"}},{uri:RD,descriptors:{unicodeRange:"U+9695-9696,U+969a-969b,U+969d-96a6,U+96a8-96af,U+96b1-96b2,U+96b4-96b5,U+96b7-96b8,U+96ba-96bb,U+96bf,U+96c2-96c3,U+96c8,U+96ca-96cb,U+96d0-96d1,U+96d3-96d4,U+96d6-96df,U+96e1-96e7,U+96eb-96ee,U+96f0-96f2,U+96f4-96f5,U+96f8,U+96fa-96fd,U+96ff,U+9702-9703,U+9705,U+970a-970c,U+9710-9712,U+9714-9715,U+9717-971b,U+971d,U+971f-9729,U+972b-972c,U+972e-972f,U+9731,U+9733-9737,U+973a-973d,U+973f-9751,U+9754-9755,U+9757-9758,U+975a,U+975c-975d,U+975f,U+9763-9764,U+9766-9768,U+976a-9770"}},{uri:DD,descriptors:{unicodeRange:"U+6af0-6b1f,U+6b25-6b26,U+6b28-6b31,U+6b33-6b36,U+6b38,U+6b3b-6b3d,U+6b3f-6b42,U+6b44-6b45,U+6b48,U+6b4a-6b4b,U+6b4d-6b58,U+6b5a-6b61,U+6b68-6b69,U+6b6b-6b78,U+6b7a,U+6b7d-6b80,U+6b85,U+6b88,U+6b8c,U+6b8e-6b91,U+6b94-6b95,U+6b97-6b99,U+6b9c-6ba0,U+6ba2-6ba9,U+6bab-6bb2,U+6bb6,U+6bb8-6bba"}},{uri:LD,descriptors:{unicodeRange:"U+430e-439a,U+29e8a,U+29ec4,U+29edb,U+29ee9,U+29f7e,U+29f83,U+29f8c,U+29fce,U+2a01a,U+2a02f,U+2a082,U+2a0f9,U+2a190,U+2a38c"}},{uri:PD,descriptors:{unicodeRange:"U+92ef-933d,U+933f-9369,U+936b-9388"}},{uri:ND,descriptors:{unicodeRange:"U+4512-458d,U+2b300,U+2b363,U+2b36f,U+2b372,U+2b37d,U+2b404,U+2b410,U+2b413,U+2b461,U+2b4ef,U+2b4f6,U+2b4f9,U+2b50d-2b50e,U+2b536,U+2b5ae,U+2b5b3,U+2b5e7,U+2b5f4,U+2b61c-2b61d,U+2b626-2b628,U+2b62a,U+2b62c,U+2b695-2b696,U+2b6ad,U+2b6ed"}},{uri:OD,descriptors:{unicodeRange:"U+88bd-88c0,U+88c3-88c4,U+88c7-88c8,U+88ca-88cd,U+88cf-88d1,U+88d3,U+88d6-88d7,U+88da-88de,U+88e0-88e1,U+88e6-88e7,U+88e9-88ef,U+88f2,U+88f5-88f7,U+88fa-88fb,U+88fd,U+88ff-8901,U+8903-8909,U+890b-890f,U+8911,U+8914-8918,U+891c-8920,U+8922-8924,U+8926-8929,U+892c-892f,U+8931-8933,U+8935,U+8937-8940,U+8942-8943,U+8945-895d,U+8960-8965,U+8967-897a,U+897c-897e,U+8980,U+8982,U+8984-8985"}},{uri:$D,descriptors:{unicodeRange:"U+4b0b-4ba0"}},{uri:FD,descriptors:{unicodeRange:"U+7179,U+717b-717c,U+717e-7183,U+7185-7189,U+718b-718e,U+7190-7193,U+7195-7197,U+719a-719e,U+71a1-71a7,U+71a9-71ab,U+71ad-71b2,U+71b4,U+71b6-71b8,U+71ba-71c2,U+71c4-71cd,U+71cf-71d3,U+71d6-71df,U+71e1-71e4,U+71e6,U+71e8-71ed,U+71ef-71f8,U+71fa-7205,U+7207-721c,U+721e-7227,U+7229,U+722b,U+722d"}},{uri:zD,descriptors:{unicodeRange:"U+982e-9874,U+988b,U+988e,U+9892,U+9895,U+9899,U+98a3,U+98a8-98cd,U+98cf-98d0,U+98d4,U+98d6-98d7,U+98db-98dd,U+98e0-98e6,U+98e9-98fa"}},{uri:BD,descriptors:{unicodeRange:"U+7c14-7c15,U+7c17-7c1e,U+7c20-7c25,U+7c28-7c29,U+7c2b-7c37,U+7c39-7c3e,U+7c42-7c4c,U+7c4e-7c72,U+7c75-7c7a,U+7c7e-7c88,U+7c8a-7c90,U+7c93-7c94,U+7c96,U+7c99-7c9b,U+7ca0-7ca1,U+7ca3,U+7ca6-7ca9,U+7cab-7cad,U+7caf-7cb0,U+7cb4-7cb8,U+7cba-7cbb,U+7cbf-7cc0,U+7cc2-7cc4,U+7cc6,U+7cc9,U+7ccb,U+7cce-7cd4"}},{uri:HD,descriptors:{unicodeRange:"U+7d95-7da5,U+7da7-7dad,U+7daf-7e2a"}},{uri:XD,descriptors:{unicodeRange:"U+4a78-4b0a"}},{uri:WD,descriptors:{unicodeRange:"U+9b30-9b31,U+9b33-9b3a,U+9b3d-9b40,U+9b46,U+9b4a-9b4c,U+9b4e,U+9b50,U+9b52-9b53,U+9b55-9bcf"}},{uri:VD,descriptors:{unicodeRange:"U+6a4b-6a4f,U+6a51-6a57,U+6a5a,U+6a5c-6a60,U+6a62-6a64,U+6a66-6a70,U+6a72-6a78,U+6a7a-6a7b,U+6a7d-6a7f,U+6a81-6a83,U+6a85-6a8d,U+6a8f,U+6a92-6a96,U+6a98-6a9f,U+6aa1-6aa8,U+6aaa,U+6aad-6aef"}},{uri:GD,descriptors:{unicodeRange:"U+99c9-9a53"}},{uri:YD,descriptors:{unicodeRange:"U+8550-8555,U+8557-8558,U+855a-855d,U+855f-8563,U+8565-8567,U+8569-8571,U+8573,U+8575-8578,U+857c-857d,U+857f-8583,U+8586,U+8588-858e,U+8590-859a,U+859d-85a3,U+85a5-85a7,U+85a9,U+85ab-85ad,U+85b1-85b6,U+85b8,U+85ba-85c0,U+85c2-85c8,U+85ca-85ce,U+85d1-85d2,U+85d4,U+85d6-85db,U+85dd-85e3,U+85e5-85e8,U+85ea-85fa,U+85fc-85fe,U+8600-8603"}},{uri:ZD,descriptors:{unicodeRange:"U+6fb2,U+6fb4-6fb5,U+6fb7-6fb8,U+6fba-6fbf,U+6fc1,U+6fc3-6fc8,U+6fca-6fd0,U+6fd3-6fdd,U+6fdf,U+6fe2-6fed,U+6ff0-7010,U+7012-7019,U+701c-7022,U+7024-7034,U+7036-7038,U+703a-704b,U+704d-704e,U+7050-7053"}},{uri:KD,descriptors:{unicodeRange:"U+4ba1-4c2c"}},{uri:qD,descriptors:{unicodeRange:"U+9a54-9a6b,U+9a72,U+9a83,U+9a89,U+9a8d-9a8e,U+9a94-9a95,U+9a99,U+9aa6,U+9aa9-9aaf,U+9ab2-9ab5,U+9ab9,U+9abb,U+9abd-9abf,U+9ac3-9ac4,U+9ac6-9aca,U+9acd-9ad0,U+9ad2,U+9ad4-9ad7,U+9ad9-9ade,U+9ae0,U+9ae2-9ae5,U+9ae7-9aea,U+9aec,U+9aee,U+9af0-9af8,U+9afa,U+9afc-9b02,U+9b04-9b07,U+9b09-9b0e,U+9b10-9b12,U+9b14-9b1e,U+9b20-9b22,U+9b24-9b2e"}},{uri:JD,descriptors:{unicodeRange:"U+9d1a-9da1"}},{uri:QD,descriptors:{unicodeRange:"U+9e13-9e1e,U+9e24,U+9e27,U+9e2e,U+9e30,U+9e34,U+9e3b-9e3c,U+9e40,U+9e4d,U+9e50,U+9e52-9e54,U+9e56,U+9e59,U+9e5d,U+9e5f-9e62,U+9e65,U+9e6e-9e6f,U+9e72,U+9e74-9e7d,U+9e80-9e81,U+9e83-9e86,U+9e89-9e8a,U+9e8c-9e91,U+9e94-9e9c,U+9e9e,U+9ea0-9ea5,U+9ea7-9eb3,U+9eb5-9eb7,U+9eb9-9eba,U+9ebc,U+9ebf-9ec3,U+9ec5-9ec8,U+9eca-9ecc,U+9ed0,U+9ed2-9ed3,U+9ed5-9ed7,U+9ed9-9eda,U+9ede,U+9ee1,U+9ee3-9ee4,U+9ee6,U+9ee8,U+9eeb-9eee,U+9ef0-9ef8"}},{uri:eL,descriptors:{unicodeRange:"U+8b1c-8b25,U+8b27-8b65,U+8b67-8b6b,U+8b6d-8b9f,U+8bac,U+8bb1,U+8bbb,U+8bc7,U+8bd0"}},{uri:tL,descriptors:{unicodeRange:"U+4cad-4d2f"}},{uri:nL,descriptors:{unicodeRange:"U+9c4b-9c7b,U+9c7d-9c7e,U+9c80,U+9c83-9c84,U+9c89-9c8a,U+9c8c,U+9c8f,U+9c93,U+9c96-9c99,U+9c9d,U+9caa,U+9cac,U+9caf,U+9cb9,U+9cbe-9cc2,U+9cc8-9cc9,U+9cd1-9cd2,U+9cda-9cdb,U+9ce0-9ce1,U+9ce3-9d19"}},{uri:aL,descriptors:{unicodeRange:"U+9389-938e,U+9390-93c9,U+93cb-93d5,U+93d7-9410"}},{uri:iL,descriptors:{unicodeRange:"U+20a0-20b5,U+20b9-20ba,U+20bc-20bd,U+4e2c,U+5107,U+5216,U+5293,U+54f3,U+5523,U+5819,U+5adc,U+5c88,U+5e3b,U+5fee,U+62f6,U+63be,U+6484,U+6499,U+67d9,U+67dd,U+6d5e,U+6f46,U+717a,U+71e0,U+72c1,U+73e7,U+75b0,U+7603,U+7722,U+7809,U+7811,U+7946,U+7967,U+799a,U+7b45,U+7ba2,U+8014,U+80d9,U+8159,U+817d,U+81a3,U+81aa,U+8201,U+833c,U+836e,U+83e5,U+8459,U+84f0,U+8729,U+8753,U+87d3,U+89dc,U+8bf6,U+8c2e,U+8e2c,U+8e9c,U+8e9e,U+8ece,U+8fee,U+9139,U+914f,U+9174,U+9191,U+960c,U+9622,U+9a98,U+9b48,U+9ca6,U+9cb0,U+9da2-9e12,U+9e88,U+9f44,U+9f86"}},{uri:rL,descriptors:{unicodeRange:"U+9bd0-9c4a"}},{uri:sL,descriptors:{unicodeRange:"U+4c2d-4cac"}},{uri:lL,descriptors:{unicodeRange:"U+4d30-4dab"}},{uri:oL,descriptors:{unicodeRange:"U+9411-943d,U+943f-946a,U+946c-9484"}},{uri:cL,descriptors:{unicodeRange:"U+9efa,U+9efd,U+9eff-9f0a,U+9f0c,U+9f0f,U+9f11-9f12,U+9f14-9f16,U+9f18,U+9f1a-9f1f,U+9f21,U+9f23-9f2b,U+9f2d-9f2e,U+9f30-9f36,U+9f38,U+9f3a,U+9f3c,U+9f3f-9f43,U+9f45-9f4f,U+9f52-9f7e,U+9f81-9f82,U+9f8d-9f94"}},{uri:dL,descriptors:{unicodeRange:"U+7e2b-7e3a,U+7e3c-7e40,U+7e42-7e46,U+7e48-7e81,U+7e83-7e9a,U+7e9c-7e9e,U+7eae,U+7eb4,U+7ebb-7ebc,U+7ed6,U+7ee4,U+7eec,U+7ef9,U+7f0a,U+7f10,U+7f1e,U+7f37,U+7f39,U+7f3b"}}],Pi=class We{constructor(t){j(this,"scene"),j(this,"getSceneFamilies",()=>We.getUniqueFamilies(this.scene.getNonDeletedElements())),j(this,"onLoaded",n=>{let a=!0;for(let s of n){let l=`${s.family}-${s.style}-${s.weight}-${s.unicodeRange}`;We.loadedFontsCache.has(l)||(We.loadedFontsCache.add(l),a=!1)}if(a)return;let i=!1,r=this.scene.getNonDeletedElementsMap();for(let s of this.scene.getNonDeletedElements())if(q(s)){i=!0,ut.delete(s),nc.clearCache(Xe(s));let l=Ht(s,r);l&&ut.delete(l)}i&&this.scene.triggerUpdate()}),j(this,"loadSceneFonts",async()=>{let n=this.getSceneFamilies(),a=We.getCharsPerFamily(this.scene.getNonDeletedElements());return We.loadFontFaces(n,a)}),this.scene=t}static get registered(){return We._registered?We._initialized||(We._registered=new Map([...We.init().entries(),...We._registered.entries()])):We._registered=We.init(),We._registered}get registered(){return We.registered}static async generateFontFaceDeclarations(t){let n=We.getUniqueFamilies(t),a=We.getCharsPerFamily(t),i=n.find(c=>l8(c).includes(ks));if(i){let c=We.getCharacters(a,i);if(RI(c)){let d=Cs[ks];a[d]=new Set(c),n.unshift(Cs[ks])}}let r=We.fontFacesStylesGenerator(n,a),s=3,l=await new E2(r,s).all();return Array.from(new Set(l))}static async loadFontFaces(t,n){for(let{fontFaces:r,metadata:s}of We.registered.values())if(!s.local)for(let{fontFace:l}of r)window.document.fonts.has(l)||window.document.fonts.add(l);let a=We.fontFacesLoader(t,n),i=10;return(await new E2(a,i).all()).flat().filter(Boolean)}static*fontFacesLoader(t,n){for(let[a,i]of t.entries()){let r=Xe({fontFamily:i,fontSize:16}),s=We.getCharacters(n,i);window.document.fonts.check(r,s)||(yield ar(async()=>{try{let l=await window.document.fonts.load(r,s);return[a,l]}catch(l){console.error(`Failed to load font "${r}" from urls "${We.registered.get(i)?.fontFaces.map(c=>c.urls)}"`,l)}}))}}static*fontFacesStylesGenerator(t,n){for(let[a,i]of t.entries()){let{fontFaces:r,metadata:s}=We.registered.get(i)??{};if(!Array.isArray(r)){console.error(`Couldn't find registered fonts for font-family "${i}"`,We.registered);continue}if(!s?.local)for(let[l,c]of r.entries())yield ar(async()=>{try{let d=We.getCharacters(n,i),o=await c.toCSS(d);return o?[a*1e4+l,o]:void 0}catch(d){console.error(`Couldn't transform font-face to css for family "${c.fontFace.family}"`,d)}})}}static register(t,n,...a){let i=it[t]??Cs[t];return this.registered.get(i)||this.registered.set(i,{metadata:n,fontFaces:a.map(({uri:r,descriptors:s})=>new zT(t,r,s))}),this.registered}static init(){let t={registered:new Map},n=(a,...i)=>{let r=it[a]??Cs[a],s=Kd[r]??Kd[it.Excalifont];We.register.call(t,a,s,...i)};return n("Cascadia",...HT),n("Comic Shanns",...YT),n("Excalifont",...aA),n("Helvetica",...iA),n("Liberation Sans",...sA),n("Lilita One",...cA),n("Nunito",...UA),n("Virgil",...gA),n(ks,...uL),n(Mo,...ZT),We._initialized=!0,t.registered}static getUniqueFamilies(t){return Array.from(t.reduce((n,a)=>(q(a)&&n.add(a.fontFamily),n),new Set))}static getCharsPerFamily(t){let n={};for(let a of t)if(q(a))for(let i of a.originalText)n[a.fontFamily]||(n[a.fontFamily]=new Set),n[a.fontFamily].add(i);return n}static getCharacters(t,n){return t[n]?Array.from(t[n]).join(""):""}static getAllFamilies(){return Array.from(We.registered.keys())}};j(Pi,"loadedFontsCache",new Set),j(Pi,"_registered"),j(Pi,"_initialized",!1),j(Pi,"loadElementsFonts",async e=>{let t=Pi.getUniqueFamilies(e),n=Pi.getCharsPerFamily(e);return Pi.loadFontFaces(t,n)});var ui=Pi,i7=(e,t,n)=>{let{unitsPerEm:a,ascender:i,descender:r}=ui.registered.get(e)?.metadata.metrics||Kd[it.Virgil].metrics,s=t/a,l=(n-s*i+s*r)/2;return s*i+l},qr=e=>{let{lineHeight:t}=ui.registered.get(e)?.metadata.metrics||Kd[it.Excalifont].metrics;return t},r7=e=>{let{angle:t,width:n,height:a,x:i,y:r}=e,s=i+n/2,l=r+a/2,c=E(s,l),d;return e.type==="diamond"?d=b2(z(E(s,r),c,t),z(E(i+n,l),c,t),z(E(s,r+a),c,t),z(E(i,l),c,t)):d=b2(z(E(i,r),c,t),z(E(i+n,r),c,t),z(E(i+n,r+a),c,t),z(E(i,r+a),c,t)),{type:"polygon",data:d}},fL=(e,t,n=10)=>{let[a,i,r,s,l,c]=he(e,t,!0);a-=n,r+=n,i-=n,s+=n;let d=E(l,c),o=z(E(a,i),d,e.angle),u=z(E(r,i),d,e.angle),h=z(E(a,s),d,e.angle),p=z(E(r,s),d,e.angle);return{type:"polygon",data:[o,u,p,h]}},hL=e=>{let{width:t,height:n,angle:a,x:i,y:r}=e;return{type:"ellipse",data:{center:E(i+t/2,r+n/2),angle:a,halfWidth:t/2,halfHeight:n/2}}},ur=e=>{if(!e)return[];for(let t of e.sets)if(t.type==="path")return t.ops;return e.sets[0].ops},pL=(e,t=E(0,0),n,a)=>{let i=c=>z(E(c[0]+t[0],c[1]+t[1]),a,n),r=ur(e),s=[],l=E(0,0);for(let c of r){if(c.op==="move"){let d=W0(c.data);nn(d!=null,"Ops data is not a point"),l=i(d)}if(c.op==="bcurveTo"){let d=i(E(c.data[0],c.data[1])),o=i(E(c.data[2],c.data[3])),u=i(E(c.data[4],c.data[5]));s.push(li(l,d,o,u)),l=u}}return{type:"polycurve",data:s}},UL=e=>{let t=e[0],n=[];for(let a=1;a<e.length;a++){let i=e[a];n.push(re(t,i)),t=i}return n},mL=(e,t,n=!1)=>{let a=r=>z(ke(Wi(ie(r),Wt(e.x,e.y))),t,e.angle),i=UL(e.points.map(r=>a(r)));return n?{type:"polygon",data:Wd(i.flat())}:{type:"polyline",data:i}},gL=(e,t,n=E(0,0),a,i)=>{let r=o=>z(E(o[0]+n[0],o[1]+n[1]),i,a);if(e.roundness===null)return{type:"polygon",data:Wd(e.points.map(o=>r(o)))};let s=ur(t),l=[],c=!1;for(let o of s)o.op==="move"?(c=!c,c&&l.push(E(o.data[0],o.data[1]))):o.op==="bcurveTo"?c&&(l.push(E(o.data[0],o.data[1])),l.push(E(o.data[2],o.data[3])),l.push(E(o.data[4],o.data[5]))):o.op==="lineTo"&&c&&l.push(E(o.data[0],o.data[1]));let d=nM(l,10,5).map(o=>r(o));return{type:"polygon",data:Wd(d)}},bL=(e,t)=>{let{angle:n,halfWidth:a,halfHeight:i,center:r}=t,s=a,l=i,c=Wi(ie(e),Ut(ie(r),-1)),[d,o]=z(ke(c),E(0,0),-n),u=Math.abs(d),h=Math.abs(o),p=.707,U=.707;for(let b=0;b<3;b++){let x=s*p,v=l*U,y=(s*s-l*l)*p**3/s,w=(l*l-s*s)*U**3/l,k=x-y,C=v-w,I=u-y,A=h-w,_=Math.hypot(C,k),T=Math.hypot(A,I);p=Math.min(1,Math.max(0,(I*_/T+y)/s)),U=Math.min(1,Math.max(0,(A*_/T+w)/l));let D=Math.hypot(U,p);p/=D,U/=D}let[m,g]=[s*p*Math.sign(d),l*U*Math.sign(o)];return Pe(E(d,o),E(m,g))},vL=(e,t,n=1e-4)=>bL(e,t)<=n,xL=(e,t)=>{let{center:n,angle:a,halfWidth:i,halfHeight:r}=t,s=Wi(ie(e),Ut(ie(n),-1)),[l,c]=z(ke(s),E(0,0),-a);return l/i*(l/i)+c/r*(c/r)<=1},M1=(e,t,n=0)=>{switch(t.type){case"polygon":return aI(e,t.data,n);case"ellipse":return vL(e,t.data,n);case"line":return Vr(e,t.data,n);case"polyline":return l7(e,t.data,n);case"curve":return s7(e,t.data,n);case"polycurve":return yL(e,t.data,n);default:throw Error(`shape ${t} is not implemented`)}},qd=(e,t)=>{switch(t.type){case"polygon":return v2(e,t.data);case"line":return!1;case"curve":return!1;case"ellipse":return xL(e,t.data);case"polyline":{let n=Wd(t.data.flat());return v2(e,n)}case"polycurve":return!1;default:throw Error(`shape ${t} is not implemented`)}},yL=(e,t,n)=>t.some(a=>s7(e,a,n)),wL=e=>{let[t,n,a,i]=e;return(r,s)=>Math.pow(1-r,3)*i[s]+3*r*Math.pow(1-r,2)*a[s]+3*Math.pow(r,2)*(1-r)*n[s]+t[s]*Math.pow(r,3)},EL=(e,t=10)=>{let n=wL(e),a=[n(0,0),n(0,1)],i=[],r=0,s=1/t;for(let l=0;l<t;l++)if(r+=s,r<=1){let c=E(n(r,0),n(r,1));i.push(re(a,c)),a=c}return i},s7=(e,t,n)=>l7(e,EL(t),n),l7=(e,t,n=1e-4)=>t.some(a=>Vr(e,a,n));function o7(e,t,n){return{center:e,halfWidth:t,halfHeight:n}}var SL=(e,t)=>{let{halfWidth:n,halfHeight:a,center:i}=t,r=n,s=a,l=Wi(ie(e),Ut(ie(i),-1)),c=Math.abs(l[0]),d=Math.abs(l[1]),o=.707,u=.707;for(let U=0;U<3;U++){let m=r*o,g=s*u,b=(r*r-s*s)*o**3/r,x=(s*s-r*r)*u**3/s,v=m-b,y=g-x,w=c-b,k=d-x,C=Math.hypot(y,v),I=Math.hypot(k,w);o=Math.min(1,Math.max(0,(w*C/I+b)/r)),u=Math.min(1,Math.max(0,(k*C/I+x)/s));let A=Math.hypot(u,o);o/=A,u/=A}let[h,p]=[r*o*Math.sign(l[0]),s*u*Math.sign(l[1])];return Pe(ke(l),E(h,p))};function kL({center:e,halfWidth:t,halfHeight:n},[a,i]){let[r,s]=e,l=a[0]-r,c=a[1]-s,d=i[0]-r,o=i[1]-s,u=Math.pow(d-l,2)/Math.pow(t,2)+Math.pow(o-c,2)/Math.pow(n,2),h=2*(l*(d-l)/Math.pow(t,2)+c*(o-c)/Math.pow(n,2)),p=Math.pow(l,2)/Math.pow(t,2)+Math.pow(c,2)/Math.pow(n,2)-1,U=(-h+Math.sqrt(Math.pow(h,2)-4*u*p))/(2*u),m=(-h-Math.sqrt(Math.pow(h,2)-4*u*p))/(2*u),g=[E(l+U*(d-l)+r,c+U*(o-c)+s),E(l+m*(d-l)+r,c+m*(o-c)+s)].filter(b=>!isNaN(b[0])&&!isNaN(b[1]));return g.length===2&&pa(g[0],g[1])?[g[0]]:g}function c7(e,t=0){let n=ca(Math.min(e.width,e.height),e);if(n<=0){let u=v1(E(e.x-t,e.y-t),E(e.x+e.width+t,e.y+e.height+t)),h=re(E(u[0][0]+n,u[0][1]),E(u[1][0]-n,u[0][1])),p=re(E(u[1][0],u[0][1]+n),E(u[1][0],u[1][1]-n)),U=re(E(u[0][0]+n,u[1][1]),E(u[1][0]-n,u[1][1])),m=re(E(u[0][0],u[1][1]-n),E(u[0][0],u[0][1]+n));return[[h,p,U,m],[]]}let a=E(e.x+e.width/2,e.y+e.height/2),i=v1(E(e.x,e.y),E(e.x+e.width,e.y+e.height)),r=re(E(i[0][0]+n,i[0][1]),E(i[1][0]-n,i[0][1])),s=re(E(i[1][0],i[0][1]+n),E(i[1][0],i[1][1]-n)),l=re(E(i[0][0]+n,i[1][1]),E(i[1][0]-n,i[1][1])),c=re(E(i[0][0],i[1][1]-n),E(i[0][0],i[0][1]+n)),d=[Ut(en(ie(E(i[0][0]-t,i[0][1]-t),a)),t),Ut(en(ie(E(i[1][0]+t,i[0][1]-t),a)),t),Ut(en(ie(E(i[1][0]+t,i[1][1]+t),a)),t),Ut(en(ie(E(i[0][0]-t,i[1][1]+t),a)),t)],o=[li(ke(d[0],c[1]),ke(d[0],E(c[1][0]+2/3*(i[0][0]-c[1][0]),c[1][1]+2/3*(i[0][1]-c[1][1]))),ke(d[0],E(r[0][0]+2/3*(i[0][0]-r[0][0]),r[0][1]+2/3*(i[0][1]-r[0][1]))),ke(d[0],r[0])),li(ke(d[1],r[1]),ke(d[1],E(r[1][0]+2/3*(i[1][0]-r[1][0]),r[1][1]+2/3*(i[0][1]-r[1][1]))),ke(d[1],E(s[0][0]+2/3*(i[1][0]-s[0][0]),s[0][1]+2/3*(i[0][1]-s[0][1]))),ke(d[1],s[0])),li(ke(d[2],s[1]),ke(d[2],E(s[1][0]+2/3*(i[1][0]-s[1][0]),s[1][1]+2/3*(i[1][1]-s[1][1]))),ke(d[2],E(l[1][0]+2/3*(i[1][0]-l[1][0]),l[1][1]+2/3*(i[1][1]-l[1][1]))),ke(d[2],l[1])),li(ke(d[3],l[0]),ke(d[3],E(l[0][0]+2/3*(i[0][0]-l[0][0]),l[0][1]+2/3*(i[1][1]-l[0][1]))),ke(d[3],E(c[0][0]+2/3*(i[0][0]-c[0][0]),c[0][1]+2/3*(i[1][1]-c[0][1]))),ke(d[3],c[0]))];return[[re(o[0][3],o[1][0]),re(o[1][3],o[2][0]),re(o[2][3],o[3][0]),re(o[3][3],o[0][0])],o]}function d7(e,t=0){let[n,a,i,r,s,l,c,d]=_7(e),o=ca(Math.abs(n-c),e),u=ca(Math.abs(r-a),e);if(e.roundness?.type==null){let[v,y,w,k]=[E(e.x+n,e.y+a-t),E(e.x+i+t,e.y+r),E(e.x+s,e.y+l+t),E(e.x+c-t,e.y+d)],C=re(E(v[0]+o,v[1]+u),E(y[0]-o,y[1]-u)),I=re(E(y[0]-o,y[1]+u),E(w[0]+o,w[1]-u)),A=re(E(w[0]-o,w[1]-u),E(k[0]+o,k[1]+u)),_=re(E(k[0]+o,k[1]-u),E(v[0]-o,v[1]+u));return[[C,I,A,_],[]]}let h=E(e.x+e.width/2,e.y+e.height/2),[p,U,m,g]=[E(e.x+n,e.y+a),E(e.x+i,e.y+r),E(e.x+s,e.y+l),E(e.x+c,e.y+d)],b=[Ut(en(ie(U,h)),t),Ut(en(ie(m,h)),t),Ut(en(ie(g,h)),t),Ut(en(ie(p,h)),t)],x=[li(ke(b[0],E(U[0]-o,U[1]-u)),ke(b[0],U),ke(b[0],U),ke(b[0],E(U[0]-o,U[1]+u))),li(ke(b[1],E(m[0]+o,m[1]-u)),ke(b[1],m),ke(b[1],m),ke(b[1],E(m[0]-o,m[1]-u))),li(ke(b[2],E(g[0]+o,g[1]+u)),ke(b[2],g),ke(b[2],g),ke(b[2],E(g[0]+o,g[1]-u))),li(ke(b[3],E(p[0]-o,p[1]+u)),ke(b[3],p),ke(b[3],p),ke(b[3],E(p[0]+o,p[1]+u)))];return[[re(x[0][3],x[1][0]),re(x[1][3],x[2][0]),re(x[2][3],x[3][0]),re(x[3][3],x[0][0])],x]}var I1=e=>{if(e.type==="arrow")return!1;let t=!ia(e.backgroundColor)||Wn(e)||Pn(e)||q(e);return e.type==="line"||e.type==="freedraw"?t&&mi(e.points):t||Le(e)},Es=({x:e,y:t,element:n,shape:a,threshold:i=10,frameNameBound:r=null})=>{let s=I1(n)&&qd(E(e,t),a)||M1(E(e,t),a,i);return!s&&r&&(s=qd(E(e,t),{type:"polygon",data:r7(r).data})),s},sp=(e,t,n,a,i=0)=>{let[r,s,l,c]=ma(n,a);return r-=i,s-=i,l+=i,c+=i,m8(E(r,s),E(e,t),E(l,c))},CL=(e,t)=>!Es(e)&&!u7(e.x,e.y,h7(e.element,t))&&sp(e.x,e.y,e.element,t),u7=(e,t,n)=>!!n&&qd(E(e,t),n),f7=(e,t,n=0)=>{switch(e.type){case"rectangle":case"image":case"text":case"iframe":case"embeddable":case"frame":case"magicframe":return ML(e,t,n);case"diamond":return IL(e,t,n);case"ellipse":return _L(e,t,n);default:throw new Error(`Unimplemented element type '${e.type}'`)}},ML=(e,t,n=0)=>{let a=E(e.x+e.width/2,e.y+e.height/2),i=z(t[0],a,-e.angle),r=z(t[1],a,-e.angle),[s,l]=c7(e,n);return[...s.map(c=>To(re(i,r),c)).filter(c=>c!=null).map(c=>z(c,a,e.angle)),...l.flatMap(c=>g8(c,re(i,r))).filter(c=>c!=null).map(c=>z(c,a,e.angle))].filter((c,d,o)=>o.findIndex(u=>pa(c,u))===d)},IL=(e,t,n=0)=>{let a=E(e.x+e.width/2,e.y+e.height/2),i=z(t[0],a,-e.angle),r=z(t[1],a,-e.angle),[s,l]=d7(e,n);return[...s.map(c=>To(re(i,r),c)).filter(c=>c!=null).map(c=>z(c,a,e.angle)),...l.flatMap(c=>g8(c,re(i,r))).filter(c=>c!=null).map(c=>z(c,a,e.angle))].filter((c,d,o)=>o.findIndex(u=>pa(c,u))===d)},_L=(e,t,n=0)=>{let a=E(e.x+e.width/2,e.y+e.height/2),i=z(t[0],a,-e.angle),r=z(t[1],a,-e.angle);return kL(o7(a,e.width/2+n,e.height/2+n),b1(i,r)).map(s=>z(s,a,e.angle))},Te={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",THREE:"Digit3",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",H:"KeyH",V:"KeyV",Z:"KeyZ",Y:"KeyY",R:"KeyR",S:"KeyS"},R={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:Fa?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SLASH:"/",A:"a",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},TL=new Map([[R.Z,Te.Z],[R.Y,Te.Y]]),AL=e=>/^[a-z]$/.test(e.toLowerCase()),_1=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=TL.get(t);return!!(n&&!AL(e.key)&&e.code===n)},Hl=e=>e===R.ARROW_LEFT||e===R.ARROW_RIGHT||e===R.ARROW_DOWN||e===R.ARROW_UP,uh=e=>e.altKey,Ml=e=>e.shiftKey,ro=e=>e.shiftKey,lp=[{icon:KI,value:"selection",key:R.V,numericKey:R[1],fillable:!0},{icon:qI,value:"rectangle",key:R.R,numericKey:R[2],fillable:!0},{icon:JI,value:"diamond",key:R.D,numericKey:R[3],fillable:!0},{icon:QI,value:"ellipse",key:R.O,numericKey:R[4],fillable:!0},{icon:e_,value:"arrow",key:R.A,numericKey:R[5],fillable:!0},{icon:t_,value:"line",key:R.L,numericKey:R[6],fillable:!0},{icon:Ao,value:"freedraw",key:[R.P,R.X],numericKey:R[7],fillable:!1},{icon:P8,value:"text",key:R.T,numericKey:R[8],fillable:!1},{icon:a_,value:"image",key:null,numericKey:R[9],fillable:!1},{icon:i_,value:"eraser",key:R.E,numericKey:R[0],fillable:!1}],jL=e=>lp.find((t,n)=>t.numericKey!=null&&e===t.numericKey.toString()||t.key&&(typeof t.key=="string"?t.key===e:t.key.includes(e)))?.value||null,ri=(e,t)=>{switch(e.type){case"rectangle":case"diamond":case"frame":case"magicframe":case"embeddable":case"image":case"iframe":case"text":case"selection":return r7(e);case"arrow":case"line":{let n=ut.get(e)?.[0]??ut.generateElementShape(e,null)[0],[,,,,a,i]=he(e,t);return I1(e)?gL(e,n,E(e.x,e.y),e.angle,E(a,i)):pL(n,E(e.x,e.y),e.angle,E(a,i))}case"ellipse":return hL(e);case"freedraw":{let[,,,,n,a]=he(e,t);return mL(e,E(n,a),I1(e))}}},h7=(e,t)=>{let n=ge(e,t);return n?e.type==="arrow"?ri({...n,...J.getBoundTextElementPosition(e,n,t)},t):ri(n,t):null},p7=(e,t)=>{let n=ut.generateElementShape(e,null);if(!n)return null;let a=ur(n[0]),i=E(0,0),r=0,s=1/0,l=null;for(;r<a.length;){let{op:c,data:d}=a[r];if(c==="move"&&(nn(qM(d),"The returned ops is not compatible with a point"),i=d),c==="bcurveTo"){let o=i,u=E(d[0],d[1]),h=E(d[2],d[3]),p=E(d[4],d[5]),U=Pe(p,t);U<s&&(s=U,l=[o,u,h,p]),i=p}r++}return l},U7=(e,t,n,a,i)=>{let r=(c,d)=>Math.pow(1-c,3)*a[d]+3*c*Math.pow(1-c,2)*n[d]+3*Math.pow(c,2)*(1-c)*t[d]+e[d]*Math.pow(c,3),s=r(i,0),l=r(i,1);return E(s,l)},RL=(e,t)=>{let n=p7(e,t);if(!n)return[];let a=[],i=1;for(;i>0;){let r=U7(n[0],n[1],n[2],n[3],i);a.push(E(r[0],r[1])),i-=.05}return a.length&&pa(a.at(-1),t)&&a.push(E(t[0],t[1])),a},m7=(e,t)=>{let n=[];n[0]=0;let a=RL(e,t),i=0,r=0;for(;i<a.length-1;){let s=Pe(a[i],a[i+1]);r+=s,n.push(r),i++}return n},DL=(e,t)=>m7(e,t).at(-1),LL=(e,t,n)=>{let a=m7(e,t),i=a.length-1,r=a.at(-1),s=n*r,l=0,c=i,d=0;for(;l<c;)d=Math.floor(l+(c-l)/2),a[d]<s?l=d+1:c=d;return a[d]>s&&d--,a[d]===s?d/i:1-(d+(s-a[d])/(a[d+1]-a[d]))/i},Ta=(e,t)=>{let n={minX:e.x,minY:e.y,maxX:e.x+e.width,maxY:e.y+e.height,midX:e.x+e.width/2,midY:e.y+e.height/2},a=E(n.midX,n.midY),[i,r]=z(E(n.minX,n.minY),a,e.angle),[s,l]=z(E(n.maxX,n.minY),a,e.angle),[c,d]=z(E(n.maxX,n.maxY),a,e.angle),[o,u]=z(E(n.minX,n.maxY),a,e.angle),h=[Math.min(i,s,c,o),Math.min(r,l,d,u),Math.max(i,s,c,o),Math.max(r,l,d,u)];if(t){let[p,U,m,g]=t;return[h[0]-g,h[1]-p,h[2]+U,h[3]+m]}return h},Ks=(e,t)=>e[0]>t[0]&&e[0]<t[2]&&e[1]>t[1]&&e[1]<t[3],ca=(e,t)=>{if(t.roundness?.type===St.PROPORTIONAL_RADIUS||t.roundness?.type===St.LEGACY)return e*nh;if(t.roundness?.type===St.ADAPTIVE_RADIUS){let n=t.roundness?.value??BM,a=n/nh;return e<=a?e*nh:n}return 0},mi=(e,t=1)=>{if(e.length>=3){let[n,a]=[e[0],e[e.length-1]];return Pe(n,a)<=ad/t}return!1},Nt=10,PL=(e,t,n,a,i,r,s)=>{let{width:l,height:c}=gi(e),d=n/l,o=a/c,u=(e.crop?.x??0)/d,h=(e.crop?.y??0)/o,p=z(E(i,r),E(e.x+e.width/2,e.y+e.height/2),-e.angle);i=p[0],r=p[1];let U=e.width,m=e.height,g=e.crop??{x:0,y:0,width:n,height:a,naturalWidth:n,naturalHeight:a},b=g.height,x=g.width,v=e.scale[0]===-1,y=e.scale[1]===-1,w=r-e.y,k=i-e.x;t.includes("n")&&(m=Se(e.height-w,Nt,y?c-h:e.height+h)),t.includes("s")&&(w=r-e.y-e.height,m=Se(e.height+w,Nt,y?e.height+h:c-h)),t.includes("e")&&(k=i-e.x-e.width,U=Se(e.width+k,Nt,v?e.width+u:l-u)),t.includes("w")&&(U=Se(e.width-k,Nt,v?l-u:e.width+u));let C=_=>{_.height=m*o,_.width=U*d};C(g);let I=(_,T)=>{C(T),_.includes("n")&&(y||(T.y+=b-T.height)),_.includes("s")&&y&&(T.y+=b-T.height),_.includes("e")&&v&&(T.x+=x-T.width),_.includes("w")&&(v||(T.x+=x-T.width))};switch(t){case"n":{if(s){let _=u+e.width/2,T=l-u-e.width/2,D=Math.min(_,T)*2;U=Se(m*s,Nt,D),m=U/s}I(t,g),s&&(g.x+=(x-g.width)/2);break}case"s":{if(s){let _=u+e.width/2,T=l-u-e.width/2,D=Math.min(_,T)*2;U=Se(m*s,Nt,D),m=U/s}I(t,g),s&&(g.x+=(x-g.width)/2);break}case"w":{if(s){let _=h+e.height/2,T=c-h-e.height/2,D=Math.min(_,T)*2;m=Se(U/s,Nt,D),U=m*s}I(t,g),s&&(g.y+=(b-g.height)/2);break}case"e":{if(s){let _=h+e.height/2,T=c-h-e.height/2,D=Math.min(_,T)*2;m=Se(U/s,Nt,D),U=m*s}I(t,g),s&&(g.y+=(b-g.height)/2);break}case"ne":{if(s)if(k>-w){let _=y?c-h:h+e.height;m=Se(U/s,Nt,_),U=m*s}else{let _=v?u+e.width:l-u;U=Se(m*s,Nt,_),m=U/s}I(t,g);break}case"nw":{if(s)if(k<w){let _=y?c-h:h+e.height;m=Se(U/s,Nt,_),U=m*s}else{let _=v?l-u:u+e.width;U=Se(m*s,Nt,_),m=U/s}I(t,g);break}case"se":{if(s)if(k>w){let _=y?h+e.height:c-h;m=Se(U/s,Nt,_),U=m*s}else{let _=v?u+e.width:l-u;U=Se(m*s,Nt,_),m=U/s}I(t,g);break}case"sw":{if(s)if(-k>w){let _=y?h+e.height:c-h;m=Se(U/s,Nt,_),U=m*s}else{let _=v?l-u:u+e.width;U=Se(m*s,Nt,_),m=U/s}I(t,g);break}}let A=NL(e,t,U,m,!!s);return U2(g.width,g.naturalWidth)&&U2(g.height,g.naturalHeight)&&(g=null),{x:A[0],y:A[1],width:U,height:m,crop:g}},NL=(e,t,n,a,i)=>{let[r,s,l,c]=qi(e,e.width,e.height,!0),d=E(r,s),o=E(l,c),u=Qo(d,o),[h,p,U,m]=qi(e,n,a,!0),g=U-h,b=m-p,x=[...d];if(["n","w","nw"].includes(t)&&(x=[o[0]-Math.abs(g),o[1]-Math.abs(b)]),t==="ne"){let I=[d[0],o[1]];x=[I[0],I[1]-Math.abs(b)]}if(t==="sw"){let I=[o[0],d[1]];x=[I[0]-Math.abs(g),I[1]]}i&&(["s","n"].includes(t)&&(x[0]=u[0]-g/2),["e","w"].includes(t)&&(x[1]=u[1]-b/2));let v=e.angle,y=z(x,u,v),w=[x[0]+Math.abs(g)/2,x[1]+Math.abs(b)/2],k=z(w,u,v);x=z(y,k,-v);let C=[...x];return C[0]+=e.x-h,C[1]+=e.y-p,C},OL=(e,t)=>{if(e.crop){let{width:n,height:a}=gi(e),[i,r,s,l,c,d]=he(e,t),o=ie(z(E(i,r),E(c,d),e.angle)),u=ie(z(E(s,r),E(c,d),e.angle)),h=en(Hd(u,o)),p=ie(z(E(i,l),E(c,d),e.angle)),U=Hd(p,o),m=en(U),{cropX:g,cropY:b}=$L(e.crop,e.scale),x=Wi(Wi(o,Ut(h,-g*n/e.crop.naturalWidth)),Ut(m,-b*a/e.crop.naturalHeight)),v=ke(Wi(Wi(x,Ut(h,n/2)),Ut(m,a/2))),y=z(ke(x),v,-e.angle);return{...e,x:y[0],y:y[1],width:n,height:a,crop:null}}return e},gi=e=>{if(e.crop){let t=e.width/(e.crop.width/e.crop.naturalWidth),n=e.height/(e.crop.height/e.crop.naturalHeight);return{width:t,height:n}}return{width:e.width,height:e.height}},$L=(e,t)=>{let n=e.x,a=e.y,i=t[0]===-1,r=t[1]===-1;return i&&(n=e.naturalWidth-Math.abs(n)-e.width),r&&(a=e.naturalHeight-Math.abs(a)-e.height),{cropX:n,cropY:a}},FL=(e,t=!1)=>{let n=e.crop;if(!n)return null;let a=e.scale[0]===-1,i=e.scale[1]===-1,r=n.x,s=n.y;if(a&&(r=n.naturalWidth-n.width-n.x),i&&(s=n.naturalHeight-n.height-n.y),t)return{x:r,y:s};let{width:l,height:c}=gi(e);return{x:r/(n.naturalWidth/l),y:s/(n.naturalHeight/c)}},g7="invert(100%) hue-rotate(180deg) saturate(1.25)",zL=za(),b7=(e,t)=>Ln(e)&&!t.imageCache.has(e.fileId),v7=(e,t,n)=>n.theme===Ce.DARK&&Ln(e)&&!b7(e,t)&&t.imageCache.get(e.fileId)?.mimeType!==ae.svg,Xu=e=>{switch(e.type){case"freedraw":return e.strokeWidth*12;case"text":return e.fontSize/2;default:return 20}},x7=(e,t,n,a,i=1)=>{let r=(t?.opacity??100)*e.opacity/1e4*i;return(n.has(e.id)||a&&a.some(s=>s.id===e.id)||t&&n.has(t.id))&&(r*=zM/100),r},BL=(e,t,n)=>{let a=Xu(e),[i,r,s,l]=he(e,t),c=ue(e)||Xn(e)?Jt(i,s):e.width,d=ue(e)||Xn(e)?Jt(r,l):e.height,o=c*window.devicePixelRatio+a*2,u=d*window.devicePixelRatio+a*2,h=n.value;return(o*h>32767||u*h>32767)&&(h=Math.min(32767/o,32767/u)),o*u*h*h>16777216&&(h=Math.sqrt(16777216/(o*u))),o=Math.floor(o*h),u=Math.floor(u*h),{width:o,height:u,scale:h}},y7=(e,t,n,a,i)=>{let r=document.createElement("canvas"),s=r.getContext("2d"),l=Xu(e),{width:c,height:d,scale:o}=BL(e,t,n);if(!c||!d)return null;r.width=c,r.height=d;let u=-100,h=0;if(ue(e)||Xn(e)){let[b,x]=he(e,t);u=e.x>b?Jt(e.x,b)*window.devicePixelRatio*o:0,h=e.y>x?Jt(e.y,x)*window.devicePixelRatio*o:0,s.translate(u,h)}s.save(),s.translate(l*o,l*o),s.scale(window.devicePixelRatio*o,window.devicePixelRatio*o);let p=cr.canvas(r);v7(e,a,i)&&(s.filter=g7),dd(e,p,s,a),s.restore();let U=ge(e,t),m=document.createElement("canvas"),g=m.getContext("2d");if(xe(e)&&U){let[b,x,v,y]=he(e,t),w=Math.max(Jt(b,v),Jt(x,y));m.width=w*window.devicePixelRatio*o+l*o*10,m.height=w*window.devicePixelRatio*o+l*o*10,g.translate(m.width/2,m.height/2),g.rotate(e.angle),g.drawImage(r,-r.width/2,-r.height/2,r.width,r.height);let[,,,,k,C]=he(U,t);g.rotate(-e.angle);let I=(m.width-r.width)/2,A=(m.height-r.height)/2,_=m.width/2-(k-b)*window.devicePixelRatio*o-I-l*o,T=m.height/2-(C-x)*window.devicePixelRatio*o-A-l*o;g.translate(-_,-T),g.clearRect(-(U.width/2+It)*window.devicePixelRatio*o,-(U.height/2+It)*window.devicePixelRatio*o,(U.width+It*2)*window.devicePixelRatio*o,(U.height+It*2)*window.devicePixelRatio*o)}return{element:e,canvas:r,theme:i.theme,scale:o,zoomValue:n.value,canvasOffsetX:u,canvasOffsetY:h,boundTextElementVersion:ge(e,t)?.version||null,containingFrameOpacity:wn(e,t)?.opacity||100,boundTextCanvas:m,angle:e.angle,imageCrop:Le(e)?e.crop:null}},HL=14,w7=document.createElement("img");w7.src=`data:${ae.svg},${encodeURIComponent('<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="image" class="svg-inline--fa fa-image fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#888" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg>')}`;var E7=document.createElement("img");E7.src=`data:${ae.svg},${encodeURIComponent('<svg viewBox="0 0 668 668" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48ZM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56ZM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.81709 0 0 .81709 124.825 145.825)"/><path d="M256 8C119.034 8 8 119.033 8 256c0 136.967 111.034 248 248 248s248-111.034 248-248S392.967 8 256 8Zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676ZM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.30366 0 0 .30366 506.822 60.065)"/></svg>')}`;var XL=(e,t)=>{t.fillStyle="#E7E7E7",t.fillRect(0,0,e.width,e.height);let n=Math.min(e.width,e.height),a=Math.min(n,Math.min(n*.4,100));t.drawImage(e.status==="error"?E7:w7,e.width/2-a/2,e.height/2-a/2,a,a)},dd=(e,t,n,a,i)=>{switch(e.type){case"rectangle":case"iframe":case"embeddable":case"diamond":case"ellipse":{n.lineJoin="round",n.lineCap="round",t.draw(ut.get(e));break}case"arrow":case"line":{n.lineJoin="round",n.lineCap="round",ut.get(e).forEach(r=>{t.draw(r)});break}case"freedraw":{n.save(),n.fillStyle=e.strokeColor;let r=GL(e),s=ut.get(e);s&&t.draw(s),n.fillStyle=e.strokeColor,n.fill(r),n.restore();break}case"image":{let r=Ln(e)?a.imageCache.get(e.fileId)?.image:void 0;if(r!=null&&!(r instanceof Promise)){e.roundness&&n.roundRect&&(n.beginPath(),n.roundRect(0,0,e.width,e.height,ca(Math.min(e.width,e.height),e)),n.clip());let{x:s,y:l,width:c,height:d}=e.crop?e.crop:{x:0,y:0,width:r.naturalWidth,height:r.naturalHeight};n.drawImage(r,s,l,c,d,0,0,e.width,e.height)}else XL(e,n);break}default:if(q(e)){let r=x8(e.text),s=r&&!n.canvas.isConnected;s&&document.body.appendChild(n.canvas),n.canvas.setAttribute("dir",r?"rtl":"ltr"),n.save(),n.font=Xe(e),n.fillStyle=e.strokeColor,n.textAlign=e.textAlign;let l=e.text.replace(/\r\n?/g,`
|
|
15
|
+
`)},$I=(e,t,n)=>{let a=[],i=OI(e)[Symbol.iterator](),r="",s=0,l=i.next();for(;!l.done;){let c=l.value,d=r+c,o=BI(c)?s+nc.calculate(c,t):Yr(d,t);if(/\s/.test(c)||o<=n){r=d,s=o,l=i.next();continue}if(r)a.push(r.trimEnd()),r="",s=0;else{let u=FI(c,t,n),h=u[u.length-1]??"",p=u.slice(0,-1);a.push(...p),r=h,s=Yr(h,t),l=i.next()}}if(r){let c=zI(r,t,n);a.push(c)}return a},FI=(e,t,n)=>{if(q0().test(e))return[e];HI(e);let a=[],i=Array.from(e),r="",s=0;for(let l of i){let c=nc.calculate(l,t),d=s+c;if(d<=n){r=r+l,s=d;continue}r&&a.push(r),r=l,s=c}return r&&a.push(r),a},zI=(e,t,n)=>{if(!(Yr(e,t)>n))return e;let[,a,i]=e.match(/^(.+?)(\s+)$/)??[e,e.trimEnd(),""],r=Yr(a,t);for(let s of Array.from(i)){let l=nc.calculate(s,t),c=r+l;if(c>n)break;a=a+s,r=c}return a},BI=e=>e.codePointAt(0)!==void 0&&e.codePointAt(1)===void 0,HI=e=>{if((be.MODE===vn.TEST||be.DEV)&&/\s/.test(e))throw new Error("Word should not contain any whitespaces!")},rn=class{};j(rn,"rg",new ko),j(rn,"cache",new WeakMap),j(rn,"get",e=>rn.cache.get(e)),j(rn,"set",(e,t)=>rn.cache.set(e,t)),j(rn,"delete",e=>rn.cache.delete(e)),j(rn,"destroy",()=>{rn.cache=new WeakMap}),j(rn,"generateElementShape",(e,t)=>{let n=t?.isExporting?void 0:rn.get(e);if(n!==void 0)return n;T1.delete(e);let a=JL(e,rn.rg,t||{isExporting:!1,canvasBackgroundColor:Ee.white,embedsValidationStatus:null});return rn.cache.set(e,a),a});var ut=rn,na=e=>"var(--icon-fill-color)",L8=e=>e===Ce.LIGHT?Bt.white:"#1e1e1e",$=(e,t=512)=>{let{width:n=512,height:a=n,mirror:i,style:r,...s}=typeof t=="number"?{width:t}:t;return f.jsx("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${n} ${a}`,className:te({"rtl-mirror":i}),style:r,...s,children:typeof e=="string"?f.jsx("path",{fill:"currentColor",d:e}):e})},K={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},Ue={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"};$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("rect",{x:3,y:8,width:18,height:4,rx:1}),f.jsx("line",{x1:12,y1:8,x2:12,y2:21}),f.jsx("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),f.jsx("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),K);var J0=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),f.jsx("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),f.jsx("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),f.jsx("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),f.jsx("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),K),XI=$(f.jsxs("svg",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),K),WI=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("circle",{cx:"12",cy:"12",r:"1"}),f.jsx("circle",{cx:"12",cy:"19",r:"1"}),f.jsx("circle",{cx:"12",cy:"5",r:"1"})]}),K),VI=$(f.jsxs("svg",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),f.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),f.jsx("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),K),Fu=$(f.jsxs("g",{children:[f.jsx("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),f.jsx("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),f.jsx("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:f.jsx("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),f.jsx("g",{mask:"url(#UnlockedIcon)",children:f.jsx("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),Ue),Q0=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),f.jsx("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),f.jsx("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),Ue),GI=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),f.jsx("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),YI=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),f.jsx("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),ZI=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),f.jsx("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"});$(f.jsx("g",{fill:"currentColor",children:f.jsx("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),{width:40,height:40,fill:"none"});var KI=$(f.jsxs("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),f.jsx("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),qI=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),K),JI=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),K),QI=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("circle",{cx:"12",cy:"12",r:"9"})]}),K),e_=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),f.jsx("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),f.jsx("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),K),t_=$(f.jsx("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),Ue),n_=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),f.jsx("path",{d:"M16 7h4"}),f.jsx("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),K),Ao=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),f.jsx("path",{d:"m11.25 5.417 3.333 3.333"})]}),Ue),P8=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),f.jsx("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),f.jsx("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),f.jsx("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),f.jsx("polyline",{points:"5 20 11 4 13 4 20 20"})]}),K),a_=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{d:"M12.5 6.667h.01"}),f.jsx("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),f.jsx("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),f.jsx("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),Ue),i_=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),f.jsx("path",{d:"M18 13.3l-6.3 -6.3"})]}),K),k2=$(f.jsx("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),Ue),C2=$(f.jsx("path",{d:"M5 10h10",strokeWidth:"1.25"}),Ue),r_=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M21 21l-6 -6"}),f.jsx("path",{d:"M3.268 12.043a7.017 7.017 0 0 0 6.634 4.957a7.012 7.012 0 0 0 7.043 -6.131a7 7 0 0 0 -5.314 -7.672a7.021 7.021 0 0 0 -8.241 4.403"}),f.jsx("path",{d:"M3 4v4h4"})]}),K),Zr=$(f.jsx("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),Ue),s_=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("polyline",{points:"12 16 18 10 12 4"}),f.jsx("polyline",{points:"8 4 2 10 8 16"})]}),Ue),w1=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),f.jsx("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),Ue),E1=$(f.jsx("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),Ue),S1=$(f.jsx("g",{stroke:"currentColor",strokeLinejoin:"round",children:f.jsx("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),{...Ue,strokeWidth:1.5}),N8=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),f.jsx("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),f.jsx("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),K),zu=$(f.jsx("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),Ue),ep=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("circle",{cx:"12",cy:"12",r:"9"}),f.jsx("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),f.jsx("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),K),l_=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("circle",{cx:"12",cy:"12",r:"9"}),f.jsx("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),f.jsx("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),K),M2=$(f.jsx("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),Ue),O8=$(f.jsx("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),Ue),o_=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),f.jsx("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),Ue),c_=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),f.jsx("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),K),d_=$(f.jsx("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),k1=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),f.jsx("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),Ue),u_=$("M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z",{width:448,height:512}),f_=$("M252 54L203 8a28 27 0 00-20-8H28C12 0 0 12 0 27v195c0 15 12 26 28 26h204c15 0 28-11 28-26V73a28 27 0 00-8-19zM130 213c-21 0-37-16-37-36 0-19 16-35 37-35 20 0 37 16 37 35 0 20-17 36-37 36zm56-169v56c0 4-4 6-7 6H44c-4 0-7-2-7-6V42c0-4 3-7 7-7h133l4 2 3 2a7 7 0 012 5z M296 201l87 95-188 205-78 9c-10 1-19-8-18-20l9-84zm141-14l-41-44a31 31 0 00-46 0l-38 41 87 95 38-42c13-14 13-36 0-50z",{width:448,height:512}),tp=$(f.jsx("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),Ue);$("M384 112v352c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h80c0-35.29 28.71-64 64-64s64 28.71 64 64h80c26.51 0 48 21.49 48 48zM192 40c-13.255 0-24 10.745-24 24s10.745 24 24 24 24-10.745 24-24-10.745-24-24-24m96 114v-20a6 6 0 0 0-6-6H102a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h180a6 6 0 0 0 6-6z",{width:384,height:512});var h_=$("M204.3 5C104.9 24.4 24.8 104.3 5.2 203.4c-37 187 131.7 326.4 258.8 306.7 41.2-6.4 61.4-54.6 42.5-91.7-23.1-45.4 9.9-98.4 60.9-98.4h79.7c35.8 0 64.8-29.6 64.9-65.3C511.5 97.1 368.1-26.9 204.3 5zM96 320c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm32-128c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128-64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm128 64c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"),lh=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),f.jsx("path",{d:"M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z"}),f.jsx("path",{d:"M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"})]}),K),$8=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M15 8h.01"}),f.jsx("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),f.jsx("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),f.jsx("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),f.jsx("path",{d:"M19 16v6"}),f.jsx("path",{d:"M22 19l-3 3l-3 -3"})]}),K),p_=$("M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",{width:512,height:512});$("M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512});$("M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z",{width:448,height:512});var U_=$("M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z");$("M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z");var I2=$(f.jsx("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),Ue),_2=$(f.jsx("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),Ue),m_=$("M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z",{mirror:!0}),g_=$(f.jsx("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),Ue);$("M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z");$("M16 5l-1.42 1.42-1.59-1.59V16h-1.98V4.83L9.42 6.42 8 5l4-4 4 4zm4 5v11c0 1.1-.9 2-2 2H6c-1.11 0-2-.9-2-2V10c0-1.11.89-2 2-2h3v2H6v11h12V10h-3V8h3c1.1 0 2 .89 2 2z",{width:24,height:24});$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M8 9h-1a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-8a2 2 0 0 0 -2 -2h-1"}),f.jsx("path",{d:"M12 14v-11"}),f.jsx("path",{d:"M9 6l3 -3l3 3"})]}),K);$(f.jsxs(f.Fragment,{children:[f.jsx("path",{fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),f.jsx("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64});$(f.jsx("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024});var F8=f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M12 10l0 10"}),f.jsx("path",{d:"M12 10l4 4"}),f.jsx("path",{d:"M12 10l-4 4"}),f.jsx("path",{d:"M4 4l16 0"})]}),z8=f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M12 5l0 14"}),f.jsx("path",{d:"M16 9l-4 -4"}),f.jsx("path",{d:"M8 9l4 -4"})]}),T2=$(z8,K),A2=$(z8,{...K,style:{transform:"rotate(180deg)"}}),j2=$(F8,K),R2=$(F8,{...K,style:{transform:"rotate(180deg)"}}),D2=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),L2=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),P2=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),N2=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),b_=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),v_=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),O2=$(f.jsxs("g",{stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),f.jsx("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),Ue),$2=$(f.jsxs("g",{stroke:"currentColor",strokeWidth:"1.25",children:[f.jsx("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),f.jsx("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),Ue),B8=$(f.jsxs("g",{strokeWidth:"1.5",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("circle",{cx:"9",cy:"7",r:"4"}),f.jsx("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),f.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),f.jsx("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),K);$("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z");$("M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm96 328c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16v160z");var hl=$(f.jsxs(f.Fragment,{children:[f.jsx("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx("path",{d:"M15 5 5 15M5 5l10 10"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue);$("M464 0c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48H176c-26.51 0-48-21.49-48-48V48c0-26.51 21.49-48 48-48h288M176 416c-44.112 0-80-35.888-80-80V128H48c-26.51 0-48 21.49-48 48v288c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48v-48H176z",{mirror:!0});$("M11.553 22.894a.998.998 0 00.894 0s3.037-1.516 5.465-4.097C19.616 16.987 21 14.663 21 12V5a1 1 0 00-.649-.936l-8-3a.998.998 0 00-.702 0l-8 3A1 1 0 003 5v7c0 2.663 1.384 4.987 3.088 6.797 2.428 2.581 5.465 4.097 5.465 4.097zm-1.303-8.481l6.644-6.644a.856.856 0 111.212 1.212l-7.25 7.25a.856.856 0 01-1.212 0l-3.75-3.75a.856.856 0 111.212-1.212l3.144 3.144z",{width:24});$("M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z",{width:384,height:512});var F2=Z.memo(({theme:e})=>$(f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M25 26H111V111H25",fill:na()}),f.jsx("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:na(),strokeWidth:"2"}),f.jsx("path",{d:"M100 100H160V160H100",fill:na()}),f.jsx("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:na(),strokeWidth:"2"}),f.jsxs("g",{fill:L8(e),stroke:na(),strokeWidth:"6",children:[f.jsx("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),f.jsx("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),f.jsx("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),f.jsx("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),z2=Z.memo(({theme:e})=>$(f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M25 26H111V111H25",fill:na()}),f.jsx("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:na(),strokeWidth:"2"}),f.jsx("path",{d:"M100 100H160V160H100",fill:na()}),f.jsx("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:na(),strokeWidth:"2"}),f.jsxs("g",{fill:L8(e),stroke:na(),strokeWidth:"6",children:[f.jsx("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),f.jsx("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),f.jsx("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),f.jsx("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),f.jsx("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),f.jsx("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),x_=$(f.jsx("g",{strokeWidth:1.25,children:f.jsx("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),Ue),y_=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),f.jsx("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:f.jsx("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),f.jsx("g",{mask:"url(#FillHachureIcon)",children:f.jsx("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),Ue),w_=$(f.jsxs(f.Fragment,{children:[f.jsxs("g",{clipPath:"url(#a)",children:[f.jsx("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),f.jsx("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:f.jsx("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),f.jsx("g",{mask:"url(#FillCrossHatchIcon)",children:f.jsx("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),E_=$(f.jsxs(f.Fragment,{children:[f.jsx("g",{clipPath:"url(#a)",children:f.jsx("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...Ue,fill:"currentColor"}),H8=$(f.jsx(f.Fragment,{children:f.jsx("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),Ue),S_=$(f.jsx("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),Ue),k_=$(f.jsx("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),Ue);Z.memo(({theme:e})=>$(f.jsx("path",{d:"M6 10H34",stroke:na(),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20}));var C_=$(f.jsxs("g",{strokeWidth:"2",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M5 12h2"}),f.jsx("path",{d:"M17 12h2"}),f.jsx("path",{d:"M11 12h2"})]}),K),M_=$(f.jsxs("g",{strokeWidth:"2",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 12v.01"}),f.jsx("path",{d:"M8 12v.01"}),f.jsx("path",{d:"M12 12v.01"}),f.jsx("path",{d:"M16 12v.01"}),f.jsx("path",{d:"M20 12v.01"})]}),K),I_=$(f.jsx("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),Ue),__=$(f.jsx("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),Ue),T_=$(f.jsx("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),Ue),A_=$(f.jsxs("svg",{strokeWidth:"1.5",children:[f.jsx("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),f.jsx("path",{d:"M13.3333 3.33331V3.34331"}),f.jsx("path",{d:"M16.6667 3.33331V3.34331"}),f.jsx("path",{d:"M16.6667 6.66669V6.67669"}),f.jsx("path",{d:"M16.6667 10V10.01"}),f.jsx("path",{d:"M3.33334 13.3333V13.3433"}),f.jsx("path",{d:"M16.6667 13.3333V13.3433"}),f.jsx("path",{d:"M3.33334 16.6667V16.6767"}),f.jsx("path",{d:"M6.66666 16.6667V16.6767"}),f.jsx("path",{d:"M10 16.6667V16.6767"}),f.jsx("path",{d:"M13.3333 16.6667V16.6767"}),f.jsx("path",{d:"M16.6667 16.6667V16.6767"})]}),Ue),j_=$(f.jsxs("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),f.jsx("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),f.jsx("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),f.jsx("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),f.jsx("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),f.jsx("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),f.jsx("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),f.jsx("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),f.jsx("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),f.jsx("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),f.jsx("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),f.jsx("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),K),R_=$(f.jsxs("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[f.jsx("path",{d:"M12 12l9 0"}),f.jsx("path",{d:"M3 9l6 6"}),f.jsx("path",{d:"M3 15l6 -6"})]}),K),D_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[f.jsx("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),f.jsx("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),L_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[f.jsx("path",{d:"M32 10L6 10",strokeWidth:2}),f.jsx("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),P_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[f.jsx("path",{d:"M26 10L6 10"}),f.jsx("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),N_=Z.memo(({flip:e=!1})=>$(f.jsx("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:f.jsx("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),O_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[f.jsx("path",{d:"M32 10L6 10",strokeWidth:2}),f.jsx("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),$_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[f.jsx("path",{d:"M6,9.5H27"}),f.jsx("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),F_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[f.jsx("path",{d:"M6,9.5H20"}),f.jsx("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),z_=Z.memo(({flip:e=!1})=>$(f.jsxs("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[f.jsx("path",{d:"M6,9.5H20"}),f.jsx("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),B_=Z.memo(({flip:e=!1})=>$(f.jsx("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:f.jsx("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),H_=Z.memo(({flip:e=!1})=>$(f.jsx("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:f.jsx("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),X_=Z.memo(({flip:e=!1})=>$(f.jsx("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:f.jsx("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),W_=$(f.jsxs(f.Fragment,{children:[f.jsx("g",{clipPath:"url(#a)",children:f.jsx("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),V_=$(f.jsxs(f.Fragment,{children:[f.jsx("g",{clipPath:"url(#a)",children:f.jsx("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),G_=$(f.jsxs(f.Fragment,{children:[f.jsx("g",{clipPath:"url(#a)",children:f.jsx("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),Y_=$(f.jsx(f.Fragment,{children:f.jsx("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),Ue),Bu=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 7v-2h13v2"}),f.jsx("path",{d:"M10 5v14"}),f.jsx("path",{d:"M12 19h-4"}),f.jsx("path",{d:"M15 13v-1h6v1"}),f.jsx("path",{d:"M18 12v7"}),f.jsx("path",{d:"M17 19h2"})]}),K),Z_=$(f.jsx(f.Fragment,{children:f.jsxs("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M7 12h10"}),f.jsx("path",{d:"M7 5v14"}),f.jsx("path",{d:"M17 5v14"}),f.jsx("path",{d:"M15 19h4"}),f.jsx("path",{d:"M15 5h4"}),f.jsx("path",{d:"M5 19h4"}),f.jsx("path",{d:"M5 5h4"})]})}),K),Zd=$(f.jsx(f.Fragment,{children:f.jsx("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),Ue),C1=$(f.jsxs(f.Fragment,{children:[f.jsx("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),f.jsx("defs",{children:f.jsx("clipPath",{id:"a",children:f.jsx("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),Ue),K_=$(f.jsxs("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),f.jsx("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),f.jsx("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),K),q_=$(f.jsxs("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),f.jsx("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),f.jsx("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),K),J_=$(f.jsxs("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),f.jsx("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),f.jsx("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),K),Q_=Z.memo(({theme:e})=>$(f.jsxs("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),f.jsx("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),K)),eT=Z.memo(({theme:e})=>$(f.jsxs("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),f.jsx("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),K)),tT=Z.memo(({theme:e})=>$(f.jsxs("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),f.jsx("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),f.jsx("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),K)),X8=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M21 19h-18l9 -15"}),f.jsx("path",{d:"M20.615 15.171h.015"}),f.jsx("path",{d:"M19.515 11.771h.015"}),f.jsx("path",{d:"M17.715 8.671h.015"}),f.jsx("path",{d:"M15.415 5.971h.015"})]}),K),nT=$(f.jsx("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",fill:"currentColor"}),{width:640,height:512});$(f.jsx("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"}));var W8=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),f.jsx("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),f.jsx("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),f.jsx("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),K),B2=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),f.jsx("path",{d:"M7 11l5 5l5 -5"}),f.jsx("path",{d:"M12 4l0 12"})]}),K),np=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),f.jsx("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),K),aT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),f.jsx("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),f.jsx("path",{d:"M9.15 14.85l8.85 -10.85"}),f.jsx("path",{d:"M6 4l8.85 10.85"})]}),K),iT=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),f.jsx("path",{d:"M12 17l0 .01"}),f.jsx("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),K);$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M7 4v16l13 -8z"})]}),K);$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"})]}),K);var rT=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M5 12l5 5l10 -10"})]}),K),sT=$(f.jsxs(f.Fragment,{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"}),f.jsx("path",{d:"M12 9v4"}),f.jsx("path",{d:"M12 17h.01"})]}),K),lT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M11 7l6 6"}),f.jsx("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]}),K),oT=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M12 3l-4 7h8z"}),f.jsx("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),f.jsx("path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"})]}),K),V8=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 7l16 0"}),f.jsx("path",{d:"M4 17l16 0"}),f.jsx("path",{d:"M7 4l0 16"}),f.jsx("path",{d:"M17 4l0 16"})]}),K),G8=$(f.jsx("path",{fill:"currentColor",d:"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z"})),od=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{d:"M4.16602 10H15.8327"}),f.jsx("path",{d:"M12.5 13.3333L15.8333 10"}),f.jsx("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),Ue),Y8=$(f.jsxs("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[f.jsx("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),f.jsx("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"})]}),20),Z8=$(f.jsxs("g",{stroke:"currentColor",fill:"none",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z"}),f.jsx("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),f.jsx("path",{d:"M15 6l3 3"}),f.jsx("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),f.jsx("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),K);$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z"}),f.jsx("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),f.jsx("path",{d:"M15 6l3 3"}),f.jsx("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),f.jsx("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),K);$(f.jsxs("g",{stroke:"currentColor",fill:"none",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),f.jsx("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),f.jsx("path",{d:"M6 7.63c-1.391 -.236 -2.787 .395 -3.534 1.689a3.474 3.474 0 0 0 1.271 4.745l4.263 2.514l6 -3.348"}),f.jsx("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),f.jsx("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),f.jsx("path",{d:"M18 16.302c1.391 .236 2.787 -.395 3.534 -1.689a3.474 3.474 0 0 0 -1.271 -4.745l-4.308 -2.514l-5.955 3.42"})]}),K);var cT=$(f.jsxs("g",{stroke:"currentColor",fill:"none",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),f.jsx("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),f.jsx("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),f.jsx("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),K),ap=$(f.jsxs("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),f.jsx("path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"})]}),K),dT=$(f.jsxs("g",{stroke:"currentColor",fill:"none",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),f.jsx("path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"}),f.jsx("path",{d:"M3 3l18 18"})]}),K),uT=$(f.jsxs("g",{stroke:"currentColor",fill:"none",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),f.jsx("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),f.jsx("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),f.jsx("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),f.jsx("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),f.jsx("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),K),fT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),f.jsx("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),f.jsx("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),f.jsx("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),f.jsx("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),f.jsx("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),K),Kr=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),f.jsx("path",{d:"M21 21l-6 -6"})]}),K),hT=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),f.jsx("path",{d:"M12 7v5l3 3"}),f.jsx("path",{d:"M19 16l-2 3h4l-2 3"})]}),K),pT=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M9 2m0 3a3 3 0 0 1 3 -3h0a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3h0a3 3 0 0 1 -3 -3z"}),f.jsx("path",{d:"M5 10a7 7 0 0 0 14 0"}),f.jsx("path",{d:"M8 21l8 0"}),f.jsx("path",{d:"M12 17l0 4"})]}),K),UT=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 3l18 18"}),f.jsx("path",{d:"M9 5a3 3 0 0 1 6 0v5a3 3 0 0 1 -.13 .874m-2 2a3 3 0 0 1 -3.87 -2.872v-1"}),f.jsx("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),f.jsx("path",{d:"M8 21l8 0"}),f.jsx("path",{d:"M12 17l0 4"})]}),K),K8=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),K),mT=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M8 8m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"}),f.jsx("path",{d:"M12 20v.01"}),f.jsx("path",{d:"M16 20v.01"}),f.jsx("path",{d:"M8 20v.01"}),f.jsx("path",{d:"M4 20v.01"}),f.jsx("path",{d:"M4 16v.01"}),f.jsx("path",{d:"M4 12v.01"}),f.jsx("path",{d:"M4 8v.01"}),f.jsx("path",{d:"M4 4v.01"}),f.jsx("path",{d:"M8 4v.01"}),f.jsx("path",{d:"M12 4v.01"}),f.jsx("path",{d:"M16 4v.01"}),f.jsx("path",{d:"M20 4v.01"}),f.jsx("path",{d:"M20 8v.01"}),f.jsx("path",{d:"M20 12v.01"}),f.jsx("path",{d:"M20 16v.01"}),f.jsx("path",{d:"M20 20v.01"})]}),K),gT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M5 3v18"}),f.jsx("path",{d:"M19 21v-18"}),f.jsx("path",{d:"M5 7h14"}),f.jsx("path",{d:"M5 15h14"}),f.jsx("path",{d:"M8 13v4"}),f.jsx("path",{d:"M11 13v4"}),f.jsx("path",{d:"M16 13v4"}),f.jsx("path",{d:"M14 5v4"}),f.jsx("path",{d:"M11 5v4"}),f.jsx("path",{d:"M8 5v4"}),f.jsx("path",{d:"M3 21h18"})]}),K),bT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 12l18 0"}),f.jsx("path",{d:"M7 16l10 0l-10 5l0 -5"}),f.jsx("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),K),vT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M12 3l0 18"}),f.jsx("path",{d:"M16 7l0 10l5 0l-5 -10"}),f.jsx("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),K),q8=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"}),f.jsx("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),f.jsx("path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"})]}),K),ip=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),f.jsx("path",{d:"M22 22l-3 -3"}),f.jsx("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),f.jsx("path",{d:"M3 11v-1"}),f.jsx("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),f.jsx("path",{d:"M10 3h1"}),f.jsx("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),K),xT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),f.jsx("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),f.jsx("path",{d:"M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"}),f.jsx("path",{d:"M10 15l2 6l2 -6"}),f.jsx("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),K),yT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),f.jsx("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),f.jsx("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),f.jsx("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),f.jsx("path",{d:"M11 21v-6l3 6v-6"})]}),K),wT=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0"}),f.jsx("path",{d:"M4 8l5 0"}),f.jsx("path",{d:"M15 8l4 0"})]}),K),ET=$(f.jsxs("g",{strokeWidth:1.25,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1"}),f.jsx("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),f.jsx("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),f.jsx("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),f.jsx("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),K),ST=$(f.jsxs("g",{stroke:"currentColor",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4"})]}),{...K,strokeWidth:1.5});$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"}),f.jsx("path",{d:"M21 12h-13l3 -3"}),f.jsx("path",{d:"M11 15l-3 -3"})]}),K);var kT=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z"}),f.jsx("path",{d:"M10 9l5 3l-5 3z"})]}),K),CT=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M3 6h18"}),f.jsx("path",{d:"M3 12h18"}),f.jsx("path",{d:"M3 18h18"}),f.jsx("path",{d:"M6 3v18"}),f.jsx("path",{d:"M12 3v18"}),f.jsx("path",{d:"M18 3v18"})]}),K),MT=$(f.jsxs("g",{strokeWidth:1.5,children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M17 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),f.jsx("path",{d:"M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),f.jsx("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),K),IT=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M6 18l12 -12"}),f.jsx("path",{d:"M18 10v-4h-4"})]}),K),_T=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),f.jsx("path",{d:"M18 4l3 3l-3 3"})]}),K),TT=$(f.jsxs("g",{children:[f.jsx("path",{d:"M16,12L20,9L16,6"}),f.jsx("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),K),J8=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M6 9l6 6l6 -6"})]}),K),AT=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M6 15l6 -6l6 6"})]}),K),jT=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M6 15l6 -6l6 6"})]}),K),H2=$(f.jsxs("g",{strokeWidth:"1.25",children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),f.jsx("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),K),Q8=$(f.jsxs("g",{children:[f.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),f.jsx("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),f.jsx("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),f.jsx("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),f.jsx("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),f.jsx("path",{d:"M5 7l0 10"}),f.jsx("path",{d:"M7 5l10 0"}),f.jsx("path",{d:"M7 19l10 0"}),f.jsx("path",{d:"M19 7l0 10"})]}),K),Kd={[it.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},icon:Ao},[it.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.35},icon:Zd},[it["Lilita One"]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15},icon:Z_},[it["Comic Shanns"]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25},icon:C1},[it.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},icon:Ao,deprecated:!0},[it.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},icon:Zd,deprecated:!0,local:!0},[it.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},icon:C1,deprecated:!0},[it["Liberation Sans"]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},serverSide:!0},[Cs.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.15},fallback:!0},[Cs["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},kr={LATIN:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",LATIN_EXT:"U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF",CYRILIC_EXT:"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F",CYRILIC:"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116",VIETNAMESE:"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB"},rp="local:",RT=class extends Error{constructor(e="Couldn't export canvas.",t="CANVAS_ERROR"){super(),this.name=t,this.message=e}},Hu=class extends DOMException{constructor(e="Request Aborted"){super(e,"AbortError")}},_r=class extends Error{constructor(e="Image Scene Data Error",t="IMAGE_SCENE_DATA_ERROR"){super(e),j(this,"code"),this.name="EncodingError",this.code=t}},DT=class extends Error{constructor(){super(...arguments),j(this,"code","ELEMENT_HAS_INVALID_INDEX")}},e7=class extends Error{constructor(e="Worker URL is not defined!",t="WORKER_URL_NOT_DEFINED"){super(e),j(this,"code"),this.name="WorkerUrlNotDefinedError",this.code=t}},t7=class extends Error{constructor(e="Worker has to be in a separate chunk!",t="WORKER_IN_THE_MAIN_CHUNK"){super(e),j(this,"code"),this.name="WorkerInTheMainChunkError",this.code=t}},X2=class extends Error{constructor(e){super(e),this.name="ExcalidrawError"}},LT=class{constructor(e){j(this,"instance"),j(this,"debounceTerminate"),this.instance=new Worker(e,{type:"module"})}},PT=class n7{constructor(t,n){j(this,"idleWorkers",new Set),j(this,"workerUrl"),j(this,"workerTTL"),this.workerUrl=t,this.workerTTL=n.ttl||1e3}static create(t,n={}){if(!t)throw new e7;if(!import.meta.url||t.toString()===import.meta.url)throw new t7;return new n7(t,n)}async postMessage(t,n){let a,i=Array.from(this.idleWorkers).shift();return i?(this.idleWorkers.delete(i),a=i):a=await this.createWorker(),new Promise((r,s)=>{a.instance.onmessage=this.onMessageHandler(a,r),a.instance.onerror=this.onErrorHandler(a,s),a.instance.postMessage(t,n),a.debounceTerminate(()=>s(new Error(`Active worker did not respond for ${this.workerTTL}ms!`)))})}async clear(){for(let t of this.idleWorkers)t.debounceTerminate.cancel(),t.instance.terminate();this.idleWorkers.clear()}async createWorker(){let t=new LT(this.workerUrl);return t.debounceTerminate=Ys(n=>{t.instance.terminate(),this.idleWorkers.has(t)?(this.idleWorkers.delete(t),console.debug("Job finished! Idle worker has been released from the pool.")):n?n():console.error("Worker has been terminated!")},this.workerTTL),t}onMessageHandler(t,n){return a=>{t.debounceTerminate(),this.idleWorkers.add(t),n(a.data)}}onErrorHandler(t,n){return a=>{t.debounceTerminate(()=>n(a)),t.debounceTerminate.flush(),this.clear()}}},W2=typeof Worker<"u",NT=async(e,t)=>{let{Commands:n,subsetToBase64:a,toBase64:i}=await $T();return W2?ar(async()=>{try{let r=await FT(),s=e.slice(0),l=await r.postMessage({command:n.Subset,arrayBuffer:s,codePoints:t},{transfer:[s]});return i(l)}catch(r){return W2=!1,bI()&&(r instanceof e7||r instanceof t7)||console.error("Failed to use workers for subsetting, falling back to the main thread.",r),a(e,t)}}):a(e,t)},oh=null,ch=null,OT=async()=>(oh||(oh=ne(()=>import("./subset-worker.chunk-DfLYxc1O.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)),oh),$T=async()=>(ch||(ch=ne(()=>import("./subset-shared.chunk-CzgdV5hf.js"),__vite__mapDeps([1,2,3]),import.meta.url)),ch),dh=null,FT=()=>(dh||(dh=ar(async()=>{let{WorkerUrl:e}=await OT();return PT.create(e)})),dh),a7=class cd{constructor(t,n,a){j(this,"urls"),j(this,"fontFace"),this.urls=cd.createUrls(n);let i=this.urls.map(r=>`url(${r}) ${cd.getFormat(r)}`).join(", ");this.fontFace=new FontFace(t,i,{display:"swap",style:"normal",weight:"400",...a})}toCSS(t){if(!this.getUnicodeRangeRegex().test(t))return;let n=Array.from(t).map(a=>a.codePointAt(0));return this.getContent(n).then(a=>`@font-face { font-family: ${this.fontFace.family}; src: url(${a}); }`)}async getContent(t){let n=0,a=[];for(;n<this.urls.length;){let i=this.urls[n];try{let r=await this.fetchFont(i);return await NT(r,t)}catch(r){a.push(`"${i.toString()}" returned error "${r}"`)}n++}return console.error(`Failed to fetch font family "${this.fontFace.family}"`,JSON.stringify(a,void 0,2)),this.urls.length?this.urls[this.urls.length-1].toString():""}fetchFont(t){return ar(async()=>{let n=await fetch(t,{cache:"force-cache",headers:{Accept:"font/woff2"}});if(!n.ok){let a=t instanceof URL?t.toString():"dataurl";throw new Error(`Failed to fetch "${a}": ${n.statusText}`)}return await n.arrayBuffer()})}getUnicodeRangeRegex(){let t=this.fontFace.unicodeRange.split(/,\s*/).map(n=>{let[a,i]=n.replace("U+","").split("-");return i?`\\u{${a}}-\\u{${i}}`:`\\u{${a}}`}).join("");return new RegExp(`[${t}]`,"u")}static createUrls(t){if(t.startsWith("data"))return[t];if(t.startsWith(rp))return[];if(t.startsWith("http"))return[new URL(t)];let n=t.replace(/^\/+/,""),a=[];if(typeof window.EXCALIDRAW_ASSET_PATH=="string"){let i=this.normalizeBaseUrl(window.EXCALIDRAW_ASSET_PATH);a.push(new URL(n,i))}else Array.isArray(window.EXCALIDRAW_ASSET_PATH)&&window.EXCALIDRAW_ASSET_PATH.forEach(i=>{let r=this.normalizeBaseUrl(i);a.push(new URL(n,r))});return a.push(new URL(n,cd.ASSETS_FALLBACK_URL)),a}static getFormat(t){if(!(t instanceof URL))return"";try{let n=new URL(t).pathname.split(".");return n.length===1?"":`format('${n.pop()}')`}catch{return""}}static normalizeBaseUrl(t){let n=t;return/^\.?\//.test(n)&&(n=new URL(n.replace(/^\.?\/+/,""),window?.location?.origin).toString()),n=`${n.replace(/\/+$/,"")}/`,n}};j(a7,"ASSETS_FALLBACK_URL",`https://esm.sh/${`${be.PKG_NAME}@${be.PKG_VERSION}`}/dist/prod/`);var zT=a7,BT="./fonts/Cascadia/CascadiaCode-Regular.woff2",HT=[{uri:BT}],XT="./fonts/ComicShanns/ComicShanns-Regular-279a7b317d12eb88de06167bd672b4b4.woff2",WT="./fonts/ComicShanns/ComicShanns-Regular-fcb0fc02dcbee4c9846b3e2508668039.woff2",VT="./fonts/ComicShanns/ComicShanns-Regular-dc6a8806fa96795d7b3be5026f989a17.woff2",GT="./fonts/ComicShanns/ComicShanns-Regular-6e066e8de2ac57ea9283adb9c24d7f0c.woff2",YT=[{uri:XT,descriptors:{unicodeRange:"U+20-7e,U+a1-a6,U+a8,U+ab-ac,U+af-b1,U+b4,U+b8,U+bb-bc,U+bf-cf,U+d1-d7,U+d9-de,U+e0-ef,U+f1-f7,U+f9-ff,U+131,U+152-153,U+2c6,U+2da,U+2dc,U+2013-2014,U+2018-201a,U+201c-201d,U+2020-2022,U+2026,U+2039-203a,U+2044,U+20ac,U+2191,U+2193,U+2212"}},{uri:WT,descriptors:{unicodeRange:"U+100-10f,U+112-125,U+128-130,U+134-137,U+139-13c,U+141-148,U+14c-151,U+154-161,U+164-165,U+168-17f,U+1bf,U+1f7,U+218-21b,U+237,U+1e80-1e85,U+1ef2-1ef3,U+a75b"}},{uri:VT,descriptors:{unicodeRange:"U+2c7,U+2d8-2d9,U+2db,U+2dd,U+315,U+2190,U+2192,U+2200,U+2203-2204,U+2264-2265,U+f6c3"}},{uri:GT,descriptors:{unicodeRange:"U+3bb"}}],ZT=[{uri:rp}],KT="./fonts/Excalifont/Excalifont-Regular-a88b72a24fb54c9f94e3b5fdaa7481c9.woff2",qT="./fonts/Excalifont/Excalifont-Regular-be310b9bcd4f1a43f571c46df7809174.woff2",JT="./fonts/Excalifont/Excalifont-Regular-b9dcf9d2e50a1eaf42fc664b50a3fd0d.woff2",QT="./fonts/Excalifont/Excalifont-Regular-41b173a47b57366892116a575a43e2b6.woff2",eA="./fonts/Excalifont/Excalifont-Regular-3f2c5db56cc93c5a6873b1361d730c16.woff2",tA="./fonts/Excalifont/Excalifont-Regular-349fac6ca4700ffec595a7150a0d1e1d.woff2",nA="./fonts/Excalifont/Excalifont-Regular-623ccf21b21ef6b3a0d87738f77eb071.woff2",aA=[{uri:KT,descriptors:{unicodeRange:"U+20-7e,U+a0-a3,U+a5-a6,U+a8-ab,U+ad-b1,U+b4,U+b6-b8,U+ba-ff,U+131,U+152-153,U+2bc,U+2c6,U+2da,U+2dc,U+304,U+308,U+2013-2014,U+2018-201a,U+201c-201e,U+2020,U+2022,U+2024-2026,U+2030,U+2039-203a,U+20ac,U+2122,U+2212"}},{uri:qT,descriptors:{unicodeRange:"U+100-130,U+132-137,U+139-149,U+14c-151,U+154-17e,U+192,U+1fc-1ff,U+218-21b,U+237,U+1e80-1e85,U+1ef2-1ef3,U+2113"}},{uri:JT,descriptors:{unicodeRange:"U+400-45f,U+490-491,U+2116"}},{uri:QT,descriptors:{unicodeRange:"U+37e,U+384-38a,U+38c,U+38e-393,U+395-3a1,U+3a3-3a8,U+3aa-3cf,U+3d7"}},{uri:eA,descriptors:{unicodeRange:"U+2c7,U+2d8-2d9,U+2db,U+2dd,U+302,U+306-307,U+30a-30c,U+326-328,U+212e,U+2211,U+fb01-fb02"}},{uri:tA,descriptors:{unicodeRange:"U+462-463,U+472-475,U+4d8-4d9,U+4e2-4e3,U+4e6-4e9,U+4ee-4ef"}},{uri:nA,descriptors:{unicodeRange:"U+300-301,U+303"}}],iA=[{uri:rp}],rA="./fonts/Liberation/LiberationSans-Regular.woff2",sA=[{uri:rA}],lA="./fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYEF8RXi4EwQ.woff2",oA="./fonts/Lilita/Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYE98RXi4EwSsbg.woff2",cA=[{uri:oA,descriptors:{unicodeRange:kr.LATIN_EXT}},{uri:lA,descriptors:{unicodeRange:kr.LATIN}}],dA="./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTQ3j6zbXWjgeg.woff2",uA="./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTo3j6zbXWjgevT5.woff2",fA="./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTA3j6zbXWjgevT5.woff2",hA="./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTk3j6zbXWjgevT5.woff2",pA="./fonts/Nunito/Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTs3j6zbXWjgevT5.woff2",UA=[{uri:hA,descriptors:{unicodeRange:kr.CYRILIC_EXT,weight:"500"}},{uri:fA,descriptors:{unicodeRange:kr.CYRILIC,weight:"500"}},{uri:pA,descriptors:{unicodeRange:kr.VIETNAMESE,weight:"500"}},{uri:uA,descriptors:{unicodeRange:kr.LATIN_EXT,weight:"500"}},{uri:dA,descriptors:{unicodeRange:kr.LATIN,weight:"500"}}],mA="./fonts/Virgil/Virgil-Regular.woff2",gA=[{uri:mA}],bA="./fonts/Xiaolai/Xiaolai-Regular-09850c4077f3fffe707905872e0e2460.woff2",vA="./fonts/Xiaolai/Xiaolai-Regular-7eb9fffd1aa890d07d0f88cc82e6cfe4.woff2",xA="./fonts/Xiaolai/Xiaolai-Regular-60a3089806700d379f11827ee9843b6b.woff2",yA="./fonts/Xiaolai/Xiaolai-Regular-6fe5c5973cc06f74b2387a631ea36b88.woff2",wA="./fonts/Xiaolai/Xiaolai-Regular-b96d9226ce77ec94ceca043d712182e6.woff2",EA="./fonts/Xiaolai/Xiaolai-Regular-6ae5b42180ad70b971c91e7eefb8eba2.woff2",SA="./fonts/Xiaolai/Xiaolai-Regular-a4c34be6d42152e64b0df90bc4607f64.woff2",kA="./fonts/Xiaolai/Xiaolai-Regular-c69f61a4ab18d0488c8d1fc12e7028e8.woff2",CA="./fonts/Xiaolai/Xiaolai-Regular-e3fcf5180fd466c8915c4e8069491054.woff2",MA="./fonts/Xiaolai/Xiaolai-Regular-c1f94158256bb1f3bf665b053d895af9.woff2",IA="./fonts/Xiaolai/Xiaolai-Regular-544fc28abe2c5c30e62383fd4dac255f.woff2",_A="./fonts/Xiaolai/Xiaolai-Regular-7197d6fda6cba7c3874c53d6381ca239.woff2",TA="./fonts/Xiaolai/Xiaolai-Regular-70c2eb8d64e71a42a834eb857ea9df51.woff2",AA="./fonts/Xiaolai/Xiaolai-Regular-069e77aac84590e2e991d0a0176d34f2.woff2",jA="./fonts/Xiaolai/Xiaolai-Regular-41521fade99856108931b4768b1b2648.woff2",RA="./fonts/Xiaolai/Xiaolai-Regular-a004ddfcb26e67bd6e678c8ed19e25ce.woff2",DA="./fonts/Xiaolai/Xiaolai-Regular-04b718e5623574919c8b0dea5f301444.woff2",LA="./fonts/Xiaolai/Xiaolai-Regular-7e4bde7e9c7f84cd34d8a845e384c746.woff2",PA="./fonts/Xiaolai/Xiaolai-Regular-23686f7f29da6e8008c36dd3a80c83d6.woff2",NA="./fonts/Xiaolai/Xiaolai-Regular-69c09cc5fa3e55c74fc4821f76909cc3.woff2",OA="./fonts/Xiaolai/Xiaolai-Regular-25b7f38e18f035f96cb5e547bd2bd08c.woff2",$A="./fonts/Xiaolai/Xiaolai-Regular-ba3de316d63c7e339987b16f41a0b879.woff2",FA="./fonts/Xiaolai/Xiaolai-Regular-12b52b58eb3df36804b9a654ec9ee194.woff2",zA="./fonts/Xiaolai/Xiaolai-Regular-b1220a3c61f85cc0408deedb4c5f57a2.woff2",BA="./fonts/Xiaolai/Xiaolai-Regular-4535823663ad81405188a528d8f2b1a2.woff2",HA="./fonts/Xiaolai/Xiaolai-Regular-3eaa538115d76932653c21d8dc28f207.woff2",XA="./fonts/Xiaolai/Xiaolai-Regular-7e929f262f30c8ee78bf398150b1a7cd.woff2",WA="./fonts/Xiaolai/Xiaolai-Regular-73e309718fd16cea44b4d54a33581811.woff2",VA="./fonts/Xiaolai/Xiaolai-Regular-9eb5a99df4e76ac3363453ac9ca288b1.woff2",GA="./fonts/Xiaolai/Xiaolai-Regular-3e63ed8162808a9e425ed80a8bc79114.woff2",YA="./fonts/Xiaolai/Xiaolai-Regular-cb17fc3db95f6d139afc9d31a8e93293.woff2",ZA="./fonts/Xiaolai/Xiaolai-Regular-c8b71798409ccc126ee264a00aadcf21.woff2",KA="./fonts/Xiaolai/Xiaolai-Regular-11c345711937f0ba4b8f7b6b919c8440.woff2",qA="./fonts/Xiaolai/Xiaolai-Regular-e480d9c614742d05f0e78f274f1e69e6.woff2",JA="./fonts/Xiaolai/Xiaolai-Regular-95429962233afd82db1c27df1500a28c.woff2",QA="./fonts/Xiaolai/Xiaolai-Regular-2cf96d082d35ea3d8106851223ad0d16.woff2",ej="./fonts/Xiaolai/Xiaolai-Regular-2d43040e86ff03ba677f6f9c04cd0805.woff2",tj="./fonts/Xiaolai/Xiaolai-Regular-2a26d20a23b00898ce82f09d2ee47c3f.woff2",nj="./fonts/Xiaolai/Xiaolai-Regular-a365e82ed54697a52f27adcea1315fe8.woff2",aj="./fonts/Xiaolai/Xiaolai-Regular-f5d079153c99a25b9be5b8583c4cc8a7.woff2",ij="./fonts/Xiaolai/Xiaolai-Regular-10a7ae9a371830a80c3d844acf1c02d7.woff2",rj="./fonts/Xiaolai/Xiaolai-Regular-e4bca6cfa53e499cae0a6be4894a90e9.woff2",sj="./fonts/Xiaolai/Xiaolai-Regular-60a41c7e1c68f22424e6d22df544bc82.woff2",lj="./fonts/Xiaolai/Xiaolai-Regular-7ab2bed91166a9dca83a5ebfbe2a7f38.woff2",oj="./fonts/Xiaolai/Xiaolai-Regular-670ba603758d94268e8606f240a42e12.woff2",cj="./fonts/Xiaolai/Xiaolai-Regular-e656f091b9dc4709722c9f4b84d3c797.woff2",dj="./fonts/Xiaolai/Xiaolai-Regular-15dc6d811c9cd078f9086a740d5a1038.woff2",uj="./fonts/Xiaolai/Xiaolai-Regular-f0f13b5c60e0af5553bd359f5513be1b.woff2",fj="./fonts/Xiaolai/Xiaolai-Regular-8c2f33cee3993174f7e87c28e4bf42ee.woff2",hj="./fonts/Xiaolai/Xiaolai-Regular-761d05e3cd968cf574166867998ef06a.woff2",pj="./fonts/Xiaolai/Xiaolai-Regular-642b26e2e5f5fb780b51b593dbc8c851.woff2",Uj="./fonts/Xiaolai/Xiaolai-Regular-5572b3513ba8df57a3d5d7303ee6b11b.woff2",mj="./fonts/Xiaolai/Xiaolai-Regular-3c9de2ae0ea4bc91a510942dfa4be8d2.woff2",gj="./fonts/Xiaolai/Xiaolai-Regular-671a2c20b1eb9e4ef8a192833940e319.woff2",bj="./fonts/Xiaolai/Xiaolai-Regular-4dc6d5f188d5c96d44815cd1e81aa885.woff2",vj="./fonts/Xiaolai/Xiaolai-Regular-ce4884f96f11589608b76b726a755803.woff2",xj="./fonts/Xiaolai/Xiaolai-Regular-8f476c4c99813d57cbe6eca4727388ad.woff2",yj="./fonts/Xiaolai/Xiaolai-Regular-5935a5775af3d5c6307ac667bd9ae74e.woff2",wj="./fonts/Xiaolai/Xiaolai-Regular-79f007c1c6d07557120982951ea67998.woff2",Ej="./fonts/Xiaolai/Xiaolai-Regular-bafff7a14c27403dcc6cf1432e8ea836.woff2",Sj="./fonts/Xiaolai/Xiaolai-Regular-543fa46ace099a7099dad69123399400.woff2",kj="./fonts/Xiaolai/Xiaolai-Regular-4ddc14ed3eb0c3e46364317dfc0144a3.woff2",Cj="./fonts/Xiaolai/Xiaolai-Regular-0fa55a080fcd0f9dc2e0b0058b793df8.woff2",Mj="./fonts/Xiaolai/Xiaolai-Regular-66493ba5a8367f2928812f446f47b56a.woff2",Ij="./fonts/Xiaolai/Xiaolai-Regular-57862b464a55b18c7bf234ce22907d73.woff2",_j="./fonts/Xiaolai/Xiaolai-Regular-8d3bcabb847b56243b16afe62adaaf21.woff2",Tj="./fonts/Xiaolai/Xiaolai-Regular-2b77e8ebfb2367ab2662396a60e7d320.woff2",Aj="./fonts/Xiaolai/Xiaolai-Regular-0b5d723fdc4e249c140f0909e87d03b4.woff2",jj="./fonts/Xiaolai/Xiaolai-Regular-cdbce89e82cc1ab53a2decbf5819278f.woff2",Rj="./fonts/Xiaolai/Xiaolai-Regular-739bc1a567439c7cffcd1614644593d2.woff2",Dj="./fonts/Xiaolai/Xiaolai-Regular-72252d73220fa3cd856677888cee1635.woff2",Lj="./fonts/Xiaolai/Xiaolai-Regular-08e0dc436ad0ad61ba5558db0674d762.woff2",Pj="./fonts/Xiaolai/Xiaolai-Regular-cf6ff4e0f491ca0cf3038187a997b9b4.woff2",Nj="./fonts/Xiaolai/Xiaolai-Regular-9cfb2a77a4e45025105ad29a1748b90d.woff2",Oj="./fonts/Xiaolai/Xiaolai-Regular-450da755d5bcb70906e1295e559b9602.woff2",$j="./fonts/Xiaolai/Xiaolai-Regular-0986d134c05864f5025962eef9f994a0.woff2",Fj="./fonts/Xiaolai/Xiaolai-Regular-1ee544f0f1dac422545c505baa788992.woff2",zj="./fonts/Xiaolai/Xiaolai-Regular-4806e761d750087c2d734fc64596eaff.woff2",Bj="./fonts/Xiaolai/Xiaolai-Regular-33432927cd87d40cfe393c7482bf221f.woff2",Hj="./fonts/Xiaolai/Xiaolai-Regular-be549ab72f0719d606a5c01e2c0219b6.woff2",Xj="./fonts/Xiaolai/Xiaolai-Regular-019d66dcad46dc156b162d267f981c20.woff2",Wj="./fonts/Xiaolai/Xiaolai-Regular-b5c1596551c256e0e9cf02028595b092.woff2",Vj="./fonts/Xiaolai/Xiaolai-Regular-e5f453bb04da18eed01675eeebd88bf8.woff2",Gj="./fonts/Xiaolai/Xiaolai-Regular-cf2cc71752631e579e35b0e423bf2638.woff2",Yj="./fonts/Xiaolai/Xiaolai-Regular-6f3256af8454371776bc46670d33cc65.woff2",Zj="./fonts/Xiaolai/Xiaolai-Regular-23f228f3999c01983860012330e4be08.woff2",Kj="./fonts/Xiaolai/Xiaolai-Regular-21430ee05a1248901da8d0de08744d47.woff2",qj="./fonts/Xiaolai/Xiaolai-Regular-5330a2119a716e4e7224ed108b085dac.woff2",Jj="./fonts/Xiaolai/Xiaolai-Regular-cd145ce4a0ea18469358df53c207bc1b.woff2",Qj="./fonts/Xiaolai/Xiaolai-Regular-36925dfe329a45086cbb7fc5c20d45ac.woff2",eR="./fonts/Xiaolai/Xiaolai-Regular-4bfaa8ffa64c5ee560aa2daba7c9cbd3.woff2",tR="./fonts/Xiaolai/Xiaolai-Regular-112c051027b2d766c19a519f6ee1f4f7.woff2",nR="./fonts/Xiaolai/Xiaolai-Regular-5b0ed6971aaab9c8ad563230bd5471a7.woff2",aR="./fonts/Xiaolai/Xiaolai-Regular-98f2ad84457de7f3740d9920b8fa8667.woff2",iR="./fonts/Xiaolai/Xiaolai-Regular-733171b4ffcd17ea1fe1c0ba627173bf.woff2",rR="./fonts/Xiaolai/Xiaolai-Regular-684d65f1793cac449dde5d59cb3c47fb.woff2",sR="./fonts/Xiaolai/Xiaolai-Regular-cbaaefaaf326668277aa24dfa93c4d28.woff2",lR="./fonts/Xiaolai/Xiaolai-Regular-58fd02350d0bc52cf1ca3bb32ce9766e.woff2",oR="./fonts/Xiaolai/Xiaolai-Regular-7ccce86603f80a099ddb0cb21d4ae3e3.woff2",cR="./fonts/Xiaolai/Xiaolai-Regular-3717077e38f98d89eae729b6c14e56dc.woff2",dR="./fonts/Xiaolai/Xiaolai-Regular-dbea1af6dcd9860be40c3d18254338f5.woff2",uR="./fonts/Xiaolai/Xiaolai-Regular-4a0fdb40036e87b40aa08dd30584cb85.woff2",fR="./fonts/Xiaolai/Xiaolai-Regular-0f626226ba1272e832aea87bafd9720e.woff2",hR="./fonts/Xiaolai/Xiaolai-Regular-938d90c10ff8c20386af7f242c05d6b0.woff2",pR="./fonts/Xiaolai/Xiaolai-Regular-b6d128682ee29e471486354d486a1b90.woff2",UR="./fonts/Xiaolai/Xiaolai-Regular-e51ef413167c6e14e0c0fdcc585f2fc9.woff2",mR="./fonts/Xiaolai/Xiaolai-Regular-9d81066dd2b337c938df6e90380a00dc.woff2",gR="./fonts/Xiaolai/Xiaolai-Regular-20e7bf72fa05de9adf7dbcc7bf51dde6.woff2",bR="./fonts/Xiaolai/Xiaolai-Regular-4095eb84ef3874e2600247bee0b04026.woff2",vR="./fonts/Xiaolai/Xiaolai-Regular-4ee10ae43505e2e0bc62656ced49c0fa.woff2",xR="./fonts/Xiaolai/Xiaolai-Regular-7494dc504ae00ee9cd0505f990f88c5d.woff2",yR="./fonts/Xiaolai/Xiaolai-Regular-8de5b863cb50dfefdd07cb11c774d579.woff2",wR="./fonts/Xiaolai/Xiaolai-Regular-3e1f8f654357353bf0e04ba5c34b5f7f.woff2",ER="./fonts/Xiaolai/Xiaolai-Regular-2e33e8dc771ef5e1d9127d60a6b73679.woff2",SR="./fonts/Xiaolai/Xiaolai-Regular-173945821411c09f70c95f98d590e697.woff2",kR="./fonts/Xiaolai/Xiaolai-Regular-b358f7a51ece39a3247942b1feabdb29.woff2",CR="./fonts/Xiaolai/Xiaolai-Regular-23ad2d71b280f00b1363b95b7bea94eb.woff2",MR="./fonts/Xiaolai/Xiaolai-Regular-5882ffa04f32584d26109137e2da4352.woff2",IR="./fonts/Xiaolai/Xiaolai-Regular-a203b91dad570bf05a58c3c3ddb529bf.woff2",_R="./fonts/Xiaolai/Xiaolai-Regular-bd77e3c7f9e0b072d96af37f73d1aa32.woff2",TR="./fonts/Xiaolai/Xiaolai-Regular-5a45d991244d4c7140217e1e5f5ca4f4.woff2",AR="./fonts/Xiaolai/Xiaolai-Regular-f56414bf9bced67990def8660e306759.woff2",jR="./fonts/Xiaolai/Xiaolai-Regular-583d166e56ba0de4b77eabb47ef67839.woff2",RR="./fonts/Xiaolai/Xiaolai-Regular-7f855356ab893b0d2b9c1c83b8116f0e.woff2",DR="./fonts/Xiaolai/Xiaolai-Regular-b57aaedfd8ebdf3931f25119dc6a5eb2.woff2",LR="./fonts/Xiaolai/Xiaolai-Regular-b6fd38ca30869792244804b04bc058da.woff2",PR="./fonts/Xiaolai/Xiaolai-Regular-452225341522a7942f0f6aab1a5c91a3.woff2",NR="./fonts/Xiaolai/Xiaolai-Regular-866fa7613df6b3fd272bcfd4530c0bb9.woff2",OR="./fonts/Xiaolai/Xiaolai-Regular-52a84a22fd1369bffeaf21da2d6158dc.woff2",$R="./fonts/Xiaolai/Xiaolai-Regular-829615148e6357d826b9242eb7fbbd1e.woff2",FR="./fonts/Xiaolai/Xiaolai-Regular-c99eda15fc26a2941579560f76c3a5cf.woff2",zR="./fonts/Xiaolai/Xiaolai-Regular-395c35dd584b56b0789f58a0559beaf1.woff2",BR="./fonts/Xiaolai/Xiaolai-Regular-203b0e569e3b14aac86a003dc3fa523e.woff2",HR="./fonts/Xiaolai/Xiaolai-Regular-51a0e808bbc8361236ac521a119758a3.woff2",XR="./fonts/Xiaolai/Xiaolai-Regular-6e092f71c1e634059ada0e52abadce67.woff2",WR="./fonts/Xiaolai/Xiaolai-Regular-0f7fb1e0d5015bb1371343153ecf7ce3.woff2",VR="./fonts/Xiaolai/Xiaolai-Regular-d0cf73942fea1c74edbdf0b3011f4656.woff2",GR="./fonts/Xiaolai/Xiaolai-Regular-968cffdc8ee679da094e77ebf50f58ef.woff2",YR="./fonts/Xiaolai/Xiaolai-Regular-7a07ddc0f0c0f5f4a9bad6ee3dda66b5.woff2",ZR="./fonts/Xiaolai/Xiaolai-Regular-ec181b795ac1fb5a50d700b6e996d745.woff2",KR="./fonts/Xiaolai/Xiaolai-Regular-cfb211578629b7e8153b37240de6a9d5.woff2",qR="./fonts/Xiaolai/Xiaolai-Regular-59e9ff77b0efaf684bc09274fb6908c9.woff2",JR="./fonts/Xiaolai/Xiaolai-Regular-2adbc89c11e65905393d3dfc468b9d5b.woff2",QR="./fonts/Xiaolai/Xiaolai-Regular-70e811fd7994e61f408c923de6ddd078.woff2",eD="./fonts/Xiaolai/Xiaolai-Regular-c4a687ac4f0c2766eefc9f77ed99cddf.woff2",tD="./fonts/Xiaolai/Xiaolai-Regular-51502f1206be09c565f1547c406e9558.woff2",nD="./fonts/Xiaolai/Xiaolai-Regular-1fdc0c67ed57263a80fd108c1f6ccf24.woff2",aD="./fonts/Xiaolai/Xiaolai-Regular-e11567fd2accf9957cd0d3c2be937d87.woff2",iD="./fonts/Xiaolai/Xiaolai-Regular-20cc1bbf50e7efb442756cb605672c1f.woff2",rD="./fonts/Xiaolai/Xiaolai-Regular-5d2898fbc097a7e24c6f38d80587621e.woff2",sD="./fonts/Xiaolai/Xiaolai-Regular-ac9ceb44437becc3e9c4dbfebab7fc2d.woff2",lD="./fonts/Xiaolai/Xiaolai-Regular-c16ed9740b85badf16e86ea782a3062f.woff2",oD="./fonts/Xiaolai/Xiaolai-Regular-aa0d470430e6391eca720c7cfa44446f.woff2",cD="./fonts/Xiaolai/Xiaolai-Regular-f2b54d4e7be0eaefe1c2c56836fa5368.woff2",dD="./fonts/Xiaolai/Xiaolai-Regular-99a16ef6a64934d5781933dbd9c46b2e.woff2",uD="./fonts/Xiaolai/Xiaolai-Regular-c40533fdf4cc57177b12803598af7e59.woff2",fD="./fonts/Xiaolai/Xiaolai-Regular-91ddb2969bf2d31ba02ad82998d1314c.woff2",hD="./fonts/Xiaolai/Xiaolai-Regular-774d4f764a1299da5d28ec2f2ffe0d69.woff2",pD="./fonts/Xiaolai/Xiaolai-Regular-7718fe60986d8b42b1be9c5ace5ccf25.woff2",UD="./fonts/Xiaolai/Xiaolai-Regular-aa5c9ca6cf4fba00433b7aa3fa10671a.woff2",mD="./fonts/Xiaolai/Xiaolai-Regular-4f50e5136e136527280bc902c5817561.woff2",gD="./fonts/Xiaolai/Xiaolai-Regular-093b9ef39a46ceae95a1df18a0a3a326.woff2",bD="./fonts/Xiaolai/Xiaolai-Regular-a0ca5df4258213d7fc9fce80f65ce760.woff2",vD="./fonts/Xiaolai/Xiaolai-Regular-d2666cbed13462c5dc36fa2f15c202ca.woff2",xD="./fonts/Xiaolai/Xiaolai-Regular-1e6fd68f1f3902ce48ce8c69df385622.woff2",yD="./fonts/Xiaolai/Xiaolai-Regular-87599f94b6cc129d505b375798d0d751.woff2",wD="./fonts/Xiaolai/Xiaolai-Regular-06c77b8c66e51ed6c63ccb502dd8b8af.woff2",ED="./fonts/Xiaolai/Xiaolai-Regular-13ae07ed2e272d26d59bc0691cd7117a.woff2",SD="./fonts/Xiaolai/Xiaolai-Regular-353f33792a8f60dc69323ddf635a269e.woff2",kD="./fonts/Xiaolai/Xiaolai-Regular-0facdf1ea213ba40261022f5d5ed4493.woff2",CD="./fonts/Xiaolai/Xiaolai-Regular-f8ee5d36068a42b51d0e4a1116cfcec1.woff2",MD="./fonts/Xiaolai/Xiaolai-Regular-79d494361ae093b69e74ee9dbe65bfd4.woff2",ID="./fonts/Xiaolai/Xiaolai-Regular-74e2263a91439c25b91d5132ce9f4d62.woff2",_D="./fonts/Xiaolai/Xiaolai-Regular-ee8bae97908d5147b423f77ad0d3c1bb.woff2",TD="./fonts/Xiaolai/Xiaolai-Regular-56467a5c8840c4d23a60b2f935114848.woff2",AD="./fonts/Xiaolai/Xiaolai-Regular-145aa02cdd91946e67dc934e1acffe75.woff2",jD="./fonts/Xiaolai/Xiaolai-Regular-54acdfc2166ad7fcbd074f75fd4a56ba.woff2",RD="./fonts/Xiaolai/Xiaolai-Regular-29cec36cd205b211da97acabaa62f055.woff2",DD="./fonts/Xiaolai/Xiaolai-Regular-3756e81d3e149cf6099163ee79944fec.woff2",LD="./fonts/Xiaolai/Xiaolai-Regular-8e9f97f01034820170065b2921b4fb5e.woff2",PD="./fonts/Xiaolai/Xiaolai-Regular-13d2887ec8ee73c43acdabc52a05af7b.woff2",ND="./fonts/Xiaolai/Xiaolai-Regular-72536a3d71b694a0d53dd90ddceae41e.woff2",OD="./fonts/Xiaolai/Xiaolai-Regular-603aefd23e350ba7eb124273e3c9bcf1.woff2",$D="./fonts/Xiaolai/Xiaolai-Regular-095c169f3314805276f603a362766abd.woff2",FD="./fonts/Xiaolai/Xiaolai-Regular-9544732d2e62d1a429674f8ee41b5d3a.woff2",zD="./fonts/Xiaolai/Xiaolai-Regular-d3716376641d615e2995605b29bca7b6.woff2",BD="./fonts/Xiaolai/Xiaolai-Regular-5a1ce3117cfe90c48e8fb4a9a00f694d.woff2",HD="./fonts/Xiaolai/Xiaolai-Regular-b7d203b051eff504ff59ddca7576b6a9.woff2",XD="./fonts/Xiaolai/Xiaolai-Regular-4a38cc3e9cf104e69ba246d37f8cf135.woff2",WD="./fonts/Xiaolai/Xiaolai-Regular-982b630266d87db93d2539affb1275c6.woff2",VD="./fonts/Xiaolai/Xiaolai-Regular-9592bfc861f07bcb8d75c196b370e548.woff2",GD="./fonts/Xiaolai/Xiaolai-Regular-a7accba310e821da5505f71c03b76bdb.woff2",YD="./fonts/Xiaolai/Xiaolai-Regular-dac48066b5883d8b4551fc584f0c2a3e.woff2",ZD="./fonts/Xiaolai/Xiaolai-Regular-a1f916d6039285c4ffb900cd654e418f.woff2",KD="./fonts/Xiaolai/Xiaolai-Regular-95bfd249da4902577b4b7d76ebdd0b44.woff2",qD="./fonts/Xiaolai/Xiaolai-Regular-93fc8f28a33234bcadf1527cafabd502.woff2",JD="./fonts/Xiaolai/Xiaolai-Regular-903bb6865f3452e2fda42e3a25547bc5.woff2",QD="./fonts/Xiaolai/Xiaolai-Regular-4aca6a43e59aceee2166b0c7e4e85ef1.woff2",eL="./fonts/Xiaolai/Xiaolai-Regular-24476a126f129212beb33f66853ea151.woff2",tL="./fonts/Xiaolai/Xiaolai-Regular-1b611157cd46bb184d4fa4dae2d6a2b8.woff2",nL="./fonts/Xiaolai/Xiaolai-Regular-56a32a7689abd0326e57c10c6c069bb4.woff2",aL="./fonts/Xiaolai/Xiaolai-Regular-3cc70dbb64df5b21f1326cc24dee2195.woff2",iL="./fonts/Xiaolai/Xiaolai-Regular-f6032fc06eb20480f096199713f70885.woff2",rL="./fonts/Xiaolai/Xiaolai-Regular-e2ead7ea7da0437f085f42ffc05f8d13.woff2",sL="./fonts/Xiaolai/Xiaolai-Regular-97f7f48ce90c9429bf32ae51469db74d.woff2",lL="./fonts/Xiaolai/Xiaolai-Regular-24a21c1e4449222e8d1898d69ff3a404.woff2",oL="./fonts/Xiaolai/Xiaolai-Regular-726303e0774b4e678bff8c2deb6ca603.woff2",cL="./fonts/Xiaolai/Xiaolai-Regular-5a7fac4b8b23a6e4e5ba0c9bf1756c91.woff2",dL="./fonts/Xiaolai/Xiaolai-Regular-2b7441d46298788ac94e610ffcc709b6.woff2",uL=[{uri:bA,descriptors:{unicodeRange:"U+f9b8-fa6d,U+fe32,U+fe45-fe4f,U+ff02-ff0b,U+ff0d-ff1e,U+ff20-ff2a"}},{uri:vA,descriptors:{unicodeRange:"U+20dd-20de,U+25ef,U+ff2b-ffbe,U+ffc2-ffc7,U+ffca-ffcf,U+ffd2-ffd7,U+ffda-ffdc,U+ffe0-ffe6,U+ffe8-ffee"}},{uri:xA,descriptors:{unicodeRange:"U+d7eb-d7fb,U+f900-f9b7"}},{uri:yA,descriptors:{unicodeRange:"U+d6f2-d7a3,U+d7b0-d7c6,U+d7cb-d7ea"}},{uri:wA,descriptors:{unicodeRange:"U+d609-d6f1"}},{uri:EA,descriptors:{unicodeRange:"U+d520-d608"}},{uri:SA,descriptors:{unicodeRange:"U+d437-d51f"}},{uri:kA,descriptors:{unicodeRange:"U+d34e-d436"}},{uri:CA,descriptors:{unicodeRange:"U+d265-d34d"}},{uri:MA,descriptors:{unicodeRange:"U+d17c-d264"}},{uri:IA,descriptors:{unicodeRange:"U+d093-d17b"}},{uri:_A,descriptors:{unicodeRange:"U+cfaa-d092"}},{uri:TA,descriptors:{unicodeRange:"U+cec1-cfa9"}},{uri:AA,descriptors:{unicodeRange:"U+cdd8-cec0"}},{uri:jA,descriptors:{unicodeRange:"U+ccf1-cdd7"}},{uri:RA,descriptors:{unicodeRange:"U+cc08-ccf0"}},{uri:DA,descriptors:{unicodeRange:"U+cb43-cc07"}},{uri:LA,descriptors:{unicodeRange:"U+ca83-cb42"}},{uri:PA,descriptors:{unicodeRange:"U+c9a1-ca82"}},{uri:NA,descriptors:{unicodeRange:"U+c8b8-c9a0"}},{uri:OA,descriptors:{unicodeRange:"U+c7cf-c8b7"}},{uri:$A,descriptors:{unicodeRange:"U+c6e6-c7ce"}},{uri:FA,descriptors:{unicodeRange:"U+c5fd-c6e5"}},{uri:zA,descriptors:{unicodeRange:"U+c514-c5fc"}},{uri:BA,descriptors:{unicodeRange:"U+c42b-c513"}},{uri:HA,descriptors:{unicodeRange:"U+c341-c34e,U+c350-c42a"}},{uri:XA,descriptors:{unicodeRange:"U+c258-c340"}},{uri:WA,descriptors:{unicodeRange:"U+c16f-c257"}},{uri:VA,descriptors:{unicodeRange:"U+c086-c16e"}},{uri:GA,descriptors:{unicodeRange:"U+bf9d-c085"}},{uri:YA,descriptors:{unicodeRange:"U+beb4-bf9c"}},{uri:ZA,descriptors:{unicodeRange:"U+bdcb-beb3"}},{uri:KA,descriptors:{unicodeRange:"U+bce2-bdca"}},{uri:qA,descriptors:{unicodeRange:"U+bbf9-bce1"}},{uri:JA,descriptors:{unicodeRange:"U+bb10-bbf8"}},{uri:QA,descriptors:{unicodeRange:"U+ba27-bb0f"}},{uri:ej,descriptors:{unicodeRange:"U+b93e-ba26"}},{uri:tj,descriptors:{unicodeRange:"U+b855-b93d"}},{uri:nj,descriptors:{unicodeRange:"U+b76c-b854"}},{uri:aj,descriptors:{unicodeRange:"U+b683-b76b"}},{uri:ij,descriptors:{unicodeRange:"U+b59a-b682"}},{uri:rj,descriptors:{unicodeRange:"U+b4b1-b599"}},{uri:sj,descriptors:{unicodeRange:"U+11fb-11ff,U+b3cd-b4b0"}},{uri:lj,descriptors:{unicodeRange:"U+11e6-11fa,U+b2f9-b3cc"}},{uri:oj,descriptors:{unicodeRange:"U+11d1-11e5,U+b225-b2f8"}},{uri:cj,descriptors:{unicodeRange:"U+11bc-11d0,U+b151-b224"}},{uri:dj,descriptors:{unicodeRange:"U+11a7-11bb,U+b07d-b150"}},{uri:uj,descriptors:{unicodeRange:"U+1191-11a6,U+afaa-b07c"}},{uri:fj,descriptors:{unicodeRange:"U+117c-1190,U+aed6-afa9"}},{uri:hj,descriptors:{unicodeRange:"U+1167-117b,U+ae02-aed5"}},{uri:pj,descriptors:{unicodeRange:"U+1152-115e,U+1160-1166,U+ad2d-ae01"}},{uri:Uj,descriptors:{unicodeRange:"U+113d-1151,U+ac59-ad2c"}},{uri:mj,descriptors:{unicodeRange:"U+1100-113c,U+9f95-9f98,U+9f9c-9f9e,U+9fa1-9fce,U+9fd0,U+a960-a97c,U+ac00-ac58"}},{uri:gj,descriptors:{unicodeRange:"U+9771-9772,U+9775,U+9777-977b,U+977d-9784,U+9786-978a,U+978c,U+978e-9790,U+9793,U+9795-9797,U+9799-979f,U+97a1-97a2,U+97a4-97aa,U+97ac,U+97ae,U+97b0-97b1,U+97b3,U+97b5-97e5,U+97e8,U+97ee-97f2,U+97f4,U+97f7-982d"}},{uri:bj,descriptors:{unicodeRange:"U+9491,U+9496,U+9498,U+94c7,U+94cf,U+94d3-94d4,U+94da,U+94e6,U+94fb,U+951c,U+9520,U+9527,U+9533,U+953d,U+9543,U+9548,U+954b,U+9555,U+955a,U+9560,U+956e,U+9574-9575,U+9577-957e,U+9580-95e7,U+95ec,U+95ff,U+9607,U+9613,U+9618,U+961b,U+961e,U+9620,U+9623-9629,U+962b-962d,U+962f-9630,U+9637-963a,U+963e,U+9641,U+9643,U+964a,U+964e-964f,U+9651-9653,U+9656-965a,U+965c-965e,U+9660,U+9663,U+9665-9666,U+966b,U+966d-9671,U+9673,U+9678-9684,U+9687,U+9689-968a,U+968c,U+968e,U+9691-9693"}},{uri:vj,descriptors:{unicodeRange:"U+923c-9273,U+9275-928d,U+928f-92ad,U+92af-92c7,U+92c9-92ee"}},{uri:xj,descriptors:{unicodeRange:"U+9159,U+915b-915c,U+915f-9160,U+9166-9168,U+916b,U+916d,U+9173,U+917a-917c,U+9180-9184,U+9186,U+9188,U+918a,U+918e-918f,U+9193-9199,U+919c-91a1,U+91a4-91a9,U+91ab-91ac,U+91b0-91b3,U+91b6-91b9,U+91bb-91c6,U+91c8,U+91cb,U+91d0,U+91d2-91db,U+91dd-923b"}},{uri:yj,descriptors:{unicodeRange:"U+902b-902c,U+9030-9034,U+9037,U+9039-903a,U+903d,U+903f-9040,U+9043,U+9045-9046,U+9048-904c,U+904e,U+9054-9056,U+9059-905a,U+905c-9061,U+9064,U+9066-9067,U+9069-906c,U+906f-9073,U+9076-907c,U+907e,U+9081,U+9084-9087,U+9089-908a,U+908c-9090,U+9092,U+9094,U+9096,U+9098,U+909a,U+909c,U+909e-90a0,U+90a4-90a5,U+90a7-90a9,U+90ab,U+90ad,U+90b2,U+90b7,U+90bc-90bd,U+90bf-90c0,U+90c2-90c3,U+90c6,U+90c8-90c9,U+90cb-90cd,U+90d2,U+90d4-90d6,U+90d8-90da,U+90de-90e0,U+90e3-90e5,U+90e9-90ea,U+90ec,U+90ee,U+90f0-90f3,U+90f5-90f7,U+90f9-90fc,U+90ff-9101,U+9103,U+9105-9118,U+911a-911d,U+911f-9121,U+9124-912e,U+9130,U+9132-9138,U+913a-9142,U+9144-9145,U+9147-9148,U+9151,U+9153-9156,U+9158"}},{uri:wj,descriptors:{unicodeRange:"U+8f03-8f65,U+8f6a,U+8f80,U+8f8c,U+8f92,U+8f9d,U+8fa0-8fa2,U+8fa4-8fa7,U+8faa,U+8fac-8faf,U+8fb2-8fb5,U+8fb7-8fb8,U+8fba-8fbc,U+8fbf-8fc0,U+8fc3,U+8fc6,U+8fc9-8fcd,U+8fcf,U+8fd2,U+8fd6-8fd7,U+8fda,U+8fe0-8fe1,U+8fe3,U+8fe7,U+8fec,U+8fef,U+8ff1-8ff2,U+8ff4-8ff6,U+8ffa-8ffc,U+8ffe-8fff,U+9007-9008,U+900c,U+900e,U+9013,U+9015,U+9018-9019,U+901c,U+9023-9025,U+9027-902a"}},{uri:Ej,descriptors:{unicodeRange:"U+8d03-8d1c,U+8d20,U+8d51-8d52,U+8d57,U+8d5f,U+8d65,U+8d68-8d6a,U+8d6c,U+8d6e-8d6f,U+8d71-8d72,U+8d78-8d80,U+8d82-8d83,U+8d86-8d89,U+8d8c-8d90,U+8d92-8d93,U+8d95-8d9e,U+8da0-8da2,U+8da4-8db0,U+8db2,U+8db6-8db7,U+8db9,U+8dbb,U+8dbd,U+8dc0-8dc2,U+8dc5,U+8dc7-8dca,U+8dcd,U+8dd0,U+8dd2-8dd5,U+8dd8-8dd9,U+8ddc,U+8de0-8de2,U+8de5-8de7,U+8de9,U+8ded-8dee,U+8df0-8df2,U+8df4,U+8df6,U+8dfc,U+8dfe-8e04,U+8e06-8e08,U+8e0b,U+8e0d-8e0e,U+8e10-8e13,U+8e15-8e1c,U+8e20-8e21,U+8e24-8e28,U+8e2b,U+8e2d,U+8e30,U+8e32-8e34,U+8e36-8e38,U+8e3b-8e3c,U+8e3e-8e3f,U+8e43,U+8e45-8e46"}},{uri:Sj,descriptors:{unicodeRange:"U+8bea,U+8c09,U+8c1e,U+8c38-8c40,U+8c42-8c45,U+8c48,U+8c4a-8c4b,U+8c4d-8c54,U+8c56-8c59,U+8c5b-8c60,U+8c63-8c69,U+8c6c-8c72,U+8c74-8c77,U+8c7b-8c81,U+8c83-8c84,U+8c86-8c88,U+8c8b,U+8c8d-8c93,U+8c95-8c97,U+8c99-8d02"}},{uri:kj,descriptors:{unicodeRange:"U+8a64-8a78,U+8a7a-8a88,U+8a8b-8a92,U+8a94-8b06,U+8b08-8b1b"}},{uri:Cj,descriptors:{unicodeRange:"U+8987-89c0,U+89c3,U+89cd,U+89d3-89d5,U+89d7-89d9,U+89db,U+89dd,U+89df-89e2,U+89e4,U+89e7-89ea,U+89ec-89ee,U+89f0-89f2,U+89f4-89ff,U+8a01-8a06,U+8a08-8a3d,U+8a3f-8a47,U+8a49-8a63"}},{uri:Mj,descriptors:{unicodeRange:"U+87e3-87e4,U+87e6-87e9,U+87eb-87ed,U+87ef-87f8,U+87fa-87fd,U+87ff-8802,U+8804-8809,U+880b-8812,U+8814,U+8817-881a,U+881c-8820,U+8823-8831,U+8833-8838,U+883a-883b,U+883d-883f,U+8841-8843,U+8846-884b,U+884e-8853,U+8855-8856,U+8858,U+885a-8860,U+8866-8867,U+886a,U+886d,U+886f,U+8871,U+8873-8876,U+8878-887c,U+8880,U+8883,U+8886-8887,U+8889-888a,U+888c,U+888e-8891,U+8893-8895,U+8897-889b,U+889d-88a1,U+88a3,U+88a5-88aa,U+88ac,U+88ae-88b0,U+88b2-88b6,U+88b8-88bb"}},{uri:Ij,descriptors:{unicodeRange:"U+86e7-86e8,U+86ea-86ec,U+86ef,U+86f5-86f7,U+86fa-86fd,U+86ff,U+8701,U+8704-8706,U+870b-870c,U+870e-8711,U+8714,U+8716,U+8719,U+871b,U+871d,U+871f-8720,U+8724,U+8726-8728,U+872a-872d,U+872f-8730,U+8732-8733,U+8735-8736,U+8738-873a,U+873c-873d,U+8740-8746,U+874a-874b,U+874d,U+874f-8752,U+8754-8756,U+8758,U+875a-875f,U+8761-8762,U+8766-876d,U+876f,U+8771-8773,U+8775,U+8777-877a,U+877f-8781,U+8784,U+8786-8787,U+8789-878a,U+878c,U+878e-8792,U+8794-8796,U+8798-879e,U+87a0-87a7,U+87a9-87aa,U+87ae,U+87b0-87b2,U+87b4,U+87b6-87b9,U+87bb-87bc,U+87be-87bf,U+87c1-87c5,U+87c7-87c9,U+87cc-87d0,U+87d4-87da,U+87dc-87df,U+87e1-87e2"}},{uri:_j,descriptors:{unicodeRange:"U+8604,U+8606-8610,U+8612-8615,U+8617-8626,U+8628,U+862a-8637,U+8639-863b,U+863d-864c,U+8652-8653,U+8655-8659,U+865b-865d,U+865f-8661,U+8663-866a,U+866d,U+866f-8670,U+8672-8678,U+8683-8689,U+868e-8692,U+8694,U+8696-869b,U+869e-86a2,U+86a5-86a6,U+86ab,U+86ad-86ae,U+86b2-86b3,U+86b7-86b9,U+86bb-86bf,U+86c1-86c3,U+86c5,U+86c8,U+86cc-86cd,U+86d2-86d3,U+86d5-86d7,U+86da,U+86dc-86dd,U+86e0-86e3,U+86e5-86e6"}},{uri:Tj,descriptors:{unicodeRange:"U+8456,U+8458,U+845d-8460,U+8462,U+8464-8468,U+846a,U+846e-8470,U+8472,U+8474,U+8477,U+8479,U+847b-8481,U+8483-8486,U+848a,U+848d,U+848f-8496,U+8498,U+849a-849b,U+849d-84a0,U+84a2-84ae,U+84b0-84b1,U+84b3,U+84b5-84b7,U+84bb-84bc,U+84be,U+84c0,U+84c2-84c3,U+84c5-84c8,U+84cb-84cc,U+84ce-84cf,U+84d2,U+84d4-84d5,U+84d7-84dc,U+84de,U+84e1-84e2,U+84e4,U+84e7-84eb,U+84ed-84ef,U+84f1-84fb,U+84fd-84fe,U+8500-850b,U+850d-8510,U+8512,U+8514-8516,U+8518-8519,U+851b-851e,U+8520,U+8522-852a,U+852d-8536,U+853e-8542,U+8544-8547,U+854b-854f"}},{uri:Aj,descriptors:{unicodeRange:"U+82c2-82c3,U+82c5-82c6,U+82c9,U+82d0,U+82d6,U+82d9-82da,U+82dd,U+82e2,U+82e7-82ea,U+82ec-82ee,U+82f0,U+82f2-82f3,U+82f5-82f6,U+82f8,U+82fa,U+82fc-8300,U+830a-830b,U+830d,U+8310,U+8312-8313,U+8316,U+8318-8319,U+831d-8326,U+8329-832a,U+832e,U+8330,U+8332,U+8337,U+833b,U+833d-833f,U+8341-8342,U+8344-8345,U+8348,U+834a-834e,U+8353,U+8355-8359,U+835d,U+8362,U+8370-8376,U+8379-837a,U+837e-8384,U+8387-8388,U+838a-838d,U+838f-8391,U+8394-8397,U+8399-839a,U+839d,U+839f,U+83a1-83a7,U+83ac-83af,U+83b5,U+83bb,U+83be-83bf,U+83c2-83c4,U+83c6,U+83c8-83c9,U+83cb,U+83cd-83ce,U+83d0-83d3,U+83d5,U+83d7,U+83d9-83db,U+83de,U+83e2-83e4,U+83e6-83e8,U+83eb-83ef,U+83f3-83f7,U+83fa-83fc,U+83fe-8400,U+8402,U+8405,U+8407-840a,U+8410,U+8412-8417,U+8419-841b,U+841e-8423,U+8429-8430,U+8432-8437,U+8439-843b,U+843e-8445,U+8447-8450,U+8452-8455"}},{uri:jj,descriptors:{unicodeRange:"U+81a4-81a5,U+81a7,U+81a9,U+81ab-81b2,U+81b4-81b9,U+81bc-81bf,U+81c4-81c5,U+81c7-81c9,U+81cb,U+81cd-81e2,U+81e4-81e6,U+81e8-81e9,U+81eb,U+81ee-81f2,U+81f5-81fa,U+81fd,U+81ff,U+8203,U+8207-820b,U+820e-820f,U+8211,U+8213,U+8215-821a,U+821d,U+8220,U+8224-8227,U+8229,U+822e,U+8232,U+823a,U+823c-823d,U+823f-8243,U+8245-8246,U+8248,U+824a,U+824c-824e,U+8250-8257,U+8259,U+825b-825e,U+8260-8267,U+8269-826d,U+8271,U+8275-8278,U+827b-827c,U+8280-8281,U+8283,U+8285-8287,U+8289,U+828c,U+8290,U+8293-8296,U+829a-829b,U+829e,U+82a0,U+82a2-82a3,U+82a7,U+82b2,U+82b5-82b6,U+82ba-82bc,U+82bf-82c0"}},{uri:Rj,descriptors:{unicodeRange:"U+8059,U+805b-8068,U+806b-8070,U+8072-807e,U+8081-8082,U+8085,U+8088,U+808a,U+808d-8092,U+8094-8095,U+8097,U+8099,U+809e,U+80a3,U+80a6-80a8,U+80ac,U+80b0,U+80b3,U+80b5-80b6,U+80b8-80b9,U+80bb,U+80c5,U+80c7-80cb,U+80cf-80d5,U+80d8,U+80df-80e0,U+80e2-80e3,U+80e6,U+80ee,U+80f5,U+80f7,U+80f9,U+80fb,U+80fe-8101,U+8103-8105,U+8107-8108,U+810b-810c,U+8115,U+8117,U+8119,U+811b-811d,U+811f-812b,U+812d-812e,U+8130,U+8133-8135,U+8137,U+8139-813d,U+813f-8145,U+8147,U+8149,U+814d-814f,U+8152,U+8156-8158,U+815b-815f,U+8161-8164,U+8166,U+8168,U+816a-816c,U+816f,U+8172-8173,U+8175-8178,U+8181,U+8183-8187,U+8189,U+818b-818e,U+8190,U+8192-8197,U+8199-819a,U+819e-81a2"}},{uri:Dj,descriptors:{unicodeRange:"U+7f3c-7f41,U+7f43,U+7f46-7f4f,U+7f52-7f53,U+7f56,U+7f59,U+7f5b-7f5e,U+7f60,U+7f63-7f67,U+7f6b-7f6d,U+7f6f-7f70,U+7f73,U+7f75-7f78,U+7f7a-7f7d,U+7f7f-7f80,U+7f82-7f89,U+7f8b,U+7f8d,U+7f8f-7f93,U+7f95-7f99,U+7f9b-7f9c,U+7fa0,U+7fa2-7fa3,U+7fa5-7fa6,U+7fa8-7fae,U+7fb1,U+7fb3-7fb7,U+7fba-7fbb,U+7fbe,U+7fc0,U+7fc2-7fc4,U+7fc6-7fc9,U+7fcb,U+7fcd,U+7fcf-7fd3,U+7fd6-7fd7,U+7fd9-7fde,U+7fe2-7fe4,U+7fe7-7fe8,U+7fea-7fed,U+7fef,U+7ff2,U+7ff4-7ffa,U+7ffd-7fff,U+8002,U+8007-800a,U+800e-800f,U+8011,U+8013,U+801a-801b,U+801d-801f,U+8021,U+8023-8024,U+802b-8030,U+8032,U+8034,U+8039-803a,U+803c,U+803e,U+8040-8041,U+8044-8045,U+8047-8049,U+804e-8051,U+8053,U+8055-8057"}},{uri:Lj,descriptors:{unicodeRange:"U+7cd8,U+7cda-7cdb,U+7cdd-7cde,U+7ce1-7ce7,U+7ce9-7cee,U+7cf0-7cf7,U+7cf9-7cfa,U+7cfc-7d09,U+7d0b-7d1f,U+7d21,U+7d23-7d26,U+7d28-7d2a,U+7d2c-7d2e,U+7d30-7d6d,U+7d6f-7d76,U+7d78-7d94"}},{uri:Pj,descriptors:{unicodeRange:"U+7afe,U+7b00-7b02,U+7b05,U+7b07,U+7b09,U+7b0c-7b0e,U+7b10,U+7b12-7b13,U+7b16-7b18,U+7b1a,U+7b1c-7b1d,U+7b1f,U+7b21-7b23,U+7b27,U+7b29,U+7b2d,U+7b2f-7b30,U+7b32,U+7b34-7b37,U+7b39,U+7b3b,U+7b3d,U+7b3f-7b44,U+7b46,U+7b48,U+7b4a,U+7b4d-7b4e,U+7b53,U+7b55,U+7b57,U+7b59,U+7b5c,U+7b5e-7b5f,U+7b61,U+7b63-7b6d,U+7b6f-7b70,U+7b73-7b74,U+7b76,U+7b78,U+7b7a,U+7b7c-7b7d,U+7b7f,U+7b81-7b84,U+7b86-7b8c,U+7b8e-7b8f,U+7b91-7b93,U+7b96,U+7b98-7b9b,U+7b9e-7ba0,U+7ba3-7ba5,U+7bae-7bb0,U+7bb2-7bb3,U+7bb5-7bb7,U+7bb9-7bc0,U+7bc2-7bc5,U+7bc8-7bcb,U+7bcd-7bd0,U+7bd2,U+7bd4-7bd8,U+7bdb-7bdc,U+7bde-7be0,U+7be2-7be4,U+7be7-7be9,U+7beb-7bed,U+7bef-7bf0,U+7bf2-7bf6,U+7bf8-7bfb,U+7bfd,U+7bff-7c06,U+7c08-7c0a,U+7c0d-7c0e,U+7c10-7c13"}},{uri:Nj,descriptors:{unicodeRange:"U+7a10-7a13,U+7a15-7a16,U+7a18-7a19,U+7a1b-7a1d,U+7a1f,U+7a21-7a22,U+7a24-7a32,U+7a34-7a36,U+7a38,U+7a3a,U+7a3e,U+7a40-7a45,U+7a47-7a50,U+7a52-7a56,U+7a58-7a6f,U+7a71-7a73,U+7a75,U+7a7b-7a7e,U+7a82,U+7a85,U+7a87,U+7a89-7a8c,U+7a8e-7a90,U+7a93-7a94,U+7a99-7a9b,U+7a9e,U+7aa1-7aa4,U+7aa7,U+7aa9-7aab,U+7aae-7ab2,U+7ab4-7abe,U+7ac0-7aca,U+7acc-7ad5,U+7ad7-7ad8,U+7ada-7add,U+7ae1-7ae2,U+7ae4,U+7ae7-7aec,U+7aee,U+7af0-7af8,U+7afb-7afc"}},{uri:Oj,descriptors:{unicodeRange:"U+790d-7912,U+7914-791d,U+791f-7923,U+7925-7933,U+7935-7939,U+793d,U+793f,U+7942-7945,U+7947,U+794a-7952,U+7954-7955,U+7958-7959,U+7961,U+7963-7964,U+7966,U+7969-796c,U+796e,U+7970-7976,U+7979,U+797b-797f,U+7982-7983,U+7986-7989,U+798b-798e,U+7990-7999,U+799b-79a6,U+79a8-79b2,U+79b4-79b8,U+79bc,U+79bf,U+79c2,U+79c4-79c5,U+79c7-79c8,U+79ca,U+79cc,U+79ce-79d0,U+79d3-79d4,U+79d6-79d7,U+79d9-79de,U+79e0-79e2,U+79e5,U+79e8,U+79ea,U+79ec,U+79ee,U+79f1-79f7,U+79f9-79fa,U+79fc,U+79fe-79ff,U+7a01,U+7a04-7a05,U+7a07-7a0a,U+7a0c,U+7a0f"}},{uri:$j,descriptors:{unicodeRange:"U+77d8-77da,U+77dd-77e1,U+77e4,U+77e6,U+77e8,U+77ea,U+77ef-77f2,U+77f4-77f5,U+77f7,U+77f9-77fc,U+7803-7808,U+780a-780b,U+780e-7810,U+7813,U+7815,U+7819,U+781b,U+781e,U+7820-7822,U+7824,U+7828,U+782a-782b,U+782e-782f,U+7831-7833,U+7835-7836,U+783d,U+783f,U+7841-7844,U+7846,U+7848-784b,U+784d,U+784f,U+7851,U+7853-7854,U+7858-785c,U+785e-7869,U+786f-7876,U+7878-787b,U+787d-7886,U+7888,U+788a-788b,U+788f-7890,U+7892,U+7894-7896,U+7899,U+789d-789e,U+78a0,U+78a2,U+78a4,U+78a6,U+78a8-78af,U+78b5-78b8,U+78ba-78bd,U+78bf-78c0,U+78c2-78c4,U+78c6-78c8,U+78cc-78cf,U+78d1-78d3,U+78d6-78d8,U+78da-78e7,U+78e9-78eb,U+78ed-78f1,U+78f3,U+78f5-78f6,U+78f8-78f9,U+78fb-7900,U+7902-7904,U+7906-790c"}},{uri:Fj,descriptors:{unicodeRange:"U+76af-76b0,U+76b3,U+76b5-76be,U+76c0-76c1,U+76c3-76c4,U+76c7,U+76c9,U+76cb-76cc,U+76d3,U+76d5,U+76d9-76da,U+76dc-76de,U+76e0-76e4,U+76e6-76ed,U+76f0,U+76f3,U+76f5-76f7,U+76fa-76fb,U+76fd,U+76ff-7703,U+7705-7706,U+770a,U+770c,U+770e-7718,U+771b-771e,U+7721,U+7723-7725,U+7727,U+772a-772c,U+772e,U+7730-7734,U+7739,U+773b,U+773d-773f,U+7742,U+7744-7746,U+7748-774f,U+7752-7759,U+775c-7760,U+7764,U+7767,U+7769-776a,U+776d-7778,U+777a-777c,U+7781-7783,U+7786-778b,U+778f-7790,U+7793-779e,U+77a1,U+77a3-77a4,U+77a6,U+77a8,U+77ab,U+77ad-77af,U+77b1-77b2,U+77b4,U+77b6-77ba,U+77bc,U+77be,U+77c0-77cc,U+77ce-77d6"}},{uri:zj,descriptors:{unicodeRange:"U+7589-758a,U+758c-758e,U+7590,U+7593,U+7595,U+7598,U+759b-759c,U+759e,U+75a2,U+75a6-75aa,U+75ad,U+75b6-75b7,U+75ba-75bb,U+75bf-75c1,U+75c6,U+75cb-75cc,U+75ce-75d1,U+75d3,U+75d7,U+75d9-75da,U+75dc-75dd,U+75df-75e1,U+75e5,U+75e9,U+75ec-75ef,U+75f2-75f3,U+75f5-75f8,U+75fa-75fb,U+75fd-75fe,U+7602,U+7604,U+7606-7609,U+760b,U+760d-760f,U+7611-7614,U+7616,U+761a,U+761c-761e,U+7621,U+7623,U+7627-7628,U+762c,U+762e-762f,U+7631-7632,U+7636-7637,U+7639-763b,U+763d,U+7641-7642,U+7644-764b,U+764e-7653,U+7655,U+7657-765b,U+765d,U+765f-7662,U+7664-766a,U+766c-766e,U+7670-7677,U+7679-767a,U+767c,U+767f-7681,U+7683,U+7685,U+7689-768a,U+768c-768d,U+768f-7690,U+7692,U+7694-7695,U+7697-7698,U+769a-76a3,U+76a5-76ad"}},{uri:Bj,descriptors:{unicodeRange:"U+7492-749b,U+749d,U+749f-74a6,U+74aa-74b9,U+74bb-74d1,U+74d3-74db,U+74dd,U+74df,U+74e1,U+74e5,U+74e7-74ed,U+74f0-74f3,U+74f5,U+74f8-74fe,U+7500-7503,U+7505-750c,U+750e,U+7510,U+7512,U+7514-7517,U+751b,U+751d-751e,U+7520-7524,U+7526-7527,U+752a,U+752e,U+7534,U+7536,U+7539,U+753c-753d,U+753f,U+7541-7544,U+7546-7547,U+7549-754a,U+754d,U+7550-7553,U+7555-7558,U+755d-7564,U+7567-7569,U+756b-7571,U+7573,U+7575-7577,U+757a-757e,U+7580-7582,U+7584-7585,U+7587-7588"}},{uri:Hj,descriptors:{unicodeRange:"U+7372-737d,U+737f-7383,U+7385-7386,U+7388,U+738a,U+738c-738d,U+738f-7390,U+7392-7395,U+7397-739a,U+739c-739e,U+73a0-73a1,U+73a3-73a8,U+73aa,U+73ac-73ad,U+73b1,U+73b4-73b6,U+73b8-73b9,U+73bc-73bf,U+73c1,U+73c3-73c7,U+73cb-73cc,U+73ce,U+73d2-73d8,U+73da-73dd,U+73df,U+73e1-73e4,U+73e6,U+73e8,U+73ea-73ec,U+73ee-73f1,U+73f3-7402,U+7404,U+7407-7408,U+740b-740e,U+7411-7419,U+741c-7421,U+7423-7424,U+7427,U+7429,U+742b,U+742d,U+742f,U+7431-7432,U+7437-743b,U+743d-7440,U+7442-7454,U+7456,U+7458,U+745d,U+7460-746c,U+746e-746f,U+7471-7475,U+7478-747d,U+747f,U+7482,U+7484-7486,U+7488-748a,U+748c-748d,U+748f,U+7491"}},{uri:Xj,descriptors:{unicodeRange:"U+7054-705d,U+705f-706a,U+706e,U+7071-7074,U+7077,U+7079-707b,U+707d,U+7081-7084,U+7086-7088,U+708b-708d,U+708f-7091,U+7093,U+7097-7098,U+709a-709b,U+709e-70aa,U+70b0,U+70b2,U+70b4-70b6,U+70ba,U+70be-70bf,U+70c4-70c7,U+70c9,U+70cb-70d7,U+70da,U+70dc-70de,U+70e0-70e3,U+70e5,U+70ea,U+70ee,U+70f0-70f6,U+70f8,U+70fa-70fc,U+70fe-7108,U+710b-710f,U+7111-7112,U+7114,U+7117,U+711b-7125,U+7127-712e,U+7132-7135,U+7137-7144,U+7146-7149,U+714b,U+714d,U+714f-715b,U+715d,U+715f-7163,U+7165,U+7169-716d,U+716f-7171,U+7174-7177"}},{uri:Wj,descriptors:{unicodeRange:"U+722e-722f,U+7232-7234,U+723a,U+723c,U+723e,U+7240-7246,U+7249-724b,U+724e-7251,U+7253-7255,U+7257-7258,U+725a,U+725c,U+725e,U+7260,U+7263-7265,U+7268,U+726a-726d,U+7270-7271,U+7273-7274,U+7276-7278,U+727b-727d,U+7282-7283,U+7285-7289,U+728c,U+728e,U+7290-7291,U+7293-729e,U+72a0-72ab,U+72ae,U+72b1-72b3,U+72b5,U+72ba-72c0,U+72c5-72c7,U+72c9-72cc,U+72cf,U+72d1,U+72d3-72d6,U+72d8,U+72da-72dd,U+72df,U+72e2-72e7,U+72ea-72eb,U+72f5-72f6,U+72f9,U+72fd-7300,U+7302,U+7304-7309,U+730b-730d,U+730f-7312,U+7314,U+7318-731a,U+731f-7320,U+7323-7324,U+7326-7328,U+732d,U+732f-7330,U+7332-7333,U+7335-7336,U+733a-733d,U+7340-734c,U+734e-734f,U+7351,U+7353-7356,U+7358-735f,U+7361-736b,U+736e,U+7370-7371"}},{uri:Vj,descriptors:{unicodeRange:"U+6ec5-6ec6,U+6ec8-6eca,U+6ecc-6ece,U+6ed0,U+6ed2,U+6ed6,U+6ed8-6ed9,U+6edb-6edd,U+6ee3,U+6ee7,U+6eea-6ef3,U+6ef5-6ef8,U+6efa-6f01,U+6f03-6f05,U+6f07-6f08,U+6f0a-6f0e,U+6f10-6f12,U+6f16-6f1f,U+6f21-6f23,U+6f25-6f28,U+6f2c,U+6f2e,U+6f30,U+6f32,U+6f34-6f35,U+6f37-6f3d,U+6f3f-6f45,U+6f48-6f4a,U+6f4c,U+6f4e-6f57,U+6f59-6f5b,U+6f5d,U+6f5f-6f61,U+6f63-6f65,U+6f67-6f6c,U+6f6f-6f71,U+6f73,U+6f75-6f77,U+6f79,U+6f7b,U+6f7d-6f83,U+6f85-6f87,U+6f8a-6f8b,U+6f8f-6f9b,U+6f9d-6fa0,U+6fa2-6fa6,U+6fa8-6fb1"}},{uri:Gj,descriptors:{unicodeRange:"U+6d73,U+6d75-6d76,U+6d79-6d7b,U+6d7d-6d81,U+6d83-6d84,U+6d86-6d87,U+6d8a-6d8b,U+6d8d,U+6d8f-6d90,U+6d92,U+6d96-6d9a,U+6d9c,U+6da2,U+6da5,U+6dac-6dad,U+6db0-6db1,U+6db3-6db4,U+6db6-6db7,U+6db9-6dbe,U+6dc1-6dc3,U+6dc8-6dca,U+6dcd-6dd0,U+6dd2-6dd5,U+6dd7,U+6dda-6ddc,U+6ddf,U+6de2-6de3,U+6de5,U+6de7-6dea,U+6ded,U+6def-6df0,U+6df2,U+6df4-6df6,U+6df8,U+6dfa,U+6dfd-6e04,U+6e06-6e09,U+6e0b,U+6e0f,U+6e12-6e13,U+6e15,U+6e18-6e19,U+6e1b-6e1c,U+6e1e-6e1f,U+6e22,U+6e26-6e28,U+6e2a,U+6e2c,U+6e2e,U+6e30-6e31,U+6e33,U+6e35-6e37,U+6e39,U+6e3b-6e42,U+6e45-6e4c,U+6e4f-6e52,U+6e55,U+6e57,U+6e59-6e5a,U+6e5c-6e5e,U+6e60-6e6a,U+6e6c-6e6d,U+6e6f-6e7d,U+6e80-6e82,U+6e84,U+6e87-6e88,U+6e8a-6e8e,U+6e91-6e97,U+6e99-6e9b,U+6e9d-6e9e,U+6ea0-6ea1,U+6ea3-6ea4,U+6ea6,U+6ea8-6ea9,U+6eab-6eae,U+6eb0,U+6eb3,U+6eb5,U+6eb8-6eb9,U+6ebc,U+6ebe-6ec0,U+6ec3-6ec4"}},{uri:Yj,descriptors:{unicodeRange:"U+6bbb-6bbe,U+6bc0,U+6bc3-6bc4,U+6bc6-6bca,U+6bcc,U+6bce,U+6bd0-6bd1,U+6bd8,U+6bda,U+6bdc-6be0,U+6be2-6be9,U+6bec-6bee,U+6bf0-6bf2,U+6bf4,U+6bf6-6bf8,U+6bfa-6bfc,U+6bfe-6c04,U+6c08-6c0c,U+6c0e,U+6c12,U+6c17,U+6c1c-6c1e,U+6c20,U+6c23,U+6c25,U+6c2b-6c2d,U+6c31,U+6c33,U+6c36-6c37,U+6c39-6c3c,U+6c3e-6c3f,U+6c43-6c45,U+6c48,U+6c4b-6c4f,U+6c51-6c53,U+6c56,U+6c58-6c5a,U+6c62-6c63,U+6c65-6c67,U+6c6b-6c6f,U+6c71,U+6c73,U+6c75,U+6c77-6c78,U+6c7a-6c7c,U+6c7f-6c80,U+6c84,U+6c87,U+6c8a-6c8b,U+6c8d-6c8e,U+6c91-6c92,U+6c95-6c98,U+6c9a,U+6c9c-6c9e,U+6ca0,U+6ca2,U+6ca8,U+6cac,U+6caf-6cb0,U+6cb4-6cb7,U+6cba,U+6cc0-6cc3,U+6cc6-6cc8,U+6ccb,U+6ccd-6ccf,U+6cd1-6cd2,U+6cd8-6cda,U+6cdc-6cdd,U+6cdf,U+6ce4,U+6ce6-6ce7,U+6ce9,U+6cec-6ced,U+6cf2,U+6cf4,U+6cf9,U+6cff-6d00,U+6d02-6d03,U+6d05-6d06,U+6d08-6d0a,U+6d0d,U+6d0f-6d11,U+6d13-6d16,U+6d18,U+6d1c-6d1d,U+6d1f-6d24,U+6d26,U+6d28-6d29,U+6d2c-6d2d,U+6d2f-6d30,U+6d34,U+6d36-6d38,U+6d3a,U+6d3f-6d40,U+6d42,U+6d44,U+6d49,U+6d4c,U+6d50,U+6d55-6d58,U+6d5b,U+6d5d,U+6d5f,U+6d61-6d62,U+6d64-6d65,U+6d67-6d68,U+6d6b-6d6d,U+6d70-6d72"}},{uri:Zj,descriptors:{unicodeRange:"U+6967-696a,U+696c-696d,U+696f-6970,U+6972-6976,U+697a-697b,U+697d-697f,U+6981,U+6983,U+6985,U+698a-698c,U+698e-6993,U+6996-6997,U+6999-699a,U+699d-69a6,U+69a9-69aa,U+69ac,U+69ae-69b0,U+69b2-69b3,U+69b5-69b6,U+69b8-69ba,U+69bc-69c0,U+69c2-69c9,U+69cb,U+69cd,U+69cf,U+69d1-69d3,U+69d5-69da,U+69dc-69de,U+69e1-69ec,U+69ee-69f1,U+69f3-69fc,U+69fe,U+6a00-6a09,U+6a0b-6a16,U+6a19-6a1e,U+6a20,U+6a22-6a27,U+6a29,U+6a2b-6a2e,U+6a30,U+6a32-6a34,U+6a36-6a3c,U+6a3f-6a43,U+6a45-6a46,U+6a48-6a4a"}},{uri:Kj,descriptors:{unicodeRange:"U+6830-6831,U+6834-6836,U+683a-683b,U+683f,U+6847,U+684b,U+684d,U+684f,U+6852,U+6856-685f,U+686a,U+686c-6873,U+6875,U+6878-6880,U+6882,U+6884,U+6887-688e,U+6890-6892,U+6894-6896,U+6898-68a1,U+68a3-68a5,U+68a9-68ac,U+68ae,U+68b1-68b2,U+68b4,U+68b6-68bf,U+68c1,U+68c3-68c8,U+68ca,U+68cc,U+68ce-68d1,U+68d3-68d4,U+68d6-68d7,U+68d9,U+68db-68df,U+68e1-68e2,U+68e4-68ed,U+68ef,U+68f2-68f4,U+68f6-68f8,U+68fb,U+68fd-6900,U+6902-6904,U+6906-690a,U+690c,U+690f,U+6911,U+6913-691e,U+6921-6923,U+6925-692c,U+692e-692f,U+6931-6933,U+6935-6938,U+693a-693c,U+693e,U+6940-6941,U+6943-6953,U+6955-6956,U+6958-6959,U+695b-695c,U+695f,U+6961-6962,U+6964-6965"}},{uri:qj,descriptors:{unicodeRange:"U+66b8,U+66ba-66bd,U+66bf-66d8,U+66da,U+66de-66e5,U+66e7-66e8,U+66ea-66ef,U+66f1,U+66f5-66f6,U+66f8,U+66fa-66fb,U+66fd,U+6701-6707,U+670c,U+670e-670f,U+6711-6713,U+6716,U+6718-671a,U+671c,U+671e,U+6720-6725,U+6727,U+6729,U+672e,U+6730,U+6732-6733,U+6736-6739,U+673b-673c,U+673e-673f,U+6741,U+6744-6745,U+6747,U+674a-674b,U+674d,U+6752,U+6754-6755,U+6757-675b,U+675d,U+6762-6764,U+6766-6767,U+676b-676c,U+676e,U+6771,U+6774,U+6776,U+6778-677b,U+677d,U+6780,U+6782-6783,U+6785-6786,U+6788,U+678a,U+678c-678f,U+6791-6794,U+6796,U+6799,U+679b,U+679f-67a1,U+67a4,U+67a6,U+67a9,U+67ac,U+67ae,U+67b1-67b2,U+67b4,U+67b9-67c0,U+67c2,U+67c5-67ce,U+67d5-67d7,U+67db,U+67df,U+67e1,U+67e3-67e4,U+67e6-67e8,U+67ea-67eb,U+67ed-67ee,U+67f2,U+67f5-67fc,U+67fe,U+6801-6804,U+6806,U+680d,U+6810,U+6812,U+6814-6815,U+6818-681c,U+681e-6820,U+6822-6828,U+682b-682f"}},{uri:Jj,descriptors:{unicodeRange:"U+6569-656a,U+656d-656f,U+6571,U+6573,U+6575-6576,U+6578-6586,U+6588-658a,U+658d-658f,U+6592,U+6594-6596,U+6598,U+659a,U+659d-659e,U+65a0,U+65a2-65a3,U+65a6,U+65a8,U+65aa,U+65ac,U+65ae,U+65b1-65b8,U+65ba-65bb,U+65be-65c0,U+65c2,U+65c7-65ca,U+65cd,U+65d0-65d1,U+65d3-65d5,U+65d8-65df,U+65e1,U+65e3-65e4,U+65ea-65eb,U+65f2-65f5,U+65f8-65f9,U+65fb-65ff,U+6601,U+6604-6605,U+6607-6609,U+660b,U+660d,U+6610-6612,U+6616-6618,U+661a-661c,U+661e,U+6621-6624,U+6626,U+6629-662c,U+662e,U+6630,U+6632-6633,U+6637-663b,U+663d,U+663f-6640,U+6642,U+6644-664a,U+664d-664e,U+6650-6651,U+6658-6659,U+665b-665e,U+6660,U+6662-6663,U+6665,U+6667,U+6669-666d,U+6671-6673,U+6675,U+6678-6679,U+667b-667d,U+667f-6681,U+6683,U+6685-6686,U+6688-668b,U+668d-6690,U+6692-6695,U+6698-669c,U+669e-66a6,U+66a9-66ad,U+66af-66b3,U+66b5-66b7"}},{uri:Qj,descriptors:{unicodeRange:"U+5f30,U+5f32-5f38,U+5f3b,U+5f3d-5f3f,U+5f41-5f4f,U+5f51,U+5f54,U+5f59-5f5c,U+5f5e-5f60,U+5f63,U+5f65,U+5f67-5f68,U+5f6b,U+5f6e-5f6f,U+5f72,U+5f74-5f76,U+5f78,U+5f7a,U+5f7d-5f7f,U+5f83,U+5f86,U+5f8d-5f8f,U+5f91,U+5f93-5f94,U+5f96,U+5f9a-5f9b,U+5f9d-5fa0,U+5fa2-5fa7,U+5fa9,U+5fab-5fac,U+5faf-5fb4,U+5fb6,U+5fb8-5fbb,U+5fbe-5fc2,U+5fc7-5fc8,U+5fca-5fcb,U+5fce,U+5fd3-5fd5,U+5fda-5fdc,U+5fde-5fdf,U+5fe2-5fe3,U+5fe5-5fe6,U+5fe8-5fe9,U+5fec,U+5fef-5ff0,U+5ff2-5ff4,U+5ff6-5ff7,U+5ff9-5ffa,U+5ffc,U+6007-6009,U+600b-600c,U+6010-6011,U+6013,U+6017-6018,U+601a,U+601e-601f,U+6022-6024,U+602c-602e,U+6030-6034,U+6036-603a,U+603d-603e,U+6040,U+6044-604a,U+604c,U+604e-604f,U+6051,U+6053-6054,U+6056-6058,U+605b-605c,U+605e-6061,U+6065-6066,U+606e,U+6071-6072,U+6074-6075,U+6077,U+607e,U+6080-6082,U+6085-6088,U+608a-608b,U+608e-6091,U+6093,U+6095,U+6097-6099,U+609c,U+609e,U+60a1-60a2,U+60a4-60a5,U+60a7,U+60a9-60aa,U+60ae,U+60b0,U+60b3,U+60b5-60b7,U+60b9-60ba,U+60bd-60c4,U+60c7-60c9,U+60cc"}},{uri:eR,descriptors:{unicodeRange:"U+635a-635d,U+6360,U+6364-6366,U+6368,U+636a-636c,U+636f-6370,U+6372-6375,U+6378-6379,U+637c-637f,U+6381,U+6383-6386,U+638b,U+638d,U+6391,U+6393-6395,U+6397,U+6399-639f,U+63a1,U+63a4,U+63a6,U+63ab,U+63af,U+63b1-63b2,U+63b5-63b6,U+63b9,U+63bb,U+63bd,U+63bf-63c3,U+63c5,U+63c7-63c8,U+63ca-63cc,U+63d1,U+63d3-63d5,U+63d7-63dd,U+63df,U+63e2,U+63e4-63e8,U+63eb-63ec,U+63ee-63f1,U+63f3,U+63f5,U+63f7,U+63f9-63fc,U+63fe,U+6403-6404,U+6406-640a,U+640d-640e,U+6411-6412,U+6415-641a,U+641d,U+641f,U+6422-6425,U+6427-6429,U+642b,U+642e-6433,U+6435-6439,U+643b-643c,U+643e,U+6440,U+6442-6443,U+6449,U+644b-6451,U+6453,U+6455-6457,U+6459-645d,U+645f-6466,U+6468,U+646a-646c,U+646e-6477,U+647b-6481,U+6483,U+6486,U+6488-648f"}},{uri:tR,descriptors:{unicodeRange:"U+61c5-61c7,U+61c9,U+61cc-61d0,U+61d3,U+61d5-61e5,U+61e7-61f4,U+61f6-61fe,U+6200-6205,U+6207,U+6209,U+6213-6214,U+6219,U+621c-621e,U+6220,U+6223,U+6226-6229,U+622b,U+622d,U+622f-6232,U+6235-6236,U+6238-623c,U+6242,U+6244-6246,U+624a,U+624f-6250,U+6255-6257,U+6259-625a,U+625c-6262,U+6264-6265,U+6268,U+6271-6272,U+6274-6275,U+6277-6278,U+627a-627b,U+627d,U+6281-6283,U+6285-6288,U+628b-6290,U+6294,U+6299,U+629c-629e,U+62a3,U+62a6-62a7,U+62a9-62aa,U+62ad-62b0,U+62b2-62b4,U+62b6-62b8,U+62ba,U+62be,U+62c0-62c1,U+62c3,U+62cb,U+62cf,U+62d1,U+62d5,U+62dd-62de,U+62e0-62e1,U+62e4,U+62ea-62eb,U+62f0,U+62f2,U+62f5,U+62f8-62fb,U+6300,U+6303-6306,U+630a-630d,U+630f-6310,U+6312-6315,U+6317-6319,U+631c,U+6326-6327,U+6329,U+632c-632e,U+6330-6331,U+6333-6338,U+633b-633c,U+633e-6341,U+6344,U+6347-6348,U+634a,U+6351-6354,U+6356-6359"}},{uri:nR,descriptors:{unicodeRange:"U+5dd0-5dda,U+5ddc,U+5ddf-5de0,U+5de3-5de4,U+5dea,U+5dec-5ded,U+5df0,U+5df5-5df6,U+5df8-5dfc,U+5dff-5e00,U+5e04,U+5e07,U+5e09-5e0b,U+5e0d-5e0e,U+5e12-5e13,U+5e17,U+5e1e-5e25,U+5e28-5e2c,U+5e2f-5e30,U+5e32-5e36,U+5e39-5e3a,U+5e3e-5e41,U+5e43,U+5e46-5e4b,U+5e4d-5e53,U+5e56-5e5a,U+5e5c-5e5d,U+5e5f-5e60,U+5e63-5e71,U+5e75,U+5e77,U+5e79,U+5e7e,U+5e81-5e83,U+5e85,U+5e88-5e89,U+5e8c-5e8e,U+5e92,U+5e98,U+5e9b,U+5e9d,U+5ea1-5ea4,U+5ea8-5eac,U+5eae-5eb2,U+5eb4,U+5eba-5ebd,U+5ebf-5ec8,U+5ecb-5ed0,U+5ed4-5ed5,U+5ed7-5eda,U+5edc-5ee7,U+5ee9,U+5eeb-5ef3,U+5ef5,U+5ef8-5ef9,U+5efb-5efd,U+5f05-5f07,U+5f09,U+5f0c-5f0e,U+5f10,U+5f12,U+5f14,U+5f16,U+5f19-5f1a,U+5f1c-5f1e,U+5f21-5f24,U+5f28,U+5f2b-5f2c,U+5f2e"}},{uri:aR,descriptors:{unicodeRange:"U+60cd-60d0,U+60d2-60d4,U+60d6-60d7,U+60d9,U+60db,U+60de,U+60e1-60e5,U+60ea,U+60f1-60f2,U+60f5,U+60f7-60f8,U+60fb-60ff,U+6102-6105,U+6107,U+610a-610c,U+6110-6114,U+6116-6119,U+611b-611e,U+6121-6122,U+6125,U+6128-612a,U+612c-613e,U+6140-6147,U+6149,U+614b,U+614d,U+614f-6150,U+6152-6154,U+6156-615c,U+615e-6161,U+6163-6166,U+6169-616f,U+6171-6174,U+6176,U+6178-618a,U+618c-618d,U+618f-6193,U+6195-619c,U+619e-61a6,U+61aa-61ab,U+61ad-61b6,U+61b8-61bd,U+61bf-61c1,U+61c3-61c4"}},{uri:iR,descriptors:{unicodeRange:"U+5cf4-5cfa,U+5cfc-5d01,U+5d04-5d05,U+5d08-5d0d,U+5d0f-5d13,U+5d15,U+5d17-5d1a,U+5d1c-5d1d,U+5d1f-5d23,U+5d25,U+5d28,U+5d2a-5d2c,U+5d2f-5d33,U+5d35-5d3c,U+5d3f-5d46,U+5d48-5d49,U+5d4d-5d57,U+5d59-5d5a,U+5d5c,U+5d5e-5d68,U+5d6a,U+5d6d-5d6e,U+5d70-5d73,U+5d75-5d81,U+5d83-5d98,U+5d9a-5d9c,U+5d9e-5db6,U+5db8-5dc4,U+5dc6-5dcc,U+5dce-5dcf"}},{uri:rR,descriptors:{unicodeRange:"U+5b52,U+5b56,U+5b5e,U+5b60-5b61,U+5b67-5b68,U+5b6b,U+5b6d-5b6f,U+5b72,U+5b74,U+5b76-5b79,U+5b7b-5b7c,U+5b7e-5b7f,U+5b82,U+5b86,U+5b8a,U+5b8d-5b8e,U+5b90-5b92,U+5b94,U+5b96,U+5b9f,U+5ba7-5ba9,U+5bac-5baf,U+5bb1-5bb2,U+5bb7,U+5bba-5bbc,U+5bc0-5bc1,U+5bc3,U+5bc8-5bcb,U+5bcd-5bcf,U+5bd1,U+5bd4-5bdc,U+5be0,U+5be2-5be3,U+5be6-5be7,U+5be9-5bed,U+5bef,U+5bf1-5bf7,U+5bfd-5bfe,U+5c00,U+5c02-5c03,U+5c05,U+5c07-5c08,U+5c0b-5c0e,U+5c10,U+5c12-5c13,U+5c17,U+5c19,U+5c1b,U+5c1e-5c21,U+5c23,U+5c26,U+5c28-5c2b,U+5c2d-5c30,U+5c32-5c33,U+5c35-5c37,U+5c43-5c44,U+5c46-5c47,U+5c4c-5c4d,U+5c52-5c54,U+5c56-5c58,U+5c5a-5c5d,U+5c5f,U+5c62,U+5c64,U+5c67-5c6d,U+5c70,U+5c72-5c78,U+5c7b-5c7e,U+5c80,U+5c83-5c87,U+5c89-5c8b,U+5c8e-5c8f,U+5c92-5c93,U+5c95,U+5c9d-5ca1,U+5ca4-5ca8,U+5caa,U+5cae-5cb0,U+5cb2,U+5cb4,U+5cb6,U+5cb9-5cbc,U+5cbe,U+5cc0,U+5cc2-5cc3,U+5cc5-5cca,U+5ccc-5cd1,U+5cd3-5cd8,U+5cda-5ce0,U+5ce2-5ce3,U+5ce7,U+5ce9,U+5ceb-5cec,U+5cee-5cef,U+5cf1-5cf3"}},{uri:sR,descriptors:{unicodeRange:"U+593b,U+593d-5940,U+5943,U+5945-5946,U+594a,U+594c-594d,U+5950,U+5952-5953,U+5959,U+595b-595f,U+5961,U+5963-5964,U+5966-5972,U+5975,U+5977,U+597a-597c,U+597e-5980,U+5985,U+5989,U+598b-598c,U+598e-5991,U+5994-5995,U+5998,U+599a-599d,U+599f-59a2,U+59a6-59a7,U+59ac-59ad,U+59b0-59b1,U+59b3-59b8,U+59ba,U+59bc-59bd,U+59bf-59c5,U+59c7-59c9,U+59cc-59cf,U+59d5-59d6,U+59d9,U+59db,U+59de-59e2,U+59e4,U+59e6-59e7,U+59e9-59eb,U+59ed-59f8,U+59fa,U+59fc-59fe,U+5a00,U+5a02,U+5a0a-5a0b,U+5a0d-5a10,U+5a12,U+5a14-5a17,U+5a19-5a1b,U+5a1d-5a1e,U+5a21-5a22,U+5a24,U+5a26-5a28,U+5a2a-5a30,U+5a33,U+5a35,U+5a37-5a3b,U+5a3d-5a3f,U+5a41-5a45,U+5a47-5a48,U+5a4b-5a54,U+5a56-5a59,U+5a5b-5a61,U+5a63-5a66,U+5a68-5a69,U+5a6b-5a73,U+5a78-5a79,U+5a7b-5a7e,U+5a80-5a90"}},{uri:lR,descriptors:{unicodeRange:"U+5a91,U+5a93-5a99,U+5a9c-5aa9,U+5aab-5ab1,U+5ab4,U+5ab6-5ab7,U+5ab9-5abd,U+5abf-5ac0,U+5ac3-5ac8,U+5aca-5acb,U+5acd-5ad1,U+5ad3,U+5ad5,U+5ad7,U+5ad9-5adb,U+5add-5adf,U+5ae2,U+5ae4-5ae5,U+5ae7-5ae8,U+5aea,U+5aec-5af0,U+5af2-5b08,U+5b0a-5b15,U+5b18-5b31,U+5b33,U+5b35-5b36,U+5b38-5b3f,U+5b41-5b4f"}},{uri:oR,descriptors:{unicodeRange:"U+5843,U+5845-584b,U+584e-5850,U+5852-5853,U+5855-5857,U+5859-585d,U+585f-5864,U+5866-586a,U+586d-587d,U+587f,U+5882,U+5884,U+5886-5888,U+588a-5891,U+5894-5898,U+589b-589d,U+58a0-58a7,U+58aa-58bb,U+58bd-58c0,U+58c2-58c4,U+58c6-58d0,U+58d2-58d4,U+58d6-58e3,U+58e5-58ea,U+58ed,U+58ef,U+58f1-58f2,U+58f4-58f5,U+58f7-58f8,U+58fa-5901,U+5903,U+5905-5906,U+5908-590c,U+590e,U+5910-5913,U+5917-5918,U+591b,U+591d-591e,U+5920-5923,U+5926,U+5928,U+592c,U+5930,U+5932-5933,U+5935-5936"}},{uri:cR,descriptors:{unicodeRange:"U+56d0-56d3,U+56d5-56d6,U+56d8-56d9,U+56dc,U+56e3,U+56e5-56ea,U+56ec,U+56ee-56ef,U+56f2-56f3,U+56f6-56f8,U+56fb-56fc,U+5700-5702,U+5705,U+5707,U+570b-571b,U+571d-571e,U+5720-5722,U+5724-5727,U+572b,U+5731-5732,U+5734-5738,U+573c-573d,U+573f,U+5741,U+5743-5746,U+5748-5749,U+574b,U+5752-5756,U+5758-5759,U+5762-5763,U+5765,U+5767,U+576c,U+576e,U+5770-5772,U+5774-5775,U+5778-577a,U+577d-5781,U+5787-578a,U+578d-5791,U+5794-579a,U+579c-579f,U+57a5,U+57a8,U+57aa,U+57ac,U+57af-57b1,U+57b3,U+57b5-57b7,U+57b9-57c1,U+57c4-57ca,U+57cc-57cd,U+57d0-57d1,U+57d3,U+57d6-57d7,U+57db-57dc,U+57de,U+57e1-57e3,U+57e5-57ec,U+57ee,U+57f0-57f3,U+57f5-57f7,U+57fb-57fc,U+57fe-57ff,U+5801,U+5803-5805,U+5808-580a,U+580c,U+580e-5810,U+5812-5814,U+5816-5818,U+581a-581d,U+581f,U+5822-5823,U+5825-5829,U+582b-582f,U+5831-5834,U+5836-5842"}},{uri:dR,descriptors:{unicodeRange:"U+55f9-55fc,U+55ff,U+5602-5607,U+560a-560b,U+560d,U+5610-5617,U+5619-561a,U+561c-561d,U+5620-5622,U+5625-5626,U+5628-562b,U+562e-5630,U+5633,U+5635,U+5637-5638,U+563a,U+563c-563e,U+5640-564b,U+564f-5653,U+5655-5656,U+565a-565b,U+565d-5661,U+5663,U+5665-5667,U+566d-5670,U+5672-5675,U+5677-567a,U+567d-5684,U+5687-568d,U+5690-5692,U+5694-56a2,U+56a4-56ae,U+56b0-56b6,U+56b8-56bb,U+56bd-56c9,U+56cb-56cf"}},{uri:uR,descriptors:{unicodeRange:"U+5286-5287,U+5289-528f,U+5291-5292,U+5294-529a,U+529c,U+52a4-52a7,U+52ae-52b0,U+52b4-52bd,U+52c0-52c2,U+52c4-52c6,U+52c8,U+52ca,U+52cc-52cf,U+52d1,U+52d3-52d5,U+52d7,U+52d9-52de,U+52e0-52e3,U+52e5-52ef,U+52f1-52f8,U+52fb-52fd,U+5301-5304,U+5307,U+5309-530c,U+530e,U+5311-5314,U+5318,U+531b-531c,U+531e-531f,U+5322,U+5324-5325,U+5327-5329,U+532b-532d,U+532f-5338,U+533c-533d,U+5340,U+5342,U+5344,U+5346,U+534b-534d,U+5350,U+5354,U+5358-5359,U+535b,U+535d,U+5365,U+5368,U+536a,U+536c-536d,U+5372,U+5376,U+5379,U+537b-537e,U+5380-5381,U+5383,U+5387-5388,U+538a,U+538e-5394,U+5396-5397,U+5399,U+539b-539c,U+539e,U+53a0-53a1,U+53a4,U+53a7,U+53aa-53ad,U+53af-53b5,U+53b7-53ba,U+53bc-53be,U+53c0,U+53c3-53c7,U+53ce-53d0,U+53d2-53d3,U+53d5,U+53da,U+53dc-53de,U+53e1-53e2,U+53e7,U+53f4,U+53fa,U+53fe-5400,U+5402,U+5405,U+5407,U+540b,U+5414,U+5418-541a,U+541c,U+5422,U+5424-5425,U+542a,U+5430,U+5433,U+5436-5437,U+543a"}},{uri:fR,descriptors:{unicodeRange:"U+5101-5105,U+5108-510a,U+510c-5111,U+5113-5120,U+5122-513e,U+5142,U+5147,U+514a,U+514c,U+514e-5150,U+5152-5153,U+5157-5159,U+515b,U+515d-5161,U+5163-5164,U+5166-5167,U+5169-516a,U+516f,U+5172,U+517a,U+517e-517f,U+5183-5184,U+5186-5187,U+518a-518b,U+518e-5191,U+5193-5194,U+5198,U+519a,U+519d-519f,U+51a1,U+51a3,U+51a6-51aa,U+51ad-51ae,U+51b4,U+51b8-51ba,U+51be-51bf,U+51c1-51c3,U+51c5,U+51c8,U+51ca,U+51cd-51ce,U+51d0,U+51d2-51da,U+51dc,U+51de-51df,U+51e2-51e3,U+51e5-51ea,U+51ec,U+51ee,U+51f1-51f2,U+51f4,U+51f7,U+51fe,U+5204-5205,U+5209,U+520b-520c,U+520f-5210,U+5213-5215,U+521c,U+521e-521f,U+5221-5223,U+5225-5227,U+522a,U+522c,U+522f,U+5231-5232,U+5234-5235,U+523c,U+523e,U+5244-5249,U+524b,U+524e-524f,U+5252-5253,U+5255,U+5257-525b,U+525d,U+525f-5260,U+5262-5264,U+5266,U+5268,U+526b-526e,U+5270-5271,U+5273-527c,U+527e,U+5280,U+5283-5285"}},{uri:hR,descriptors:{unicodeRange:"U+543d,U+543f,U+5441-5442,U+5444-5445,U+5447,U+5449,U+544c-544f,U+5451,U+545a,U+545d-5461,U+5463,U+5465,U+5467,U+5469-5470,U+5474,U+5479-547a,U+547e-547f,U+5481,U+5483,U+5485,U+5487-548a,U+548d,U+5491,U+5493,U+5497-5498,U+549c,U+549e-54a2,U+54a5,U+54ae,U+54b0,U+54b2,U+54b5-54b7,U+54b9-54ba,U+54bc,U+54be,U+54c3,U+54c5,U+54ca-54cb,U+54d6,U+54d8,U+54db,U+54e0-54e4,U+54eb-54ec,U+54ef-54f1,U+54f4-54f9,U+54fb,U+54fe,U+5500,U+5502-5505,U+5508,U+550a-550e,U+5512-5513,U+5515-551a,U+551c-551f,U+5521,U+5525-5526,U+5528-5529,U+552b,U+552d,U+5532,U+5534-5536,U+5538-553b,U+553d,U+5540,U+5542,U+5545,U+5547-5548,U+554b-554f,U+5551-5554,U+5557-555b,U+555d-5560,U+5562-5563,U+5568-5569,U+556b,U+556f-5574,U+5579-557a,U+557d,U+557f,U+5585-5586,U+558c-558e,U+5590,U+5592-5593,U+5595-5597,U+559a-559b,U+559e,U+55a0-55a6,U+55a8-55b0,U+55b2,U+55b4,U+55b6,U+55b8,U+55ba,U+55bc,U+55bf-55c3,U+55c6-55c8,U+55ca-55cb,U+55ce-55d0,U+55d5,U+55d7-55db,U+55de,U+55e0,U+55e2,U+55e7,U+55e9,U+55ed-55ee,U+55f0-55f1,U+55f4,U+55f6,U+55f8"}},{uri:pR,descriptors:{unicodeRange:"U+4fe0,U+4fe2,U+4fe4-4fe5,U+4fe7,U+4feb-4fec,U+4ff0,U+4ff2,U+4ff4-4ff7,U+4ff9,U+4ffb-4ffd,U+4fff-500b,U+500e,U+5010-5011,U+5013,U+5015-5017,U+501b,U+501d-501e,U+5020,U+5022-5024,U+5027,U+502b,U+502f-5039,U+503b,U+503d,U+503f-5042,U+5044-5046,U+5049-504b,U+504d,U+5050-5054,U+5056-5059,U+505b,U+505d-5064,U+5066-506b,U+506d-5075,U+5078-507a,U+507c-507d,U+5081-5084,U+5086-5087,U+5089-508c,U+508e-50a2,U+50a4,U+50a6,U+50aa-50ab,U+50ad-50b1,U+50b3-50b9,U+50bc-50ce,U+50d0-50d5,U+50d7-50d9,U+50db-50e5,U+50e8-50eb,U+50ef-50f2,U+50f4,U+50f6-50fa,U+50fc-5100"}},{uri:UR,descriptors:{unicodeRange:"U+49d5-4a77"}},{uri:mR,descriptors:{unicodeRange:"U+4dac-4dad,U+4daf-4db5,U+4e02,U+4e04-4e06,U+4e0f,U+4e12,U+4e17,U+4e1f-4e21,U+4e23,U+4e26,U+4e29,U+4e2e-4e2f,U+4e31,U+4e33,U+4e35,U+4e37,U+4e3c,U+4e40-4e42,U+4e44,U+4e46,U+4e4a,U+4e51,U+4e55,U+4e57,U+4e5a-4e5b,U+4e62-4e65,U+4e67-4e68,U+4e6a-4e6f,U+4e72,U+4e74-4e7d,U+4e7f-4e85,U+4e87,U+4e8a,U+4e90,U+4e96-4e97,U+4e99,U+4e9c-4e9e,U+4ea3,U+4eaa,U+4eaf-4eb1,U+4eb4,U+4eb6-4eb9,U+4ebc-4ebe,U+4ec8,U+4ecc,U+4ecf-4ed0,U+4ed2,U+4eda-4edc,U+4ee0,U+4ee2,U+4ee6-4ee7,U+4ee9,U+4eed-4eef,U+4ef1,U+4ef4,U+4ef8-4efa,U+4efc,U+4efe,U+4f00,U+4f02-4f08,U+4f0b-4f0c,U+4f12-4f16,U+4f1c-4f1d,U+4f21,U+4f23,U+4f28-4f29,U+4f2c-4f2e,U+4f31,U+4f33,U+4f35,U+4f37,U+4f39,U+4f3b,U+4f3e-4f42,U+4f44-4f45,U+4f47-4f4c,U+4f52,U+4f54,U+4f56,U+4f61-4f62,U+4f66,U+4f68,U+4f6a-4f6b,U+4f6d-4f6e,U+4f71-4f72,U+4f75,U+4f77-4f7a,U+4f7d,U+4f80-4f82,U+4f85-4f87,U+4f8a,U+4f8c,U+4f8e,U+4f90,U+4f92-4f93,U+4f95-4f96,U+4f98-4f9a,U+4f9c,U+4f9e-4f9f,U+4fa1-4fa2,U+4fa4,U+4fab,U+4fad,U+4fb0-4fb4,U+4fb6-4fbe,U+4fc0-4fc2,U+4fc6-4fc9,U+4fcb-4fcd,U+4fd2-4fd6,U+4fd9,U+4fdb"}},{uri:gR,descriptors:{unicodeRange:"U+4933-49d4"}},{uri:bR,descriptors:{unicodeRange:"U+487a-4932"}},{uri:vR,descriptors:{unicodeRange:"U+47d2-4879,U+2ce7c,U+2ce88,U+2ce93"}},{uri:xR,descriptors:{unicodeRange:"U+4756-47d1,U+2ca02,U+2ca0e,U+2ca7d,U+2caa9,U+2cb29,U+2cb2e,U+2cb31,U+2cb38-2cb39,U+2cb3f,U+2cb41,U+2cb4e,U+2cb5a,U+2cb64,U+2cb69,U+2cb6c,U+2cb6f,U+2cb76,U+2cb78,U+2cb7c,U+2cbb1,U+2cbbf-2cbc0,U+2cbce,U+2cc5f,U+2ccf5-2ccf6,U+2ccfd,U+2ccff,U+2cd02-2cd03,U+2cd0a,U+2cd8b,U+2cd8d,U+2cd8f-2cd90,U+2cd9f-2cda0,U+2cda8,U+2cdad-2cdae,U+2cdd5,U+2ce18,U+2ce1a,U+2ce23,U+2ce26,U+2ce2a"}},{uri:yR,descriptors:{unicodeRange:"U+46c3-4755,U+2c488,U+2c494,U+2c497,U+2c542,U+2c613,U+2c618,U+2c621,U+2c629,U+2c62b-2c62d,U+2c62f,U+2c642,U+2c64a-2c64b,U+2c72c,U+2c72f,U+2c79f,U+2c7c1,U+2c7fd,U+2c8d9,U+2c8de,U+2c8e1,U+2c8f3,U+2c907,U+2c90a,U+2c91d"}},{uri:wR,descriptors:{unicodeRange:"U+4629-46c2,U+2bdf7,U+2be29,U+2c029-2c02a,U+2c0a9,U+2c0ca,U+2c1d5,U+2c1d9,U+2c1f9,U+2c27c,U+2c288,U+2c2a4,U+2c317,U+2c35b,U+2c361,U+2c364"}},{uri:ER,descriptors:{unicodeRange:"U+458e-4628,U+2b7a9,U+2b7c5,U+2b7e6,U+2b7f9,U+2b806,U+2b80a,U+2b81c,U+2b8b8,U+2bac7,U+2bb5f,U+2bb62,U+2bb7c,U+2bb83,U+2bc1b,U+2bd77,U+2bd87"}},{uri:SR,descriptors:{unicodeRange:"U+4449-4511,U+2afa2,U+2b127-2b128,U+2b137-2b138,U+2b1ed"}},{uri:kR,descriptors:{unicodeRange:"U+439b-4448,U+2a437,U+2a5f1,U+2a602,U+2a61a,U+2a6b2,U+2a7dd,U+2a8fb,U+2a917,U+2aa30,U+2aa36,U+2aa58"}},{uri:CR,descriptors:{unicodeRange:"U+4275-430d,U+298c6,U+29a72,U+29d98,U+29ddb,U+29e15,U+29e3d,U+29e49"}},{uri:MR,descriptors:{unicodeRange:"U+4132-41de,U+28bef,U+28c47,U+28c4f,U+28c51,U+28c54,U+28d10,U+28d71,U+28dfb,U+28e1f,U+28e36,U+28e89,U+28e99,U+28eeb,U+28f32,U+28ff8,U+292a0"}},{uri:IR,descriptors:{unicodeRange:"U+41df-4274,U+292b1,U+29490,U+295cf,U+2967f,U+296f0,U+29719,U+29750"}},{uri:_R,descriptors:{unicodeRange:"U+408e-4131,U+285c8-285c9,U+28678,U+28695,U+286d7,U+286fa,U+287e0,U+28946,U+28949,U+2896b,U+28987-28988,U+289ba-289bb,U+28a1e,U+28a29,U+28a43,U+28a71,U+28a99,U+28acd,U+28add,U+28ae4,U+28b49,U+28bc1"}},{uri:TR,descriptors:{unicodeRange:"U+3e83-3f2f,U+27139,U+273da-273db,U+273fe,U+27410,U+27449,U+27614-27615,U+27631,U+27684,U+27693,U+2770e,U+27723,U+27752"}},{uri:AR,descriptors:{unicodeRange:"U+3f30-3fdb,U+27985,U+27a84,U+27bb3,U+27bbe,U+27bc7,U+27cb8,U+27da0,U+27e10"}},{uri:jR,descriptors:{unicodeRange:"U+3fdc-408d,U+27fb7,U+27ff9,U+2808a,U+280bb,U+2815d,U+28277,U+28282,U+282e2,U+282f3,U+283cd,U+28408,U+2840c,U+28455,U+28468,U+2856b"}},{uri:RR,descriptors:{unicodeRange:"U+3dd2-3e82,U+26a58,U+26a8c,U+26ab7,U+26aff,U+26b5c,U+26c21,U+26c29,U+26c73,U+26cdd,U+26e40,U+26e65,U+26f94,U+26ff6-26ff8,U+270f4,U+2710d"}},{uri:DR,descriptors:{unicodeRange:"U+3d34-3dd1,U+2648d,U+26676,U+2667e,U+266b0,U+2671d,U+2677c,U+267cc,U+268dd,U+268ea,U+26951,U+2696f,U+269dd,U+269fa,U+26a1e"}},{uri:LR,descriptors:{unicodeRange:"U+3c76-3d33,U+25d0a,U+25da1,U+25e2e,U+25e56,U+25e62,U+25e65,U+25ec2,U+25ed7-25ed8,U+25ee8,U+25f23,U+25f5c,U+25fd4,U+25fe0,U+25ffb,U+2600c,U+26017,U+26060,U+260ed,U+26221,U+26270,U+26286,U+2634c,U+26402"}},{uri:PR,descriptors:{unicodeRange:"U+3bda-3c75,U+25771,U+257a9,U+257b4,U+259c4,U+259d4,U+25ae3-25ae4,U+25af1,U+25bb2,U+25c14,U+25c4b,U+25c64"}},{uri:NR,descriptors:{unicodeRange:"U+3b25-3bd9,U+2504a,U+25055,U+25122,U+2512b,U+251a9,U+251cd,U+251e5,U+2521e,U+2524c,U+2542e,U+2548e,U+254d9,U+2550e,U+25532,U+25562,U+255a7-255a8"}},{uri:OR,descriptors:{unicodeRange:"U+3a6b-3b24,U+24896,U+249db,U+24a4d,U+24a7d,U+24ac9,U+24b56,U+24b6f,U+24c16,U+24d14,U+24dea,U+24e0e,U+24e37,U+24e6a,U+24e8b,U+24eaa"}},{uri:$R,descriptors:{unicodeRange:"U+39a9-3a6a,U+24096,U+24103,U+241ac,U+241c6,U+241fe,U+243bc,U+243f8,U+244d3,U+24629,U+246a5,U+247f1"}},{uri:FR,descriptors:{unicodeRange:"U+38e3-39a8,U+23a98,U+23c7f,U+23c97-23c98,U+23cfe,U+23d00,U+23d0e,U+23d40,U+23dd3,U+23df9-23dfa,U+23e23,U+23f7e"}},{uri:zR,descriptors:{unicodeRange:"U+3760-382a,U+22ab8,U+22b43,U+22b46,U+22b4f-22b50,U+22ba6,U+22bca,U+22c1d,U+22c24,U+22c55,U+22d4c,U+22de1"}},{uri:BR,descriptors:{unicodeRange:"U+382b-38e2,U+231b6,U+231c3-231c4,U+231f5,U+23350,U+23372,U+233d0,U+233d2-233d3,U+233d5,U+233da,U+233df,U+233e4,U+2344a-2344b,U+23451,U+23465,U+234e4,U+2355a,U+23594,U+235c4,U+235cb,U+23638-2363a,U+23647,U+2370c,U+2371c,U+2373f,U+23763-23764,U+237e7,U+237ff,U+23824,U+2383d"}},{uri:HR,descriptors:{unicodeRange:"U+3698-375f,U+22218,U+2231e,U+223ad,U+224dc,U+226f3,U+2285b,U+228ab,U+2298f"}},{uri:XR,descriptors:{unicodeRange:"U+35e6-3697,U+21c56,U+21cde,U+21d2d,U+21d45,U+21d62,U+21d78,U+21d92,U+21d9c,U+21da1,U+21db7,U+21de0,U+21e33-21e34,U+21f1e,U+21f76,U+21ffa,U+2217b"}},{uri:WR,descriptors:{unicodeRange:"U+3444-350e,U+20ad3,U+20b1d,U+20b9f,U+20c41,U+20cbf,U+20cd0,U+20d45,U+20de1,U+20e64,U+20e6d,U+20e95,U+20e9d,U+20ea2,U+20f5f,U+210c1,U+21201,U+2123d,U+21255,U+21274,U+2127b"}},{uri:VR,descriptors:{unicodeRange:"U+350f-35e5,U+212d7,U+212e4,U+212fd,U+2131b,U+21336,U+21344,U+2139a,U+213c4,U+21413,U+2146d-2146e,U+215d7,U+21647,U+216b4,U+21706,U+21742,U+218bd,U+219c3"}},{uri:GR,descriptors:{unicodeRange:"U+336d-3443,U+2032b,U+20371,U+20381,U+203f9,U+2044a,U+20509,U+20547,U+205d6,U+20628,U+20676,U+2074f,U+20779,U+20807,U+2083a,U+20895,U+208b9,U+2097c,U+2099d"}},{uri:YR,descriptors:{unicodeRange:"U+328b-336c,U+2000b,U+20089,U+200a2,U+200a4,U+20164,U+201a2,U+20213"}},{uri:ZR,descriptors:{unicodeRange:"U+3192-31ba,U+31c0-31e3,U+31f0-321e,U+3220-328a,U+1f250-1f251"}},{uri:KR,descriptors:{unicodeRange:"U+2f74-2fd5,U+3000,U+3003-3007,U+3012-3013,U+3018-301c,U+3020-3029,U+302f-303f,U+3041-3096,U+3099-30a1"}},{uri:qR,descriptors:{unicodeRange:"U+30a2-30ff,U+3105-312f,U+3131-318e,U+3190-3191"}},{uri:JR,descriptors:{unicodeRange:"U+4e36,U+4ea0,U+4f74,U+4f91,U+4f94,U+4fc5,U+507e,U+50ed,U+5182,U+51f5,U+525e,U+5282,U+52f9,U+5326,U+537a,U+53a3,U+5423,U+5459,U+54b4,U+54d9,U+55c9,U+57f4,U+580b,U+5902,U+5925,U+5a08,U+5ab5,U+5b84,U+5be4,U+5c22,U+5cb5,U+5cbd,U+5d3e,U+5e31,U+5e5e,U+5e80,U+5ee8,U+5f82,U+5fc9,U+5fed,U+600a,U+605d,U+609b,U+609d,U+60dd,U+6243,U+6322,U+63ce,U+640c,U+643f,U+6445,U+64d7,U+6534,U+6549,U+656b,U+6603,U+674c,U+680a,U+6864,U+69d4,U+6a65,U+6c2a,U+6c46,U+6c5c,U+6d0e,U+6d48,U+6e2b,U+6eb2,U+6eb7,U+6f89,U+706c,U+70b1,U+7113,U+71d4,U+727f,U+72f3,U+7303,U+7321,U+736c,U+736f,U+74a9,U+74de,U+750d,U+7513,U+7592,U+75c4,U+7605,U+760a,U+761b,U+7625,U+762d,U+7643,U+7707,U+7747,U+77b5,U+7839,U+784e,U+78a5,U+7924,U+793b,U+798a,U+7a03,U+7a06,U+7a78,U+7a80,U+7aad,U+7ba8,U+7be5,U+7cc8,U+7ec1,U+7f0b,U+7f0f,U+7f12,U+7f68,U+7f9d,U+8025,U+809c,U+80ad,U+80b7,U+80e8,U+811e,U+8204,U+8223,U+822d,U+823b,U+824b,U+825a,U+827d,U+827f,U+828f,U+82c8,U+8307,U+831b,U+8347,U+837d,U+839b,U+83a9,U+83f9,U+84b9,U+8579,U+864d,U+867f,U+86b0,U+86d1,U+86d8,U+86f2,U+8764,U+8770,U+8788,U+8797,U+87ac-87ad,U+87b5,U+881b,U+8844,U+88bc,U+88fc,U+8930,U+89cf,U+89d6,U+8ba0,U+8bd4,U+8c02,U+8c2b,U+8c85,U+8e23,U+8f81-8f82,U+8fd5,U+90b6,U+90db,U+914e,U+9164,U+91ad,U+943e,U+94b7-94b8,U+94eb,U+950d,U+9514,U+9516,U+9518,U+9529,U+9538,U+953f,U+954e,U+955f,U+95fc,U+9667,U+96b3,U+9792,U+97b2,U+98a1,U+9969,U+9987,U+9998,U+9a80,U+9a92,U+9a96,U+9adf,U+9cb4,U+9cbd,U+9cd0,U+9cd4,U+9e31,U+9e3a,U+9e71,U+9ee5,U+9eea,U+9ef9,U+9fa0"}},{uri:QR,descriptors:{unicodeRange:"U+4e0c,U+4e28,U+4e3f,U+4ec2,U+502e,U+50ba,U+5155,U+5181,U+522d,U+5281,U+5290,U+5369,U+53b6,U+54d5,U+54dc,U+54ff,U+552a,U+553c,U+5588,U+55b5,U+5686,U+570a,U+5776,U+5786,U+57a4,U+5820,U+5865,U+58bc,U+5b32,U+5b65,U+5c1c,U+5c66,U+5c6e,U+5c8d,U+5ddb,U+5f2a,U+5f50,U+5f61,U+6067,U+614a,U+615d,U+619d,U+61d4,U+620b,U+6224-6225,U+6343,U+63ad,U+63f2,U+640b,U+6420,U+6434,U+6496,U+64d0,U+6509,U+652e,U+67a8,U+6833,U+6844,U+684a,U+6920,U+6957,U+6971,U+6a8e,U+6a91,U+6aa0,U+6b43,U+6bea,U+6bf5,U+6c15,U+6cd0,U+6ee0,U+6f24,U+6f2d,U+70c0,U+721d,U+728b,U+72c3,U+72e8,U+730a,U+7338-7339,U+734d,U+746d,U+752f,U+754e,U+770d,U+7735,U+778d,U+77a2,U+77e7,U+7857,U+786d,U+78c9,U+78f2,U+791e,U+7953,U+7b58,U+7b9d,U+7bda,U+7cd7,U+7f32-7f33,U+8022,U+8028-8029,U+8035,U+804d,U+8080,U+80c2,U+80e9,U+80ec,U+80f2,U+810e,U+8221,U+8274,U+82b0,U+82e0,U+83b0,U+8487-8488,U+848e,U+84cd,U+84d0,U+8539,U+857a,U+85a8,U+85b7,U+867c,U+871e,U+8723,U+877e,U+878b,U+8793,U+8803,U+88d2,U+8966,U+89cc,U+89eb,U+8b26,U+8c8a,U+8c98,U+8d33,U+8d47,U+8d55,U+8dbc,U+8e40,U+8e94,U+8f77,U+8f79,U+9058,U+91a2,U+91b5,U+928e,U+9494,U+94b6,U+94de,U+94f4,U+94f9,U+950a,U+950e,U+951e,U+952b,U+953c,U+953e,U+9544,U+9561,U+9564,U+9569,U+95f6,U+9603,U+960d,U+963d,U+9674,U+9794,U+97ab,U+98a5,U+9a9f,U+9ab1,U+9ad1,U+9b0f,U+9b2f,U+9c92,U+9c95,U+9cba,U+9cbc,U+9cc6,U+9ccb,U+9cd8,U+9e32,U+9e38,U+9e5b,U+9e7e,U+9eb4,U+9efb-9efc,U+9f3d"}},{uri:eD,descriptors:{unicodeRange:"U+2e3b,U+2e80-2e99,U+2e9b-2ef3,U+2f00-2f73,U+ffffd"}},{uri:tD,descriptors:{unicodeRange:"U+4e69,U+4f1b,U+4f67,U+4f7e,U+4fdc,U+50e6,U+5196,U+5202,U+5233,U+523f,U+52a2,U+536e,U+5476,U+54ad,U+54cf,U+5537,U+561e,U+56dd,U+56df,U+5709,U+572c,U+57cf,U+57f8,U+580d,U+5881,U+589a,U+5941,U+59b2,U+5c25,U+5d24,U+5d74,U+5e42,U+5e8b,U+5eb3,U+5ed2,U+5fad,U+6003,U+603c,U+6083,U+6100,U+6126,U+6206,U+62ca,U+638e,U+63b4,U+6426,U+646d,U+6535,U+65c4,U+66db,U+6715,U+6769,U+6798,U+67c3,U+6861,U+698d,U+69ca,U+69ed,U+69f2,U+69ff,U+6a18,U+6b39,U+6bb3,U+6c0d,U+6cb2,U+6cd6,U+6cf7,U+6cfa,U+6d33,U+6e16,U+6e53-6e54,U+6ebb,U+6fb6,U+709d,U+72ad,U+72f7,U+72fb,U+7313,U+739f,U+74ba,U+754b,U+755b,U+758b,U+75ac,U+75d6,U+7617,U+7635,U+7640,U+76a4,U+76b2,U+775a,U+77bd,U+781f,U+79b3,U+7b2b,U+7b31,U+7b3e,U+7b6e,U+7b9c,U+7c0b,U+7c9e,U+7cc1,U+7ce8,U+7ea5,U+7f21,U+7f27,U+7f74,U+7fb0,U+8031,U+8071,U+80ea,U+8114,U+8160,U+81a6,U+81c1,U+829f,U+82a4,U+82fb,U+831a,U+8333,U+836c,U+83b6,U+83f8,U+8411,U+841c,U+8489,U+848c,U+85a4,U+8627,U+8629,U+866e,U+86b5,U+872e,U+8731,U+877b,U+877d,U+87ea,U+8813,U+8816,U+8864,U+88ce,U+88e5,U+897b,U+89cb,U+89f3,U+8bfc,U+8c35,U+8d46,U+8d4d,U+8dba,U+8e3a,U+8f75,U+8f7e,U+8fd3,U+9161,U+9179,U+917e,U+91a3,U+94ac,U+94d7,U+94e5,U+952a,U+952c,U+9545,U+9565,U+9568,U+956a,U+961d,U+96e0,U+972a,U+9730,U+989f,U+98e7,U+990d,U+9967,U+9993,U+9aa3,U+9ac0,U+9ae1,U+9aeb,U+9af9,U+9c86,U+9c8b,U+9ca0-9ca1,U+9ca3,U+9ce2,U+9e48,U+9e6a,U+9e87,U+9ee2,U+9ee9,U+9f17,U+9f19,U+9f2c,U+9f80"}},{uri:nD,descriptors:{unicodeRange:"U+4ef3,U+50d6,U+50ec,U+51ab,U+51b1,U+52d6,U+54a9,U+54da,U+55be,U+55cd,U+564d,U+572f,U+574c,U+576b,U+57d8,U+57fd,U+5844,U+59d2,U+5ae0,U+5b16,U+5b37,U+5b5b,U+5b80,U+5d1e,U+5d6b,U+5efe,U+5f11,U+5f56,U+5f58,U+5f73,U+5f8c,U+5fc4,U+5fe4,U+602b,U+6106,U+610d,U+63de,U+63f8,U+641b,U+64e4,U+6634,U+676a,U+67b5,U+681d,U+6883,U+69b1,U+69e0,U+6b37,U+6b9b,U+6d7c,U+6ed7,U+6f36,U+6f72,U+6f8c,U+7035,U+7039,U+7173,U+7178,U+7228,U+728f,U+72b4,U+72ef,U+72f4,U+7331,U+7481,U+74e0,U+7540,U+75c3,U+75e6,U+763c,U+764d,U+76cd,U+7704,U+7743,U+7780,U+7847,U+786a,U+78b9,U+7962,U+7a02,U+7aac,U+7ab3,U+7b0a,U+7b4c,U+7b7b,U+7bfc,U+7c0f,U+7c16,U+7c40,U+7ca2,U+7cc7,U+7cf8,U+7d77,U+7e3b,U+7ea1,U+7ea9,U+7ef2,U+7f02,U+7f07,U+7f0c,U+7f23,U+7f2f,U+7fbc,U+8016,U+8020,U+812c,U+8136,U+8182,U+822f,U+8233,U+825f,U+8268,U+8284,U+8288,U+8291,U+8308,U+8311,U+835b,U+836d,U+83dd,U+8406,U+840f,U+845c,U+84b4,U+84e3,U+850c,U+855e,U+863c,U+86ba,U+86c4,U+86de,U+86f1,U+873e,U+87bd,U+87db,U+880a,U+883c,U+887f,U+88f0,U+890a,U+892b,U+895e,U+89ef,U+8a48,U+8bdc,U+8c18,U+8c33,U+8c94,U+8db1,U+8dcf,U+8dd6,U+8de3,U+8e6f,U+8e90,U+8f7a,U+8fb6,U+902d,U+90be,U+91af,U+936a,U+948b,U+94d8,U+9513,U+953a,U+956c,U+963c,U+9654,U+966c,U+9688,U+97b4,U+996b,U+9a75,U+9a7a,U+9aba,U+9aed,U+9b08,U+9b43,U+9c8e,U+9c94,U+9c9a,U+9e2b,U+9e36,U+9e4b,U+9e4e,U+9e55,U+9e63,U+9e68-9e69,U+9ebd,U+9ec9,U+9f0d,U+9f37,U+9f51"}},{uri:aD,descriptors:{unicodeRange:"U+50a7,U+5240,U+5261,U+52ac,U+531a,U+5363,U+5432,U+5452,U+5456,U+5472,U+5478,U+553f,U+5575,U+5581,U+55cc,U+55fe,U+5601,U+572e,U+57d2,U+57ef,U+581e,U+5924,U+5981,U+5997,U+59a3,U+5aaa,U+5ab8,U+5b34,U+5d5d,U+5def,U+5e11,U+5e91,U+5ed1,U+5ef4,U+5f40,U+600d,U+6019,U+601b,U+605a,U+6092,U+60ab,U+6217,U+623d,U+6369,U+65d2,U+6661,U+670a,U+6753,U+67a7,U+6855,U+68f9,U+6939,U+696e,U+6980,U+6a7c,U+6aab,U+6b82,U+6bf3,U+6bf9,U+6c05,U+6c19-6c1a,U+6ca9,U+6cf6,U+6d1a,U+6dab,U+6f74,U+7085,U+7198,U+71b5,U+7256,U+725d,U+727e,U+72fa,U+7322,U+738e,U+73e5,U+750f,U+755a,U+7594,U+75b3,U+760c,U+7615,U+7630,U+763f,U+77ec,U+7817,U+78a1,U+78d9,U+7905,U+7b2a,U+7b2e,U+7b62,U+7b85,U+7bcc,U+7bea,U+7c26,U+7c74,U+7c9c-7c9d,U+7e47,U+7e9b,U+7e9f,U+7ee0,U+7ee8,U+7ef1,U+7f01,U+7f11,U+7f17,U+7f36,U+7f7e,U+7fee,U+802a,U+80cd,U+8112,U+8169,U+8234,U+8279,U+8298,U+82ca,U+82d8,U+82e1,U+83c0,U+83d4,U+83df,U+8401,U+8451,U+845a,U+8476,U+8478,U+84ba,U+84bd,U+84e0,U+851f,U+8548,U+8556,U+8585,U+868d,U+86e9,U+86f4,U+86f8,U+8765,U+8785,U+87ab,U+87ee,U+8832,U+8872,U+88b7,U+88e2-88e3,U+89da,U+8bce,U+8bd3,U+8bd6,U+8bf9,U+8c16,U+8c73,U+8d5c,U+8dde,U+8f6d,U+8f94,U+8fe8,U+9011,U+915e,U+9185,U+918c,U+94ab,U+94d1,U+94f3,U+9515,U+951d,U+9558,U+9567,U+96ce,U+96e9,U+9785,U+9878,U+987c,U+9883,U+98d1,U+9954,U+9963,U+9a93,U+9ac1,U+9acc,U+9b1f,U+9b49,U+9b4d,U+9b51,U+9ca7,U+9cae,U+9cce,U+9cd3,U+9e37,U+9e39,U+9e41,U+9e46,U+9f22,U+9f2f,U+9f39,U+9f85"}},{uri:iD,descriptors:{unicodeRange:"U+4e5c,U+4edf,U+4f25,U+4f32,U+4f5e,U+4f76,U+4faa,U+4fe6,U+5028,U+5048,U+5250,U+535f,U+538d,U+53c1,U+5412,U+5443,U+54d4,U+54dd,U+5541,U+5550,U+5577,U+55dd,U+55f3,U+560f,U+562c,U+5657-5658,U+5664,U+56af,U+575c,U+577c,U+57b2,U+57da,U+5800,U+5a62,U+5aeb,U+5c3b,U+5ca3,U+5d26,U+5d9d,U+5f01,U+5fb5,U+5fdd,U+5ff8,U+6029,U+6041,U+6079,U+60b1,U+6222,U+629f,U+6332,U+63bc,U+63e0,U+6485,U+65ab,U+65c3,U+65c6,U+668c,U+669d,U+66be,U+67fd,U+6800,U+68fc,U+690b,U+6924,U+6978,U+69a7,U+6a3e,U+6a50,U+6a5b,U+6a97,U+6b24,U+6b8d,U+6baa,U+6c10,U+6c54,U+6ceb,U+6d04,U+6d4d,U+6eb1,U+6ebd,U+7110,U+71b3,U+71f9,U+7230,U+728d,U+7292,U+72b8,U+72d2,U+7360,U+73a2,U+7511,U+75a0,U+75c8,U+779f,U+7826,U+7877,U+7a39,U+7aa8,U+7ae6,U+7b04,U+7b0f,U+7baa,U+7bac,U+7c1f,U+7ccd,U+7ecb,U+7ed4,U+7ed7,U+7efb,U+7f0d,U+7f5f,U+7faf,U+7fd5,U+7fe5,U+8027,U+80bc,U+80dd,U+80fc,U+8132,U+815a,U+8167,U+816d,U+81ca,U+8228,U+82a1,U+82a9,U+82ab,U+82cc,U+8351,U+8368,U+83b8,U+83d8,U+83ea,U+83f0,U+8497,U+84c1,U+858f,U+85ff,U+867b,U+86a8-86a9,U+870a,U+8722,U+876e,U+877c,U+87e5,U+8888,U+88df,U+8919,U+8bcc,U+8bdf,U+8be8,U+8bee,U+8c20,U+8c2f,U+8d36,U+8df8,U+8e05,U+8e2f,U+8f9a,U+9021,U+908b,U+90b4,U+90ba,U+90d0,U+90eb,U+90fe,U+91aa,U+933e,U+9486-9487,U+948d,U+9490,U+94ad,U+94bd,U+94d6,U+94d9,U+9507,U+9546,U+955e,U+956b,U+95e9,U+9604,U+960b,U+9612,U+9615,U+9617,U+96b9,U+989a-989b,U+989e,U+9a78,U+9a7d,U+9aa0,U+9aa2,U+9ac2,U+9b23,U+9b3b,U+9c82,U+9cca,U+9cd9,U+9e28,U+9e5a,U+9e5e,U+9e6c,U+9efe,U+9f0b"}},{uri:rD,descriptors:{unicodeRange:"U+4e47,U+4e8d,U+4f65,U+4f89,U+50ee,U+520e,U+5416,U+5454,U+54bb,U+54c2,U+54d3,U+54de,U+5591,U+55e5,U+560c,U+566b,U+5769,U+578c,U+5793,U+57e4,U+5889,U+593c,U+59ab,U+5ad4,U+5ad8,U+5af1,U+5b53,U+5ba5,U+5c59,U+5c63,U+5d5b,U+5e0f,U+5e14,U+5edb,U+5fbc,U+6004,U+60ad,U+610e,U+61b7,U+624c,U+634c,U+647a,U+64ba,U+65f0,U+6600,U+66f7,U+67e2,U+67f0,U+680c,U+686b,U+6874,U+691f,U+6989,U+6a17,U+6b81,U+6b84,U+6c06-6c07,U+6c3d,U+6d07,U+6d27,U+6d2b,U+6d91,U+6e6b,U+6e8f,U+6fde,U+70bb,U+723b,U+726e,U+72b0,U+72ce,U+72f2,U+7301,U+731e,U+737e,U+7477,U+748e,U+74ff,U+7633,U+7654,U+771a,U+7726,U+7765,U+7768,U+781c,U+7829,U+78d4,U+7913,U+7957,U+79d5,U+79eb,U+7a70,U+7a86,U+7b25,U+7b38,U+7b47,U+7b72,U+7ba6-7ba7,U+7dae,U+7ee1,U+7efe,U+7f26,U+7f31,U+7f35,U+801c,U+8043,U+809f,U+80ab,U+80d7,U+8118,U+8188,U+81cc,U+823e,U+8244,U+824f,U+82b4,U+82c1,U+82e4,U+82f4,U+8306,U+833a,U+835c,U+839c,U+83b3,U+83bc,U+846d,U+867a,U+868b,U+8734,U+87ca,U+886e,U+887e,U+88a2,U+88c9,U+8921,U+8bb5,U+8bf3,U+8c04,U+8c17,U+8c1d,U+8c25,U+8c36,U+8c55,U+8c78,U+8d3d,U+8d40,U+8d59,U+8d67,U+8d91,U+8dbf,U+8deb-8dec,U+8dfd,U+8e14,U+8e41,U+8f8e,U+900b,U+9044,U+9062,U+90cf,U+9123,U+9146,U+9162,U+9172,U+918d,U+9190,U+92c8,U+93ca,U+948c,U+94aa,U+94b2,U+94c8,U+94ca,U+94d5,U+94df,U+94e9-94ea,U+94f7,U+94fc-94fd,U+951b,U+954f,U+9554,U+9559,U+9566,U+9571-9572,U+95f1,U+9608,U+960f,U+97af,U+988f,U+98d5,U+992e,U+9955,U+9ab0,U+9b32,U+9c90,U+9c9e,U+9ca5,U+9ca9,U+9cad,U+9cb1,U+9cc3,U+9e47,U+9ee7,U+9f87"}},{uri:sD,descriptors:{unicodeRange:"U+4e93,U+4ec4,U+4ef5,U+4f27,U+4f7b,U+4fe3,U+5080,U+5121,U+51eb,U+5208,U+52f0,U+53f5,U+5453,U+5466,U+54a6,U+54bf,U+54d0,U+5533,U+5549,U+5556,U+556d,U+558f,U+55f2,U+55f5,U+5627,U+567b,U+56d4,U+571c,U+5739,U+57b4,U+5807,U+58c5,U+59a4,U+59af,U+59d8,U+5a09,U+5a0c,U+5a4a,U+5ad2,U+5b6c,U+5ca2,U+5cac,U+5d03,U+5d6c,U+5db7,U+5ebe,U+5f2d,U+5fea,U+6042,U+6120,U+6175,U+6221,U+623e,U+6339,U+638a,U+643d,U+64b8,U+64e2,U+66e9,U+67b3,U+67c1,U+67d2,U+6832,U+6877,U+68f0,U+6934,U+6966,U+6987,U+6998,U+69c1,U+69ce,U+6a3d,U+6a84,U+6aa9,U+6b87,U+6bd6,U+6c16,U+6c18,U+6cd4,U+6cee,U+6de0,U+6e0c,U+6ecf,U+6f4b,U+70b7,U+7168,U+72d9,U+7352,U+73b3,U+73d0,U+7441,U+74d2,U+75a5,U+75e7-75e8,U+7610,U+7619,U+765e,U+772d,U+7812,U+782c,U+784c,U+7850,U+7856,U+789b,U+78f4,U+7a51,U+7b15,U+7b1e,U+7b24,U+7b5a,U+7bb8,U+7bc1,U+7bd9,U+7ed0,U+7ee6,U+7efa,U+7f1b,U+7f1f,U+7f22,U+7f45,U+7f71,U+7fa7,U+7fbf,U+7ff3,U+8052,U+80b1,U+80db,U+80f4,U+81bb,U+81ec,U+8202,U+8210,U+8249,U+828a,U+828e,U+82e3,U+8315,U+8369,U+8378,U+83a8,U+83aa,U+83b4,U+83e1,U+84fc,U+8538,U+853b,U+859c,U+85ae,U+86b4,U+86c9,U+86cf,U+8725,U+879f,U+87b3,U+887d,U+88fe,U+8a8a,U+8ba7,U+8c07,U+8c14,U+8c30,U+8c47,U+8db5,U+8dd7,U+8e1f,U+8e69,U+8e70,U+8e85,U+8f78,U+8f87,U+8f8b,U+8f8f,U+90c4,U+9143,U+917d,U+948f,U+94cd,U+94d2,U+94ef,U+954a,U+9609-960a,U+96d2,U+9708,U+9765,U+97ea,U+9880,U+98a7,U+996c,U+9980,U+9991,U+9a88,U+9ab6,U+9afb,U+9b47,U+9c87,U+9c9b,U+9cb5,U+9cc7,U+9e2c,U+9e42,U+9e58,U+9ecd,U+9ecf,U+9f8a,U+9f8c"}},{uri:lD,descriptors:{unicodeRange:"U+4ebb,U+4edd,U+4fa9,U+502c,U+50a5,U+51c7,U+51fc,U+523d,U+5241,U+530f,U+5464,U+549d,U+54a3,U+5514,U+5527,U+555c,U+556e,U+5576,U+55b1,U+55b9,U+55eb,U+5624,U+564c,U+5671,U+5685,U+568f,U+56d7,U+56e1,U+57a1,U+57d9,U+5942,U+5a67,U+5c50,U+5c7a,U+5c98,U+5d06,U+5d27,U+5d6f,U+5df3,U+5dfd,U+5e19,U+5ea0,U+5eb9,U+5eea,U+5ffe,U+600f,U+606b,U+6215,U+622c,U+6266,U+62bb,U+62bf,U+6308,U+6387,U+63b8,U+63c4,U+63c6,U+63f6,U+6441,U+6555,U+659b,U+6677,U+66a7,U+6775,U+678b,U+679e,U+6840,U+6849,U+6860,U+68c2,U+6910,U+6a28,U+6a2f,U+6a79,U+6b92-6b93,U+6bc2,U+6bfd,U+6c29,U+6c32,U+6c86,U+6cc5,U+6d0c,U+6d60,U+6da0,U+6ddd,U+6e86,U+6ed3,U+6edf,U+6fb9,U+6fd1,U+6fef,U+7023,U+7080,U+70ca,U+712f,U+7145,U+7284,U+732c,U+73c8,U+73d9,U+740a,U+7457,U+7596,U+759d,U+75a3,U+75d8,U+75e3-75e4,U+75ff,U+7622,U+7688,U+76b4,U+76e5,U+7818,U+7887,U+789a,U+78b2,U+7b08,U+7b33,U+7c2a,U+7ccc,U+7ea8,U+7ec0,U+7fe6,U+8012,U+8084,U+8093,U+80e4,U+80ef,U+8297,U+82a8,U+82be,U+8331,U+8366,U+83c5,U+83fd,U+8473,U+84a1,U+84ca,U+84d1,U+857b,U+85c1,U+85d3,U+8605,U+8662,U+86aa,U+86b1,U+86d4,U+86ed,U+86f3,U+8709,U+8748,U+874c,U+8763,U+89c7,U+89de,U+89e5,U+8a3e,U+8ba6,U+8c00,U+8c21,U+8c49,U+8c7a,U+8d30,U+8df9,U+8e51,U+8e59,U+8f6b,U+8f73,U+8ff3,U+9016,U+9026,U+902f,U+9099,U+909b,U+90c7,U+914a,U+91ae,U+91ba,U+9495,U+94a3,U+94af,U+94ba,U+94bf,U+94cc,U+94e1,U+94f0,U+9531,U+955d,U+95f3,U+9697,U+96bc,U+975b,U+977c,U+98a2,U+998a,U+9994-9995,U+9a9b,U+9ab7,U+9ac5,U+9c91,U+9ccf,U+9cd5,U+9e29,U+9edc,U+9edf,U+9f83,U+9f88-9f89"}},{uri:oD,descriptors:{unicodeRange:"U+4ee8,U+4f22,U+4f43,U+4f57,U+4f5d,U+4f6f,U+4ff8,U+502d,U+507b,U+5345,U+53df,U+53fb,U+544b,U+5482,U+54a7,U+54cc,U+550f,U+5544,U+5555,U+5594,U+55e8,U+55ec,U+55ef,U+564e,U+56f9,U+5704,U+576d,U+5785,U+57ad,U+5914,U+5958,U+599e,U+59aa,U+59be,U+5a06,U+5abe,U+5ae1,U+5b40,U+5bee,U+5cbf,U+5cc4,U+5ccb,U+5d47,U+603f,U+6078,U+607d,U+607f,U+608c,U+609a,U+60fa,U+61ff,U+621b,U+622e,U+626a,U+6371,U+63ae,U+63cd,U+63d6,U+6410,U+6414,U+6421,U+6448,U+64d8,U+6710,U+6748,U+6772,U+680e,U+6954,U+69ab,U+6c68,U+6c8f,U+6ca4,U+6d2e,U+6e4e,U+6e98,U+6fe0,U+7094,U+70e9,U+7116,U+7119,U+723f,U+73c9,U+74e4,U+753e,U+7548,U+75bd,U+75cd,U+7618,U+7634,U+76c5,U+76f1,U+7708,U+7719,U+777e,U+7791,U+77b3,U+7823,U+7827,U+7830,U+7889,U+7893,U+7949,U+795c,U+79e3,U+7a14,U+7a88,U+7a95,U+7aa0,U+7afd,U+7b90,U+7bd1,U+7bfe,U+7da6,U+7ec2,U+7eef,U+7f03-7f04,U+7f08,U+7f58,U+7f61,U+7f9f,U+8174,U+8200,U+828d,U+82c4,U+82d5,U+82dc,U+82f7,U+832d,U+835a,U+840b,U+8438,U+852b,U+869d,U+86ac,U+86d0,U+86f0,U+8782,U+87a8,U+87d1-87d2,U+87e0,U+8839,U+8913,U+891b,U+8934,U+8941,U+89ca,U+89ce,U+8a07,U+8ba3,U+8bc5,U+8bcb,U+8bdb,U+8c11,U+8c15,U+8c29,U+8c32,U+8dc4,U+8dce,U+8ddb,U+8dfa,U+8e09,U+8e1d,U+8e39,U+8e42,U+8e49,U+8e4b,U+8e8f,U+8f71-8f72,U+9004,U+9036,U+9097,U+90dc,U+90e2,U+90e6,U+90ef,U+9104,U+919a,U+91b4,U+938f,U+9497,U+950f,U+9557,U+9562-9563,U+9573,U+9606,U+9649,U+972d,U+973e,U+97a3,U+97eb,U+988c,U+9894,U+98a6,U+9974,U+9977,U+997d,U+9a90,U+9a9d,U+9aef,U+9ca2,U+9ccd,U+9cdf,U+9e20,U+9e4c,U+9e6b,U+9f3e"}},{uri:cD,descriptors:{unicodeRange:"U+4ede,U+4ee1,U+4eeb,U+4fda,U+4ffe,U+5025,U+506c,U+50f3,U+5106,U+520d,U+525c,U+52ad,U+530d,U+5310,U+539d,U+53a9,U+53fc,U+5421,U+5477,U+54e7,U+551b,U+5530,U+557e,U+5599,U+55c4,U+55d1,U+55d4,U+55df,U+55e4,U+55ea,U+5623,U+562d,U+5654,U+56eb,U+56f5,U+57a7,U+57d5,U+57dd,U+584d,U+5880,U+58ec,U+59dd,U+5a32,U+5a55,U+5a75,U+5b51,U+5b71,U+5b73,U+5cd2,U+5ce4,U+5e5b,U+5e96,U+5fd2,U+607b,U+61d1,U+634b,U+636d,U+63b3,U+63ff,U+64c0,U+661d,U+6657,U+66dc,U+67a5,U+6841,U+6867,U+6901,U+699b,U+6a47,U+6b46,U+6c21,U+6c24,U+6c35,U+6c4a,U+6c94,U+6ca3,U+6d39,U+6d63,U+6d6f,U+6d94,U+705e,U+71e7,U+726f,U+72cd,U+72de,U+72f0,U+7325,U+7350,U+7391,U+741a,U+757f,U+7583,U+75b1,U+75b4,U+75b8,U+75c2,U+75f1,U+766f,U+7699,U+7751,U+789c,U+7a17,U+7be6,U+7cb2,U+7ea3,U+7eb0,U+7ebe,U+7eeb,U+7f25,U+7f2c,U+7fb8,U+8026,U+8037,U+8153,U+8171,U+8191,U+8214,U+821b,U+8222,U+826e,U+82eb,U+830c,U+8314,U+8334,U+83d6,U+8418,U+843c,U+84ff,U+8564,U+8572,U+8616,U+866c,U+8693,U+86a3,U+86a7,U+86af,U+86b6,U+86c6,U+86ca,U+8708,U+870d,U+8759,U+8760,U+87af,U+87c6,U+8869,U+88c6,U+89d0,U+8b07,U+8baa-8bab,U+8bc2,U+8be4,U+8bf0,U+8c2a,U+8c62,U+8c89,U+8d49,U+8d6d,U+8d84,U+8d94,U+8db8,U+8dc6,U+8e2e,U+8e3d,U+8e47,U+8e7f,U+9005,U+9051,U+907d,U+9082,U+9088,U+90b0,U+90d3,U+9150,U+949c,U+94a4,U+94b9,U+94cb,U+94e0,U+9509,U+9512,U+951f,U+9534,U+9552-9553,U+965f,U+96b0,U+9791,U+9889,U+9990,U+9a9c,U+9aa7,U+9c88,U+9cb2-9cb3,U+9cb6-9cb7,U+9cc5,U+9cdc,U+9e22,U+9e2a,U+9e57,U+9e67,U+9e73,U+9e82,U+9eb8,U+9ee0,U+9f9b"}},{uri:dD,descriptors:{unicodeRange:"U+4eb5,U+4f09,U+4f5a,U+4f8f,U+4fce,U+4fdf,U+4fea,U+4ff3,U+500c,U+500f,U+504e,U+5088,U+52be,U+5420,U+5457,U+5499,U+549b,U+54c6,U+54d2,U+558b,U+559f,U+55bd,U+55d6,U+565c,U+567c,U+568e,U+5768,U+577b,U+57a9,U+57ed,U+59f9,U+5a11,U+5a40,U+5ae6,U+5b6a,U+5b93,U+5bb8,U+5c15,U+5c99,U+5c9c,U+5cc1,U+5d2e,U+5d4b,U+5d99,U+5e54,U+5e61,U+5fcf-5fd1,U+6002,U+6006,U+6014,U+60af,U+60c6,U+60da,U+60f4,U+621f,U+62c8,U+631b,U+631e,U+63e9,U+64b5,U+655d,U+6619,U+6635,U+6641,U+67ad,U+67b0,U+67b7,U+67e9,U+684e,U+688f,U+695d,U+696b,U+69b7,U+6a58,U+6c26,U+6d35,U+6d43,U+6d9e,U+6dd9,U+6dec,U+6e11,U+6e6e,U+6e9f,U+6ec2,U+6ee2,U+6ef9,U+6f09,U+6f66,U+6f8d,U+6fc2,U+6fc9,U+729f,U+72c8,U+73de,U+7430,U+7566,U+7579,U+75c9,U+75e2,U+75fc,U+762a,U+7638,U+7678,U+76c2,U+76f9,U+778c,U+77cd,U+77dc,U+7800,U+781d,U+782d,U+783b-783c,U+78a3,U+78ec,U+7980,U+7a23,U+7b95,U+7bdd,U+7c0c,U+7c41,U+7c91,U+7cb3,U+7cc5,U+7ecc,U+7f19,U+7fca,U+8006,U+8069,U+807f,U+80bd,U+80ed,U+814b,U+8198,U+82cb,U+82d2,U+834f,U+8360,U+847a,U+84d6,U+84e5,U+8537,U+85d0,U+8671,U+86a4,U+86ce,U+86f9,U+8703,U+8707,U+8737,U+873b,U+8815,U+8936,U+8bc3,U+8bcf,U+8bd2,U+8bd8,U+8be9,U+8c0c,U+8c0f,U+8c4c,U+8d45,U+8d5d,U+8d73,U+8e31,U+8e6d,U+8e76,U+8fe4,U+9041,U+90d7,U+9169,U+92ae,U+94a1,U+94c4,U+94c9,U+94db,U+94e7,U+9503,U+9506,U+9517,U+9528,U+9537,U+9542,U+9549,U+95fe,U+9616,U+961a,U+96c9,U+96f3,U+9701,U+970e,U+9739,U+9753,U+9798,U+98d2-98d3,U+98d9-98da,U+9968,U+996f,U+9984,U+9997,U+9acb,U+9b03,U+9c85,U+9ca8,U+9cab,U+9e49,U+9e51,U+9e66,U+9f10"}},{uri:uD,descriptors:{unicodeRange:"U+4e15,U+4e1e,U+4e2b,U+4eb3,U+4ec9,U+4f0e,U+4f64,U+501c,U+50a9,U+510b,U+51a2,U+51bc,U+527d,U+52d0,U+53fd,U+5429,U+542e,U+5486,U+54af,U+5506,U+5511,U+5522,U+552c,U+556c,U+55b3,U+55d2,U+55e6,U+55fd,U+561f,U+5639,U+5659,U+5662,U+5693,U+572a,U+5892,U+598a,U+5992,U+59a9,U+5a20,U+5ae3,U+5b17,U+5b7d,U+5d34,U+5d3d,U+5d4a,U+5d82,U+5e1a-5e1b,U+5ea5,U+5f0b,U+5f77,U+5fd6,U+5fff,U+6026,U+6035,U+6063,U+60b4,U+60bb,U+60ee,U+612b,U+6194,U+61ca,U+61e6,U+61f5,U+620a,U+6248,U+62a1,U+62d7,U+6376,U+637b,U+652b,U+65bc,U+65cc,U+65ce,U+65d6,U+664c,U+665f,U+6666,U+6684,U+66b9,U+6773,U+6777,U+6787,U+67de,U+6845,U+693d,U+6994,U+6a35,U+6d54,U+6d5c,U+6d8e,U+6dd6,U+6eb4,U+6f2a,U+6f78,U+704f,U+70ec,U+7118,U+714a,U+7172,U+71b9,U+724d,U+728a,U+7337,U+733e,U+7396,U+73b7,U+73cf,U+7428,U+742c,U+742e,U+74ee,U+74f4,U+7525,U+753a,U+7572,U+75d4,U+765c,U+768e,U+7762,U+777d,U+77fd,U+7825,U+7837,U+78b4,U+795f,U+79ed,U+7a1e,U+7b06,U+7b20,U+7ba9,U+7bab,U+7c7c,U+7cbd,U+7cdc,U+7ec9,U+7ef6,U+7f30,U+7f42,U+7f44,U+7f54,U+7f94,U+8004,U+800b,U+8019,U+809b,U+80ae,U+80c4,U+80f1,U+8146,U+816e,U+817c,U+81c0,U+81fc,U+81fe,U+822b,U+830f,U+832f,U+8340,U+8365,U+8385,U+8392,U+83a0,U+8424,U+84af,U+869c,U+8713,U+8717-8718,U+87c0,U+87cb,U+87fe,U+8821,U+8902,U+89d1,U+8bb9,U+8c12,U+8d32,U+8d53,U+8df7,U+8e7c,U+8f7c,U+8f95,U+8fab,U+9052,U+905b,U+9095,U+909d,U+90c5,U+911e,U+9122,U+916a,U+919b,U+948e,U+9492,U+949a,U+94b5,U+94bc,U+94c6,U+94f1,U+9502,U+9511,U+9536,U+956f-9570,U+9602,U+9621,U+9631,U+998b,U+99a5,U+9a81,U+9a9e,U+9ebe,U+9f8b"}},{uri:fD,descriptors:{unicodeRange:"U+4f2b,U+4f3d,U+4fac,U+5043,U+5055,U+5140,U+5156,U+51cb,U+5243,U+531d,U+536f,U+53a5,U+53ae,U+53f1,U+541d,U+5431,U+547b,U+5492,U+5494,U+54a4,U+54aa,U+54ce,U+54fd,U+5509,U+5520,U+553e,U+557b,U+55c5,U+55e1,U+55f7,U+5608,U+5636,U+563b,U+5773,U+57a0,U+5811,U+587e,U+58d5,U+59e3,U+5a29,U+5a6a,U+5a76,U+5a7a,U+5ac9,U+5b62,U+5b95,U+5c49,U+5c8c,U+5cab,U+5cb7,U+5d02,U+5d58,U+5e44,U+5e7a,U+5eff,U+5f29,U+5f89,U+5f9c,U+5fa8,U+6005,U+6043,U+60b8,U+60d8,U+60ec,U+60f0,U+6115,U+618e,U+630e,U+637a,U+6390,U+63ac,U+63b0,U+64de,U+6525,U+6538,U+65ee-65ef,U+6631,U+6636,U+6654,U+677c,U+67b8,U+67d8,U+683e,U+6886,U+68b5,U+692d,U+6963,U+6979,U+6988,U+6b59,U+6b9a,U+6c69,U+6c74,U+6cae,U+6ce0,U+6cef,U+6d95,U+6dc5,U+6dde,U+6de6,U+6dfc,U+6ea7,U+6f15,U+6f29,U+7096,U+70c3,U+7131,U+715c,U+7166,U+7266,U+7317,U+731d,U+7329,U+73e9,U+7425,U+7455,U+7490,U+74ef,U+7519,U+75b5,U+75b9,U+75de,U+7656,U+7663,U+7691,U+7729,U+77fe,U+783e,U+787c,U+795a,U+7a79,U+7abf,U+7b3a,U+7b4f,U+7b60,U+7b75,U+7b8d,U+7bb4,U+7bd3,U+7be1,U+7cbc,U+7edb,U+7f1c,U+7f8c,U+7fb2,U+7fb9,U+7fce,U+7ff1,U+810d,U+81c6,U+82a5,U+82aa,U+82de,U+8317,U+8343,U+835e,U+8364,U+836a,U+853a,U+8543,U+854a,U+8559,U+8568,U+85b0,U+85b9,U+864f,U+86e4,U+8715,U+8845,U+8884,U+88e8,U+88f1,U+8983,U+8be1,U+8c1f,U+8c27,U+8c5a,U+8c82,U+8d58,U+8dbe,U+8f98,U+9035,U+9074,U+90a1,U+9149,U+9157,U+93d6,U+949d,U+94c2,U+94e3-94e4,U+95eb,U+95f0,U+9611,U+9619,U+9642,U+968d,U+9706,U+970f,U+97ed,U+988a,U+9893,U+98e8,U+9a77,U+9a87,U+9aa1,U+9abc,U+9cdd,U+9e2f,U+9e33,U+9e44,U+9e5c,U+9e9d,U+9edd"}},{uri:hD,descriptors:{unicodeRange:"U+4f58,U+4f6c,U+4f70,U+4fd0,U+5014,U+51bd,U+524c,U+5315,U+5323,U+535e,U+540f,U+542d,U+545b,U+548e,U+549a,U+54ab,U+54fc,U+5567,U+556a,U+5600,U+5618,U+563f,U+5669,U+56f1,U+56ff,U+573b,U+574d,U+579b,U+57b8,U+57c2,U+586c,U+58f9,U+595a,U+598d,U+5993,U+5996,U+59d7,U+5b7a,U+5ba6,U+5c4e,U+5c96,U+5ce5,U+5eb6,U+5f08,U+5f99,U+602f,U+6059,U+606c,U+607a,U+60ed,U+61a9,U+620c,U+6249,U+62a8,U+62c4,U+62ed,U+62fd,U+6342,U+6345,U+6396,U+63a3,U+6402,U+6413,U+642a,U+6487,U+64a9,U+64ac,U+64ae,U+64b7,U+659f,U+65a1,U+667e,U+66f3,U+67e0,U+69db,U+69df,U+6aac,U+6b86,U+6c50,U+6c5e,U+6c76,U+6c85,U+6c8c,U+6cde,U+6d19,U+6d52,U+6da7,U+6db8,U+6e1a,U+6e25,U+6e4d,U+6e5f,U+6ec1,U+6f31,U+6f7a,U+6fa7,U+6fe1,U+701b,U+70ab,U+70f7,U+717d,U+71a8,U+7252,U+72c4,U+72e1,U+7315,U+736d,U+73ae,U+73c0,U+73c2,U+740f,U+75a4,U+7600-7601,U+768b,U+76bf,U+76d4,U+7728,U+772f,U+776c,U+77a0,U+77b0,U+77f8,U+783a,U+78d0,U+78fa,U+7977,U+7a37,U+7a92,U+7afa,U+7b71,U+7b94,U+7cef,U+7f28,U+7fe1,U+808b,U+80e5,U+80eb,U+8110,U+8113,U+812f,U+814c,U+81c3,U+8235,U+82d4,U+8309,U+83c1,U+8431,U+8469,U+84bf,U+84d3,U+84df,U+84e6,U+8511,U+8638,U+86c0,U+86db,U+86fe,U+8757,U+8822,U+8882,U+8885,U+8892,U+88f3,U+892a,U+8ba5,U+8bd9,U+8be0,U+8be7,U+8bfd,U+8c1a,U+8d4a,U+8d4e,U+8d66,U+8dda,U+8e0c,U+8e52,U+8e74,U+8e87,U+8f76,U+8fc2,U+8fe6,U+900d,U+9068,U+90ac,U+90b3,U+90b8,U+90e7,U+9119,U+9131,U+915a,U+916e,U+94b4,U+94d0,U+94e2,U+94ec,U+94ff,U+9522,U+9535,U+9556,U+965b,U+96f9,U+9774,U+9981,U+998d,U+998f,U+9a6e,U+9a7f,U+9a8a,U+9b13,U+9c9f,U+9e3e,U+9e43,U+9e6d,U+9e8b,U+9e92,U+9edb,U+9eef"}},{uri:pD,descriptors:{unicodeRange:"U+4e10,U+4e56,U+4e98,U+4ec3,U+4f3a,U+4f5f,U+4f88,U+4f97,U+4fa5,U+4fe8,U+504c,U+5197,U+52fa,U+5364,U+53e8,U+5406,U+543c,U+545c,U+5471,U+5480,U+5495,U+54b3,U+54df,U+54e6,U+54ee,U+557c,U+5583,U+55dc,U+55e3,U+566c,U+592f,U+5944,U+5983,U+59ca,U+59e5,U+5a13,U+5a7f,U+5b09,U+5bd0,U+5e4c,U+5eb5,U+5f1b,U+5f3c,U+608d,U+60cb,U+61a7,U+61ac,U+61cb,U+6233,U+62a0,U+62e7,U+62ee,U+62f4,U+62f7,U+634e,U+6382,U+63c9,U+63ea,U+6400,U+645e,U+6482,U+6556,U+6593,U+6615,U+664f,U+66e6,U+672d,U+675e,U+67da,U+6805,U+6808,U+6868,U+68a2,U+695e,U+69ad,U+6a80,U+6a90,U+6b83,U+6be1,U+6c30,U+6cad,U+6cb1,U+6cf1,U+6d31,U+6d93,U+6dae,U+6dbf,U+6dc6-6dc7,U+6e0d,U+6e32,U+6e3a,U+6e85,U+6eba,U+6f3e,U+6f5e,U+6f7c,U+6fee,U+71ee,U+722a,U+72b7,U+72e9,U+73ba,U+73d1,U+7409,U+7435-7436,U+7459-745a,U+747e,U+7487,U+74e2,U+7504,U+752c-752d,U+7599,U+759f,U+75a1,U+75ca,U+75f0,U+761f,U+7629,U+777f,U+7785,U+77a5,U+77bf,U+78d5,U+7934,U+7940,U+79a7,U+7b19,U+7c38,U+7c95,U+7cb1,U+7ce0,U+7eca,U+7ef7,U+7f2b,U+7f81,U+7fcc,U+8046,U+8148,U+8165,U+819b,U+81ba,U+828b,U+82ae,U+82b7,U+82d3,U+8301,U+830e,U+831c,U+8338,U+837c,U+8393,U+8398,U+83ba,U+83e0,U+83e9,U+853c,U+8654,U+86df,U+8712,U+873f,U+874e,U+8783,U+8859,U+88a4,U+8925,U+8bb7,U+8bff,U+8c19,U+8c1b,U+8c24,U+8c2c,U+8d61,U+8db4,U+8e6c,U+8f8a,U+8fe5,U+8ff8,U+901e,U+90f4,U+912f,U+9163,U+9170,U+91dc,U+949b,U+94a8,U+94b3,U+94c0,U+94e8,U+9525,U+9530,U+9539,U+954c-954d,U+9550,U+955b,U+962a,U+9685,U+96cc,U+9776,U+988d,U+9975,U+9985,U+9a6f,U+9aa5,U+9ab8,U+9c7f,U+9ca4,U+9cb8,U+9e25,U+9e35,U+9e4a"}},{uri:UD,descriptors:{unicodeRange:"U+4ea2,U+4ea5,U+4f36,U+4f84,U+4f8d,U+501a,U+5029,U+516e,U+51a5,U+51c4,U+51f8,U+5201,U+527f,U+5321,U+5352,U+5366,U+53e9,U+54c7,U+5632,U+5676,U+56b7,U+56bc,U+56da,U+56e4,U+5703,U+5729,U+5742,U+57a2-57a3,U+5815,U+58d1,U+5919,U+592d,U+5955,U+5a05,U+5a25,U+5a34,U+5b70,U+5b75,U+5bdd,U+5bf0,U+5c41,U+5c79,U+5c91,U+5c94,U+5ce6,U+5ced,U+5d69,U+5dc5,U+5e16,U+5e27,U+5f27,U+5f95,U+5ffb,U+6020,U+604d,U+6055,U+60e6,U+60eb,U+6123,U+618b,U+61a8,U+620d,U+62c7,U+62ce,U+62d9,U+631f,U+634d,U+6452,U+6479,U+64ce,U+64d2,U+655b,U+660a,U+6726,U+67c4,U+6809,U+6853,U+68e3,U+68f1,U+68fa,U+693f,U+6942,U+6995,U+69a8,U+69b4,U+6a71,U+6b89,U+6bcb,U+6bd3,U+6bd9,U+6c40,U+6cf8,U+6cfe,U+6d85,U+6da3,U+6daa,U+6e0e,U+6e43-6e44,U+6f88,U+7078,U+7099,U+70bd,U+70d9,U+70fd,U+7109,U+7184,U+7239,U+733f,U+73f2,U+748b,U+749c,U+749e,U+759a,U+75d2,U+75eb,U+7620,U+766b,U+7693,U+76cf,U+7738,U+773a,U+776b,U+778e,U+77aa,U+7852,U+78be,U+7948,U+795b,U+7960,U+796f,U+79ba,U+7a20,U+7a96,U+7aa5,U+7b03,U+7b28,U+7b50,U+7b77,U+7bc6,U+7bf1,U+7c27,U+7d0a,U+7ead,U+7ec5,U+7ee2,U+7ef0,U+7efd,U+7f0e,U+7f2e,U+7f79,U+7f9a,U+8098,U+80da,U+80e7,U+80f0,U+80f3,U+80fa,U+818a,U+81e7,U+8237-8238,U+8299,U+82b8,U+82ce,U+837b,U+83bd,U+83cf,U+8426,U+8475,U+85c9,U+85d5,U+85dc,U+85e9,U+871a,U+8747,U+8749,U+888d,U+8910,U+891a,U+8bb4,U+8be3,U+8bec,U+8bf2,U+8c06,U+8c0d,U+8d31,U+8d48,U+8de4,U+8e1e,U+8e4a,U+8e66,U+8f84,U+8f97,U+9083,U+90e1,U+9165,U+91c9,U+94b0,U+94f5,U+9504,U+9532,U+956d,U+95f5,U+95fa,U+9668,U+9698,U+96bd,U+9704,U+9773,U+9890,U+996a,U+997a,U+9a74,U+9a8b,U+9cc4,U+9ccc"}},{uri:mD,descriptors:{unicodeRange:"U+4ea8,U+4f1e,U+4f51,U+4f63,U+4f7c,U+4f83,U+4fa0,U+4fd1,U+4ffa,U+5018,U+5026,U+508d,U+50bb,U+50f5,U+50fb,U+5162,U+5319,U+5320,U+538c,U+5413,U+541f,U+5475,U+54bd,U+54d1,U+5589,U+5598,U+575f,U+57ae,U+57e0,U+5937,U+5974,U+5978,U+59ae,U+5a1f,U+5a49,U+5ab3,U+5b99,U+5b9b,U+5ba0,U+5be1,U+5be5,U+5c09,U+5c27,U+5de2,U+5e9a,U+5f26,U+5f8a,U+5f98,U+6021,U+606d,U+60bc,U+60d5,U+60e7,U+611a,U+614c,U+6254,U+626f,U+6292,U+6296,U+62b9,U+62e2,U+631a,U+631d,U+6320,U+6346,U+63ba,U+6467,U+64bc,U+658b,U+663c,U+6643,U+6652,U+6656,U+6687,U+66d9,U+66dd,U+66f0,U+673d,U+67ab,U+6816-6817,U+68a7,U+68ad,U+68cd,U+68e0,U+6986,U+69fd,U+6b47,U+6bd7,U+6c1f,U+6c2e-6c2f,U+6cbe,U+6de4,U+6e1d,U+6e83,U+6e9c,U+6ed4-6ed5,U+6f4d,U+70f9,U+7130,U+716e,U+718f,U+71ac,U+71e5,U+72fc,U+731c,U+7334,U+73ca,U+7422,U+7426,U+745f,U+7470,U+75af,U+75f4,U+762b,U+763e,U+7696,U+7737,U+7741,U+77a7,U+77bb,U+77ee,U+785d,U+788c,U+78ca,U+7901,U+796d,U+7985,U+79fd,U+7a3c,U+7a57,U+7a74,U+7b5b,U+7caa,U+7cb9,U+7cd5,U+7eac,U+7eb6,U+7ed1,U+7ee5,U+7f20,U+7f2a,U+7f38,U+7f69,U+7fa1,U+8018,U+8038,U+803f,U+804b,U+80a2,U+80be,U+80d6,U+817a,U+81fb,U+820c,U+82ad,U+82af,U+82bd,U+8327,U+8354,U+835f,U+8367,U+836b,U+840c,U+841d,U+8471,U+849c,U+84b2,U+84c9,U+8517,U+851a,U+8549,U+8681,U+8721,U+8776,U+88d9,U+88f9,U+89c5,U+8c1c,U+8c34,U+8d81,U+8d9f,U+8e0a,U+8e72,U+8eb2,U+8fed,U+901b,U+902e,U+906e,U+9091,U+90aa,U+90af,U+915d,U+9171,U+946b,U+9489,U+9499,U+94a5,U+9508,U+9524,U+952d,U+9551,U+9576,U+95f7,U+9600,U+96b6,U+96c0,U+9756,U+97f6,U+98a0,U+98a4,U+997f,U+9a73,U+9a86,U+9ad3,U+9e3d,U+9ed4"}},{uri:gD,descriptors:{unicodeRange:"U+4e4d,U+4e5e,U+4ec7,U+4ed5,U+50da,U+50e7,U+515c,U+51a4,U+51ff,U+5203,U+5254,U+5300,U+533e,U+5375,U+53ee,U+5435,U+543b,U+5455,U+548b,U+548f,U+54d7,U+54fa,U+5578,U+5587,U+55a7,U+560e,U+5760,U+576f,U+5777,U+5830,U+58a9,U+5962,U+59e8,U+5a07,U+5a23,U+5a3c,U+5b5a,U+5bb5,U+5bc5,U+5bde,U+5c7f,U+5cb1,U+5ce8,U+5cea,U+5d29,U+5d4c,U+5e18,U+5f57,U+5f5d,U+5f87,U+5ff1,U+6016,U+601c,U+6064,U+6177,U+61d2,U+625b,U+62e3,U+62f1,U+634f,U+63a0,U+6401,U+6405,U+6495,U+64c2,U+6512,U+6577,U+6590,U+65a7,U+65a9,U+65f7,U+6627,U+6655,U+6714,U+6795,U+67d1,U+67ff,U+68b3,U+68d5,U+68d8,U+6930,U+6960,U+6977,U+69bb,U+69d0,U+6a31,U+6b7c,U+6bb4,U+6c22,U+6c72,U+6c79,U+6c7e,U+6c81,U+6c93,U+6ca5,U+6cbc,U+6ce3,U+6cfb,U+6d3c,U+6da9,U+6df3,U+6e2d,U+6eaf,U+6ec7,U+6f13,U+6f33,U+6f62,U+6fa1,U+7011,U+707c,U+708a,U+70c1,U+70d8,U+70eb,U+711a,U+7194,U+7281,U+7316,U+7357,U+7384,U+7405,U+742a,U+745b,U+7574,U+7578,U+75ea,U+7682,U+7792,U+77d7,U+77e9,U+77eb,U+77f6,U+780c,U+78c5,U+7941,U+79e4,U+7a1a,U+7a9c,U+7ad6,U+7b5d,U+7bf7,U+7c07,U+7c3f,U+7c9f,U+7ca5,U+7cdf,U+7e82,U+7eab,U+7ece,U+7eda,U+7f09,U+7f15,U+7f9e,U+7fdf,U+7fe9,U+803b,U+803d,U+80aa,U+80b4,U+813e,U+8155,U+817b,U+819d,U+821c,U+82b9,U+82df,U+82ef,U+8304,U+83b9,U+8446,U+853d,U+85af,U+85fb,U+8650,U+865e,U+86d9,U+86ee,U+8700,U+8862,U+889c,U+88d4,U+88f8,U+895f,U+8a79,U+8bb3,U+8bb6,U+8bc0,U+8beb,U+8bf5,U+8c23,U+8c79,U+8d1e,U+8dcb,U+8e29,U+8e44,U+8e81,U+8eac,U+8eaf,U+8f8d,U+9050,U+90f8,U+914b,U+948a,U+94be,U+94ee,U+950c,U+9540,U+962e,U+9647,U+9661,U+9699,U+96cf,U+9716,U+9761,U+97a0,U+97e7,U+9a7c,U+9a8f,U+9ae6,U+9cd6,U+9e26"}},{uri:bD,descriptors:{unicodeRange:"U+4fa3,U+4fae,U+4fd8,U+4fef,U+50a3,U+5189,U+5195,U+51db,U+51f3,U+51f9,U+5220,U+5228,U+5288,U+52ff,U+532e,U+533f,U+5351,U+53db,U+53ed,U+5450,U+5484,U+5490,U+54c9,U+54e9,U+5501,U+5507,U+5543,U+55d3,U+56a3,U+575e,U+589f,U+5984,U+59ec,U+5a04,U+5a36,U+5a77,U+5a9a-5a9b,U+5ab2,U+5ac2,U+5ad6,U+5bc7,U+5c2c,U+5c34,U+5c51,U+5cd9,U+5d0e,U+5deb,U+5e3c,U+5e87,U+5ed3,U+5f13,U+5f64,U+5fe1,U+606a,U+6096,U+60df,U+60f6,U+60f9,U+6151,U+620e,U+6241,U+6252,U+6273,U+627c,U+6289,U+62c2,U+62cc,U+62ef,U+6361,U+6363,U+63b7,U+63e3,U+6518,U+66ae,U+6756,U+6789,U+6813,U+6829,U+6862,U+6866,U+6893,U+6897,U+690e,U+6984,U+69cc,U+6a1f,U+6a44,U+6a59,U+6ba1,U+6c13,U+6c90,U+6ca6,U+6cbd,U+6ccc,U+6cd3,U+6cd7,U+6d4a,U+6d4f,U+6d5a,U+6d9f,U+6da1,U+6dcc,U+6ea5,U+6ee4,U+6ee6,U+6f2f,U+6f8e,U+701a,U+7095,U+709c,U+70af,U+70db,U+70e8,U+714e,U+715e,U+71a0,U+71ce,U+7235,U+7280,U+72d0,U+72f8,U+73ab,U+7410,U+745c,U+7480,U+74a7-74a8,U+74e3,U+75ae,U+75f9,U+76b1,U+76ce,U+7736,U+77e2-77e3,U+781a,U+789f,U+797a,U+79be,U+79c3,U+79c6,U+79f8,U+7a8d,U+7a98,U+7aa6,U+7aff,U+7b1b,U+7cd9,U+7d6e,U+7ede,U+7eee,U+7f00,U+7f24,U+7f2d,U+7fd8,U+800d,U+8116,U+8151,U+81b3,U+8205,U+82c7,U+82db,U+832c,U+8335,U+8339,U+8386,U+846b,U+8587,U+8611,U+8682,U+868a,U+868c,U+8774,U+88d8,U+88f4,U+8912,U+8b6c,U+8bbd,U+8c0e,U+8c41,U+8d26,U+8d3b-8d3c,U+8d50,U+8dea,U+8e35,U+8f99,U+8fe2,U+8fe9,U+9017,U+914c,U+916f,U+9175-9176,U+918b,U+94a0,U+94ae,U+94ce,U+94f2,U+951a,U+952f,U+9541,U+9640,U+9672,U+968b,U+96cd,U+96ef,U+9713,U+97ec,U+9885,U+9992,U+9a6d,U+9a79,U+9a85,U+9cbb,U+9cd7,U+9cde,U+9e93,U+9f9f"}},{uri:vD,descriptors:{unicodeRange:"U+4e11,U+4ed7,U+4fcf,U+4fe9,U+4fed,U+50ac,U+50b2,U+5112,U+5180,U+5188,U+51f6,U+522e,U+5265,U+52cb,U+52df,U+5349,U+5367,U+5378,U+537f,U+5395,U+5398,U+53d4,U+543e,U+5440,U+5446,U+54b8,U+5565-5566,U+5580,U+55bb,U+56ca,U+572d,U+573e,U+574e,U+5782-5784,U+58f3,U+5938-5939,U+5948,U+594e,U+5a1c,U+5a74,U+5ae9,U+5b55,U+5b5c,U+5bb0,U+5bd3,U+5bf8,U+5c3f,U+5d14,U+5d2d,U+5df7,U+5dfe,U+5e05-5e06,U+5e1c,U+5e62,U+5e7b,U+5e7d,U+5ed6,U+5f2f,U+5f66,U+5f6c,U+5fa1,U+604b,U+609f,U+60a6,U+60e8,U+6101,U+6124,U+6127,U+6148,U+61be,U+6247,U+62d8,U+62da,U+633d,U+635e,U+6367,U+6380,U+638f,U+63a9,U+63fd,U+641c,U+64e6,U+655e,U+6572,U+6591,U+65a5,U+6691,U+6735,U+67a2-67a3,U+67ef,U+680b,U+6876,U+6905,U+6a0a,U+6a61,U+6b79,U+6bb7,U+6bbf,U+6c41,U+6c55,U+6c83,U+6c9b,U+6ca7,U+6cfc,U+6d46,U+6d51,U+6d74,U+6d9d,U+6daf,U+6dc0,U+6deb,U+6e17,U+6e24,U+6e89,U+6ea2,U+6ef4,U+6f6d,U+707f,U+70b3,U+70e4,U+70ef,U+710a,U+722c,U+725f,U+7261,U+72ee,U+72f1,U+730e,U+732b,U+7433,U+7538,U+75bc,U+7624,U+7709,U+7750,U+7779,U+7802,U+7898,U+78a7,U+78b1,U+78cb,U+78f7,U+7984,U+7a83,U+7aed,U+7b3c,U+7b4b,U+7c92,U+7c98,U+7ca4,U+7eb9,U+7ee3,U+7ef3,U+7ef5,U+7f05,U+7f55,U+7f62,U+7fc1,U+7fd4,U+7fe0,U+8042,U+806a,U+80a0,U+80a4,U+80c3,U+8102,U+8106,U+814a,U+8154,U+8247,U+8258,U+82cd,U+8328,U+832b,U+8389,U+83ca,U+845b,U+846c,U+84b8,U+8574,U+859b,U+8680,U+8695,U+86c7,U+8702,U+886c,U+8896,U+88b1,U+88e4,U+8bc8,U+8c10,U+8c26,U+8c28,U+8c2d,U+8d4c,U+8d63,U+8f67,U+8f74,U+8fc4,U+9006,U+9063,U+90a2,U+90b1,U+90c1,U+9177,U+9189,U+9493,U+949e,U+94fe,U+9610,U+961c,U+96a7,U+96fe,U+978d,U+97f5,U+9888,U+997c,U+9a84,U+9b3c,U+9b44-9b45,U+9b54,U+9e64,U+9f0e,U+9f9a"}},{uri:xD,descriptors:{unicodeRange:"U+4e19,U+4e38,U+4e53,U+4e7e,U+4e9f,U+4ec6,U+4f50,U+4fde,U+502a,U+5154,U+517d,U+51d1,U+51f0,U+5239,U+5256,U+52c9,U+52fe,U+5308,U+532a,U+535c,U+5384,U+53a2,U+53a8,U+53c9,U+53e0,U+5496,U+54ac,U+54c0,U+54c4,U+54e8,U+5561,U+5582,U+561b,U+5631,U+566a,U+5764,U+576a,U+5792,U+57ab,U+584c,U+5885,U+58f6,U+59a8,U+5acc,U+5bc2,U+5c38-5c39,U+5c60,U+5c6f,U+5c82,U+5c90,U+5d16,U+5dcd,U+5e37,U+5e90,U+5eb8,U+5f6a,U+5fcc,U+6012,U+6068,U+6073,U+607c,U+6094,U+6109,U+621a,U+626e,U+6284,U+62d0,U+62e6,U+62fe,U+6321,U+6328,U+632b,U+6349,U+6454,U+65ed,U+660f,U+6674,U+66a8,U+6749,U+674f,U+6760,U+67af,U+6850,U+6854,U+6869,U+68a8,U+68d2,U+68f5,U+6912,U+6b49,U+6b6a,U+6bef,U+6c28,U+6c5d,U+6c82,U+6cab,U+6cb8,U+6cc4,U+6cf5,U+6d47,U+6d78,U+6da4,U+6dc4,U+6dcb,U+6df9,U+6e0a,U+6e23,U+6e5b,U+6eb6,U+6f06,U+6f47,U+6f84,U+6f9c,U+6fd2,U+7076,U+70ac,U+7199,U+723d,U+72ac,U+72ed,U+7476,U+7529,U+752b,U+754f,U+7554,U+75d5,U+7626,U+76ef,U+7720,U+7766,U+7784,U+77ac,U+780d,U+7838,U+7845,U+786b,U+78b3,U+7978,U+79b9,U+79c9,U+79e7,U+7a3d,U+7a84,U+7a9f,U+7b0b,U+7b52,U+7c7d,U+7f1a,U+7fc5,U+7ff0,U+804a,U+8086-8087,U+808c,U+809a,U+80ba,U+810a,U+8180,U+818f,U+81c2,U+81ed,U+8231,U+8292,U+829c,U+82a6,U+82d1,U+8346,U+838e,U+839e,U+83c7,U+83f1,U+8403,U+840e,U+8513,U+857e,U+85e4,U+867e,U+871c,U+87ba,U+87f9,U+884d,U+8944,U+8a93,U+8c05,U+8d2c,U+8d2e,U+8d42-8d43,U+8dfb,U+8e22,U+8eba,U+8f69,U+8f9c,U+8fa3,U+8fa8,U+8fb1,U+900a,U+9038,U+903b,U+9042,U+904f,U+90b5,U+90dd,U+9102,U+9187,U+94a7,U+94c5,U+9523,U+95f8,U+95fd,U+960e,U+964b-964c,U+96c1,U+9709,U+971c,U+97ad,U+9882,U+9965,U+9976,U+9988,U+99a8,U+9a82,U+9a9a,U+9b41,U+9c8d,U+9e45,U+9e70,U+9e9f,U+9f3b,U+9f7f"}},{uri:yD,descriptors:{unicodeRange:"U+4e08,U+4e18,U+4e1b,U+4e22,U+4e27,U+4e32,U+4e52,U+4e73,U+4ead,U+4ed4,U+4ed9,U+4ef0,U+4fa6,U+5076,U+5179,U+51bb,U+51c9,U+51ef,U+51fd,U+524a,U+526a,U+529d,U+52ab,U+5306,U+5339,U+53d9,U+540a,U+5410,U+541e,U+5439,U+54b1,U+54ed,U+5564,U+558a,U+55b7,U+5634,U+574a,U+5751,U+57a6,U+57cb,U+57d4,U+5824,U+582a,U+5835,U+5858,U+5893,U+58e4,U+5951,U+5986,U+59da,U+59fb,U+59ff,U+5a03,U+5a46,U+5ac1,U+5b5d,U+5bfa,U+5c18,U+5c3a,U+5c48,U+5c4f,U+5c61,U+5cb3,U+5d1b,U+5e15,U+5e3d,U+5e99,U+5e9e,U+5eca,U+5f0a,U+5f17-5f18,U+5f25,U+5f7c,U+5fcd,U+6028,U+60a0,U+60ac,U+60d1,U+614e,U+6155,U+6168,U+61c8,U+6208,U+6212,U+6251,U+629a-629b,U+62ab-62ac,U+62fc,U+6323,U+632a,U+63d2,U+643a,U+6491-6492,U+649e,U+64b0,U+64c5,U+659c,U+6614,U+662d,U+6664,U+6670,U+6676,U+6746,U+67cf,U+67d4,U+682a,U+6843,U+6846,U+68da,U+6b3a,U+6b67,U+6c27,U+6c5b,U+6c64,U+6c70,U+6caa,U+6cca,U+6ce1,U+6d12,U+6d45,U+6dd1,U+6dd8,U+6e34,U+6e7f,U+6ee5,U+6f02,U+7092,U+70c2,U+70e6,U+7115,U+7237,U+7272,U+727a,U+72c2,U+739b,U+73b2,U+743c,U+751c,U+758f,U+75b2,U+7686,U+76c6,U+76d2,U+76fc,U+775b,U+77a9,U+7816,U+788e,U+7897,U+78b0,U+79bd,U+7a0d,U+7a91,U+7a9d,U+7ae3,U+7bad,U+7cca,U+7d2b,U+7eb1,U+7f06,U+7f14,U+7f1d,U+7f50,U+7ffc,U+8036,U+80bf,U+80c1,U+80ce,U+80f8,U+8109,U+810f,U+8170,U+8179,U+819c,U+821f,U+8230,U+8236,U+8273,U+829d,U+82f9,U+8305,U+8350,U+83b2,U+83cc,U+8404,U+840d,U+8427,U+8482,U+8679,U+8854,U+886b,U+8bbc,U+8be6,U+8c31,U+8c6b,U+8d4b,U+8dcc,U+8e2a,U+8e48,U+8f90,U+8fb0,U+9022,U+903c,U+903e,U+9065,U+916c,U+917f,U+94a9,U+94c3,U+94dd,U+94ed,U+9510,U+953b,U+96c7,U+970d,U+9738,U+9877,U+987d,U+989c,U+98d8,U+9a70,U+9a91,U+9aa4,U+9b42,U+9b4f,U+9e2d,U+9e3f,U+9e7f,U+9f20"}},{uri:wD,descriptors:{unicodeRange:"U+4e59,U+4ed3,U+4f0f,U+4f38,U+4f69,U+4fa7,U+4faf,U+4ff1,U+5077,U+5085,U+5144,U+5151,U+51af,U+51b6,U+51cc,U+523a,U+5251,U+5269,U+5272,U+52d8,U+5353,U+5389,U+53f9,U+5401,U+5415,U+541b,U+54f2,U+5524,U+554a,U+559d,U+5609,U+5740,U+575d,U+5806,U+5821,U+586b,U+5915,U+594f,U+5960,U+5999,U+59a5,U+59b9,U+59c6,U+59d1,U+59dc,U+5b5f,U+5b64,U+5b87,U+5bb4,U+5bbf,U+5c16,U+5c1d,U+5c3e,U+5c9a,U+5ca9,U+5cad,U+5cfb,U+5de1,U+5de7,U+5de9,U+5ef7,U+5f04,U+5f70,U+5f79,U+5fc6,U+602a,U+6050,U+6052,U+6070,U+6084,U+60b2,U+60dc,U+60e9,U+6167,U+6170,U+61c2,U+6270,U+6291,U+62b1,U+62bc,U+62dc,U+62df,U+62f3,U+6324,U+633a,U+6377,U+6398,U+63cf,U+640f,U+642c-642d,U+6458,U+6478,U+6500,U+654c,U+6566,U+658c,U+65c1,U+65cb,U+65e8,U+65ec,U+6696-6697,U+6734,U+679a,U+679d,U+67dc,U+67f3-67f4,U+680f,U+683d,U+684c,U+68af,U+699c,U+6bc1,U+6c0f,U+6c1b,U+6c57,U+6c6a,U+6d3d,U+6d6e,U+6d82,U+6db5,U+6dee,U+6e58,U+6eaa,U+6ecb,U+6ede,U+6ee9,U+6f0f,U+6f20,U+6f58,U+704c,U+7070,U+70b8,U+718a,U+7238,U+7262,U+7275,U+72b9,U+72d7,U+72e0,U+741b,U+7434,U+7483,U+74f6-74f7,U+75ab,U+764c,U+7761,U+7855,U+7891,U+78c1,U+79d2,U+7a00,U+7a3b,U+7c97,U+7ea4,U+7eb2,U+7ed2,U+7eea,U+7ef8,U+7f18,U+7fbd,U+8000,U+8010,U+8096,U+809d,U+80a9,U+817f,U+81e3,U+8206,U+8212,U+82ac,U+8302,U+8361,U+8377,U+83f2,U+8461,U+848b,U+84ec,U+8521,U+85aa,U+8870,U+8877,U+8881,U+888b,U+88ad,U+88c2,U+8986,U+8bd1,U+8bf1,U+8d24,U+8d2a,U+8d3e-8d3f,U+8d41,U+8d56,U+8d64,U+8d6b,U+8e0f,U+8f70,U+8f85,U+8f88,U+8fa9,U+9003,U+901d,U+90b9,U+90ce,U+94a6,U+94f8,U+9505,U+95ea,U+95ef,U+95f2,U+95f9,U+9601,U+9605,U+9634,U+966a,U+9677,U+9690,U+9694,U+96d5,U+971e,U+9896-9897,U+9972,U+9a71,U+9a76,U+9a7e,U+9e1f,U+9e23"}},{uri:ED,descriptors:{unicodeRange:"U+4e01,U+4e43,U+4ea6,U+4ef2,U+4eff,U+4f26,U+4f2a,U+4f2f,U+4f5b,U+4fa8,U+4fca,U+4fd7,U+5021,U+504f,U+5141,U+51c0,U+51dd,U+51e4,U+51ed,U+5200,U+5237,U+5427,U+5448,U+54a8,U+5706,U+5708,U+5723,U+575b,U+57c3,U+5899,U+58a8,U+58c1,U+5976,U+5988,U+59bb,U+59d0,U+59d3,U+5a18,U+5a31,U+5a92,U+5b54,U+5b85,U+5baa-5bab,U+5bc4,U+5bd2,U+5be8,U+5bff,U+5c65,U+5d07,U+5e1d,U+5e78,U+5e7c,U+5f03,U+5f1f,U+5f39,U+5f6d,U+5f92,U+5faa,U+5fbd,U+5fe7,U+5ffd,U+60a8,U+60ef,U+6108,U+6162,U+622a,U+6234,U+626b,U+626d,U+62c6,U+62d2,U+62d4,U+62d6,U+62e8,U+6316,U+6355,U+63ed,U+6447,U+64a4,U+65f1,U+6606,U+6628,U+664b,U+6668,U+6682,U+66f9,U+66fc,U+66ff,U+6717,U+6740,U+676d,U+67aa,U+67ec,U+67f1,U+6842,U+6851,U+695a,U+6982,U+6a2a,U+6b20,U+6b23,U+6b32,U+6b96,U+6bc5,U+6beb,U+6c60,U+6c9f,U+6cea,U+6cf3,U+6d1e,U+6d53,U+6d66,U+6d69,U+6d8c,U+6d9b,U+6db2,U+6de1,U+6dfb,U+6e14,U+6ed1,U+6eda,U+6ee8,U+6f2b,U+706d,U+7089,U+708e,U+70ad-70ae,U+70e7,U+7126,U+714c,U+71c3,U+71d5,U+7206,U+7259,U+731b,U+73a9,U+73bb,U+74dc,U+7532,U+7545,U+755c,U+75c7,U+7687,U+76d7,U+76f2,U+788d,U+78e8,U+79e6,U+79e9,U+7a3f,U+7a46,U+7a97,U+7af9,U+7bee,U+7c4d,U+7c89,U+7cd6,U+7eb5,U+7ebd,U+7ed8,U+8017,U+8033,U+80c0,U+80de,U+80f6,U+8138,U+817e,U+81a8,U+820d,U+827e,U+82b3,U+82d7,U+83b1,U+84c4,U+84dd,U+8584,U+864e,U+865a,U+866b,U+86cb,U+88d5,U+89e6,U+8bca,U+8bde,U+8bfa,U+8c0a,U+8c37,U+8c46,U+8c6a,U+8c8c,U+8d1d,U+8d29,U+8d4f,U+8d54,U+8d5a,U+8d60,U+8d62,U+8f7f,U+8f96,U+8f9e-8f9f,U+8fc1,U+8fdf,U+8fea,U+8ff7,U+9012,U+906d,U+9075,U+90a6,U+90bb,U+90ca,U+9178,U+9192,U+91ca,U+94bb,U+94dc,U+94fa,U+9501,U+950b,U+9521,U+955c,U+963b,U+9655,U+9675-9676,U+9887,U+9891,U+9971,U+9a97,U+9ece,U+9ed8"}},{uri:SD,descriptors:{unicodeRange:"U+4e1d,U+4e39,U+4e4c,U+4e4f,U+4e54,U+4e58,U+4e95,U+4ea1,U+4eab,U+4eae,U+4ec1,U+4f10,U+4f19,U+4f30,U+4f34,U+4fb5,U+503e,U+518c,U+5192,U+51a0,U+51ac,U+51b0,U+51e1,U+5211,U+5242,U+52a3,U+52b2,U+52c3,U+52c7,U+52d2,U+52e4,U+5377,U+539a,U+53a6,U+53e5,U+5417,U+5510,U+552f,U+5531,U+574f-5750,U+5761,U+5851,U+5854,U+58ee,U+593a,U+5949,U+5954,U+5a5a,U+5b8b,U+5bbd,U+5c04,U+5c0a,U+5c4b,U+5ce1,U+5cf0,U+5e10,U+5e8a,U+5e9f,U+5ec9,U+5f31,U+5f84,U+5fd8-5fd9,U+5fe0,U+6015,U+6062,U+6069,U+6076,U+6089,U+60a3,U+60ca,U+620f,U+624e,U+6263,U+6298,U+62a2,U+62bd,U+6311,U+6350,U+6389,U+638c,U+63f4,U+6446,U+644a,U+6469,U+64cd,U+654f,U+6562,U+656c,U+65d7,U+65e6,U+65fa,U+660c,U+6653,U+66b4,U+670b,U+672b,U+676f-6770,U+6881,U+6885,U+68a6,U+68cb,U+68ee,U+6b8a,U+6c88-6c89,U+6cc9,U+6ce5,U+6d01,U+6d17,U+6d1b,U+6d59,U+6d6a,U+6da8,U+6df7,U+6e10,U+6e20-6e21,U+6f5c,U+706f,U+70bc,U+719f,U+7267,U+732a,U+73cd,U+7518,U+756a,U+7586,U+7591,U+75db,U+76c8,U+76d0,U+76d6,U+76d8,U+76df,U+76fe,U+77db,U+7801,U+786c,U+795d,U+7965,U+79cb,U+7a77,U+7a7f,U+7aef,U+7b11,U+7bb1,U+7bc7,U+7ea0,U+7eaf,U+7ed5,U+7edc,U+7f13,U+7f29,U+7f34,U+7f8a,U+7ffb,U+8015,U+8058,U+805a,U+8083,U+80af,U+80c6,U+80cc,U+811a,U+8150,U+82e5,U+8336,U+8352,U+83ab,U+8428,U+8463,U+852c,U+8861,U+89c8,U+8bcd,U+8bd7,U+8bda,U+8be2,U+8bef,U+8bf8,U+8c0b,U+8c13,U+8d34,U+8d3a,U+8d74,U+8d76,U+8da3,U+8dd1,U+8ddd,U+8ddf,U+8df3,U+8f68,U+8f6f,U+8f7d,U+8f91,U+8f9b,U+8fbd,U+8fc8,U+8fd4,U+8feb,U+8ff9,U+900f,U+9057,U+907f-9080,U+90d1,U+90ed,U+91ce,U+9519,U+9526,U+95ed,U+9614,U+9635,U+9644,U+9686,U+96c5,U+96ea,U+9707,U+9732,U+9759,U+978b,U+9876,U+9881,U+9910,U+996e,U+9970,U+9c81,U+9e21,U+9ebb,U+9f84"}},{uri:kD,descriptors:{unicodeRange:"U+4e3d,U+4e4e,U+4e71,U+4e8f,U+4ed8,U+4eea,U+4f0a,U+4f0d,U+4f11,U+4f1f,U+4f24,U+4f3c,U+4f73,U+4fc4,U+500d,U+5012,U+501f,U+503a,U+505c,U+507f,U+50a8,U+514d,U+5178,U+517c,U+51b2,U+51b7,U+520a,U+5238,U+523b,U+52b1,U+535a,U+5371,U+5385,U+53eb-53ec,U+53f3,U+53f6,U+5409,U+542b,U+542f,U+5434,U+5462,U+5473,U+547c,U+54c8,U+54ea,U+56fa,U+5733,U+5757,U+5766,U+5802,U+585e,U+590f,U+591c,U+591f,U+5947,U+594b,U+5987,U+5a01,U+5b59,U+5b63,U+5b88,U+5b97,U+5b9c,U+5bbe,U+5bfb,U+5c01,U+5c1a,U+5c24,U+5c3c,U+5c97,U+5c9b,U+5cb8,U+5de6,U+5e01,U+5e2e,U+5e45,U+5e55,U+5e84,U+5ef6,U+5f02,U+5f52,U+5f69,U+5f7b,U+5f90,U+5fae,U+6000,U+600e,U+6025,U+60e0,U+6276,U+6297,U+62b5,U+62cd,U+62d3,U+62e5,U+62e9,U+62ff,U+6302,U+632f,U+63e1,U+6444,U+64ad,U+653b,U+6551,U+6563,U+65a4,U+65e7,U+6620,U+667a,U+66f2,U+671d,U+6731,U+6742,U+675f,U+6768,U+677e-677f,U+6790,U+67b6,U+67d3,U+6863,U+68b0,U+68c9,U+690d,U+6b8b,U+6bcd,U+6bd2,U+6bd5,U+6c38,U+6c61,U+6cbf,U+6cdb,U+6cf0,U+6d2a,U+6d89,U+6da6,U+6f6e,U+6fb3,U+7075,U+707e,U+70df,U+7164,U+7236,U+725b,U+7389,U+73e0,U+745e,U+74e6,U+751a,U+7537,U+75be,U+76ae,U+76db,U+793c,U+7956,U+7981,U+79d8,U+79df,U+79fb,U+7adf,U+7ae5,U+7b14,U+7b26,U+7b54,U+7b79,U+7d2f,U+7eb8,U+7eba,U+7ec6,U+7ee9,U+7eff,U+7f5a,U+7f6a,U+7f72,U+8089,U+80a5,U+80e1,U+8111,U+8131,U+821e,U+822c,U+8270,U+8499,U+8651,U+867d,U+8840,U+8857,U+8863,U+88c1,U+89c9,U+89d2,U+8a89,U+8bed,U+8bfe,U+8c01,U+8c22,U+8d21,U+8d25,U+8d2f,U+8d5e,U+8d75,U+8d8b,U+8dc3,U+8de8,U+8df5,U+8f6e,U+8f86,U+8f89,U+8fc5,U+8ff0,U+8ffd,U+9014,U+904d,U+90ae,U+9274,U+949f,U+952e,U+969c,U+96c4,U+96e8,U+96f6-96f7,U+97e9,U+987f,U+996d,U+9a7b,U+9aa8,U+9c7c,U+9c9c,U+9e4f,U+9f13,U+9f50"}},{uri:CD,descriptors:{unicodeRange:"U+4e13,U+4e16,U+4e1c,U+4e24,U+4e3e,U+4e49,U+4e61,U+4e66,U+4e89,U+4e8c,U+4e94,U+4e9b,U+4ea4,U+4eac,U+4ebf,U+4eca,U+4ef6-4ef7,U+4efb,U+4f18,U+4f20,U+4f46,U+4f7f,U+4fe1,U+503c,U+505a,U+5146,U+5148,U+515a,U+5171,U+5177,U+519b,U+51b3,U+51c6,U+51e0,U+5212,U+521b,U+522b,U+529e,U+52bf,U+534e-534f,U+5355,U+5357,U+5382,U+539f,U+53bb,U+53bf,U+53c2,U+53c8,U+53ca,U+53d6-53d8,U+53e3,U+53ea,U+53f0,U+540d,U+5411,U+56db,U+56de,U+56e0,U+56e2,U+578b,U+57ce,U+57fa,U+589e,U+5904,U+5934,U+5982,U+5b89,U+5b8c,U+5bfc,U+5c06,U+5c11,U+5c40,U+5c71,U+5e38,U+5e72,U+5e76,U+5e7f,U+5e94,U+5e9c,U+5f0f,U+5f15,U+5f20,U+5f3a,U+5f62,U+5f88,U+5fc5,U+5fd7,U+5feb,U+601d,U+6027,U+60c5,U+60f3,U+610f,U+6216,U+6218,U+624b,U+624d,U+6279,U+628a,U+6295,U+6301,U+6307,U+636e,U+63a5,U+63a8,U+652f,U+6536,U+653e,U+6548,U+6559,U+6570,U+65bd,U+65e0,U+6602,U+660e,U+6613,U+66f4,U+6700,U+670d,U+671f,U+672f,U+6743,U+674e,U+6751,U+6761,U+6784,U+6797,U+679c,U+67e5,U+6807,U+6837,U+683c,U+6b21,U+6b63-6b65,U+6bcf,U+6bd4,U+6c42,U+6c5f,U+6ca1,U+6cbb,U+6d3b,U+6d41,U+6d88,U+6df1,U+70b9,U+7136,U+7269,U+7279,U+7531,U+754c,U+767e,U+76ca,U+76f8,U+770b,U+7740,U+7814,U+79ef,U+7a0b,U+7a0e,U+7a76,U+7b80,U+7cbe,U+7cfb,U+7e41,U+7ea7,U+7ec4,U+7ec7,U+7ed3,U+7ed9,U+7edf,U+7f8e,U+8001,U+804c,U+8054,U+80b2,U+81f3,U+8425,U+8868,U+88ab,U+897f,U+89c1-89c2,U+89c4,U+89c6,U+89e3,U+8ba1,U+8ba4,U+8bae,U+8bb0,U+8bba,U+8bc1,U+8c03,U+8d28,U+8d39,U+8def,U+8f66,U+8f6c,U+8fd0-8fd1,U+9020,U+9053,U+90a3,U+90fd,U+91cc,U+9500,U+9547,U+95e8,U+95f4,U+961f,U+9645,U+9662,U+96be,U+96c6,U+9700,U+9769,U+97e6,U+9875,U+9879,U+9886,U+9898,U+98ce,U+9996,U+2b5af,U+2cc56,U+2e9f5,U+30edd-30ede"}},{uri:MD,descriptors:{unicodeRange:"U+4e03,U+4e30,U+4e34,U+4e45,U+4e60,U+4e70,U+4e88,U+4e91-4e92,U+4ea9,U+4eb2,U+4ec0,U+4ecb,U+4ecd,U+4ee4,U+4fee,U+5019,U+5047,U+50cf,U+5145,U+516d,U+5170,U+5175,U+5199,U+51cf,U+51fb,U+521a,U+5224,U+5267,U+52aa,U+5347-5348,U+534a,U+5356,U+5361,U+536b,U+5370,U+538b,U+53e4,U+53e6,U+5403,U+5426,U+5428,U+542c,U+5438,U+5668,U+56ed,U+56f4,U+56fe,U+57df,U+592a,U+5957,U+5b69,U+5b81,U+5b8f,U+5b98,U+5b9d,U+5ba1,U+5ba4,U+5bb3,U+5bc6,U+5bdf,U+5c3d,U+5c5e,U+5c81,U+5ddd,U+5de8,U+5dee,U+5e0c,U+5e86,U+5e8f,U+5e93,U+5e95,U+5e97,U+5ea7,U+5ead,U+5eb7,U+5f55,U+5f81,U+5f85,U+5ff5,U+6001,U+613f,U+6258,U+6267,U+6269,U+626c,U+627e,U+62db,U+62ec,U+6325,U+635f,U+6362,U+6388,U+6392,U+63a2,U+63a7,U+63aa,U+641e,U+6545,U+6597,U+65e2,U+65e9,U+661f,U+665a,U+666e-666f,U+66fe,U+6728,U+67d0,U+6811,U+6838,U+6865,U+697c,U+6b22,U+6b27,U+6b4c,U+6b62,U+6b66,U+6b7b,U+6bdb,U+6c47,U+6c49,U+6c7d,U+6c99,U+6cfd,U+6d0b,U+6d25,U+6d32,U+6d3e,U+6d4b,U+6e29,U+6e56,U+6e7e,U+6f14,U+6fc0,U+706b,U+70c8,U+7247,U+72af,U+72b6,U+72ec,U+732e,U+73ed,U+7403,U+7533,U+753b,U+7559,U+7565,U+7597,U+767b,U+773c,U+7763,U+77ed,U+77ff,U+7968,U+798f,U+79bb,U+79c0-79c1,U+7ad9,U+7ae0,U+7b51,U+7b7e,U+7cae,U+7d22,U+7ea2,U+7eb3,U+7eb7,U+7ec3,U+7ec8,U+7ecd,U+7edd,U+7efc,U+7f16,U+7f3a,U+7f51,U+7f57,U+7f6e,U+80dc,U+822a,U+8239,U+826f,U+82cf,U+82e6,U+8349,U+8363,U+83dc,U+8457,U+85cf,U+878d,U+8865,U+8a00,U+8b66,U+8ba2,U+8ba8,U+8bad,U+8bb2,U+8bc9,U+8bd5,U+8bfb,U+8d2b,U+8d35,U+8d37,U+8f7b,U+8f93,U+8fce,U+8fdd,U+9000-9002,U+9010,U+9047,U+9093,U+9152,U+9488,U+94a2,U+9633,U+9636,U+963f,U+9646,U+9648,U+964d,U+9664,U+9669,U+9760,U+97f3,U+987a,U+987e,U+9884,U+98de,U+9986,U+9ed1"}},{uri:ID,descriptors:{unicodeRange:"U+4e14,U+4e25,U+4e48,U+4e50,U+4e5d,U+4e9a,U+4ec5,U+4efd,U+4f17,U+4f4e-4f4f,U+4f55,U+4f59,U+4f60,U+4f8b,U+4f9b,U+4f9d,U+4fbf,U+4fc3,U+5065,U+513f,U+5149,U+514b,U+516b,U+5174,U+517b,U+518d,U+51b5,U+5207,U+5217-5219,U+521d,U+526f,U+529f,U+52a9,U+52b3,U+5305,U+533b,U+5343,U+5360,U+5373-5374,U+5386,U+53cb-53cd,U+53f2,U+53f7,U+544a,U+5468,U+547d,U+54cd,U+552e,U+5584,U+56f0,U+571f,U+5747,U+575a,U+57f9,U+5883,U+58eb,U+58f0,U+5907,U+590d,U+592e,U+5931,U+5956,U+5965,U+5973,U+5979,U+59cb,U+5b57-5b58,U+5b83,U+5ba2-5ba3,U+5bb9,U+5bcc,U+5c42,U+5c45,U+5c4a,U+5dde,U+5df1,U+5df4,U+5e03,U+5e08,U+5e26,U+5e2d,U+5f71,U+5f80,U+5f8b,U+5fb7,U+606f,U+611f,U+6237,U+623f,U+6253,U+627f,U+6293,U+62a4,U+62c5,U+62c9,U+6309,U+6574,U+6599,U+65ad,U+65af,U+65c5,U+65cf,U+6625,U+663e,U+671b,U+672a,U+6750,U+6781,U+6821,U+6839,U+6848,U+68c0,U+6a21,U+6b3e,U+6bb5,U+6c14,U+6cb3,U+6cb9,U+6ce8,U+6e05,U+6e2f,U+6e38,U+6e90,U+6ee1,U+70ed,U+7167,U+7231,U+7248,U+724c,U+7387,U+738b,U+73af,U+7530,U+75c5,U+767d,U+76d1,U+76f4,U+771f,U+77e5,U+77f3,U+7834,U+7840,U+786e,U+793a,U+795e,U+79f0,U+7a33,U+7a7a,U+7a81,U+7ade,U+7b56,U+7b97,U+7c73,U+7c7b,U+7d20,U+7d27,U+7ea6,U+7eaa,U+7ebf,U+7ee7,U+7eed,U+7ef4,U+7fa4,U+8003,U+80a1,U+81f4,U+8272,U+827a,U+8282,U+82b1,U+82f1,U+8303,U+836f,U+83b7,U+843d,U+88c5,U+8ba9,U+8baf,U+8bb8,U+8bbf,U+8bc4,U+8bc6,U+8bdd,U+8be5,U+8bf7,U+8c08,U+8c61,U+8d1f,U+8d22-8d23,U+8d27,U+8d2d,U+8d38,U+8d5b,U+8d70,U+8d85,U+8d8a,U+8db3,U+8eab,U+8f83,U+8fb9,U+8fdc,U+8fde,U+9009,U+901f,U+914d,U+91c7,U+94b1,U+94c1,U+94f6,U+95fb,U+9632,U+9650,U+968f,U+9752,U+975e,U+987b,U+989d,U+98df,U+9999,U+9a6c,U+9a8c,U+9ec4,U+9feb-9fec"}},{uri:_D,descriptors:{unicodeRange:"U+98fb-990c,U+990e-990f,U+9911-992d,U+992f-9953,U+9956-9962,U+9964,U+9966,U+9973,U+9978-9979,U+997b,U+997e,U+9982-9983,U+9989,U+998c,U+998e,U+999a-99a4,U+99a6-99a7,U+99a9-99c8"}},{uri:TD,descriptors:{unicodeRange:"U+8e4c-8e50,U+8e53-8e58,U+8e5a-8e65,U+8e67-8e68,U+8e6a-8e6b,U+8e6e,U+8e71,U+8e73,U+8e75,U+8e77-8e7b,U+8e7d-8e7e,U+8e80,U+8e82-8e84,U+8e86,U+8e88-8e8e,U+8e91-8e93,U+8e95-8e9b,U+8e9d,U+8e9f-8eaa,U+8ead-8eae,U+8eb0-8eb1,U+8eb3-8eb9,U+8ebb-8ecd,U+8ecf-8f02"}},{uri:AD,descriptors:{unicodeRange:"U+2e3a,U+3001-3002,U+3008-3011,U+3014-3017,U+301d-301f,U+4dae,U+4e00,U+4e07,U+4e09-4e0b,U+4e0d-4e0e,U+4e1a,U+4e2a,U+4e2d,U+4e3a-4e3b,U+4e4b,U+4e5f,U+4e86,U+4e8b,U+4e8e,U+4ea7,U+4eba,U+4ece,U+4ed1,U+4ed6,U+4ee3,U+4ee5,U+4eec,U+4f01,U+4f1a,U+4f4d,U+4f53,U+4f5c,U+4fdd,U+5143,U+5165,U+5168,U+516c,U+5173,U+5176,U+5185,U+519c,U+51fa,U+5206,U+5229,U+5230,U+5236,U+524d,U+529b,U+52a0-52a1,U+52a8,U+5316-5317,U+533a,U+5341,U+5362,U+53d1,U+53ef,U+53f8,U+5404,U+5408,U+540c,U+540e,U+5458,U+548c,U+54c1,U+54e5,U+5546,U+559c,U+56fd,U+5728,U+5730,U+573a,U+5916,U+591a,U+5927,U+5929,U+592b,U+597d,U+59d4,U+5b50,U+5b66,U+5b9a,U+5b9e,U+5bb6,U+5bf9,U+5c0f,U+5c14,U+5c31,U+5c55,U+5de5,U+5df2,U+5e02,U+5e73-5e74,U+5ea6,U+5efa,U+5f00,U+5f53,U+5f97,U+5fc3,U+603b,U+6210-6211,U+6240,U+6280,U+62a5,U+63d0,U+6539,U+653f,U+6587,U+65b0,U+65b9,U+65e5,U+65f6,U+662f,U+6708-6709,U+672c,U+673a,U+675c,U+6765,U+6c11,U+6c34,U+6cd5,U+6ce2,U+6d4e,U+6d77,U+73b0,U+7406,U+751f,U+7528,U+7535,U+7684,U+76ee,U+793e,U+79cd,U+79d1,U+7acb,U+7b2c,U+7b49,U+7ba1,U+7ecf,U+8005,U+800c,U+80fd,U+81ea,U+884c,U+8981,U+8bbe,U+8bf4,U+8d44,U+8d77,U+8fbe,U+8fc7,U+8fd8-8fd9,U+8fdb,U+901a,U+90e8,U+91cd,U+91cf,U+91d1,U+9485,U+957f,U+95ee,U+9762,U+9ad8,U+9ea6,U+9f99,U+9fcf,U+9fd4,U+9fed,U+fe10-fe19,U+fe30-fe31,U+fe33-fe44,U+ff01,U+ff0c,U+ff1f,U+2b4e7,U+2b7f7,U+2b7fc,U+2cb2d,U+2cb3b,U+2cb4a,U+2cb5b,U+2cb73"}},{uri:jD,descriptors:{unicodeRange:"U+6490,U+6493-6494,U+6497-6498,U+649a-649d,U+649f-64a3,U+64a5-64a8,U+64aa-64ab,U+64af,U+64b1-64b4,U+64b6,U+64b9,U+64bb,U+64bd-64bf,U+64c1,U+64c3-64c4,U+64c6-64cc,U+64cf,U+64d1,U+64d3-64d6,U+64d9-64dd,U+64df-64e1,U+64e3,U+64e5,U+64e7-64ff,U+6501-6508,U+650a-6511,U+6513-6517,U+6519-6524,U+6526-652a,U+652c-652d,U+6530-6533,U+6537,U+653a,U+653c-653d,U+6540-6544,U+6546-6547,U+654a-654b,U+654d-654e,U+6550,U+6552-6554,U+6557-6558,U+655a,U+655c,U+655f-6561,U+6564-6565,U+6567-6568"}},{uri:RD,descriptors:{unicodeRange:"U+9695-9696,U+969a-969b,U+969d-96a6,U+96a8-96af,U+96b1-96b2,U+96b4-96b5,U+96b7-96b8,U+96ba-96bb,U+96bf,U+96c2-96c3,U+96c8,U+96ca-96cb,U+96d0-96d1,U+96d3-96d4,U+96d6-96df,U+96e1-96e7,U+96eb-96ee,U+96f0-96f2,U+96f4-96f5,U+96f8,U+96fa-96fd,U+96ff,U+9702-9703,U+9705,U+970a-970c,U+9710-9712,U+9714-9715,U+9717-971b,U+971d,U+971f-9729,U+972b-972c,U+972e-972f,U+9731,U+9733-9737,U+973a-973d,U+973f-9751,U+9754-9755,U+9757-9758,U+975a,U+975c-975d,U+975f,U+9763-9764,U+9766-9768,U+976a-9770"}},{uri:DD,descriptors:{unicodeRange:"U+6af0-6b1f,U+6b25-6b26,U+6b28-6b31,U+6b33-6b36,U+6b38,U+6b3b-6b3d,U+6b3f-6b42,U+6b44-6b45,U+6b48,U+6b4a-6b4b,U+6b4d-6b58,U+6b5a-6b61,U+6b68-6b69,U+6b6b-6b78,U+6b7a,U+6b7d-6b80,U+6b85,U+6b88,U+6b8c,U+6b8e-6b91,U+6b94-6b95,U+6b97-6b99,U+6b9c-6ba0,U+6ba2-6ba9,U+6bab-6bb2,U+6bb6,U+6bb8-6bba"}},{uri:LD,descriptors:{unicodeRange:"U+430e-439a,U+29e8a,U+29ec4,U+29edb,U+29ee9,U+29f7e,U+29f83,U+29f8c,U+29fce,U+2a01a,U+2a02f,U+2a082,U+2a0f9,U+2a190,U+2a38c"}},{uri:PD,descriptors:{unicodeRange:"U+92ef-933d,U+933f-9369,U+936b-9388"}},{uri:ND,descriptors:{unicodeRange:"U+4512-458d,U+2b300,U+2b363,U+2b36f,U+2b372,U+2b37d,U+2b404,U+2b410,U+2b413,U+2b461,U+2b4ef,U+2b4f6,U+2b4f9,U+2b50d-2b50e,U+2b536,U+2b5ae,U+2b5b3,U+2b5e7,U+2b5f4,U+2b61c-2b61d,U+2b626-2b628,U+2b62a,U+2b62c,U+2b695-2b696,U+2b6ad,U+2b6ed"}},{uri:OD,descriptors:{unicodeRange:"U+88bd-88c0,U+88c3-88c4,U+88c7-88c8,U+88ca-88cd,U+88cf-88d1,U+88d3,U+88d6-88d7,U+88da-88de,U+88e0-88e1,U+88e6-88e7,U+88e9-88ef,U+88f2,U+88f5-88f7,U+88fa-88fb,U+88fd,U+88ff-8901,U+8903-8909,U+890b-890f,U+8911,U+8914-8918,U+891c-8920,U+8922-8924,U+8926-8929,U+892c-892f,U+8931-8933,U+8935,U+8937-8940,U+8942-8943,U+8945-895d,U+8960-8965,U+8967-897a,U+897c-897e,U+8980,U+8982,U+8984-8985"}},{uri:$D,descriptors:{unicodeRange:"U+4b0b-4ba0"}},{uri:FD,descriptors:{unicodeRange:"U+7179,U+717b-717c,U+717e-7183,U+7185-7189,U+718b-718e,U+7190-7193,U+7195-7197,U+719a-719e,U+71a1-71a7,U+71a9-71ab,U+71ad-71b2,U+71b4,U+71b6-71b8,U+71ba-71c2,U+71c4-71cd,U+71cf-71d3,U+71d6-71df,U+71e1-71e4,U+71e6,U+71e8-71ed,U+71ef-71f8,U+71fa-7205,U+7207-721c,U+721e-7227,U+7229,U+722b,U+722d"}},{uri:zD,descriptors:{unicodeRange:"U+982e-9874,U+988b,U+988e,U+9892,U+9895,U+9899,U+98a3,U+98a8-98cd,U+98cf-98d0,U+98d4,U+98d6-98d7,U+98db-98dd,U+98e0-98e6,U+98e9-98fa"}},{uri:BD,descriptors:{unicodeRange:"U+7c14-7c15,U+7c17-7c1e,U+7c20-7c25,U+7c28-7c29,U+7c2b-7c37,U+7c39-7c3e,U+7c42-7c4c,U+7c4e-7c72,U+7c75-7c7a,U+7c7e-7c88,U+7c8a-7c90,U+7c93-7c94,U+7c96,U+7c99-7c9b,U+7ca0-7ca1,U+7ca3,U+7ca6-7ca9,U+7cab-7cad,U+7caf-7cb0,U+7cb4-7cb8,U+7cba-7cbb,U+7cbf-7cc0,U+7cc2-7cc4,U+7cc6,U+7cc9,U+7ccb,U+7cce-7cd4"}},{uri:HD,descriptors:{unicodeRange:"U+7d95-7da5,U+7da7-7dad,U+7daf-7e2a"}},{uri:XD,descriptors:{unicodeRange:"U+4a78-4b0a"}},{uri:WD,descriptors:{unicodeRange:"U+9b30-9b31,U+9b33-9b3a,U+9b3d-9b40,U+9b46,U+9b4a-9b4c,U+9b4e,U+9b50,U+9b52-9b53,U+9b55-9bcf"}},{uri:VD,descriptors:{unicodeRange:"U+6a4b-6a4f,U+6a51-6a57,U+6a5a,U+6a5c-6a60,U+6a62-6a64,U+6a66-6a70,U+6a72-6a78,U+6a7a-6a7b,U+6a7d-6a7f,U+6a81-6a83,U+6a85-6a8d,U+6a8f,U+6a92-6a96,U+6a98-6a9f,U+6aa1-6aa8,U+6aaa,U+6aad-6aef"}},{uri:GD,descriptors:{unicodeRange:"U+99c9-9a53"}},{uri:YD,descriptors:{unicodeRange:"U+8550-8555,U+8557-8558,U+855a-855d,U+855f-8563,U+8565-8567,U+8569-8571,U+8573,U+8575-8578,U+857c-857d,U+857f-8583,U+8586,U+8588-858e,U+8590-859a,U+859d-85a3,U+85a5-85a7,U+85a9,U+85ab-85ad,U+85b1-85b6,U+85b8,U+85ba-85c0,U+85c2-85c8,U+85ca-85ce,U+85d1-85d2,U+85d4,U+85d6-85db,U+85dd-85e3,U+85e5-85e8,U+85ea-85fa,U+85fc-85fe,U+8600-8603"}},{uri:ZD,descriptors:{unicodeRange:"U+6fb2,U+6fb4-6fb5,U+6fb7-6fb8,U+6fba-6fbf,U+6fc1,U+6fc3-6fc8,U+6fca-6fd0,U+6fd3-6fdd,U+6fdf,U+6fe2-6fed,U+6ff0-7010,U+7012-7019,U+701c-7022,U+7024-7034,U+7036-7038,U+703a-704b,U+704d-704e,U+7050-7053"}},{uri:KD,descriptors:{unicodeRange:"U+4ba1-4c2c"}},{uri:qD,descriptors:{unicodeRange:"U+9a54-9a6b,U+9a72,U+9a83,U+9a89,U+9a8d-9a8e,U+9a94-9a95,U+9a99,U+9aa6,U+9aa9-9aaf,U+9ab2-9ab5,U+9ab9,U+9abb,U+9abd-9abf,U+9ac3-9ac4,U+9ac6-9aca,U+9acd-9ad0,U+9ad2,U+9ad4-9ad7,U+9ad9-9ade,U+9ae0,U+9ae2-9ae5,U+9ae7-9aea,U+9aec,U+9aee,U+9af0-9af8,U+9afa,U+9afc-9b02,U+9b04-9b07,U+9b09-9b0e,U+9b10-9b12,U+9b14-9b1e,U+9b20-9b22,U+9b24-9b2e"}},{uri:JD,descriptors:{unicodeRange:"U+9d1a-9da1"}},{uri:QD,descriptors:{unicodeRange:"U+9e13-9e1e,U+9e24,U+9e27,U+9e2e,U+9e30,U+9e34,U+9e3b-9e3c,U+9e40,U+9e4d,U+9e50,U+9e52-9e54,U+9e56,U+9e59,U+9e5d,U+9e5f-9e62,U+9e65,U+9e6e-9e6f,U+9e72,U+9e74-9e7d,U+9e80-9e81,U+9e83-9e86,U+9e89-9e8a,U+9e8c-9e91,U+9e94-9e9c,U+9e9e,U+9ea0-9ea5,U+9ea7-9eb3,U+9eb5-9eb7,U+9eb9-9eba,U+9ebc,U+9ebf-9ec3,U+9ec5-9ec8,U+9eca-9ecc,U+9ed0,U+9ed2-9ed3,U+9ed5-9ed7,U+9ed9-9eda,U+9ede,U+9ee1,U+9ee3-9ee4,U+9ee6,U+9ee8,U+9eeb-9eee,U+9ef0-9ef8"}},{uri:eL,descriptors:{unicodeRange:"U+8b1c-8b25,U+8b27-8b65,U+8b67-8b6b,U+8b6d-8b9f,U+8bac,U+8bb1,U+8bbb,U+8bc7,U+8bd0"}},{uri:tL,descriptors:{unicodeRange:"U+4cad-4d2f"}},{uri:nL,descriptors:{unicodeRange:"U+9c4b-9c7b,U+9c7d-9c7e,U+9c80,U+9c83-9c84,U+9c89-9c8a,U+9c8c,U+9c8f,U+9c93,U+9c96-9c99,U+9c9d,U+9caa,U+9cac,U+9caf,U+9cb9,U+9cbe-9cc2,U+9cc8-9cc9,U+9cd1-9cd2,U+9cda-9cdb,U+9ce0-9ce1,U+9ce3-9d19"}},{uri:aL,descriptors:{unicodeRange:"U+9389-938e,U+9390-93c9,U+93cb-93d5,U+93d7-9410"}},{uri:iL,descriptors:{unicodeRange:"U+20a0-20b5,U+20b9-20ba,U+20bc-20bd,U+4e2c,U+5107,U+5216,U+5293,U+54f3,U+5523,U+5819,U+5adc,U+5c88,U+5e3b,U+5fee,U+62f6,U+63be,U+6484,U+6499,U+67d9,U+67dd,U+6d5e,U+6f46,U+717a,U+71e0,U+72c1,U+73e7,U+75b0,U+7603,U+7722,U+7809,U+7811,U+7946,U+7967,U+799a,U+7b45,U+7ba2,U+8014,U+80d9,U+8159,U+817d,U+81a3,U+81aa,U+8201,U+833c,U+836e,U+83e5,U+8459,U+84f0,U+8729,U+8753,U+87d3,U+89dc,U+8bf6,U+8c2e,U+8e2c,U+8e9c,U+8e9e,U+8ece,U+8fee,U+9139,U+914f,U+9174,U+9191,U+960c,U+9622,U+9a98,U+9b48,U+9ca6,U+9cb0,U+9da2-9e12,U+9e88,U+9f44,U+9f86"}},{uri:rL,descriptors:{unicodeRange:"U+9bd0-9c4a"}},{uri:sL,descriptors:{unicodeRange:"U+4c2d-4cac"}},{uri:lL,descriptors:{unicodeRange:"U+4d30-4dab"}},{uri:oL,descriptors:{unicodeRange:"U+9411-943d,U+943f-946a,U+946c-9484"}},{uri:cL,descriptors:{unicodeRange:"U+9efa,U+9efd,U+9eff-9f0a,U+9f0c,U+9f0f,U+9f11-9f12,U+9f14-9f16,U+9f18,U+9f1a-9f1f,U+9f21,U+9f23-9f2b,U+9f2d-9f2e,U+9f30-9f36,U+9f38,U+9f3a,U+9f3c,U+9f3f-9f43,U+9f45-9f4f,U+9f52-9f7e,U+9f81-9f82,U+9f8d-9f94"}},{uri:dL,descriptors:{unicodeRange:"U+7e2b-7e3a,U+7e3c-7e40,U+7e42-7e46,U+7e48-7e81,U+7e83-7e9a,U+7e9c-7e9e,U+7eae,U+7eb4,U+7ebb-7ebc,U+7ed6,U+7ee4,U+7eec,U+7ef9,U+7f0a,U+7f10,U+7f1e,U+7f37,U+7f39,U+7f3b"}}],Pi=class We{constructor(t){j(this,"scene"),j(this,"getSceneFamilies",()=>We.getUniqueFamilies(this.scene.getNonDeletedElements())),j(this,"onLoaded",n=>{let a=!0;for(let s of n){let l=`${s.family}-${s.style}-${s.weight}-${s.unicodeRange}`;We.loadedFontsCache.has(l)||(We.loadedFontsCache.add(l),a=!1)}if(a)return;let i=!1,r=this.scene.getNonDeletedElementsMap();for(let s of this.scene.getNonDeletedElements())if(q(s)){i=!0,ut.delete(s),nc.clearCache(Xe(s));let l=Ht(s,r);l&&ut.delete(l)}i&&this.scene.triggerUpdate()}),j(this,"loadSceneFonts",async()=>{let n=this.getSceneFamilies(),a=We.getCharsPerFamily(this.scene.getNonDeletedElements());return We.loadFontFaces(n,a)}),this.scene=t}static get registered(){return We._registered?We._initialized||(We._registered=new Map([...We.init().entries(),...We._registered.entries()])):We._registered=We.init(),We._registered}get registered(){return We.registered}static async generateFontFaceDeclarations(t){let n=We.getUniqueFamilies(t),a=We.getCharsPerFamily(t),i=n.find(c=>l8(c).includes(ks));if(i){let c=We.getCharacters(a,i);if(RI(c)){let d=Cs[ks];a[d]=new Set(c),n.unshift(Cs[ks])}}let r=We.fontFacesStylesGenerator(n,a),s=3,l=await new E2(r,s).all();return Array.from(new Set(l))}static async loadFontFaces(t,n){for(let{fontFaces:r,metadata:s}of We.registered.values())if(!s.local)for(let{fontFace:l}of r)window.document.fonts.has(l)||window.document.fonts.add(l);let a=We.fontFacesLoader(t,n),i=10;return(await new E2(a,i).all()).flat().filter(Boolean)}static*fontFacesLoader(t,n){for(let[a,i]of t.entries()){let r=Xe({fontFamily:i,fontSize:16}),s=We.getCharacters(n,i);window.document.fonts.check(r,s)||(yield ar(async()=>{try{let l=await window.document.fonts.load(r,s);return[a,l]}catch(l){console.error(`Failed to load font "${r}" from urls "${We.registered.get(i)?.fontFaces.map(c=>c.urls)}"`,l)}}))}}static*fontFacesStylesGenerator(t,n){for(let[a,i]of t.entries()){let{fontFaces:r,metadata:s}=We.registered.get(i)??{};if(!Array.isArray(r)){console.error(`Couldn't find registered fonts for font-family "${i}"`,We.registered);continue}if(!s?.local)for(let[l,c]of r.entries())yield ar(async()=>{try{let d=We.getCharacters(n,i),o=await c.toCSS(d);return o?[a*1e4+l,o]:void 0}catch(d){console.error(`Couldn't transform font-face to css for family "${c.fontFace.family}"`,d)}})}}static register(t,n,...a){let i=it[t]??Cs[t];return this.registered.get(i)||this.registered.set(i,{metadata:n,fontFaces:a.map(({uri:r,descriptors:s})=>new zT(t,r,s))}),this.registered}static init(){let t={registered:new Map},n=(a,...i)=>{let r=it[a]??Cs[a],s=Kd[r]??Kd[it.Excalifont];We.register.call(t,a,s,...i)};return n("Cascadia",...HT),n("Comic Shanns",...YT),n("Excalifont",...aA),n("Helvetica",...iA),n("Liberation Sans",...sA),n("Lilita One",...cA),n("Nunito",...UA),n("Virgil",...gA),n(ks,...uL),n(Mo,...ZT),We._initialized=!0,t.registered}static getUniqueFamilies(t){return Array.from(t.reduce((n,a)=>(q(a)&&n.add(a.fontFamily),n),new Set))}static getCharsPerFamily(t){let n={};for(let a of t)if(q(a))for(let i of a.originalText)n[a.fontFamily]||(n[a.fontFamily]=new Set),n[a.fontFamily].add(i);return n}static getCharacters(t,n){return t[n]?Array.from(t[n]).join(""):""}static getAllFamilies(){return Array.from(We.registered.keys())}};j(Pi,"loadedFontsCache",new Set),j(Pi,"_registered"),j(Pi,"_initialized",!1),j(Pi,"loadElementsFonts",async e=>{let t=Pi.getUniqueFamilies(e),n=Pi.getCharsPerFamily(e);return Pi.loadFontFaces(t,n)});var ui=Pi,i7=(e,t,n)=>{let{unitsPerEm:a,ascender:i,descender:r}=ui.registered.get(e)?.metadata.metrics||Kd[it.Virgil].metrics,s=t/a,l=(n-s*i+s*r)/2;return s*i+l},qr=e=>{let{lineHeight:t}=ui.registered.get(e)?.metadata.metrics||Kd[it.Excalifont].metrics;return t},r7=e=>{let{angle:t,width:n,height:a,x:i,y:r}=e,s=i+n/2,l=r+a/2,c=E(s,l),d;return e.type==="diamond"?d=b2(z(E(s,r),c,t),z(E(i+n,l),c,t),z(E(s,r+a),c,t),z(E(i,l),c,t)):d=b2(z(E(i,r),c,t),z(E(i+n,r),c,t),z(E(i+n,r+a),c,t),z(E(i,r+a),c,t)),{type:"polygon",data:d}},fL=(e,t,n=10)=>{let[a,i,r,s,l,c]=he(e,t,!0);a-=n,r+=n,i-=n,s+=n;let d=E(l,c),o=z(E(a,i),d,e.angle),u=z(E(r,i),d,e.angle),h=z(E(a,s),d,e.angle),p=z(E(r,s),d,e.angle);return{type:"polygon",data:[o,u,p,h]}},hL=e=>{let{width:t,height:n,angle:a,x:i,y:r}=e;return{type:"ellipse",data:{center:E(i+t/2,r+n/2),angle:a,halfWidth:t/2,halfHeight:n/2}}},ur=e=>{if(!e)return[];for(let t of e.sets)if(t.type==="path")return t.ops;return e.sets[0].ops},pL=(e,t=E(0,0),n,a)=>{let i=c=>z(E(c[0]+t[0],c[1]+t[1]),a,n),r=ur(e),s=[],l=E(0,0);for(let c of r){if(c.op==="move"){let d=W0(c.data);nn(d!=null,"Ops data is not a point"),l=i(d)}if(c.op==="bcurveTo"){let d=i(E(c.data[0],c.data[1])),o=i(E(c.data[2],c.data[3])),u=i(E(c.data[4],c.data[5]));s.push(li(l,d,o,u)),l=u}}return{type:"polycurve",data:s}},UL=e=>{let t=e[0],n=[];for(let a=1;a<e.length;a++){let i=e[a];n.push(re(t,i)),t=i}return n},mL=(e,t,n=!1)=>{let a=r=>z(ke(Wi(ie(r),Wt(e.x,e.y))),t,e.angle),i=UL(e.points.map(r=>a(r)));return n?{type:"polygon",data:Wd(i.flat())}:{type:"polyline",data:i}},gL=(e,t,n=E(0,0),a,i)=>{let r=o=>z(E(o[0]+n[0],o[1]+n[1]),i,a);if(e.roundness===null)return{type:"polygon",data:Wd(e.points.map(o=>r(o)))};let s=ur(t),l=[],c=!1;for(let o of s)o.op==="move"?(c=!c,c&&l.push(E(o.data[0],o.data[1]))):o.op==="bcurveTo"?c&&(l.push(E(o.data[0],o.data[1])),l.push(E(o.data[2],o.data[3])),l.push(E(o.data[4],o.data[5]))):o.op==="lineTo"&&c&&l.push(E(o.data[0],o.data[1]));let d=nM(l,10,5).map(o=>r(o));return{type:"polygon",data:Wd(d)}},bL=(e,t)=>{let{angle:n,halfWidth:a,halfHeight:i,center:r}=t,s=a,l=i,c=Wi(ie(e),Ut(ie(r),-1)),[d,o]=z(ke(c),E(0,0),-n),u=Math.abs(d),h=Math.abs(o),p=.707,U=.707;for(let b=0;b<3;b++){let x=s*p,v=l*U,y=(s*s-l*l)*p**3/s,w=(l*l-s*s)*U**3/l,k=x-y,C=v-w,I=u-y,A=h-w,_=Math.hypot(C,k),T=Math.hypot(A,I);p=Math.min(1,Math.max(0,(I*_/T+y)/s)),U=Math.min(1,Math.max(0,(A*_/T+w)/l));let D=Math.hypot(U,p);p/=D,U/=D}let[m,g]=[s*p*Math.sign(d),l*U*Math.sign(o)];return Pe(E(d,o),E(m,g))},vL=(e,t,n=1e-4)=>bL(e,t)<=n,xL=(e,t)=>{let{center:n,angle:a,halfWidth:i,halfHeight:r}=t,s=Wi(ie(e),Ut(ie(n),-1)),[l,c]=z(ke(s),E(0,0),-a);return l/i*(l/i)+c/r*(c/r)<=1},M1=(e,t,n=0)=>{switch(t.type){case"polygon":return aI(e,t.data,n);case"ellipse":return vL(e,t.data,n);case"line":return Vr(e,t.data,n);case"polyline":return l7(e,t.data,n);case"curve":return s7(e,t.data,n);case"polycurve":return yL(e,t.data,n);default:throw Error(`shape ${t} is not implemented`)}},qd=(e,t)=>{switch(t.type){case"polygon":return v2(e,t.data);case"line":return!1;case"curve":return!1;case"ellipse":return xL(e,t.data);case"polyline":{let n=Wd(t.data.flat());return v2(e,n)}case"polycurve":return!1;default:throw Error(`shape ${t} is not implemented`)}},yL=(e,t,n)=>t.some(a=>s7(e,a,n)),wL=e=>{let[t,n,a,i]=e;return(r,s)=>Math.pow(1-r,3)*i[s]+3*r*Math.pow(1-r,2)*a[s]+3*Math.pow(r,2)*(1-r)*n[s]+t[s]*Math.pow(r,3)},EL=(e,t=10)=>{let n=wL(e),a=[n(0,0),n(0,1)],i=[],r=0,s=1/t;for(let l=0;l<t;l++)if(r+=s,r<=1){let c=E(n(r,0),n(r,1));i.push(re(a,c)),a=c}return i},s7=(e,t,n)=>l7(e,EL(t),n),l7=(e,t,n=1e-4)=>t.some(a=>Vr(e,a,n));function o7(e,t,n){return{center:e,halfWidth:t,halfHeight:n}}var SL=(e,t)=>{let{halfWidth:n,halfHeight:a,center:i}=t,r=n,s=a,l=Wi(ie(e),Ut(ie(i),-1)),c=Math.abs(l[0]),d=Math.abs(l[1]),o=.707,u=.707;for(let U=0;U<3;U++){let m=r*o,g=s*u,b=(r*r-s*s)*o**3/r,x=(s*s-r*r)*u**3/s,v=m-b,y=g-x,w=c-b,k=d-x,C=Math.hypot(y,v),I=Math.hypot(k,w);o=Math.min(1,Math.max(0,(w*C/I+b)/r)),u=Math.min(1,Math.max(0,(k*C/I+x)/s));let A=Math.hypot(u,o);o/=A,u/=A}let[h,p]=[r*o*Math.sign(l[0]),s*u*Math.sign(l[1])];return Pe(ke(l),E(h,p))};function kL({center:e,halfWidth:t,halfHeight:n},[a,i]){let[r,s]=e,l=a[0]-r,c=a[1]-s,d=i[0]-r,o=i[1]-s,u=Math.pow(d-l,2)/Math.pow(t,2)+Math.pow(o-c,2)/Math.pow(n,2),h=2*(l*(d-l)/Math.pow(t,2)+c*(o-c)/Math.pow(n,2)),p=Math.pow(l,2)/Math.pow(t,2)+Math.pow(c,2)/Math.pow(n,2)-1,U=(-h+Math.sqrt(Math.pow(h,2)-4*u*p))/(2*u),m=(-h-Math.sqrt(Math.pow(h,2)-4*u*p))/(2*u),g=[E(l+U*(d-l)+r,c+U*(o-c)+s),E(l+m*(d-l)+r,c+m*(o-c)+s)].filter(b=>!isNaN(b[0])&&!isNaN(b[1]));return g.length===2&&pa(g[0],g[1])?[g[0]]:g}function c7(e,t=0){let n=ca(Math.min(e.width,e.height),e);if(n<=0){let u=v1(E(e.x-t,e.y-t),E(e.x+e.width+t,e.y+e.height+t)),h=re(E(u[0][0]+n,u[0][1]),E(u[1][0]-n,u[0][1])),p=re(E(u[1][0],u[0][1]+n),E(u[1][0],u[1][1]-n)),U=re(E(u[0][0]+n,u[1][1]),E(u[1][0]-n,u[1][1])),m=re(E(u[0][0],u[1][1]-n),E(u[0][0],u[0][1]+n));return[[h,p,U,m],[]]}let a=E(e.x+e.width/2,e.y+e.height/2),i=v1(E(e.x,e.y),E(e.x+e.width,e.y+e.height)),r=re(E(i[0][0]+n,i[0][1]),E(i[1][0]-n,i[0][1])),s=re(E(i[1][0],i[0][1]+n),E(i[1][0],i[1][1]-n)),l=re(E(i[0][0]+n,i[1][1]),E(i[1][0]-n,i[1][1])),c=re(E(i[0][0],i[1][1]-n),E(i[0][0],i[0][1]+n)),d=[Ut(en(ie(E(i[0][0]-t,i[0][1]-t),a)),t),Ut(en(ie(E(i[1][0]+t,i[0][1]-t),a)),t),Ut(en(ie(E(i[1][0]+t,i[1][1]+t),a)),t),Ut(en(ie(E(i[0][0]-t,i[1][1]+t),a)),t)],o=[li(ke(d[0],c[1]),ke(d[0],E(c[1][0]+2/3*(i[0][0]-c[1][0]),c[1][1]+2/3*(i[0][1]-c[1][1]))),ke(d[0],E(r[0][0]+2/3*(i[0][0]-r[0][0]),r[0][1]+2/3*(i[0][1]-r[0][1]))),ke(d[0],r[0])),li(ke(d[1],r[1]),ke(d[1],E(r[1][0]+2/3*(i[1][0]-r[1][0]),r[1][1]+2/3*(i[0][1]-r[1][1]))),ke(d[1],E(s[0][0]+2/3*(i[1][0]-s[0][0]),s[0][1]+2/3*(i[0][1]-s[0][1]))),ke(d[1],s[0])),li(ke(d[2],s[1]),ke(d[2],E(s[1][0]+2/3*(i[1][0]-s[1][0]),s[1][1]+2/3*(i[1][1]-s[1][1]))),ke(d[2],E(l[1][0]+2/3*(i[1][0]-l[1][0]),l[1][1]+2/3*(i[1][1]-l[1][1]))),ke(d[2],l[1])),li(ke(d[3],l[0]),ke(d[3],E(l[0][0]+2/3*(i[0][0]-l[0][0]),l[0][1]+2/3*(i[1][1]-l[0][1]))),ke(d[3],E(c[0][0]+2/3*(i[0][0]-c[0][0]),c[0][1]+2/3*(i[1][1]-c[0][1]))),ke(d[3],c[0]))];return[[re(o[0][3],o[1][0]),re(o[1][3],o[2][0]),re(o[2][3],o[3][0]),re(o[3][3],o[0][0])],o]}function d7(e,t=0){let[n,a,i,r,s,l,c,d]=_7(e),o=ca(Math.abs(n-c),e),u=ca(Math.abs(r-a),e);if(e.roundness?.type==null){let[v,y,w,k]=[E(e.x+n,e.y+a-t),E(e.x+i+t,e.y+r),E(e.x+s,e.y+l+t),E(e.x+c-t,e.y+d)],C=re(E(v[0]+o,v[1]+u),E(y[0]-o,y[1]-u)),I=re(E(y[0]-o,y[1]+u),E(w[0]+o,w[1]-u)),A=re(E(w[0]-o,w[1]-u),E(k[0]+o,k[1]+u)),_=re(E(k[0]+o,k[1]-u),E(v[0]-o,v[1]+u));return[[C,I,A,_],[]]}let h=E(e.x+e.width/2,e.y+e.height/2),[p,U,m,g]=[E(e.x+n,e.y+a),E(e.x+i,e.y+r),E(e.x+s,e.y+l),E(e.x+c,e.y+d)],b=[Ut(en(ie(U,h)),t),Ut(en(ie(m,h)),t),Ut(en(ie(g,h)),t),Ut(en(ie(p,h)),t)],x=[li(ke(b[0],E(U[0]-o,U[1]-u)),ke(b[0],U),ke(b[0],U),ke(b[0],E(U[0]-o,U[1]+u))),li(ke(b[1],E(m[0]+o,m[1]-u)),ke(b[1],m),ke(b[1],m),ke(b[1],E(m[0]-o,m[1]-u))),li(ke(b[2],E(g[0]+o,g[1]+u)),ke(b[2],g),ke(b[2],g),ke(b[2],E(g[0]+o,g[1]-u))),li(ke(b[3],E(p[0]-o,p[1]+u)),ke(b[3],p),ke(b[3],p),ke(b[3],E(p[0]+o,p[1]+u)))];return[[re(x[0][3],x[1][0]),re(x[1][3],x[2][0]),re(x[2][3],x[3][0]),re(x[3][3],x[0][0])],x]}var I1=e=>{if(e.type==="arrow")return!1;let t=!ia(e.backgroundColor)||Wn(e)||Pn(e)||q(e);return e.type==="line"||e.type==="freedraw"?t&&mi(e.points):t||Le(e)},Es=({x:e,y:t,element:n,shape:a,threshold:i=10,frameNameBound:r=null})=>{let s=I1(n)&&qd(E(e,t),a)||M1(E(e,t),a,i);return!s&&r&&(s=qd(E(e,t),{type:"polygon",data:r7(r).data})),s},sp=(e,t,n,a,i=0)=>{let[r,s,l,c]=ma(n,a);return r-=i,s-=i,l+=i,c+=i,m8(E(r,s),E(e,t),E(l,c))},CL=(e,t)=>!Es(e)&&!u7(e.x,e.y,h7(e.element,t))&&sp(e.x,e.y,e.element,t),u7=(e,t,n)=>!!n&&qd(E(e,t),n),f7=(e,t,n=0)=>{switch(e.type){case"rectangle":case"image":case"text":case"iframe":case"embeddable":case"frame":case"magicframe":return ML(e,t,n);case"diamond":return IL(e,t,n);case"ellipse":return _L(e,t,n);default:throw new Error(`Unimplemented element type '${e.type}'`)}},ML=(e,t,n=0)=>{let a=E(e.x+e.width/2,e.y+e.height/2),i=z(t[0],a,-e.angle),r=z(t[1],a,-e.angle),[s,l]=c7(e,n);return[...s.map(c=>To(re(i,r),c)).filter(c=>c!=null).map(c=>z(c,a,e.angle)),...l.flatMap(c=>g8(c,re(i,r))).filter(c=>c!=null).map(c=>z(c,a,e.angle))].filter((c,d,o)=>o.findIndex(u=>pa(c,u))===d)},IL=(e,t,n=0)=>{let a=E(e.x+e.width/2,e.y+e.height/2),i=z(t[0],a,-e.angle),r=z(t[1],a,-e.angle),[s,l]=d7(e,n);return[...s.map(c=>To(re(i,r),c)).filter(c=>c!=null).map(c=>z(c,a,e.angle)),...l.flatMap(c=>g8(c,re(i,r))).filter(c=>c!=null).map(c=>z(c,a,e.angle))].filter((c,d,o)=>o.findIndex(u=>pa(c,u))===d)},_L=(e,t,n=0)=>{let a=E(e.x+e.width/2,e.y+e.height/2),i=z(t[0],a,-e.angle),r=z(t[1],a,-e.angle);return kL(o7(a,e.width/2+n,e.height/2+n),b1(i,r)).map(s=>z(s,a,e.angle))},Te={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",THREE:"Digit3",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",H:"KeyH",V:"KeyV",Z:"KeyZ",Y:"KeyY",R:"KeyR",S:"KeyS"},R={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:Fa?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SLASH:"/",A:"a",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},TL=new Map([[R.Z,Te.Z],[R.Y,Te.Y]]),AL=e=>/^[a-z]$/.test(e.toLowerCase()),_1=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=TL.get(t);return!!(n&&!AL(e.key)&&e.code===n)},Hl=e=>e===R.ARROW_LEFT||e===R.ARROW_RIGHT||e===R.ARROW_DOWN||e===R.ARROW_UP,uh=e=>e.altKey,Ml=e=>e.shiftKey,ro=e=>e.shiftKey,lp=[{icon:KI,value:"selection",key:R.V,numericKey:R[1],fillable:!0},{icon:qI,value:"rectangle",key:R.R,numericKey:R[2],fillable:!0},{icon:JI,value:"diamond",key:R.D,numericKey:R[3],fillable:!0},{icon:QI,value:"ellipse",key:R.O,numericKey:R[4],fillable:!0},{icon:e_,value:"arrow",key:R.A,numericKey:R[5],fillable:!0},{icon:t_,value:"line",key:R.L,numericKey:R[6],fillable:!0},{icon:Ao,value:"freedraw",key:[R.P,R.X],numericKey:R[7],fillable:!1},{icon:P8,value:"text",key:R.T,numericKey:R[8],fillable:!1},{icon:a_,value:"image",key:null,numericKey:R[9],fillable:!1},{icon:i_,value:"eraser",key:R.E,numericKey:R[0],fillable:!1}],jL=e=>lp.find((t,n)=>t.numericKey!=null&&e===t.numericKey.toString()||t.key&&(typeof t.key=="string"?t.key===e:t.key.includes(e)))?.value||null,ri=(e,t)=>{switch(e.type){case"rectangle":case"diamond":case"frame":case"magicframe":case"embeddable":case"image":case"iframe":case"text":case"selection":return r7(e);case"arrow":case"line":{let n=ut.get(e)?.[0]??ut.generateElementShape(e,null)[0],[,,,,a,i]=he(e,t);return I1(e)?gL(e,n,E(e.x,e.y),e.angle,E(a,i)):pL(n,E(e.x,e.y),e.angle,E(a,i))}case"ellipse":return hL(e);case"freedraw":{let[,,,,n,a]=he(e,t);return mL(e,E(n,a),I1(e))}}},h7=(e,t)=>{let n=ge(e,t);return n?e.type==="arrow"?ri({...n,...J.getBoundTextElementPosition(e,n,t)},t):ri(n,t):null},p7=(e,t)=>{let n=ut.generateElementShape(e,null);if(!n)return null;let a=ur(n[0]),i=E(0,0),r=0,s=1/0,l=null;for(;r<a.length;){let{op:c,data:d}=a[r];if(c==="move"&&(nn(qM(d),"The returned ops is not compatible with a point"),i=d),c==="bcurveTo"){let o=i,u=E(d[0],d[1]),h=E(d[2],d[3]),p=E(d[4],d[5]),U=Pe(p,t);U<s&&(s=U,l=[o,u,h,p]),i=p}r++}return l},U7=(e,t,n,a,i)=>{let r=(c,d)=>Math.pow(1-c,3)*a[d]+3*c*Math.pow(1-c,2)*n[d]+3*Math.pow(c,2)*(1-c)*t[d]+e[d]*Math.pow(c,3),s=r(i,0),l=r(i,1);return E(s,l)},RL=(e,t)=>{let n=p7(e,t);if(!n)return[];let a=[],i=1;for(;i>0;){let r=U7(n[0],n[1],n[2],n[3],i);a.push(E(r[0],r[1])),i-=.05}return a.length&&pa(a.at(-1),t)&&a.push(E(t[0],t[1])),a},m7=(e,t)=>{let n=[];n[0]=0;let a=RL(e,t),i=0,r=0;for(;i<a.length-1;){let s=Pe(a[i],a[i+1]);r+=s,n.push(r),i++}return n},DL=(e,t)=>m7(e,t).at(-1),LL=(e,t,n)=>{let a=m7(e,t),i=a.length-1,r=a.at(-1),s=n*r,l=0,c=i,d=0;for(;l<c;)d=Math.floor(l+(c-l)/2),a[d]<s?l=d+1:c=d;return a[d]>s&&d--,a[d]===s?d/i:1-(d+(s-a[d])/(a[d+1]-a[d]))/i},Ta=(e,t)=>{let n={minX:e.x,minY:e.y,maxX:e.x+e.width,maxY:e.y+e.height,midX:e.x+e.width/2,midY:e.y+e.height/2},a=E(n.midX,n.midY),[i,r]=z(E(n.minX,n.minY),a,e.angle),[s,l]=z(E(n.maxX,n.minY),a,e.angle),[c,d]=z(E(n.maxX,n.maxY),a,e.angle),[o,u]=z(E(n.minX,n.maxY),a,e.angle),h=[Math.min(i,s,c,o),Math.min(r,l,d,u),Math.max(i,s,c,o),Math.max(r,l,d,u)];if(t){let[p,U,m,g]=t;return[h[0]-g,h[1]-p,h[2]+U,h[3]+m]}return h},Ks=(e,t)=>e[0]>t[0]&&e[0]<t[2]&&e[1]>t[1]&&e[1]<t[3],ca=(e,t)=>{if(t.roundness?.type===St.PROPORTIONAL_RADIUS||t.roundness?.type===St.LEGACY)return e*nh;if(t.roundness?.type===St.ADAPTIVE_RADIUS){let n=t.roundness?.value??BM,a=n/nh;return e<=a?e*nh:n}return 0},mi=(e,t=1)=>{if(e.length>=3){let[n,a]=[e[0],e[e.length-1]];return Pe(n,a)<=ad/t}return!1},Nt=10,PL=(e,t,n,a,i,r,s)=>{let{width:l,height:c}=gi(e),d=n/l,o=a/c,u=(e.crop?.x??0)/d,h=(e.crop?.y??0)/o,p=z(E(i,r),E(e.x+e.width/2,e.y+e.height/2),-e.angle);i=p[0],r=p[1];let U=e.width,m=e.height,g=e.crop??{x:0,y:0,width:n,height:a,naturalWidth:n,naturalHeight:a},b=g.height,x=g.width,v=e.scale[0]===-1,y=e.scale[1]===-1,w=r-e.y,k=i-e.x;t.includes("n")&&(m=Se(e.height-w,Nt,y?c-h:e.height+h)),t.includes("s")&&(w=r-e.y-e.height,m=Se(e.height+w,Nt,y?e.height+h:c-h)),t.includes("e")&&(k=i-e.x-e.width,U=Se(e.width+k,Nt,v?e.width+u:l-u)),t.includes("w")&&(U=Se(e.width-k,Nt,v?l-u:e.width+u));let C=_=>{_.height=m*o,_.width=U*d};C(g);let I=(_,T)=>{C(T),_.includes("n")&&(y||(T.y+=b-T.height)),_.includes("s")&&y&&(T.y+=b-T.height),_.includes("e")&&v&&(T.x+=x-T.width),_.includes("w")&&(v||(T.x+=x-T.width))};switch(t){case"n":{if(s){let _=u+e.width/2,T=l-u-e.width/2,D=Math.min(_,T)*2;U=Se(m*s,Nt,D),m=U/s}I(t,g),s&&(g.x+=(x-g.width)/2);break}case"s":{if(s){let _=u+e.width/2,T=l-u-e.width/2,D=Math.min(_,T)*2;U=Se(m*s,Nt,D),m=U/s}I(t,g),s&&(g.x+=(x-g.width)/2);break}case"w":{if(s){let _=h+e.height/2,T=c-h-e.height/2,D=Math.min(_,T)*2;m=Se(U/s,Nt,D),U=m*s}I(t,g),s&&(g.y+=(b-g.height)/2);break}case"e":{if(s){let _=h+e.height/2,T=c-h-e.height/2,D=Math.min(_,T)*2;m=Se(U/s,Nt,D),U=m*s}I(t,g),s&&(g.y+=(b-g.height)/2);break}case"ne":{if(s)if(k>-w){let _=y?c-h:h+e.height;m=Se(U/s,Nt,_),U=m*s}else{let _=v?u+e.width:l-u;U=Se(m*s,Nt,_),m=U/s}I(t,g);break}case"nw":{if(s)if(k<w){let _=y?c-h:h+e.height;m=Se(U/s,Nt,_),U=m*s}else{let _=v?l-u:u+e.width;U=Se(m*s,Nt,_),m=U/s}I(t,g);break}case"se":{if(s)if(k>w){let _=y?h+e.height:c-h;m=Se(U/s,Nt,_),U=m*s}else{let _=v?u+e.width:l-u;U=Se(m*s,Nt,_),m=U/s}I(t,g);break}case"sw":{if(s)if(-k>w){let _=y?h+e.height:c-h;m=Se(U/s,Nt,_),U=m*s}else{let _=v?l-u:u+e.width;U=Se(m*s,Nt,_),m=U/s}I(t,g);break}}let A=NL(e,t,U,m,!!s);return U2(g.width,g.naturalWidth)&&U2(g.height,g.naturalHeight)&&(g=null),{x:A[0],y:A[1],width:U,height:m,crop:g}},NL=(e,t,n,a,i)=>{let[r,s,l,c]=qi(e,e.width,e.height,!0),d=E(r,s),o=E(l,c),u=Qo(d,o),[h,p,U,m]=qi(e,n,a,!0),g=U-h,b=m-p,x=[...d];if(["n","w","nw"].includes(t)&&(x=[o[0]-Math.abs(g),o[1]-Math.abs(b)]),t==="ne"){let I=[d[0],o[1]];x=[I[0],I[1]-Math.abs(b)]}if(t==="sw"){let I=[o[0],d[1]];x=[I[0]-Math.abs(g),I[1]]}i&&(["s","n"].includes(t)&&(x[0]=u[0]-g/2),["e","w"].includes(t)&&(x[1]=u[1]-b/2));let v=e.angle,y=z(x,u,v),w=[x[0]+Math.abs(g)/2,x[1]+Math.abs(b)/2],k=z(w,u,v);x=z(y,k,-v);let C=[...x];return C[0]+=e.x-h,C[1]+=e.y-p,C},OL=(e,t)=>{if(e.crop){let{width:n,height:a}=gi(e),[i,r,s,l,c,d]=he(e,t),o=ie(z(E(i,r),E(c,d),e.angle)),u=ie(z(E(s,r),E(c,d),e.angle)),h=en(Hd(u,o)),p=ie(z(E(i,l),E(c,d),e.angle)),U=Hd(p,o),m=en(U),{cropX:g,cropY:b}=$L(e.crop,e.scale),x=Wi(Wi(o,Ut(h,-g*n/e.crop.naturalWidth)),Ut(m,-b*a/e.crop.naturalHeight)),v=ke(Wi(Wi(x,Ut(h,n/2)),Ut(m,a/2))),y=z(ke(x),v,-e.angle);return{...e,x:y[0],y:y[1],width:n,height:a,crop:null}}return e},gi=e=>{if(e.crop){let t=e.width/(e.crop.width/e.crop.naturalWidth),n=e.height/(e.crop.height/e.crop.naturalHeight);return{width:t,height:n}}return{width:e.width,height:e.height}},$L=(e,t)=>{let n=e.x,a=e.y,i=t[0]===-1,r=t[1]===-1;return i&&(n=e.naturalWidth-Math.abs(n)-e.width),r&&(a=e.naturalHeight-Math.abs(a)-e.height),{cropX:n,cropY:a}},FL=(e,t=!1)=>{let n=e.crop;if(!n)return null;let a=e.scale[0]===-1,i=e.scale[1]===-1,r=n.x,s=n.y;if(a&&(r=n.naturalWidth-n.width-n.x),i&&(s=n.naturalHeight-n.height-n.y),t)return{x:r,y:s};let{width:l,height:c}=gi(e);return{x:r/(n.naturalWidth/l),y:s/(n.naturalHeight/c)}},g7="invert(100%) hue-rotate(180deg) saturate(1.25)",zL=za(),b7=(e,t)=>Ln(e)&&!t.imageCache.has(e.fileId),v7=(e,t,n)=>n.theme===Ce.DARK&&Ln(e)&&!b7(e,t)&&t.imageCache.get(e.fileId)?.mimeType!==ae.svg,Xu=e=>{switch(e.type){case"freedraw":return e.strokeWidth*12;case"text":return e.fontSize/2;default:return 20}},x7=(e,t,n,a,i=1)=>{let r=(t?.opacity??100)*e.opacity/1e4*i;return(n.has(e.id)||a&&a.some(s=>s.id===e.id)||t&&n.has(t.id))&&(r*=zM/100),r},BL=(e,t,n)=>{let a=Xu(e),[i,r,s,l]=he(e,t),c=ue(e)||Xn(e)?Jt(i,s):e.width,d=ue(e)||Xn(e)?Jt(r,l):e.height,o=c*window.devicePixelRatio+a*2,u=d*window.devicePixelRatio+a*2,h=n.value;return(o*h>32767||u*h>32767)&&(h=Math.min(32767/o,32767/u)),o*u*h*h>16777216&&(h=Math.sqrt(16777216/(o*u))),o=Math.floor(o*h),u=Math.floor(u*h),{width:o,height:u,scale:h}},y7=(e,t,n,a,i)=>{let r=document.createElement("canvas"),s=r.getContext("2d"),l=Xu(e),{width:c,height:d,scale:o}=BL(e,t,n);if(!c||!d)return null;r.width=c,r.height=d;let u=-100,h=0;if(ue(e)||Xn(e)){let[b,x]=he(e,t);u=e.x>b?Jt(e.x,b)*window.devicePixelRatio*o:0,h=e.y>x?Jt(e.y,x)*window.devicePixelRatio*o:0,s.translate(u,h)}s.save(),s.translate(l*o,l*o),s.scale(window.devicePixelRatio*o,window.devicePixelRatio*o);let p=cr.canvas(r);v7(e,a,i)&&(s.filter=g7),dd(e,p,s,a),s.restore();let U=ge(e,t),m=document.createElement("canvas"),g=m.getContext("2d");if(xe(e)&&U){let[b,x,v,y]=he(e,t),w=Math.max(Jt(b,v),Jt(x,y));m.width=w*window.devicePixelRatio*o+l*o*10,m.height=w*window.devicePixelRatio*o+l*o*10,g.translate(m.width/2,m.height/2),g.rotate(e.angle),g.drawImage(r,-r.width/2,-r.height/2,r.width,r.height);let[,,,,k,C]=he(U,t);g.rotate(-e.angle);let I=(m.width-r.width)/2,A=(m.height-r.height)/2,_=m.width/2-(k-b)*window.devicePixelRatio*o-I-l*o,T=m.height/2-(C-x)*window.devicePixelRatio*o-A-l*o;g.translate(-_,-T),g.clearRect(-(U.width/2+It)*window.devicePixelRatio*o,-(U.height/2+It)*window.devicePixelRatio*o,(U.width+It*2)*window.devicePixelRatio*o,(U.height+It*2)*window.devicePixelRatio*o)}return{element:e,canvas:r,theme:i.theme,scale:o,zoomValue:n.value,canvasOffsetX:u,canvasOffsetY:h,boundTextElementVersion:ge(e,t)?.version||null,containingFrameOpacity:wn(e,t)?.opacity||100,boundTextCanvas:m,angle:e.angle,imageCrop:Le(e)?e.crop:null}},HL=14,w7=document.createElement("img");w7.src=`data:${ae.svg},${encodeURIComponent('<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="image" class="svg-inline--fa fa-image fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#888" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg>')}`;var E7=document.createElement("img");E7.src=`data:${ae.svg},${encodeURIComponent('<svg viewBox="0 0 668 668" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48ZM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56ZM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.81709 0 0 .81709 124.825 145.825)"/><path d="M256 8C119.034 8 8 119.033 8 256c0 136.967 111.034 248 248 248s248-111.034 248-248S392.967 8 256 8Zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676ZM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.30366 0 0 .30366 506.822 60.065)"/></svg>')}`;var XL=(e,t)=>{t.fillStyle="#E7E7E7",t.fillRect(0,0,e.width,e.height);let n=Math.min(e.width,e.height),a=Math.min(n,Math.min(n*.4,100));t.drawImage(e.status==="error"?E7:w7,e.width/2-a/2,e.height/2-a/2,a,a)},dd=(e,t,n,a,i)=>{switch(e.type){case"rectangle":case"iframe":case"embeddable":case"diamond":case"ellipse":{n.lineJoin="round",n.lineCap="round",t.draw(ut.get(e));break}case"arrow":case"line":{n.lineJoin="round",n.lineCap="round",ut.get(e).forEach(r=>{t.draw(r)});break}case"freedraw":{n.save(),n.fillStyle=e.strokeColor;let r=GL(e),s=ut.get(e);s&&t.draw(s),n.fillStyle=e.strokeColor,n.fill(r),n.restore();break}case"image":{let r=Ln(e)?a.imageCache.get(e.fileId)?.image:void 0;if(r!=null&&!(r instanceof Promise)){e.roundness&&n.roundRect&&(n.beginPath(),n.roundRect(0,0,e.width,e.height,ca(Math.min(e.width,e.height),e)),n.clip());let{x:s,y:l,width:c,height:d}=e.crop?e.crop:{x:0,y:0,width:r.naturalWidth,height:r.naturalHeight};n.drawImage(r,s,l,c,d,0,0,e.width,e.height)}else XL(e,n);break}default:if(q(e)){let r=x8(e.text),s=r&&!n.canvas.isConnected;s&&document.body.appendChild(n.canvas),n.canvas.setAttribute("dir",r?"rtl":"ltr"),n.save(),n.font=Xe(e),n.fillStyle=e.strokeColor,n.textAlign=e.textAlign;let l=e.text.replace(/\r\n?/g,`
|
|
16
16
|
`).split(`
|
|
17
17
|
`),c=e.textAlign==="center"?e.width/2:e.textAlign==="right"?e.width:0,d=tc(e.fontSize,e.lineHeight),o=i7(e.fontFamily,e.fontSize,d);for(let u=0;u<l.length;u++)n.fillText(l[u],c,u*d+o);n.restore(),s&&n.canvas.remove()}else throw new Error(`Unimplemented type ${e.type}`)}},T1=new WeakMap,V2=(e,t,n,a)=>{let i=n?a.zoom:zL.zoom,r=T1.get(e),s=r&&r.zoomValue!==i.value&&!a?.shouldCacheIgnoreZoom,l=ge(e,t),c=l?.version||null,d=Le(e)?e.crop:null,o=wn(e,t)?.opacity||100;if(!r||s||r.theme!==a.theme||r.boundTextElementVersion!==c||r.imageCrop!==d||r.containingFrameOpacity!==o||xe(e)&&l&&e.angle!==r.angle){let u=y7(e,t,i,n,a);return u?(T1.set(e,u),u):null}return r},fh=(e,t,n,a,i)=>{let r=e.element,s=Xu(r),l=e.scale,[c,d,o,u]=he(r,i),h=((c+o)/2+a.scrollX)*window.devicePixelRatio,p=((d+u)/2+a.scrollY)*window.devicePixelRatio;t.save(),t.scale(1/window.devicePixelRatio,1/window.devicePixelRatio);let U=ge(r,i);if(xe(r)&&U){let m=(e.boundTextCanvas.width-e.canvas.width)/2,g=(e.boundTextCanvas.height-e.canvas.height)/2;t.translate(h,p),t.drawImage(e.boundTextCanvas,-(o-c)/2*window.devicePixelRatio-m/l-s,-(u-d)/2*window.devicePixelRatio-g/l-s,e.boundTextCanvas.width/l,e.boundTextCanvas.height/l)}else t.translate(h,p),t.rotate(r.angle),"scale"in e.element&&!b7(r,n)&&t.scale(e.element.scale[0],e.element.scale[1]),t.translate(-h,-p),t.drawImage(e.canvas,(c+a.scrollX)*window.devicePixelRatio-s*e.scale/e.scale,(d+a.scrollY)*window.devicePixelRatio-s*e.scale/e.scale,e.canvas.width/e.scale,e.canvas.height/e.scale),be.VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX;t.restore()},WL=(e,t,n,a)=>{t.save(),t.translate(e.x+n.scrollX,e.y+n.scrollY),t.fillStyle="rgba(0, 0, 200, 0.04)";let i=.5/n.zoom.value;t.fillRect(i,i,e.width,e.height),t.lineWidth=1/n.zoom.value,t.strokeStyle=a,t.strokeRect(i,i,e.width,e.height),t.restore()},wr=(e,t,n,a,i,r,s)=>{let l=s.openDialog?.name==="elementLinkSelector"&&!s.selectedElementIds[e.id]&&!s.hoveredElementIds[e.id];switch(i.globalAlpha=x7(e,wn(e,t),r.elementsPendingErasure,r.pendingFlowchartNodes,l?f8:1),e.type){case"magicframe":case"frame":{s.frameRendering.enabled&&s.frameRendering.outline&&(i.save(),i.translate(e.x+s.scrollX,e.y+s.scrollY),i.fillStyle="rgba(0, 0, 200, 0.04)",i.lineWidth=ct.strokeWidth/s.zoom.value,i.strokeStyle=ct.strokeColor,sd(e)&&(i.strokeStyle=s.theme===Ce.LIGHT?"#7affd7":"#1d8264"),i.roundRect?(i.beginPath(),i.roundRect(0,0,e.width,e.height,ct.radius/s.zoom.value),i.stroke(),i.closePath()):i.strokeRect(0,0,e.width,e.height),i.restore());break}case"freedraw":{if(ut.generateElementShape(e,null),r.isExporting){let[c,d,o,u]=he(e,t),h=(c+o)/2+s.scrollX,p=(d+u)/2+s.scrollY,U=(o-c)/2-(e.x-c),m=(u-d)/2-(e.y-d);i.save(),i.translate(h,p),i.rotate(e.angle),i.translate(-U,-m),dd(e,a,i,r),i.restore()}else{let c=V2(e,n,r,s);if(!c)return;fh(c,i,r,s,n)}break}case"rectangle":case"diamond":case"ellipse":case"line":case"arrow":case"image":case"text":case"iframe":case"embeddable":{if(ut.generateElementShape(e,r),r.isExporting){let[c,d,o,u]=he(e,t),h=(c+o)/2+s.scrollX,p=(d+u)/2+s.scrollY,U=(o-c)/2-(e.x-c),m=(u-d)/2-(e.y-d);if(q(e)){let b=Ht(e,t);if(xe(b)){let x=J.getBoundTextElementPosition(b,e,t);U=(o-c)/2-(x.x-c),m=(u-d)/2-(x.y-d)}}i.save(),i.translate(h,p),v7(e,r,s)&&(i.filter="none");let g=ge(e,t);if(xe(e)&&g){let b=document.createElement("canvas"),x=b.getContext("2d"),v=Math.max(Jt(c,o),Jt(d,u)),y=Xu(e);b.width=v*s.exportScale+y*10*s.exportScale,b.height=v*s.exportScale+y*10*s.exportScale,x.translate(b.width/2,b.height/2),x.scale(s.exportScale,s.exportScale),U=e.width/2-(e.x-c),m=e.height/2-(e.y-d),x.rotate(e.angle);let w=cr.canvas(b);x.translate(-U,-m),dd(e,w,x,r),x.translate(U,m),x.rotate(-e.angle);let[,,,,k,C]=he(g,t),I=(c+o)/2-k,A=(d+u)/2-C;x.translate(-I,-A),x.clearRect(-g.width/2,-g.height/2,g.width,g.height),i.scale(1/s.exportScale,1/s.exportScale),i.drawImage(b,-b.width/2,-b.height/2,b.width,b.height)}else i.rotate(e.angle),e.type==="image"&&i.scale(e.scale[0],e.scale[1]),i.translate(-U,-m),dd(e,a,i,r);i.restore()}else{let c=V2(e,n,r,s);if(!c)return;let d=i.imageSmoothingEnabled;if(!s?.shouldCacheIgnoreZoom&&(!e.angle||YM(e.angle))&&(i.imageSmoothingEnabled=!1),e.id===s.croppingElementId&&Le(c.element)&&c.element.crop!==null){i.save(),i.globalAlpha=.1;let o=y7(OL(c.element,t),n,s.zoom,r,s);o&&fh(o,i,r,s,n),i.restore()}fh(c,i,r,s,n),i.imageSmoothingEnabled=d}break}default:throw new Error(`Unimplemented type ${e.type}`)}i.globalAlpha=1},S7=new WeakMap([]);function VL(e){let t=op(e),n=new Path2D(t);return S7.set(e,n),n}function GL(e){return S7.get(e)}function op(e){let t=e.simulatePressure?e.points:e.points.length?e.points.map(([a,i],r)=>[a,i,e.pressures[r]]):[[0,0,.5]],n={simulatePressure:e.simulatePressure,size:e.strokeWidth*4.25,thinning:.6,smoothing:.5,streamline:.5,easing:a=>Math.sin(a*Math.PI/2),last:!!e.lastCommittedPoint};return ZL(qC(t,n))}function G2(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}var YL=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g;function ZL(e){if(!e.length)return"";let t=e.length-1;return e.reduce((n,a,i,r)=>(i===t?n.push(a,G2(a,r[0]),"L",r[0],"Z"):n.push(a,G2(a,r[i+1])),n),["M",e[0],"Q"]).join(" ").replace(YL,"$1")}var qs=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="ellipse"||e==="diamond"||e==="line"||e==="freedraw",A1=e=>e!=="image"&&e!=="frame"&&e!=="magicframe",Y2=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="ellipse"||e==="diamond"||e==="freedraw"||e==="arrow"||e==="line",Z2=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="ellipse"||e==="diamond"||e==="arrow"||e==="line",j1=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="line"||e==="diamond"||e==="image",K2=e=>e==="arrow",Jd=e=>e==="arrow",pt=[1,0],zt=[0,1],mn=[-1,0],gn=[0,-1],Rc=(e,t)=>{let n=Jo(Math.atan2(t[1]-e[1],t[0]-e[0]));return n>=315||n<45?gn:n>=45&&n<135?pt:n>=135&&n<225?zt:mn},Jr=e=>{let[t,n]=e,a=Math.abs(t),i=Math.abs(n);return t>i?pt:t<=-i?mn:n>a?zt:gn},jo=(e,t)=>Jr(ie(e,t)),si=(e,t)=>oi(jo(e,t)),mt=(e,t)=>e[0]===t[0]&&e[1]===t[1],oi=e=>mt(e,pt)||mt(e,mn),k7=(e,t,n)=>{let a=up(t);if(e.type==="diamond"){if(n[0]<e.x)return mn;if(n[1]<e.y)return gn;if(n[0]>e.x+e.width)return pt;if(n[1]>e.y+e.height)return zt;let c=z(ei(E(e.x+e.width/2,e.y),a,2),a,e.angle),d=z(ei(E(e.x+e.width,e.y+e.height/2),a,2),a,e.angle),o=z(ei(E(e.x+e.width/2,e.y+e.height),a,2),a,e.angle),u=z(ei(E(e.x,e.y+e.height/2),a,2),a,e.angle);return hs([c,d,a],n)?Rc(c,d):hs([d,o,a],n)?Rc(d,o):hs([o,u,a],n)?Rc(o,u):Rc(u,c)}let i=ei(E(t[0],t[1]),a,2),r=ei(E(t[2],t[1]),a,2),s=ei(E(t[0],t[3]),a,2),l=ei(E(t[2],t[3]),a,2);return hs([i,r,a],n)?gn:hs([r,l,a],n)?pt:hs([l,s,a],n)?zt:mn},C7=e=>[e[0]===0?0:e[0]>0?-1:1,e[1]===0?0:e[1]>0?-1:1],KL=e=>[8,8+e],M7=e=>[1.5,6+e];function qL(e){let t=e.roughness,n=Math.max(e.width,e.height),a=Math.min(e.width,e.height);return a>=20&&n>=50||a>=15&&e.roundness&&j1(e.type)||ue(e)&&n>=50?t:Math.min(t/(n<10?3:2),2.5)}var kn=(e,t=!1)=>{let n={seed:e.seed,strokeLineDash:e.strokeStyle==="dashed"?KL(e.strokeWidth):e.strokeStyle==="dotted"?M7(e.strokeWidth):void 0,disableMultiStroke:e.strokeStyle!=="solid",strokeWidth:e.strokeStyle!=="solid"?e.strokeWidth+.5:e.strokeWidth,fillWeight:e.strokeWidth/2,hachureGap:e.strokeWidth*4,roughness:qL(e),stroke:e.strokeColor,preserveVertices:t||e.roughness<c8.cartoonist};switch(e.type){case"rectangle":case"iframe":case"embeddable":case"diamond":case"ellipse":return n.fillStyle=e.fillStyle,n.fill=ia(e.backgroundColor)?void 0:e.backgroundColor,e.type==="ellipse"&&(n.curveFitting=1),n;case"line":case"freedraw":return mi(e.points)&&(n.fillStyle=e.fillStyle,n.fill=e.backgroundColor==="transparent"?void 0:e.backgroundColor),n;case"arrow":return n;default:throw new Error(`Unimplemented type ${e.type}`)}},q2=(e,t,n)=>Pn(e)&&(t||Un(e)&&n?.get(e.id)!==!0)&&ia(e.backgroundColor)&&ia(e.strokeColor)?{...e,roughness:0,backgroundColor:"#d3d3d3",fillStyle:"solid"}:$i(e)?{...e,strokeColor:ia(e.strokeColor)?"#000000":e.strokeColor,backgroundColor:ia(e.backgroundColor)?"#f4f4f6":e.backgroundColor}:e,J2=(e,t,n,a,i,r,s)=>{let l=ng(e,t,n,a);if(l===null)return[];let c=(d,o)=>{if(d===null)return[];let[,,u,h,p,U]=d;return[i.line(u,h,p,U,o)]};switch(a){case"dot":case"circle":case"circle_outline":{let[d,o,u]=l;return delete r.strokeLineDash,[i.circle(d,o,u,{...r,fill:a==="circle_outline"?s:e.strokeColor,fillStyle:"solid",stroke:e.strokeColor,roughness:Math.min(.5,r.roughness||0)})]}case"triangle":case"triangle_outline":{let[d,o,u,h,p,U]=l;return delete r.strokeLineDash,[i.polygon([[d,o],[u,h],[p,U],[d,o]],{...r,fill:a==="triangle_outline"?s:e.strokeColor,fillStyle:"solid",roughness:Math.min(1,r.roughness||0)})]}case"diamond":case"diamond_outline":{let[d,o,u,h,p,U,m,g]=l;return delete r.strokeLineDash,[i.polygon([[d,o],[u,h],[p,U],[m,g],[d,o]],{...r,fill:a==="diamond_outline"?s:e.strokeColor,fillStyle:"solid",roughness:Math.min(1,r.roughness||0)})]}case"crowfoot_one":return c(l,r);default:{let[d,o,u,h,p,U]=l;if(e.strokeStyle==="dotted"){let m=M7(e.strokeWidth-1);r.strokeLineDash=[m[0],m[1]-1]}else delete r.strokeLineDash;return r.roughness=Math.min(1,r.roughness||0),[i.line(u,h,d,o,r),i.line(p,U,d,o,r),...a==="crowfoot_one_or_many"?c(ng(e,t,n,"crowfoot_one"),r):[]]}}},JL=(e,t,{isExporting:n,canvasBackgroundColor:a,embedsValidationStatus:i})=>{switch(e.type){case"rectangle":case"iframe":case"embeddable":{let r;if(e.roundness){let s=e.width,l=e.height,c=ca(Math.min(s,l),e);r=t.path(`M ${c} 0 L ${s-c} 0 Q ${s} 0, ${s} ${c} L ${s} ${l-c} Q ${s} ${l}, ${s-c} ${l} L ${c} ${l} Q 0 ${l}, 0 ${l-c} L 0 ${c} Q 0 0, ${c} 0`,kn(q2(e,n,i),!0))}else r=t.rectangle(0,0,e.width,e.height,kn(q2(e,n,i),!1));return r}case"diamond":{let r,[s,l,c,d,o,u,h,p]=_7(e);if(e.roundness){let U=ca(Math.abs(s-h),e),m=ca(Math.abs(d-l),e);r=t.path(`M ${s+U} ${l+m} L ${c-U} ${d-m}
|
|
18
18
|
C ${c} ${d}, ${c} ${d}, ${c-U} ${d+m}
|
|
@@ -38,7 +38,7 @@ PQIDAQAB`,VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX:"false",VITE_APP_COL
|
|
|
38
38
|
`,I=x.ownerDocument.createElementNS(Ae,"style");if(I.classList.add("style-fonts"),I.appendChild(document.createTextNode(`${C}${k.join(C)}`)),v.appendChild(I),t.exportBackground&&l){let T=x.ownerDocument.createElementNS(Ae,"rect");T.setAttribute("x","0"),T.setAttribute("y","0"),T.setAttribute("width",`${U}`),T.setAttribute("height",`${m}`),T.setAttribute("fill",l),x.appendChild(T)}let A=cr.svg(x),_=a?.renderEmbeddables??!1;return TN(u,Hn(oe(u)),A,x,n||{},{offsetX:g,offsetY:b,isExporting:!0,exportWithDarkMode:s,renderEmbeddables:_,frameRendering:i,canvasBackgroundColor:l,embedsValidationStatus:_?new Map(u.filter(T=>ce(T)).map(T=>[T.id,!0])):new Map,reuseImages:a?.reuseImages??!0}),x},FN=({payload:e,metadataElement:t})=>{let n=o4(JSON.stringify(d4({text:e})),!0);t.appendChild(Xl(`payload-type:${ae.excalidraw}`)),t.appendChild(Xl("payload-version:2")),t.appendChild(Xl("payload-start")),t.appendChild(document.createTextNode(n)),t.appendChild(Xl("payload-end"))},zN=({svg:e})=>{if(e.includes(`payload-type:${ae.excalidraw}`)){let t=e.match(/<!-- payload-start -->\s*(.+?)\s*<!-- payload-end -->/);if(!t)throw new Error("INVALID");let n=(e.match(/<!-- payload-version:(\d+) -->/)?.[1]||"1")!=="1";try{let a=c4(t[1],n),i=JSON.parse(a);if(!("encoded"in i)){if("type"in i&&i.type===Fn.excalidraw)return a;throw new Error("FAILED")}return u4(i)}catch(a){throw console.error(a),new Error("FAILED")}}throw new Error("INVALID")},kp=(e,t)=>{let[n,a,i,r]=Ne(e),s=Jt(n,i)+t*2,l=Jt(a,r)+t*2;return[n,a,s,l]},BN=(e,t,n)=>{let[,,a,i]=kp(e,t).map(r=>Math.trunc(r*n));return[a,i]},HN=class{constructor(t){this.scoreFunction=t,j(this,"content",[])}sinkDown(t){let n=this.content[t];for(;t>0;){let a=(t+1>>1)-1,i=this.content[a];if(this.scoreFunction(n)<this.scoreFunction(i))this.content[a]=n,this.content[t]=i,t=a;else break}}bubbleUp(t){let n=this.content.length,a=this.content[t],i=this.scoreFunction(a);for(;;){let r=t+1<<1,s=r-1,l=null,c=0;if(s<n){let d=this.content[s];c=this.scoreFunction(d),c<i&&(l=s)}if(r<n){let d=this.content[r];this.scoreFunction(d)<(l===null?i:c)&&(l=r)}if(l!==null)this.content[t]=this.content[l],this.content[l]=a,t=l;else break}}push(t){this.content.push(t),this.sinkDown(this.content.length-1)}pop(){if(this.content.length===0)return null;let t=this.content[0],n=this.content.pop();return this.content.length>0&&(this.content[0]=n,this.bubbleUp(0)),t}remove(t){if(this.content.length===0)return;let n=this.content.indexOf(t),a=this.content.pop();n<this.content.length&&(this.content[n]=a,this.scoreFunction(a)<this.scoreFunction(t)?this.sinkDown(n):this.bubbleUp(n))}size(){return this.content.length}rescoreElement(t){this.sinkDown(this.content.indexOf(t))}},Cp=1,ze=40,XN=(e,t)=>{let n=e.fixedSegments?e.fixedSegments.slice():null;if(n){let a=[];e.points.map(s=>E(e.x+s[0],e.y+s[1])).forEach((s,l,c)=>{if(l<2)return a.push(s);let d=jo(s,c[l-1]),o=jo(c[l-1],c[l-2]);if(mt(d,o)){let u=n?.findIndex(p=>p.index===l-1)??-1,h=n?.findIndex(p=>p.index===l)??-1;h!==-1&&(n[h].start=E(c[l-2][0]-e.x,c[l-2][1]-e.y)),u!==-1&&n.splice(u,1),a.splice(-1,1),n.forEach(p=>{p.index>l-1&&(p.index-=1)})}return a.push(s)});let i=[];a.forEach((s,l,c)=>{if(l<3)return i.push(s);if(Pe(c[l-2],c[l-1])<Cp){let d=n?.findIndex(h=>h.index===l-2)??-1,o=n?.findIndex(h=>h.index===l-1)??-1;o!==-1&&n.splice(o,1),d!==-1&&n.splice(d,1),i.splice(-2,2),n.forEach(h=>{h.index>l-2&&(h.index-=2)});let u=si(s,c[l-1]);return i.push(E(u?s[0]:c[l-2][0],u?c[l-2][1]:s[1]))}i.push(s)});let r=n.filter(s=>s.index!==1&&s.index!==i.length-1);return r.length===0?rr(Tp(Ap(_p(e,Ip(e,t,i.map(s=>E(s[0]-e.x,s[1]-e.y)),e.startBinding&&nl(e.startBinding.elementId,t),e.endBinding&&nl(e.endBinding.elementId,t)))??[])),r,null,null):(be.DEV&&nn(jp(i),"Invalid elbow points with fixed segments"),rr(i,r,e.startIsSpecial,e.endIsSpecial))}return{x:e.x,y:e.y,points:e.points,fixedSegments:e.fixedSegments,startIsSpecial:e.startIsSpecial,endIsSpecial:e.endIsSpecial}},WN=(e,t,n)=>{let a=t.map(I=>I.index),i=(e.fixedSegments?.map(I=>I.index)??[]).findIndex(I=>!a.includes(I));if(i===-1||!e.fixedSegments?.[i])return{points:e.points};let r=e.fixedSegments[i].index,s=e.fixedSegments[i-1],l=e.fixedSegments[i+1],c=e.x+(s?s.end[0]:0),d=e.y+(s?s.end[1]:0),o=s?null:e.startBinding,u=l?null:e.endBinding,{startHeading:h,endHeading:p,startGlobalPoint:U,endGlobalPoint:m,hoveredStartElement:g,hoveredEndElement:b,...x}=Ip({x:c,y:d,startBinding:o,endBinding:u,startArrowhead:null,endArrowhead:null,points:e.points},n,[E(0,0),E(e.x+(l?.start[0]??e.points[e.points.length-1][0])-c,e.y+(l?.start[1]??e.points[e.points.length-1][1])-d)],o&&nl(o.elementId,n),u&&nl(u.elementId,n),{isDragging:!1}),{points:v}=rr(Tp(Ap(_p(e,{startHeading:h,endHeading:p,startGlobalPoint:U,endGlobalPoint:m,hoveredEndElement:b,...x})??[])),t,null,null),y=[];if(s)for(let I=0;I<s.index;I++)y.push(E(e.x+e.points[I][0],e.y+e.points[I][1]));if(v.forEach(I=>{y.push(E(e.x+(s?s.end[0]:0)+I[0],e.y+(s?s.end[1]:0)+I[1]))}),l)for(let I=l.index;I<e.points.length;I++)y.push(E(e.x+e.points[I][0],e.y+e.points[I][1]));let w=(l?.index??e.points.length)-(s?.index??0)-1,k=t.map(I=>I.index>r?{...I,index:I.index-w+(v.length-1)}:I),C=y.flatMap((I,A)=>{let _=y[A-1],T=y[A+1];if(_&&T){let D=jo(I,_),L=jo(T,I);if(mt(D,L))return k.forEach(F=>{F.index>A&&(F.index-=1)}),[];if(mt(D,C7(L)))return k.forEach(F=>{F.index>A&&(F.index+=1)}),[I,I]}return[I]});return rr(C,k,!1,!1)},VN=(e,t,n,a,i,r)=>{let s=t.map((w,k)=>e.fixedSegments==null||e.fixedSegments[k]===void 0||e.fixedSegments[k].index!==w.index||(w.start[0]!==e.fixedSegments[k].start[0]&&w.end[0]!==e.fixedSegments[k].end[0])!=(w.start[1]!==e.fixedSegments[k].start[1]&&w.end[1]!==e.fixedSegments[k].end[1])?k:null).filter(w=>w!==null).shift();if(s==null)return{points:e.points};let l=e.fixedSegments?.findIndex(w=>w.index===1)??-1,c=e.fixedSegments?.findIndex(w=>w.index===e.points.length-1)??-1,d=Pe(t[s].start,t[s].end),o=d<ze+5;if(l===-1&&t[s].index===1&&i){let w=oi(n),k=(w?mt(n,pt):mt(n,zt))?o?d/2:ze:o?-d/2:-ze;t[s].start=E(t[s].start[0]+(w?k:0),t[s].start[1]+(w?0:k))}if(c===-1&&t[s].index===e.points.length-1&&r){let w=oi(a),k=(w?mt(a,pt):mt(a,zt))?o?d/2:ze:o?-d/2:-ze;t[s].end=E(t[s].end[0]+(w?k:0),t[s].end[1]+(w?0:k))}let u=t.map(w=>({...w,start:E(e.x+w.start[0],e.y+w.start[1]),end:E(e.x+w.end[0],e.y+w.end[1])})),h=e.points.map((w,k)=>E(e.x+w[0],e.y+w[1])),p=u[s].index-1,U=u[s].index,m=u[s].start,g=u[s].end,b=h[p-1]&&!pa(h[p],h[p-1])?si(h[p-1],h[p]):void 0,x=h[U+1]&&!pa(h[U],h[U+1])?si(h[U+1],h[U]):void 0;if(b!==void 0){let w=b?1:0;h[p-1][w]=m[w]}if(h[p]=m,h[U]=g,x!==void 0){let w=x?1:0;h[U+1][w]=g[w]}let v=u.findIndex(w=>w.index===p);if(v!==-1){let w=si(u[v].end,u[v].start)?1:0;u[v].start[w]=m[w],u[v].end=m}let y=u.findIndex(w=>w.index===U+1);if(y!==-1){let w=si(u[y].end,u[y].start)?1:0;u[y].end[w]=g[w],u[y].start=g}if(l===-1&&p===0){let w=i?oi(n):si(h[1],h[0]);h.unshift(E(w?m[0]:e.x+e.points[0][0],w?e.y+e.points[0][1]:m[1])),i&&h.unshift(E(e.x+e.points[0][0],e.y+e.points[0][1]));for(let k of u)k.index+=i?2:1}if(c===-1&&U===e.points.length-1){let w=oi(a);h.push(E(w?g[0]:e.x+e.points[e.points.length-1][0],w?e.y+e.points[e.points.length-1][1]:g[1])),r&&h.push(E(e.x+e.points[e.points.length-1][0],e.y+e.points[e.points.length-1][1]))}return rr(h,u.map(w=>({...w,start:E(w.start[0]-e.x,w.start[1]-e.y),end:E(w.end[0]-e.x,w.end[1]-e.y)})),!1,!1)},GN=(e,t,n,a,i,r,s,l,c)=>{let d=e.startIsSpecial??null,o=e.endIsSpecial??null,u=t.map((g,b)=>b===0||b===t.length-1?E(e.x+g[0],e.y+g[1]):E(e.x+e.points[b][0],e.y+e.points[b][1])),h=n.map(g=>({...g,start:E(e.x+(g.start[0]-t[0][0]),e.y+(g.start[1]-t[0][1])),end:E(e.x+(g.end[0]-t[0][0]),e.y+(g.end[1]-t[0][1]))})),p=[],U=2+(d?1:0),m=2+(o?1:0);for(;p.length+U<u.length-m;)p.push(u[p.length+U]);{let g=u[d?2:1],b=u[d?3:2],x=oi(a),v=oi(Jr(ie(g,b)));if(l&&x===v){let y=x?mt(a,pt):mt(a,zt);if(p.unshift(E(v?r[0]+(y?ze:-ze):b[0],v?b[1]:r[1]+(y?ze:-ze))),p.unshift(E(x?r[0]+(y?ze:-ze):r[0],x?r[1]:r[1]+(y?ze:-ze))),!d){d=!0;for(let w of h)w.index>1&&(w.index+=1)}}else if(p.unshift(E(v?r[0]:g[0],v?g[1]:r[1])),d){d=!1;for(let y of h)y.index>1&&(y.index-=1)}p.unshift(r)}{let g=u[u.length-(o?3:2)],b=u[u.length-(o?4:3)],x=oi(i),v=si(b,g);if(c&&x===v){let y=x?mt(i,pt):mt(i,zt);p.push(E(v?s[0]+(y?ze:-ze):b[0],v?b[1]:s[1]+(y?ze:-ze))),p.push(E(x?s[0]+(y?ze:-ze):s[0],x?s[1]:s[1]+(y?ze:-ze))),o||(o=!0)}else p.push(E(v?s[0]:g[0],v?g[1]:s[1])),o&&(o=!1)}return p.push(s),rr(p,h.map(({index:g})=>({index:g,start:p[g-1],end:p[g]})).map(g=>({...g,start:E(g.start[0]-r[0],g.start[1]-r[1]),end:E(g.end[0]-r[0],g.end[1]-r[1])})),d,o)},Ye=1e6,Mp=(e,t,n,a)=>{if(e.points.length<2)return{points:n.points??e.points};(e.x<-Ye||e.x>Ye||e.y<-Ye||e.y>Ye||e.x+(n?.points?.[n?.points?.length-1]?.[0]??0)<-Ye||e.x+(n?.points?.[n?.points?.length-1]?.[0]??0)>Ye||e.y+(n?.points?.[n?.points?.length-1]?.[1]??0)<-Ye||e.y+(n?.points?.[n?.points?.length-1]?.[1]??0)>Ye||e.x+(e?.points?.[e?.points?.length-1]?.[0]??0)<-Ye||e.x+(e?.points?.[e?.points?.length-1]?.[0]??0)>Ye||e.y+(e?.points?.[e?.points?.length-1]?.[1]??0)<-Ye||e.y+(e?.points?.[e?.points?.length-1]?.[1]??0)>Ye)&&console.error("Elbow arrow (or update) is outside reasonable bounds (> 1e6)",{arrow:e,updates:n}),e.x=Se(e.x,-Ye,Ye),e.y=Se(e.y,-Ye,Ye),n.points&&(n.points=n.points.map(([b,x])=>E(Se(b,-Ye,Ye),Se(x,-Ye,Ye))));let i=n.points?n.points&&n.points.length===2?e.points.map((b,x)=>x===0?n.points[0]:x===e.points.length-1?n.points[1]:b):n.points.slice():e.points.slice(),r=typeof n.startBinding<"u"?n.startBinding:e.startBinding,s=typeof n.endBinding<"u"?n.endBinding:e.endBinding,l=r&&nl(r.elementId,t),c=s&&nl(s.elementId,t);if(t.size===0&&jp(i)||l?.id!==r?.elementId||c?.id!==s?.elementId)return rr(i.map(b=>E(e.x+b[0],e.y+b[1])),e.fixedSegments,e.startIsSpecial,e.endIsSpecial);let{startHeading:d,endHeading:o,startGlobalPoint:u,endGlobalPoint:h,hoveredStartElement:p,hoveredEndElement:U,...m}=Ip({x:e.x,y:e.y,startBinding:r,endBinding:s,startArrowhead:e.startArrowhead,endArrowhead:e.endArrowhead,points:e.points},t,i,l,c,a),g=n.fixedSegments??e.fixedSegments??[];return!n.points&&!n.fixedSegments&&!n.startBinding&&!n.endBinding?XN(e,t):n.startBinding===e.startBinding&&n.endBinding===e.endBinding&&(n.points??[]).every((b,x)=>pa(b,e.points[x]??E(1/0,1/0)))?{}:g.length===0?rr(Tp(Ap(_p(e,{startHeading:d,endHeading:o,startGlobalPoint:u,endGlobalPoint:h,hoveredEndElement:U,...m})??[])),g,null,null):(e.fixedSegments?.length??0)>g.length?WN(e,g,t):n.points?n.points&&n.fixedSegments?n:GN(e,i,g,d,o,u,h,p,U):VN(e,g,d,o,p,U)},Ip=(e,t,n,a,i,r)=>{let s=Xd(n[0],Wt(e.x,e.y)),l=Xd(n[n.length-1],Wt(e.x,e.y)),c=a,d=i;if(r?.isDragging){let C=Array.from(t.values());c=Tg(s,t,C,r?.zoom)||a,d=Tg(l,t,C,r?.zoom)||i}let o=Ig({...e,points:n},"start",e.startBinding?.fixedPoint,s,a,c,r?.isDragging),u=Ig({...e,points:n},"end",e.endBinding?.fixedPoint,l,i,d,r?.isDragging),h=_g(o,u,t,c,s),p=_g(u,o,t,d,l),U=[o[0]-2,o[1]-2,o[0]+2,o[1]+2],m=[u[0]-2,u[1]-2,u[0]+2,u[1]+2],g=c?Ta(c,Ai(h,e.startArrowhead?Ke*6:Ke*2,1)):U,b=d?Ta(d,Ai(p,e.endArrowhead?Ke*6:Ke*2,1)):m,x=Ks(o,d?Ta(d,Ai(p,ze,ze)):m)||Ks(u,c?Ta(c,Ai(h,ze,ze)):U),v=k3(x?[U,m]:[g,b]),y=KN(x?U:g,x?m:b,v,x?Ai(h,!c&&!d?0:ze,0):Ai(h,!c&&!d?0:ze-(e.startArrowhead?Ke*6:Ke*2),ze),x?Ai(p,!c&&!d?0:ze,0):Ai(p,!c&&!d?0:ze-(e.endArrowhead?Ke*6:Ke*2),ze),x,c&&Ta(c),d&&Ta(d)),w=Mg(y[0],h,o),k=Mg(y[1],p,u);return{dynamicAABBs:y,startDonglePosition:w,startGlobalPoint:o,startHeading:h,endDonglePosition:k,endGlobalPoint:u,endHeading:p,commonBounds:v,hoveredStartElement:c,hoveredEndElement:d,boundsOverlap:x,startElementBounds:g,endElementBounds:b}},_p=(e,t)=>{let{dynamicAABBs:n,startDonglePosition:a,startGlobalPoint:i,startHeading:r,endDonglePosition:s,endGlobalPoint:l,endHeading:c,commonBounds:d,hoveredEndElement:o}=t,u=qN(n,a||i,r,s||l,c,d),h=a&&Lc(a,u),p=s&&Lc(s,u),U=Lc(l,u);U&&o&&(U.closed=!0);let m=Lc(i,u);m&&e.startBinding&&(m.closed=!0);let g=h&&p&&(Ks(h.pos,n[1])||Ks(p.pos,n[0])),b=YN(h||m,p||U,u,r||pt,c||pt,g?[]:n);if(b){let x=b.map(v=>[v.pos[0],v.pos[1]]);return h&&x.unshift(i),p&&x.push(l),x}return null},Ai=(e,t,n)=>{switch(e){case gn:return[t,n,n,n];case pt:return[n,t,n,n];case zt:return[n,n,t,n]}return[n,n,n,t]},YN=(e,t,n,a,i,r)=>{let s=mh(e.pos,t.pos),l=new HN(c=>c.f);for(l.push(e);l.size()>0;){let c=l.pop();if(!c||c.closed)continue;if(c===t)return ZN(e,c);c.closed=!0;let d=QN(c.addr,n);for(let o=0;o<4;o++){let u=d[o];if(!u||u.closed)continue;let h=ei(u.pos,c.pos,.5);if(wI(...r.map(v=>Ks(h,v))))continue;let p=eO(o),U=c.parent?Jr(ie(c.pos,c.parent.pos)):a,m=C7(U);if(mt(m,p)||Ag(e.addr,u.addr)&&mt(p,a)||Ag(t.addr,u.addr)&&mt(p,i))continue;let g=U!==p,b=c.g+mh(u.pos,c.pos)+(g?Math.pow(s,3):0),x=u.visited;if(!x||b<u.g){let v=JN(u,t,p,i);u.visited=!0,u.parent=c,u.h=mh(t.pos,u.pos)+v*Math.pow(s,2),u.g=b,u.f=u.g+u.h,x?l.rescoreElement(u):l.push(u)}}}return null},ZN=(e,t)=>{let n=t,a=[];for(;n.parent;)a.unshift(n),n=n.parent;return a.unshift(e),a},mh=(e,t)=>Math.abs(e[0]-t[0])+Math.abs(e[1]-t[1]),KN=(e,t,n,a,i,r,s,l)=>{let c=s??e,d=l??t,[o,u,h,p]=a??[0,0,0,0],[U,m,g,b]=i??[0,0,0,0],x=[e[0]>t[2]?e[1]>t[3]||e[3]<t[1]?Math.min((c[0]+d[2])/2,e[0]-p):(c[0]+d[2])/2:e[0]>t[0]?e[0]-p:n[0]-p,e[1]>t[3]?e[0]>t[2]||e[2]<t[0]?Math.min((c[1]+d[3])/2,e[1]-o):(c[1]+d[3])/2:e[1]>t[1]?e[1]-o:n[1]-o,e[2]<t[0]?e[1]>t[3]||e[3]<t[1]?Math.max((c[2]+d[0])/2,e[2]+u):(c[2]+d[0])/2:e[2]<t[2]?e[2]+u:n[2]+u,e[3]<t[1]?e[0]>t[2]||e[2]<t[0]?Math.max((c[3]+d[1])/2,e[3]+h):(c[3]+d[1])/2:e[3]<t[3]?e[3]+h:n[3]+h],v=[t[0]>e[2]?t[1]>e[3]||t[3]<e[1]?Math.min((d[0]+c[2])/2,t[0]-b):(d[0]+c[2])/2:t[0]>e[0]?t[0]-b:n[0]-b,t[1]>e[3]?t[0]>e[2]||t[2]<e[0]?Math.min((d[1]+c[3])/2,t[1]-U):(d[1]+c[3])/2:t[1]>e[1]?t[1]-U:n[1]-U,t[2]<e[0]?t[1]>e[3]||t[3]<e[1]?Math.max((d[2]+c[0])/2,t[2]+m):(d[2]+c[0])/2:t[2]<e[2]?t[2]+m:n[2]+m,t[3]<e[1]?t[0]>e[2]||t[2]<e[0]?Math.max((d[3]+c[1])/2,t[3]+g):(d[3]+c[1])/2:t[3]<e[3]?t[3]+g:n[3]+g],y=k3([x,v]);if(!r&&x[2]-x[0]+v[2]-v[0]>y[2]-y[0]+1e-11&&x[3]-x[1]+v[3]-v[1]>y[3]-y[1]+1e-11){let[w,k]=[(v[0]+v[2])/2,(v[1]+v[3])/2];if(t[0]>e[2]&&e[1]>t[3]){let C=x[2]+(v[0]-x[2])/2,I=v[3]+(x[1]-v[3])/2;return Rt(Wt(e[2]-w,e[1]-k),Wt(e[0]-w,e[3]-k))>0?[[x[0],x[1],C,x[3]],[C,v[1],v[2],v[3]]]:[[x[0],I,x[2],x[3]],[v[0],v[1],v[2],I]]}else if(e[2]<t[0]&&e[3]<t[1]){let C=x[2]+(v[0]-x[2])/2,I=x[3]+(v[1]-x[3])/2;return Rt(Wt(e[0]-w,e[1]-k),Wt(e[2]-w,e[3]-k))>0?[[x[0],x[1],x[2],I],[v[0],I,v[2],v[3]]]:[[x[0],x[1],C,x[3]],[C,v[1],v[2],v[3]]]}else if(e[0]>t[2]&&e[3]<t[1]){let C=v[2]+(x[0]-v[2])/2,I=x[3]+(v[1]-x[3])/2;return Rt(Wt(e[2]-w,e[1]-k),Wt(e[0]-w,e[3]-k))>0?[[C,x[1],x[2],x[3]],[v[0],v[1],C,v[3]]]:[[x[0],x[1],x[2],I],[v[0],I,v[2],v[3]]]}else if(e[0]>t[2]&&e[1]>t[3]){let C=v[2]+(x[0]-v[2])/2,I=v[3]+(x[1]-v[3])/2;return Rt(Wt(e[0]-w,e[1]-k),Wt(e[2]-w,e[3]-k))>0?[[C,x[1],x[2],x[3]],[v[0],v[1],C,v[3]]]:[[x[0],I,x[2],x[3]],[v[0],v[1],v[2],I]]}}return[x,v]},qN=(e,t,n,a,i,r)=>{let s=new Set,l=new Set;n===mn||n===pt?l.add(t[1]):s.add(t[0]),i===mn||i===pt?l.add(a[1]):s.add(a[0]),e.forEach(o=>{s.add(o[0]),s.add(o[2]),l.add(o[1]),l.add(o[3])}),s.add(r[0]),s.add(r[2]),l.add(r[1]),l.add(r[3]);let c=Array.from(l).sort((o,u)=>o-u),d=Array.from(s).sort((o,u)=>o-u);return{row:c.length,col:d.length,data:c.flatMap((o,u)=>d.map((h,p)=>({f:0,g:0,h:0,closed:!1,visited:!1,parent:null,addr:[p,u],pos:[h,o]})))}},Mg=(e,t,n)=>{switch(t){case gn:return E(n[0],e[1]);case pt:return E(e[2],n[1]);case zt:return E(n[0],e[3])}return E(e[0],n[1])},JN=(e,t,n,a)=>{if(a===pt)switch(n){case pt:return e.pos[0]>=t.pos[0]?4:e.pos[1]===t.pos[1]?0:2;case gn:return e.pos[1]>t.pos[1]&&e.pos[0]<t.pos[0]?1:3;case zt:return e.pos[1]<t.pos[1]&&e.pos[0]<t.pos[0]?1:3;case mn:return e.pos[1]===t.pos[1]?4:2}else if(a===mn)switch(n){case pt:return e.pos[1]===t.pos[1]?4:2;case gn:return e.pos[1]>t.pos[1]&&e.pos[0]>t.pos[0]?1:3;case zt:return e.pos[1]<t.pos[1]&&e.pos[0]>t.pos[0]?1:3;case mn:return e.pos[0]<=t.pos[0]?4:e.pos[1]===t.pos[1]?0:2}else if(a===gn)switch(n){case pt:return e.pos[1]>t.pos[1]&&e.pos[0]<t.pos[0]?1:3;case gn:return e.pos[1]>=t.pos[1]?4:e.pos[0]===t.pos[0]?0:2;case zt:return e.pos[0]===t.pos[0]?4:2;case mn:return e.pos[1]>t.pos[1]&&e.pos[0]>t.pos[0]?1:3}else if(a===zt)switch(n){case pt:return e.pos[1]<t.pos[1]&&e.pos[0]<t.pos[0]?1:3;case gn:return e.pos[0]===t.pos[0]?4:2;case zt:return e.pos[1]<=t.pos[1]?4:e.pos[0]===t.pos[0]?0:2;case mn:return e.pos[1]<t.pos[1]&&e.pos[0]>t.pos[0]?1:3}return 0},QN=([e,t],n)=>[Wl([e,t-1],n),Wl([e+1,t],n),Wl([e,t+1],n),Wl([e-1,t],n)],Wl=([e,t],n)=>e<0||e>=n.col||t<0||t>=n.row?null:n.data[t*n.col+e]??null,Lc=(e,t)=>{for(let n=0;n<t.col;n++)for(let a=0;a<t.row;a++){let i=Wl([n,a],t);if(i&&e[0]===i.pos[0]&&e[1]===i.pos[1])return i}return null},k3=e=>[Math.min(...e.map(t=>t[0])),Math.min(...e.map(t=>t[1])),Math.max(...e.map(t=>t[2])),Math.max(...e.map(t=>t[3]))],nl=(e,t)=>{let n=t.get(e);return n&&Ua(n)?n:null},rr=(e,t,n,a)=>{let i=e[0][0],r=e[0][1],s=e.map(l=>Xd(l,Ut(ie(e[0]),-1)));return(i<-Ye||i>Ye||r<-Ye||r>Ye||i+s[s.length-1][0]<-Ye||r+s[s.length-1][0]>Ye||i+s[s.length-1][1]<-Ye||r+s[s.length-1][1]>Ye)&&console.error("Elbow arrow normalization is outside reasonable bounds (> 1e6)",{x:i,y:r,points:s,...Js(s)}),s=s.map(([l,c])=>E(Se(l,-1e6,1e6),Se(c,-1e6,1e6))),{points:s,x:Se(i,-1e6,1e6),y:Se(r,-1e6,1e6),fixedSegments:(t?.length??0)>0?t:null,...Js(s),startIsSpecial:n,endIsSpecial:a}},Tp=e=>{if(e.length>1){let t=Math.abs(e[0][1]-e[1][1])<Math.abs(e[0][0]-e[1][0]);return e.filter((n,a)=>{if(a===0||a===e.length-1)return!0;let i=e[a+1],r=Math.abs(n[1]-i[1])<Math.abs(n[0]-i[0]);return t===r?(t=r,!1):(t=r,!0)})}return e},Ap=e=>e.length>=4?e.filter((t,n)=>{if(n===0||n===e.length-1)return!0;let a=e[n-1];return Pe(a,t)>Cp}):e,eO=e=>{switch(e){case 0:return gn;case 1:return pt;case 2:return zt}return mn},Ig=(e,t,n,a,i,r,s)=>{if(s){if(r){let l=Ro(e,r,t);return IP(r,l)}return a}if(i){let l=D1(n||[0,0],i);return Math.abs(Vu(i,l)-Ke)>.01?Ro(e,i,t):l}return a},_g=(e,t,n,a,i)=>SP(e,t,a,a&&Ta(a,Array(4).fill(Vu(a,e))),n,i),Tg=(e,t,n,a)=>ra(aa(e),n,t,a,!0,!0),Ag=(e,t)=>e[0]===t[0]&&e[1]===t[1],jp=(e,t=Cp)=>e.slice(1).map((n,a)=>Math.abs(n[0]-e[a][0])<t||Math.abs(n[1]-e[a][1])<t).every(Boolean),tO={selection:!0,text:!0,rectangle:!0,diamond:!0,ellipse:!0,line:!0,image:!0,arrow:!0,freedraw:!0,eraser:!1,custom:!0,frame:!0,embeddable:!0,hand:!0,laser:!1,magicframe:!1},nO=e=>Object.keys(it).includes(e)?it[e]:dr,ps=(e,t)=>{if(!t)return null;let n=t.focus||0;return Q(e)?Yd(t)?{...t,focus:n,fixedPoint:Ku(t.fixedPoint??[0,0])}:null:{...t,focus:n}},ji=(e,t)=>{let n={type:t.type||e.type,version:e.version||1,versionNonce:e.versionNonce??0,index:e.index??null,isDeleted:e.isDeleted??!1,id:e.id||Vn(),fillStyle:e.fillStyle||ht.fillStyle,strokeWidth:e.strokeWidth||ht.strokeWidth,strokeStyle:e.strokeStyle??ht.strokeStyle,roughness:e.roughness??ht.roughness,opacity:e.opacity==null?ht.opacity:e.opacity,angle:e.angle||0,x:t.x??e.x??0,y:t.y??e.y??0,strokeColor:e.strokeColor||ht.strokeColor,backgroundColor:e.backgroundColor||ht.backgroundColor,width:e.width||0,height:e.height||0,seed:e.seed??1,groupIds:e.groupIds??[],frameId:e.frameId??null,roundness:e.roundness?e.roundness:e.strokeSharpness==="round"?{type:fl(e.type)?St.LEGACY:St.PROPORTIONAL_RADIUS}:null,boundElements:e.boundElementIds?e.boundElementIds.map(a=>({type:"arrow",id:a})):e.boundElements??[],updated:e.updated??ul(),link:e.link?yn(e.link):null,locked:e.locked??!1};return("customData"in e||"customData"in t)&&(n.customData="customData"in t?t.customData:e.customData),{...e,...n,...V3(n),...t}},aO=e=>{switch(e={...e},e.type){case"text":delete e.rawText;let t=e.fontSize,n=e.fontFamily;if("font"in e){let[o,u]=e.font.split(" ");t=parseFloat(o),n=nO(u)}let a=typeof e.text=="string"&&e.text||"",i=e.lineHeight||(e.height?II(e):qr(e.fontFamily));return e=ji(e,{fontSize:t,fontFamily:n,text:a,textAlign:e.textAlign||qo,verticalAlign:e.verticalAlign||Nd,containerId:e.containerId??null,originalText:e.originalText||a,autoResize:e.autoResize??!0,lineHeight:i}),!a&&!e.isDeleted&&(e={...e,originalText:a,isDeleted:!0},e=dc(e)),e;case"freedraw":return ji(e,{points:e.points,lastCommittedPoint:null,simulatePressure:e.simulatePressure,pressures:e.pressures});case"image":return ji(e,{status:e.status||"pending",fileId:e.fileId,scale:e.scale||[1,1],crop:e.crop??null});case"line":case"draw":let{startArrowhead:r=null,endArrowhead:s=null}=e,l=e.x,c=e.y,d=!Array.isArray(e.points)||e.points.length<2?[E(0,0),E(e.width,e.height)]:e.points;return(d[0][0]!==0||d[0][1]!==0)&&({points:d,x:l,y:c}=J.getNormalizedPoints(e)),ji(e,{type:e.type==="draw"?"line":e.type,startBinding:ps(e,e.startBinding),endBinding:ps(e,e.endBinding),lastCommittedPoint:null,startArrowhead:r,endArrowhead:s,points:d,x:l,y:c,...Js(d)});case"arrow":{let{startArrowhead:o=null,endArrowhead:u="arrow"}=e,h=e.x,p=e.y,U=!Array.isArray(e.points)||e.points.length<2?[E(0,0),E(e.width,e.height)]:e.points;(U[0][0]!==0||U[0][1]!==0)&&({points:U,x:h,y:p}=J.getNormalizedPoints(e));let m={type:e.type,startBinding:ps(e,e.startBinding),endBinding:ps(e,e.endBinding),lastCommittedPoint:null,startArrowhead:o,endArrowhead:u,points:U,x:h,y:p,elbowed:e.elbowed,...Js(U)};return Q(e)?ji(e,{...m,elbowed:!0,startBinding:ps(e,e.startBinding),endBinding:ps(e,e.endBinding),fixedSegments:e.fixedSegments,startIsSpecial:e.startIsSpecial,endIsSpecial:e.endIsSpecial}):ji(e,m)}case"ellipse":case"rectangle":case"diamond":case"iframe":case"embeddable":return ji(e,{});case"magicframe":case"frame":return ji(e,{name:e.name??null})}return null},iO=(e,t)=>{if(e.boundElements){let n=e.boundElements.slice(),a=new Set;e.boundElements=n.reduce((i,r)=>{let s=t.get(r.id);if(s&&!a.has(r.id)){if(a.add(r.id),s.isDeleted)return i;i.push(r),q(s)&&!s.containerId&&(s.containerId=e.id)}return i},[])}},rO=(e,t)=>{let n=e.containerId?t.get(e.containerId):null;if(!n){e.containerId=null;return}if(!e.isDeleted&&n.boundElements&&!n.boundElements.find(a=>a.id===e.id)){let a=(n.boundElements||(n.boundElements=[])).slice();a.push({type:"text",id:e.id}),n.boundElements=a}},sO=(e,t)=>{e.frameId&&(t.get(e.frameId)||(e.frameId=null))},nf=(e,t,n)=>{let a=new Set,i=t?oe(t):null,r=Va((e||[]).reduce((l,c)=>{if(c.type!=="selection"&&!es(c)){let d=aO(c);if(d){let o=i?.get(c.id);o&&o.version>d.version&&(d=dc(d,o.version)),a.has(d.id)&&(d={...d,id:Vn()}),a.add(d.id),l.push(d)}}return l},[]));if(!n?.repairBindings)return r;let s=oe(r);for(let l of r)l.frameId&&sO(l,s),q(l)&&l.containerId?rO(l,s):l.boundElements&&iO(l,s),n.refreshDimensions&&q(l)&&Object.assign(l,e3(l,Ht(l,s),s)),ue(l)&&(l.startBinding&&(!s.has(l.startBinding.elementId)||!xe(l))&&(l.startBinding=null),l.endBinding&&(!s.has(l.endBinding.elementId)||!xe(l))&&(l.endBinding=null));return r.map(l=>{if(Q(l)&&l.startBinding==null&&l.endBinding==null&&!jp(l.points))return{...l,...Mp(l,s,{points:[E(0,0),l.points[l.points.length-1]]}),index:l.index};if(Q(l)&&l.startBinding&&l.endBinding&&l.startBinding.elementId===l.endBinding.elementId&&l.points.length>1&&l.points.some(([c,d])=>Math.abs(c)>1e6||Math.abs(d)>1e6)){console.error("Fixing self-bound elbow arrow",l.id);let c=s.get(l.startBinding.elementId);return c?{...l,x:c.x+c.width/2,y:c.y-5,width:c.width,height:c.height,points:[E(0,0),E(0,-10),E(c.width/2+5,-10),E(c.width/2+5,c.height/2+5)]}:(console.error("Bound element not found",l.startBinding.elementId),l)}return l})},lO=(e,t,n)=>{let a=t[e];return a!==void 0?a:n[e]},jg={isSidebarDocked:(e,t)=>["defaultSidebarDockedPreference",e.isSidebarDocked??lO("defaultSidebarDockedPreference",e,t)]},C3=(e,t)=>{e=e||{};let n=za(),a={};for(let i of Object.keys(jg))if(i in e){let[r,s]=jg[i](e,n);a[r]=s}for(let[i,r]of Object.entries(n)){let s=e[i],l=t?t[i]:void 0;a[i]=s!==void 0?s:l!==void 0?l:r}return{...a,cursorButton:t?.cursorButton||"up",penDetected:t?.penDetected??(e.penMode?e.penDetected??!1:!1),activeTool:{...Et(n,a.activeTool.type&&tO[a.activeTool.type]?a.activeTool:{type:"selection"}),lastActiveTool:null,locked:a.activeTool.locked??!1},zoom:{value:ci(no(e.zoom)?e.zoom:e.zoom?.value??n.zoom.value)},openSidebar:typeof e.openSidebar=="string"?{name:oa.name}:a.openSidebar,gridSize:PP(no(e.gridSize)?e.gridSize:$d),gridStep:$7(no(e.gridStep)?e.gridStep:o8),editingFrame:null}},sc=(e,t,n,a)=>({elements:nf(e?.elements,n,a),appState:C3(e?.appState,t||null),files:e?.files||{}}),Rg=e=>{let t=nf(Ve(e.elements),null);return t.length?{...e,elements:t}:null},lc=(e=[],t)=>{let n=[];for(let a of e)if(Array.isArray(a)){let i=Rg({status:t,elements:a,id:Vn(),created:Date.now()});i&&n.push(i)}else{let i=a,r=Rg({...i,id:i.id||Vn(),status:i.status||t,created:i.created||Date.now()});r&&n.push(r)}return n},ta=32,Ze=12,Ji=256,M3=50,Cr="NOT_SPREADSHEET",$o="VALID_SPREADSHEET",Vl=e=>{let t=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return t?parseFloat(`${(t[1]||t[2])+t[3]}`.replace(/,/g,"")):null},gh=(e,t)=>e.slice(1).every(n=>Vl(n[t])!==null),Dg=e=>{let t=e[0].length;if(t>2)return{type:Cr,reason:"More than 2 columns"};if(t===1){if(!gh(e,0))return{type:Cr,reason:"Value is not numeric"};let c=Vl(e[0][0])===null,d=(c?e.slice(1):e).map(o=>Vl(o[0]));return d.length<2?{type:Cr,reason:"Less than two rows"}:{type:$o,spreadsheet:{title:c?e[0][0]:null,labels:null,values:d}}}let n=gh(e,0),a=gh(e,1);if(!n&&!a)return{type:Cr,reason:"Value is not numeric"};let[i,r]=a?[0,1]:[1,0],s=Vl(e[0][r])===null,l=s?e.slice(1):e;return l.length<2?{type:Cr,reason:"Less than 2 rows"}:{type:$o,spreadsheet:{title:s?e[0][r]:null,labels:l.map(c=>c[i]),values:l.map(c=>Vl(c[r]))}}},oO=e=>{let t=[];for(let n=0;n<e[0].length;n++){let a=[];for(let i=0;i<e.length;i++)a.push(e[i][n]);t.push(a)}return t},cO=e=>{let t=e.trim().split(`
|
|
39
39
|
`).map(i=>i.trim().split(" "));if(t.length&&t[0].length!==2&&(t=e.trim().split(`
|
|
40
40
|
`).map(i=>i.trim().split(","))),t.length===0)return{type:Cr,reason:"No values"};let n=t[0].length;if(!t.every(i=>i.length===n))return{type:Cr,reason:"All rows don't have same number of columns"};let a=Dg(t);if(a.type!==$o){let i=Dg(oO(t));if(i.type===$o)return i}return a},ou=UM(fM),zn={fillStyle:"hachure",fontFamily:dr,fontSize:ki,opacity:100,roughness:1,strokeColor:Ee.black,roundness:null,strokeStyle:"solid",strokeWidth:1,verticalAlign:Mn.MIDDLE,locked:!1},I3=e=>{let t=(ta+Ze)*e.values.length+Ze,n=Ji+Ze*2;return{chartWidth:t,chartHeight:n}},dO=(e,t,n,a,i)=>e.labels?.map((r,s)=>_n({groupIds:[a],backgroundColor:i,...zn,text:r.length>8?`${r.slice(0,5)}...`:r,x:t+s*(ta+Ze)+Ze*2,y:n+Ze/2,width:ta,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))||[],uO=(e,t,n,a,i)=>{let r=_n({groupIds:[a],backgroundColor:i,...zn,x:t-Ze,y:n-Ze,text:"0",textAlign:"right"}),s=_n({groupIds:[a],backgroundColor:i,...zn,x:t-Ze,y:n-Ji-r.height/2,text:Math.max(...e.values).toLocaleString(),textAlign:"right"});return[r,s]},fO=(e,t,n,a,i)=>{let{chartWidth:r,chartHeight:s}=I3(e),l=Nr({backgroundColor:i,groupIds:[a],...zn,type:"line",x:t,y:n,width:r,points:[E(0,0),E(r,0)]}),c=Nr({backgroundColor:i,groupIds:[a],...zn,type:"line",x:t,y:n,height:s,points:[E(0,0),E(0,-s)]}),d=Nr({backgroundColor:i,groupIds:[a],...zn,type:"line",x:t,y:n-Ji-Ze,strokeStyle:"dotted",width:r,opacity:M3,points:[E(0,0),E(r,0)]});return[l,c,d]},_3=(e,t,n,a,i,r)=>{let{chartWidth:s,chartHeight:l}=I3(e),c=e.title?_n({backgroundColor:i,groupIds:[a],...zn,text:e.title,x:t+s/2,y:n-Ji-Ze*2-ki,roundness:null,textAlign:"center"}):null,d=r?Xa({backgroundColor:i,groupIds:[a],...zn,type:"rectangle",x:t,y:n-l,width:s,height:l,strokeColor:Ee.black,fillStyle:"solid",opacity:6}):null;return[...d?[d]:[],...c?[c]:[],...dO(e,t,n,a,i),...uO(e,t,n,a,i),...fO(e,t,n,a,i)]},hO=(e,t,n)=>{let a=Math.max(...e.values),i=Vn(),r=ou[Math.floor(Math.random()*ou.length)];return[...e.values.map((s,l)=>{let c=s/a*Ji;return Xa({backgroundColor:r,groupIds:[i],...zn,type:"rectangle",x:t+l*(ta+Ze)+Ze,y:n-c-Ze,width:ta,height:c})}),..._3(e,t,n,i,r,be.DEV)]},pO=(e,t,n)=>{let a=Math.max(...e.values),i=Vn(),r=ou[Math.floor(Math.random()*ou.length)],s=0,l=[];for(let m of e.values){let g=s*(ta+Ze),b=-(m/a)*Ji;l.push([g,b]),s++}let c=Math.max(...l.map(m=>m[0])),d=Math.max(...l.map(m=>m[1])),o=Math.min(...l.map(m=>m[0])),u=Math.min(...l.map(m=>m[1])),h=Nr({backgroundColor:r,groupIds:[i],...zn,type:"line",x:t+Ze+ta/2,y:n-Ze,height:d-u,width:c-o,strokeWidth:2,points:l}),p=e.values.map((m,g)=>{let b=g*(ta+Ze)+Ze/2,x=-(m/a)*Ji+Ze/2;return Xa({backgroundColor:r,groupIds:[i],...zn,fillStyle:"solid",strokeWidth:2,type:"ellipse",x:t+b+ta/2,y:n+x-Ze*2,width:Ze,height:Ze})}),U=e.values.map((m,g)=>{let b=g*(ta+Ze)+Ze/2,x=m/a*Ji+Ze/2+Ze;return Nr({backgroundColor:r,groupIds:[i],...zn,type:"line",x:t+b+ta/2+Ze/2,y:n-x,height:x,strokeStyle:"dotted",opacity:M3,points:[E(0,0),E(0,x)]})});return[..._3(e,t,n,i,r,be.DEV),h,...U,...p]},UO=(e,t,n,a)=>e==="line"?pO(t,n,a):hO(t,n,a),Rp="clipboard"in navigator&&"writeText"in navigator.clipboard,Dp="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,mO=e=>!!([Fn.excalidraw,Fn.excalidrawClipboard,Fn.excalidrawClipboardWithAPI].includes(e?.type)&&Array.isArray(e.elements)),gO=({types:e,files:t})=>{!e&&!t&&console.warn("createPasteEvent: no types or files provided");let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});if(e)for(let[a,i]of Object.entries(e)){if(typeof i!="string"){t=t||[],t.push(i);continue}try{if(n.clipboardData?.setData(a,i),n.clipboardData?.getData(a)!==i)throw new Error(`Failed to set "${a}" as clipboardData item`)}catch(r){throw new Error(r.message)}}if(t){let a=-1;for(let i of t){a++;try{if(n.clipboardData?.items.add(i),n.clipboardData?.files[a]!==i)throw new Error(`Failed to set file "${i.name}" as clipboardData item`)}catch(r){throw new Error(r.message)}}}return n},bO=({elements:e,files:t})=>{let n=oe(e),a=new Set(e.filter(l=>ce(l))),i=!1,r=e.reduce((l,c)=>(Ln(c)&&(i=!0,t&&t[c.fileId]&&(l[c.fileId]=t[c.fileId])),l),{});i&&!t&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object.");let s={type:Fn.excalidrawClipboard,elements:e.map(l=>{if(wn(l,n)&&!a.has(wn(l,n))){let c=ss(l);return V(c,{frameId:null}),c}return l}),files:t?r:void 0};return JSON.stringify(s)},T3=async(e,t,n)=>{await pl(bO({elements:e,files:t}),n)},vO=e=>{let t=cO(e);return t.type===$o?{spreadsheet:t.spreadsheet}:null};function A3(e){let t=[];for(let n of e.childNodes)if(n.nodeType===3){let a=n.textContent?.trim();a&&t.push({type:"text",value:a})}else if(n instanceof HTMLImageElement){let a=n.getAttribute("src");a&&a.startsWith("http")&&t.push({type:"imageUrl",value:a})}else t=t.concat(A3(n));return t}var xO=e=>{let t=e.clipboardData?.getData(ae.html);if(!t)return null;try{let n=new DOMParser().parseFromString(t,ae.html),a=A3(n.body);if(a.length)return{type:"mixedContent",value:a}}catch(n){console.error(`error in parseHTMLFromPaste: ${n.message}`)}return null},yO=async()=>{let e={},t;try{t=await navigator.clipboard?.read()}catch(n){try{if(navigator.clipboard?.readText){console.warn(`navigator.clipboard.readText() failed (${n.message}). Failling back to navigator.clipboard.read()`);let a=await navigator.clipboard?.readText();if(a)return{[ae.text]:a}}}catch(a){if(navigator.clipboard?.read)console.warn(`navigator.clipboard.readText() failed (${a.message}). Failling back to navigator.clipboard.read()`);else{if(a.name==="DataError")return console.warn(`navigator.clipboard.read() error, clipboard is probably empty: ${a.message}`),e;throw a}}throw n}for(let n of t)for(let a of n.types)if(C8(IM,a))try{if(a===ae.text||a===ae.html)e[a]=await(await n.getType(a)).text();else if(a4(a)){let i=await n.getType(a),r=Gl(i,a,void 0);e[a]=r}else throw new X2(`Unsupported clipboard type: ${a}`)}catch(i){console.warn(i instanceof X2?i.message:`Cannot retrieve ${a} from clipboardItem: ${i.message}`)}return Object.keys(e).length===0&&console.warn("No clipboard data found from clipboard.read()."),e},wO=async(e,t=!1)=>{try{let n=!t&&e&&xO(e);return n?n.value.every(a=>a.type==="text")?{type:"text",value:e.clipboardData?.getData(ae.text)||n.value.map(a=>a.value).join(`
|
|
41
|
-
`).trim()}:n:{type:"text",value:(e.clipboardData?.getData(ae.text)||"").trim()}}catch{return{type:"text",value:""}}},j3=async(e,t=!1)=>{let n=await wO(e,t);if(n.type==="mixedContent")return{mixedContent:n.value};try{let a=!t&&vO(n.value);if(a)return a}catch(a){console.error(a)}try{let a=JSON.parse(n.value),i=a.type===Fn.excalidrawClipboardWithAPI;if(mO(a))return{elements:a.elements,files:a.files,text:t?JSON.stringify(a.elements,null,2):void 0,programmaticAPI:i}}catch{}return{text:n.value}},R3=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[ae.png]:e})])}catch(t){if(ec(e))await navigator.clipboard.write([new window.ClipboardItem({[ae.png]:await e})]);else throw t}},pl=async(e,t)=>{if(Rp)try{await navigator.clipboard.writeText(e||"");return}catch(n){console.error(n)}try{if(t){if(t.clipboardData?.setData(ae.text,e||""),t.clipboardData?.getData(ae.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(n){console.error(n)}if(!EO(e))throw new Error("Error copying to clipboard.")},EO=e=>{e||(e=" ");let t=document.documentElement.getAttribute("dir")==="rtl",n=document.createElement("textarea");n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";let a=window.pageYOffset||document.documentElement.scrollTop;n.style.top=`${a}px`,n.style.fontSize="12pt",n.setAttribute("readonly",""),n.value=e,document.body.appendChild(n);let i=!1;try{n.select(),n.setSelectionRange(0,n.value.length),i=document.execCommand("copy")}catch(r){console.error(r)}return n.remove(),i},oc=({elements:e,appState:t,files:n,maxWidthOrHeight:a,getDimensions:i,exportPadding:r,exportingFrame:s})=>{let{elements:l,appState:c}=sc({elements:e,appState:t},null,null),{exportBackground:d,viewBackgroundColor:o}=c;return S3(l,{...c,offsetTop:0,offsetLeft:0,width:0,height:0},n||{},{exportBackground:d,exportPadding:r,viewBackgroundColor:o,exportingFrame:s},(u,h)=>{let p=document.createElement("canvas");if(a){typeof i=="function"&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");let m=Math.max(u,h),g=a<m?a/m:t?.exportScale??1;return p.width=u*g,p.height=h*g,{canvas:p,scale:g}}let U=i?.(u,h)||{width:u,height:h};return p.width=U.width,p.height=U.height,{canvas:p,scale:U.scale??1}})},D3=async e=>{let{mimeType:t=ae.png,quality:n}=e;t===ae.png&&typeof n=="number"&&console.warn(`"quality" will be ignored for "${ae.png}" mimeType`),t==="image/jpg"&&(t=ae.jpg),t===ae.jpg&&!e.appState?.exportBackground&&(console.warn(`Defaulting "exportBackground" to "true" for "${ae.jpg}" mimeType`),e={...e,appState:{...e.appState,exportBackground:!0}});let a=await oc(e);return n=n||(/image\/jpe?g/.test(t)?.92:.8),new Promise((i,r)=>{a.toBlob(async s=>{if(!s)return r(new Error("couldn't export to blob"));s&&t===ae.png&&e.appState?.exportEmbedScene&&(s=await h4({blob:s,metadata:rc(e.elements,e.appState,e.files||{},"local")})),i(s)},t,n)})},af=async({elements:e,appState:t=za(),files:n={},exportPadding:a,renderEmbeddables:i,exportingFrame:r,skipInliningFonts:s,reuseImages:l})=>{let{elements:c,appState:d}=sc({elements:e,appState:t},null,null),o={...d,exportPadding:a};return Sp(c,o,n,{exportingFrame:r,renderEmbeddables:i,skipInliningFonts:s,reuseImages:l})},SO=async e=>{if(e.type==="svg"){let t=await af(e);await pl(t.outerHTML)}else if(e.type==="png")await R3(D3(e));else if(e.type==="json")await T3(e.elements,e.files);else throw new Error("Invalid export type")},kO=e=>e.type==="diamond"?[E(e.width/2,0),E(e.width,e.height/2),E(e.width/2,e.height),E(0,e.height/2)]:[E(0,0),E(0+e.width,0),E(0+e.width,e.height),E(0,e.height)],CO=e=>ue(e)||Xn(e)?e.points:kO(e),Lg=e=>{let t=e.reduce((n,[a,i])=>(n.minY=Math.min(n.minY,i),n.minX=Math.min(n.minX,a),n.maxX=Math.max(n.maxX,a),n.maxY=Math.max(n.maxY,i),n),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,cx:0,cy:0});return t.cx=(t.maxX+t.minX)/2,t.cy=(t.maxY+t.minY)/2,t},L3=e=>{let t=CO(e),{cx:n,cy:a}=Lg(t),i=E(n,a),r=t.map(o=>z(o,i,e.angle)),{minX:s,minY:l,maxX:c,maxY:d}=Lg(r);return[s+e.x,l+e.y,c+e.x,d+e.y]},z1=(e,t,n=!1)=>{let a=L3(e),i=t[0]<=a[0]&&t[2]>=a[2]&&t[1]<=a[1]&&t[3]>=a[3];return n?i?!0:a[0]<=t[0]&&a[2]>=t[2]&&a[1]<=t[1]&&a[3]>=t[3]:i},P3=(e,t)=>{let n=L3(e);return(Tc(n[0],qt(t[0],t[2]))||Tc(t[0],qt(n[0],n[2])))&&(Tc(n[1],qt(t[1],t[3]))||Tc(t[1],qt(n[1],n[3])))},N3=({elements:e,bounds:t,type:n,errorMargin:a=0})=>{T8(t)&&(t=ma(t,oe(e)));let i=[t[0]-a,t[1]-a,t[2]+a,t[3]+a],r=new Set;for(let s of e)if(!r.has(s.id)&&(n==="overlap"?P3(s,i):n==="inside"?z1(s,i):z1(s,i,!0))){if(r.add(s.id),s.boundElements)for(let l of s.boundElements)r.add(l.id);q(s)&&s.containerId&&r.add(s.containerId),xe(s)&&(s.startBinding&&r.add(s.startBinding.elementId),s.endBinding&&r.add(s.endBinding?.elementId))}return e.filter(s=>r.has(s.id))};function Pg(e){return[Math.min(e[0][0],e[1][0]),Math.min(e[0][1],e[1][1]),Math.max(e[0][0],e[1][0]),Math.max(e[0][1],e[1][1])]}function MO(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]}var IO=1e-6;function Ng(e,t){let n=ie(e[1],e[0]),a=ie(t,e[0]),i=Rt(n,a);return Math.abs(i)<IO}function bh(e,t){let n=ie(e[1],e[0]),a=ie(t,e[0]);return Rt(n,a)<0}function Og(e,t){return Ng(e,t[0])||Ng(e,t[1])||(bh(e,t[0])?!bh(e,t[1]):bh(e,t[1]))}function _O(e,t){return MO(Pg(e),Pg(t))&&Og(e,t)&&Og(t,e)}var O3=(e,t,n)=>{let a=oe(e);for(let i of t)if(i.frameId){let r=n.get(i.id),s=n.get(i.frameId);if(r){let l=a.get(r);l&&V(l,{frameId:s??i.frameId},!1)}}};function Lp(e,t,n){let a=Q2(t,n),i=Q2(e,n);return a.some(r=>i.some(s=>_O(r,s)))}var $3=(e,t,n)=>sf(zp(e,t,n,!1)).filter(a=>!ce(a)&&!a.frameId||a.frameId===t.id),Pp=(e,t,n)=>zp([t],e,n).some(a=>a.id===t.id),cc=(e,t,n)=>{let[a,i,r,s]=he(t,n),[l,c,d,o]=Ne(e);return a<=l&&i<=c&&r>=d&&s>=o},sr=(e,t,n)=>cc([e],t,n)||Lp(e,t,n)||Pp(e,t,n),$g=(e,t,n)=>{let[a,i,r,s]=he(t,n);return m8(E(a,i),E(e.x,e.y),E(r,s))},TO=e=>{let t=new Map;for(let n of e){let a=ce(n)?n.id:n.frameId;a&&!t.has(a)&&t.set(a,Ga(e,a))}return t},Ga=(e,t)=>{let n=[];for(let a of e.values())a.frameId===t&&n.push(a);return n},Np=e=>e.filter(t=>ce(t)),Op=e=>{let t=oe(Np(e));return e.filter(n=>t.has(n.id)||!n.frameId||!t.has(n.frameId))},Ud=(e,t,n,a)=>{let i=Ga(e,t.id),r=new Set(i),s=new Set([...$3(e,t,a),...i.filter(h=>Pp(h,t,a))]),l=i.filter(h=>!s.has(h)),c=new Set(Array.from(s).flatMap(h=>h.groupIds));for(let h of l)if(!Lp(h,t,a))h.groupIds.length===0&&r.delete(h);else if(h.groupIds.length>0)for(let p of h.groupIds)c.add(p);for(let h of l)if(h.groupIds.length>0){let p=!0;for(let U of h.groupIds)c.has(U)&&(p=!1);p&&r.delete(h)}let d=Array.from(s).filter(h=>h.groupIds.length===0);for(let h of d)r.add(h);let o=Array.from(s).filter(h=>h.groupIds.length>0),u=H7(o,n);for(let[h,p]of Object.entries(u))if(p){let U=tt(e,h);if(cc(U,t,a))for(let m of U)r.add(m)}return[...r].filter(h=>!(q(h)&&h.containerId))},AO=(e,t,n)=>jO(sf(e,$3(e,t,n)),t,n),jO=(e,t,n)=>{let a=[],i=new Map;for(let r of e){let s=!1;if(r.groupIds.length>0){if(r.groupIds.some(l=>i.get(l)))s=!0;else{let l=new Set(r.groupIds.flatMap(c=>tt(n,c)));s=!cc(Array.from(l),t,n)}r.groupIds.forEach(l=>{i.set(l,s)})}s||a.push(r)}return a},wn=(e,t)=>e.frameId&&t.get(e.frameId)||null,RO=(e,t)=>{let n=new Set,a=oe(e);e=sf(e);for(let s of e)ce(s)&&s.id!==t.id&&n.add(s.id);let i=new Set,r=[];for(let s of e)if(!(ce(s)||s.frameId&&n.has(s.frameId)))if(s.groupIds.length){let l=s.groupIds.at(-1);if(!i.has(l)){i.add(l);let c=tt(e,l);if(c.some(d=>sr(d,t,a)))for(let d of c)r.push(d)}}else sr(s,t,a)&&r.push(s);return r},lo=(e,t,n,a)=>{let i=oe(e),r=new Map;for(let d of e.values())d.frameId===n.id&&r.set(d.id,!0);let s=new Set(t.map(d=>d.id)),l=[],c=new Set;for(let d of t)ce(d)&&d.id!==n.id&&c.add(d.id);for(let d of sf(e,t)){if(ce(d)||d.frameId&&c.has(d.frameId)||d.frameId&&a.selectedElementIds[d.id]&&a.selectedElementIds[d.frameId])continue;r.has(d.id)||l.push(d);let o=ge(d,i);o&&!s.has(o.id)&&!r.has(o.id)&&l.push(o)}for(let d of l)V(d,{frameId:n.id},!1);return e},rf=(e,t)=>{let n=new Map,a=new Map;for(let i of e)if(i.frameId){n.set(i.id,i);let r=a.get(i.frameId)||[];r.push(i);let s=ge(i,t);s&&(n.set(s.id,s),r.push(s)),a.set(i.frameId,r)}for(let[,i]of n)V(i,{frameId:null},!1)},F3=(e,t)=>{let n=Ga(e,t.id);return rf(n,oe(e)),e},z3=(e,t,n,a)=>lo(F3(e,n),t,n,a.state).slice(),al=(e,t,n)=>{let a=n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,elements:e}),i=new Set(a);if(t.editingGroupId)for(let l of a)l.groupIds.length===0?i.add(l):l.groupIds.flatMap(c=>tt(e,c)).forEach(c=>i.add(c));let r=new Set,s=oe(e);return i.forEach(l=>{l.frameId&&!ce(l)&&!cu(l,s,t)&&r.add(l)}),r.size>0&&rf(r,s),e},sf=(e,t)=>{let n=new Set,a=t||e;for(let s of a.values()){let l=s.groupIds[s.groupIds.length-1];l&&n.add(l)}let i=new Set;for(let s of n)tt(e,s).some(l=>ce(l))&&i.add(s);let r=[];for(let s of a.values())i.has(s.groupIds[s.groupIds.length-1])||r.push(s);return r},B1=(e,t,n)=>{let a=q(e)&&Ht(e,t)||e;return a.frameId&&n.selectedElementIds[a.id]&&n.selectedElementIds[a.frameId]?wn(a,t):n.selectedElementIds[a.id]&&n.selectedElementsAreBeingDragged?n.frameToHighlight:wn(a,t)},cu=(e,t,n,a)=>{let i=a?.targetFrame??B1(e,t,n);if(!i)return!1;let r=q(e)&&Ht(e,t)||e,s=c=>{a?.checkedGroups&&r.groupIds.forEach(d=>{a.checkedGroups?.set(d,c)})};if(!n.selectedElementIds[r.id]||!n.selectedElementsAreBeingDragged||n.selectedElementIds[r.id]&&n.selectedElementIds[i.id])return!0;if(r.groupIds.length===0)return sr(r,i,t);for(let c of r.groupIds)if(a?.checkedGroups?.has(c))return a.checkedGroups.get(c);let l=new Set(r.groupIds.filter(c=>a?.checkedGroups?!a.checkedGroups.has(c):!0).flatMap(c=>tt(t,c)));if(n.editingGroupId&&n.selectedElementsAreBeingDragged){let c=new Set(ve(t,n));if(n.frameToHighlight!==null)return!0;c.forEach(d=>{l.delete(d)})}for(let c of l)if(ce(c))return s(!1),!1;for(let c of l)if(sr(c,i,t))return s(!0),!0;return!1},Fg=(e,t,n,a,i)=>{if(!n.frameRendering||!n.frameRendering.clip)return!1;let r=Lp(e,t,a)||Pp(e,t,a);if(r){for(let s of e.groupIds)i?.set(s,!0);return!0}if(!r&&e.groupIds.length>0&&!cc([e],t,a)){let s=!1;if(n.selectedElementsAreBeingDragged)s=cu(e,a,n,{targetFrame:t,checkedGroups:i});else{s=e.frameId===t.id;for(let l of e.groupIds)i?.set(l,s)}for(let l of e.groupIds)i?.set(l,s);return s}return!1},B3=e=>e.name===null?I8(e)?"Frame":"AI Frame":e.name,$p=(e,t)=>N3({elements:e,bounds:t,type:"overlap"}).filter(n=>!n.frameId||n.frameId===t.id),H3=e=>{let t=oe(e);return e.length>1&&e.some(n=>n.frameId&&t.has(n.frameId))},Fp=e=>{let t=new Set;return e.forEach(n=>{ce(n)&&t.add(n.id)}),e.filter(n=>!(n.frameId&&t.has(n.frameId)))},zp=(e,t,n,a=!0)=>{let[i,r,s,l]=he(t,n),c=e.filter(d=>{let[o,u,h,p]=ma(d,n),U=wn(d,n);if(U){let[m,g,b,x]=ma(U,n);o=Math.max(m,o),u=Math.max(g,u),h=Math.min(b,h),p=Math.min(x,p)}return d.locked===!1&&d.type!=="selection"&&!nt(d)&&i<=o&&r<=u&&s>=h&&l>=p});return c=a?Fp(c):c,c=c.filter(d=>{let o=wn(d,n);return o?sr(d,o,n):!0}),c},X3=(e,t,n,a)=>{let i=new Set(t.map(r=>r.id));return e.filter(r=>{let s=du(r,n.width,n.height,n,a);return!i.has(r.id)&&s})},_t=(function(){let e=null,t=null,n=null,a=(i,r)=>(n!=null&&i===e&&r.selectedElementIds===t||(n=i.some(s=>r.selectedElementIds[s.id]),e=i,t=r.selectedElementIds),n);return a.clearCache=()=>{e=null,t=null,n=null},a})(),DO=(e,t,n)=>{let a=Array.from(new Set(ve(e,t).map(i=>n(i))));return a.length===1?a[0]:null},ve=(e,t,n)=>{let a=new Set,i=[];for(let r of e.values()){if(t.selectedElementIds[r.id]){i.push(r),a.add(r.id);continue}if(n?.includeBoundTextElement&&nt(r)&&t.selectedElementIds[r?.containerId]){i.push(r),a.add(r.id);continue}}if(n?.includeElementsInFrames){let r=[];return i.forEach(s=>{ce(s)&&Ga(e,s.id).forEach(l=>!a.has(l.id)&&r.push(l)),r.push(s)}),r}return i},W3=(e,t)=>t.editingTextElement?[t.editingTextElement]:t.newElement?[t.newElement]:ve(e,t,{includeBoundTextElement:!0}),De=(e,t)=>Gt(t.selectedElementIds,e)?t.selectedElementIds:e,zg=e=>{let t=new Map,n=[];for(let a of e)a.isDeleted||(n.push(a),t.set(a.id,a));return{elementsMap:t,elements:n}},LO=Zo(e=>{(be.DEV||be.MODE===vn.TEST||window?.DEBUG_FRACTIONAL_INDICES)&&bp(e,{shouldThrow:be.DEV||be.MODE===vn.TEST,includeBoundTextValidation:!0})},1e3*60,{leading:!0,trailing:!1}),PO=e=>{let t=["includeBoundTextElement","includeElementsInFrames"],n="";for(let a of t)n+=`${a}:${e[a]?"1":"0"}`;return n},Bg=e=>typeof e=="string",H1=class md{constructor(){j(this,"callbacks",new Set),j(this,"nonDeletedElements",[]),j(this,"nonDeletedElementsMap",Hn(new Map)),j(this,"elements",[]),j(this,"nonDeletedFramesLikes",[]),j(this,"frames",[]),j(this,"elementsMap",Hn(new Map)),j(this,"selectedElementsCache",{selectedElementIds:null,elements:null,cache:new Map}),j(this,"sceneNonce"),j(this,"insertElement",t=>{let n=t.frameId?this.getElementIndex(t.frameId):this.elements.length;this.insertElementAtIndex(t,n)}),j(this,"insertElements",t=>{if(!t.length)return;let n=t[0]?.frameId?this.getElementIndex(t[0].frameId):this.elements.length;this.insertElementsAtIndex(t,n)}),j(this,"getContainerElement",t=>t&&t.containerId&&this.getElement(t.containerId)||null),j(this,"getElementsFromId",t=>{let n=this.getNonDeletedElementsMap(),a=n.get(t);return a?[a]:tt(n,t)})}static mapElementToScene(t,n){Bg(t)?this.sceneMapById.set(t,n):(this.sceneMapByElement.set(t,n),this.sceneMapById.set(t.id,n))}static getScene(t){return Bg(t)?this.sceneMapById.get(t)||null:this.sceneMapByElement.get(t)||null}getSceneNonce(){return this.sceneNonce}getNonDeletedElementsMap(){return this.nonDeletedElementsMap}getElementsIncludingDeleted(){return this.elements}getElementsMapIncludingDeleted(){return this.elementsMap}getNonDeletedElements(){return this.nonDeletedElements}getFramesIncludingDeleted(){return this.frames}getSelectedElements(t){let n=PO(t),a=t?.elements||this.nonDeletedElements;if(this.selectedElementsCache.elements===a&&this.selectedElementsCache.selectedElementIds===t.selectedElementIds){let r=this.selectedElementsCache.cache.get(n);if(r)return r}else t?.elements==null&&this.selectedElementsCache.cache.clear();let i=ve(a,{selectedElementIds:t.selectedElementIds},t);return t?.elements==null&&(this.selectedElementsCache.selectedElementIds=t.selectedElementIds,this.selectedElementsCache.elements=this.nonDeletedElements,this.selectedElementsCache.cache.set(n,i)),i}getNonDeletedFramesLikes(){return this.nonDeletedFramesLikes}getElement(t){return this.elementsMap.get(t)||null}getNonDeletedElement(t){let n=this.getElement(t);return n&&V1(n)?n:null}mapElements(t){let n=!1,a=this.elements.map(i=>{let r=t(i);return r!==i&&(n=!0),r});return n&&this.replaceAllElements(a),n}replaceAllElements(t){let n=t instanceof Array?t:Array.from(t.values()),a=[];LO(n),this.elements=Va(n),this.elementsMap.clear(),this.elements.forEach(r=>{ce(r)&&a.push(r),this.elementsMap.set(r.id,r),md.mapElementToScene(r,this)});let i=zg(this.elements);this.nonDeletedElements=i.elements,this.nonDeletedElementsMap=i.elementsMap,this.frames=a,this.nonDeletedFramesLikes=zg(this.frames).elements,this.triggerUpdate()}triggerUpdate(){this.sceneNonce=Ha();for(let t of Array.from(this.callbacks))t()}onUpdate(t){if(this.callbacks.has(t))throw new Error;return this.callbacks.add(t),()=>{if(!this.callbacks.has(t))throw new Error;this.callbacks.delete(t)}}destroy(){this.elements=[],this.nonDeletedElements=[],this.nonDeletedFramesLikes=[],this.frames=[],this.elementsMap.clear(),this.selectedElementsCache.selectedElementIds=null,this.selectedElementsCache.elements=null,this.selectedElementsCache.cache.clear(),md.sceneMapById.forEach((t,n)=>{t===this&&md.sceneMapById.delete(n)}),this.callbacks.clear()}insertElementAtIndex(t,n){if(!Number.isFinite(n)||n<0)throw new Error("insertElementAtIndex can only be called with index >= 0");let a=[...this.elements.slice(0,n),t,...this.elements.slice(n)];Wa(a,oe([t])),this.replaceAllElements(a)}insertElementsAtIndex(t,n){if(!t.length)return;if(!Number.isFinite(n)||n<0)throw new Error("insertElementAtIndex can only be called with index >= 0");let a=[...this.elements.slice(0,n),...t,...this.elements.slice(n)];Wa(a,oe(t)),this.replaceAllElements(a)}getElementIndex(t){return this.elements.findIndex(n=>n.id===t)}};j(H1,"sceneMapByElement",new WeakMap),j(H1,"sceneMapById",new Map);var NO=H1,xi=NO,V=(e,t,n=!0,a)=>{let i=!1,{points:r,fixedSegments:s,fileId:l,startBinding:c,endBinding:d}=t;if(Q(e)&&(Object.keys(t).length===0||typeof r<"u"||typeof s<"u"||typeof c<"u"||typeof d<"u")){let o=Hn(xi.getScene(e)?.getNonDeletedElementsMap()??new Map);t={...t,angle:0,...Mp({...e,x:t.x||e.x,y:t.y||e.y},o,{fixedSegments:s,points:r,startBinding:c,endBinding:d},{isDragging:a?.isDragging})}}else typeof r<"u"&&(t={...Js(r),...t});for(let o in t){let u=t[o];if(typeof u<"u"){if(e[o]===u&&(typeof u!="object"||u===null||o==="groupIds"||o==="scale"))continue;if(o==="scale"){let h=e[o],p=u;if(h[0]===p[0]&&h[1]===p[1])continue}else if(o==="points"){let h=e[o],p=u;if(h.length===p.length){let U=!1,m=h.length;for(;--m;){let g=h[m],b=p[m];if(g[0]!==b[0]||g[1]!==b[1]){U=!0;break}}if(!U)continue}}e[o]=u,i=!0}}return i&&((typeof t.height<"u"||typeof t.width<"u"||typeof l<"u"||typeof r<"u")&&ut.delete(e),e.version++,e.versionNonce=Ha(),e.updated=ul(),n&&xi.getScene(e)?.triggerUpdate()),e},pe=(e,t,n=!1)=>{let a=!1;for(let i in t){let r=t[i];if(typeof r<"u"){if(e[i]===r&&(typeof r!="object"||r===null))continue;a=!0}}return!a&&!n?e:{...e,...t,updated:ul(),version:e.version+1,versionNonce:Ha()}},dc=(e,t)=>(e.version=(t??e.version)+1,e.versionNonce=Ha(),e.updated=ul(),e),es=e=>ue(e)||Xn(e)?e.points.length<2:e.width===0&&e.height===0,du=(e,t,n,a,i)=>{let[r,s,l,c]=ma(e,i),d=Ge({clientX:a.offsetLeft,clientY:a.offsetTop},a),o=Ge({clientX:a.offsetLeft+t,clientY:a.offsetTop+n},a);return d.x<=l&&d.y<=c&&o.x>=r&&o.y>=s},gd=(e,t,n,a,i,r)=>{let[s,l,c,d]=Ne(e,i),o=Ge({clientX:a.offsetLeft+(r?.left||0),clientY:a.offsetTop+(r?.top||0)},a),u=Ge({clientX:a.offsetLeft+t-(r?.right||0),clientY:a.offsetTop+n-(r?.bottom||0)},a);return s>=o.x&&l>=o.y&&c<=u.x&&d<=u.y},Hg=(e,t,n)=>{let a=Math.abs(t),i=Math.abs(n);if(e==="line"||e==="arrow"||e==="freedraw"){let r=Math.round(Math.atan(i/a)/nr)*nr;r===0?n=0:r===Math.PI/2?t=0:n=a*Math.tan(r)*Math.sign(n)||n}else e!=="selection"&&(n=a*Math.sign(n));return{width:t,height:n}},X1=(e,t,n,a)=>{let i=n-e,r=a-t,s=Math.round(Math.atan(r/i)/nr)*nr;if(s===0)r=0;else if(s===Math.PI/2)i=0;else{let l=Math.tan(s),c=-1,d=t-l*e,o=-1/l,u=-1,h=a-o*n,p=(c*h-u*d)/(l*u-o*c),U=(d*o-h*l)/(l*u-o*c);i=p-e,r=U-t}return{width:i,height:r}},V3=e=>{let t={width:e.width,height:e.height,x:e.x,y:e.y};if(e.width<0){let n=Math.abs(e.width);t.width=n,t.x=e.x-n}if(e.height<0){let n=Math.abs(e.height);t.height=n,t.y=e.y-n}return t},Xg={mouse:8,pen:16,touch:28},OO=16,G3={e:!0,s:!0,n:!0,w:!0},Wg={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},vh={e:!0,s:!0,n:!0,w:!0},Qa=(e,t,n,a,i,r,s)=>{let[l,c]=z(E(e+n/2,t+a/2),E(i,r),s);return[l-n/2,c-a/2,n,a]},Bp=e=>!(e.viewport.isMobile||e.isTouchScreen&&(gM||r8)),oo=e=>Bp(e)?G3:{},Hp=([e,t,n,a,i,r],s,l,c,d={},o=4,u=Wr)=>{let h=Xg[c],p=h/l.value,U=h/l.value,m=h/l.value,g=h/l.value,b=n-e,x=a-t,v=o/l.value,y=(h-u*2)/(2*l.value),w={nw:d.nw?void 0:Qa(e-v-m+y,t-v-g+y,p,U,i,r,s),ne:d.ne?void 0:Qa(n+v-y,t-v-g+y,p,U,i,r,s),sw:d.sw?void 0:Qa(e-v-m+y,a+v-y,p,U,i,r,s),se:d.se?void 0:Qa(n+v-y,a+v-y,p,U,i,r,s),rotation:d.rotation?void 0:Qa(e+b/2-p/2,t-v-g+y-OO/l.value,p,U,i,r,s)},k=5*Xg.mouse/l.value;return Math.abs(b)>k&&(d.n||(w.n=Qa(e+b/2-p/2,t-v-g+y,p,U,i,r,s)),d.s||(w.s=Qa(e+b/2-p/2,a+v-y,p,U,i,r,s))),Math.abs(x)>k&&(d.w||(w.w=Qa(e-v-m+y,t+x/2-U/2,p,U,i,r,s)),d.e||(w.e=Qa(n+v-y,t+x/2-U/2,p,U,i,r,s))),w},Y3=(e,t,n,a="mouse",i=G3)=>{if(e.locked||Q(e))return{};if(e.type==="freedraw"||ue(e)){if(e.points.length===2){let[,s]=e.points;s[0]===0||s[1]===0?i=vh:s[0]>0&&s[1]<0?i=Wg:s[0]>0&&s[1]>0?i=vh:s[0]<0&&s[1]>0?i=Wg:s[0]<0&&s[1]<0&&(i=vh)}}else ce(e)&&(i={...i,rotation:!0});let r=ue(e)?Wr+8:Le(e)?0:Wr;return Hp(he(e,n,!0),e.angle,t,a,i,r,Le(e)?0:void 0)},Z3=(e,t)=>{if(t.editingLinearElement)return!1;if(e.length>1)return!0;let n=e[0];return Q(n)?!1:ue(n)?n.points.length>2:!0},W1=(e,t,n)=>t>=e[0]&&t<=e[0]+e[2]&&n>=e[1]&&n<=e[1]+e[3],$O=(e,t,n,a,i,r,s,l)=>{if(!n.selectedElementIds[e.id])return!1;let{rotation:c,...d}=Y3(e,r,t,s,oo(l));if(c&&W1(c,a,i))return"rotation";let o=Object.keys(d).filter(u=>{let h=d[u];return h?W1(h,a,i):!1});if(o.length>0)return o[0];if(Bp(l)){let[u,h,p,U,m,g]=he(e,t);if(!(ue(e)&&e.points.length<=2)){let b=Le(e)?0:Od/r.value,x=Od/r.value,v=K3(E(u-b,h-b),E(p+b,U+b),E(m,g),e.angle);for(let[y,w]of Object.entries(v))if(Vr(E(a,i),w,x))return y}}return!1},Vg=(e,t,n,a,i,r,s,l)=>e.reduce((c,d)=>{if(c)return c;let o=$O(d,s,t,n,a,i,r,l);return o?{element:d,transformHandleType:o}:null},null),Gg=([e,t,n,a],i,r,s,l,c)=>{let d=Hp([e,t,n,a,(e+n)/2,(t+a)/2],0,s,l,oo(c)),o=Object.keys(d).find(u=>{let h=d[u];return h&&W1(h,i,r)});if(o)return o;if(Bp(c)){let u=(e+n)/2,h=(t+a)/2,p=Od/s.value,U=K3(E(e-p,t-p),E(n+p,a+p),E(u,h),0);for(let[m,g]of Object.entries(U))if(Vr(E(i,r),g,p))return m}return!1},xh=["ns","nesw","ew","nwse"],FO=(e,t)=>{let n=xh.indexOf(e);if(n>=0){let a=Math.round(t/(Math.PI/4));e=xh[(n+a)%xh.length]}return e},Yg=e=>{let{element:t,transformHandleType:n}=e,a=t&&Math.sign(t.height)*Math.sign(t.width)===-1,i=null;switch(n){case"n":case"s":i="ns";break;case"w":case"e":i="ew";break;case"nw":case"se":a?i="nesw":i="nwse";break;case"ne":case"sw":a?i="nwse":i="nesw";break;case"rotation":return"grab"}return i&&t&&(i=FO(i,t.angle)),i?`${i}-resize`:""},K3=([e,t],[n,a],i,r)=>{let s=z(E(e,t),i,r),l=z(E(n,t),i,r),c=z(E(e,a),i,r),d=z(E(n,a),i,r);return{n:[s,l],e:[l,d],s:[d,c],w:[c,s]}},zO=(e,t,n,a,i,r,s,l,c,d,o,u)=>{if(n.length===1){let[h]=n;if(t==="rotation")Q(h)||(BO(h,a,i,c,d,r),xn(h,a));else{if(q(h)&&t)return HO(e,h,a,t,s,c,d),xn(h,a),!0;if(t){let p=n[0].id,U=a.get(p),m=e.get(p);if(U&&m){let{nextWidth:g,nextHeight:b}=ZO(U,m,a,e,t,c,d,{shouldMaintainAspectRatio:l,shouldResizeFromCenter:s});Fo(g,b,U,m,a,e,t,{shouldMaintainAspectRatio:l,shouldResizeFromCenter:s})}}}return!0}else if(n.length>1){if(t==="rotation")return XO(e,n,a,i,c,d,r,o,u),!0;if(t){let{nextWidth:h,nextHeight:p,flipByX:U,flipByY:m,originalBoundingBox:g}=KO(n,e,a,t,c,d,{shouldMaintainAspectRatio:l,shouldResizeFromCenter:s});return q3(n,a,t,i,e,{shouldResizeFromCenter:s,shouldMaintainAspectRatio:l,flipByX:U,flipByY:m,nextWidth:h,nextHeight:p,originalBoundingBox:g}),!0}}return!1},BO=(e,t,n,a,i,r)=>{let[s,l,c,d]=he(e,t),o=(s+c)/2,u=(l+d)/2,h;ce(e)?h=0:(h=5*Math.PI/2+Math.atan2(i-u,a-o),r&&(h=h+nr/2,h=h-h%nr),h=Bd(h));let p=bi(e);if(V(e,{angle:h}),p){let U=n.getElement(p);U&&!xe(e)&&V(U,{angle:h})}},Xp=(e,t,n,a)=>ue(e)||Xn(e)?{points:Qd(0,t,Qd(1,n,e.points,a),a)}:{},Wp=(e,t,n)=>{let a=e.width;if(nt(e)){let r=Ht(e,t);r&&(a=vi(r,e))}let i=e.fontSize*(n/a);return i<$0?null:{size:i}},HO=(e,t,n,a,i,r,s)=>{let[l,c,d,o,u,h]=he(t,n),[p,U]=z(E(r,s),E(u,h),-t.angle),m=0,g=0;a!=="e"&&a!=="w"&&(a.includes("e")&&(m=(p-l)/(d-l)),a.includes("w")&&(m=(d-p)/(d-l)),a.includes("n")&&(g=(o-U)/(o-c)),a.includes("s")&&(g=(U-c)/(o-c)));let b=Math.max(m,g);if(b>0){let x=t.width*b,v=t.height*b,y=Wp(t,n,x);if(y===null)return;let w=[l,c],k=[d,o],C=[u,h],I=E(l,c);if(["n","w","nw"].includes(a)&&(I=E(k[0]-Math.abs(x),k[1]-Math.abs(v))),a==="ne"){let P=[w[0],k[1]];I=E(P[0],P[1]-Math.abs(v))}if(a==="sw"){let P=[k[0],w[1]];I=E(P[0]-Math.abs(x),P[1])}["s","n"].includes(a)&&(I[0]=C[0]-x/2),["e","w"].includes(a)&&(I[1]=C[1]-v/2),i&&(I[0]=C[0]-Math.abs(x)/2,I[1]=C[1]-Math.abs(v)/2);let A=t.angle,_=z(I,E(u,h),A),T=E(I[0]+Math.abs(x)/2,I[1]+Math.abs(v)/2),D=z(T,E(u,h),A);I=z(_,D,-A);let[L,F]=I;V(t,{fontSize:y.size,width:x,height:v,x:L,y:F})}if(a==="e"||a==="w"){let x=e.get(t.id),[v,y,w,k]=qi(x,x.width,x.height,!0),C=E(v,y),I=E(w,k),A=Qo(C,I),_=z(E(r,s),A,-x.angle),[T,,D]=qi(t,t.width,t.height,!0),L=D-T,F=I[0]-C[0],P=Y0(Xe({fontSize:t.fontSize,fontFamily:t.fontFamily}),t.lineHeight),O=F/L;a.includes("e")&&(O=(_[0]-C[0])/L),a.includes("w")&&(O=(I[0]-_[0])/L);let N=t.width*O<P?P:t.width*O,X=rs(t.originalText,Xe(t),Math.abs(N)),H=an(X,Xe(t),t.lineHeight),G=H.height,[se,le,Ie,Qe]=qi(x,N,G,!0),rt=Ie-se,at=Qe-le,de=[...C];["n","w","nw"].includes(a)&&(de=[I[0]-Math.abs(rt),C[1]]);let me=x.angle,Be=z(de,A,me),ye=E(de[0]+Math.abs(rt)/2,de[1]+Math.abs(at)/2),je=z(ye,A,me);de=z(Be,je,-me);let kt={width:Math.abs(N),height:Math.abs(H.height),x:de[0],y:de[1],text:X,autoResize:!1};V(t,kt)}},XO=(e,t,n,a,i,r,s,l,c)=>{let d=5*Math.PI/2+Math.atan2(r-c,i-l);s&&(d+=nr/2,d-=d%nr);for(let o of t)if(!ce(o)){let[u,h,p,U]=he(o,n),m=(u+p)/2,g=(h+U)/2,b=e.get(o.id)?.angle??o.angle,[x,v]=z(E(m,g),E(l,c),d+b-o.angle);Q(o)?V(o,{points:DP(o,n)}):V(o,{x:o.x+(x-m),y:o.y+(v-g),angle:Bd(d+b)},!1),xn(o,n,{simultaneouslyUpdated:t});let y=ge(o,n);y&&!xe(o)&&V(y,{x:y.x+(x-m),y:y.y+(v-g),angle:Bd(d+b)},!1)}a.triggerUpdate()},WO=(e,t,n,a,i)=>{let[r,s,l,c]=t.length===1?he(t[0],n):Ne(t),d=(r+l)/2,o=(s+c)/2,u=t.length===1?t[0].angle:0;switch([a,i]=z(E(a,i),E(d,o),-u),e){case"n":return z(E(a-(r+l)/2,i-s),E(0,0),u);case"s":return z(E(a-(r+l)/2,i-c),E(0,0),u);case"w":return z(E(a-r,i-(s+c)/2),E(0,0),u);case"e":return z(E(a-l,i-(s+c)/2),E(0,0),u);case"nw":return z(E(a-r,i-s),E(0,0),u);case"ne":return z(E(a-l,i-s),E(0,0),u);case"sw":return z(E(a-r,i-c),E(0,0),u);case"se":return z(E(a-l,i-c),E(0,0),u);default:return[0,0]}},VO=(e,t)=>{let[,[n,a]]=t.points;return e==="nw"&&(n<0||a<0)||e==="ne"&&n>=0||e==="sw"&&n<=0||e==="se"&&(n>0||a>0)?"end":"origin"},GO=(e,t,n)=>{if(n)return"center";if(t)switch(e){case"n":return"south-side";case"e":return"west-side";case"s":return"north-side";case"w":return"east-side";case"ne":return"bottom-left";case"nw":return"bottom-right";case"se":return"top-left";case"sw":return"top-right"}return["e","se","s"].includes(e)?"top-left":["n","nw","w"].includes(e)?"bottom-right":e==="ne"?"bottom-left":"top-right"},YO=(e,t,n,a,i,r,s,l,c)=>{let d=GO(s,l,c),[o,u]=e;switch(d){case"top-left":return{x:o+(t-a)/2+(a-t)/2*Math.cos(r)+(n-i)/2*Math.sin(r),y:u+(n-i)/2+(a-t)/2*Math.sin(r)+(i-n)/2*Math.cos(r)};case"top-right":return{x:o+(t-a)/2*(Math.cos(r)+1)+(n-i)/2*Math.sin(r),y:u+(n-i)/2+(t-a)/2*Math.sin(r)+(i-n)/2*Math.cos(r)};case"bottom-left":return{x:o+(t-a)/2*(1-Math.cos(r))+(i-n)/2*Math.sin(r),y:u+(n-i)/2*(Math.cos(r)+1)+(a-t)/2*Math.sin(r)};case"bottom-right":return{x:o+(t-a)/2*(Math.cos(r)+1)+(i-n)/2*Math.sin(r),y:u+(n-i)/2*(Math.cos(r)+1)+(t-a)/2*Math.sin(r)};case"center":return{x:o-(a-t)/2,y:u-(i-n)/2};case"east-side":return{x:o+(t-a)/2*(Math.cos(r)+1),y:u+(t-a)/2*Math.sin(r)+(n-i)/2};case"west-side":return{x:o+(t-a)/2*(1-Math.cos(r)),y:u+(a-t)/2*Math.sin(r)+(n-i)/2};case"north-side":return{x:o+(t-a)/2+(n-i)/2*Math.sin(r),y:u+(i-n)/2*(Math.cos(r)-1)};case"south-side":return{x:o+(t-a)/2+(i-n)/2*Math.sin(r),y:u+(n-i)/2*(Math.cos(r)+1)}}},Fo=(e,t,n,a,i,r,s,{shouldInformMutation:l=!0,shouldMaintainAspectRatio:c=!1,shouldResizeFromCenter:d=!1}={})=>{let o={},u=ge(n,i);if(u){let m=r.get(u.id);if(m&&(o={fontSize:m.fontSize}),c){let g={...n,width:e},b=Wp(u,i,vi(g,u));if(b===null)return;o={fontSize:b.size}}else{let g=R8(Xe(u),u.lineHeight),b=D8(u.fontSize,u.lineHeight);e=Math.max(e,g),t=Math.max(t,b)}}let h=Xp(a,e,t,!0),p=E(a.x,a.y);if(ue(a)){let[m,g]=ma(a,r);p=E(m,g)}let U=YO(p,a.width,a.height,e,t,a.angle,s,c,d);if(ue(a)&&h.points){let m=a.x-p[0],g=a.y-p[1];U.x+=m,U.y+=g;let b=h.points[0][0],x=h.points[0][1];U.x+=b,U.y+=x,h.points=h.points.map(v=>E(v[0]-b,v[1]-x))}if(e<0&&(U.x=U.x+e),t<0&&(U.y=U.y+t),"scale"in n&&"scale"in a&&V(n,{scale:[(Math.sign(e)||a.scale[0])*a.scale[0],(Math.sign(t)||a.scale[1])*a.scale[1]]}),xe(n)&&u&&c){let m=e/n.width*u.fontSize;if(m<$0)return;o.fontSize=m}if(e!==0&&t!==0&&Number.isFinite(U.x)&&Number.isFinite(U.y)){let m={...U,width:Math.abs(e),height:Math.abs(t),...h};V(n,m,l),xn(n,i,{newSize:{width:e,height:t}}),u&&o!=null&&V(u,{fontSize:o.fontSize}),ic(n,i,s,c)}},ZO=(e,t,n,a,i,r,s,{shouldMaintainAspectRatio:l=!1,shouldResizeFromCenter:c=!1}={})=>{let[d,o,u,h]=qi(t,t.width,t.height,!0),p=E(d,o),U=E(u,h),m=Qo(p,U),g=z(E(r,s),m,-t.angle),[b,x,v,y]=qi(e,e.width,e.height,!0),w=v-b,k=y-x,C=U[0]-p[0],I=U[1]-p[1],A=C/w,_=I/k;i.includes("e")&&(A=(g[0]-p[0])/w),i.includes("s")&&(_=(g[1]-p[1])/k),i.includes("w")&&(A=(U[0]-g[0])/w),i.includes("n")&&(_=(U[1]-g[1])/k);let T=e.width*A,D=e.height*_;if(c&&(T=2*T-t.width,D=2*D-t.height),l){let L=Math.abs(T)/t.width,F=Math.abs(D)/t.height;if(i.length===1&&(D*=L,T*=F),i.length===2){let P=Math.max(L,F);T=t.width*P*Math.sign(T),D=t.height*P*Math.sign(D)}}return{nextWidth:T,nextHeight:D}},KO=(e,t,n,a,i,r,{shouldMaintainAspectRatio:s=!1,shouldResizeFromCenter:l=!1}={})=>{let c=e.map(L=>t.get(L.id)),d=c.reduce((L,F)=>{if(!ue(F))return L;let P=bi(F);if(!P)return L;let O=t.get(P)??null;return nt(O)?[...L,{...O,...J.getBoundTextElementPosition(F,O,n)}]:L},[]),o=da(c.map(L=>L).concat(d)),{minX:u,minY:h,maxX:p,maxY:U,midX:m,midY:g}=o,b=p-u,x=U-h,v={ne:[u,U],se:[u,h],sw:[p,h],nw:[p,U],e:[u,h+x/2],w:[p,h+x/2],n:[u+b/2,U],s:[u+b/2,h]},[y,w]=l?[m,g]:v[a],k=l?2:1,C=Math.max(Math.abs(i-y)/b||0,Math.abs(r-w)/x||0)*k,I=a.includes("e")||a.includes("w")?Math.abs(i-y)*k:b,A=a.includes("n")||a.includes("s")?Math.abs(r-w)*k:x;s&&(I=b*C*Math.sign(i-y),A=x*C*Math.sign(r-w));let _={ne:[i<y,r>w],se:[i<y,r<w],sw:[i>y,r<w],nw:[i>y,r>w],e:[i<y,!1],w:[i>y,!1],n:[!1,r>w],s:[!1,r<w]},[T,D]=_[a].map(L=>L);return{originalBoundingBox:o,nextWidth:I,nextHeight:A,flipByX:T,flipByY:D}},q3=(e,t,n,a,i,{shouldMaintainAspectRatio:r=!1,shouldResizeFromCenter:s=!1,flipByX:l=!1,flipByY:c=!1,nextHeight:d,nextWidth:o,originalBoundingBox:u}={})=>{if(o===void 0&&d===void 0&&l===void 0&&c===void 0||d===0||o===0)return;i||(i=t);let h=e.reduce((k,C)=>{let I=i.get(C.id);return I&&k.push({orig:I,latest:C}),k},[]),p;if(u)p=u;else{let k=h.reduce((C,{orig:I})=>{if(!ue(I))return C;let A=bi(I);if(!A)return C;let _=i.get(A)??null;return nt(_)?[...C,{..._,...J.getBoundTextElementPosition(I,_,t)}]:C},[]);p=da(h.map(({orig:C})=>C).concat(k))}let{minX:U,minY:m,maxX:g,maxY:b,midX:x,midY:v}=p,y=g-U,w=b-m;if(o===void 0&&d===void 0&&(o=y,d=w),r&&(o===void 0?o=d*(y/w):d===void 0?d=o*(w/y):Math.abs(o/d-y/w)>.001&&(o=d*(y/w))),o&&d){let k=n.includes("e")||n.includes("w")?Math.abs(o)/y:1,C=n.includes("n")||n.includes("s")?Math.abs(d)/w:1,I;n.length===1?I=n.includes("e")||n.includes("w")?k:C:I=Math.max(Math.abs(o)/y||0,Math.abs(d)/w||0);let A={ne:[U,b],se:[U,m],sw:[g,m],nw:[g,b],e:[U,m+w/2],w:[g,m+w/2],n:[U+y/2,b],s:[U+y/2,m]},[_,T]=s?[x,v]:A[n],D=r||h.some(N=>N.latest.angle!==0||q(N.latest)||Qs(N.latest));D&&(k=I,C=I);let[L,F]=[l?-1:1,c?-1:1],P=[];for(let{orig:N,latest:X}of h){if(q(N)&&nt(N))continue;let H=N.width*k,G=N.height*C,se=Bd(N.angle*L*F),le=ue(N)||Xn(N),Ie=N.x-_,Qe=N.y-T,rt=l&&!le?H:0,at=c&&!le?G:0,de=_+L*(Ie*k+rt),me=T+F*(Qe*C+at),Be=Xp(N,H*L,G*F,!1),ye={x:de,y:me,width:H,height:G,angle:se,...Be};if(Q(N)&&(N.startBinding&&(ye.startBinding={...N.startBinding,fixedPoint:[l?-N.startBinding.fixedPoint[0]+1:N.startBinding.fixedPoint[0],c?-N.startBinding.fixedPoint[1]+1:N.startBinding.fixedPoint[1]]}),N.endBinding&&(ye.endBinding={...N.endBinding,fixedPoint:[l?-N.endBinding.fixedPoint[0]+1:N.endBinding.fixedPoint[0],c?-N.endBinding.fixedPoint[1]+1:N.endBinding.fixedPoint[1]]}),N.fixedSegments&&Be.points&&(ye.fixedSegments=N.fixedSegments.map(kt=>({...kt,start:Be.points[kt.index-1],end:Be.points[kt.index]})))),Le(N)&&(ye.scale=[N.scale[0]*L,N.scale[1]*F]),q(N)){let kt=Wp(N,t,H);if(!kt)return;ye.fontSize=kt.size}let je=i.get(bi(N)??"");if(je)if(D){let kt=je.fontSize*I;if(kt<$0)return;ye.boundTextFontSize=kt}else ye.boundTextFontSize=je.fontSize;P.push({element:X,update:ye})}let O=P.map(({element:N})=>N);for(let{element:N,update:{boundTextFontSize:X,...H}}of P){let{width:G,height:se,angle:le}=H;V(N,H,!1,{isDragging:!0}),xn(N,t,{simultaneouslyUpdated:O,newSize:{width:G,height:se}});let Ie=ge(N,t);Ie&&X&&(V(Ie,{fontSize:X,angle:ue(N)?void 0:le},!1),ic(N,t,n,!0))}a.triggerUpdate()}},qO=(e,t,n,a,i,r)=>{if(t.length===1&&Q(t[0])&&(t[0].startBinding||t[0].endBinding))return;let s=t.filter(u=>{if(Q(u)&&u.startBinding&&u.endBinding){let h=t.find(U=>U.id===u.startBinding?.elementId),p=t.find(U=>U.id===u.endBinding?.elementId);return h&&p}return!0}),l=new Set(s),c=s.filter(u=>ce(u)).map(u=>u.id);if(c.length>0)for(let u of a.getNonDeletedElements())u.frameId!==null&&c.includes(u.frameId)&&l.add(u);let d=Ne(Array.from(l).map(u=>e.originalElements.get(u.id)??u)),o=JO(d,n,i,r);l.forEach(u=>{if(Zg(e,u,o),!xe(u)){let h=ge(u,a.getNonDeletedElementsMap());h&&Zg(e,h,o),xn(u,a.getElementsMapIncludingDeleted(),{simultaneouslyUpdated:Array.from(l)})}})},JO=(e,t,n,a)=>{let[i,r]=e,s=i+t.x+n.x,l=r+t.y+n.y;if(n.x===0||n.y===0){let[c,d]=Mt(i+t.x,r+t.y,a);n.x===0&&(s=c),n.y===0&&(l=d)}return{x:s-i,y:l-r}},Zg=(e,t,n)=>{let a=e.originalElements.get(t.id)??t,i=a.x+n.x,r=a.y+n.y;V(t,{x:i,y:r})},QO=(e,t,n)=>{let[a,i]=Ne(e);return[t-a,n-i]},Kg=({newElement:e,elementType:t,originX:n,originY:a,x:i,y:r,width:s,height:l,shouldMaintainAspectRatio:c,shouldResizeFromCenter:d,zoom:o,widthAspectRatio:u=null,originOffset:h=null,informMutation:p=!0})=>{c&&e.type!=="selection"&&(u?l=s/u:(Math.abs(r-a)>Math.abs(i-n)?{width:s,height:l}=Hg(t,l,i<n?-s:s):{width:s,height:l}=Hg(t,s,r<a?-l:l),l<0&&(l=-l)));let U=i<n?n-s:n,m=r<a?a-l:a;d&&(s+=s,l+=l,U=n-s/2,m=a-l/2);let g=null;if(q(e)){l=e.height;let b=Y0(Xe({fontSize:e.fontSize,fontFamily:e.fontFamily}),e.lineHeight);s=Math.max(s,b),Math.abs(i-n)>yM/o&&(g={autoResize:!1}),m=a,d&&(U=n-s/2)}if(s!==0&&l!==0){let b=null;Le(e)&&(b={initialWidth:s,initialHeight:l}),V(e,{x:U+(h?.x??0),y:m+(h?.y??0),width:s,height:l,...g,...b},p)}},Vp=(e,t)=>!!(!e.viewModeEnabled&&e.openDialog?.name!=="elementLinkSelector"&&(e.activeTool.type!=="custom"&&(e.editingTextElement||e.activeTool.type!=="selection"&&e.activeTool.type!=="eraser"&&e.activeTool.type!=="hand"&&e.activeTool.type!=="laser")||ve(t,e).length)),e$=e=>e.reduce((t,n)=>t+n.version,0),J3=e=>{let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e[n].versionNonce;return t>>>0},Gp=e=>{let t=5381;for(let n=0;n<e.length;n++){let a=e.charCodeAt(n);t=(t<<5)+t+a}return t>>>0},t$=e=>e.filter(t=>!t.isDeleted&&!es(t)),Ve=e=>e.filter(t=>!t.isDeleted),V1=e=>!e.isDeleted,Q3=e=>Ve(e).map(t=>G0(t.type)?{...t,lastCommittedPoint:null}:t),n$=e=>Q3(e),e4=e=>Q3(e),t4=async e=>{let t;if(e.type===ae.png)try{return await(await ne(async()=>{const{decodePngMetadata:n}=await Promise.resolve().then(()=>Cy);return{decodePngMetadata:n}},void 0,import.meta.url)).decodePngMetadata(e)}catch(n){throw n.message==="INVALID"?new _r("Image doesn't contain scene","IMAGE_NOT_CONTAINS_SCENE_DATA"):new _r("Error: cannot restore image")}else if("text"in Blob?t=await e.text():t=await new Promise(n=>{let a=new FileReader;a.readAsText(e,"utf8"),a.onloadend=()=>{a.readyState===FileReader.DONE&&n(a.result)}}),e.type===ae.svg)try{return zN({svg:t})}catch(n){throw n.message==="INVALID"?new _r("Image doesn't contain scene","IMAGE_NOT_CONTAINS_SCENE_DATA"):new _r("Error: cannot restore image")}return t},n4=e=>e&&e.name.match(/\.(json|excalidraw|png|svg)$/)?.[1]||null,a$=e=>e==="png"||e==="svg",Yp=e=>{let t=n4(e);return t==="png"||t==="svg"},a4=e=>!!e&&Object.values(Ws).includes(e),Or=e=>{let{type:t}=e||{};return a4(t)},Zp=async(e,t,n,a)=>{let i=await t4(e),r;try{try{r=JSON.parse(i)}catch(s){throw Or(e)?new _r("Image doesn't contain scene","IMAGE_NOT_CONTAINS_SCENE_DATA"):s}if(RN(r))return{type:ae.excalidraw,data:sc({elements:e4(r.elements||[]),appState:{theme:t?.theme,fileHandle:a||e.handle||null,...U8(r.appState||{}),...t?Lo(r.elements||[],t):{}},files:r.files},t,n,{repairBindings:!0,refreshDimensions:!1})};if(d3(r))return{type:ae.excalidrawlib,data:r};throw new Error("Error: invalid file")}catch(s){throw s instanceof _r?s:new Error("Error: invalid file")}},Kp=async(e,t,n,a)=>{let i=await Zp(e,t,n,a);if(i.type!==ae.excalidraw)throw new Error("Error: invalid file");return i.data},i4=(e,t="unpublished")=>{let n=JSON.parse(e);if(!d3(n))throw new Error("Invalid library");let a=n.libraryItems||n.library;return lc(a,t)},r4=async(e,t="unpublished")=>i4(await t4(e),t),zo=async e=>new Promise(async(t,n)=>{try{ec(e)&&(e=await e),e.toBlob(a=>{if(!a)return n(new RT("Error: Canvas too big","CANVAS_POSSIBLY_TOO_BIG"));t(a)})}catch(a){n(a)}}),i$=async e=>{try{let t=await window.crypto.subtle.digest("SHA-1",await Ar(e));return UI(new Uint8Array(t))}catch(t){return console.error(t),P0(40)}},G1=async e=>new Promise((t,n)=>{let a=new FileReader;a.onload=()=>{let i=a.result;t(i)},a.onerror=i=>n(i),a.readAsDataURL(e)}),r$=(e,t)=>`data:${t};base64,${o4(uu(e),!0)}`,s$=(e,t="")=>{let n=e.indexOf(","),a=atob(e.slice(n+1)),i=e.slice(0,n).split(":")[1].split(";")[0],r=new ArrayBuffer(a.length),s=new Uint8Array(r);for(let l=0;l<a.length;l++)s[l]=a.charCodeAt(l);return new File([r],t,{type:i})},l$=e=>c4(e.slice(e.indexOf(",")+1)),Y1=async(e,t)=>{if(e.type===ae.svg)return e;let[n,a]=await Promise.all([ne(()=>import("./pica-41wOwwIp.js").then(r=>r.p),__vite__mapDeps([4,2,3,5]),import.meta.url).then(r=>r.default),ne(()=>import("./image-blob-reduce.esm-BLtmMM_J.js"),[],import.meta.url).then(r=>r.default)]),i=a({pica:n({features:["js","wasm"]})});if(t.outputType){let{outputType:r}=t;i._create_blob=function(s){return this.pica.toBlob(s.out_canvas,r,.8).then(l=>(s.out_blob=l,s))}}if(!Or(e))throw new Error("Error: unsupported file type",{cause:"UNSUPPORTED"});return new File([await i.toBlob(e,{max:t.maxWidthOrHeight,alpha:!0})],e.name,{type:t.outputType||e.type})},qg=(e,t="")=>new File([new TextEncoder().encode(e)],t,{type:ae.svg}),o$=async(e,t="")=>{let n;try{n=await fetch(e)}catch{throw new Error("Error: failed to fetch image",{cause:"FETCH_ERROR"})}if(!n.ok)throw new Error("Error: failed to fetch image",{cause:"FETCH_ERROR"});let a=await n.blob();if(a.type&&Or(a)){let i=t||a.name||"";return new File([a],i,{type:a.type})}throw new Error("Error: unsupported file type",{cause:"UNSUPPORTED"})},c$=async e=>{let t=e.dataTransfer.files.item(0),n=await d$(e);return{file:t?await qp(t):null,fileHandle:n}},d$=async e=>{if(is)try{return await e.dataTransfer.items[0].getAsFileSystemHandle()||null}catch(t){return console.warn(t.name,t.message),null}return null},Jg=e=>{let t=null,n=`${[...new Uint8Array(e).slice(0,8)].join(" ")} `,a={png:"137 80 78 71 13 10 26 10 ",jpg:"255 216 255 ",gif:"71 73 70 56 57 97 "};return n===a.png?t=ae.png:n.startsWith(a.jpg)?t=ae.jpg:n.startsWith(a.gif)&&(t=ae.gif),t},Gl=(e,t,n)=>new File([e],n||"",{type:t}),qp=async e=>{if(e.type){if(Or(e)){let t=await Ar(e),n=Jg(t);n&&n!==e.type&&(e=Gl(t,n,e.name))}}else if(e?.name?.endsWith(".excalidrawlib"))e=Gl(await Ar(e),ae.excalidrawlib,e.name);else if(e?.name?.endsWith(".excalidraw"))e=Gl(await Ar(e),ae.excalidraw,e.name);else{let t=await Ar(e),n=Jg(t);n&&(e=Gl(t,n,e.name))}return e},Ar=e=>"arrayBuffer"in e?e.arrayBuffer():new Promise((t,n)=>{let a=new FileReader;a.onload=i=>{if(!i.target?.result)return n(new Error("Couldn't convert blob to ArrayBuffer"));t(i.target.result)},a.readAsArrayBuffer(e)}),uu=e=>{let t=typeof e=="string"?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e),n="";for(let a of t)n+=String.fromCharCode(a);return n},s4=e=>{let t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let a=0,i=e.length;a<i;a++)n[a]=e.charCodeAt(a);return t},l4=e=>new TextDecoder("utf-8").decode(s4(e)),o4=(e,t=!1)=>t?window.btoa(e):window.btoa(uu(e)),c4=(e,t=!1)=>t?window.atob(e):l4(window.atob(e)),d4=({text:e,compress:t})=>{let n;if(t!==!1)try{n=uu(Pk(e))}catch(a){console.error("encode: cannot deflate",a)}return{version:"1",encoding:"bstring",compressed:!!n,encoded:n||uu(e)}},u4=e=>{let t;if(e.encoding==="bstring")t=e.compressed?e.encoded:l4(e.encoded);else throw new Error(`decode: unknown encoding "${e.encoding}"`);return e.compressed?Nk(new Uint8Array(s4(t)),{to:"string"}):t},f4=async e=>{let t=rb(new Uint8Array(await Ar(e))).find(n=>n.name==="tEXt");return t?sb.decode(t.data):null},h4=async({blob:e,metadata:t})=>{let n=rb(new Uint8Array(await Ar(e))),a=sb.encode(ae.excalidraw,JSON.stringify(d4({text:t,compress:!0})));return n.splice(-1,0,a),new Blob([iE(n)],{type:ae.png})},u$=async e=>{let t=await f4(e);if(t?.keyword===ae.excalidraw)try{let n=JSON.parse(t.text);if(!("encoded"in n)){if("type"in n&&n.type===Fn.excalidraw)return t.text;throw new Error("FAILED")}return u4(n)}catch(n){throw console.error(n),new Error("FAILED")}throw new Error("INVALID")},p4={paste:"Paste",pasteAsPlaintext:"Paste as plaintext",pasteCharts:"Paste charts",selectAll:"Select all",multiSelect:"Add element to selection",moveCanvas:"Move canvas",cut:"Cut",copy:"Copy",copyAsPng:"Copy to clipboard as PNG",copyAsSvg:"Copy to clipboard as SVG",copyText:"Copy to clipboard as text",copySource:"Copy source to clipboard",convertToCode:"Convert to code",bringForward:"Bring forward",sendToBack:"Send to back",bringToFront:"Bring to front",sendBackward:"Send backward",delete:"Delete",copyStyles:"Copy styles",pasteStyles:"Paste styles",stroke:"Stroke",changeStroke:"Change stroke color",background:"Background",changeBackground:"Change background color",fill:"Fill",strokeWidth:"Stroke width",strokeStyle:"Stroke style",strokeStyle_solid:"Solid",strokeStyle_dashed:"Dashed",strokeStyle_dotted:"Dotted",sloppiness:"Sloppiness",opacity:"Opacity",textAlign:"Text align",edges:"Edges",sharp:"Sharp",round:"Round",arrowheads:"Arrowheads",arrowhead_none:"None",arrowhead_arrow:"Arrow",arrowhead_bar:"Bar",arrowhead_circle:"Circle",arrowhead_circle_outline:"Circle (outline)",arrowhead_triangle:"Triangle",arrowhead_triangle_outline:"Triangle (outline)",arrowhead_diamond:"Diamond",arrowhead_diamond_outline:"Diamond (outline)",arrowhead_crowfoot_many:"Crow's foot (many)",arrowhead_crowfoot_one:"Crow's foot (one)",arrowhead_crowfoot_one_or_many:"Crow's foot (one or many)",more_options:"More options",arrowtypes:"Arrow type",arrowtype_sharp:"Sharp arrow",arrowtype_round:"Curved arrow",arrowtype_elbowed:"Elbow arrow",fontSize:"Font size",fontFamily:"Font family",addWatermark:'Add "Made with Excalidraw"',handDrawn:"Hand-drawn",normal:"Normal",code:"Code",small:"Small",medium:"Medium",large:"Large",veryLarge:"Very large",solid:"Solid",hachure:"Hachure",zigzag:"Zigzag",crossHatch:"Cross-hatch",thin:"Thin",bold:"Bold",left:"Left",center:"Center",right:"Right",extraBold:"Extra bold",architect:"Architect",artist:"Artist",cartoonist:"Cartoonist",fileTitle:"File name",colorPicker:"Color picker",canvasColors:"Used on canvas",canvasBackground:"Canvas background",drawingCanvas:"Drawing canvas",clearCanvas:"Clear canvas",layers:"Layers",actions:"Actions",language:"Language",liveCollaboration:"Live collaboration...",duplicateSelection:"Duplicate",untitled:"Untitled",name:"Name",yourName:"Your name",madeWithExcalidraw:"Made with Excalidraw",group:"Group selection",ungroup:"Ungroup selection",collaborators:"Collaborators",toggleGrid:"Toggle grid",addToLibrary:"Add to library",removeFromLibrary:"Remove from library",libraryLoadingMessage:"Loading library…",libraries:"Browse libraries",loadingScene:"Loading scene…",loadScene:"Load scene from file",align:"Align",alignTop:"Align top",alignBottom:"Align bottom",alignLeft:"Align left",alignRight:"Align right",centerVertically:"Center vertically",centerHorizontally:"Center horizontally",distributeHorizontally:"Distribute horizontally",distributeVertically:"Distribute vertically",flipHorizontal:"Flip horizontal",flipVertical:"Flip vertical",viewMode:"View mode",share:"Share",showStroke:"Show stroke color picker",showBackground:"Show background color picker",showFonts:"Show font picker",toggleTheme:"Toggle light/dark theme",theme:"Theme",personalLib:"Personal Library",excalidrawLib:"Excalidraw Library",decreaseFontSize:"Decrease font size",increaseFontSize:"Increase font size",unbindText:"Unbind text",bindText:"Bind text to the container",createContainerFromText:"Wrap text in a container",link:{edit:"Edit link",editEmbed:"Edit embeddable link",create:"Add link",label:"Link",labelEmbed:"Link & embed",empty:"No link is set",hint:"Type or paste your link here",goToElement:"Go to target element"},lineEditor:{edit:"Edit line",editArrow:"Edit arrow"},elementLock:{lock:"Lock",unlock:"Unlock",lockAll:"Lock all",unlockAll:"Unlock all"},statusPublished:"Published",sidebarLock:"Keep sidebar open",selectAllElementsInFrame:"Select all elements in frame",removeAllElementsFromFrame:"Remove all elements from frame",eyeDropper:"Pick color from canvas",textToDiagram:"Text to diagram",prompt:"Prompt",followUs:"Follow us",discordChat:"Discord chat",zoomToFitViewport:"Zoom to fit in viewport",zoomToFitSelection:"Zoom to fit selection",zoomToFit:"Zoom to fit all elements",installPWA:"Install Excalidraw locally (PWA)",autoResize:"Enable text auto-resizing",imageCropping:"Image cropping",unCroppedDimension:"Uncropped dimension",copyElementLink:"Copy link to object",linkToElement:"Link to object",wrapSelectionInFrame:"Wrap selection in frame"},U4={title:"Link to object",desc:"Click on a shape on canvas or paste a link.",notFound:"Linked object wasn't found on canvas."},m4={noItems:"No items added yet...",hint_emptyLibrary:"Select an item on canvas to add it here, or install a library from the public repository, below.",hint_emptyPrivateLibrary:"Select an item on canvas to add it here."},g4={title:"Find on canvas",noMatch:"No matches found...",singleResult:"result",multipleResults:"results",placeholder:"Find text on canvas..."},b4={clearReset:"Reset the canvas",exportJSON:"Export to file",exportImage:"Export image...",export:"Save to...",copyToClipboard:"Copy to clipboard",copyLink:"Copy link",save:"Save to current file",saveAs:"Save as",load:"Open",getShareableLink:"Get shareable link",close:"Close",selectLanguage:"Select language",scrollBackToContent:"Scroll back to content",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoom:"Reset zoom",menu:"Menu",done:"Done",edit:"Edit",undo:"Undo",redo:"Redo",resetLibrary:"Reset library",createNewRoom:"Create new room",fullScreen:"Full screen",darkMode:"Dark mode",lightMode:"Light mode",systemMode:"System mode",zenMode:"Zen mode",objectsSnapMode:"Snap to objects",exitZenMode:"Exit zen mode",cancel:"Cancel",clear:"Clear",remove:"Remove",embed:"Toggle embedding",publishLibrary:"Publish",submit:"Submit",confirm:"Confirm",embeddableInteractionButton:"Click to interact"},v4={clearReset:"This will clear the whole canvas. Are you sure?",couldNotCreateShareableLink:"Couldn't create shareable link.",couldNotCreateShareableLinkTooBig:"Couldn't create shareable link: the scene is too big",couldNotLoadInvalidFile:"Couldn't load invalid file",importBackendFailed:"Importing from backend failed.",cannotExportEmptyCanvas:"Cannot export empty canvas.",couldNotCopyToClipboard:"Couldn't copy to clipboard.",decryptFailed:"Couldn't decrypt data.",uploadedSecurly:"The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can't read the content.",loadSceneOverridePrompt:"Loading external drawing will replace your existing content. Do you wish to continue?",collabStopOverridePrompt:`Stopping the session will overwrite your previous, locally stored drawing. Are you sure?
|
|
41
|
+
`).trim()}:n:{type:"text",value:(e.clipboardData?.getData(ae.text)||"").trim()}}catch{return{type:"text",value:""}}},j3=async(e,t=!1)=>{let n=await wO(e,t);if(n.type==="mixedContent")return{mixedContent:n.value};try{let a=!t&&vO(n.value);if(a)return a}catch(a){console.error(a)}try{let a=JSON.parse(n.value),i=a.type===Fn.excalidrawClipboardWithAPI;if(mO(a))return{elements:a.elements,files:a.files,text:t?JSON.stringify(a.elements,null,2):void 0,programmaticAPI:i}}catch{}return{text:n.value}},R3=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[ae.png]:e})])}catch(t){if(ec(e))await navigator.clipboard.write([new window.ClipboardItem({[ae.png]:await e})]);else throw t}},pl=async(e,t)=>{if(Rp)try{await navigator.clipboard.writeText(e||"");return}catch(n){console.error(n)}try{if(t){if(t.clipboardData?.setData(ae.text,e||""),t.clipboardData?.getData(ae.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(n){console.error(n)}if(!EO(e))throw new Error("Error copying to clipboard.")},EO=e=>{e||(e=" ");let t=document.documentElement.getAttribute("dir")==="rtl",n=document.createElement("textarea");n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";let a=window.pageYOffset||document.documentElement.scrollTop;n.style.top=`${a}px`,n.style.fontSize="12pt",n.setAttribute("readonly",""),n.value=e,document.body.appendChild(n);let i=!1;try{n.select(),n.setSelectionRange(0,n.value.length),i=document.execCommand("copy")}catch(r){console.error(r)}return n.remove(),i},oc=({elements:e,appState:t,files:n,maxWidthOrHeight:a,getDimensions:i,exportPadding:r,exportingFrame:s})=>{let{elements:l,appState:c}=sc({elements:e,appState:t},null,null),{exportBackground:d,viewBackgroundColor:o}=c;return S3(l,{...c,offsetTop:0,offsetLeft:0,width:0,height:0},n||{},{exportBackground:d,exportPadding:r,viewBackgroundColor:o,exportingFrame:s},(u,h)=>{let p=document.createElement("canvas");if(a){typeof i=="function"&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");let m=Math.max(u,h),g=a<m?a/m:t?.exportScale??1;return p.width=u*g,p.height=h*g,{canvas:p,scale:g}}let U=i?.(u,h)||{width:u,height:h};return p.width=U.width,p.height=U.height,{canvas:p,scale:U.scale??1}})},D3=async e=>{let{mimeType:t=ae.png,quality:n}=e;t===ae.png&&typeof n=="number"&&console.warn(`"quality" will be ignored for "${ae.png}" mimeType`),t==="image/jpg"&&(t=ae.jpg),t===ae.jpg&&!e.appState?.exportBackground&&(console.warn(`Defaulting "exportBackground" to "true" for "${ae.jpg}" mimeType`),e={...e,appState:{...e.appState,exportBackground:!0}});let a=await oc(e);return n=n||(/image\/jpe?g/.test(t)?.92:.8),new Promise((i,r)=>{a.toBlob(async s=>{if(!s)return r(new Error("couldn't export to blob"));s&&t===ae.png&&e.appState?.exportEmbedScene&&(s=await h4({blob:s,metadata:rc(e.elements,e.appState,e.files||{},"local")})),i(s)},t,n)})},af=async({elements:e,appState:t=za(),files:n={},exportPadding:a,renderEmbeddables:i,exportingFrame:r,skipInliningFonts:s,reuseImages:l})=>{let{elements:c,appState:d}=sc({elements:e,appState:t},null,null),o={...d,exportPadding:a};return Sp(c,o,n,{exportingFrame:r,renderEmbeddables:i,skipInliningFonts:s,reuseImages:l})},SO=async e=>{if(e.type==="svg"){let t=await af(e);await pl(t.outerHTML)}else if(e.type==="png")await R3(D3(e));else if(e.type==="json")await T3(e.elements,e.files);else throw new Error("Invalid export type")},kO=e=>e.type==="diamond"?[E(e.width/2,0),E(e.width,e.height/2),E(e.width/2,e.height),E(0,e.height/2)]:[E(0,0),E(0+e.width,0),E(0+e.width,e.height),E(0,e.height)],CO=e=>ue(e)||Xn(e)?e.points:kO(e),Lg=e=>{let t=e.reduce((n,[a,i])=>(n.minY=Math.min(n.minY,i),n.minX=Math.min(n.minX,a),n.maxX=Math.max(n.maxX,a),n.maxY=Math.max(n.maxY,i),n),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,cx:0,cy:0});return t.cx=(t.maxX+t.minX)/2,t.cy=(t.maxY+t.minY)/2,t},L3=e=>{let t=CO(e),{cx:n,cy:a}=Lg(t),i=E(n,a),r=t.map(o=>z(o,i,e.angle)),{minX:s,minY:l,maxX:c,maxY:d}=Lg(r);return[s+e.x,l+e.y,c+e.x,d+e.y]},z1=(e,t,n=!1)=>{let a=L3(e),i=t[0]<=a[0]&&t[2]>=a[2]&&t[1]<=a[1]&&t[3]>=a[3];return n?i?!0:a[0]<=t[0]&&a[2]>=t[2]&&a[1]<=t[1]&&a[3]>=t[3]:i},P3=(e,t)=>{let n=L3(e);return(Tc(n[0],qt(t[0],t[2]))||Tc(t[0],qt(n[0],n[2])))&&(Tc(n[1],qt(t[1],t[3]))||Tc(t[1],qt(n[1],n[3])))},N3=({elements:e,bounds:t,type:n,errorMargin:a=0})=>{T8(t)&&(t=ma(t,oe(e)));let i=[t[0]-a,t[1]-a,t[2]+a,t[3]+a],r=new Set;for(let s of e)if(!r.has(s.id)&&(n==="overlap"?P3(s,i):n==="inside"?z1(s,i):z1(s,i,!0))){if(r.add(s.id),s.boundElements)for(let l of s.boundElements)r.add(l.id);q(s)&&s.containerId&&r.add(s.containerId),xe(s)&&(s.startBinding&&r.add(s.startBinding.elementId),s.endBinding&&r.add(s.endBinding?.elementId))}return e.filter(s=>r.has(s.id))};function Pg(e){return[Math.min(e[0][0],e[1][0]),Math.min(e[0][1],e[1][1]),Math.max(e[0][0],e[1][0]),Math.max(e[0][1],e[1][1])]}function MO(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]}var IO=1e-6;function Ng(e,t){let n=ie(e[1],e[0]),a=ie(t,e[0]),i=Rt(n,a);return Math.abs(i)<IO}function bh(e,t){let n=ie(e[1],e[0]),a=ie(t,e[0]);return Rt(n,a)<0}function Og(e,t){return Ng(e,t[0])||Ng(e,t[1])||(bh(e,t[0])?!bh(e,t[1]):bh(e,t[1]))}function _O(e,t){return MO(Pg(e),Pg(t))&&Og(e,t)&&Og(t,e)}var O3=(e,t,n)=>{let a=oe(e);for(let i of t)if(i.frameId){let r=n.get(i.id),s=n.get(i.frameId);if(r){let l=a.get(r);l&&V(l,{frameId:s??i.frameId},!1)}}};function Lp(e,t,n){let a=Q2(t,n),i=Q2(e,n);return a.some(r=>i.some(s=>_O(r,s)))}var $3=(e,t,n)=>sf(zp(e,t,n,!1)).filter(a=>!ce(a)&&!a.frameId||a.frameId===t.id),Pp=(e,t,n)=>zp([t],e,n).some(a=>a.id===t.id),cc=(e,t,n)=>{let[a,i,r,s]=he(t,n),[l,c,d,o]=Ne(e);return a<=l&&i<=c&&r>=d&&s>=o},sr=(e,t,n)=>cc([e],t,n)||Lp(e,t,n)||Pp(e,t,n),$g=(e,t,n)=>{let[a,i,r,s]=he(t,n);return m8(E(a,i),E(e.x,e.y),E(r,s))},TO=e=>{let t=new Map;for(let n of e){let a=ce(n)?n.id:n.frameId;a&&!t.has(a)&&t.set(a,Ga(e,a))}return t},Ga=(e,t)=>{let n=[];for(let a of e.values())a.frameId===t&&n.push(a);return n},Np=e=>e.filter(t=>ce(t)),Op=e=>{let t=oe(Np(e));return e.filter(n=>t.has(n.id)||!n.frameId||!t.has(n.frameId))},Ud=(e,t,n,a)=>{let i=Ga(e,t.id),r=new Set(i),s=new Set([...$3(e,t,a),...i.filter(h=>Pp(h,t,a))]),l=i.filter(h=>!s.has(h)),c=new Set(Array.from(s).flatMap(h=>h.groupIds));for(let h of l)if(!Lp(h,t,a))h.groupIds.length===0&&r.delete(h);else if(h.groupIds.length>0)for(let p of h.groupIds)c.add(p);for(let h of l)if(h.groupIds.length>0){let p=!0;for(let U of h.groupIds)c.has(U)&&(p=!1);p&&r.delete(h)}let d=Array.from(s).filter(h=>h.groupIds.length===0);for(let h of d)r.add(h);let o=Array.from(s).filter(h=>h.groupIds.length>0),u=H7(o,n);for(let[h,p]of Object.entries(u))if(p){let U=tt(e,h);if(cc(U,t,a))for(let m of U)r.add(m)}return[...r].filter(h=>!(q(h)&&h.containerId))},AO=(e,t,n)=>jO(sf(e,$3(e,t,n)),t,n),jO=(e,t,n)=>{let a=[],i=new Map;for(let r of e){let s=!1;if(r.groupIds.length>0){if(r.groupIds.some(l=>i.get(l)))s=!0;else{let l=new Set(r.groupIds.flatMap(c=>tt(n,c)));s=!cc(Array.from(l),t,n)}r.groupIds.forEach(l=>{i.set(l,s)})}s||a.push(r)}return a},wn=(e,t)=>e.frameId&&t.get(e.frameId)||null,RO=(e,t)=>{let n=new Set,a=oe(e);e=sf(e);for(let s of e)ce(s)&&s.id!==t.id&&n.add(s.id);let i=new Set,r=[];for(let s of e)if(!(ce(s)||s.frameId&&n.has(s.frameId)))if(s.groupIds.length){let l=s.groupIds.at(-1);if(!i.has(l)){i.add(l);let c=tt(e,l);if(c.some(d=>sr(d,t,a)))for(let d of c)r.push(d)}}else sr(s,t,a)&&r.push(s);return r},lo=(e,t,n,a)=>{let i=oe(e),r=new Map;for(let d of e.values())d.frameId===n.id&&r.set(d.id,!0);let s=new Set(t.map(d=>d.id)),l=[],c=new Set;for(let d of t)ce(d)&&d.id!==n.id&&c.add(d.id);for(let d of sf(e,t)){if(ce(d)||d.frameId&&c.has(d.frameId)||d.frameId&&a.selectedElementIds[d.id]&&a.selectedElementIds[d.frameId])continue;r.has(d.id)||l.push(d);let o=ge(d,i);o&&!s.has(o.id)&&!r.has(o.id)&&l.push(o)}for(let d of l)V(d,{frameId:n.id},!1);return e},rf=(e,t)=>{let n=new Map,a=new Map;for(let i of e)if(i.frameId){n.set(i.id,i);let r=a.get(i.frameId)||[];r.push(i);let s=ge(i,t);s&&(n.set(s.id,s),r.push(s)),a.set(i.frameId,r)}for(let[,i]of n)V(i,{frameId:null},!1)},F3=(e,t)=>{let n=Ga(e,t.id);return rf(n,oe(e)),e},z3=(e,t,n,a)=>lo(F3(e,n),t,n,a.state).slice(),al=(e,t,n)=>{let a=n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,elements:e}),i=new Set(a);if(t.editingGroupId)for(let l of a)l.groupIds.length===0?i.add(l):l.groupIds.flatMap(c=>tt(e,c)).forEach(c=>i.add(c));let r=new Set,s=oe(e);return i.forEach(l=>{l.frameId&&!ce(l)&&!cu(l,s,t)&&r.add(l)}),r.size>0&&rf(r,s),e},sf=(e,t)=>{let n=new Set,a=t||e;for(let s of a.values()){let l=s.groupIds[s.groupIds.length-1];l&&n.add(l)}let i=new Set;for(let s of n)tt(e,s).some(l=>ce(l))&&i.add(s);let r=[];for(let s of a.values())i.has(s.groupIds[s.groupIds.length-1])||r.push(s);return r},B1=(e,t,n)=>{let a=q(e)&&Ht(e,t)||e;return a.frameId&&n.selectedElementIds[a.id]&&n.selectedElementIds[a.frameId]?wn(a,t):n.selectedElementIds[a.id]&&n.selectedElementsAreBeingDragged?n.frameToHighlight:wn(a,t)},cu=(e,t,n,a)=>{let i=a?.targetFrame??B1(e,t,n);if(!i)return!1;let r=q(e)&&Ht(e,t)||e,s=c=>{a?.checkedGroups&&r.groupIds.forEach(d=>{a.checkedGroups?.set(d,c)})};if(!n.selectedElementIds[r.id]||!n.selectedElementsAreBeingDragged||n.selectedElementIds[r.id]&&n.selectedElementIds[i.id])return!0;if(r.groupIds.length===0)return sr(r,i,t);for(let c of r.groupIds)if(a?.checkedGroups?.has(c))return a.checkedGroups.get(c);let l=new Set(r.groupIds.filter(c=>a?.checkedGroups?!a.checkedGroups.has(c):!0).flatMap(c=>tt(t,c)));if(n.editingGroupId&&n.selectedElementsAreBeingDragged){let c=new Set(ve(t,n));if(n.frameToHighlight!==null)return!0;c.forEach(d=>{l.delete(d)})}for(let c of l)if(ce(c))return s(!1),!1;for(let c of l)if(sr(c,i,t))return s(!0),!0;return!1},Fg=(e,t,n,a,i)=>{if(!n.frameRendering||!n.frameRendering.clip)return!1;let r=Lp(e,t,a)||Pp(e,t,a);if(r){for(let s of e.groupIds)i?.set(s,!0);return!0}if(!r&&e.groupIds.length>0&&!cc([e],t,a)){let s=!1;if(n.selectedElementsAreBeingDragged)s=cu(e,a,n,{targetFrame:t,checkedGroups:i});else{s=e.frameId===t.id;for(let l of e.groupIds)i?.set(l,s)}for(let l of e.groupIds)i?.set(l,s);return s}return!1},B3=e=>e.name===null?I8(e)?"Frame":"AI Frame":e.name,$p=(e,t)=>N3({elements:e,bounds:t,type:"overlap"}).filter(n=>!n.frameId||n.frameId===t.id),H3=e=>{let t=oe(e);return e.length>1&&e.some(n=>n.frameId&&t.has(n.frameId))},Fp=e=>{let t=new Set;return e.forEach(n=>{ce(n)&&t.add(n.id)}),e.filter(n=>!(n.frameId&&t.has(n.frameId)))},zp=(e,t,n,a=!0)=>{let[i,r,s,l]=he(t,n),c=e.filter(d=>{let[o,u,h,p]=ma(d,n),U=wn(d,n);if(U){let[m,g,b,x]=ma(U,n);o=Math.max(m,o),u=Math.max(g,u),h=Math.min(b,h),p=Math.min(x,p)}return d.locked===!1&&d.type!=="selection"&&!nt(d)&&i<=o&&r<=u&&s>=h&&l>=p});return c=a?Fp(c):c,c=c.filter(d=>{let o=wn(d,n);return o?sr(d,o,n):!0}),c},X3=(e,t,n,a)=>{let i=new Set(t.map(r=>r.id));return e.filter(r=>{let s=du(r,n.width,n.height,n,a);return!i.has(r.id)&&s})},_t=(function(){let e=null,t=null,n=null,a=(i,r)=>(n!=null&&i===e&&r.selectedElementIds===t||(n=i.some(s=>r.selectedElementIds[s.id]),e=i,t=r.selectedElementIds),n);return a.clearCache=()=>{e=null,t=null,n=null},a})(),DO=(e,t,n)=>{let a=Array.from(new Set(ve(e,t).map(i=>n(i))));return a.length===1?a[0]:null},ve=(e,t,n)=>{let a=new Set,i=[];for(let r of e.values()){if(t.selectedElementIds[r.id]){i.push(r),a.add(r.id);continue}if(n?.includeBoundTextElement&&nt(r)&&t.selectedElementIds[r?.containerId]){i.push(r),a.add(r.id);continue}}if(n?.includeElementsInFrames){let r=[];return i.forEach(s=>{ce(s)&&Ga(e,s.id).forEach(l=>!a.has(l.id)&&r.push(l)),r.push(s)}),r}return i},W3=(e,t)=>t.editingTextElement?[t.editingTextElement]:t.newElement?[t.newElement]:ve(e,t,{includeBoundTextElement:!0}),De=(e,t)=>Gt(t.selectedElementIds,e)?t.selectedElementIds:e,zg=e=>{let t=new Map,n=[];for(let a of e)a.isDeleted||(n.push(a),t.set(a.id,a));return{elementsMap:t,elements:n}},LO=Zo(e=>{(be.DEV||be.MODE===vn.TEST||window?.DEBUG_FRACTIONAL_INDICES)&&bp(e,{shouldThrow:be.DEV||be.MODE===vn.TEST,includeBoundTextValidation:!0})},1e3*60,{leading:!0,trailing:!1}),PO=e=>{let t=["includeBoundTextElement","includeElementsInFrames"],n="";for(let a of t)n+=`${a}:${e[a]?"1":"0"}`;return n},Bg=e=>typeof e=="string",H1=class md{constructor(){j(this,"callbacks",new Set),j(this,"nonDeletedElements",[]),j(this,"nonDeletedElementsMap",Hn(new Map)),j(this,"elements",[]),j(this,"nonDeletedFramesLikes",[]),j(this,"frames",[]),j(this,"elementsMap",Hn(new Map)),j(this,"selectedElementsCache",{selectedElementIds:null,elements:null,cache:new Map}),j(this,"sceneNonce"),j(this,"insertElement",t=>{let n=t.frameId?this.getElementIndex(t.frameId):this.elements.length;this.insertElementAtIndex(t,n)}),j(this,"insertElements",t=>{if(!t.length)return;let n=t[0]?.frameId?this.getElementIndex(t[0].frameId):this.elements.length;this.insertElementsAtIndex(t,n)}),j(this,"getContainerElement",t=>t&&t.containerId&&this.getElement(t.containerId)||null),j(this,"getElementsFromId",t=>{let n=this.getNonDeletedElementsMap(),a=n.get(t);return a?[a]:tt(n,t)})}static mapElementToScene(t,n){Bg(t)?this.sceneMapById.set(t,n):(this.sceneMapByElement.set(t,n),this.sceneMapById.set(t.id,n))}static getScene(t){return Bg(t)?this.sceneMapById.get(t)||null:this.sceneMapByElement.get(t)||null}getSceneNonce(){return this.sceneNonce}getNonDeletedElementsMap(){return this.nonDeletedElementsMap}getElementsIncludingDeleted(){return this.elements}getElementsMapIncludingDeleted(){return this.elementsMap}getNonDeletedElements(){return this.nonDeletedElements}getFramesIncludingDeleted(){return this.frames}getSelectedElements(t){let n=PO(t),a=t?.elements||this.nonDeletedElements;if(this.selectedElementsCache.elements===a&&this.selectedElementsCache.selectedElementIds===t.selectedElementIds){let r=this.selectedElementsCache.cache.get(n);if(r)return r}else t?.elements==null&&this.selectedElementsCache.cache.clear();let i=ve(a,{selectedElementIds:t.selectedElementIds},t);return t?.elements==null&&(this.selectedElementsCache.selectedElementIds=t.selectedElementIds,this.selectedElementsCache.elements=this.nonDeletedElements,this.selectedElementsCache.cache.set(n,i)),i}getNonDeletedFramesLikes(){return this.nonDeletedFramesLikes}getElement(t){return this.elementsMap.get(t)||null}getNonDeletedElement(t){let n=this.getElement(t);return n&&V1(n)?n:null}mapElements(t){let n=!1,a=this.elements.map(i=>{let r=t(i);return r!==i&&(n=!0),r});return n&&this.replaceAllElements(a),n}replaceAllElements(t){let n=t instanceof Array?t:Array.from(t.values()),a=[];LO(n),this.elements=Va(n),this.elementsMap.clear(),this.elements.forEach(r=>{ce(r)&&a.push(r),this.elementsMap.set(r.id,r),md.mapElementToScene(r,this)});let i=zg(this.elements);this.nonDeletedElements=i.elements,this.nonDeletedElementsMap=i.elementsMap,this.frames=a,this.nonDeletedFramesLikes=zg(this.frames).elements,this.triggerUpdate()}triggerUpdate(){this.sceneNonce=Ha();for(let t of Array.from(this.callbacks))t()}onUpdate(t){if(this.callbacks.has(t))throw new Error;return this.callbacks.add(t),()=>{if(!this.callbacks.has(t))throw new Error;this.callbacks.delete(t)}}destroy(){this.elements=[],this.nonDeletedElements=[],this.nonDeletedFramesLikes=[],this.frames=[],this.elementsMap.clear(),this.selectedElementsCache.selectedElementIds=null,this.selectedElementsCache.elements=null,this.selectedElementsCache.cache.clear(),md.sceneMapById.forEach((t,n)=>{t===this&&md.sceneMapById.delete(n)}),this.callbacks.clear()}insertElementAtIndex(t,n){if(!Number.isFinite(n)||n<0)throw new Error("insertElementAtIndex can only be called with index >= 0");let a=[...this.elements.slice(0,n),t,...this.elements.slice(n)];Wa(a,oe([t])),this.replaceAllElements(a)}insertElementsAtIndex(t,n){if(!t.length)return;if(!Number.isFinite(n)||n<0)throw new Error("insertElementAtIndex can only be called with index >= 0");let a=[...this.elements.slice(0,n),...t,...this.elements.slice(n)];Wa(a,oe(t)),this.replaceAllElements(a)}getElementIndex(t){return this.elements.findIndex(n=>n.id===t)}};j(H1,"sceneMapByElement",new WeakMap),j(H1,"sceneMapById",new Map);var NO=H1,xi=NO,V=(e,t,n=!0,a)=>{let i=!1,{points:r,fixedSegments:s,fileId:l,startBinding:c,endBinding:d}=t;if(Q(e)&&(Object.keys(t).length===0||typeof r<"u"||typeof s<"u"||typeof c<"u"||typeof d<"u")){let o=Hn(xi.getScene(e)?.getNonDeletedElementsMap()??new Map);t={...t,angle:0,...Mp({...e,x:t.x||e.x,y:t.y||e.y},o,{fixedSegments:s,points:r,startBinding:c,endBinding:d},{isDragging:a?.isDragging})}}else typeof r<"u"&&(t={...Js(r),...t});for(let o in t){let u=t[o];if(typeof u<"u"){if(e[o]===u&&(typeof u!="object"||u===null||o==="groupIds"||o==="scale"))continue;if(o==="scale"){let h=e[o],p=u;if(h[0]===p[0]&&h[1]===p[1])continue}else if(o==="points"){let h=e[o],p=u;if(h.length===p.length){let U=!1,m=h.length;for(;--m;){let g=h[m],b=p[m];if(g[0]!==b[0]||g[1]!==b[1]){U=!0;break}}if(!U)continue}}e[o]=u,i=!0}}return i&&((typeof t.height<"u"||typeof t.width<"u"||typeof l<"u"||typeof r<"u")&&ut.delete(e),e.version++,e.versionNonce=Ha(),e.updated=ul(),n&&xi.getScene(e)?.triggerUpdate()),e},pe=(e,t,n=!1)=>{let a=!1;for(let i in t){let r=t[i];if(typeof r<"u"){if(e[i]===r&&(typeof r!="object"||r===null))continue;a=!0}}return!a&&!n?e:{...e,...t,updated:ul(),version:e.version+1,versionNonce:Ha()}},dc=(e,t)=>(e.version=(t??e.version)+1,e.versionNonce=Ha(),e.updated=ul(),e),es=e=>ue(e)||Xn(e)?e.points.length<2:e.width===0&&e.height===0,du=(e,t,n,a,i)=>{let[r,s,l,c]=ma(e,i),d=Ge({clientX:a.offsetLeft,clientY:a.offsetTop},a),o=Ge({clientX:a.offsetLeft+t,clientY:a.offsetTop+n},a);return d.x<=l&&d.y<=c&&o.x>=r&&o.y>=s},gd=(e,t,n,a,i,r)=>{let[s,l,c,d]=Ne(e,i),o=Ge({clientX:a.offsetLeft+(r?.left||0),clientY:a.offsetTop+(r?.top||0)},a),u=Ge({clientX:a.offsetLeft+t-(r?.right||0),clientY:a.offsetTop+n-(r?.bottom||0)},a);return s>=o.x&&l>=o.y&&c<=u.x&&d<=u.y},Hg=(e,t,n)=>{let a=Math.abs(t),i=Math.abs(n);if(e==="line"||e==="arrow"||e==="freedraw"){let r=Math.round(Math.atan(i/a)/nr)*nr;r===0?n=0:r===Math.PI/2?t=0:n=a*Math.tan(r)*Math.sign(n)||n}else e!=="selection"&&(n=a*Math.sign(n));return{width:t,height:n}},X1=(e,t,n,a)=>{let i=n-e,r=a-t,s=Math.round(Math.atan(r/i)/nr)*nr;if(s===0)r=0;else if(s===Math.PI/2)i=0;else{let l=Math.tan(s),c=-1,d=t-l*e,o=-1/l,u=-1,h=a-o*n,p=(c*h-u*d)/(l*u-o*c),U=(d*o-h*l)/(l*u-o*c);i=p-e,r=U-t}return{width:i,height:r}},V3=e=>{let t={width:e.width,height:e.height,x:e.x,y:e.y};if(e.width<0){let n=Math.abs(e.width);t.width=n,t.x=e.x-n}if(e.height<0){let n=Math.abs(e.height);t.height=n,t.y=e.y-n}return t},Xg={mouse:8,pen:16,touch:28},OO=16,G3={e:!0,s:!0,n:!0,w:!0},Wg={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},vh={e:!0,s:!0,n:!0,w:!0},Qa=(e,t,n,a,i,r,s)=>{let[l,c]=z(E(e+n/2,t+a/2),E(i,r),s);return[l-n/2,c-a/2,n,a]},Bp=e=>!(e.viewport.isMobile||e.isTouchScreen&&(gM||r8)),oo=e=>Bp(e)?G3:{},Hp=([e,t,n,a,i,r],s,l,c,d={},o=4,u=Wr)=>{let h=Xg[c],p=h/l.value,U=h/l.value,m=h/l.value,g=h/l.value,b=n-e,x=a-t,v=o/l.value,y=(h-u*2)/(2*l.value),w={nw:d.nw?void 0:Qa(e-v-m+y,t-v-g+y,p,U,i,r,s),ne:d.ne?void 0:Qa(n+v-y,t-v-g+y,p,U,i,r,s),sw:d.sw?void 0:Qa(e-v-m+y,a+v-y,p,U,i,r,s),se:d.se?void 0:Qa(n+v-y,a+v-y,p,U,i,r,s),rotation:d.rotation?void 0:Qa(e+b/2-p/2,t-v-g+y-OO/l.value,p,U,i,r,s)},k=5*Xg.mouse/l.value;return Math.abs(b)>k&&(d.n||(w.n=Qa(e+b/2-p/2,t-v-g+y,p,U,i,r,s)),d.s||(w.s=Qa(e+b/2-p/2,a+v-y,p,U,i,r,s))),Math.abs(x)>k&&(d.w||(w.w=Qa(e-v-m+y,t+x/2-U/2,p,U,i,r,s)),d.e||(w.e=Qa(n+v-y,t+x/2-U/2,p,U,i,r,s))),w},Y3=(e,t,n,a="mouse",i=G3)=>{if(e.locked||Q(e))return{};if(e.type==="freedraw"||ue(e)){if(e.points.length===2){let[,s]=e.points;s[0]===0||s[1]===0?i=vh:s[0]>0&&s[1]<0?i=Wg:s[0]>0&&s[1]>0?i=vh:s[0]<0&&s[1]>0?i=Wg:s[0]<0&&s[1]<0&&(i=vh)}}else ce(e)&&(i={...i,rotation:!0});let r=ue(e)?Wr+8:Le(e)?0:Wr;return Hp(he(e,n,!0),e.angle,t,a,i,r,Le(e)?0:void 0)},Z3=(e,t)=>{if(t.editingLinearElement)return!1;if(e.length>1)return!0;let n=e[0];return Q(n)?!1:ue(n)?n.points.length>2:!0},W1=(e,t,n)=>t>=e[0]&&t<=e[0]+e[2]&&n>=e[1]&&n<=e[1]+e[3],$O=(e,t,n,a,i,r,s,l)=>{if(!n.selectedElementIds[e.id])return!1;let{rotation:c,...d}=Y3(e,r,t,s,oo(l));if(c&&W1(c,a,i))return"rotation";let o=Object.keys(d).filter(u=>{let h=d[u];return h?W1(h,a,i):!1});if(o.length>0)return o[0];if(Bp(l)){let[u,h,p,U,m,g]=he(e,t);if(!(ue(e)&&e.points.length<=2)){let b=Le(e)?0:Od/r.value,x=Od/r.value,v=K3(E(u-b,h-b),E(p+b,U+b),E(m,g),e.angle);for(let[y,w]of Object.entries(v))if(Vr(E(a,i),w,x))return y}}return!1},Vg=(e,t,n,a,i,r,s,l)=>e.reduce((c,d)=>{if(c)return c;let o=$O(d,s,t,n,a,i,r,l);return o?{element:d,transformHandleType:o}:null},null),Gg=([e,t,n,a],i,r,s,l,c)=>{let d=Hp([e,t,n,a,(e+n)/2,(t+a)/2],0,s,l,oo(c)),o=Object.keys(d).find(u=>{let h=d[u];return h&&W1(h,i,r)});if(o)return o;if(Bp(c)){let u=(e+n)/2,h=(t+a)/2,p=Od/s.value,U=K3(E(e-p,t-p),E(n+p,a+p),E(u,h),0);for(let[m,g]of Object.entries(U))if(Vr(E(i,r),g,p))return m}return!1},xh=["ns","nesw","ew","nwse"],FO=(e,t)=>{let n=xh.indexOf(e);if(n>=0){let a=Math.round(t/(Math.PI/4));e=xh[(n+a)%xh.length]}return e},Yg=e=>{let{element:t,transformHandleType:n}=e,a=t&&Math.sign(t.height)*Math.sign(t.width)===-1,i=null;switch(n){case"n":case"s":i="ns";break;case"w":case"e":i="ew";break;case"nw":case"se":a?i="nesw":i="nwse";break;case"ne":case"sw":a?i="nwse":i="nesw";break;case"rotation":return"grab"}return i&&t&&(i=FO(i,t.angle)),i?`${i}-resize`:""},K3=([e,t],[n,a],i,r)=>{let s=z(E(e,t),i,r),l=z(E(n,t),i,r),c=z(E(e,a),i,r),d=z(E(n,a),i,r);return{n:[s,l],e:[l,d],s:[d,c],w:[c,s]}},zO=(e,t,n,a,i,r,s,l,c,d,o,u)=>{if(n.length===1){let[h]=n;if(t==="rotation")Q(h)||(BO(h,a,i,c,d,r),xn(h,a));else{if(q(h)&&t)return HO(e,h,a,t,s,c,d),xn(h,a),!0;if(t){let p=n[0].id,U=a.get(p),m=e.get(p);if(U&&m){let{nextWidth:g,nextHeight:b}=ZO(U,m,a,e,t,c,d,{shouldMaintainAspectRatio:l,shouldResizeFromCenter:s});Fo(g,b,U,m,a,e,t,{shouldMaintainAspectRatio:l,shouldResizeFromCenter:s})}}}return!0}else if(n.length>1){if(t==="rotation")return XO(e,n,a,i,c,d,r,o,u),!0;if(t){let{nextWidth:h,nextHeight:p,flipByX:U,flipByY:m,originalBoundingBox:g}=KO(n,e,a,t,c,d,{shouldMaintainAspectRatio:l,shouldResizeFromCenter:s});return q3(n,a,t,i,e,{shouldResizeFromCenter:s,shouldMaintainAspectRatio:l,flipByX:U,flipByY:m,nextWidth:h,nextHeight:p,originalBoundingBox:g}),!0}}return!1},BO=(e,t,n,a,i,r)=>{let[s,l,c,d]=he(e,t),o=(s+c)/2,u=(l+d)/2,h;ce(e)?h=0:(h=5*Math.PI/2+Math.atan2(i-u,a-o),r&&(h=h+nr/2,h=h-h%nr),h=Bd(h));let p=bi(e);if(V(e,{angle:h}),p){let U=n.getElement(p);U&&!xe(e)&&V(U,{angle:h})}},Xp=(e,t,n,a)=>ue(e)||Xn(e)?{points:Qd(0,t,Qd(1,n,e.points,a),a)}:{},Wp=(e,t,n)=>{let a=e.width;if(nt(e)){let r=Ht(e,t);r&&(a=vi(r,e))}let i=e.fontSize*(n/a);return i<$0?null:{size:i}},HO=(e,t,n,a,i,r,s)=>{let[l,c,d,o,u,h]=he(t,n),[p,U]=z(E(r,s),E(u,h),-t.angle),m=0,g=0;a!=="e"&&a!=="w"&&(a.includes("e")&&(m=(p-l)/(d-l)),a.includes("w")&&(m=(d-p)/(d-l)),a.includes("n")&&(g=(o-U)/(o-c)),a.includes("s")&&(g=(U-c)/(o-c)));let b=Math.max(m,g);if(b>0){let x=t.width*b,v=t.height*b,y=Wp(t,n,x);if(y===null)return;let w=[l,c],k=[d,o],C=[u,h],I=E(l,c);if(["n","w","nw"].includes(a)&&(I=E(k[0]-Math.abs(x),k[1]-Math.abs(v))),a==="ne"){let P=[w[0],k[1]];I=E(P[0],P[1]-Math.abs(v))}if(a==="sw"){let P=[k[0],w[1]];I=E(P[0]-Math.abs(x),P[1])}["s","n"].includes(a)&&(I[0]=C[0]-x/2),["e","w"].includes(a)&&(I[1]=C[1]-v/2),i&&(I[0]=C[0]-Math.abs(x)/2,I[1]=C[1]-Math.abs(v)/2);let A=t.angle,_=z(I,E(u,h),A),T=E(I[0]+Math.abs(x)/2,I[1]+Math.abs(v)/2),D=z(T,E(u,h),A);I=z(_,D,-A);let[L,F]=I;V(t,{fontSize:y.size,width:x,height:v,x:L,y:F})}if(a==="e"||a==="w"){let x=e.get(t.id),[v,y,w,k]=qi(x,x.width,x.height,!0),C=E(v,y),I=E(w,k),A=Qo(C,I),_=z(E(r,s),A,-x.angle),[T,,D]=qi(t,t.width,t.height,!0),L=D-T,F=I[0]-C[0],P=Y0(Xe({fontSize:t.fontSize,fontFamily:t.fontFamily}),t.lineHeight),O=F/L;a.includes("e")&&(O=(_[0]-C[0])/L),a.includes("w")&&(O=(I[0]-_[0])/L);let N=t.width*O<P?P:t.width*O,X=rs(t.originalText,Xe(t),Math.abs(N)),H=an(X,Xe(t),t.lineHeight),G=H.height,[se,le,Ie,Qe]=qi(x,N,G,!0),rt=Ie-se,at=Qe-le,de=[...C];["n","w","nw"].includes(a)&&(de=[I[0]-Math.abs(rt),C[1]]);let me=x.angle,Be=z(de,A,me),ye=E(de[0]+Math.abs(rt)/2,de[1]+Math.abs(at)/2),je=z(ye,A,me);de=z(Be,je,-me);let kt={width:Math.abs(N),height:Math.abs(H.height),x:de[0],y:de[1],text:X,autoResize:!1};V(t,kt)}},XO=(e,t,n,a,i,r,s,l,c)=>{let d=5*Math.PI/2+Math.atan2(r-c,i-l);s&&(d+=nr/2,d-=d%nr);for(let o of t)if(!ce(o)){let[u,h,p,U]=he(o,n),m=(u+p)/2,g=(h+U)/2,b=e.get(o.id)?.angle??o.angle,[x,v]=z(E(m,g),E(l,c),d+b-o.angle);Q(o)?V(o,{points:DP(o,n)}):V(o,{x:o.x+(x-m),y:o.y+(v-g),angle:Bd(d+b)},!1),xn(o,n,{simultaneouslyUpdated:t});let y=ge(o,n);y&&!xe(o)&&V(y,{x:y.x+(x-m),y:y.y+(v-g),angle:Bd(d+b)},!1)}a.triggerUpdate()},WO=(e,t,n,a,i)=>{let[r,s,l,c]=t.length===1?he(t[0],n):Ne(t),d=(r+l)/2,o=(s+c)/2,u=t.length===1?t[0].angle:0;switch([a,i]=z(E(a,i),E(d,o),-u),e){case"n":return z(E(a-(r+l)/2,i-s),E(0,0),u);case"s":return z(E(a-(r+l)/2,i-c),E(0,0),u);case"w":return z(E(a-r,i-(s+c)/2),E(0,0),u);case"e":return z(E(a-l,i-(s+c)/2),E(0,0),u);case"nw":return z(E(a-r,i-s),E(0,0),u);case"ne":return z(E(a-l,i-s),E(0,0),u);case"sw":return z(E(a-r,i-c),E(0,0),u);case"se":return z(E(a-l,i-c),E(0,0),u);default:return[0,0]}},VO=(e,t)=>{let[,[n,a]]=t.points;return e==="nw"&&(n<0||a<0)||e==="ne"&&n>=0||e==="sw"&&n<=0||e==="se"&&(n>0||a>0)?"end":"origin"},GO=(e,t,n)=>{if(n)return"center";if(t)switch(e){case"n":return"south-side";case"e":return"west-side";case"s":return"north-side";case"w":return"east-side";case"ne":return"bottom-left";case"nw":return"bottom-right";case"se":return"top-left";case"sw":return"top-right"}return["e","se","s"].includes(e)?"top-left":["n","nw","w"].includes(e)?"bottom-right":e==="ne"?"bottom-left":"top-right"},YO=(e,t,n,a,i,r,s,l,c)=>{let d=GO(s,l,c),[o,u]=e;switch(d){case"top-left":return{x:o+(t-a)/2+(a-t)/2*Math.cos(r)+(n-i)/2*Math.sin(r),y:u+(n-i)/2+(a-t)/2*Math.sin(r)+(i-n)/2*Math.cos(r)};case"top-right":return{x:o+(t-a)/2*(Math.cos(r)+1)+(n-i)/2*Math.sin(r),y:u+(n-i)/2+(t-a)/2*Math.sin(r)+(i-n)/2*Math.cos(r)};case"bottom-left":return{x:o+(t-a)/2*(1-Math.cos(r))+(i-n)/2*Math.sin(r),y:u+(n-i)/2*(Math.cos(r)+1)+(a-t)/2*Math.sin(r)};case"bottom-right":return{x:o+(t-a)/2*(Math.cos(r)+1)+(i-n)/2*Math.sin(r),y:u+(n-i)/2*(Math.cos(r)+1)+(t-a)/2*Math.sin(r)};case"center":return{x:o-(a-t)/2,y:u-(i-n)/2};case"east-side":return{x:o+(t-a)/2*(Math.cos(r)+1),y:u+(t-a)/2*Math.sin(r)+(n-i)/2};case"west-side":return{x:o+(t-a)/2*(1-Math.cos(r)),y:u+(a-t)/2*Math.sin(r)+(n-i)/2};case"north-side":return{x:o+(t-a)/2+(n-i)/2*Math.sin(r),y:u+(i-n)/2*(Math.cos(r)-1)};case"south-side":return{x:o+(t-a)/2+(i-n)/2*Math.sin(r),y:u+(n-i)/2*(Math.cos(r)+1)}}},Fo=(e,t,n,a,i,r,s,{shouldInformMutation:l=!0,shouldMaintainAspectRatio:c=!1,shouldResizeFromCenter:d=!1}={})=>{let o={},u=ge(n,i);if(u){let m=r.get(u.id);if(m&&(o={fontSize:m.fontSize}),c){let g={...n,width:e},b=Wp(u,i,vi(g,u));if(b===null)return;o={fontSize:b.size}}else{let g=R8(Xe(u),u.lineHeight),b=D8(u.fontSize,u.lineHeight);e=Math.max(e,g),t=Math.max(t,b)}}let h=Xp(a,e,t,!0),p=E(a.x,a.y);if(ue(a)){let[m,g]=ma(a,r);p=E(m,g)}let U=YO(p,a.width,a.height,e,t,a.angle,s,c,d);if(ue(a)&&h.points){let m=a.x-p[0],g=a.y-p[1];U.x+=m,U.y+=g;let b=h.points[0][0],x=h.points[0][1];U.x+=b,U.y+=x,h.points=h.points.map(v=>E(v[0]-b,v[1]-x))}if(e<0&&(U.x=U.x+e),t<0&&(U.y=U.y+t),"scale"in n&&"scale"in a&&V(n,{scale:[(Math.sign(e)||a.scale[0])*a.scale[0],(Math.sign(t)||a.scale[1])*a.scale[1]]}),xe(n)&&u&&c){let m=e/n.width*u.fontSize;if(m<$0)return;o.fontSize=m}if(e!==0&&t!==0&&Number.isFinite(U.x)&&Number.isFinite(U.y)){let m={...U,width:Math.abs(e),height:Math.abs(t),...h};V(n,m,l),xn(n,i,{newSize:{width:e,height:t}}),u&&o!=null&&V(u,{fontSize:o.fontSize}),ic(n,i,s,c)}},ZO=(e,t,n,a,i,r,s,{shouldMaintainAspectRatio:l=!1,shouldResizeFromCenter:c=!1}={})=>{let[d,o,u,h]=qi(t,t.width,t.height,!0),p=E(d,o),U=E(u,h),m=Qo(p,U),g=z(E(r,s),m,-t.angle),[b,x,v,y]=qi(e,e.width,e.height,!0),w=v-b,k=y-x,C=U[0]-p[0],I=U[1]-p[1],A=C/w,_=I/k;i.includes("e")&&(A=(g[0]-p[0])/w),i.includes("s")&&(_=(g[1]-p[1])/k),i.includes("w")&&(A=(U[0]-g[0])/w),i.includes("n")&&(_=(U[1]-g[1])/k);let T=e.width*A,D=e.height*_;if(c&&(T=2*T-t.width,D=2*D-t.height),l){let L=Math.abs(T)/t.width,F=Math.abs(D)/t.height;if(i.length===1&&(D*=L,T*=F),i.length===2){let P=Math.max(L,F);T=t.width*P*Math.sign(T),D=t.height*P*Math.sign(D)}}return{nextWidth:T,nextHeight:D}},KO=(e,t,n,a,i,r,{shouldMaintainAspectRatio:s=!1,shouldResizeFromCenter:l=!1}={})=>{let c=e.map(L=>t.get(L.id)),d=c.reduce((L,F)=>{if(!ue(F))return L;let P=bi(F);if(!P)return L;let O=t.get(P)??null;return nt(O)?[...L,{...O,...J.getBoundTextElementPosition(F,O,n)}]:L},[]),o=da(c.map(L=>L).concat(d)),{minX:u,minY:h,maxX:p,maxY:U,midX:m,midY:g}=o,b=p-u,x=U-h,v={ne:[u,U],se:[u,h],sw:[p,h],nw:[p,U],e:[u,h+x/2],w:[p,h+x/2],n:[u+b/2,U],s:[u+b/2,h]},[y,w]=l?[m,g]:v[a],k=l?2:1,C=Math.max(Math.abs(i-y)/b||0,Math.abs(r-w)/x||0)*k,I=a.includes("e")||a.includes("w")?Math.abs(i-y)*k:b,A=a.includes("n")||a.includes("s")?Math.abs(r-w)*k:x;s&&(I=b*C*Math.sign(i-y),A=x*C*Math.sign(r-w));let _={ne:[i<y,r>w],se:[i<y,r<w],sw:[i>y,r<w],nw:[i>y,r>w],e:[i<y,!1],w:[i>y,!1],n:[!1,r>w],s:[!1,r<w]},[T,D]=_[a].map(L=>L);return{originalBoundingBox:o,nextWidth:I,nextHeight:A,flipByX:T,flipByY:D}},q3=(e,t,n,a,i,{shouldMaintainAspectRatio:r=!1,shouldResizeFromCenter:s=!1,flipByX:l=!1,flipByY:c=!1,nextHeight:d,nextWidth:o,originalBoundingBox:u}={})=>{if(o===void 0&&d===void 0&&l===void 0&&c===void 0||d===0||o===0)return;i||(i=t);let h=e.reduce((k,C)=>{let I=i.get(C.id);return I&&k.push({orig:I,latest:C}),k},[]),p;if(u)p=u;else{let k=h.reduce((C,{orig:I})=>{if(!ue(I))return C;let A=bi(I);if(!A)return C;let _=i.get(A)??null;return nt(_)?[...C,{..._,...J.getBoundTextElementPosition(I,_,t)}]:C},[]);p=da(h.map(({orig:C})=>C).concat(k))}let{minX:U,minY:m,maxX:g,maxY:b,midX:x,midY:v}=p,y=g-U,w=b-m;if(o===void 0&&d===void 0&&(o=y,d=w),r&&(o===void 0?o=d*(y/w):d===void 0?d=o*(w/y):Math.abs(o/d-y/w)>.001&&(o=d*(y/w))),o&&d){let k=n.includes("e")||n.includes("w")?Math.abs(o)/y:1,C=n.includes("n")||n.includes("s")?Math.abs(d)/w:1,I;n.length===1?I=n.includes("e")||n.includes("w")?k:C:I=Math.max(Math.abs(o)/y||0,Math.abs(d)/w||0);let A={ne:[U,b],se:[U,m],sw:[g,m],nw:[g,b],e:[U,m+w/2],w:[g,m+w/2],n:[U+y/2,b],s:[U+y/2,m]},[_,T]=s?[x,v]:A[n],D=r||h.some(N=>N.latest.angle!==0||q(N.latest)||Qs(N.latest));D&&(k=I,C=I);let[L,F]=[l?-1:1,c?-1:1],P=[];for(let{orig:N,latest:X}of h){if(q(N)&&nt(N))continue;let H=N.width*k,G=N.height*C,se=Bd(N.angle*L*F),le=ue(N)||Xn(N),Ie=N.x-_,Qe=N.y-T,rt=l&&!le?H:0,at=c&&!le?G:0,de=_+L*(Ie*k+rt),me=T+F*(Qe*C+at),Be=Xp(N,H*L,G*F,!1),ye={x:de,y:me,width:H,height:G,angle:se,...Be};if(Q(N)&&(N.startBinding&&(ye.startBinding={...N.startBinding,fixedPoint:[l?-N.startBinding.fixedPoint[0]+1:N.startBinding.fixedPoint[0],c?-N.startBinding.fixedPoint[1]+1:N.startBinding.fixedPoint[1]]}),N.endBinding&&(ye.endBinding={...N.endBinding,fixedPoint:[l?-N.endBinding.fixedPoint[0]+1:N.endBinding.fixedPoint[0],c?-N.endBinding.fixedPoint[1]+1:N.endBinding.fixedPoint[1]]}),N.fixedSegments&&Be.points&&(ye.fixedSegments=N.fixedSegments.map(kt=>({...kt,start:Be.points[kt.index-1],end:Be.points[kt.index]})))),Le(N)&&(ye.scale=[N.scale[0]*L,N.scale[1]*F]),q(N)){let kt=Wp(N,t,H);if(!kt)return;ye.fontSize=kt.size}let je=i.get(bi(N)??"");if(je)if(D){let kt=je.fontSize*I;if(kt<$0)return;ye.boundTextFontSize=kt}else ye.boundTextFontSize=je.fontSize;P.push({element:X,update:ye})}let O=P.map(({element:N})=>N);for(let{element:N,update:{boundTextFontSize:X,...H}}of P){let{width:G,height:se,angle:le}=H;V(N,H,!1,{isDragging:!0}),xn(N,t,{simultaneouslyUpdated:O,newSize:{width:G,height:se}});let Ie=ge(N,t);Ie&&X&&(V(Ie,{fontSize:X,angle:ue(N)?void 0:le},!1),ic(N,t,n,!0))}a.triggerUpdate()}},qO=(e,t,n,a,i,r)=>{if(t.length===1&&Q(t[0])&&(t[0].startBinding||t[0].endBinding))return;let s=t.filter(u=>{if(Q(u)&&u.startBinding&&u.endBinding){let h=t.find(U=>U.id===u.startBinding?.elementId),p=t.find(U=>U.id===u.endBinding?.elementId);return h&&p}return!0}),l=new Set(s),c=s.filter(u=>ce(u)).map(u=>u.id);if(c.length>0)for(let u of a.getNonDeletedElements())u.frameId!==null&&c.includes(u.frameId)&&l.add(u);let d=Ne(Array.from(l).map(u=>e.originalElements.get(u.id)??u)),o=JO(d,n,i,r);l.forEach(u=>{if(Zg(e,u,o),!xe(u)){let h=ge(u,a.getNonDeletedElementsMap());h&&Zg(e,h,o),xn(u,a.getElementsMapIncludingDeleted(),{simultaneouslyUpdated:Array.from(l)})}})},JO=(e,t,n,a)=>{let[i,r]=e,s=i+t.x+n.x,l=r+t.y+n.y;if(n.x===0||n.y===0){let[c,d]=Mt(i+t.x,r+t.y,a);n.x===0&&(s=c),n.y===0&&(l=d)}return{x:s-i,y:l-r}},Zg=(e,t,n)=>{let a=e.originalElements.get(t.id)??t,i=a.x+n.x,r=a.y+n.y;V(t,{x:i,y:r})},QO=(e,t,n)=>{let[a,i]=Ne(e);return[t-a,n-i]},Kg=({newElement:e,elementType:t,originX:n,originY:a,x:i,y:r,width:s,height:l,shouldMaintainAspectRatio:c,shouldResizeFromCenter:d,zoom:o,widthAspectRatio:u=null,originOffset:h=null,informMutation:p=!0})=>{c&&e.type!=="selection"&&(u?l=s/u:(Math.abs(r-a)>Math.abs(i-n)?{width:s,height:l}=Hg(t,l,i<n?-s:s):{width:s,height:l}=Hg(t,s,r<a?-l:l),l<0&&(l=-l)));let U=i<n?n-s:n,m=r<a?a-l:a;d&&(s+=s,l+=l,U=n-s/2,m=a-l/2);let g=null;if(q(e)){l=e.height;let b=Y0(Xe({fontSize:e.fontSize,fontFamily:e.fontFamily}),e.lineHeight);s=Math.max(s,b),Math.abs(i-n)>yM/o&&(g={autoResize:!1}),m=a,d&&(U=n-s/2)}if(s!==0&&l!==0){let b=null;Le(e)&&(b={initialWidth:s,initialHeight:l}),V(e,{x:U+(h?.x??0),y:m+(h?.y??0),width:s,height:l,...g,...b},p)}},Vp=(e,t)=>!!(!e.viewModeEnabled&&e.openDialog?.name!=="elementLinkSelector"&&(e.activeTool.type!=="custom"&&(e.editingTextElement||e.activeTool.type!=="selection"&&e.activeTool.type!=="eraser"&&e.activeTool.type!=="hand"&&e.activeTool.type!=="laser")||ve(t,e).length)),e$=e=>e.reduce((t,n)=>t+n.version,0),J3=e=>{let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e[n].versionNonce;return t>>>0},Gp=e=>{let t=5381;for(let n=0;n<e.length;n++){let a=e.charCodeAt(n);t=(t<<5)+t+a}return t>>>0},t$=e=>e.filter(t=>!t.isDeleted&&!es(t)),Ve=e=>e.filter(t=>!t.isDeleted),V1=e=>!e.isDeleted,Q3=e=>Ve(e).map(t=>G0(t.type)?{...t,lastCommittedPoint:null}:t),n$=e=>Q3(e),e4=e=>Q3(e),t4=async e=>{let t;if(e.type===ae.png)try{return await(await ne(async()=>{const{decodePngMetadata:n}=await Promise.resolve().then(()=>Cy);return{decodePngMetadata:n}},void 0,import.meta.url)).decodePngMetadata(e)}catch(n){throw n.message==="INVALID"?new _r("Image doesn't contain scene","IMAGE_NOT_CONTAINS_SCENE_DATA"):new _r("Error: cannot restore image")}else if("text"in Blob?t=await e.text():t=await new Promise(n=>{let a=new FileReader;a.readAsText(e,"utf8"),a.onloadend=()=>{a.readyState===FileReader.DONE&&n(a.result)}}),e.type===ae.svg)try{return zN({svg:t})}catch(n){throw n.message==="INVALID"?new _r("Image doesn't contain scene","IMAGE_NOT_CONTAINS_SCENE_DATA"):new _r("Error: cannot restore image")}return t},n4=e=>e&&e.name.match(/\.(json|excalidraw|png|svg)$/)?.[1]||null,a$=e=>e==="png"||e==="svg",Yp=e=>{let t=n4(e);return t==="png"||t==="svg"},a4=e=>!!e&&Object.values(Ws).includes(e),Or=e=>{let{type:t}=e||{};return a4(t)},Zp=async(e,t,n,a)=>{let i=await t4(e),r;try{try{r=JSON.parse(i)}catch(s){throw Or(e)?new _r("Image doesn't contain scene","IMAGE_NOT_CONTAINS_SCENE_DATA"):s}if(RN(r))return{type:ae.excalidraw,data:sc({elements:e4(r.elements||[]),appState:{theme:t?.theme,fileHandle:a||e.handle||null,...U8(r.appState||{}),...t?Lo(r.elements||[],t):{}},files:r.files},t,n,{repairBindings:!0,refreshDimensions:!1})};if(d3(r))return{type:ae.excalidrawlib,data:r};throw new Error("Error: invalid file")}catch(s){throw s instanceof _r?s:new Error("Error: invalid file")}},Kp=async(e,t,n,a)=>{let i=await Zp(e,t,n,a);if(i.type!==ae.excalidraw)throw new Error("Error: invalid file");return i.data},i4=(e,t="unpublished")=>{let n=JSON.parse(e);if(!d3(n))throw new Error("Invalid library");let a=n.libraryItems||n.library;return lc(a,t)},r4=async(e,t="unpublished")=>i4(await t4(e),t),zo=async e=>new Promise(async(t,n)=>{try{ec(e)&&(e=await e),e.toBlob(a=>{if(!a)return n(new RT("Error: Canvas too big","CANVAS_POSSIBLY_TOO_BIG"));t(a)})}catch(a){n(a)}}),i$=async e=>{try{let t=await window.crypto.subtle.digest("SHA-1",await Ar(e));return UI(new Uint8Array(t))}catch(t){return console.error(t),P0(40)}},G1=async e=>new Promise((t,n)=>{let a=new FileReader;a.onload=()=>{let i=a.result;t(i)},a.onerror=i=>n(i),a.readAsDataURL(e)}),r$=(e,t)=>`data:${t};base64,${o4(uu(e),!0)}`,s$=(e,t="")=>{let n=e.indexOf(","),a=atob(e.slice(n+1)),i=e.slice(0,n).split(":")[1].split(";")[0],r=new ArrayBuffer(a.length),s=new Uint8Array(r);for(let l=0;l<a.length;l++)s[l]=a.charCodeAt(l);return new File([r],t,{type:i})},l$=e=>c4(e.slice(e.indexOf(",")+1)),Y1=async(e,t)=>{if(e.type===ae.svg)return e;let[n,a]=await Promise.all([ne(()=>import("./pica-ej4Z4fjh.js").then(r=>r.p),__vite__mapDeps([4,2,3,5]),import.meta.url).then(r=>r.default),ne(()=>import("./image-blob-reduce.esm-BLtmMM_J.js"),[],import.meta.url).then(r=>r.default)]),i=a({pica:n({features:["js","wasm"]})});if(t.outputType){let{outputType:r}=t;i._create_blob=function(s){return this.pica.toBlob(s.out_canvas,r,.8).then(l=>(s.out_blob=l,s))}}if(!Or(e))throw new Error("Error: unsupported file type",{cause:"UNSUPPORTED"});return new File([await i.toBlob(e,{max:t.maxWidthOrHeight,alpha:!0})],e.name,{type:t.outputType||e.type})},qg=(e,t="")=>new File([new TextEncoder().encode(e)],t,{type:ae.svg}),o$=async(e,t="")=>{let n;try{n=await fetch(e)}catch{throw new Error("Error: failed to fetch image",{cause:"FETCH_ERROR"})}if(!n.ok)throw new Error("Error: failed to fetch image",{cause:"FETCH_ERROR"});let a=await n.blob();if(a.type&&Or(a)){let i=t||a.name||"";return new File([a],i,{type:a.type})}throw new Error("Error: unsupported file type",{cause:"UNSUPPORTED"})},c$=async e=>{let t=e.dataTransfer.files.item(0),n=await d$(e);return{file:t?await qp(t):null,fileHandle:n}},d$=async e=>{if(is)try{return await e.dataTransfer.items[0].getAsFileSystemHandle()||null}catch(t){return console.warn(t.name,t.message),null}return null},Jg=e=>{let t=null,n=`${[...new Uint8Array(e).slice(0,8)].join(" ")} `,a={png:"137 80 78 71 13 10 26 10 ",jpg:"255 216 255 ",gif:"71 73 70 56 57 97 "};return n===a.png?t=ae.png:n.startsWith(a.jpg)?t=ae.jpg:n.startsWith(a.gif)&&(t=ae.gif),t},Gl=(e,t,n)=>new File([e],n||"",{type:t}),qp=async e=>{if(e.type){if(Or(e)){let t=await Ar(e),n=Jg(t);n&&n!==e.type&&(e=Gl(t,n,e.name))}}else if(e?.name?.endsWith(".excalidrawlib"))e=Gl(await Ar(e),ae.excalidrawlib,e.name);else if(e?.name?.endsWith(".excalidraw"))e=Gl(await Ar(e),ae.excalidraw,e.name);else{let t=await Ar(e),n=Jg(t);n&&(e=Gl(t,n,e.name))}return e},Ar=e=>"arrayBuffer"in e?e.arrayBuffer():new Promise((t,n)=>{let a=new FileReader;a.onload=i=>{if(!i.target?.result)return n(new Error("Couldn't convert blob to ArrayBuffer"));t(i.target.result)},a.readAsArrayBuffer(e)}),uu=e=>{let t=typeof e=="string"?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e),n="";for(let a of t)n+=String.fromCharCode(a);return n},s4=e=>{let t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let a=0,i=e.length;a<i;a++)n[a]=e.charCodeAt(a);return t},l4=e=>new TextDecoder("utf-8").decode(s4(e)),o4=(e,t=!1)=>t?window.btoa(e):window.btoa(uu(e)),c4=(e,t=!1)=>t?window.atob(e):l4(window.atob(e)),d4=({text:e,compress:t})=>{let n;if(t!==!1)try{n=uu(Pk(e))}catch(a){console.error("encode: cannot deflate",a)}return{version:"1",encoding:"bstring",compressed:!!n,encoded:n||uu(e)}},u4=e=>{let t;if(e.encoding==="bstring")t=e.compressed?e.encoded:l4(e.encoded);else throw new Error(`decode: unknown encoding "${e.encoding}"`);return e.compressed?Nk(new Uint8Array(s4(t)),{to:"string"}):t},f4=async e=>{let t=rb(new Uint8Array(await Ar(e))).find(n=>n.name==="tEXt");return t?sb.decode(t.data):null},h4=async({blob:e,metadata:t})=>{let n=rb(new Uint8Array(await Ar(e))),a=sb.encode(ae.excalidraw,JSON.stringify(d4({text:t,compress:!0})));return n.splice(-1,0,a),new Blob([iE(n)],{type:ae.png})},u$=async e=>{let t=await f4(e);if(t?.keyword===ae.excalidraw)try{let n=JSON.parse(t.text);if(!("encoded"in n)){if("type"in n&&n.type===Fn.excalidraw)return t.text;throw new Error("FAILED")}return u4(n)}catch(n){throw console.error(n),new Error("FAILED")}throw new Error("INVALID")},p4={paste:"Paste",pasteAsPlaintext:"Paste as plaintext",pasteCharts:"Paste charts",selectAll:"Select all",multiSelect:"Add element to selection",moveCanvas:"Move canvas",cut:"Cut",copy:"Copy",copyAsPng:"Copy to clipboard as PNG",copyAsSvg:"Copy to clipboard as SVG",copyText:"Copy to clipboard as text",copySource:"Copy source to clipboard",convertToCode:"Convert to code",bringForward:"Bring forward",sendToBack:"Send to back",bringToFront:"Bring to front",sendBackward:"Send backward",delete:"Delete",copyStyles:"Copy styles",pasteStyles:"Paste styles",stroke:"Stroke",changeStroke:"Change stroke color",background:"Background",changeBackground:"Change background color",fill:"Fill",strokeWidth:"Stroke width",strokeStyle:"Stroke style",strokeStyle_solid:"Solid",strokeStyle_dashed:"Dashed",strokeStyle_dotted:"Dotted",sloppiness:"Sloppiness",opacity:"Opacity",textAlign:"Text align",edges:"Edges",sharp:"Sharp",round:"Round",arrowheads:"Arrowheads",arrowhead_none:"None",arrowhead_arrow:"Arrow",arrowhead_bar:"Bar",arrowhead_circle:"Circle",arrowhead_circle_outline:"Circle (outline)",arrowhead_triangle:"Triangle",arrowhead_triangle_outline:"Triangle (outline)",arrowhead_diamond:"Diamond",arrowhead_diamond_outline:"Diamond (outline)",arrowhead_crowfoot_many:"Crow's foot (many)",arrowhead_crowfoot_one:"Crow's foot (one)",arrowhead_crowfoot_one_or_many:"Crow's foot (one or many)",more_options:"More options",arrowtypes:"Arrow type",arrowtype_sharp:"Sharp arrow",arrowtype_round:"Curved arrow",arrowtype_elbowed:"Elbow arrow",fontSize:"Font size",fontFamily:"Font family",addWatermark:'Add "Made with Excalidraw"',handDrawn:"Hand-drawn",normal:"Normal",code:"Code",small:"Small",medium:"Medium",large:"Large",veryLarge:"Very large",solid:"Solid",hachure:"Hachure",zigzag:"Zigzag",crossHatch:"Cross-hatch",thin:"Thin",bold:"Bold",left:"Left",center:"Center",right:"Right",extraBold:"Extra bold",architect:"Architect",artist:"Artist",cartoonist:"Cartoonist",fileTitle:"File name",colorPicker:"Color picker",canvasColors:"Used on canvas",canvasBackground:"Canvas background",drawingCanvas:"Drawing canvas",clearCanvas:"Clear canvas",layers:"Layers",actions:"Actions",language:"Language",liveCollaboration:"Live collaboration...",duplicateSelection:"Duplicate",untitled:"Untitled",name:"Name",yourName:"Your name",madeWithExcalidraw:"Made with Excalidraw",group:"Group selection",ungroup:"Ungroup selection",collaborators:"Collaborators",toggleGrid:"Toggle grid",addToLibrary:"Add to library",removeFromLibrary:"Remove from library",libraryLoadingMessage:"Loading library…",libraries:"Browse libraries",loadingScene:"Loading scene…",loadScene:"Load scene from file",align:"Align",alignTop:"Align top",alignBottom:"Align bottom",alignLeft:"Align left",alignRight:"Align right",centerVertically:"Center vertically",centerHorizontally:"Center horizontally",distributeHorizontally:"Distribute horizontally",distributeVertically:"Distribute vertically",flipHorizontal:"Flip horizontal",flipVertical:"Flip vertical",viewMode:"View mode",share:"Share",showStroke:"Show stroke color picker",showBackground:"Show background color picker",showFonts:"Show font picker",toggleTheme:"Toggle light/dark theme",theme:"Theme",personalLib:"Personal Library",excalidrawLib:"Excalidraw Library",decreaseFontSize:"Decrease font size",increaseFontSize:"Increase font size",unbindText:"Unbind text",bindText:"Bind text to the container",createContainerFromText:"Wrap text in a container",link:{edit:"Edit link",editEmbed:"Edit embeddable link",create:"Add link",label:"Link",labelEmbed:"Link & embed",empty:"No link is set",hint:"Type or paste your link here",goToElement:"Go to target element"},lineEditor:{edit:"Edit line",editArrow:"Edit arrow"},elementLock:{lock:"Lock",unlock:"Unlock",lockAll:"Lock all",unlockAll:"Unlock all"},statusPublished:"Published",sidebarLock:"Keep sidebar open",selectAllElementsInFrame:"Select all elements in frame",removeAllElementsFromFrame:"Remove all elements from frame",eyeDropper:"Pick color from canvas",textToDiagram:"Text to diagram",prompt:"Prompt",followUs:"Follow us",discordChat:"Discord chat",zoomToFitViewport:"Zoom to fit in viewport",zoomToFitSelection:"Zoom to fit selection",zoomToFit:"Zoom to fit all elements",installPWA:"Install Excalidraw locally (PWA)",autoResize:"Enable text auto-resizing",imageCropping:"Image cropping",unCroppedDimension:"Uncropped dimension",copyElementLink:"Copy link to object",linkToElement:"Link to object",wrapSelectionInFrame:"Wrap selection in frame"},U4={title:"Link to object",desc:"Click on a shape on canvas or paste a link.",notFound:"Linked object wasn't found on canvas."},m4={noItems:"No items added yet...",hint_emptyLibrary:"Select an item on canvas to add it here, or install a library from the public repository, below.",hint_emptyPrivateLibrary:"Select an item on canvas to add it here."},g4={title:"Find on canvas",noMatch:"No matches found...",singleResult:"result",multipleResults:"results",placeholder:"Find text on canvas..."},b4={clearReset:"Reset the canvas",exportJSON:"Export to file",exportImage:"Export image...",export:"Save to...",copyToClipboard:"Copy to clipboard",copyLink:"Copy link",save:"Save to current file",saveAs:"Save as",load:"Open",getShareableLink:"Get shareable link",close:"Close",selectLanguage:"Select language",scrollBackToContent:"Scroll back to content",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoom:"Reset zoom",menu:"Menu",done:"Done",edit:"Edit",undo:"Undo",redo:"Redo",resetLibrary:"Reset library",createNewRoom:"Create new room",fullScreen:"Full screen",darkMode:"Dark mode",lightMode:"Light mode",systemMode:"System mode",zenMode:"Zen mode",objectsSnapMode:"Snap to objects",exitZenMode:"Exit zen mode",cancel:"Cancel",clear:"Clear",remove:"Remove",embed:"Toggle embedding",publishLibrary:"Publish",submit:"Submit",confirm:"Confirm",embeddableInteractionButton:"Click to interact"},v4={clearReset:"This will clear the whole canvas. Are you sure?",couldNotCreateShareableLink:"Couldn't create shareable link.",couldNotCreateShareableLinkTooBig:"Couldn't create shareable link: the scene is too big",couldNotLoadInvalidFile:"Couldn't load invalid file",importBackendFailed:"Importing from backend failed.",cannotExportEmptyCanvas:"Cannot export empty canvas.",couldNotCopyToClipboard:"Couldn't copy to clipboard.",decryptFailed:"Couldn't decrypt data.",uploadedSecurly:"The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can't read the content.",loadSceneOverridePrompt:"Loading external drawing will replace your existing content. Do you wish to continue?",collabStopOverridePrompt:`Stopping the session will overwrite your previous, locally stored drawing. Are you sure?
|
|
42
42
|
|
|
43
43
|
(If you want to keep your local drawing, simply close the browser tab instead.)`,errorAddingToLibrary:"Couldn't add item to the library",errorRemovingFromLibrary:"Couldn't remove item from the library",confirmAddLibrary:"This will add {{numShapes}} shape(s) to your library. Are you sure?",imageDoesNotContainScene:"This image does not seem to contain any scene data. Have you enabled scene embedding during export?",cannotRestoreFromImage:"Scene couldn't be restored from this image file",invalidSceneUrl:"Couldn't import scene from the supplied URL. It's either malformed, or doesn't contain valid Excalidraw JSON data.",resetLibrary:"This will clear your library. Are you sure?",removeItemsFromsLibrary:"Delete {{count}} item(s) from library?",invalidEncryptionKey:"Encryption key must be of 22 characters. Live collaboration is disabled.",collabOfflineWarning:`No internet connection available.
|
|
44
44
|
Your changes will not be saved!`},x4={unsupportedFileType:"Unsupported file type.",imageInsertError:"Couldn't insert image. Try again later...",fileTooBig:"File is too big. Maximum allowed size is {{maxSize}}.",svgImageInsertError:"Couldn't insert SVG image. The SVG markup looks invalid.",failedToFetchImage:"Failed to fetch image.",cannotResolveCollabServer:"Couldn't connect to the collab server. Please reload the page and try again.",importLibraryError:"Couldn't load library",saveLibraryError:"Couldn't save library to storage. Please save your library to a file locally to make sure you don't lose changes.",collabSaveFailed:"Couldn't save to the backend database. If problems persist, you should save your file locally to ensure you don't lose your work.",collabSaveFailed_sizeExceeded:"Couldn't save to the backend database, the canvas seems to be too big. You should save the file locally to ensure you don't lose your work.",imageToolNotSupported:"Images are disabled.",brave_measure_text_error:{line1:"Looks like you are using Brave browser with the <bold>Aggressively Block Fingerprinting</bold> setting enabled.",line2:"This could result in breaking the <bold>Text Elements</bold> in your drawings.",line3:"We strongly recommend disabling this setting. You can follow <link>these steps</link> on how to do so.",line4:"If disabling this setting doesn't fix the display of text elements, please open an <issueLink>issue</issueLink> on our GitHub, or write us on <discordLink>Discord</discordLink>"},libraryElementTypeError:{embeddable:"Embeddable elements cannot be added to the library.",iframe:"IFrame elements cannot be added to the library.",image:"Support for adding images to the library coming soon!"},asyncPasteFailedOnRead:"Couldn't paste (couldn't read from system clipboard).",asyncPasteFailedOnParse:"Couldn't paste.",copyToSystemClipboardFailed:"Couldn't copy to clipboard."},y4={selection:"Selection",image:"Insert image",rectangle:"Rectangle",diamond:"Diamond",ellipse:"Ellipse",arrow:"Arrow",line:"Line",freedraw:"Draw",text:"Text",library:"Library",lock:"Keep selected tool active after drawing",penMode:"Pen mode - prevent touch",link:"Add / Update link for a selected shape",eraser:"Eraser",frame:"Frame tool",magicframe:"Wireframe to code",embeddable:"Web Embed",laser:"Laser pointer",hand:"Hand (panning tool)",extraTools:"More tools",mermaidToExcalidraw:"Mermaid to Excalidraw"},w4={rectangle:"Rectangle",diamond:"Diamond",ellipse:"Ellipse",arrow:"Arrow",line:"Line",freedraw:"Freedraw",text:"Text",image:"Image",group:"Group",frame:"Frame",magicframe:"Wireframe to code",embeddable:"Web Embed",selection:"Selection",iframe:"IFrame"},E4={canvasActions:"Canvas actions",selectedShapeActions:"Selected shape actions",shapes:"Shapes"},S4={dismissSearch:"Escape to dismiss search",canvasPanning:"To move canvas, hold mouse wheel or spacebar while dragging, or use the hand tool",linearElement:"Click to start multiple points, drag for single line",arrowTool:"Click to start multiple points, drag for single line. Press {{arrowShortcut}} again to change arrow type.",freeDraw:"Click and drag, release when you're finished",text:"Tip: you can also add text by double-clicking anywhere with the selection tool",embeddable:"Click-drag to create a website embed",text_selected:"Double-click or press ENTER to edit text",text_editing:"Press Escape or CtrlOrCmd+ENTER to finish editing",linearElementMulti:"Click on last point or press Escape or Enter to finish",lockAngle:"You can constrain angle by holding SHIFT",resize:`You can constrain proportions by holding SHIFT while resizing,
|
|
@@ -89,7 +89,7 @@ or paste into an existing text editor`,unableToEmbed:"Embedding this url is curr
|
|
|
89
89
|
`)},p6=function(){var e=parseInt(document.body.getAttribute(Os)||"0",10);return isFinite(e)?e:0},FF=function(){S.useEffect(function(){return document.body.setAttribute(Os,(p6()+1).toString()),function(){var e=p6()-1;e<=0?document.body.removeAttribute(Os):document.body.setAttribute(Os,e.toString())}},[])},zF=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,i=a===void 0?"margin":a;FF();var r=S.useMemo(function(){return NF(i)},[i]);return S.createElement(OF,{styles:$F(r,!t,i,n?"":"!important")})},t0=!1;if(typeof window<"u")try{var Fc=Object.defineProperty({},"passive",{get:function(){return t0=!0,!0}});window.addEventListener("test",Fc,Fc),window.removeEventListener("test",Fc,Fc)}catch{t0=!1}var ms=t0?{passive:!1}:!1,BF=function(e){return e.tagName==="TEXTAREA"},_9=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!BF(e)&&n[t]==="visible")},HF=function(e){return _9(e,"overflowY")},XF=function(e){return _9(e,"overflowX")},U6=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var i=T9(e,a);if(i){var r=A9(e,a),s=r[1],l=r[2];if(s>l)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},WF=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},VF=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},T9=function(e,t){return e==="v"?HF(t):XF(t)},A9=function(e,t){return e==="v"?WF(t):VF(t)},GF=function(e,t){return e==="h"&&t==="rtl"?-1:1},YF=function(e,t,n,a,i){var r=GF(e,window.getComputedStyle(t).direction),s=r*a,l=n.target,c=t.contains(l),d=!1,o=s>0,u=0,h=0;do{if(!l)break;var p=A9(e,l),U=p[0],m=p[1],g=p[2],b=m-g-r*U;(U||b)&&T9(e,l)&&(u+=b,h+=U);var x=l.parentNode;l=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(o&&Math.abs(u)<1||!o&&Math.abs(h)<1)&&(d=!0),d},zc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},m6=function(e){return[e.deltaX,e.deltaY]},g6=function(e){return e&&"current"in e?e.current:e},ZF=function(e,t){return e[0]===t[0]&&e[1]===t[1]},KF=function(e){return`
|
|
90
90
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
91
91
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
92
|
-
`)},qF=0,gs=[];function JF(e){var t=S.useRef([]),n=S.useRef([0,0]),a=S.useRef(),i=S.useState(qF++)[0],r=S.useState(I9)[0],s=S.useRef(e);S.useEffect(function(){s.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=Vw([e.lockRef.current],(e.shards||[]).map(g6),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=S.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var b=zc(m),x=n.current,v="deltaX"in m?m.deltaX:x[0]-b[0],y="deltaY"in m?m.deltaY:x[1]-b[1],w,k=m.target,C=Math.abs(v)>Math.abs(y)?"h":"v";if("touches"in m&&C==="h"&&k.type==="range")return!1;var I=window.getSelection(),A=I&&I.anchorNode,_=A?A===k||A.contains(k):!1;if(_)return!1;var T=U6(C,k);if(!T)return!0;if(T?w=C:(w=C==="v"?"h":"v",T=U6(C,k)),!T)return!1;if(!a.current&&"changedTouches"in m&&(v||y)&&(a.current=w),!w)return!0;var D=a.current||w;return YF(D,g,m,D==="h"?v:y)},[]),c=S.useCallback(function(m){var g=m;if(!(!gs.length||gs[gs.length-1]!==r)){var b="deltaY"in g?m6(g):zc(g),x=t.current.filter(function(w){return w.name===g.type&&(w.target===g.target||g.target===w.shadowParent)&&ZF(w.delta,b)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var v=(s.current.shards||[]).map(g6).filter(Boolean).filter(function(w){return w.contains(g.target)}),y=v.length>0?l(g,v[0]):!s.current.noIsolation;y&&g.cancelable&&g.preventDefault()}}},[]),d=S.useCallback(function(m,g,b,x){var v={name:m,delta:g,target:b,should:x,shadowParent:QF(b)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(y){return y!==v})},1)},[]),o=S.useCallback(function(m){n.current=zc(m),a.current=void 0},[]),u=S.useCallback(function(m){d(m.type,m6(m),m.target,l(m,e.lockRef.current))},[]),h=S.useCallback(function(m){d(m.type,zc(m),m.target,l(m,e.lockRef.current))},[]);S.useEffect(function(){return gs.push(r),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",c,ms),document.addEventListener("touchmove",c,ms),document.addEventListener("touchstart",o,ms),function(){gs=gs.filter(function(m){return m!==r}),document.removeEventListener("wheel",c,ms),document.removeEventListener("touchmove",c,ms),document.removeEventListener("touchstart",o,ms)}},[]);var p=e.removeScrollBar,U=e.inert;return S.createElement(S.Fragment,null,U?S.createElement(r,{styles:KF(i)}):null,p?S.createElement(zF,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function QF(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ez=IF(M9,JF);var j9=S.forwardRef(function(e,t){return S.createElement(of,Aa({},e,{ref:t,sideCar:ez}))});j9.classNames=of.classNames;var iU="Popover",[R9]=s9(iU,[p9]),uc=p9(),[tz,hr]=R9(iU),D9=e=>{const{__scopePopover:t,children:n,open:a,defaultOpen:i,onOpenChange:r,modal:s=!1}=e,l=uc(t),c=S.useRef(null),[d,o]=S.useState(!1),[u=!1,h]=pF({prop:a,defaultProp:i,onChange:r});return f.jsx(lF,{...l,children:f.jsx(tz,{scope:t,contentId:q$(),triggerRef:c,open:u,onOpenChange:h,onOpenToggle:S.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:d,onCustomAnchorAdd:S.useCallback(()=>o(!0),[]),onCustomAnchorRemove:S.useCallback(()=>o(!1),[]),modal:s,children:n})})};D9.displayName=iU;var L9="PopoverAnchor",nz=S.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,i=hr(L9,n),r=uc(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return S.useEffect(()=>(s(),()=>l()),[s,l]),f.jsx(E9,{...r,...a,ref:t})});nz.displayName=L9;var P9="PopoverTrigger",N9=S.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,i=hr(P9,n),r=uc(n),s=fr(t,i.triggerRef),l=f.jsx(Ci.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":H9(i.open),...a,ref:s,onClick:Qi(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:f.jsx(E9,{asChild:!0,...r,children:l})});N9.displayName=P9;var rU="PopoverPortal",[az,iz]=R9(rU,{forceMount:void 0}),O9=e=>{const{__scopePopover:t,forceMount:n,children:a,container:i}=e,r=hr(rU,t);return f.jsx(az,{scope:t,forceMount:n,children:f.jsx(aU,{present:n||r.open,children:f.jsx(S9,{asChild:!0,container:i,children:a})})})};O9.displayName=rU;var il="PopoverContent",$9=S.forwardRef((e,t)=>{const n=iz(il,e.__scopePopover),{forceMount:a=n.forceMount,...i}=e,r=hr(il,e.__scopePopover);return f.jsx(aU,{present:a||r.open,children:r.modal?f.jsx(rz,{...i,ref:t}):f.jsx(sz,{...i,ref:t})})});$9.displayName=il;var rz=S.forwardRef((e,t)=>{const n=hr(il,e.__scopePopover),a=S.useRef(null),i=fr(t,a),r=S.useRef(!1);return S.useEffect(()=>{const s=a.current;if(s)return vF(s)},[]),f.jsx(j9,{as:eU,allowPinchZoom:!0,children:f.jsx(F9,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Qi(e.onCloseAutoFocus,s=>{s.preventDefault(),r.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Qi(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;r.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Qi(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),sz=S.forwardRef((e,t)=>{const n=hr(il,e.__scopePopover),a=S.useRef(!1),i=S.useRef(!1);return f.jsx(F9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{e.onCloseAutoFocus?.(r),r.defaultPrevented||(a.current||n.triggerRef.current?.focus(),r.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:r=>{e.onInteractOutside?.(r),r.defaultPrevented||(a.current=!0,r.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=r.target;n.triggerRef.current?.contains(s)&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&i.current&&r.preventDefault()}})}),F9=S.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:r,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:o,...u}=e,h=hr(il,n),p=uc(n);return z$(),f.jsx(d9,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:r,children:f.jsx(o9,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:f.jsx(oF,{"data-state":H9(h.open),role:"dialog",id:h.contentId,...p,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),z9="PopoverClose",lz=S.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,i=hr(z9,n);return f.jsx(Ci.button,{type:"button",...a,ref:t,onClick:Qi(e.onClick,()=>i.onOpenChange(!1))})});lz.displayName=z9;var oz="PopoverArrow",B9=S.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,i=uc(n);return f.jsx(cF,{...i,...a,ref:t})});B9.displayName=oz;function H9(e){return e?"open":"closed"}var cf=D9,df=N9,cz=O9,sU=$9,X9=B9,Th={exports:{}},b6;function dz(){return b6||(b6=1,(function(e,t){(function(){var n={};e.exports=n,n.simpleFilter=function(a,i){return i.filter(function(r){return n.test(a,r)})},n.test=function(a,i){return n.match(a,i)!==null},n.match=function(a,i,r){r=r||{};var s=0,l=[],c=i.length,d=0,o=0,u=r.pre||"",h=r.post||"",p=r.caseSensitive&&i||i.toLowerCase(),U;a=r.caseSensitive&&a||a.toLowerCase();for(var m=0;m<c;m++)U=i[m],p[m]===a[s]?(U=u+U+h,s+=1,o+=1+o):o=0,d+=o,l[l.length]=U;return s===a.length?(d=p===a?1/0:d,{rendered:l.join(""),score:d}):null},n.filter=function(a,i,r){return!i||i.length===0?[]:typeof a!="string"?i:(r=r||{},i.reduce(function(s,l,c,d){var o=l;r.extract&&(o=r.extract(l));var u=n.match(a,o,r);return u!=null&&(s[s.length]={string:u.rendered,score:u.score,index:c,original:l}),s},[]).sort(function(s,l){var c=l.score-s.score;return c||s.index-l.index}))}})()})(Th)),Th.exports}var uz=dz();const fz=Si(uz),hz={},v6=e=>{let t;const n=new Set,a=(o,u)=>{const h=typeof o=="function"?o(t):o;if(!Object.is(h,t)){const p=t;t=u??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(U=>U(t,p))}},i=()=>t,c={setState:a,getState:i,getInitialState:()=>d,subscribe:o=>(n.add(o),()=>n.delete(o)),destroy:()=>{(hz?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=t=e(a,i,c);return c},pz=e=>e?v6(e):v6,W9={},{useDebugValue:Uz}=Z,{useSyncExternalStoreWithSelector:mz}=Ww;let x6=!1;const gz=e=>e;function bz(e,t=gz,n){(W9?"production":void 0)!=="production"&&n&&!x6&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),x6=!0);const a=mz(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Uz(a),a}const y6=e=>{(W9?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?pz(e):e,n=(a,i)=>bz(t,a,i);return Object.assign(n,t),n},vz=e=>e?y6(e):y6;var w6,E6;const S6=typeof window<"u"&&((w6=window.document)!=null&&w6.createElement||((E6=window.navigator)==null?void 0:E6.product)==="ReactNative")?Z.useLayoutEffect:Z.useEffect;function Sa(){const e=vz(t=>({current:new Array,version:0,set:t}));return{In:({children:t})=>{const n=e(i=>i.set),a=e(i=>i.version);return S6(()=>{n(i=>({version:i.version+1}))},[]),S6(()=>(n(({current:i})=>({current:[...i,t]})),()=>n(({current:i})=>({current:i.filter(r=>r!==t)}))),[t,a]),null},Out:()=>{const t=e(n=>n.current);return Z.createElement(Z.Fragment,null,t)}}}function Ah(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function xz(e,t=[]){let n=[];function a(r,s){const l=S.createContext(s),c=n.length;n=[...n,s];function d(u){const{scope:h,children:p,...U}=u,m=h?.[e][c]||l,g=S.useMemo(()=>U,Object.values(U));return S.createElement(m.Provider,{value:g},p)}function o(u,h){const p=h?.[e][c]||l,U=S.useContext(p);if(U)return U;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${r}\``)}return d.displayName=r+"Provider",[d,o]}const i=()=>{const r=n.map(s=>S.createContext(s));return function(l){const c=l?.[e]||r;return S.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[a,yz(i,...t)]}function yz(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const s=a.reduce((l,{useScope:c,scopeName:d})=>{const u=c(r)[`__scope${d}`];return{...l,...u}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function $s(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function wz(e,t=[]){let n=[];function a(r,s){const l=S.createContext(s),c=n.length;n=[...n,s];function d(u){const{scope:h,children:p,...U}=u,m=h?.[e][c]||l,g=S.useMemo(()=>U,Object.values(U));return S.createElement(m.Provider,{value:g},p)}function o(u,h){const p=h?.[e][c]||l,U=S.useContext(p);if(U)return U;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${r}\``)}return d.displayName=r+"Provider",[d,o]}const i=()=>{const r=n.map(s=>S.createContext(s));return function(l){const c=l?.[e]||r;return S.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[a,Ez(i,...t)]}function Ez(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const s=a.reduce((l,{useScope:c,scopeName:d})=>{const u=c(r)[`__scope${d}`];return{...l,...u}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Sz(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function V9(...e){return t=>e.forEach(n=>Sz(n,t))}function k6(...e){return S.useCallback(V9(...e),e)}const n0=S.forwardRef((e,t)=>{const{children:n,...a}=e,i=S.Children.toArray(n),r=i.find(Cz);if(r){const s=r.props.children,l=i.map(c=>c===r?S.Children.count(s)>1?S.Children.only(null):S.isValidElement(s)?s.props.children:null:c);return S.createElement(a0,Pt({},a,{ref:t}),S.isValidElement(s)?S.cloneElement(s,void 0,l):null)}return S.createElement(a0,Pt({},a,{ref:t}),n)});n0.displayName="Slot";const a0=S.forwardRef((e,t)=>{const{children:n,...a}=e;return S.isValidElement(n)?S.cloneElement(n,{...Mz(a,n.props),ref:V9(t,n.ref)}):S.Children.count(n)>1?S.Children.only(null):null});a0.displayName="SlotClone";const kz=({children:e})=>S.createElement(S.Fragment,null,e);function Cz(e){return S.isValidElement(e)&&e.type===kz}function Mz(e,t){const n={...t};for(const a in t){const i=e[a],r=t[a];/^on[A-Z]/.test(a)?i&&r?n[a]=(...l)=>{r(...l),i(...l)}:i&&(n[a]=i):a==="style"?n[a]={...i,...r}:a==="className"&&(n[a]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}function Iz(e){const t=e+"CollectionProvider",[n,a]=wz(t),[i,r]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:U,children:m}=p,g=Z.useRef(null),b=Z.useRef(new Map).current;return Z.createElement(i,{scope:U,itemMap:b,collectionRef:g},m)},l=e+"CollectionSlot",c=Z.forwardRef((p,U)=>{const{scope:m,children:g}=p,b=r(l,m),x=k6(U,b.collectionRef);return Z.createElement(n0,{ref:x},g)}),d=e+"CollectionItemSlot",o="data-radix-collection-item",u=Z.forwardRef((p,U)=>{const{scope:m,children:g,...b}=p,x=Z.useRef(null),v=k6(U,x),y=r(d,m);return Z.useEffect(()=>(y.itemMap.set(x,{ref:x,...b}),()=>{y.itemMap.delete(x)})),Z.createElement(n0,{[o]:"",ref:v},g)});function h(p){const U=r(e+"CollectionConsumer",p);return Z.useCallback(()=>{const g=U.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${o}]`));return Array.from(U.itemMap.values()).sort((y,w)=>b.indexOf(y.ref.current)-b.indexOf(w.ref.current))},[U.collectionRef,U.itemMap])}return[{Provider:s,Slot:c,ItemSlot:u},h,a]}function _z(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function G9(...e){return t=>e.forEach(n=>_z(n,t))}function Tz(...e){return S.useCallback(G9(...e),e)}function Az(e,t=[]){let n=[];function a(r,s){const l=S.createContext(s),c=n.length;n=[...n,s];function d(u){const{scope:h,children:p,...U}=u,m=h?.[e][c]||l,g=S.useMemo(()=>U,Object.values(U));return S.createElement(m.Provider,{value:g},p)}function o(u,h){const p=h?.[e][c]||l,U=S.useContext(p);if(U)return U;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${r}\``)}return d.displayName=r+"Provider",[d,o]}const i=()=>{const r=n.map(s=>S.createContext(s));return function(l){const c=l?.[e]||r;return S.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[a,jz(i,...t)]}function jz(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const s=a.reduce((l,{useScope:c,scopeName:d})=>{const u=c(r)[`__scope${d}`];return{...l,...u}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const Rz=globalThis?.document?S.useLayoutEffect:()=>{},Dz=k0.useId||(()=>{});let Lz=0;function Pz(e){const[t,n]=S.useState(Dz());return Rz(()=>{n(a=>a??String(Lz++))},[e]),t?`radix-${t}`:""}const Y9=S.forwardRef((e,t)=>{const{children:n,...a}=e,i=S.Children.toArray(n),r=i.find(Oz);if(r){const s=r.props.children,l=i.map(c=>c===r?S.Children.count(s)>1?S.Children.only(null):S.isValidElement(s)?s.props.children:null:c);return S.createElement(i0,Pt({},a,{ref:t}),S.isValidElement(s)?S.cloneElement(s,void 0,l):null)}return S.createElement(i0,Pt({},a,{ref:t}),n)});Y9.displayName="Slot";const i0=S.forwardRef((e,t)=>{const{children:n,...a}=e;return S.isValidElement(n)?S.cloneElement(n,{...$z(a,n.props),ref:G9(t,n.ref)}):S.Children.count(n)>1?S.Children.only(null):null});i0.displayName="SlotClone";const Nz=({children:e})=>S.createElement(S.Fragment,null,e);function Oz(e){return S.isValidElement(e)&&e.type===Nz}function $z(e,t){const n={...t};for(const a in t){const i=e[a],r=t[a];/^on[A-Z]/.test(a)?i&&r?n[a]=(...l)=>{r(...l),i(...l)}:i&&(n[a]=i):a==="style"?n[a]={...i,...r}:a==="className"&&(n[a]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}const Fz=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Z9=Fz.reduce((e,t)=>{const n=S.forwardRef((a,i)=>{const{asChild:r,...s}=a,l=r?Y9:t;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(l,Pt({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function lU(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var a;return(a=t.current)===null||a===void 0?void 0:a.call(t,...n)},[])}function zz({prop:e,defaultProp:t,onChange:n=()=>{}}){const[a,i]=Bz({defaultProp:t,onChange:n}),r=e!==void 0,s=r?e:a,l=lU(n),c=S.useCallback(d=>{if(r){const u=typeof d=="function"?d(e):d;u!==e&&l(u)}else i(d)},[r,e,i,l]);return[s,c]}function Bz({defaultProp:e,onChange:t}){const n=S.useState(e),[a]=n,i=S.useRef(a),r=lU(t);return S.useEffect(()=>{i.current!==a&&(r(a),i.current=a)},[a,i,r]),n}const Hz=S.createContext(void 0);function K9(e){const t=S.useContext(Hz);return e||t||"ltr"}const jh="rovingFocusGroup.onEntryFocus",Xz={bubbles:!1,cancelable:!0},oU="RovingFocusGroup",[r0,q9,Wz]=Iz(oU),[Vz,J9]=Az(oU,[Wz]),[Gz,Yz]=Vz(oU),Zz=S.forwardRef((e,t)=>S.createElement(r0.Provider,{scope:e.__scopeRovingFocusGroup},S.createElement(r0.Slot,{scope:e.__scopeRovingFocusGroup},S.createElement(Kz,Pt({},e,{ref:t}))))),Kz=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:i=!1,dir:r,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,...o}=e,u=S.useRef(null),h=Tz(t,u),p=K9(r),[U=null,m]=zz({prop:s,defaultProp:l,onChange:c}),[g,b]=S.useState(!1),x=lU(d),v=q9(n),y=S.useRef(!1),[w,k]=S.useState(0);return S.useEffect(()=>{const C=u.current;if(C)return C.addEventListener(jh,x),()=>C.removeEventListener(jh,x)},[x]),S.createElement(Gz,{scope:n,orientation:a,dir:p,loop:i,currentTabStopId:U,onItemFocus:S.useCallback(C=>m(C),[m]),onItemShiftTab:S.useCallback(()=>b(!0),[]),onFocusableItemAdd:S.useCallback(()=>k(C=>C+1),[]),onFocusableItemRemove:S.useCallback(()=>k(C=>C-1),[])},S.createElement(Z9.div,Pt({tabIndex:g||w===0?-1:0,"data-orientation":a},o,{ref:h,style:{outline:"none",...e.style},onMouseDown:$s(e.onMouseDown,()=>{y.current=!0}),onFocus:$s(e.onFocus,C=>{const I=!y.current;if(C.target===C.currentTarget&&I&&!g){const A=new CustomEvent(jh,Xz);if(C.currentTarget.dispatchEvent(A),!A.defaultPrevented){const _=v().filter(P=>P.focusable),T=_.find(P=>P.active),D=_.find(P=>P.id===U),F=[T,D,..._].filter(Boolean).map(P=>P.ref.current);Q9(F)}}y.current=!1}),onBlur:$s(e.onBlur,()=>b(!1))})))}),qz="RovingFocusGroupItem",Jz=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:i=!1,tabStopId:r,...s}=e,l=Pz(),c=r||l,d=Yz(qz,n),o=d.currentTabStopId===c,u=q9(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=d;return S.useEffect(()=>{if(a)return h(),()=>p()},[a,h,p]),S.createElement(r0.ItemSlot,{scope:n,id:c,focusable:a,active:i},S.createElement(Z9.span,Pt({tabIndex:o?0:-1,"data-orientation":d.orientation},s,{ref:t,onMouseDown:$s(e.onMouseDown,U=>{a?d.onItemFocus(c):U.preventDefault()}),onFocus:$s(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:$s(e.onKeyDown,U=>{if(U.key==="Tab"&&U.shiftKey){d.onItemShiftTab();return}if(U.target!==U.currentTarget)return;const m=tB(U,d.orientation,d.dir);if(m!==void 0){U.preventDefault();let b=u().filter(x=>x.focusable).map(x=>x.ref.current);if(m==="last")b.reverse();else if(m==="prev"||m==="next"){m==="prev"&&b.reverse();const x=b.indexOf(U.currentTarget);b=d.loop?nB(b,x+1):b.slice(x+1)}setTimeout(()=>Q9(b))}})})))}),Qz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function eB(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function tB(e,t,n){const a=eB(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return Qz[a]}function Q9(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function nB(e,t){return e.map((n,a)=>e[(t+a)%e.length])}const aB=Zz,iB=Jz;function rB(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function sB(...e){return t=>e.forEach(n=>rB(n,t))}function lB(...e){return S.useCallback(sB(...e),e)}const C6=globalThis?.document?S.useLayoutEffect:()=>{};function oB(e,t){return S.useReducer((n,a)=>{const i=t[n][a];return i??n},e)}const ev=e=>{const{present:t,children:n}=e,a=cB(t),i=typeof n=="function"?n({present:a.isPresent}):S.Children.only(n),r=lB(a.ref,i.ref);return typeof n=="function"||a.isPresent?S.cloneElement(i,{ref:r}):null};ev.displayName="Presence";function cB(e){const[t,n]=S.useState(),a=S.useRef({}),i=S.useRef(e),r=S.useRef("none"),s=e?"mounted":"unmounted",[l,c]=oB(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const d=Bc(a.current);r.current=l==="mounted"?d:"none"},[l]),C6(()=>{const d=a.current,o=i.current;if(o!==e){const h=r.current,p=Bc(d);e?c("MOUNT"):p==="none"||d?.display==="none"?c("UNMOUNT"):c(o&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),C6(()=>{if(t){const d=u=>{const p=Bc(a.current).includes(u.animationName);u.target===t&&p&&Ft.flushSync(()=>c("ANIMATION_END"))},o=u=>{u.target===t&&(r.current=Bc(a.current))};return t.addEventListener("animationstart",o),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",o),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:S.useCallback(d=>{d&&(a.current=getComputedStyle(d)),n(d)},[])}}function Bc(e){return e?.animationName||"none"}function dB(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function uB(...e){return t=>e.forEach(n=>dB(n,t))}const tv=S.forwardRef((e,t)=>{const{children:n,...a}=e,i=S.Children.toArray(n),r=i.find(hB);if(r){const s=r.props.children,l=i.map(c=>c===r?S.Children.count(s)>1?S.Children.only(null):S.isValidElement(s)?s.props.children:null:c);return S.createElement(s0,Pt({},a,{ref:t}),S.isValidElement(s)?S.cloneElement(s,void 0,l):null)}return S.createElement(s0,Pt({},a,{ref:t}),n)});tv.displayName="Slot";const s0=S.forwardRef((e,t)=>{const{children:n,...a}=e;return S.isValidElement(n)?S.cloneElement(n,{...pB(a,n.props),ref:uB(t,n.ref)}):S.Children.count(n)>1?S.Children.only(null):null});s0.displayName="SlotClone";const fB=({children:e})=>S.createElement(S.Fragment,null,e);function hB(e){return S.isValidElement(e)&&e.type===fB}function pB(e,t){const n={...t};for(const a in t){const i=e[a],r=t[a];/^on[A-Z]/.test(a)?i&&r?n[a]=(...l)=>{r(...l),i(...l)}:i&&(n[a]=i):a==="style"?n[a]={...i,...r}:a==="className"&&(n[a]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}const UB=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],uf=UB.reduce((e,t)=>{const n=S.forwardRef((a,i)=>{const{asChild:r,...s}=a,l=r?tv:t;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(l,Pt({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function nv(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var a;return(a=t.current)===null||a===void 0?void 0:a.call(t,...n)},[])}function mB({prop:e,defaultProp:t,onChange:n=()=>{}}){const[a,i]=gB({defaultProp:t,onChange:n}),r=e!==void 0,s=r?e:a,l=nv(n),c=S.useCallback(d=>{if(r){const u=typeof d=="function"?d(e):d;u!==e&&l(u)}else i(d)},[r,e,i,l]);return[s,c]}function gB({defaultProp:e,onChange:t}){const n=S.useState(e),[a]=n,i=S.useRef(a),r=nv(t);return S.useEffect(()=>{i.current!==a&&(r(a),i.current=a)},[a,i,r]),n}const bB=globalThis?.document?S.useLayoutEffect:()=>{},vB=k0.useId||(()=>{});let xB=0;function yB(e){const[t,n]=S.useState(vB());return bB(()=>{n(a=>a??String(xB++))},[e]),e||(t?`radix-${t}`:"")}const av="Tabs",[wB]=xz(av,[J9]),iv=J9(),[EB,cU]=wB(av),SB=S.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,onValueChange:i,defaultValue:r,orientation:s="horizontal",dir:l,activationMode:c="automatic",...d}=e,o=K9(l),[u,h]=mB({prop:a,onChange:i,defaultProp:r});return S.createElement(EB,{scope:n,baseId:yB(),value:u,onValueChange:h,orientation:s,dir:o,activationMode:c},S.createElement(uf.div,Pt({dir:o,"data-orientation":s},d,{ref:t})))}),kB="TabsList",CB=S.forwardRef((e,t)=>{const{__scopeTabs:n,loop:a=!0,...i}=e,r=cU(kB,n),s=iv(n);return S.createElement(aB,Pt({asChild:!0},s,{orientation:r.orientation,dir:r.dir,loop:a}),S.createElement(uf.div,Pt({role:"tablist","aria-orientation":r.orientation},i,{ref:t})))}),MB="TabsTrigger",IB=S.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,disabled:i=!1,...r}=e,s=cU(MB,n),l=iv(n),c=rv(s.baseId,a),d=sv(s.baseId,a),o=a===s.value;return S.createElement(iB,Pt({asChild:!0},l,{focusable:!i,active:o}),S.createElement(uf.button,Pt({type:"button",role:"tab","aria-selected":o,"aria-controls":d,"data-state":o?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c},r,{ref:t,onMouseDown:Ah(e.onMouseDown,u=>{!i&&u.button===0&&u.ctrlKey===!1?s.onValueChange(a):u.preventDefault()}),onKeyDown:Ah(e.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&s.onValueChange(a)}),onFocus:Ah(e.onFocus,()=>{const u=s.activationMode!=="manual";!o&&!i&&u&&s.onValueChange(a)})})))}),_B="TabsContent",TB=S.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,forceMount:i,children:r,...s}=e,l=cU(_B,n),c=rv(l.baseId,a),d=sv(l.baseId,a),o=a===l.value,u=S.useRef(o);return S.useEffect(()=>{const h=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(h)},[]),S.createElement(ev,{present:i||o},({present:h})=>S.createElement(uf.div,Pt({"data-state":o?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:d,tabIndex:0},s,{ref:t,style:{...e.style,animationDuration:u.current?"0s":void 0}}),h&&r))});function rv(e,t){return`${e}-trigger-${t}`}function sv(e,t){return`${e}-content-${t}`}const lv=SB,ov=CB,cv=IB,dv=TB;var Rh,M6;function AB(){if(M6)return Rh;M6=1;var e="Expected a function",t=NaN,n="[object Symbol]",a=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt,c=typeof Bi=="object"&&Bi&&Bi.Object===Object&&Bi,d=typeof self=="object"&&self&&self.Object===Object&&self,o=c||d||Function("return this")(),u=Object.prototype,h=u.toString,p=Math.max,U=Math.min,m=function(){return o.Date.now()};function g(w,k,C){var I,A,_,T,D,L,F=0,P=!1,O=!1,N=!0;if(typeof w!="function")throw new TypeError(e);k=y(k)||0,b(C)&&(P=!!C.leading,O="maxWait"in C,_=O?p(y(C.maxWait)||0,k):_,N="trailing"in C?!!C.trailing:N);function X(de){var me=I,Be=A;return I=A=void 0,F=de,T=w.apply(Be,me),T}function H(de){return F=de,D=setTimeout(le,k),P?X(de):T}function G(de){var me=de-L,Be=de-F,ye=k-me;return O?U(ye,_-Be):ye}function se(de){var me=de-L,Be=de-F;return L===void 0||me>=k||me<0||O&&Be>=_}function le(){var de=m();if(se(de))return Ie(de);D=setTimeout(le,G(de))}function Ie(de){return D=void 0,N&&I?X(de):(I=A=void 0,T)}function Qe(){D!==void 0&&clearTimeout(D),F=0,I=L=A=D=void 0}function rt(){return D===void 0?T:Ie(m())}function at(){var de=m(),me=se(de);if(I=arguments,A=this,L=de,me){if(D===void 0)return H(L);if(O)return D=setTimeout(le,k),X(L)}return D===void 0&&(D=setTimeout(le,k)),T}return at.cancel=Qe,at.flush=rt,at}function b(w){var k=typeof w;return!!w&&(k=="object"||k=="function")}function x(w){return!!w&&typeof w=="object"}function v(w){return typeof w=="symbol"||x(w)&&h.call(w)==n}function y(w){if(typeof w=="number")return w;if(v(w))return t;if(b(w)){var k=typeof w.valueOf=="function"?w.valueOf():w;w=b(k)?k+"":k}if(typeof w!="string")return w===0?w:+w;w=w.replace(a,"");var C=r.test(w);return C||s.test(w)?l(w.slice(2),C?2:8):i.test(w)?t:+w}return Rh=g,Rh}var jB=AB();const RB=Si(jB);function DB(e,t,n,a){Object.defineProperty(e,t,{get:n,set:a,enumerable:!0,configurable:!0})}var LB={};DB(LB,"LaserPointer",()=>pu);function vt([e,t,n],[a,i,r]){return[e+a,t+i,n+r]}function Yl([e,t,n],[a,i,r]){return[e-a,t-i,n-r]}function Ct([e,t,n],a){return[e*a,t*a,n*a]}function bs([e,t,n]){return[e/Math.sqrt(e**2+t**2),t/Math.sqrt(e**2+t**2),n]}function Kt([e,t,n],a){return[Math.cos(a)*e-Math.sin(a)*t,Math.sin(a)*e+Math.cos(a)*t,n]}function PB(e,t,n){return vt(e,Ct(Yl(t,e),n))}function I6(e,t,n){return Math.atan2(n[1]-e[1],n[0]-e[0])-Math.atan2(t[1]-e[1],t[0]-e[0])}function _6(e){return Math.atan2(Math.sin(e),Math.cos(e))}function T6([e,t]){return Math.sqrt(e**2+t**2)}function Fs([e,t],[n,a]){return Math.sqrt((n-e)**2+(a-t)**2)}function NB(e){if(e.length<2)return 0;let t=0;for(let n=1;n<=e.length-1;n++)t+=Fs(e[n-1],e[n]);return t+=Fs(e[e.length-2],e[e.length-1]),t}const OB=(e,t,n)=>Math.max(t,Math.min(n,e));function $B(e,t,n){const a=Fs(t,n);if(a===0)return Fs(e,t);const i=OB(((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/a**2,0,1),r=[t[0]+i*(n[0]-t[0]),t[1]+i*(n[1]-t[1]),e[2]];return Fs(r,e)}function hu(e,t){if(t===0||e.length<=2)return e;const n=e[0],a=e[e.length-1],[i,r]=e.reduce(([s,l],c,d)=>{const o=$B(c,n,a);return o>s?[o,d]:[s,l]},[0,-1]);if(i>=t){const s=e[r];return[...hu([n,...e.slice(1,r),s],t).slice(0,-1),s,...hu([s,...e.slice(r,-1),a],t).slice(1)]}else return[n,a]}const Fi=class Fi{constructor(t){this.originalPoints=[],this.stablePoints=[],this.tailPoints=[],this.isFresh=!0,this.options=Object.assign({},Fi.defaults,t)}get lastPoint(){return this.tailPoints[this.tailPoints.length-1]??this.stablePoints[this.stablePoints.length-1]}addPoint(t){const n=this.originalPoints[this.originalPoints.length-1];if(!(n&&n[0]===t[0]&&n[1]===t[1])){if(this.originalPoints.push(t),this.isFresh){this.isFresh=!1,this.stablePoints.push(t);return}this.options.streamline>0&&(t=PB(this.lastPoint,t,1-this.options.streamline)),this.tailPoints.push(t),NB(this.tailPoints)>Fi.constants.maxTailLength&&this.stabilizeTail()}}close(){this.stabilizeTail()}stabilizeTail(){if(this.options.simplify>0&&this.options.simplifyPhase=="tail")throw new Error("Not implemented yet");this.stablePoints.push(...this.tailPoints),this.tailPoints=[]}getSize(t,n,a,i,r){return(t??this.options.size)*this.options.sizeMapping({pressure:n,runningLength:r,currentIndex:a,totalLength:i})}getStrokeOutline(t){if(this.isFresh)return[];let n=[...this.stablePoints,...this.tailPoints];this.options.simplify>0&&this.options.simplifyPhase==="input"&&(n=hu(n,this.options.simplify));const a=n.length;if(a===0)return[];if(a===1){const C=n[0],I=this.getSize(t,C[2],0,a,0);if(I<.5)return[];const A=[];for(let _=0;_<=Math.PI*2;_+=Math.PI/16)A.push(vt(C,Ct(Kt([1,0,0],_),I)));return A.push(vt(C,Ct([1,0,0],this.getSize(t,C[2],0,a,0)))),A}if(a===2){const C=n[0],I=n[1],A=this.getSize(t,C[2],0,a,0),_=this.getSize(t,I[2],0,a,0);if(A<.5||_<.5)return[];const T=[],D=I6(C,[C[0],C[1]-100,C[2]],I);for(let L=D;L<=Math.PI+D;L+=Math.PI/16)T.push(vt(C,Ct(Kt([1,0,0],L),A)));for(let L=Math.PI+D;L<=Math.PI*2+D;L+=Math.PI/16)T.push(vt(I,Ct(Kt([1,0,0],L),_)));return T.push(T[0]),T}const i=[],r=[];let s=0,l=0,c=0,d=0;for(let C=1;C<a-1;C++){const I=n[C-1],A=n[C],_=n[C+1];let T=A[2];const D=Fs(I,A);d+=D,s=l+(D-l)*.2;const L=this.getSize(t,T,C,a,d);if(L===0){c=C+1;continue}const F=bs(Yl(I,A)),P=bs(Yl(_,A)),O=Kt(F,Math.PI/2),N=Kt(F,-Math.PI/2),X=Kt(P,Math.PI/2),H=Kt(P,-Math.PI/2),G=vt(A,Ct(O,L)),se=vt(A,Ct(N,L)),le=vt(A,Ct(X,L)),Ie=vt(A,Ct(H,L)),Qe=vt(O,H),rt=vt(N,X),at=vt(A,Ct(T6(Qe)===0?F:bs(Qe),L)),de=vt(A,Ct(T6(rt)===0?P:bs(rt),L)),me=_6(I6(A,I,_)),Be=Fi.constants.cornerDetectionMaxAngle/180*Math.PI*Fi.constants.cornerDetectionVariance(s);if(Math.abs(me)<Be){const ye=Math.abs(_6(Math.PI-me));if(ye===0)continue;if(me<0){r.push(se,de);for(let je=0;je<=ye;je+=ye/4)i.push(vt(A,Kt(Ct(O,L),je)));for(let je=ye;je>=0;je-=ye/4)r.push(vt(A,Kt(Ct(O,L),je)));r.push(de,le)}else{i.push(G,at);for(let je=0;je<=ye;je+=ye/4)r.push(vt(A,Kt(Ct(O,-L),-je)));for(let je=ye;je>=0;je-=ye/4)i.push(vt(A,Kt(Ct(O,-L),-je)));i.push(at,Ie)}}else i.push(at),r.push(de);l=s}if(c>=a-2)if(this.options.keepHead){const C=n[a-1],I=[];for(let A=0;A<=Math.PI*2;A+=Math.PI/16)I.push(vt(C,Ct(Kt([1,0,0],A),this.options.size)));return I.push(vt(C,Ct([1,0,0],this.options.size))),I}else return[];const o=n[c],u=n[c+1],h=n[a-2],p=n[a-1],U=bs(Yl(u,o)),m=bs(Yl(h,p)),g=Kt(U,-Math.PI/2),b=Kt(m,Math.PI/2),x=this.getSize(t,o[2],0,a,0),v=[],y=this.options.keepHead?this.options.size:this.getSize(t,h[2],a-2,a,d),w=[];if(x>1){for(let C=0;C<=Math.PI;C+=Math.PI/16)v.unshift(vt(o,Kt(Ct(g,x),-C)));v.unshift(vt(o,Ct(g,-x)))}else v.push(o);for(let C=0;C<=Math.PI*3;C+=Math.PI/16)w.push(vt(p,Kt(Ct(b,-y),-C)));const k=[...v,...i,...w.reverse(),...r.reverse()];return v.length>0&&k.push(v[0]),this.options.simplify>0&&this.options.simplifyPhase==="output"?hu(k,this.options.simplify):k}};Fi.defaults={size:2,streamline:.45,simplify:.1,simplifyPhase:"output",keepHead:!1,sizeMapping:()=>1},Fi.constants={cornerDetectionMaxAngle:75,cornerDetectionVariance:t=>t>35?.5:1,maxTailLength:50};let pu=Fi;var uv=i9(),{useAtom:gt,useSetAtom:ff,useAtomValue:fv,useStore:uZ}=uv,FB=uv.Provider,sa=Qp(),zB=Yw({"./locales/ar-SA.json":()=>ne(()=>import("./ar-SA-G6X2FPQ2-BgPx2ItE.js"),__vite__mapDeps([6,2,3]),import.meta.url),"./locales/az-AZ.json":()=>ne(()=>import("./az-AZ-76LH7QW2-CXxeQJ5N.js"),__vite__mapDeps([7,2,3]),import.meta.url),"./locales/bg-BG.json":()=>ne(()=>import("./bg-BG-XCXSNQG7-B-v6aJJk.js"),__vite__mapDeps([8,2,3]),import.meta.url),"./locales/bn-BD.json":()=>ne(()=>import("./bn-BD-2XOGV67Q-CmhmKt_C.js"),__vite__mapDeps([9,2,3]),import.meta.url),"./locales/ca-ES.json":()=>ne(()=>import("./ca-ES-6MX7JW3Y-Cnypgm9v.js"),__vite__mapDeps([10,2,3]),import.meta.url),"./locales/cs-CZ.json":()=>ne(()=>import("./cs-CZ-2BRQDIVT-CLjGATXX.js"),__vite__mapDeps([11,2,3]),import.meta.url),"./locales/da-DK.json":()=>ne(()=>import("./da-DK-5WZEPLOC-D5L0qoxT.js"),__vite__mapDeps([12,2,3]),import.meta.url),"./locales/de-DE.json":()=>ne(()=>import("./de-DE-XR44H4JA-C32FRrv8.js"),__vite__mapDeps([13,2,3]),import.meta.url),"./locales/el-GR.json":()=>ne(()=>import("./el-GR-BZB4AONW-DbhHCmA8.js"),__vite__mapDeps([14,2,3]),import.meta.url),"./locales/en.json":()=>ne(()=>Promise.resolve().then(()=>nZ),void 0,import.meta.url),"./locales/es-ES.json":()=>ne(()=>import("./es-ES-U4NZUMDT-DXQY7ys3.js"),__vite__mapDeps([15,2,3]),import.meta.url),"./locales/eu-ES.json":()=>ne(()=>import("./eu-ES-A7QVB2H4-B4VgVqIF.js"),__vite__mapDeps([16,2,3]),import.meta.url),"./locales/fa-IR.json":()=>ne(()=>import("./fa-IR-HGAKTJCU-elHgBamS.js"),__vite__mapDeps([17,2,3]),import.meta.url),"./locales/fi-FI.json":()=>ne(()=>import("./fi-FI-Z5N7JZ37-BQe_Oc8x.js"),__vite__mapDeps([18,2,3]),import.meta.url),"./locales/fr-FR.json":()=>ne(()=>import("./fr-FR-RHASNOE6-U8yDW4RB.js"),__vite__mapDeps([19,2,3]),import.meta.url),"./locales/gl-ES.json":()=>ne(()=>import("./gl-ES-HMX3MZ6V-ti0GznU7.js"),__vite__mapDeps([20,2,3]),import.meta.url),"./locales/he-IL.json":()=>ne(()=>import("./he-IL-6SHJWFNN-M5av5hFk.js"),__vite__mapDeps([21,2,3]),import.meta.url),"./locales/hi-IN.json":()=>ne(()=>import("./hi-IN-IWLTKZ5I-Ci72nkHu.js"),__vite__mapDeps([22,2,3]),import.meta.url),"./locales/hu-HU.json":()=>ne(()=>import("./hu-HU-A5ZG7DT2-CJZteS36.js"),__vite__mapDeps([23,2,3]),import.meta.url),"./locales/id-ID.json":()=>ne(()=>import("./id-ID-SAP4L64H-DmDvIS5c.js"),__vite__mapDeps([24,2,3]),import.meta.url),"./locales/it-IT.json":()=>ne(()=>import("./it-IT-JPQ66NNP-Bzpfv7zO.js"),__vite__mapDeps([25,2,3]),import.meta.url),"./locales/ja-JP.json":()=>ne(()=>import("./ja-JP-DBVTYXUO-Bybhg0KI.js"),__vite__mapDeps([26,2,3]),import.meta.url),"./locales/kaa.json":()=>ne(()=>import("./kaa-6HZHGXH3-n7D3u8lS.js"),__vite__mapDeps([27,2,3]),import.meta.url),"./locales/kab-KAB.json":()=>ne(()=>import("./kab-KAB-ZGHBKWFO-BsHCeWxt.js"),__vite__mapDeps([28,2,3]),import.meta.url),"./locales/kk-KZ.json":()=>ne(()=>import("./kk-KZ-P5N5QNE5-Dvo1EL3s.js"),__vite__mapDeps([29,2,3]),import.meta.url),"./locales/km-KH.json":()=>ne(()=>import("./km-KH-HSX4SM5Z-Bo9Koyui.js"),__vite__mapDeps([30,2,3]),import.meta.url),"./locales/ko-KR.json":()=>ne(()=>import("./ko-KR-MTYHY66A-Dqbq9Ios.js"),__vite__mapDeps([31,2,3]),import.meta.url),"./locales/ku-TR.json":()=>ne(()=>import("./ku-TR-6OUDTVRD-B_bI20Zq.js"),__vite__mapDeps([32,2,3]),import.meta.url),"./locales/lt-LT.json":()=>ne(()=>import("./lt-LT-XHIRWOB4-DMcSSx20.js"),__vite__mapDeps([33,2,3]),import.meta.url),"./locales/lv-LV.json":()=>ne(()=>import("./lv-LV-5QDEKY6T-WQFa3Exi.js"),__vite__mapDeps([34,2,3]),import.meta.url),"./locales/mr-IN.json":()=>ne(()=>import("./mr-IN-CRQNXWMA-CeiPk7t6.js"),__vite__mapDeps([35,2,3]),import.meta.url),"./locales/my-MM.json":()=>ne(()=>import("./my-MM-5M5IBNSE-9E7W6sP8.js"),__vite__mapDeps([36,2,3]),import.meta.url),"./locales/nb-NO.json":()=>ne(()=>import("./nb-NO-T6EIAALU-CmEniZIK.js"),__vite__mapDeps([37,2,3]),import.meta.url),"./locales/nl-NL.json":()=>ne(()=>import("./nl-NL-IS3SIHDZ-zXTYcbKu.js"),__vite__mapDeps([38,2,3]),import.meta.url),"./locales/nn-NO.json":()=>ne(()=>import("./nn-NO-6E72VCQL-h3sqNMWN.js"),__vite__mapDeps([39,2,3]),import.meta.url),"./locales/oc-FR.json":()=>ne(()=>import("./oc-FR-POXYY2M6-DJ0D2dhd.js"),__vite__mapDeps([40,2,3]),import.meta.url),"./locales/pa-IN.json":()=>ne(()=>import("./pa-IN-N4M65BXN-DZ6nLqLL.js"),__vite__mapDeps([41,2,3]),import.meta.url),"./locales/percentages.json":()=>ne(()=>Promise.resolve().then(()=>aZ),void 0,import.meta.url),"./locales/pl-PL.json":()=>ne(()=>import("./pl-PL-T2D74RX3-TTq9_VVs.js"),__vite__mapDeps([42,2,3]),import.meta.url),"./locales/pt-BR.json":()=>ne(()=>import("./pt-BR-5N22H2LF-D8eWF-rx.js"),__vite__mapDeps([43,2,3]),import.meta.url),"./locales/pt-PT.json":()=>ne(()=>import("./pt-PT-UZXXM6DQ-Ck4YSJms.js"),__vite__mapDeps([44,2,3]),import.meta.url),"./locales/ro-RO.json":()=>ne(()=>import("./ro-RO-JPDTUUEW-Cix9Zgf2.js"),__vite__mapDeps([45,2,3]),import.meta.url),"./locales/ru-RU.json":()=>ne(()=>import("./ru-RU-B4JR7IUQ-DOEAc_qv.js"),__vite__mapDeps([46,2,3]),import.meta.url),"./locales/si-LK.json":()=>ne(()=>import("./si-LK-N5RQ5JYF-CdpuKOSp.js"),__vite__mapDeps([47,2,3]),import.meta.url),"./locales/sk-SK.json":()=>ne(()=>import("./sk-SK-C5VTKIMK-B_9Y1a-J.js"),__vite__mapDeps([48,2,3]),import.meta.url),"./locales/sl-SI.json":()=>ne(()=>import("./sl-SI-NN7IZMDC-6_HfcMn2.js"),__vite__mapDeps([49,2,3]),import.meta.url),"./locales/sv-SE.json":()=>ne(()=>import("./sv-SE-XGPEYMSR-CIuCW4P8.js"),__vite__mapDeps([50,2,3]),import.meta.url),"./locales/ta-IN.json":()=>ne(()=>import("./ta-IN-2NMHFXQM-BzAn6f_T.js"),__vite__mapDeps([51,2,3]),import.meta.url),"./locales/th-TH.json":()=>ne(()=>import("./th-TH-HPSO5L25-F8UKokOj.js"),__vite__mapDeps([52,2,3]),import.meta.url),"./locales/tr-TR.json":()=>ne(()=>import("./tr-TR-DEFEU3FU-Blb21beE.js"),__vite__mapDeps([53,2,3]),import.meta.url),"./locales/uk-UA.json":()=>ne(()=>import("./uk-UA-QMV73CPH-BNT7k4n6.js"),__vite__mapDeps([54,2,3]),import.meta.url),"./locales/vi-VN.json":()=>ne(()=>import("./vi-VN-M7AON7JQ-Cfx0gaLT.js"),__vite__mapDeps([55,2,3]),import.meta.url),"./locales/zh-CN.json":()=>ne(()=>import("./zh-CN-LNUGB5OW-CpiybZS1.js"),__vite__mapDeps([56,2,3]),import.meta.url),"./locales/zh-HK.json":()=>ne(()=>import("./zh-HK-E62DVLB3-UIQkTr8J.js"),__vite__mapDeps([57,2,3]),import.meta.url),"./locales/zh-TW.json":()=>ne(()=>import("./zh-TW-RAJ6MFWO-GvyNND72.js"),__vite__mapDeps([58,2,3]),import.meta.url)}),BB=85,ls={code:"en",label:"English"},hf=[ls,...[{code:"ar-SA",label:"العربية",rtl:!0},{code:"bg-BG",label:"Български"},{code:"ca-ES",label:"Català"},{code:"cs-CZ",label:"Česky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"Ελληνικά"},{code:"es-ES",label:"Español"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"فارسی",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Français"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"עברית",rtl:!0},{code:"hi-IN",label:"हिन्दी"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"日本語"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"Қазақ тілі"},{code:"ko-KR",label:"한국어"},{code:"ku-TR",label:"Kurdî"},{code:"lt-LT",label:"Lietuvių"},{code:"lv-LV",label:"Latviešu"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokmål"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"ਪੰਜਾਬੀ"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Português Brasileiro"},{code:"pt-PT",label:"Português"},{code:"ro-RO",label:"Română"},{code:"ru-RU",label:"Русский"},{code:"sk-SK",label:"Slovenčina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Slovenščina"},{code:"tr-TR",label:"Türkçe"},{code:"uk-UA",label:"Українська"},{code:"zh-CN",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"vi-VN",label:"Tiếng Việt"},{code:"mr-IN",label:"मराठी"}].filter(e=>q4[e.code]>=BB).sort((e,t)=>e.label>t.label?1:-1)],Uu="__test__";be.DEV&&hf.unshift({code:Uu,label:"test language"},{code:`${Uu}.rtl`,label:"test language (rtl)",rtl:!0});var Rs=ls,xd={},hv=async e=>{if(Rs=e,document.documentElement.dir=Rs.rtl?"rtl":"ltr",document.documentElement.lang=Rs.code,e.code.startsWith(Uu))xd={};else try{xd=await zB(`./locales/${Rs.code}.json`)}catch(t){console.error(`Failed to load language ${e.code}:`,t.message),xd=Jp}sa.set(pv,e.code)},Bo=()=>Rs,A6=(e,t)=>{for(let n=0;n<t.length;++n){let a=t[n];if(e[a]===void 0)return;e=e[a]}if(typeof e=="string")return e},M=(e,t,n)=>{if(Rs.code.startsWith(Uu))return`[[${t?`${e}(${JSON.stringify(t).slice(1,-1)})`:e}]]`;let a=e.split("."),i=A6(xd,a)||A6(Jp,a)||n;if(i===void 0){let r=`Can't find translation for ${e}`;return console.warn(r),""}if(t)for(let r in t)i=i.replace(`{{${r}}}`,String(t[r]));return i},pv=Xt(ls.code),Yt=()=>{let e=fv(pv);return{t:M,langCode:e}},HB=({size:e="1em",circleWidth:t=8,synchronized:n=!1,className:a=""})=>{let i=-(Z.useRef(Date.now()).current%1600);return f.jsx("div",{className:`Spinner ${a}`,children:f.jsx("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":n?`${i}ms`:0},children:f.jsx("circle",{cx:"50",cy:"50",r:50-t/2,strokeWidth:t,fill:"none",strokeMiterlimit:"10"})})})},wi=HB,Uv=({delay:e,theme:t})=>{let[n,a]=S.useState(!!e);return S.useEffect(()=>{if(!e)return;let i=setTimeout(()=>{a(!1)},e);return()=>clearTimeout(i)},[e]),n?null:f.jsxs("div",{className:te("LoadingMessage",{"LoadingMessage--dark":t===Ce.DARK}),children:[f.jsx("div",{children:f.jsx(wi,{})}),f.jsx("div",{className:"LoadingMessage-text",children:M("labels.loadingScene")})]})},XB=e=>{let[t,n]=S.useState(!0);return S.useEffect(()=>{let a=async()=>{await hv(i),n(!1)},i=hf.find(r=>r.code===e.langCode)||ls;a()},[e.langCode]),t?f.jsx(Uv,{theme:e.theme}):e.children},Me=Z.forwardRef(({size:e="medium",visible:t=!0,className:n="",...a},i)=>{let{id:r}=Ka(),s=Z.useRef(null);Z.useImperativeHandle(i,()=>s.current);let l=`ToolIcon_size_${e}`,[c,d]=S.useState(!1),o=S.useRef(!0),u=async p=>{let U="onClick"in a&&a.onClick?.(p);if(ec(U))try{d(!0),await U}catch(m){if(m instanceof Hu)console.warn(m);else throw m}finally{o.current&&d(!1)}};S.useEffect(()=>(o.current=!0,()=>{o.current=!1}),[]);let h=S.useRef(null);if(a.type==="button"||a.type==="icon"||a.type==="submit"){let p=a.type==="icon"?"button":a.type;return f.jsxs("button",{className:te("ToolIcon_type_button",l,n,t&&!a.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!a.hidden,"ToolIcon--selected":a.selected,"ToolIcon--plain":a.type==="icon"}),style:a.style,"data-testid":a["data-testid"],hidden:a.hidden,title:a.title,"aria-label":a["aria-label"],type:p,onClick:u,ref:s,disabled:c||a.isLoading||!!a.disabled,children:[(a.icon||a.label)&&f.jsxs("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!a.disabled,children:[a.icon||a.label,a.keyBindingLabel&&f.jsx("span",{className:"ToolIcon__keybinding",children:a.keyBindingLabel}),a.isLoading&&f.jsx(wi,{})]}),a.showAriaLabel&&f.jsxs("div",{className:"ToolIcon__label",children:[a["aria-label"]," ",c&&f.jsx(wi,{})]}),a.children]})}return f.jsxs("label",{className:te("ToolIcon",n),title:a.title,onPointerDown:p=>{h.current=p.pointerType||null,a.onPointerDown?.({pointerType:p.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{h.current=null})},children:[f.jsx("input",{className:`ToolIcon_type_radio ${l}`,type:"radio",name:a.name,"aria-label":a["aria-label"],"aria-keyshortcuts":a["aria-keyshortcuts"],"data-testid":a["data-testid"],id:`${r}-${a.id}`,onChange:()=>{a.onChange?.({pointerType:h.current})},checked:a.checked,ref:s}),f.jsxs("div",{className:"ToolIcon__icon",children:[a.icon,a.keyBindingLabel&&f.jsx("span",{className:"ToolIcon__keybinding",children:a.keyBindingLabel})]})]})});Me.displayName="ToolButton";var WB=(e,t,n)=>{let a=new Set(ve(e.filter(o=>ce(o)),t).map(o=>o.id)),i={},r=n.scene.getNonDeletedElementsMap(),s=new Set;for(let o of a){let u=Ga(e,o);for(let h of u)if(!s.has(h.id)){if(nt(h)){let p=Ht(h,r);p&&(i[p.id]=!0)}else i[h.id]=!0;s.add(h.id)}}let l=!0,c=e.map(o=>{if(t.selectedElementIds[o.id]){let u=nt(o)?Ht(o,r):null;return o.frameId&&a.has(o.frameId)?(l=!1,i[o.id]=!0,o):u?.frameId&&a.has(u?.frameId)?o:(o.boundElements&&o.boundElements.forEach(h=>{let p=n.scene.getNonDeletedElementsMap().get(h.id);p&&Q(p)&&(V(p,{startBinding:o.id===p.startBinding?.elementId?null:p.startBinding,endBinding:o.id===p.endBinding?.elementId?null:p.endBinding}),V(p,{points:p.points}))}),pe(o,{isDeleted:!0}))}return o.frameId&&a.has(o.frameId)?(l=!1,nt(o)||(i[o.id]=!0),pe(o,{frameId:null})):nt(o)&&t.selectedElementIds[o.containerId]?pe(o,{isDeleted:!0}):o}),d=t.editingGroupId;if(l&&t.editingGroupId){let o=tt(c,t.editingGroupId).filter(u=>!u.isDeleted);if(o.length>1)o[0]&&(i[o[0].id]=!0);else{d=null,o[0]&&(i[o[0].id]=!0);let u=o[0];if(u){let h=u.groupIds.findIndex(U=>U===t.editingGroupId),p=u.groupIds[h+1];if(p){let U=tt(c,p).filter(m=>!m.isDeleted);U.length>1&&(d=p,U.forEach(m=>{i[m.id]=!0}))}}}}return{elements:c,appState:{...t,...ln({selectedElementIds:i,editingGroupId:d},c,t,null)}}},j6=(e,t)=>{if(e.editingGroupId){let n=tt(Ve(t),e.editingGroupId);if(n.length)return{...e,selectedElementIds:{[n[0].id]:!0}}}return e},mv=Y({name:"deleteSelectedElements",label:"labels.delete",icon:Zr,trackEvent:{category:"element",action:"delete"},perform:(e,t,n,a)=>{if(t.editingLinearElement){let{elementId:s,selectedPointsIndices:l,startBindingElement:c,endBindingElement:d}=t.editingLinearElement,o=a.scene.getNonDeletedElementsMap(),u=J.getElement(s,o);if(!u||l==null)return!1;if(u.points.length<2){let p=e.map(m=>m.id===u.id?pe(m,{isDeleted:!0}):m),U=j6(t,p);return{elements:p,appState:{...U,editingLinearElement:null},captureUpdate:B.IMMEDIATELY}}let h={startBindingElement:l?.includes(0)?null:c,endBindingElement:l?.includes(u.points.length-1)?null:d};return J.deletePoints(u,l),{elements:e,appState:{...t,editingLinearElement:{...t.editingLinearElement,...h,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:B.IMMEDIATELY}}let{elements:i,appState:r}=WB(e,t,a);return N7(i,i.filter(s=>s.isDeleted)),r=j6(r,i),{elements:i,appState:{...r,activeTool:Et(t,{type:"selection"}),multiElement:null,activeEmbeddable:null},captureUpdate:_t(Ve(e),t)?B.IMMEDIATELY:B.EVENTUALLY}},keyTest:(e,t,n)=>(e.key===R.BACKSPACE||e.key===R.DELETE)&&!e[R.CTRL_OR_CMD],PanelComponent:({elements:e,appState:t,updateData:n})=>f.jsx(Me,{type:"button",icon:Zr,title:M("labels.delete"),"aria-label":M("labels.delete"),onClick:()=>n(null),visible:_t(Ve(e),t)})}),l0=(e,t)=>e.frameId===t||e.id===t,gv=(e,t,n)=>{let a=[],i=[],r=null,s=-1,l=oe(n||ve(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0}));for(;++s<e.length;){let c=e[s];l.get(c.id)?(i.length&&(a=a.concat(i),i=[]),a.push(s),r=s+1):c.isDeleted&&r===s?(r=s+1,i.push(s)):i=[]}return a},VB=e=>{let t=0;return e.reduce((n,a,i)=>(i>0&&e[i-1]!==a-1&&(t=++t),(n[t]||(n[t]=[])).push(a),n),[])},R6=(e,t,n)=>{if("containerId"in e&&e.containerId){let a=xi.getScene(e).getElement(e.containerId);if(a)return n==="left"?Math.min(t.indexOf(a),t.indexOf(e)):Math.max(t.indexOf(a),t.indexOf(e))}else{let a=e.boundElements?.find(i=>i.type!=="arrow")?.id;if(a){let i=xi.getScene(e).getElement(a);if(i)return n==="left"?Math.min(t.indexOf(i),t.indexOf(e)):Math.max(t.indexOf(i),t.indexOf(e))}}},GB=(e,t)=>{let n=-1,a=-1;return e.forEach((i,r)=>{l0(i,t)&&(n===-1&&(n=r),a=r)}),n===-1?[]:e.slice(n,a+1)},YB=(e,t,n,a,i)=>{let r=t[n],s=u=>u.isDeleted?!1:i?u.frameId===i:e.editingGroupId?u.groupIds.includes(e.editingGroupId):!0,l=a==="left"?Sr(t,u=>s(u),Math.max(0,n-1)):w8(t,u=>s(u),n+1),c=t[l];if(!c)return-1;if(e.editingGroupId){if(r?.groupIds.join("")===c?.groupIds.join(""))return R6(c,t,a)??l;if(!c?.groupIds.includes(e.editingGroupId))return-1}if(!i&&(c.frameId||ce(c))){let u=GB(t,c.frameId||c.id);return a==="left"?t.indexOf(u[0]):t.indexOf(u[u.length-1])}if(!c.groupIds.length)return R6(c,t,a)??l;let d=e.editingGroupId?c.groupIds[c.groupIds.indexOf(e.editingGroupId)-1]:c.groupIds[c.groupIds.length-1],o=tt(t,d);return o.length?a==="left"?t.indexOf(o[0]):t.indexOf(o[o.length-1]):l},bv=(e,t)=>t.reduce((n,a)=>{let i=e[a];return n.set(i.id,i),n},new Map),vv=(e,t,n)=>{let a=gv(e,t),i=bv(e,a),r=VB(a);n==="right"&&(r=r.reverse());let s=new Set(a.filter(l=>ce(e[l])).map(l=>e[l].id));return r.forEach((l,c)=>{let d=l[0],o=l[l.length-1],u=n==="left"?d:o,h=l.some(x=>{let v=e[x];return v.frameId&&s.has(v.frameId)})?null:e[u]?.frameId,p=YB(t,e,u,n,h);if(p===-1||u===p)return;let U=n==="left"?e.slice(0,p):e.slice(0,d),m=e.slice(d,o+1),g=n==="left"?e.slice(p,d):e.slice(o+1,p+1),b=n==="left"?e.slice(o+1):e.slice(p+1);e=n==="left"?[...U,...m,...g,...b]:[...U,...g,...m,...b]}),Wa(e,i),e},xv=(e,t,n,a,i)=>{let r=gv(e,t,i),s=bv(e,r),l=[],c,d;if(n==="left"){if(a)c=w8(e,U=>l0(U,a));else if(t.editingGroupId){let U=tt(e,t.editingGroupId);if(!U.length)return e;c=e.indexOf(U[0])}else c=0;d=r[r.length-1]}else{if(a)d=Sr(e,U=>l0(U,a));else if(t.editingGroupId){let U=tt(e,t.editingGroupId);if(!U.length)return e;d=e.indexOf(U[U.length-1])}else d=e.length-1;c=r[0]}c===-1&&(c=0);for(let U=c;U<d+1;U++)r.includes(U)||l.push(e[U]);let o=Array.from(s.values()),u=e.slice(0,c),h=e.slice(d+1),p=n==="left"?[...u,...o,...l,...h]:[...u,...l,...o,...h];return Wa(p,s),p};function yv(e,t,n,a){let i=oe(ve(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0})),r={regularElements:[],frameChildren:new Map},s=new Set;for(let d of e)i.has(d.id)&&ce(d)&&s.add(d.id);for(let d of e)if(i.has(d.id))if(ce(d)||d.frameId&&s.has(d.frameId))r.regularElements.push(d);else if(!d.frameId)r.regularElements.push(d);else{let o=r.frameChildren.get(d.frameId)||[];o.push(d),r.frameChildren.set(d.frameId,o)}let l=e,c=Array.from(r.frameChildren.entries());for(let[d,o]of c)l=a(e,t,n,d,o);return a(l,t,n,null,r.regularElements)}var ZB=(e,t)=>vv(e,t,"left"),KB=(e,t)=>vv(e,t,"right"),qB=(e,t)=>yv(e,t,"left",xv),JB=(e,t)=>yv(e,t,"right",xv),QB=Y({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:A2,trackEvent:{category:"element"},perform:(e,t)=>({elements:ZB(e,t),appState:t,captureUpdate:B.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[R.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Te.BRACKET_LEFT,PanelComponent:({updateData:e,appState:t})=>f.jsx("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${M("labels.sendBackward")} — ${W("CtrlOrCmd+[")}`,children:A2})}),eH=Y({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:T2,trackEvent:{category:"element"},perform:(e,t)=>({elements:KB(e,t),appState:t,captureUpdate:B.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[R.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Te.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:t})=>f.jsx("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${M("labels.bringForward")} — ${W("CtrlOrCmd+]")}`,children:T2})}),tH=Y({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:R2,trackEvent:{category:"element"},perform:(e,t)=>({elements:qB(e,t),appState:t,captureUpdate:B.IMMEDIATELY}),keyTest:e=>Fa?e[R.CTRL_OR_CMD]&&e.altKey&&e.code===Te.BRACKET_LEFT:e[R.CTRL_OR_CMD]&&e.shiftKey&&e.code===Te.BRACKET_LEFT,PanelComponent:({updateData:e,appState:t})=>f.jsx("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${M("labels.sendToBack")} — ${W(Fa?"CtrlOrCmd+Alt+[":"CtrlOrCmd+Shift+[")}`,children:R2})}),nH=Y({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:j2,trackEvent:{category:"element"},perform:(e,t)=>({elements:JB(e,t),appState:t,captureUpdate:B.IMMEDIATELY}),keyTest:e=>Fa?e[R.CTRL_OR_CMD]&&e.altKey&&e.code===Te.BRACKET_RIGHT:e[R.CTRL_OR_CMD]&&e.shiftKey&&e.code===Te.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:t})=>f.jsx("button",{type:"button",className:"zIndexButton",onClick:n=>e(null),title:`${M("labels.bringToFront")} — ${W(Fa?"CtrlOrCmd+Alt+]":"CtrlOrCmd+Shift+]")}`,children:j2})}),aH=Y({name:"selectAll",label:"labels.selectAll",icon:mT,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,t,n,a)=>{if(t.editingLinearElement)return!1;let i=e.filter(r=>!r.isDeleted&&!(q(r)&&r.containerId)&&!r.locked).reduce((r,s)=>(r[s.id]=!0,r),{});return{appState:{...t,...ln({editingGroupId:null,selectedElementIds:i},Ve(e),t,a),selectedLinearElement:Object.keys(i).length===1&&ue(e[0])?new J(e[0]):null},captureUpdate:B.IMMEDIATELY}},keyTest:e=>e[R.CTRL_OR_CMD]&&e.key===R.A}),iH=e=>{let t=e.slice(),n=new Set,a=r=>{let s=r[0]?.groupIds?.join(""),l=[r[0]],c=[];for(let d of r.slice(1))d.groupIds?.join("")===s?l.push(d):c.push(d);return c.length?[...l,...a(c)]:l},i=new Map;return t.forEach((r,s)=>{if(!i.has(r.id))if(r.groupIds?.length){let l=r.groupIds[r.groupIds.length-1],c=t.slice(s).filter(d=>{let o=d?.groupIds?.some(u=>u===l);return o&&i.set(d.id,!0),o});for(let d of a(c))n.add(d)}else n.add(r)}),n.size!==e.length?(console.error("normalizeGroupElementOrder: lost some elements... bailing!"),e):[...n]},rH=e=>{let t=mI(e),n=e.slice(),a=new Set;return n.forEach((i,r)=>{i&&(i.boundElements?.length?(a.add(i),n[r]=null,i.boundElements.forEach(s=>{let l=t.get(s.id);l&&s.type==="text"&&(a.add(l[0]),n[l[1]]=null)})):i.type==="text"&&i.containerId&&t.get(i.containerId)?.[0].boundElements?.find(s=>s.id===i.id)||(a.add(i),n[r]=null))}),a.size!==e.length?(console.error("normalizeBoundElementsOrder: lost some elements... bailing!"),e):[...a]},sH=e=>rH(iH(e)),lH=Y({name:"duplicateSelection",label:"labels.duplicateSelection",icon:w1,trackEvent:{category:"element"},perform:(e,t,n,a)=>{if(t.editingLinearElement)try{let r=J.duplicateSelectedPoints(t,a.scene.getNonDeletedElementsMap());return{elements:e,appState:r,captureUpdate:B.IMMEDIATELY}}catch{return!1}let i=oH(e,t);if(a.props.onDuplicate&&i.elements){let r=a.props.onDuplicate(i.elements,e);r&&(i.elements=r)}return{...i,captureUpdate:B.IMMEDIATELY}},keyTest:e=>e[R.CTRL_OR_CMD]&&e.key===R.D,PanelComponent:({elements:e,appState:t,updateData:n})=>f.jsx(Me,{type:"button",icon:w1,title:`${M("labels.duplicateSelection")} — ${W("CtrlOrCmd+D")}`,"aria-label":M("labels.duplicateSelection"),onClick:()=>n(null),visible:_t(Ve(e),t)})}),oH=(e,t)=>{let n=new Map,a=[],i=[],r=new Map,s=new Map,l=oe(e),c=m=>{let g=S2(m).reduce((b,x)=>{if(o.has(x.id))return b;o.set(x.id,!0);let v=a3(t.editingGroupId,n,x,{x:x.x+$d/2,y:x.y+$d/2});return o.set(v.id,!0),s.set(v.id,v),r.set(x.id,v.id),i.push(x),a.push(v),b.push(v),b},[]);return Array.isArray(m)?g:g[0]||null};e=sH(e);let d=oe(ve(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0})),o=new Map,u=e.slice(),h=(m,g)=>{nn(m!==-1,"targetIndex === -1 "),!(!Array.isArray(g)&&!g)&&u.splice(m+1,0,...S2(g))},p=new Set(e.filter(m=>d.has(m.id)&&ce(m)).map(m=>m.id));for(let m of e){if(o.has(m.id)||!d.has(m.id))continue;let g=B7(t,m);if(g){let b=tt(e,g).flatMap(v=>ce(v)?[...Ga(e,v.id),v]:[v]),x=Sr(u,v=>v.groupIds?.includes(g));h(x,c(b));continue}if(!(m.frameId&&p.has(m.frameId))){if(ce(m)){let b=m.id,x=Ga(e,b),v=Sr(u,y=>y.frameId===b||y.id===b);h(v,c([...x,m]));continue}if(Wn(m)){let b=ge(m,l),x=Sr(u,v=>v.id===m.id||"containerId"in v&&v.containerId===m.id);b?h(x,c([m,b])):h(x,c(m));continue}if(nt(m)){let b=Ht(m,l),x=Sr(u,v=>v.id===m.id||v.id===b?.id);b?h(x,c([b,m])):h(x,c(m));continue}h(Sr(u,b=>b.id===m.id),c(m))}}G7(u,i,r),P7(u,i,r),O3(u,i,r);let U=Fp(a);return{elements:u,appState:{...t,...ln({editingGroupId:t.editingGroupId,selectedElementIds:U.reduce((m,g)=>(nt(g)||(m[g.id]=!0),m),{})},Ve(u),t,null)}}},cH=new Set(["command_palette","export"]),qe=(e,t,n,a)=>{try{if(typeof window>"u"||be.VITE_WORKER_ID||be.VITE_APP_ENABLE_TRACKING!=="true"||!cH.has(e)||be.DEV)return;be.PROD||console.info("trackEvent",{category:e,action:t,label:n,value:a}),window.sa_event&&window.sa_event(t,{category:e,label:n,value:a})}catch(i){console.error("error during analytics",i)}},wv=S.forwardRef((e,t)=>{let{title:n,className:a,testId:i,active:r,standalone:s,icon:l,onClick:c}=e;return f.jsx("button",{type:"button",ref:t,title:n,"data-testid":i,className:te(a,{standalone:s,active:r}),onClick:c,children:l},n)}),Za=e=>f.jsx("div",{className:"buttonList",children:e.options.map(t=>e.type==="button"?f.jsx(wv,{icon:t.icon,title:t.text,testId:t.testId,active:t.active??e.value===t.value,onClick:n=>e.onClick(t.value,n)},t.text):f.jsxs("label",{className:te({active:e.value===t.value}),title:t.text,children:[f.jsx("input",{type:"radio",name:e.group,onChange:()=>e.onChange(t.value),checked:e.value===t.value,"data-testid":t.testId}),t.icon]},t.text))}),dH=({onChange:e,type:t,activeColor:n,topPicks:a})=>{let i;return t==="elementStroke"&&(i=t8),t==="elementBackground"&&(i=n8),t==="canvasBackground"&&(i=a8),a&&(i=a),i?f.jsx("div",{className:"color-picker__top-picks",children:i.map(r=>f.jsx("button",{className:te("color-picker__button",{active:r===n,"is-transparent":r==="transparent"||!r}),style:{"--swatch-color":r},type:"button",title:r,onClick:()=>e(r),"data-testid":`color-top-pick-${r}`,children:f.jsx("div",{className:"color-picker__button-outline"})},r))}):(console.error("Invalid type for TopPicks"),null)},Ev=()=>f.jsx("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}}),pf=({palette:e,color:t})=>{for(let[n,a]of Object.entries(e))if(Array.isArray(a)){let i=a.indexOf(t);if(i>-1)return{colorName:n,shade:i}}else if(a===t)return{colorName:n,shade:null};return null},o0=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),Sv=({color:e,palette:t})=>!Object.values(t).flat().includes(e),uH=(e,t,n)=>{let a={elementBackground:"backgroundColor",elementStroke:"strokeColor"},i=e.filter(s=>{if(s.isDeleted)return!1;let l=s[a[t]];return Sv({color:l,palette:n})}),r=new Map;return i.forEach(s=>{let l=s[a[t]];r.has(l)?r.set(l,r.get(l)+1):r.set(l,1)}),[...r.entries()].sort((s,l)=>l[1]-s[1]).map(s=>s[0]).slice(0,uM)},Ul=Xt(null),D6=(e,t,n)=>(e*299+t*587+n*114)/1e3>=160?"black":"white",fH=(e,t)=>{if(t){let r=new Option().style;if(r.color=e,r.color){let s=r.color.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),l=parseInt(s[0]),c=parseInt(s[1]),d=parseInt(s[2]);return D6(l,c,d)}}if(e==="transparent")return"black";let n=parseInt(e.substring(1,3),16),a=parseInt(e.substring(3,5),16),i=parseInt(e.substring(5,7),16);return D6(n,a,i)},hH=({color:e,keyLabel:t,isCustomColor:n=!1,isShade:a=!1})=>f.jsxs("div",{className:"color-picker__button__hotkey-label",style:{color:fH(e,n)},children:[a&&"⇧",t]}),dU=hH,pH=({hex:e,onChange:t,palette:n})=>{let a=pf({color:e||"transparent",palette:n}),[i,r]=gt(Ul),s=S.useRef(null);if(S.useEffect(()=>{s.current&&i==="shades"&&s.current.focus()},[a,i]),a){let{colorName:l,shade:c}=a,d=n[l];if(Array.isArray(d))return f.jsx("div",{className:"color-picker-content--default shades",children:d.map((o,u)=>f.jsxs("button",{ref:u===c&&i==="shades"?s:void 0,tabIndex:-1,type:"button",className:te("color-picker__button color-picker__button--large",{active:u===c}),"aria-label":"Shade",title:`${l} - ${u+1}`,style:o?{"--swatch-color":o}:void 0,onClick:()=>{t(o),r("shades")},children:[f.jsx("div",{className:"color-picker__button-outline"}),f.jsx(dU,{color:o,keyLabel:u+1,isShade:!0})]},u))})}return f.jsxs("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[f.jsx("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),f.jsx("div",{tabIndex:-1,style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"0.75rem"},children:M("colorPicker.noShades")})]})},UH=({palette:e,color:t,onChange:n,label:a,activeShade:i})=>{let r=pf({color:t||"transparent",palette:e}),[s,l]=gt(Ul),c=S.useRef(null);return S.useEffect(()=>{c.current&&s==="baseColors"&&c.current.focus()},[r?.colorName,s]),f.jsx("div",{className:"color-picker-content--default",children:Object.entries(e).map(([d,o],u)=>{let h=(Array.isArray(o)?o[i]:o)||"transparent",p=o0[u],U=M(`colors.${d.replace(/\d+/,"")}`,null,"");return f.jsxs("button",{ref:r?.colorName===d?c:void 0,tabIndex:-1,type:"button",className:te("color-picker__button color-picker__button--large",{active:r?.colorName===d,"is-transparent":h==="transparent"||!h}),onClick:()=>{n(h),l("baseColors")},title:`${U}${h.startsWith("#")?` ${h}`:""} — ${p}`,"aria-label":`${U} — ${p}`,style:{"--swatch-color":h},"data-testid":`color-${d}`,children:[f.jsx("div",{className:"color-picker__button-outline"}),f.jsx(dU,{color:h,keyLabel:p})]},d)})})},mH=UH,gH=({colors:e,color:t,onChange:n,label:a})=>{let[i,r]=gt(Ul),s=S.useRef(null);return S.useEffect(()=>{s.current&&s.current.focus()},[t,i]),f.jsx("div",{className:"color-picker-content--default",children:e.map((l,c)=>f.jsxs("button",{ref:t===l?s:void 0,tabIndex:-1,type:"button",className:te("color-picker__button color-picker__button--large",{active:t===l,"is-transparent":l==="transparent"||!l}),onClick:()=>{n(l),r("custom")},title:l,"aria-label":a,style:{"--swatch-color":l},children:[f.jsx("div",{className:"color-picker__button-outline"}),f.jsx(dU,{color:l,keyLabel:c+1,isCustomColor:!0})]},c))})},Dh=(e,t,n)=>{let a=Math.ceil(n/ws);switch(t=t??-1,e){case"ArrowLeft":{let i=t-1;return i<0?n-1:i}case"ArrowRight":return(t+1)%n;case"ArrowDown":{let i=t+ws;return i>=n?t%ws:i}case"ArrowUp":{let i=t-ws,r=i<0?ws*a+i:i;return r>=n?void 0:r}}},bH=({e,colorObj:t,onChange:n,palette:a,customColors:i,setActiveColorPickerSection:r,activeShade:s})=>{if(t?.shade!=null&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(e.code)&&e.shiftKey){let l=Number(e.code.slice(-1))-1;return n(a[t.colorName][l]),r("shades"),!0}if(["1","2","3","4","5"].includes(e.key)&&i[Number(e.key)-1])return n(i[Number(e.key)-1]),r("custom"),!0;if(o0.includes(e.key)){let l=o0.indexOf(e.key),c=Object.keys(a)[l],d=a[c],o=Array.isArray(d)?d[s]:d;return n(o),r("baseColors"),!0}return!1},vH=({event:e,activeColorPickerSection:t,palette:n,color:a,onChange:i,customColors:r,setActiveColorPickerSection:s,updateData:l,activeShade:c,onEyeDropperToggle:d,onEscape:o})=>{if(e[R.CTRL_OR_CMD])return!1;if(e.key===R.ESCAPE)return o(e),!0;if(e.key===R.ALT)return d(!0),!0;if(e.key===R.I)return d(),!0;let u=pf({color:a,palette:n});if(e.key===R.TAB){let h={custom:!!r.length,baseColors:!0,shades:u?.shade!=null,hex:!0},p=Object.entries(h).reduce((x,[v,y])=>(y&&x.push(v),x),[]),U=p.indexOf(t),m=e.shiftKey?-1:1,g=U+m>p.length-1?0:U+m<0?p.length-1:U+m,b=p[g];return b&&s(b),b==="custom"?i(r[0]):b==="baseColors"&&(Object.entries(n).find(([x,v])=>Array.isArray(v)?v.includes(a):v===a?x:null)||i(Ee.black)),e.preventDefault(),e.stopPropagation(),!0}if(bH({e,colorObj:u,onChange:i,palette:n,customColors:r,setActiveColorPickerSection:s,activeShade:c}))return!0;if(t==="shades"&&u){let{shade:h}=u,p=Dh(e.key,h,ws);if(p!==void 0)return i(n[u.colorName][p]),!0}if(t==="baseColors"&&u){let{colorName:h}=u,p=Object.keys(n),U=p.indexOf(h),m=Dh(e.key,U,p.length);if(m!==void 0){let g=p[m],b=n[g];return i(Array.isArray(b)?b[c]:b),!0}}if(t==="custom"){let h=r.indexOf(a),p=Dh(e.key,h,r.length);if(p!==void 0){let U=r[p];return i(U),!0}}return!1},xH=({children:e})=>f.jsx("div",{className:"color-picker__heading",children:e}),yd=xH,yH=({color:e,onChange:t,label:n,type:a,elements:i,palette:r,updateData:s,children:l,onEyeDropperToggle:c,onEscape:d})=>{let[o]=Z.useState(()=>a==="canvasBackground"?[]:uH(i,a,r)),[u,h]=gt(Ul),p=pf({color:e,palette:r});S.useEffect(()=>{if(!u){let b=Sv({color:e,palette:r}),x=b&&!o.includes(e);h(x?"hex":b?"custom":p?.shade!=null?"shades":"baseColors")}},[u,e,r,h,p,o]);let[U,m]=S.useState(p?.shade??(a==="elementBackground"?Bl:zl));S.useEffect(()=>{p?.shade!=null&&m(p.shade);let b=x=>{x.key===R.ALT&&c(!1)};return document.addEventListener("keyup",b,{capture:!0}),()=>{document.removeEventListener("keyup",b,{capture:!0})}},[p,c]);let g=Z.useRef(null);return f.jsx("div",{role:"dialog","aria-modal":"true","aria-label":M("labels.colorPicker"),children:f.jsxs("div",{ref:g,onKeyDown:b=>{vH({event:b,activeColorPickerSection:u,palette:r,color:e,onChange:t,onEyeDropperToggle:c,customColors:o,setActiveColorPickerSection:h,updateData:s,activeShade:U,onEscape:d})&&(b.preventDefault(),b.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[!!o.length&&f.jsxs("div",{children:[f.jsx(yd,{children:M("colorPicker.mostUsedCustomColors")}),f.jsx(gH,{colors:o,color:e,label:M("colorPicker.mostUsedCustomColors"),onChange:t})]}),f.jsxs("div",{children:[f.jsx(yd,{children:M("colorPicker.colors")}),f.jsx(mH,{color:e,label:n,palette:r,onChange:t,activeShade:U})]}),f.jsxs("div",{children:[f.jsx(yd,{children:M("colorPicker.shades")}),f.jsx(pH,{hex:e,onChange:t,palette:r})]}),l]})})},kv=Z.createContext(null),Zt=()=>Z.useContext(kv),Cv=e=>{let[t,n]=S.useState(null),a=Tt(),{theme:i}=Zt(),{container:r}=Ka();return S.useLayoutEffect(()=>{t&&(t.className="",t.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),t.classList.toggle("excalidraw--mobile",a.editor.isMobile),t.classList.toggle("theme--dark",i===Ce.DARK))},[t,i,a.editor.isMobile,e?.className]),S.useLayoutEffect(()=>{let s=e?.parentSelector?r?.querySelector(e.parentSelector):document.body;if(!s)return;let l=document.createElement("div");return s.appendChild(l),n(l),()=>{s.removeChild(l)}},[r,e?.parentSelector]),t};function uU(e,t,n){S.useEffect(()=>{function a(i){let r=i;if(!e.current)return;let s=n?.(r,e.current);if(s!==!0){if(s===!1)return t(r);e.current.contains(r.target)||!document.documentElement.contains(r.target)||r.target.closest("[data-radix-portal]")||r.target===document.documentElement&&document.body.style.pointerEvents==="none"||r.target.closest("[data-prevent-outside-click]")||t(r)}}return document.addEventListener("pointerdown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("pointerdown",a),document.removeEventListener("touchstart",a)}},[e,t,n])}var Uf=e=>{let t=S.useRef(e);return Object.assign(t.current,e),t.current},mf=Xt(null),wH=({onCancel:e,onChange:t,onSelect:n,colorPickerType:a})=>{let i=Cv({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),r=Zt(),s=Sf(),l=va(),c=ve(s,r),d=Uf({app:l,onCancel:e,onChange:t,onSelect:n,selectedElements:c}),{container:o}=Ka();S.useEffect(()=>{let h=u.current;if(!h||!l.canvas||!i)return;let p=!1,U=l.canvas.getContext("2d"),m=({clientX:k,clientY:C})=>{let I=U.getImageData((k-r.offsetLeft)*window.devicePixelRatio,(C-r.offsetTop)*window.devicePixelRatio,1,1).data;return mM(I[0],I[1],I[2])},g=({clientX:k,clientY:C,altKey:I})=>{h.style.top=`${C+20}px`,h.style.left=`${k+20}px`;let A=m({clientX:k,clientY:C});p&&d.onChange(a,A,d.selectedElements,{altKey:I}),h.style.background=A},b=()=>{d.onCancel()},x=(k,C)=>{d.onSelect(k,C)},v=k=>{p=!0,k.stopImmediatePropagation()},y=k=>{p=!1,o?.focus(),k.stopImmediatePropagation(),k.preventDefault(),x(m(k),k)},w=k=>{k.key===R.ESCAPE&&(k.preventDefault(),k.stopImmediatePropagation(),b())};return i.tabIndex=-1,i.focus(),g({clientX:d.app.lastViewportPosition.x,clientY:d.app.lastViewportPosition.y,altKey:!1}),i.addEventListener("keydown",w),i.addEventListener("pointerdown",v),i.addEventListener("pointerup",y),window.addEventListener("pointermove",g,{passive:!0}),window.addEventListener("blur",b),()=>{p=!1,i.removeEventListener("keydown",w),i.removeEventListener("pointerdown",v),i.removeEventListener("pointerup",y),window.removeEventListener("pointermove",g),window.removeEventListener("blur",b)}},[d,l.canvas,i,a,o,r.offsetLeft,r.offsetTop]);let u=S.useRef(null);return uU(u,()=>{e()},h=>!!h.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),i?Ft.createPortal(f.jsx("div",{ref:u,className:"excalidraw-eye-dropper-preview"}),i):null},EH=({color:e,onChange:t,label:n,colorPickerType:a})=>{let i=Tt(),[r,s]=S.useState(e),[l,c]=gt(Ul);S.useEffect(()=>{s(e)},[e]);let d=S.useCallback(U=>{let m=U.toLowerCase(),g=SH(m);g&&t(g),s(m)},[t]),o=S.useRef(null),u=S.useRef(null);S.useEffect(()=>{o.current&&o.current.focus()},[l]);let[h,p]=gt(mf);return S.useEffect(()=>()=>{p(null)},[p]),f.jsxs("div",{className:"color-picker__input-label",children:[f.jsx("div",{className:"color-picker__input-hash",children:"#"}),f.jsx("input",{ref:l==="hex"?o:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":n,onChange:U=>{d(U.target.value)},value:(r||"").replace(/^#/,""),onBlur:()=>{s(e)},tabIndex:-1,onFocus:()=>c("hex"),onKeyDown:U=>{U.key!==R.TAB&&(U.key===R.ESCAPE&&u.current?.focus(),U.stopPropagation())}}),!i.editor.isMobile&&f.jsxs(f.Fragment,{children:[f.jsx("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),f.jsx("div",{ref:u,className:te("excalidraw-eye-dropper-trigger",{selected:h}),onClick:()=>p(U=>U?null:{keepOpenOnAlt:!1,onSelect:m=>t(m),colorPickerType:a}),title:`${M("labels.eyeDropper")} — ${R.I.toLocaleUpperCase()} or ${W("Alt")} `,children:lT})]})]})},ua=Z.forwardRef(({children:e,padding:t,className:n,style:a},i)=>f.jsx("div",{className:te("Island",n),style:{"--padding":t,...a},ref:i,children:e})),Mv=Z.forwardRef(({className:e,container:t,children:n,style:a,onClose:i,onKeyDown:r,onFocusOutside:s,onPointerLeave:l,onPointerDownOutside:c},d)=>{let o=Tt();return f.jsx(cz,{container:t,children:f.jsxs(sU,{ref:d,className:te("focus-visible-none",e),"data-prevent-outside-click":!0,side:o.editor.isMobile&&!o.viewport.isLandscape?"bottom":"right",align:o.editor.isMobile&&!o.viewport.isLandscape?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:"var(--zIndex-popup)"},onPointerLeave:l,onKeyDown:r,onFocusOutside:s,onPointerDownOutside:c,onCloseAutoFocus:u=>{u.stopPropagation(),u.preventDefault(),t&&!sI(document.activeElement)&&t.focus(),i()},children:[f.jsx(ua,{padding:3,style:a,children:n}),f.jsx(X9,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})}),L6=e=>{let t=new Option().style;return t.color=e,!!t.color},SH=e=>ia(e)?e:L6(`#${e}`)?`#${e}`:L6(e)?e:null,kH=({type:e,color:t,onChange:n,label:a,elements:i,palette:r=Ee,updateData:s})=>{let{container:l}=Ka(),[,c]=gt(Ul),[d,o]=gt(mf),u=f.jsxs("div",{children:[f.jsx(yd,{children:M("colorPicker.hexCode")}),f.jsx(EH,{color:t,label:a,onChange:U=>{n(U)},colorPickerType:e})]}),h=S.useRef(null),p=()=>{h.current?.querySelector(".color-picker-content")?.focus()};return f.jsx(Mv,{container:l,style:{maxWidth:"13rem"},onFocusOutside:U=>{p(),U.preventDefault()},onPointerDownOutside:U=>{d&&U.preventDefault()},onClose:()=>{s({openPopup:null}),c(null)},children:r?f.jsx(yH,{palette:r,color:t,onChange:U=>{n(U)},onEyeDropperToggle:U=>{o(m=>U?(m=m||{keepOpenOnAlt:!0,onSelect:n,colorPickerType:e},m.keepOpenOnAlt=!0,m):U===!1||m?null:{keepOpenOnAlt:!1,onSelect:n,colorPickerType:e})},onEscape:U=>{d?o(null):s({openPopup:null})},label:a,type:e,elements:i,updateData:s,children:u}):u})},CH=({label:e,color:t,type:n})=>f.jsx(df,{type:"button",className:te("color-picker__button active-color properties-trigger",{"is-transparent":t==="transparent"||!t}),"aria-label":e,style:t?{"--swatch-color":t}:void 0,title:M(n==="elementStroke"?"labels.showStroke":"labels.showBackground"),children:f.jsx("div",{className:"color-picker__button-outline"})}),fU=({type:e,color:t,onChange:n,label:a,elements:i,palette:r=Ee,topPicks:s,updateData:l,appState:c})=>f.jsx("div",{children:f.jsxs("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[f.jsx(dH,{activeColor:t,onChange:n,type:e,topPicks:s}),f.jsx(Ev,{}),f.jsxs(cf,{open:c.openPopup===e,onOpenChange:d=>{l({openPopup:d?e:null})},children:[f.jsx(CH,{color:t,label:a,type:e}),c.openPopup===e&&f.jsx(kH,{type:e,color:t,onChange:n,label:a,elements:i,palette:r,updateData:l})]})]})}),gf=({icon:e})=>f.jsx("span",{style:{width:"1em",margin:"0 0.5ex 0 0.5ex",display:"inline-block",lineHeight:0,verticalAlign:"middle"},children:e}),MH=({label:e,open:t,openTrigger:n,children:a,className:i})=>f.jsxs(f.Fragment,{children:[f.jsxs("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center"},className:i,onClick:n,children:[e,f.jsx(gf,{icon:t?AT:J8})]}),t&&f.jsx("div",{style:{display:"flex",flexDirection:"column"},children:a})]}),c0=MH,IH=Xt(!1);function _H({options:e,value:t,label:n,onChange:a,onClose:i,numberOfOptionsToAlwaysShow:r=e.length}){let s=Tt(),l=p=>{let U=e.find(m=>m.keyBinding===p.key.toLowerCase());if(!(p.metaKey||p.altKey||p.ctrlKey)&&U)a(U.value),p.preventDefault();else if(p.key===R.TAB){let m=e.findIndex(b=>b.value===t),g=p.shiftKey?(e.length+m-1)%e.length:(m+1)%e.length;a(e[g].value)}else if(Hl(p.key)){let m=Bo().rtl,g=e.findIndex(b=>b.value===t);if(g!==-1){let b=e.length,x=g;switch(p.key){case(m?R.ARROW_LEFT:R.ARROW_RIGHT):x=(g+1)%b;break;case(m?R.ARROW_RIGHT:R.ARROW_LEFT):x=(b+g-1)%b;break;case R.ARROW_DOWN:{x=(g+(r??1))%b;break}case R.ARROW_UP:{x=(b+g-(r??1))%b;break}}a(e[x].value)}p.preventDefault()}else(p.key===R.ESCAPE||p.key===R.ENTER)&&(p.preventDefault(),i());p.nativeEvent.stopImmediatePropagation(),p.stopPropagation()},[c,d]=gt(IH),o=Z.useMemo(()=>e.slice(0,r),[e,r]),u=Z.useMemo(()=>e.slice(r),[e,r]);S.useEffect(()=>{o.some(p=>p.value===t)||d(!0)},[t,o,d]);let h=p=>f.jsx("div",{className:"picker-content",children:p.map((U,m)=>f.jsxs("button",{type:"button",className:te("picker-option",{active:t===U.value}),onClick:g=>{a(U.value)},title:`${U.text} ${U.keyBinding&&`— ${U.keyBinding.toUpperCase()}`}`,"aria-label":U.text||"none","aria-keyshortcuts":U.keyBinding||void 0,ref:g=>{t===U.value&&setTimeout(()=>{g?.focus()},0)},children:[U.icon,U.keyBinding&&f.jsx("span",{className:"picker-keybinding",children:U.keyBinding})]},U.text))});return f.jsx(sU,{side:s.editor.isMobile&&!s.viewport.isLandscape?"top":"bottom",align:"start",sideOffset:12,style:{zIndex:"var(--zIndex-popup)"},onKeyDown:l,children:f.jsxs("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":n,children:[h(o),u.length>0&&f.jsx(c0,{label:M("labels.more_options"),open:c,openTrigger:()=>{d(p=>!p)},className:"picker-collapsible",children:h(u)})]})})}function P6({value:e,label:t,options:n,onChange:a,group:i="",numberOfOptionsToAlwaysShow:r}){let[s,l]=Z.useState(!1),c=Z.useRef(null);return f.jsx("div",{children:f.jsxs(cf,{open:s,onOpenChange:d=>l(d),children:[f.jsx(df,{name:i,type:"button","aria-label":t,onClick:()=>l(!s),ref:c,className:s?"active":"",children:n.find(d=>d.value===e)?.icon}),s&&f.jsx(_H,{options:n,value:e,label:t,onChange:a,onClose:()=>{l(!1)},numberOfOptionsToAlwaysShow:r})]})})}var Iv=Z.forwardRef(({className:e,placeholder:t,onChange:n},a)=>f.jsxs("div",{className:te("QuickSearch__wrapper",e),children:[Kr,f.jsx("input",{ref:a,className:"QuickSearch__input",type:"text",placeholder:t,onChange:i=>n(i.target.value.trim().toLowerCase())})]})),_v=({className:e,placeholder:t,children:n})=>{let a=!S.Children.count(n);return f.jsx("div",{className:te("ScrollableList__wrapper",e),role:"menu",children:a?f.jsx("div",{className:"empty",children:t}):n})},Tv=({children:e,className:t="",style:n,title:a})=>f.jsxs("div",{className:`dropdown-menu-group ${t}`,style:n,children:[a&&f.jsx("p",{className:"dropdown-menu-group-title",children:a}),e]}),d0=Tv;Tv.displayName="DropdownMenuGroup";var Av=Z.createContext({}),jv=(e="",t=!1,n=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
|
|
92
|
+
`)},qF=0,gs=[];function JF(e){var t=S.useRef([]),n=S.useRef([0,0]),a=S.useRef(),i=S.useState(qF++)[0],r=S.useState(I9)[0],s=S.useRef(e);S.useEffect(function(){s.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=Vw([e.lockRef.current],(e.shards||[]).map(g6),!0).filter(Boolean);return m.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=S.useCallback(function(m,g){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var b=zc(m),x=n.current,v="deltaX"in m?m.deltaX:x[0]-b[0],y="deltaY"in m?m.deltaY:x[1]-b[1],w,k=m.target,C=Math.abs(v)>Math.abs(y)?"h":"v";if("touches"in m&&C==="h"&&k.type==="range")return!1;var I=window.getSelection(),A=I&&I.anchorNode,_=A?A===k||A.contains(k):!1;if(_)return!1;var T=U6(C,k);if(!T)return!0;if(T?w=C:(w=C==="v"?"h":"v",T=U6(C,k)),!T)return!1;if(!a.current&&"changedTouches"in m&&(v||y)&&(a.current=w),!w)return!0;var D=a.current||w;return YF(D,g,m,D==="h"?v:y)},[]),c=S.useCallback(function(m){var g=m;if(!(!gs.length||gs[gs.length-1]!==r)){var b="deltaY"in g?m6(g):zc(g),x=t.current.filter(function(w){return w.name===g.type&&(w.target===g.target||g.target===w.shadowParent)&&ZF(w.delta,b)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var v=(s.current.shards||[]).map(g6).filter(Boolean).filter(function(w){return w.contains(g.target)}),y=v.length>0?l(g,v[0]):!s.current.noIsolation;y&&g.cancelable&&g.preventDefault()}}},[]),d=S.useCallback(function(m,g,b,x){var v={name:m,delta:g,target:b,should:x,shadowParent:QF(b)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(y){return y!==v})},1)},[]),o=S.useCallback(function(m){n.current=zc(m),a.current=void 0},[]),u=S.useCallback(function(m){d(m.type,m6(m),m.target,l(m,e.lockRef.current))},[]),h=S.useCallback(function(m){d(m.type,zc(m),m.target,l(m,e.lockRef.current))},[]);S.useEffect(function(){return gs.push(r),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:h}),document.addEventListener("wheel",c,ms),document.addEventListener("touchmove",c,ms),document.addEventListener("touchstart",o,ms),function(){gs=gs.filter(function(m){return m!==r}),document.removeEventListener("wheel",c,ms),document.removeEventListener("touchmove",c,ms),document.removeEventListener("touchstart",o,ms)}},[]);var p=e.removeScrollBar,U=e.inert;return S.createElement(S.Fragment,null,U?S.createElement(r,{styles:KF(i)}):null,p?S.createElement(zF,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function QF(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ez=IF(M9,JF);var j9=S.forwardRef(function(e,t){return S.createElement(of,Aa({},e,{ref:t,sideCar:ez}))});j9.classNames=of.classNames;var iU="Popover",[R9]=s9(iU,[p9]),uc=p9(),[tz,hr]=R9(iU),D9=e=>{const{__scopePopover:t,children:n,open:a,defaultOpen:i,onOpenChange:r,modal:s=!1}=e,l=uc(t),c=S.useRef(null),[d,o]=S.useState(!1),[u=!1,h]=pF({prop:a,defaultProp:i,onChange:r});return f.jsx(lF,{...l,children:f.jsx(tz,{scope:t,contentId:q$(),triggerRef:c,open:u,onOpenChange:h,onOpenToggle:S.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:d,onCustomAnchorAdd:S.useCallback(()=>o(!0),[]),onCustomAnchorRemove:S.useCallback(()=>o(!1),[]),modal:s,children:n})})};D9.displayName=iU;var L9="PopoverAnchor",nz=S.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,i=hr(L9,n),r=uc(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return S.useEffect(()=>(s(),()=>l()),[s,l]),f.jsx(E9,{...r,...a,ref:t})});nz.displayName=L9;var P9="PopoverTrigger",N9=S.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,i=hr(P9,n),r=uc(n),s=fr(t,i.triggerRef),l=f.jsx(Ci.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":H9(i.open),...a,ref:s,onClick:Qi(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:f.jsx(E9,{asChild:!0,...r,children:l})});N9.displayName=P9;var rU="PopoverPortal",[az,iz]=R9(rU,{forceMount:void 0}),O9=e=>{const{__scopePopover:t,forceMount:n,children:a,container:i}=e,r=hr(rU,t);return f.jsx(az,{scope:t,forceMount:n,children:f.jsx(aU,{present:n||r.open,children:f.jsx(S9,{asChild:!0,container:i,children:a})})})};O9.displayName=rU;var il="PopoverContent",$9=S.forwardRef((e,t)=>{const n=iz(il,e.__scopePopover),{forceMount:a=n.forceMount,...i}=e,r=hr(il,e.__scopePopover);return f.jsx(aU,{present:a||r.open,children:r.modal?f.jsx(rz,{...i,ref:t}):f.jsx(sz,{...i,ref:t})})});$9.displayName=il;var rz=S.forwardRef((e,t)=>{const n=hr(il,e.__scopePopover),a=S.useRef(null),i=fr(t,a),r=S.useRef(!1);return S.useEffect(()=>{const s=a.current;if(s)return vF(s)},[]),f.jsx(j9,{as:eU,allowPinchZoom:!0,children:f.jsx(F9,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Qi(e.onCloseAutoFocus,s=>{s.preventDefault(),r.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Qi(e.onPointerDownOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;r.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:Qi(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),sz=S.forwardRef((e,t)=>{const n=hr(il,e.__scopePopover),a=S.useRef(!1),i=S.useRef(!1);return f.jsx(F9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{e.onCloseAutoFocus?.(r),r.defaultPrevented||(a.current||n.triggerRef.current?.focus(),r.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:r=>{e.onInteractOutside?.(r),r.defaultPrevented||(a.current=!0,r.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=r.target;n.triggerRef.current?.contains(s)&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&i.current&&r.preventDefault()}})}),F9=S.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:r,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:o,...u}=e,h=hr(il,n),p=uc(n);return z$(),f.jsx(d9,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:r,children:f.jsx(o9,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:f.jsx(oF,{"data-state":H9(h.open),role:"dialog",id:h.contentId,...p,...u,ref:t,style:{...u.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),z9="PopoverClose",lz=S.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,i=hr(z9,n);return f.jsx(Ci.button,{type:"button",...a,ref:t,onClick:Qi(e.onClick,()=>i.onOpenChange(!1))})});lz.displayName=z9;var oz="PopoverArrow",B9=S.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,i=uc(n);return f.jsx(cF,{...i,...a,ref:t})});B9.displayName=oz;function H9(e){return e?"open":"closed"}var cf=D9,df=N9,cz=O9,sU=$9,X9=B9,Th={exports:{}},b6;function dz(){return b6||(b6=1,(function(e,t){(function(){var n={};e.exports=n,n.simpleFilter=function(a,i){return i.filter(function(r){return n.test(a,r)})},n.test=function(a,i){return n.match(a,i)!==null},n.match=function(a,i,r){r=r||{};var s=0,l=[],c=i.length,d=0,o=0,u=r.pre||"",h=r.post||"",p=r.caseSensitive&&i||i.toLowerCase(),U;a=r.caseSensitive&&a||a.toLowerCase();for(var m=0;m<c;m++)U=i[m],p[m]===a[s]?(U=u+U+h,s+=1,o+=1+o):o=0,d+=o,l[l.length]=U;return s===a.length?(d=p===a?1/0:d,{rendered:l.join(""),score:d}):null},n.filter=function(a,i,r){return!i||i.length===0?[]:typeof a!="string"?i:(r=r||{},i.reduce(function(s,l,c,d){var o=l;r.extract&&(o=r.extract(l));var u=n.match(a,o,r);return u!=null&&(s[s.length]={string:u.rendered,score:u.score,index:c,original:l}),s},[]).sort(function(s,l){var c=l.score-s.score;return c||s.index-l.index}))}})()})(Th)),Th.exports}var uz=dz();const fz=Si(uz),hz={},v6=e=>{let t;const n=new Set,a=(o,u)=>{const h=typeof o=="function"?o(t):o;if(!Object.is(h,t)){const p=t;t=u??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(U=>U(t,p))}},i=()=>t,c={setState:a,getState:i,getInitialState:()=>d,subscribe:o=>(n.add(o),()=>n.delete(o)),destroy:()=>{(hz?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=t=e(a,i,c);return c},pz=e=>e?v6(e):v6,W9={},{useDebugValue:Uz}=Z,{useSyncExternalStoreWithSelector:mz}=Ww;let x6=!1;const gz=e=>e;function bz(e,t=gz,n){(W9?"production":void 0)!=="production"&&n&&!x6&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),x6=!0);const a=mz(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Uz(a),a}const y6=e=>{(W9?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?pz(e):e,n=(a,i)=>bz(t,a,i);return Object.assign(n,t),n},vz=e=>e?y6(e):y6;var w6,E6;const S6=typeof window<"u"&&((w6=window.document)!=null&&w6.createElement||((E6=window.navigator)==null?void 0:E6.product)==="ReactNative")?Z.useLayoutEffect:Z.useEffect;function Sa(){const e=vz(t=>({current:new Array,version:0,set:t}));return{In:({children:t})=>{const n=e(i=>i.set),a=e(i=>i.version);return S6(()=>{n(i=>({version:i.version+1}))},[]),S6(()=>(n(({current:i})=>({current:[...i,t]})),()=>n(({current:i})=>({current:i.filter(r=>r!==t)}))),[t,a]),null},Out:()=>{const t=e(n=>n.current);return Z.createElement(Z.Fragment,null,t)}}}function Ah(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function xz(e,t=[]){let n=[];function a(r,s){const l=S.createContext(s),c=n.length;n=[...n,s];function d(u){const{scope:h,children:p,...U}=u,m=h?.[e][c]||l,g=S.useMemo(()=>U,Object.values(U));return S.createElement(m.Provider,{value:g},p)}function o(u,h){const p=h?.[e][c]||l,U=S.useContext(p);if(U)return U;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${r}\``)}return d.displayName=r+"Provider",[d,o]}const i=()=>{const r=n.map(s=>S.createContext(s));return function(l){const c=l?.[e]||r;return S.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[a,yz(i,...t)]}function yz(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const s=a.reduce((l,{useScope:c,scopeName:d})=>{const u=c(r)[`__scope${d}`];return{...l,...u}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function $s(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function wz(e,t=[]){let n=[];function a(r,s){const l=S.createContext(s),c=n.length;n=[...n,s];function d(u){const{scope:h,children:p,...U}=u,m=h?.[e][c]||l,g=S.useMemo(()=>U,Object.values(U));return S.createElement(m.Provider,{value:g},p)}function o(u,h){const p=h?.[e][c]||l,U=S.useContext(p);if(U)return U;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${r}\``)}return d.displayName=r+"Provider",[d,o]}const i=()=>{const r=n.map(s=>S.createContext(s));return function(l){const c=l?.[e]||r;return S.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[a,Ez(i,...t)]}function Ez(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const s=a.reduce((l,{useScope:c,scopeName:d})=>{const u=c(r)[`__scope${d}`];return{...l,...u}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Sz(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function V9(...e){return t=>e.forEach(n=>Sz(n,t))}function k6(...e){return S.useCallback(V9(...e),e)}const n0=S.forwardRef((e,t)=>{const{children:n,...a}=e,i=S.Children.toArray(n),r=i.find(Cz);if(r){const s=r.props.children,l=i.map(c=>c===r?S.Children.count(s)>1?S.Children.only(null):S.isValidElement(s)?s.props.children:null:c);return S.createElement(a0,Pt({},a,{ref:t}),S.isValidElement(s)?S.cloneElement(s,void 0,l):null)}return S.createElement(a0,Pt({},a,{ref:t}),n)});n0.displayName="Slot";const a0=S.forwardRef((e,t)=>{const{children:n,...a}=e;return S.isValidElement(n)?S.cloneElement(n,{...Mz(a,n.props),ref:V9(t,n.ref)}):S.Children.count(n)>1?S.Children.only(null):null});a0.displayName="SlotClone";const kz=({children:e})=>S.createElement(S.Fragment,null,e);function Cz(e){return S.isValidElement(e)&&e.type===kz}function Mz(e,t){const n={...t};for(const a in t){const i=e[a],r=t[a];/^on[A-Z]/.test(a)?i&&r?n[a]=(...l)=>{r(...l),i(...l)}:i&&(n[a]=i):a==="style"?n[a]={...i,...r}:a==="className"&&(n[a]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}function Iz(e){const t=e+"CollectionProvider",[n,a]=wz(t),[i,r]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=p=>{const{scope:U,children:m}=p,g=Z.useRef(null),b=Z.useRef(new Map).current;return Z.createElement(i,{scope:U,itemMap:b,collectionRef:g},m)},l=e+"CollectionSlot",c=Z.forwardRef((p,U)=>{const{scope:m,children:g}=p,b=r(l,m),x=k6(U,b.collectionRef);return Z.createElement(n0,{ref:x},g)}),d=e+"CollectionItemSlot",o="data-radix-collection-item",u=Z.forwardRef((p,U)=>{const{scope:m,children:g,...b}=p,x=Z.useRef(null),v=k6(U,x),y=r(d,m);return Z.useEffect(()=>(y.itemMap.set(x,{ref:x,...b}),()=>{y.itemMap.delete(x)})),Z.createElement(n0,{[o]:"",ref:v},g)});function h(p){const U=r(e+"CollectionConsumer",p);return Z.useCallback(()=>{const g=U.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${o}]`));return Array.from(U.itemMap.values()).sort((y,w)=>b.indexOf(y.ref.current)-b.indexOf(w.ref.current))},[U.collectionRef,U.itemMap])}return[{Provider:s,Slot:c,ItemSlot:u},h,a]}function _z(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function G9(...e){return t=>e.forEach(n=>_z(n,t))}function Tz(...e){return S.useCallback(G9(...e),e)}function Az(e,t=[]){let n=[];function a(r,s){const l=S.createContext(s),c=n.length;n=[...n,s];function d(u){const{scope:h,children:p,...U}=u,m=h?.[e][c]||l,g=S.useMemo(()=>U,Object.values(U));return S.createElement(m.Provider,{value:g},p)}function o(u,h){const p=h?.[e][c]||l,U=S.useContext(p);if(U)return U;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${r}\``)}return d.displayName=r+"Provider",[d,o]}const i=()=>{const r=n.map(s=>S.createContext(s));return function(l){const c=l?.[e]||r;return S.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[a,jz(i,...t)]}function jz(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(r){const s=a.reduce((l,{useScope:c,scopeName:d})=>{const u=c(r)[`__scope${d}`];return{...l,...u}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const Rz=globalThis?.document?S.useLayoutEffect:()=>{},Dz=k0.useId||(()=>{});let Lz=0;function Pz(e){const[t,n]=S.useState(Dz());return Rz(()=>{n(a=>a??String(Lz++))},[e]),t?`radix-${t}`:""}const Y9=S.forwardRef((e,t)=>{const{children:n,...a}=e,i=S.Children.toArray(n),r=i.find(Oz);if(r){const s=r.props.children,l=i.map(c=>c===r?S.Children.count(s)>1?S.Children.only(null):S.isValidElement(s)?s.props.children:null:c);return S.createElement(i0,Pt({},a,{ref:t}),S.isValidElement(s)?S.cloneElement(s,void 0,l):null)}return S.createElement(i0,Pt({},a,{ref:t}),n)});Y9.displayName="Slot";const i0=S.forwardRef((e,t)=>{const{children:n,...a}=e;return S.isValidElement(n)?S.cloneElement(n,{...$z(a,n.props),ref:G9(t,n.ref)}):S.Children.count(n)>1?S.Children.only(null):null});i0.displayName="SlotClone";const Nz=({children:e})=>S.createElement(S.Fragment,null,e);function Oz(e){return S.isValidElement(e)&&e.type===Nz}function $z(e,t){const n={...t};for(const a in t){const i=e[a],r=t[a];/^on[A-Z]/.test(a)?i&&r?n[a]=(...l)=>{r(...l),i(...l)}:i&&(n[a]=i):a==="style"?n[a]={...i,...r}:a==="className"&&(n[a]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}const Fz=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],Z9=Fz.reduce((e,t)=>{const n=S.forwardRef((a,i)=>{const{asChild:r,...s}=a,l=r?Y9:t;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(l,Pt({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function lU(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var a;return(a=t.current)===null||a===void 0?void 0:a.call(t,...n)},[])}function zz({prop:e,defaultProp:t,onChange:n=()=>{}}){const[a,i]=Bz({defaultProp:t,onChange:n}),r=e!==void 0,s=r?e:a,l=lU(n),c=S.useCallback(d=>{if(r){const u=typeof d=="function"?d(e):d;u!==e&&l(u)}else i(d)},[r,e,i,l]);return[s,c]}function Bz({defaultProp:e,onChange:t}){const n=S.useState(e),[a]=n,i=S.useRef(a),r=lU(t);return S.useEffect(()=>{i.current!==a&&(r(a),i.current=a)},[a,i,r]),n}const Hz=S.createContext(void 0);function K9(e){const t=S.useContext(Hz);return e||t||"ltr"}const jh="rovingFocusGroup.onEntryFocus",Xz={bubbles:!1,cancelable:!0},oU="RovingFocusGroup",[r0,q9,Wz]=Iz(oU),[Vz,J9]=Az(oU,[Wz]),[Gz,Yz]=Vz(oU),Zz=S.forwardRef((e,t)=>S.createElement(r0.Provider,{scope:e.__scopeRovingFocusGroup},S.createElement(r0.Slot,{scope:e.__scopeRovingFocusGroup},S.createElement(Kz,Pt({},e,{ref:t}))))),Kz=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:i=!1,dir:r,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:d,...o}=e,u=S.useRef(null),h=Tz(t,u),p=K9(r),[U=null,m]=zz({prop:s,defaultProp:l,onChange:c}),[g,b]=S.useState(!1),x=lU(d),v=q9(n),y=S.useRef(!1),[w,k]=S.useState(0);return S.useEffect(()=>{const C=u.current;if(C)return C.addEventListener(jh,x),()=>C.removeEventListener(jh,x)},[x]),S.createElement(Gz,{scope:n,orientation:a,dir:p,loop:i,currentTabStopId:U,onItemFocus:S.useCallback(C=>m(C),[m]),onItemShiftTab:S.useCallback(()=>b(!0),[]),onFocusableItemAdd:S.useCallback(()=>k(C=>C+1),[]),onFocusableItemRemove:S.useCallback(()=>k(C=>C-1),[])},S.createElement(Z9.div,Pt({tabIndex:g||w===0?-1:0,"data-orientation":a},o,{ref:h,style:{outline:"none",...e.style},onMouseDown:$s(e.onMouseDown,()=>{y.current=!0}),onFocus:$s(e.onFocus,C=>{const I=!y.current;if(C.target===C.currentTarget&&I&&!g){const A=new CustomEvent(jh,Xz);if(C.currentTarget.dispatchEvent(A),!A.defaultPrevented){const _=v().filter(P=>P.focusable),T=_.find(P=>P.active),D=_.find(P=>P.id===U),F=[T,D,..._].filter(Boolean).map(P=>P.ref.current);Q9(F)}}y.current=!1}),onBlur:$s(e.onBlur,()=>b(!1))})))}),qz="RovingFocusGroupItem",Jz=S.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:i=!1,tabStopId:r,...s}=e,l=Pz(),c=r||l,d=Yz(qz,n),o=d.currentTabStopId===c,u=q9(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=d;return S.useEffect(()=>{if(a)return h(),()=>p()},[a,h,p]),S.createElement(r0.ItemSlot,{scope:n,id:c,focusable:a,active:i},S.createElement(Z9.span,Pt({tabIndex:o?0:-1,"data-orientation":d.orientation},s,{ref:t,onMouseDown:$s(e.onMouseDown,U=>{a?d.onItemFocus(c):U.preventDefault()}),onFocus:$s(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:$s(e.onKeyDown,U=>{if(U.key==="Tab"&&U.shiftKey){d.onItemShiftTab();return}if(U.target!==U.currentTarget)return;const m=tB(U,d.orientation,d.dir);if(m!==void 0){U.preventDefault();let b=u().filter(x=>x.focusable).map(x=>x.ref.current);if(m==="last")b.reverse();else if(m==="prev"||m==="next"){m==="prev"&&b.reverse();const x=b.indexOf(U.currentTarget);b=d.loop?nB(b,x+1):b.slice(x+1)}setTimeout(()=>Q9(b))}})})))}),Qz={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function eB(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function tB(e,t,n){const a=eB(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return Qz[a]}function Q9(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function nB(e,t){return e.map((n,a)=>e[(t+a)%e.length])}const aB=Zz,iB=Jz;function rB(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function sB(...e){return t=>e.forEach(n=>rB(n,t))}function lB(...e){return S.useCallback(sB(...e),e)}const C6=globalThis?.document?S.useLayoutEffect:()=>{};function oB(e,t){return S.useReducer((n,a)=>{const i=t[n][a];return i??n},e)}const ev=e=>{const{present:t,children:n}=e,a=cB(t),i=typeof n=="function"?n({present:a.isPresent}):S.Children.only(n),r=lB(a.ref,i.ref);return typeof n=="function"||a.isPresent?S.cloneElement(i,{ref:r}):null};ev.displayName="Presence";function cB(e){const[t,n]=S.useState(),a=S.useRef({}),i=S.useRef(e),r=S.useRef("none"),s=e?"mounted":"unmounted",[l,c]=oB(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const d=Bc(a.current);r.current=l==="mounted"?d:"none"},[l]),C6(()=>{const d=a.current,o=i.current;if(o!==e){const h=r.current,p=Bc(d);e?c("MOUNT"):p==="none"||d?.display==="none"?c("UNMOUNT"):c(o&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),C6(()=>{if(t){const d=u=>{const p=Bc(a.current).includes(u.animationName);u.target===t&&p&&Ft.flushSync(()=>c("ANIMATION_END"))},o=u=>{u.target===t&&(r.current=Bc(a.current))};return t.addEventListener("animationstart",o),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{t.removeEventListener("animationstart",o),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:S.useCallback(d=>{d&&(a.current=getComputedStyle(d)),n(d)},[])}}function Bc(e){return e?.animationName||"none"}function dB(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function uB(...e){return t=>e.forEach(n=>dB(n,t))}const tv=S.forwardRef((e,t)=>{const{children:n,...a}=e,i=S.Children.toArray(n),r=i.find(hB);if(r){const s=r.props.children,l=i.map(c=>c===r?S.Children.count(s)>1?S.Children.only(null):S.isValidElement(s)?s.props.children:null:c);return S.createElement(s0,Pt({},a,{ref:t}),S.isValidElement(s)?S.cloneElement(s,void 0,l):null)}return S.createElement(s0,Pt({},a,{ref:t}),n)});tv.displayName="Slot";const s0=S.forwardRef((e,t)=>{const{children:n,...a}=e;return S.isValidElement(n)?S.cloneElement(n,{...pB(a,n.props),ref:uB(t,n.ref)}):S.Children.count(n)>1?S.Children.only(null):null});s0.displayName="SlotClone";const fB=({children:e})=>S.createElement(S.Fragment,null,e);function hB(e){return S.isValidElement(e)&&e.type===fB}function pB(e,t){const n={...t};for(const a in t){const i=e[a],r=t[a];/^on[A-Z]/.test(a)?i&&r?n[a]=(...l)=>{r(...l),i(...l)}:i&&(n[a]=i):a==="style"?n[a]={...i,...r}:a==="className"&&(n[a]=[i,r].filter(Boolean).join(" "))}return{...e,...n}}const UB=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"],uf=UB.reduce((e,t)=>{const n=S.forwardRef((a,i)=>{const{asChild:r,...s}=a,l=r?tv:t;return S.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),S.createElement(l,Pt({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function nv(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var a;return(a=t.current)===null||a===void 0?void 0:a.call(t,...n)},[])}function mB({prop:e,defaultProp:t,onChange:n=()=>{}}){const[a,i]=gB({defaultProp:t,onChange:n}),r=e!==void 0,s=r?e:a,l=nv(n),c=S.useCallback(d=>{if(r){const u=typeof d=="function"?d(e):d;u!==e&&l(u)}else i(d)},[r,e,i,l]);return[s,c]}function gB({defaultProp:e,onChange:t}){const n=S.useState(e),[a]=n,i=S.useRef(a),r=nv(t);return S.useEffect(()=>{i.current!==a&&(r(a),i.current=a)},[a,i,r]),n}const bB=globalThis?.document?S.useLayoutEffect:()=>{},vB=k0.useId||(()=>{});let xB=0;function yB(e){const[t,n]=S.useState(vB());return bB(()=>{n(a=>a??String(xB++))},[e]),e||(t?`radix-${t}`:"")}const av="Tabs",[wB]=xz(av,[J9]),iv=J9(),[EB,cU]=wB(av),SB=S.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,onValueChange:i,defaultValue:r,orientation:s="horizontal",dir:l,activationMode:c="automatic",...d}=e,o=K9(l),[u,h]=mB({prop:a,onChange:i,defaultProp:r});return S.createElement(EB,{scope:n,baseId:yB(),value:u,onValueChange:h,orientation:s,dir:o,activationMode:c},S.createElement(uf.div,Pt({dir:o,"data-orientation":s},d,{ref:t})))}),kB="TabsList",CB=S.forwardRef((e,t)=>{const{__scopeTabs:n,loop:a=!0,...i}=e,r=cU(kB,n),s=iv(n);return S.createElement(aB,Pt({asChild:!0},s,{orientation:r.orientation,dir:r.dir,loop:a}),S.createElement(uf.div,Pt({role:"tablist","aria-orientation":r.orientation},i,{ref:t})))}),MB="TabsTrigger",IB=S.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,disabled:i=!1,...r}=e,s=cU(MB,n),l=iv(n),c=rv(s.baseId,a),d=sv(s.baseId,a),o=a===s.value;return S.createElement(iB,Pt({asChild:!0},l,{focusable:!i,active:o}),S.createElement(uf.button,Pt({type:"button",role:"tab","aria-selected":o,"aria-controls":d,"data-state":o?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c},r,{ref:t,onMouseDown:Ah(e.onMouseDown,u=>{!i&&u.button===0&&u.ctrlKey===!1?s.onValueChange(a):u.preventDefault()}),onKeyDown:Ah(e.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&s.onValueChange(a)}),onFocus:Ah(e.onFocus,()=>{const u=s.activationMode!=="manual";!o&&!i&&u&&s.onValueChange(a)})})))}),_B="TabsContent",TB=S.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,forceMount:i,children:r,...s}=e,l=cU(_B,n),c=rv(l.baseId,a),d=sv(l.baseId,a),o=a===l.value,u=S.useRef(o);return S.useEffect(()=>{const h=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(h)},[]),S.createElement(ev,{present:i||o},({present:h})=>S.createElement(uf.div,Pt({"data-state":o?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!h,id:d,tabIndex:0},s,{ref:t,style:{...e.style,animationDuration:u.current?"0s":void 0}}),h&&r))});function rv(e,t){return`${e}-trigger-${t}`}function sv(e,t){return`${e}-content-${t}`}const lv=SB,ov=CB,cv=IB,dv=TB;var Rh,M6;function AB(){if(M6)return Rh;M6=1;var e="Expected a function",t=NaN,n="[object Symbol]",a=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt,c=typeof Bi=="object"&&Bi&&Bi.Object===Object&&Bi,d=typeof self=="object"&&self&&self.Object===Object&&self,o=c||d||Function("return this")(),u=Object.prototype,h=u.toString,p=Math.max,U=Math.min,m=function(){return o.Date.now()};function g(w,k,C){var I,A,_,T,D,L,F=0,P=!1,O=!1,N=!0;if(typeof w!="function")throw new TypeError(e);k=y(k)||0,b(C)&&(P=!!C.leading,O="maxWait"in C,_=O?p(y(C.maxWait)||0,k):_,N="trailing"in C?!!C.trailing:N);function X(de){var me=I,Be=A;return I=A=void 0,F=de,T=w.apply(Be,me),T}function H(de){return F=de,D=setTimeout(le,k),P?X(de):T}function G(de){var me=de-L,Be=de-F,ye=k-me;return O?U(ye,_-Be):ye}function se(de){var me=de-L,Be=de-F;return L===void 0||me>=k||me<0||O&&Be>=_}function le(){var de=m();if(se(de))return Ie(de);D=setTimeout(le,G(de))}function Ie(de){return D=void 0,N&&I?X(de):(I=A=void 0,T)}function Qe(){D!==void 0&&clearTimeout(D),F=0,I=L=A=D=void 0}function rt(){return D===void 0?T:Ie(m())}function at(){var de=m(),me=se(de);if(I=arguments,A=this,L=de,me){if(D===void 0)return H(L);if(O)return D=setTimeout(le,k),X(L)}return D===void 0&&(D=setTimeout(le,k)),T}return at.cancel=Qe,at.flush=rt,at}function b(w){var k=typeof w;return!!w&&(k=="object"||k=="function")}function x(w){return!!w&&typeof w=="object"}function v(w){return typeof w=="symbol"||x(w)&&h.call(w)==n}function y(w){if(typeof w=="number")return w;if(v(w))return t;if(b(w)){var k=typeof w.valueOf=="function"?w.valueOf():w;w=b(k)?k+"":k}if(typeof w!="string")return w===0?w:+w;w=w.replace(a,"");var C=r.test(w);return C||s.test(w)?l(w.slice(2),C?2:8):i.test(w)?t:+w}return Rh=g,Rh}var jB=AB();const RB=Si(jB);function DB(e,t,n,a){Object.defineProperty(e,t,{get:n,set:a,enumerable:!0,configurable:!0})}var LB={};DB(LB,"LaserPointer",()=>pu);function vt([e,t,n],[a,i,r]){return[e+a,t+i,n+r]}function Yl([e,t,n],[a,i,r]){return[e-a,t-i,n-r]}function Ct([e,t,n],a){return[e*a,t*a,n*a]}function bs([e,t,n]){return[e/Math.sqrt(e**2+t**2),t/Math.sqrt(e**2+t**2),n]}function Kt([e,t,n],a){return[Math.cos(a)*e-Math.sin(a)*t,Math.sin(a)*e+Math.cos(a)*t,n]}function PB(e,t,n){return vt(e,Ct(Yl(t,e),n))}function I6(e,t,n){return Math.atan2(n[1]-e[1],n[0]-e[0])-Math.atan2(t[1]-e[1],t[0]-e[0])}function _6(e){return Math.atan2(Math.sin(e),Math.cos(e))}function T6([e,t]){return Math.sqrt(e**2+t**2)}function Fs([e,t],[n,a]){return Math.sqrt((n-e)**2+(a-t)**2)}function NB(e){if(e.length<2)return 0;let t=0;for(let n=1;n<=e.length-1;n++)t+=Fs(e[n-1],e[n]);return t+=Fs(e[e.length-2],e[e.length-1]),t}const OB=(e,t,n)=>Math.max(t,Math.min(n,e));function $B(e,t,n){const a=Fs(t,n);if(a===0)return Fs(e,t);const i=OB(((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/a**2,0,1),r=[t[0]+i*(n[0]-t[0]),t[1]+i*(n[1]-t[1]),e[2]];return Fs(r,e)}function hu(e,t){if(t===0||e.length<=2)return e;const n=e[0],a=e[e.length-1],[i,r]=e.reduce(([s,l],c,d)=>{const o=$B(c,n,a);return o>s?[o,d]:[s,l]},[0,-1]);if(i>=t){const s=e[r];return[...hu([n,...e.slice(1,r),s],t).slice(0,-1),s,...hu([s,...e.slice(r,-1),a],t).slice(1)]}else return[n,a]}const Fi=class Fi{constructor(t){this.originalPoints=[],this.stablePoints=[],this.tailPoints=[],this.isFresh=!0,this.options=Object.assign({},Fi.defaults,t)}get lastPoint(){return this.tailPoints[this.tailPoints.length-1]??this.stablePoints[this.stablePoints.length-1]}addPoint(t){const n=this.originalPoints[this.originalPoints.length-1];if(!(n&&n[0]===t[0]&&n[1]===t[1])){if(this.originalPoints.push(t),this.isFresh){this.isFresh=!1,this.stablePoints.push(t);return}this.options.streamline>0&&(t=PB(this.lastPoint,t,1-this.options.streamline)),this.tailPoints.push(t),NB(this.tailPoints)>Fi.constants.maxTailLength&&this.stabilizeTail()}}close(){this.stabilizeTail()}stabilizeTail(){if(this.options.simplify>0&&this.options.simplifyPhase=="tail")throw new Error("Not implemented yet");this.stablePoints.push(...this.tailPoints),this.tailPoints=[]}getSize(t,n,a,i,r){return(t??this.options.size)*this.options.sizeMapping({pressure:n,runningLength:r,currentIndex:a,totalLength:i})}getStrokeOutline(t){if(this.isFresh)return[];let n=[...this.stablePoints,...this.tailPoints];this.options.simplify>0&&this.options.simplifyPhase==="input"&&(n=hu(n,this.options.simplify));const a=n.length;if(a===0)return[];if(a===1){const C=n[0],I=this.getSize(t,C[2],0,a,0);if(I<.5)return[];const A=[];for(let _=0;_<=Math.PI*2;_+=Math.PI/16)A.push(vt(C,Ct(Kt([1,0,0],_),I)));return A.push(vt(C,Ct([1,0,0],this.getSize(t,C[2],0,a,0)))),A}if(a===2){const C=n[0],I=n[1],A=this.getSize(t,C[2],0,a,0),_=this.getSize(t,I[2],0,a,0);if(A<.5||_<.5)return[];const T=[],D=I6(C,[C[0],C[1]-100,C[2]],I);for(let L=D;L<=Math.PI+D;L+=Math.PI/16)T.push(vt(C,Ct(Kt([1,0,0],L),A)));for(let L=Math.PI+D;L<=Math.PI*2+D;L+=Math.PI/16)T.push(vt(I,Ct(Kt([1,0,0],L),_)));return T.push(T[0]),T}const i=[],r=[];let s=0,l=0,c=0,d=0;for(let C=1;C<a-1;C++){const I=n[C-1],A=n[C],_=n[C+1];let T=A[2];const D=Fs(I,A);d+=D,s=l+(D-l)*.2;const L=this.getSize(t,T,C,a,d);if(L===0){c=C+1;continue}const F=bs(Yl(I,A)),P=bs(Yl(_,A)),O=Kt(F,Math.PI/2),N=Kt(F,-Math.PI/2),X=Kt(P,Math.PI/2),H=Kt(P,-Math.PI/2),G=vt(A,Ct(O,L)),se=vt(A,Ct(N,L)),le=vt(A,Ct(X,L)),Ie=vt(A,Ct(H,L)),Qe=vt(O,H),rt=vt(N,X),at=vt(A,Ct(T6(Qe)===0?F:bs(Qe),L)),de=vt(A,Ct(T6(rt)===0?P:bs(rt),L)),me=_6(I6(A,I,_)),Be=Fi.constants.cornerDetectionMaxAngle/180*Math.PI*Fi.constants.cornerDetectionVariance(s);if(Math.abs(me)<Be){const ye=Math.abs(_6(Math.PI-me));if(ye===0)continue;if(me<0){r.push(se,de);for(let je=0;je<=ye;je+=ye/4)i.push(vt(A,Kt(Ct(O,L),je)));for(let je=ye;je>=0;je-=ye/4)r.push(vt(A,Kt(Ct(O,L),je)));r.push(de,le)}else{i.push(G,at);for(let je=0;je<=ye;je+=ye/4)r.push(vt(A,Kt(Ct(O,-L),-je)));for(let je=ye;je>=0;je-=ye/4)i.push(vt(A,Kt(Ct(O,-L),-je)));i.push(at,Ie)}}else i.push(at),r.push(de);l=s}if(c>=a-2)if(this.options.keepHead){const C=n[a-1],I=[];for(let A=0;A<=Math.PI*2;A+=Math.PI/16)I.push(vt(C,Ct(Kt([1,0,0],A),this.options.size)));return I.push(vt(C,Ct([1,0,0],this.options.size))),I}else return[];const o=n[c],u=n[c+1],h=n[a-2],p=n[a-1],U=bs(Yl(u,o)),m=bs(Yl(h,p)),g=Kt(U,-Math.PI/2),b=Kt(m,Math.PI/2),x=this.getSize(t,o[2],0,a,0),v=[],y=this.options.keepHead?this.options.size:this.getSize(t,h[2],a-2,a,d),w=[];if(x>1){for(let C=0;C<=Math.PI;C+=Math.PI/16)v.unshift(vt(o,Kt(Ct(g,x),-C)));v.unshift(vt(o,Ct(g,-x)))}else v.push(o);for(let C=0;C<=Math.PI*3;C+=Math.PI/16)w.push(vt(p,Kt(Ct(b,-y),-C)));const k=[...v,...i,...w.reverse(),...r.reverse()];return v.length>0&&k.push(v[0]),this.options.simplify>0&&this.options.simplifyPhase==="output"?hu(k,this.options.simplify):k}};Fi.defaults={size:2,streamline:.45,simplify:.1,simplifyPhase:"output",keepHead:!1,sizeMapping:()=>1},Fi.constants={cornerDetectionMaxAngle:75,cornerDetectionVariance:t=>t>35?.5:1,maxTailLength:50};let pu=Fi;var uv=i9(),{useAtom:gt,useSetAtom:ff,useAtomValue:fv,useStore:uZ}=uv,FB=uv.Provider,sa=Qp(),zB=Yw({"./locales/ar-SA.json":()=>ne(()=>import("./ar-SA-G6X2FPQ2-DJTj94ZY.js"),__vite__mapDeps([6,2,3]),import.meta.url),"./locales/az-AZ.json":()=>ne(()=>import("./az-AZ-76LH7QW2-1qnzBARG.js"),__vite__mapDeps([7,2,3]),import.meta.url),"./locales/bg-BG.json":()=>ne(()=>import("./bg-BG-XCXSNQG7-BIZ5IFAv.js"),__vite__mapDeps([8,2,3]),import.meta.url),"./locales/bn-BD.json":()=>ne(()=>import("./bn-BD-2XOGV67Q-DiYpgYAg.js"),__vite__mapDeps([9,2,3]),import.meta.url),"./locales/ca-ES.json":()=>ne(()=>import("./ca-ES-6MX7JW3Y-CV2JFVcm.js"),__vite__mapDeps([10,2,3]),import.meta.url),"./locales/cs-CZ.json":()=>ne(()=>import("./cs-CZ-2BRQDIVT-DgefxJv2.js"),__vite__mapDeps([11,2,3]),import.meta.url),"./locales/da-DK.json":()=>ne(()=>import("./da-DK-5WZEPLOC-CQeMoU_Y.js"),__vite__mapDeps([12,2,3]),import.meta.url),"./locales/de-DE.json":()=>ne(()=>import("./de-DE-XR44H4JA-Cm7XiExL.js"),__vite__mapDeps([13,2,3]),import.meta.url),"./locales/el-GR.json":()=>ne(()=>import("./el-GR-BZB4AONW-BKDtOlnf.js"),__vite__mapDeps([14,2,3]),import.meta.url),"./locales/en.json":()=>ne(()=>Promise.resolve().then(()=>nZ),void 0,import.meta.url),"./locales/es-ES.json":()=>ne(()=>import("./es-ES-U4NZUMDT-Blb_L7K-.js"),__vite__mapDeps([15,2,3]),import.meta.url),"./locales/eu-ES.json":()=>ne(()=>import("./eu-ES-A7QVB2H4-BZJBLMeO.js"),__vite__mapDeps([16,2,3]),import.meta.url),"./locales/fa-IR.json":()=>ne(()=>import("./fa-IR-HGAKTJCU-C8gu07sI.js"),__vite__mapDeps([17,2,3]),import.meta.url),"./locales/fi-FI.json":()=>ne(()=>import("./fi-FI-Z5N7JZ37-0j8c6s09.js"),__vite__mapDeps([18,2,3]),import.meta.url),"./locales/fr-FR.json":()=>ne(()=>import("./fr-FR-RHASNOE6-_cfaQNNq.js"),__vite__mapDeps([19,2,3]),import.meta.url),"./locales/gl-ES.json":()=>ne(()=>import("./gl-ES-HMX3MZ6V-GM5nrSrW.js"),__vite__mapDeps([20,2,3]),import.meta.url),"./locales/he-IL.json":()=>ne(()=>import("./he-IL-6SHJWFNN-DvBtF7-G.js"),__vite__mapDeps([21,2,3]),import.meta.url),"./locales/hi-IN.json":()=>ne(()=>import("./hi-IN-IWLTKZ5I-CNEB0-5K.js"),__vite__mapDeps([22,2,3]),import.meta.url),"./locales/hu-HU.json":()=>ne(()=>import("./hu-HU-A5ZG7DT2-BmzYfJwp.js"),__vite__mapDeps([23,2,3]),import.meta.url),"./locales/id-ID.json":()=>ne(()=>import("./id-ID-SAP4L64H-CGCjaOLU.js"),__vite__mapDeps([24,2,3]),import.meta.url),"./locales/it-IT.json":()=>ne(()=>import("./it-IT-JPQ66NNP-vK6cBs4I.js"),__vite__mapDeps([25,2,3]),import.meta.url),"./locales/ja-JP.json":()=>ne(()=>import("./ja-JP-DBVTYXUO-oUvELdsq.js"),__vite__mapDeps([26,2,3]),import.meta.url),"./locales/kaa.json":()=>ne(()=>import("./kaa-6HZHGXH3-39-zh5xR.js"),__vite__mapDeps([27,2,3]),import.meta.url),"./locales/kab-KAB.json":()=>ne(()=>import("./kab-KAB-ZGHBKWFO-DIwwJSlv.js"),__vite__mapDeps([28,2,3]),import.meta.url),"./locales/kk-KZ.json":()=>ne(()=>import("./kk-KZ-P5N5QNE5-jEG0G6v4.js"),__vite__mapDeps([29,2,3]),import.meta.url),"./locales/km-KH.json":()=>ne(()=>import("./km-KH-HSX4SM5Z-f0MtADYu.js"),__vite__mapDeps([30,2,3]),import.meta.url),"./locales/ko-KR.json":()=>ne(()=>import("./ko-KR-MTYHY66A-D0sjNbcb.js"),__vite__mapDeps([31,2,3]),import.meta.url),"./locales/ku-TR.json":()=>ne(()=>import("./ku-TR-6OUDTVRD-D_uqAOZU.js"),__vite__mapDeps([32,2,3]),import.meta.url),"./locales/lt-LT.json":()=>ne(()=>import("./lt-LT-XHIRWOB4-Ct0yC4CT.js"),__vite__mapDeps([33,2,3]),import.meta.url),"./locales/lv-LV.json":()=>ne(()=>import("./lv-LV-5QDEKY6T-nkNbPHg0.js"),__vite__mapDeps([34,2,3]),import.meta.url),"./locales/mr-IN.json":()=>ne(()=>import("./mr-IN-CRQNXWMA-B861rik7.js"),__vite__mapDeps([35,2,3]),import.meta.url),"./locales/my-MM.json":()=>ne(()=>import("./my-MM-5M5IBNSE-SOXg7PeE.js"),__vite__mapDeps([36,2,3]),import.meta.url),"./locales/nb-NO.json":()=>ne(()=>import("./nb-NO-T6EIAALU-D22gGzt7.js"),__vite__mapDeps([37,2,3]),import.meta.url),"./locales/nl-NL.json":()=>ne(()=>import("./nl-NL-IS3SIHDZ-CJxOBLb1.js"),__vite__mapDeps([38,2,3]),import.meta.url),"./locales/nn-NO.json":()=>ne(()=>import("./nn-NO-6E72VCQL-FGcbdlO3.js"),__vite__mapDeps([39,2,3]),import.meta.url),"./locales/oc-FR.json":()=>ne(()=>import("./oc-FR-POXYY2M6-s7Swo1Cu.js"),__vite__mapDeps([40,2,3]),import.meta.url),"./locales/pa-IN.json":()=>ne(()=>import("./pa-IN-N4M65BXN-DFJMREPh.js"),__vite__mapDeps([41,2,3]),import.meta.url),"./locales/percentages.json":()=>ne(()=>Promise.resolve().then(()=>aZ),void 0,import.meta.url),"./locales/pl-PL.json":()=>ne(()=>import("./pl-PL-T2D74RX3-uXVmB6im.js"),__vite__mapDeps([42,2,3]),import.meta.url),"./locales/pt-BR.json":()=>ne(()=>import("./pt-BR-5N22H2LF-8kdgECeZ.js"),__vite__mapDeps([43,2,3]),import.meta.url),"./locales/pt-PT.json":()=>ne(()=>import("./pt-PT-UZXXM6DQ-D4vr9vo6.js"),__vite__mapDeps([44,2,3]),import.meta.url),"./locales/ro-RO.json":()=>ne(()=>import("./ro-RO-JPDTUUEW-CztO0tWv.js"),__vite__mapDeps([45,2,3]),import.meta.url),"./locales/ru-RU.json":()=>ne(()=>import("./ru-RU-B4JR7IUQ-aVURliDr.js"),__vite__mapDeps([46,2,3]),import.meta.url),"./locales/si-LK.json":()=>ne(()=>import("./si-LK-N5RQ5JYF-B2KWtx6N.js"),__vite__mapDeps([47,2,3]),import.meta.url),"./locales/sk-SK.json":()=>ne(()=>import("./sk-SK-C5VTKIMK-DlRzLxRJ.js"),__vite__mapDeps([48,2,3]),import.meta.url),"./locales/sl-SI.json":()=>ne(()=>import("./sl-SI-NN7IZMDC-Ox8yiRTS.js"),__vite__mapDeps([49,2,3]),import.meta.url),"./locales/sv-SE.json":()=>ne(()=>import("./sv-SE-XGPEYMSR-CizFbLCT.js"),__vite__mapDeps([50,2,3]),import.meta.url),"./locales/ta-IN.json":()=>ne(()=>import("./ta-IN-2NMHFXQM-B66K2LEN.js"),__vite__mapDeps([51,2,3]),import.meta.url),"./locales/th-TH.json":()=>ne(()=>import("./th-TH-HPSO5L25-DvHt1SBY.js"),__vite__mapDeps([52,2,3]),import.meta.url),"./locales/tr-TR.json":()=>ne(()=>import("./tr-TR-DEFEU3FU-u0AuqRoD.js"),__vite__mapDeps([53,2,3]),import.meta.url),"./locales/uk-UA.json":()=>ne(()=>import("./uk-UA-QMV73CPH-IwAiPvJL.js"),__vite__mapDeps([54,2,3]),import.meta.url),"./locales/vi-VN.json":()=>ne(()=>import("./vi-VN-M7AON7JQ-Dh6Aj3f5.js"),__vite__mapDeps([55,2,3]),import.meta.url),"./locales/zh-CN.json":()=>ne(()=>import("./zh-CN-LNUGB5OW-BVXMa9T3.js"),__vite__mapDeps([56,2,3]),import.meta.url),"./locales/zh-HK.json":()=>ne(()=>import("./zh-HK-E62DVLB3-DYEIu92z.js"),__vite__mapDeps([57,2,3]),import.meta.url),"./locales/zh-TW.json":()=>ne(()=>import("./zh-TW-RAJ6MFWO-Dm9oSthu.js"),__vite__mapDeps([58,2,3]),import.meta.url)}),BB=85,ls={code:"en",label:"English"},hf=[ls,...[{code:"ar-SA",label:"العربية",rtl:!0},{code:"bg-BG",label:"Български"},{code:"ca-ES",label:"Català"},{code:"cs-CZ",label:"Česky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"Ελληνικά"},{code:"es-ES",label:"Español"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"فارسی",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Français"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"עברית",rtl:!0},{code:"hi-IN",label:"हिन्दी"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"日本語"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"Қазақ тілі"},{code:"ko-KR",label:"한국어"},{code:"ku-TR",label:"Kurdî"},{code:"lt-LT",label:"Lietuvių"},{code:"lv-LV",label:"Latviešu"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokmål"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"ਪੰਜਾਬੀ"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Português Brasileiro"},{code:"pt-PT",label:"Português"},{code:"ro-RO",label:"Română"},{code:"ru-RU",label:"Русский"},{code:"sk-SK",label:"Slovenčina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Slovenščina"},{code:"tr-TR",label:"Türkçe"},{code:"uk-UA",label:"Українська"},{code:"zh-CN",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"vi-VN",label:"Tiếng Việt"},{code:"mr-IN",label:"मराठी"}].filter(e=>q4[e.code]>=BB).sort((e,t)=>e.label>t.label?1:-1)],Uu="__test__";be.DEV&&hf.unshift({code:Uu,label:"test language"},{code:`${Uu}.rtl`,label:"test language (rtl)",rtl:!0});var Rs=ls,xd={},hv=async e=>{if(Rs=e,document.documentElement.dir=Rs.rtl?"rtl":"ltr",document.documentElement.lang=Rs.code,e.code.startsWith(Uu))xd={};else try{xd=await zB(`./locales/${Rs.code}.json`)}catch(t){console.error(`Failed to load language ${e.code}:`,t.message),xd=Jp}sa.set(pv,e.code)},Bo=()=>Rs,A6=(e,t)=>{for(let n=0;n<t.length;++n){let a=t[n];if(e[a]===void 0)return;e=e[a]}if(typeof e=="string")return e},M=(e,t,n)=>{if(Rs.code.startsWith(Uu))return`[[${t?`${e}(${JSON.stringify(t).slice(1,-1)})`:e}]]`;let a=e.split("."),i=A6(xd,a)||A6(Jp,a)||n;if(i===void 0){let r=`Can't find translation for ${e}`;return console.warn(r),""}if(t)for(let r in t)i=i.replace(`{{${r}}}`,String(t[r]));return i},pv=Xt(ls.code),Yt=()=>{let e=fv(pv);return{t:M,langCode:e}},HB=({size:e="1em",circleWidth:t=8,synchronized:n=!1,className:a=""})=>{let i=-(Z.useRef(Date.now()).current%1600);return f.jsx("div",{className:`Spinner ${a}`,children:f.jsx("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":n?`${i}ms`:0},children:f.jsx("circle",{cx:"50",cy:"50",r:50-t/2,strokeWidth:t,fill:"none",strokeMiterlimit:"10"})})})},wi=HB,Uv=({delay:e,theme:t})=>{let[n,a]=S.useState(!!e);return S.useEffect(()=>{if(!e)return;let i=setTimeout(()=>{a(!1)},e);return()=>clearTimeout(i)},[e]),n?null:f.jsxs("div",{className:te("LoadingMessage",{"LoadingMessage--dark":t===Ce.DARK}),children:[f.jsx("div",{children:f.jsx(wi,{})}),f.jsx("div",{className:"LoadingMessage-text",children:M("labels.loadingScene")})]})},XB=e=>{let[t,n]=S.useState(!0);return S.useEffect(()=>{let a=async()=>{await hv(i),n(!1)},i=hf.find(r=>r.code===e.langCode)||ls;a()},[e.langCode]),t?f.jsx(Uv,{theme:e.theme}):e.children},Me=Z.forwardRef(({size:e="medium",visible:t=!0,className:n="",...a},i)=>{let{id:r}=Ka(),s=Z.useRef(null);Z.useImperativeHandle(i,()=>s.current);let l=`ToolIcon_size_${e}`,[c,d]=S.useState(!1),o=S.useRef(!0),u=async p=>{let U="onClick"in a&&a.onClick?.(p);if(ec(U))try{d(!0),await U}catch(m){if(m instanceof Hu)console.warn(m);else throw m}finally{o.current&&d(!1)}};S.useEffect(()=>(o.current=!0,()=>{o.current=!1}),[]);let h=S.useRef(null);if(a.type==="button"||a.type==="icon"||a.type==="submit"){let p=a.type==="icon"?"button":a.type;return f.jsxs("button",{className:te("ToolIcon_type_button",l,n,t&&!a.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!a.hidden,"ToolIcon--selected":a.selected,"ToolIcon--plain":a.type==="icon"}),style:a.style,"data-testid":a["data-testid"],hidden:a.hidden,title:a.title,"aria-label":a["aria-label"],type:p,onClick:u,ref:s,disabled:c||a.isLoading||!!a.disabled,children:[(a.icon||a.label)&&f.jsxs("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!a.disabled,children:[a.icon||a.label,a.keyBindingLabel&&f.jsx("span",{className:"ToolIcon__keybinding",children:a.keyBindingLabel}),a.isLoading&&f.jsx(wi,{})]}),a.showAriaLabel&&f.jsxs("div",{className:"ToolIcon__label",children:[a["aria-label"]," ",c&&f.jsx(wi,{})]}),a.children]})}return f.jsxs("label",{className:te("ToolIcon",n),title:a.title,onPointerDown:p=>{h.current=p.pointerType||null,a.onPointerDown?.({pointerType:p.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{h.current=null})},children:[f.jsx("input",{className:`ToolIcon_type_radio ${l}`,type:"radio",name:a.name,"aria-label":a["aria-label"],"aria-keyshortcuts":a["aria-keyshortcuts"],"data-testid":a["data-testid"],id:`${r}-${a.id}`,onChange:()=>{a.onChange?.({pointerType:h.current})},checked:a.checked,ref:s}),f.jsxs("div",{className:"ToolIcon__icon",children:[a.icon,a.keyBindingLabel&&f.jsx("span",{className:"ToolIcon__keybinding",children:a.keyBindingLabel})]})]})});Me.displayName="ToolButton";var WB=(e,t,n)=>{let a=new Set(ve(e.filter(o=>ce(o)),t).map(o=>o.id)),i={},r=n.scene.getNonDeletedElementsMap(),s=new Set;for(let o of a){let u=Ga(e,o);for(let h of u)if(!s.has(h.id)){if(nt(h)){let p=Ht(h,r);p&&(i[p.id]=!0)}else i[h.id]=!0;s.add(h.id)}}let l=!0,c=e.map(o=>{if(t.selectedElementIds[o.id]){let u=nt(o)?Ht(o,r):null;return o.frameId&&a.has(o.frameId)?(l=!1,i[o.id]=!0,o):u?.frameId&&a.has(u?.frameId)?o:(o.boundElements&&o.boundElements.forEach(h=>{let p=n.scene.getNonDeletedElementsMap().get(h.id);p&&Q(p)&&(V(p,{startBinding:o.id===p.startBinding?.elementId?null:p.startBinding,endBinding:o.id===p.endBinding?.elementId?null:p.endBinding}),V(p,{points:p.points}))}),pe(o,{isDeleted:!0}))}return o.frameId&&a.has(o.frameId)?(l=!1,nt(o)||(i[o.id]=!0),pe(o,{frameId:null})):nt(o)&&t.selectedElementIds[o.containerId]?pe(o,{isDeleted:!0}):o}),d=t.editingGroupId;if(l&&t.editingGroupId){let o=tt(c,t.editingGroupId).filter(u=>!u.isDeleted);if(o.length>1)o[0]&&(i[o[0].id]=!0);else{d=null,o[0]&&(i[o[0].id]=!0);let u=o[0];if(u){let h=u.groupIds.findIndex(U=>U===t.editingGroupId),p=u.groupIds[h+1];if(p){let U=tt(c,p).filter(m=>!m.isDeleted);U.length>1&&(d=p,U.forEach(m=>{i[m.id]=!0}))}}}}return{elements:c,appState:{...t,...ln({selectedElementIds:i,editingGroupId:d},c,t,null)}}},j6=(e,t)=>{if(e.editingGroupId){let n=tt(Ve(t),e.editingGroupId);if(n.length)return{...e,selectedElementIds:{[n[0].id]:!0}}}return e},mv=Y({name:"deleteSelectedElements",label:"labels.delete",icon:Zr,trackEvent:{category:"element",action:"delete"},perform:(e,t,n,a)=>{if(t.editingLinearElement){let{elementId:s,selectedPointsIndices:l,startBindingElement:c,endBindingElement:d}=t.editingLinearElement,o=a.scene.getNonDeletedElementsMap(),u=J.getElement(s,o);if(!u||l==null)return!1;if(u.points.length<2){let p=e.map(m=>m.id===u.id?pe(m,{isDeleted:!0}):m),U=j6(t,p);return{elements:p,appState:{...U,editingLinearElement:null},captureUpdate:B.IMMEDIATELY}}let h={startBindingElement:l?.includes(0)?null:c,endBindingElement:l?.includes(u.points.length-1)?null:d};return J.deletePoints(u,l),{elements:e,appState:{...t,editingLinearElement:{...t.editingLinearElement,...h,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:B.IMMEDIATELY}}let{elements:i,appState:r}=WB(e,t,a);return N7(i,i.filter(s=>s.isDeleted)),r=j6(r,i),{elements:i,appState:{...r,activeTool:Et(t,{type:"selection"}),multiElement:null,activeEmbeddable:null},captureUpdate:_t(Ve(e),t)?B.IMMEDIATELY:B.EVENTUALLY}},keyTest:(e,t,n)=>(e.key===R.BACKSPACE||e.key===R.DELETE)&&!e[R.CTRL_OR_CMD],PanelComponent:({elements:e,appState:t,updateData:n})=>f.jsx(Me,{type:"button",icon:Zr,title:M("labels.delete"),"aria-label":M("labels.delete"),onClick:()=>n(null),visible:_t(Ve(e),t)})}),l0=(e,t)=>e.frameId===t||e.id===t,gv=(e,t,n)=>{let a=[],i=[],r=null,s=-1,l=oe(n||ve(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0}));for(;++s<e.length;){let c=e[s];l.get(c.id)?(i.length&&(a=a.concat(i),i=[]),a.push(s),r=s+1):c.isDeleted&&r===s?(r=s+1,i.push(s)):i=[]}return a},VB=e=>{let t=0;return e.reduce((n,a,i)=>(i>0&&e[i-1]!==a-1&&(t=++t),(n[t]||(n[t]=[])).push(a),n),[])},R6=(e,t,n)=>{if("containerId"in e&&e.containerId){let a=xi.getScene(e).getElement(e.containerId);if(a)return n==="left"?Math.min(t.indexOf(a),t.indexOf(e)):Math.max(t.indexOf(a),t.indexOf(e))}else{let a=e.boundElements?.find(i=>i.type!=="arrow")?.id;if(a){let i=xi.getScene(e).getElement(a);if(i)return n==="left"?Math.min(t.indexOf(i),t.indexOf(e)):Math.max(t.indexOf(i),t.indexOf(e))}}},GB=(e,t)=>{let n=-1,a=-1;return e.forEach((i,r)=>{l0(i,t)&&(n===-1&&(n=r),a=r)}),n===-1?[]:e.slice(n,a+1)},YB=(e,t,n,a,i)=>{let r=t[n],s=u=>u.isDeleted?!1:i?u.frameId===i:e.editingGroupId?u.groupIds.includes(e.editingGroupId):!0,l=a==="left"?Sr(t,u=>s(u),Math.max(0,n-1)):w8(t,u=>s(u),n+1),c=t[l];if(!c)return-1;if(e.editingGroupId){if(r?.groupIds.join("")===c?.groupIds.join(""))return R6(c,t,a)??l;if(!c?.groupIds.includes(e.editingGroupId))return-1}if(!i&&(c.frameId||ce(c))){let u=GB(t,c.frameId||c.id);return a==="left"?t.indexOf(u[0]):t.indexOf(u[u.length-1])}if(!c.groupIds.length)return R6(c,t,a)??l;let d=e.editingGroupId?c.groupIds[c.groupIds.indexOf(e.editingGroupId)-1]:c.groupIds[c.groupIds.length-1],o=tt(t,d);return o.length?a==="left"?t.indexOf(o[0]):t.indexOf(o[o.length-1]):l},bv=(e,t)=>t.reduce((n,a)=>{let i=e[a];return n.set(i.id,i),n},new Map),vv=(e,t,n)=>{let a=gv(e,t),i=bv(e,a),r=VB(a);n==="right"&&(r=r.reverse());let s=new Set(a.filter(l=>ce(e[l])).map(l=>e[l].id));return r.forEach((l,c)=>{let d=l[0],o=l[l.length-1],u=n==="left"?d:o,h=l.some(x=>{let v=e[x];return v.frameId&&s.has(v.frameId)})?null:e[u]?.frameId,p=YB(t,e,u,n,h);if(p===-1||u===p)return;let U=n==="left"?e.slice(0,p):e.slice(0,d),m=e.slice(d,o+1),g=n==="left"?e.slice(p,d):e.slice(o+1,p+1),b=n==="left"?e.slice(o+1):e.slice(p+1);e=n==="left"?[...U,...m,...g,...b]:[...U,...g,...m,...b]}),Wa(e,i),e},xv=(e,t,n,a,i)=>{let r=gv(e,t,i),s=bv(e,r),l=[],c,d;if(n==="left"){if(a)c=w8(e,U=>l0(U,a));else if(t.editingGroupId){let U=tt(e,t.editingGroupId);if(!U.length)return e;c=e.indexOf(U[0])}else c=0;d=r[r.length-1]}else{if(a)d=Sr(e,U=>l0(U,a));else if(t.editingGroupId){let U=tt(e,t.editingGroupId);if(!U.length)return e;d=e.indexOf(U[U.length-1])}else d=e.length-1;c=r[0]}c===-1&&(c=0);for(let U=c;U<d+1;U++)r.includes(U)||l.push(e[U]);let o=Array.from(s.values()),u=e.slice(0,c),h=e.slice(d+1),p=n==="left"?[...u,...o,...l,...h]:[...u,...l,...o,...h];return Wa(p,s),p};function yv(e,t,n,a){let i=oe(ve(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0})),r={regularElements:[],frameChildren:new Map},s=new Set;for(let d of e)i.has(d.id)&&ce(d)&&s.add(d.id);for(let d of e)if(i.has(d.id))if(ce(d)||d.frameId&&s.has(d.frameId))r.regularElements.push(d);else if(!d.frameId)r.regularElements.push(d);else{let o=r.frameChildren.get(d.frameId)||[];o.push(d),r.frameChildren.set(d.frameId,o)}let l=e,c=Array.from(r.frameChildren.entries());for(let[d,o]of c)l=a(e,t,n,d,o);return a(l,t,n,null,r.regularElements)}var ZB=(e,t)=>vv(e,t,"left"),KB=(e,t)=>vv(e,t,"right"),qB=(e,t)=>yv(e,t,"left",xv),JB=(e,t)=>yv(e,t,"right",xv),QB=Y({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:A2,trackEvent:{category:"element"},perform:(e,t)=>({elements:ZB(e,t),appState:t,captureUpdate:B.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[R.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Te.BRACKET_LEFT,PanelComponent:({updateData:e,appState:t})=>f.jsx("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${M("labels.sendBackward")} — ${W("CtrlOrCmd+[")}`,children:A2})}),eH=Y({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:T2,trackEvent:{category:"element"},perform:(e,t)=>({elements:KB(e,t),appState:t,captureUpdate:B.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[R.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Te.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:t})=>f.jsx("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${M("labels.bringForward")} — ${W("CtrlOrCmd+]")}`,children:T2})}),tH=Y({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:R2,trackEvent:{category:"element"},perform:(e,t)=>({elements:qB(e,t),appState:t,captureUpdate:B.IMMEDIATELY}),keyTest:e=>Fa?e[R.CTRL_OR_CMD]&&e.altKey&&e.code===Te.BRACKET_LEFT:e[R.CTRL_OR_CMD]&&e.shiftKey&&e.code===Te.BRACKET_LEFT,PanelComponent:({updateData:e,appState:t})=>f.jsx("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${M("labels.sendToBack")} — ${W(Fa?"CtrlOrCmd+Alt+[":"CtrlOrCmd+Shift+[")}`,children:R2})}),nH=Y({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:j2,trackEvent:{category:"element"},perform:(e,t)=>({elements:JB(e,t),appState:t,captureUpdate:B.IMMEDIATELY}),keyTest:e=>Fa?e[R.CTRL_OR_CMD]&&e.altKey&&e.code===Te.BRACKET_RIGHT:e[R.CTRL_OR_CMD]&&e.shiftKey&&e.code===Te.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:t})=>f.jsx("button",{type:"button",className:"zIndexButton",onClick:n=>e(null),title:`${M("labels.bringToFront")} — ${W(Fa?"CtrlOrCmd+Alt+]":"CtrlOrCmd+Shift+]")}`,children:j2})}),aH=Y({name:"selectAll",label:"labels.selectAll",icon:mT,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,t,n,a)=>{if(t.editingLinearElement)return!1;let i=e.filter(r=>!r.isDeleted&&!(q(r)&&r.containerId)&&!r.locked).reduce((r,s)=>(r[s.id]=!0,r),{});return{appState:{...t,...ln({editingGroupId:null,selectedElementIds:i},Ve(e),t,a),selectedLinearElement:Object.keys(i).length===1&&ue(e[0])?new J(e[0]):null},captureUpdate:B.IMMEDIATELY}},keyTest:e=>e[R.CTRL_OR_CMD]&&e.key===R.A}),iH=e=>{let t=e.slice(),n=new Set,a=r=>{let s=r[0]?.groupIds?.join(""),l=[r[0]],c=[];for(let d of r.slice(1))d.groupIds?.join("")===s?l.push(d):c.push(d);return c.length?[...l,...a(c)]:l},i=new Map;return t.forEach((r,s)=>{if(!i.has(r.id))if(r.groupIds?.length){let l=r.groupIds[r.groupIds.length-1],c=t.slice(s).filter(d=>{let o=d?.groupIds?.some(u=>u===l);return o&&i.set(d.id,!0),o});for(let d of a(c))n.add(d)}else n.add(r)}),n.size!==e.length?(console.error("normalizeGroupElementOrder: lost some elements... bailing!"),e):[...n]},rH=e=>{let t=mI(e),n=e.slice(),a=new Set;return n.forEach((i,r)=>{i&&(i.boundElements?.length?(a.add(i),n[r]=null,i.boundElements.forEach(s=>{let l=t.get(s.id);l&&s.type==="text"&&(a.add(l[0]),n[l[1]]=null)})):i.type==="text"&&i.containerId&&t.get(i.containerId)?.[0].boundElements?.find(s=>s.id===i.id)||(a.add(i),n[r]=null))}),a.size!==e.length?(console.error("normalizeBoundElementsOrder: lost some elements... bailing!"),e):[...a]},sH=e=>rH(iH(e)),lH=Y({name:"duplicateSelection",label:"labels.duplicateSelection",icon:w1,trackEvent:{category:"element"},perform:(e,t,n,a)=>{if(t.editingLinearElement)try{let r=J.duplicateSelectedPoints(t,a.scene.getNonDeletedElementsMap());return{elements:e,appState:r,captureUpdate:B.IMMEDIATELY}}catch{return!1}let i=oH(e,t);if(a.props.onDuplicate&&i.elements){let r=a.props.onDuplicate(i.elements,e);r&&(i.elements=r)}return{...i,captureUpdate:B.IMMEDIATELY}},keyTest:e=>e[R.CTRL_OR_CMD]&&e.key===R.D,PanelComponent:({elements:e,appState:t,updateData:n})=>f.jsx(Me,{type:"button",icon:w1,title:`${M("labels.duplicateSelection")} — ${W("CtrlOrCmd+D")}`,"aria-label":M("labels.duplicateSelection"),onClick:()=>n(null),visible:_t(Ve(e),t)})}),oH=(e,t)=>{let n=new Map,a=[],i=[],r=new Map,s=new Map,l=oe(e),c=m=>{let g=S2(m).reduce((b,x)=>{if(o.has(x.id))return b;o.set(x.id,!0);let v=a3(t.editingGroupId,n,x,{x:x.x+$d/2,y:x.y+$d/2});return o.set(v.id,!0),s.set(v.id,v),r.set(x.id,v.id),i.push(x),a.push(v),b.push(v),b},[]);return Array.isArray(m)?g:g[0]||null};e=sH(e);let d=oe(ve(e,t,{includeBoundTextElement:!0,includeElementsInFrames:!0})),o=new Map,u=e.slice(),h=(m,g)=>{nn(m!==-1,"targetIndex === -1 "),!(!Array.isArray(g)&&!g)&&u.splice(m+1,0,...S2(g))},p=new Set(e.filter(m=>d.has(m.id)&&ce(m)).map(m=>m.id));for(let m of e){if(o.has(m.id)||!d.has(m.id))continue;let g=B7(t,m);if(g){let b=tt(e,g).flatMap(v=>ce(v)?[...Ga(e,v.id),v]:[v]),x=Sr(u,v=>v.groupIds?.includes(g));h(x,c(b));continue}if(!(m.frameId&&p.has(m.frameId))){if(ce(m)){let b=m.id,x=Ga(e,b),v=Sr(u,y=>y.frameId===b||y.id===b);h(v,c([...x,m]));continue}if(Wn(m)){let b=ge(m,l),x=Sr(u,v=>v.id===m.id||"containerId"in v&&v.containerId===m.id);b?h(x,c([m,b])):h(x,c(m));continue}if(nt(m)){let b=Ht(m,l),x=Sr(u,v=>v.id===m.id||v.id===b?.id);b?h(x,c([b,m])):h(x,c(m));continue}h(Sr(u,b=>b.id===m.id),c(m))}}G7(u,i,r),P7(u,i,r),O3(u,i,r);let U=Fp(a);return{elements:u,appState:{...t,...ln({editingGroupId:t.editingGroupId,selectedElementIds:U.reduce((m,g)=>(nt(g)||(m[g.id]=!0),m),{})},Ve(u),t,null)}}},cH=new Set(["command_palette","export"]),qe=(e,t,n,a)=>{try{if(typeof window>"u"||be.VITE_WORKER_ID||be.VITE_APP_ENABLE_TRACKING!=="true"||!cH.has(e)||be.DEV)return;be.PROD||console.info("trackEvent",{category:e,action:t,label:n,value:a}),window.sa_event&&window.sa_event(t,{category:e,label:n,value:a})}catch(i){console.error("error during analytics",i)}},wv=S.forwardRef((e,t)=>{let{title:n,className:a,testId:i,active:r,standalone:s,icon:l,onClick:c}=e;return f.jsx("button",{type:"button",ref:t,title:n,"data-testid":i,className:te(a,{standalone:s,active:r}),onClick:c,children:l},n)}),Za=e=>f.jsx("div",{className:"buttonList",children:e.options.map(t=>e.type==="button"?f.jsx(wv,{icon:t.icon,title:t.text,testId:t.testId,active:t.active??e.value===t.value,onClick:n=>e.onClick(t.value,n)},t.text):f.jsxs("label",{className:te({active:e.value===t.value}),title:t.text,children:[f.jsx("input",{type:"radio",name:e.group,onChange:()=>e.onChange(t.value),checked:e.value===t.value,"data-testid":t.testId}),t.icon]},t.text))}),dH=({onChange:e,type:t,activeColor:n,topPicks:a})=>{let i;return t==="elementStroke"&&(i=t8),t==="elementBackground"&&(i=n8),t==="canvasBackground"&&(i=a8),a&&(i=a),i?f.jsx("div",{className:"color-picker__top-picks",children:i.map(r=>f.jsx("button",{className:te("color-picker__button",{active:r===n,"is-transparent":r==="transparent"||!r}),style:{"--swatch-color":r},type:"button",title:r,onClick:()=>e(r),"data-testid":`color-top-pick-${r}`,children:f.jsx("div",{className:"color-picker__button-outline"})},r))}):(console.error("Invalid type for TopPicks"),null)},Ev=()=>f.jsx("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}}),pf=({palette:e,color:t})=>{for(let[n,a]of Object.entries(e))if(Array.isArray(a)){let i=a.indexOf(t);if(i>-1)return{colorName:n,shade:i}}else if(a===t)return{colorName:n,shade:null};return null},o0=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),Sv=({color:e,palette:t})=>!Object.values(t).flat().includes(e),uH=(e,t,n)=>{let a={elementBackground:"backgroundColor",elementStroke:"strokeColor"},i=e.filter(s=>{if(s.isDeleted)return!1;let l=s[a[t]];return Sv({color:l,palette:n})}),r=new Map;return i.forEach(s=>{let l=s[a[t]];r.has(l)?r.set(l,r.get(l)+1):r.set(l,1)}),[...r.entries()].sort((s,l)=>l[1]-s[1]).map(s=>s[0]).slice(0,uM)},Ul=Xt(null),D6=(e,t,n)=>(e*299+t*587+n*114)/1e3>=160?"black":"white",fH=(e,t)=>{if(t){let r=new Option().style;if(r.color=e,r.color){let s=r.color.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),l=parseInt(s[0]),c=parseInt(s[1]),d=parseInt(s[2]);return D6(l,c,d)}}if(e==="transparent")return"black";let n=parseInt(e.substring(1,3),16),a=parseInt(e.substring(3,5),16),i=parseInt(e.substring(5,7),16);return D6(n,a,i)},hH=({color:e,keyLabel:t,isCustomColor:n=!1,isShade:a=!1})=>f.jsxs("div",{className:"color-picker__button__hotkey-label",style:{color:fH(e,n)},children:[a&&"⇧",t]}),dU=hH,pH=({hex:e,onChange:t,palette:n})=>{let a=pf({color:e||"transparent",palette:n}),[i,r]=gt(Ul),s=S.useRef(null);if(S.useEffect(()=>{s.current&&i==="shades"&&s.current.focus()},[a,i]),a){let{colorName:l,shade:c}=a,d=n[l];if(Array.isArray(d))return f.jsx("div",{className:"color-picker-content--default shades",children:d.map((o,u)=>f.jsxs("button",{ref:u===c&&i==="shades"?s:void 0,tabIndex:-1,type:"button",className:te("color-picker__button color-picker__button--large",{active:u===c}),"aria-label":"Shade",title:`${l} - ${u+1}`,style:o?{"--swatch-color":o}:void 0,onClick:()=>{t(o),r("shades")},children:[f.jsx("div",{className:"color-picker__button-outline"}),f.jsx(dU,{color:o,keyLabel:u+1,isShade:!0})]},u))})}return f.jsxs("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[f.jsx("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),f.jsx("div",{tabIndex:-1,style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"0.75rem"},children:M("colorPicker.noShades")})]})},UH=({palette:e,color:t,onChange:n,label:a,activeShade:i})=>{let r=pf({color:t||"transparent",palette:e}),[s,l]=gt(Ul),c=S.useRef(null);return S.useEffect(()=>{c.current&&s==="baseColors"&&c.current.focus()},[r?.colorName,s]),f.jsx("div",{className:"color-picker-content--default",children:Object.entries(e).map(([d,o],u)=>{let h=(Array.isArray(o)?o[i]:o)||"transparent",p=o0[u],U=M(`colors.${d.replace(/\d+/,"")}`,null,"");return f.jsxs("button",{ref:r?.colorName===d?c:void 0,tabIndex:-1,type:"button",className:te("color-picker__button color-picker__button--large",{active:r?.colorName===d,"is-transparent":h==="transparent"||!h}),onClick:()=>{n(h),l("baseColors")},title:`${U}${h.startsWith("#")?` ${h}`:""} — ${p}`,"aria-label":`${U} — ${p}`,style:{"--swatch-color":h},"data-testid":`color-${d}`,children:[f.jsx("div",{className:"color-picker__button-outline"}),f.jsx(dU,{color:h,keyLabel:p})]},d)})})},mH=UH,gH=({colors:e,color:t,onChange:n,label:a})=>{let[i,r]=gt(Ul),s=S.useRef(null);return S.useEffect(()=>{s.current&&s.current.focus()},[t,i]),f.jsx("div",{className:"color-picker-content--default",children:e.map((l,c)=>f.jsxs("button",{ref:t===l?s:void 0,tabIndex:-1,type:"button",className:te("color-picker__button color-picker__button--large",{active:t===l,"is-transparent":l==="transparent"||!l}),onClick:()=>{n(l),r("custom")},title:l,"aria-label":a,style:{"--swatch-color":l},children:[f.jsx("div",{className:"color-picker__button-outline"}),f.jsx(dU,{color:l,keyLabel:c+1,isCustomColor:!0})]},c))})},Dh=(e,t,n)=>{let a=Math.ceil(n/ws);switch(t=t??-1,e){case"ArrowLeft":{let i=t-1;return i<0?n-1:i}case"ArrowRight":return(t+1)%n;case"ArrowDown":{let i=t+ws;return i>=n?t%ws:i}case"ArrowUp":{let i=t-ws,r=i<0?ws*a+i:i;return r>=n?void 0:r}}},bH=({e,colorObj:t,onChange:n,palette:a,customColors:i,setActiveColorPickerSection:r,activeShade:s})=>{if(t?.shade!=null&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(e.code)&&e.shiftKey){let l=Number(e.code.slice(-1))-1;return n(a[t.colorName][l]),r("shades"),!0}if(["1","2","3","4","5"].includes(e.key)&&i[Number(e.key)-1])return n(i[Number(e.key)-1]),r("custom"),!0;if(o0.includes(e.key)){let l=o0.indexOf(e.key),c=Object.keys(a)[l],d=a[c],o=Array.isArray(d)?d[s]:d;return n(o),r("baseColors"),!0}return!1},vH=({event:e,activeColorPickerSection:t,palette:n,color:a,onChange:i,customColors:r,setActiveColorPickerSection:s,updateData:l,activeShade:c,onEyeDropperToggle:d,onEscape:o})=>{if(e[R.CTRL_OR_CMD])return!1;if(e.key===R.ESCAPE)return o(e),!0;if(e.key===R.ALT)return d(!0),!0;if(e.key===R.I)return d(),!0;let u=pf({color:a,palette:n});if(e.key===R.TAB){let h={custom:!!r.length,baseColors:!0,shades:u?.shade!=null,hex:!0},p=Object.entries(h).reduce((x,[v,y])=>(y&&x.push(v),x),[]),U=p.indexOf(t),m=e.shiftKey?-1:1,g=U+m>p.length-1?0:U+m<0?p.length-1:U+m,b=p[g];return b&&s(b),b==="custom"?i(r[0]):b==="baseColors"&&(Object.entries(n).find(([x,v])=>Array.isArray(v)?v.includes(a):v===a?x:null)||i(Ee.black)),e.preventDefault(),e.stopPropagation(),!0}if(bH({e,colorObj:u,onChange:i,palette:n,customColors:r,setActiveColorPickerSection:s,activeShade:c}))return!0;if(t==="shades"&&u){let{shade:h}=u,p=Dh(e.key,h,ws);if(p!==void 0)return i(n[u.colorName][p]),!0}if(t==="baseColors"&&u){let{colorName:h}=u,p=Object.keys(n),U=p.indexOf(h),m=Dh(e.key,U,p.length);if(m!==void 0){let g=p[m],b=n[g];return i(Array.isArray(b)?b[c]:b),!0}}if(t==="custom"){let h=r.indexOf(a),p=Dh(e.key,h,r.length);if(p!==void 0){let U=r[p];return i(U),!0}}return!1},xH=({children:e})=>f.jsx("div",{className:"color-picker__heading",children:e}),yd=xH,yH=({color:e,onChange:t,label:n,type:a,elements:i,palette:r,updateData:s,children:l,onEyeDropperToggle:c,onEscape:d})=>{let[o]=Z.useState(()=>a==="canvasBackground"?[]:uH(i,a,r)),[u,h]=gt(Ul),p=pf({color:e,palette:r});S.useEffect(()=>{if(!u){let b=Sv({color:e,palette:r}),x=b&&!o.includes(e);h(x?"hex":b?"custom":p?.shade!=null?"shades":"baseColors")}},[u,e,r,h,p,o]);let[U,m]=S.useState(p?.shade??(a==="elementBackground"?Bl:zl));S.useEffect(()=>{p?.shade!=null&&m(p.shade);let b=x=>{x.key===R.ALT&&c(!1)};return document.addEventListener("keyup",b,{capture:!0}),()=>{document.removeEventListener("keyup",b,{capture:!0})}},[p,c]);let g=Z.useRef(null);return f.jsx("div",{role:"dialog","aria-modal":"true","aria-label":M("labels.colorPicker"),children:f.jsxs("div",{ref:g,onKeyDown:b=>{vH({event:b,activeColorPickerSection:u,palette:r,color:e,onChange:t,onEyeDropperToggle:c,customColors:o,setActiveColorPickerSection:h,updateData:s,activeShade:U,onEscape:d})&&(b.preventDefault(),b.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[!!o.length&&f.jsxs("div",{children:[f.jsx(yd,{children:M("colorPicker.mostUsedCustomColors")}),f.jsx(gH,{colors:o,color:e,label:M("colorPicker.mostUsedCustomColors"),onChange:t})]}),f.jsxs("div",{children:[f.jsx(yd,{children:M("colorPicker.colors")}),f.jsx(mH,{color:e,label:n,palette:r,onChange:t,activeShade:U})]}),f.jsxs("div",{children:[f.jsx(yd,{children:M("colorPicker.shades")}),f.jsx(pH,{hex:e,onChange:t,palette:r})]}),l]})})},kv=Z.createContext(null),Zt=()=>Z.useContext(kv),Cv=e=>{let[t,n]=S.useState(null),a=Tt(),{theme:i}=Zt(),{container:r}=Ka();return S.useLayoutEffect(()=>{t&&(t.className="",t.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),t.classList.toggle("excalidraw--mobile",a.editor.isMobile),t.classList.toggle("theme--dark",i===Ce.DARK))},[t,i,a.editor.isMobile,e?.className]),S.useLayoutEffect(()=>{let s=e?.parentSelector?r?.querySelector(e.parentSelector):document.body;if(!s)return;let l=document.createElement("div");return s.appendChild(l),n(l),()=>{s.removeChild(l)}},[r,e?.parentSelector]),t};function uU(e,t,n){S.useEffect(()=>{function a(i){let r=i;if(!e.current)return;let s=n?.(r,e.current);if(s!==!0){if(s===!1)return t(r);e.current.contains(r.target)||!document.documentElement.contains(r.target)||r.target.closest("[data-radix-portal]")||r.target===document.documentElement&&document.body.style.pointerEvents==="none"||r.target.closest("[data-prevent-outside-click]")||t(r)}}return document.addEventListener("pointerdown",a),document.addEventListener("touchstart",a),()=>{document.removeEventListener("pointerdown",a),document.removeEventListener("touchstart",a)}},[e,t,n])}var Uf=e=>{let t=S.useRef(e);return Object.assign(t.current,e),t.current},mf=Xt(null),wH=({onCancel:e,onChange:t,onSelect:n,colorPickerType:a})=>{let i=Cv({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),r=Zt(),s=Sf(),l=va(),c=ve(s,r),d=Uf({app:l,onCancel:e,onChange:t,onSelect:n,selectedElements:c}),{container:o}=Ka();S.useEffect(()=>{let h=u.current;if(!h||!l.canvas||!i)return;let p=!1,U=l.canvas.getContext("2d"),m=({clientX:k,clientY:C})=>{let I=U.getImageData((k-r.offsetLeft)*window.devicePixelRatio,(C-r.offsetTop)*window.devicePixelRatio,1,1).data;return mM(I[0],I[1],I[2])},g=({clientX:k,clientY:C,altKey:I})=>{h.style.top=`${C+20}px`,h.style.left=`${k+20}px`;let A=m({clientX:k,clientY:C});p&&d.onChange(a,A,d.selectedElements,{altKey:I}),h.style.background=A},b=()=>{d.onCancel()},x=(k,C)=>{d.onSelect(k,C)},v=k=>{p=!0,k.stopImmediatePropagation()},y=k=>{p=!1,o?.focus(),k.stopImmediatePropagation(),k.preventDefault(),x(m(k),k)},w=k=>{k.key===R.ESCAPE&&(k.preventDefault(),k.stopImmediatePropagation(),b())};return i.tabIndex=-1,i.focus(),g({clientX:d.app.lastViewportPosition.x,clientY:d.app.lastViewportPosition.y,altKey:!1}),i.addEventListener("keydown",w),i.addEventListener("pointerdown",v),i.addEventListener("pointerup",y),window.addEventListener("pointermove",g,{passive:!0}),window.addEventListener("blur",b),()=>{p=!1,i.removeEventListener("keydown",w),i.removeEventListener("pointerdown",v),i.removeEventListener("pointerup",y),window.removeEventListener("pointermove",g),window.removeEventListener("blur",b)}},[d,l.canvas,i,a,o,r.offsetLeft,r.offsetTop]);let u=S.useRef(null);return uU(u,()=>{e()},h=>!!h.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),i?Ft.createPortal(f.jsx("div",{ref:u,className:"excalidraw-eye-dropper-preview"}),i):null},EH=({color:e,onChange:t,label:n,colorPickerType:a})=>{let i=Tt(),[r,s]=S.useState(e),[l,c]=gt(Ul);S.useEffect(()=>{s(e)},[e]);let d=S.useCallback(U=>{let m=U.toLowerCase(),g=SH(m);g&&t(g),s(m)},[t]),o=S.useRef(null),u=S.useRef(null);S.useEffect(()=>{o.current&&o.current.focus()},[l]);let[h,p]=gt(mf);return S.useEffect(()=>()=>{p(null)},[p]),f.jsxs("div",{className:"color-picker__input-label",children:[f.jsx("div",{className:"color-picker__input-hash",children:"#"}),f.jsx("input",{ref:l==="hex"?o:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":n,onChange:U=>{d(U.target.value)},value:(r||"").replace(/^#/,""),onBlur:()=>{s(e)},tabIndex:-1,onFocus:()=>c("hex"),onKeyDown:U=>{U.key!==R.TAB&&(U.key===R.ESCAPE&&u.current?.focus(),U.stopPropagation())}}),!i.editor.isMobile&&f.jsxs(f.Fragment,{children:[f.jsx("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),f.jsx("div",{ref:u,className:te("excalidraw-eye-dropper-trigger",{selected:h}),onClick:()=>p(U=>U?null:{keepOpenOnAlt:!1,onSelect:m=>t(m),colorPickerType:a}),title:`${M("labels.eyeDropper")} — ${R.I.toLocaleUpperCase()} or ${W("Alt")} `,children:lT})]})]})},ua=Z.forwardRef(({children:e,padding:t,className:n,style:a},i)=>f.jsx("div",{className:te("Island",n),style:{"--padding":t,...a},ref:i,children:e})),Mv=Z.forwardRef(({className:e,container:t,children:n,style:a,onClose:i,onKeyDown:r,onFocusOutside:s,onPointerLeave:l,onPointerDownOutside:c},d)=>{let o=Tt();return f.jsx(cz,{container:t,children:f.jsxs(sU,{ref:d,className:te("focus-visible-none",e),"data-prevent-outside-click":!0,side:o.editor.isMobile&&!o.viewport.isLandscape?"bottom":"right",align:o.editor.isMobile&&!o.viewport.isLandscape?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:"var(--zIndex-popup)"},onPointerLeave:l,onKeyDown:r,onFocusOutside:s,onPointerDownOutside:c,onCloseAutoFocus:u=>{u.stopPropagation(),u.preventDefault(),t&&!sI(document.activeElement)&&t.focus(),i()},children:[f.jsx(ua,{padding:3,style:a,children:n}),f.jsx(X9,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})}),L6=e=>{let t=new Option().style;return t.color=e,!!t.color},SH=e=>ia(e)?e:L6(`#${e}`)?`#${e}`:L6(e)?e:null,kH=({type:e,color:t,onChange:n,label:a,elements:i,palette:r=Ee,updateData:s})=>{let{container:l}=Ka(),[,c]=gt(Ul),[d,o]=gt(mf),u=f.jsxs("div",{children:[f.jsx(yd,{children:M("colorPicker.hexCode")}),f.jsx(EH,{color:t,label:a,onChange:U=>{n(U)},colorPickerType:e})]}),h=S.useRef(null),p=()=>{h.current?.querySelector(".color-picker-content")?.focus()};return f.jsx(Mv,{container:l,style:{maxWidth:"13rem"},onFocusOutside:U=>{p(),U.preventDefault()},onPointerDownOutside:U=>{d&&U.preventDefault()},onClose:()=>{s({openPopup:null}),c(null)},children:r?f.jsx(yH,{palette:r,color:t,onChange:U=>{n(U)},onEyeDropperToggle:U=>{o(m=>U?(m=m||{keepOpenOnAlt:!0,onSelect:n,colorPickerType:e},m.keepOpenOnAlt=!0,m):U===!1||m?null:{keepOpenOnAlt:!1,onSelect:n,colorPickerType:e})},onEscape:U=>{d?o(null):s({openPopup:null})},label:a,type:e,elements:i,updateData:s,children:u}):u})},CH=({label:e,color:t,type:n})=>f.jsx(df,{type:"button",className:te("color-picker__button active-color properties-trigger",{"is-transparent":t==="transparent"||!t}),"aria-label":e,style:t?{"--swatch-color":t}:void 0,title:M(n==="elementStroke"?"labels.showStroke":"labels.showBackground"),children:f.jsx("div",{className:"color-picker__button-outline"})}),fU=({type:e,color:t,onChange:n,label:a,elements:i,palette:r=Ee,topPicks:s,updateData:l,appState:c})=>f.jsx("div",{children:f.jsxs("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[f.jsx(dH,{activeColor:t,onChange:n,type:e,topPicks:s}),f.jsx(Ev,{}),f.jsxs(cf,{open:c.openPopup===e,onOpenChange:d=>{l({openPopup:d?e:null})},children:[f.jsx(CH,{color:t,label:a,type:e}),c.openPopup===e&&f.jsx(kH,{type:e,color:t,onChange:n,label:a,elements:i,palette:r,updateData:l})]})]})}),gf=({icon:e})=>f.jsx("span",{style:{width:"1em",margin:"0 0.5ex 0 0.5ex",display:"inline-block",lineHeight:0,verticalAlign:"middle"},children:e}),MH=({label:e,open:t,openTrigger:n,children:a,className:i})=>f.jsxs(f.Fragment,{children:[f.jsxs("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center"},className:i,onClick:n,children:[e,f.jsx(gf,{icon:t?AT:J8})]}),t&&f.jsx("div",{style:{display:"flex",flexDirection:"column"},children:a})]}),c0=MH,IH=Xt(!1);function _H({options:e,value:t,label:n,onChange:a,onClose:i,numberOfOptionsToAlwaysShow:r=e.length}){let s=Tt(),l=p=>{let U=e.find(m=>m.keyBinding===p.key.toLowerCase());if(!(p.metaKey||p.altKey||p.ctrlKey)&&U)a(U.value),p.preventDefault();else if(p.key===R.TAB){let m=e.findIndex(b=>b.value===t),g=p.shiftKey?(e.length+m-1)%e.length:(m+1)%e.length;a(e[g].value)}else if(Hl(p.key)){let m=Bo().rtl,g=e.findIndex(b=>b.value===t);if(g!==-1){let b=e.length,x=g;switch(p.key){case(m?R.ARROW_LEFT:R.ARROW_RIGHT):x=(g+1)%b;break;case(m?R.ARROW_RIGHT:R.ARROW_LEFT):x=(b+g-1)%b;break;case R.ARROW_DOWN:{x=(g+(r??1))%b;break}case R.ARROW_UP:{x=(b+g-(r??1))%b;break}}a(e[x].value)}p.preventDefault()}else(p.key===R.ESCAPE||p.key===R.ENTER)&&(p.preventDefault(),i());p.nativeEvent.stopImmediatePropagation(),p.stopPropagation()},[c,d]=gt(IH),o=Z.useMemo(()=>e.slice(0,r),[e,r]),u=Z.useMemo(()=>e.slice(r),[e,r]);S.useEffect(()=>{o.some(p=>p.value===t)||d(!0)},[t,o,d]);let h=p=>f.jsx("div",{className:"picker-content",children:p.map((U,m)=>f.jsxs("button",{type:"button",className:te("picker-option",{active:t===U.value}),onClick:g=>{a(U.value)},title:`${U.text} ${U.keyBinding&&`— ${U.keyBinding.toUpperCase()}`}`,"aria-label":U.text||"none","aria-keyshortcuts":U.keyBinding||void 0,ref:g=>{t===U.value&&setTimeout(()=>{g?.focus()},0)},children:[U.icon,U.keyBinding&&f.jsx("span",{className:"picker-keybinding",children:U.keyBinding})]},U.text))});return f.jsx(sU,{side:s.editor.isMobile&&!s.viewport.isLandscape?"top":"bottom",align:"start",sideOffset:12,style:{zIndex:"var(--zIndex-popup)"},onKeyDown:l,children:f.jsxs("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":n,children:[h(o),u.length>0&&f.jsx(c0,{label:M("labels.more_options"),open:c,openTrigger:()=>{d(p=>!p)},className:"picker-collapsible",children:h(u)})]})})}function P6({value:e,label:t,options:n,onChange:a,group:i="",numberOfOptionsToAlwaysShow:r}){let[s,l]=Z.useState(!1),c=Z.useRef(null);return f.jsx("div",{children:f.jsxs(cf,{open:s,onOpenChange:d=>l(d),children:[f.jsx(df,{name:i,type:"button","aria-label":t,onClick:()=>l(!s),ref:c,className:s?"active":"",children:n.find(d=>d.value===e)?.icon}),s&&f.jsx(_H,{options:n,value:e,label:t,onChange:a,onClose:()=>{l(!1)},numberOfOptionsToAlwaysShow:r})]})})}var Iv=Z.forwardRef(({className:e,placeholder:t,onChange:n},a)=>f.jsxs("div",{className:te("QuickSearch__wrapper",e),children:[Kr,f.jsx("input",{ref:a,className:"QuickSearch__input",type:"text",placeholder:t,onChange:i=>n(i.target.value.trim().toLowerCase())})]})),_v=({className:e,placeholder:t,children:n})=>{let a=!S.Children.count(n);return f.jsx("div",{className:te("ScrollableList__wrapper",e),role:"menu",children:a?f.jsx("div",{className:"empty",children:t}):n})},Tv=({children:e,className:t="",style:n,title:a})=>f.jsxs("div",{className:`dropdown-menu-group ${t}`,style:n,children:[a&&f.jsx("p",{className:"dropdown-menu-group-title",children:a}),e]}),d0=Tv;Tv.displayName="DropdownMenuGroup";var Av=Z.createContext({}),jv=(e="",t=!1,n=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
|
|
93
93
|
${t?"dropdown-menu-item--selected":""} ${n?"dropdown-menu-item--hovered":""}`.trim(),Rv=(e,t)=>{let n=S.useContext(Av);return Ou(e,a=>{let i=new CustomEvent("menu.itemSelect",{bubbles:!0,cancelable:!0});t?.(i),i.defaultPrevented||n.onSelect?.(i)})},TH=({textStyle:e,icon:t,shortcut:n,children:a})=>{let i=Tt();return f.jsxs(f.Fragment,{children:[t&&f.jsx("div",{className:"dropdown-menu-item__icon",children:t}),f.jsx("div",{style:e,className:"dropdown-menu-item__text",children:a}),n&&!i.editor.isMobile&&f.jsx("div",{className:"dropdown-menu-item__shortcut",children:n})]})},Dv=TH,hU=({icon:e,value:t,order:n,children:a,shortcut:i,className:r,hovered:s,selected:l,textStyle:c,onSelect:d,onClick:o,...u})=>{let h=Rv(o,d),p=S.useRef(null);return S.useEffect(()=>{s&&(n===0?p.current?.scrollIntoView({block:"end"}):p.current?.scrollIntoView({block:"nearest"}))},[s,n]),f.jsx("button",{...u,ref:p,value:t,onClick:h,className:jv(r,l,s),title:u.title??u["aria-label"],children:f.jsx(Dv,{textStyle:c,icon:e,shortcut:i,children:a})})};hU.displayName="DropdownMenuItem";var Zl={GREEN:"green",RED:"red",BLUE:"blue"},pU=({type:e=Zl.BLUE,children:t})=>{let{theme:n}=Uc(),a={display:"inline-flex",marginLeft:"auto",padding:"2px 4px",borderRadius:6,fontSize:9,fontFamily:"Cascadia, monospace",border:n===Ce.LIGHT?"1.5px solid white":"none"};switch(e){case Zl.GREEN:Object.assign(a,{backgroundColor:"var(--background-color-badge)",color:"var(--color-badge)"});break;case Zl.RED:Object.assign(a,{backgroundColor:"pink",color:"darkred"});break;case Zl.BLUE:default:Object.assign(a,{background:"var(--color-promo)",color:"var(--color-surface-lowest)"})}return f.jsx("div",{className:"DropDownMenuItemBadge",style:a,children:t})};pU.displayName="DropdownMenuItemBadge";hU.Badge=pU;var Gn=hU,AH=({event:e,inputRef:t,hoveredFont:n,filteredFonts:a,onClose:i,onSelect:r,onHover:s})=>{if(!e[R.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===R.F)return t.current?.focus(),!0;if(e.key===R.ESCAPE)return i(),!0;if(e.key===R.ENTER)return n?.value&&r(n.value),!0;if(e.key===R.ARROW_DOWN)return n?.next?s(n.next.value):a[0]?.value&&s(a[0].value),!0;if(e.key===R.ARROW_UP)return n?.prev?s(n.prev.value):a[a.length-1]?.value&&s(a[a.length-1].value),!0},jH=Z.memo(({selectedFontFamily:e,hoveredFontFamily:t,onSelect:n,onHover:a,onLeave:i,onOpen:r,onClose:s})=>{let{container:l}=Ka(),{fonts:c}=va(),{showDeprecatedFonts:d}=pc(),[o,u]=S.useState(""),h=S.useRef(null),p=S.useMemo(()=>Array.from(ui.registered.entries()).filter(([I,{metadata:A}])=>!A.serverSide&&!A.fallback).map(([I,{metadata:A,fontFaces:_}])=>{let T={value:I,icon:A.icon??Zd,text:_[0]?.fontFace?.family??"Unknown"};return A.deprecated&&Object.assign(T,{deprecated:A.deprecated,badge:{type:Zl.RED,placeholder:M("fontList.badge.old")}}),T}).sort((I,A)=>I.text.toLowerCase()>A.text.toLowerCase()?1:-1),[]),U=S.useMemo(()=>new Set(c.getSceneFamilies()),[e]),m=S.useMemo(()=>p.filter(I=>U.has(I.value)),[p,U]),g=S.useMemo(()=>p.filter(I=>!U.has(I.value)&&(d||!I.deprecated)),[p,U,d]),b=S.useMemo(()=>gI([...m,...g].filter(I=>I.text?.toLowerCase().includes(o))),[m,g,o]),x=S.useMemo(()=>{let I;return t?I=b.find(A=>A.value===t):e&&(I=b.find(A=>A.value===e)),!I&&o&&(b[0]?.value?a(b[0].value):i()),I},[t,e,o,b,a,i]),v=S.useCallback(I=>{AH({event:I,inputRef:h,hoveredFont:x,filteredFonts:b,onSelect:n,onHover:a,onClose:s})&&(I.preventDefault(),I.stopPropagation())},[x,b,n,a,s]);S.useEffect(()=>(r(),()=>{s()}),[]);let y=S.useMemo(()=>b.filter(I=>U.has(I.value)),[b,U]),w=S.useMemo(()=>b.filter(I=>!U.has(I.value)),[b,U]),k=(I,A)=>f.jsxs(Gn,{icon:I.icon,value:I.value,order:A,textStyle:{fontFamily:Gs({fontFamily:I.value})},hovered:I.value===x?.value,selected:I.value===e,tabIndex:I.value===e?0:-1,onClick:_=>{n(Number(_.currentTarget.value))},onMouseMove:()=>{x?.value!==I.value&&a(I.value)},children:[I.text,I.badge&&f.jsx(pU,{type:I.badge.type,children:I.badge.placeholder})]},I.value),C=[];return y.length&&C.push(f.jsx(d0,{title:M("fontList.sceneFonts"),children:y.map(k)},"group_1")),w.length&&C.push(f.jsx(d0,{title:M("fontList.availableFonts"),children:w.map((I,A)=>k(I,A+y.length))},"group_2")),f.jsxs(Mv,{className:"properties-content",container:l,style:{width:"15rem"},onClose:s,onPointerLeave:i,onKeyDown:v,children:[f.jsx(Iv,{ref:h,placeholder:M("quickSearch.placeholder"),onChange:Ys(u,20)}),f.jsx(_v,{className:"dropdown-menu fonts manual-hover",placeholder:M("fontList.empty"),children:C.length?C:null})]})},(e,t)=>e.selectedFontFamily===t.selectedFontFamily&&e.hoveredFontFamily===t.hoveredFontFamily),RH=({selectedFontFamily:e})=>{let t=S.useMemo(()=>!!(e&&!LH(e)),[e]);return f.jsx(df,{asChild:!0,children:f.jsx("div",{children:f.jsx(wv,{standalone:!0,icon:P8,title:M("labels.showFonts"),className:"properties-trigger",testId:"font-family-show-fonts",active:t,onClick:()=>{}})})})},Lv=[{value:it.Excalifont,icon:Ao,text:M("labels.handDrawn"),testId:"font-family-hand-drawn"},{value:it.Nunito,icon:Zd,text:M("labels.normal"),testId:"font-family-normal"},{value:it["Comic Shanns"],icon:C1,text:M("labels.code"),testId:"font-family-code"}],DH=new Set(Lv.map(e=>e.value)),LH=e=>e?DH.has(e):!1,PH=Z.memo(({isOpened:e,selectedFontFamily:t,hoveredFontFamily:n,onSelect:a,onHover:i,onLeave:r,onPopupChange:s})=>{let l=S.useMemo(()=>Lv,[]),c=S.useCallback(d=>{d&&a(d)},[a]);return f.jsxs("div",{role:"dialog","aria-modal":"true",className:"FontPicker__container",children:[f.jsx(Za,{type:"button",options:l,value:t,onClick:c}),f.jsx(Ev,{}),f.jsxs(cf,{open:e,onOpenChange:s,children:[f.jsx(RH,{selectedFontFamily:t}),e&&f.jsx(jH,{selectedFontFamily:t,hoveredFontFamily:n,onSelect:c,onHover:i,onLeave:r,onOpen:()=>s(!0),onClose:()=>s(!1)})]})]})},(e,t)=>e.isOpened===t.isOpened&&e.selectedFontFamily===t.selectedFontFamily&&e.hoveredFontFamily===t.hoveredFontFamily),NH=({updateData:e,appState:t,elements:n,testId:a})=>{let i=Z.useRef(null),r=Z.useRef(null),s=dn(n,t,l=>l.opacity,!0,t.currentItemOpacity);return S.useEffect(()=>{if(i.current&&r.current){let l=i.current,c=r.current,d=l.offsetWidth,o=15,u=s/100*(d-o)+o/2;c.style.left=`${u}px`,l.style.background=`linear-gradient(to right, var(--color-slider-track) 0%, var(--color-slider-track) ${s}%, var(--button-bg) ${s}%, var(--button-bg) 100%)`}},[s]),f.jsxs("label",{className:"control-label",children:[M("labels.opacity"),f.jsxs("div",{className:"range-wrapper",children:[f.jsx("input",{ref:i,type:"range",min:"0",max:"100",step:"10",onChange:l=>{e(+l.target.value)},value:s,className:"range-input","data-testid":a}),f.jsx("div",{className:"value-bubble",ref:r,children:s!==0?s:null}),f.jsx("div",{className:"zero-label",children:"0"})]})]})},Pv=.1,cn=(e,t,n,a=!1)=>{let i=oe(ve(e,t,{includeBoundTextElement:a}));return e.map(r=>i.get(r.id)||r.id===t.editingTextElement?.id?n(r):r)},dn=function(e,t,n,a,i){let r=t.editingTextElement,s=Ve(e),l=null;return r&&(l=n(r)),l||(_t(s,t)?l=DO(a===!0?s:s.filter(c=>a(c)),t,n)??(typeof i=="function"?i(!0):i):l=typeof i=="function"?i(!1):i),l},OH=(e,t)=>nt(t)||!t.autoResize?t:V(t,{x:e.textAlign==="left"?e.x:e.x+(e.width-t.width)/(e.textAlign==="center"?2:1),y:e.y+(e.height-t.height)/2},!1),UU=(e,t,n,a,i)=>{let r=new Set,s=cn(e,t,c=>{if(q(c)){let d=a(c);r.add(d);let o=pe(c,{fontSize:d});return on(o,n.scene.getContainerElement(c),n.scene.getNonDeletedElementsMap()),o=OH(c,o),o}return c},!0),l=oe(s);return ve(e,t,{includeBoundTextElement:!0}).forEach(c=>{q(c)&&xn(c,l)}),{elements:s,appState:{...t,currentItemFontSize:r.size===1?[...r][0]:i??t.currentItemFontSize},captureUpdate:B.IMMEDIATELY}};Y({name:"changeStrokeColor",label:"labels.stroke",trackEvent:!1,perform:(e,t,n)=>({...n.currentItemStrokeColor&&{elements:cn(e,t,a=>A1(a.type)?pe(a,{strokeColor:n.currentItemStrokeColor}):a,!0)},appState:{...t,...n},captureUpdate:n.currentItemStrokeColor?B.IMMEDIATELY:B.EVENTUALLY}),PanelComponent:({elements:e,appState:t,updateData:n,appProps:a})=>f.jsxs(f.Fragment,{children:[f.jsx("h3",{"aria-hidden":"true",children:M("labels.stroke")}),f.jsx(fU,{topPicks:t8,palette:hM,type:"elementStroke",label:M("labels.stroke"),color:dn(e,t,i=>i.strokeColor,!0,t.currentItemStrokeColor),onChange:i=>n({currentItemStrokeColor:i}),elements:e,appState:t,updateData:n})]})});Y({name:"changeBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(e,t,n)=>({...n.currentItemBackgroundColor&&{elements:cn(e,t,a=>pe(a,{backgroundColor:n.currentItemBackgroundColor}))},appState:{...t,...n},captureUpdate:n.currentItemBackgroundColor?B.IMMEDIATELY:B.EVENTUALLY}),PanelComponent:({elements:e,appState:t,updateData:n,appProps:a})=>f.jsxs(f.Fragment,{children:[f.jsx("h3",{"aria-hidden":"true",children:M("labels.background")}),f.jsx(fU,{topPicks:n8,palette:pM,type:"elementBackground",label:M("labels.background"),color:dn(e,t,i=>i.backgroundColor,!0,t.currentItemBackgroundColor),onChange:i=>n({currentItemBackgroundColor:i}),elements:e,appState:t,updateData:n})]})});Y({name:"changeFillStyle",label:"labels.fill",trackEvent:!1,perform:(e,t,n,a)=>(qe("element","changeFillStyle",`${n} (${a.device.editor.isMobile?"mobile":"desktop"})`),{elements:cn(e,t,i=>pe(i,{fillStyle:n})),appState:{...t,currentItemFillStyle:n},captureUpdate:B.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>{let a=ve(e,t),i=a.length>0&&a.every(r=>r.fillStyle==="zigzag");return f.jsxs("fieldset",{children:[f.jsx("legend",{children:M("labels.fill")}),f.jsx(Za,{type:"button",options:[{value:"hachure",text:`${M(i?"labels.zigzag":"labels.hachure")} (${W("Alt-Click")})`,icon:i?x_:y_,active:i?!0:void 0,testId:"fill-hachure"},{value:"cross-hatch",text:M("labels.crossHatch"),icon:w_,testId:"fill-cross-hatch"},{value:"solid",text:M("labels.solid"),icon:E_,testId:"fill-solid"}],value:dn(e,t,r=>r.fillStyle,r=>r.hasOwnProperty("fillStyle"),r=>r?null:t.currentItemFillStyle),onClick:(r,s)=>{let l=s.altKey&&r==="hachure"&&a.every(c=>c.fillStyle==="hachure")?"zigzag":r;n(l)}})]})}});Y({name:"changeStrokeWidth",label:"labels.strokeWidth",trackEvent:!1,perform:(e,t,n)=>({elements:cn(e,t,a=>pe(a,{strokeWidth:n})),appState:{...t,currentItemStrokeWidth:n},captureUpdate:B.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>f.jsxs("fieldset",{children:[f.jsx("legend",{children:M("labels.strokeWidth")}),f.jsx(Za,{group:"stroke-width",options:[{value:ah.thin,text:M("labels.thin"),icon:H8,testId:"strokeWidth-thin"},{value:ah.bold,text:M("labels.bold"),icon:S_,testId:"strokeWidth-bold"},{value:ah.extraBold,text:M("labels.extraBold"),icon:k_,testId:"strokeWidth-extraBold"}],value:dn(e,t,a=>a.strokeWidth,a=>a.hasOwnProperty("strokeWidth"),a=>a?null:t.currentItemStrokeWidth),onChange:a=>n(a)})]})});Y({name:"changeSloppiness",label:"labels.sloppiness",trackEvent:!1,perform:(e,t,n)=>({elements:cn(e,t,a=>pe(a,{seed:Ha(),roughness:n})),appState:{...t,currentItemRoughness:n},captureUpdate:B.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>f.jsxs("fieldset",{children:[f.jsx("legend",{children:M("labels.sloppiness")}),f.jsx(Za,{group:"sloppiness",options:[{value:0,text:M("labels.architect"),icon:I_},{value:1,text:M("labels.artist"),icon:__},{value:2,text:M("labels.cartoonist"),icon:T_}],value:dn(e,t,a=>a.roughness,a=>a.hasOwnProperty("roughness"),a=>a?null:t.currentItemRoughness),onChange:a=>n(a)})]})});Y({name:"changeStrokeStyle",label:"labels.strokeStyle",trackEvent:!1,perform:(e,t,n)=>({elements:cn(e,t,a=>pe(a,{strokeStyle:n})),appState:{...t,currentItemStrokeStyle:n},captureUpdate:B.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>f.jsxs("fieldset",{children:[f.jsx("legend",{children:M("labels.strokeStyle")}),f.jsx(Za,{group:"strokeStyle",options:[{value:"solid",text:M("labels.strokeStyle_solid"),icon:H8},{value:"dashed",text:M("labels.strokeStyle_dashed"),icon:C_},{value:"dotted",text:M("labels.strokeStyle_dotted"),icon:M_}],value:dn(e,t,a=>a.strokeStyle,a=>a.hasOwnProperty("strokeStyle"),a=>a?null:t.currentItemStrokeStyle),onChange:a=>n(a)})]})});Y({name:"changeOpacity",label:"labels.opacity",trackEvent:!1,perform:(e,t,n)=>({elements:cn(e,t,a=>pe(a,{opacity:n}),!0),appState:{...t,currentItemOpacity:n},captureUpdate:B.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>f.jsx(NH,{updateData:n,elements:e,appState:t,testId:"opacity"})});Y({name:"changeFontSize",label:"labels.fontSize",trackEvent:!1,perform:(e,t,n,a)=>UU(e,t,a,()=>n,n),PanelComponent:({elements:e,appState:t,updateData:n,app:a})=>f.jsxs("fieldset",{children:[f.jsx("legend",{children:M("labels.fontSize")}),f.jsx(Za,{group:"font-size",options:[{value:16,text:M("labels.small"),icon:W_,testId:"fontSize-small"},{value:20,text:M("labels.medium"),icon:V_,testId:"fontSize-medium"},{value:28,text:M("labels.large"),icon:G_,testId:"fontSize-large"},{value:36,text:M("labels.veryLarge"),icon:Y_,testId:"fontSize-veryLarge"}],value:dn(e,t,i=>{if(q(i))return i.fontSize;let r=ge(i,a.scene.getNonDeletedElementsMap());return r?r.fontSize:null},i=>q(i)||ge(i,a.scene.getNonDeletedElementsMap())!==null,i=>i?null:t.currentItemFontSize||ki),onChange:i=>n(i)})]})});var N6=Y({name:"decreaseFontSize",label:"labels.decreaseFontSize",icon:Bu,trackEvent:!1,perform:(e,t,n,a)=>UU(e,t,a,i=>Math.round(1/(1+Pv)*i.fontSize)),keyTest:e=>e[R.CTRL_OR_CMD]&&e.shiftKey&&(e.key===R.CHEVRON_LEFT||e.key===R.COMMA)}),O6=Y({name:"increaseFontSize",label:"labels.increaseFontSize",icon:Bu,trackEvent:!1,perform:(e,t,n,a)=>UU(e,t,a,i=>Math.round(i.fontSize*(1+Pv))),keyTest:e=>e[R.CTRL_OR_CMD]&&e.shiftKey&&(e.key===R.CHEVRON_RIGHT||e.key===R.PERIOD)});Y({name:"changeFontFamily",label:"labels.fontFamily",trackEvent:!1,perform:(e,t,n,a)=>{let{cachedElements:i,resetAll:r,resetContainers:s,...l}=n;if(r)return{elements:cn(e,t,U=>{let m=i?.get(U.id);return m?pe(U,{...m}):U},!0),appState:{...t,...l},captureUpdate:B.NEVER};let{currentItemFontFamily:c,currentHoveredFontFamily:d}=n,o=B.EVENTUALLY,u,h=!1;if(c)u=c,o=B.IMMEDIATELY;else if(d){u=d,o=B.EVENTUALLY;let U=ve(e,t,{includeBoundTextElement:!0}).filter(m=>q(m));if(U.length>200)h=!0;else{let m=0,g=0;for(;m<U.length&&g<5e3;){let b=U[m];g+=b?.originalText.length||0,m++}g>5e3&&(h=!0)}}let p={appState:{...t,...l},captureUpdate:o};if(u&&!h){let U=new Map,m=new Set,g=!1,b=Array.from(ui.loadedFontsCache.values()),x=Object.entries(it).find(([w,k])=>k===u)?.[0];d&&x&&b.some(w=>w.startsWith(x))&&(g=!0),Object.assign(p,{elements:cn(e,t,w=>{if(q(w)&&(w.fontFamily!==u||c)){let k=pe(w,{fontFamily:u,lineHeight:qr(u)}),C=i?.get(w.containerId||"")||{},I=a.scene.getContainerElement(w);return s&&I&&C&&V(I,{...C},!1),g||(m=new Set([...m,...Array.from(k.originalText)])),U.set(k,I),k}return w},!0)});let v=`10px ${Gs({fontFamily:u})}`,y=Array.from(m.values()).join();if(g||window.document.fonts.check(v,y))for(let[w,k]of U)on(w,k,a.scene.getNonDeletedElementsMap(),!1);else window.document.fonts.load(v,y).then(w=>{for(let[k,C]of U){let I=a.scene.getElement(k.id),A=C?a.scene.getElement(C.id):null;I&&on(I,A,a.scene.getNonDeletedElementsMap(),!1)}a.fonts.onLoaded(w)})}return p},PanelComponent:({elements:e,appState:t,app:n,updateData:a})=>{let i=S.useRef(new Map),r=S.useRef(null),[s,l]=S.useState({}),c=S.useRef(!0),d=S.useMemo(()=>{let o=(u,h)=>dn(u,t,p=>{if(q(p))return p.fontFamily;let U=ge(p,h);return U?U.fontFamily:null},p=>q(p)||ge(p,h)!==null,p=>p?null:t.currentItemFontFamily||dr);return s.openPopup==="fontFamily"&&t.openPopup==="fontFamily"?o(Array.from(i.current?.values()??[]),i.current):!s.openPopup&&t.openPopup!=="fontFamily"?o(e,n.scene.getNonDeletedElementsMap()):r.current},[s.openPopup,t,e,n.scene]);return S.useEffect(()=>{r.current=d},[d]),S.useEffect(()=>{Object.keys(s).length&&(a(s),l({}))},[s]),S.useEffect(()=>(c.current=!1,()=>{c.current=!0}),[]),f.jsxs("fieldset",{children:[f.jsx("legend",{children:M("labels.fontFamily")}),f.jsx(PH,{isOpened:t.openPopup==="fontFamily",selectedFontFamily:d,hoveredFontFamily:t.currentHoveredFontFamily,onSelect:o=>{l({openPopup:null,currentHoveredFontFamily:null,currentItemFontFamily:o}),i.current.clear()},onHover:o=>{l({currentHoveredFontFamily:o,cachedElements:new Map(i.current),resetContainers:!0})},onLeave:()=>{l({currentHoveredFontFamily:null,cachedElements:new Map(i.current),resetAll:!0})},onPopupChange:o=>{if(o){i.current.clear();let{editingTextElement:u}=t;if(u?.type==="text"){let h=n.scene.getElement(u.id);i.current.set(u.id,pe(h||u,{},!0))}else{let h=ve(e,t,{includeBoundTextElement:!0});for(let p of h)i.current.set(p.id,pe(p,{},!0))}l({openPopup:"fontFamily"})}else{let u={openPopup:null,currentHoveredFontFamily:null,cachedElements:new Map(i.current),resetAll:!0};c.current?a({...s,...u}):l(u),i.current.clear()}}})]})}});Y({name:"changeTextAlign",label:"Change text alignment",trackEvent:!1,perform:(e,t,n,a)=>({elements:cn(e,t,i=>{if(q(i)){let r=pe(i,{textAlign:n});return on(r,a.scene.getContainerElement(i),a.scene.getNonDeletedElementsMap()),r}return i},!0),appState:{...t,currentItemTextAlign:n},captureUpdate:B.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n,app:a})=>{let i=a.scene.getNonDeletedElementsMap();return f.jsxs("fieldset",{children:[f.jsx("legend",{children:M("labels.textAlign")}),f.jsx(Za,{group:"text-align",options:[{value:"left",text:M("labels.left"),icon:K_,testId:"align-left"},{value:"center",text:M("labels.center"),icon:q_,testId:"align-horizontal-center"},{value:"right",text:M("labels.right"),icon:J_,testId:"align-right"}],value:dn(e,t,r=>{if(q(r))return r.textAlign;let s=ge(r,i);return s?s.textAlign:null},r=>q(r)||ge(r,i)!==null,r=>r?null:t.currentItemTextAlign),onChange:r=>n(r)})]})}});Y({name:"changeVerticalAlign",label:"Change vertical alignment",trackEvent:{category:"element"},perform:(e,t,n,a)=>({elements:cn(e,t,i=>{if(q(i)){let r=pe(i,{verticalAlign:n});return on(r,a.scene.getContainerElement(i),a.scene.getNonDeletedElementsMap()),r}return i},!0),appState:{...t},captureUpdate:B.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n,app:a})=>f.jsx("fieldset",{children:f.jsx(Za,{group:"text-align",options:[{value:Mn.TOP,text:M("labels.alignTop"),icon:f.jsx(Q_,{theme:t.theme}),testId:"align-top"},{value:Mn.MIDDLE,text:M("labels.centerVertically"),icon:f.jsx(tT,{theme:t.theme}),testId:"align-middle"},{value:Mn.BOTTOM,text:M("labels.alignBottom"),icon:f.jsx(eT,{theme:t.theme}),testId:"align-bottom"}],value:dn(e,t,i=>{if(q(i)&&i.containerId)return i.verticalAlign;let r=ge(i,a.scene.getNonDeletedElementsMap());return r?r.verticalAlign:null},i=>q(i)||ge(i,a.scene.getNonDeletedElementsMap())!==null,i=>i?null:Mn.MIDDLE),onChange:i=>n(i)})})});Y({name:"changeRoundness",label:"Change edge roundness",trackEvent:!1,perform:(e,t,n)=>({elements:cn(e,t,a=>Q(a)?a:pe(a,{roundness:n==="round"?{type:fl(a.type)?St.ADAPTIVE_RADIUS:St.PROPORTIONAL_RADIUS}:null})),appState:{...t,currentItemRoundness:n},captureUpdate:B.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>{let a=W3(Ve(e),t).some(i=>i.roundness?.type===St.LEGACY);return f.jsxs("fieldset",{children:[f.jsx("legend",{children:M("labels.edges")}),f.jsx(Za,{group:"edges",options:[{value:"sharp",text:M("labels.sharp"),icon:A_},{value:"round",text:M("labels.round"),icon:j_}],value:dn(e,t,i=>a?null:i.roundness?"round":"sharp",i=>!xe(i)&&i.hasOwnProperty("roundness"),i=>i?null:t.currentItemRoundness),onChange:i=>n(i)})]})}});var $6=e=>[{value:null,text:M("labels.arrowhead_none"),keyBinding:"q",icon:R_},{value:"arrow",text:M("labels.arrowhead_arrow"),keyBinding:"w",icon:f.jsx(D_,{flip:e})},{value:"triangle",text:M("labels.arrowhead_triangle"),icon:f.jsx(O_,{flip:e}),keyBinding:"e"},{value:"triangle_outline",text:M("labels.arrowhead_triangle_outline"),icon:f.jsx($_,{flip:e}),keyBinding:"r"},{value:"circle",text:M("labels.arrowhead_circle"),keyBinding:"a",icon:f.jsx(L_,{flip:e})},{value:"circle_outline",text:M("labels.arrowhead_circle_outline"),keyBinding:"s",icon:f.jsx(P_,{flip:e})},{value:"diamond",text:M("labels.arrowhead_diamond"),icon:f.jsx(F_,{flip:e}),keyBinding:"d"},{value:"diamond_outline",text:M("labels.arrowhead_diamond_outline"),icon:f.jsx(z_,{flip:e}),keyBinding:"f"},{value:"bar",text:M("labels.arrowhead_bar"),keyBinding:"z",icon:f.jsx(N_,{flip:e})},{value:"crowfoot_one",text:M("labels.arrowhead_crowfoot_one"),icon:f.jsx(H_,{flip:e}),keyBinding:"c"},{value:"crowfoot_many",text:M("labels.arrowhead_crowfoot_many"),icon:f.jsx(B_,{flip:e}),keyBinding:"x"},{value:"crowfoot_one_or_many",text:M("labels.arrowhead_crowfoot_one_or_many"),icon:f.jsx(X_,{flip:e}),keyBinding:"v"}];Y({name:"changeArrowhead",label:"Change arrowheads",trackEvent:!1,perform:(e,t,n)=>({elements:cn(e,t,a=>{if(ue(a)){let{position:i,type:r}=n;if(i==="start")return pe(a,{startArrowhead:r});if(i==="end")return pe(a,{endArrowhead:r})}return a}),appState:{...t,[n.position==="start"?"currentItemStartArrowhead":"currentItemEndArrowhead"]:n.type},captureUpdate:B.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n})=>{let a=Bo().rtl;return f.jsxs("fieldset",{children:[f.jsx("legend",{children:M("labels.arrowheads")}),f.jsxs("div",{className:"iconSelectList buttonList",children:[f.jsx(P6,{label:"arrowhead_start",options:$6(!a),value:dn(e,t,i=>ue(i)&&Jd(i.type)?i.startArrowhead:t.currentItemStartArrowhead,!0,t.currentItemStartArrowhead),onChange:i=>n({position:"start",type:i}),numberOfOptionsToAlwaysShow:4}),f.jsx(P6,{label:"arrowhead_end",group:"arrowheads",options:$6(!!a),value:dn(e,t,i=>ue(i)&&Jd(i.type)?i.endArrowhead:t.currentItemEndArrowhead,!0,t.currentItemEndArrowhead),onChange:i=>n({position:"end",type:i}),numberOfOptionsToAlwaysShow:4})]})]})}});Y({name:"changeArrowType",label:"Change arrow types",trackEvent:!1,perform:(e,t,n,a)=>{let i=cn(e,t,l=>{if(!xe(l))return l;let c=pe(l,{roundness:n===$t.round?{type:St.PROPORTIONAL_RADIUS}:null,elbowed:n===$t.elbow,points:n===$t.elbow||l.elbowed?[l.points[0],l.points[l.points.length-1]]:l.points});if(Q(c)){let d=a.scene.getNonDeletedElementsMap();a.dismissLinearEditor();let o=J.getPointAtIndexGlobalCoordinates(c,0,d),u=J.getPointAtIndexGlobalCoordinates(c,-1,d),h=!c.startBinding&&ra(aa(o),e,d,t.zoom,!1,!0),p=!c.endBinding&&ra(aa(u),e,d,t.zoom,!1,!0),U=h||c.startBinding&&d.get(c.startBinding.elementId),m=p||c.endBinding&&d.get(c.endBinding.elementId),g=h?Ro(c,h,"start"):o,b=p?Ro(c,p,"end"):u;h&&Ba(c,h,"start",d),p&&Ba(c,p,"end",d),V(c,{points:[g,b].map(x=>E(x[0]-c.x,x[1]-c.y)),...U&&c.startBinding?{startBinding:{...c.startBinding,...tu(c,U,"start")}}:{},...m&&c.endBinding?{endBinding:{...c.endBinding,...tu(c,m,"end")}}:{}}),J.updateEditorMidPointsCache(c,d,a.state)}return c}),r={...t,currentItemArrowType:n},s=t.selectedLinearElement?.elementId;if(s){let l=i.find(c=>c.id===s);l&&(r.selectedLinearElement=new J(l))}return{elements:i,appState:r,captureUpdate:B.IMMEDIATELY}},PanelComponent:({elements:e,appState:t,updateData:n})=>f.jsxs("fieldset",{children:[f.jsx("legend",{children:M("labels.arrowtypes")}),f.jsx(Za,{group:"arrowtypes",options:[{value:$t.sharp,text:M("labels.arrowtype_sharp"),icon:IT,testId:"sharp-arrow"},{value:$t.round,text:M("labels.arrowtype_round"),icon:TT,testId:"round-arrow"},{value:$t.elbow,text:M("labels.arrowtype_elbowed"),icon:_T,testId:"elbow-arrow"}],value:dn(e,t,a=>xe(a)?a.elbowed?$t.elbow:a.roundness?$t.round:$t.sharp:null,a=>xe(a),a=>a?null:t.currentItemArrowType),onChange:a=>n(a)})]})});var jr=({viewportX:e,viewportY:t,nextZoom:n},a)=>{let i=e-a.offsetLeft,r=t-a.offsetTop,s=a.zoom.value,l=a.scrollX+(i-i/s),c=a.scrollY+(r-r/s),d=-(i-i/n),o=-(r-r/n);return{scrollX:l+d,scrollY:c+o,zoom:{value:n}}},uo=()=>{let e=document.querySelector(".excalidraw-tooltip");if(e)return e;let t=document.createElement("div");return document.body.appendChild(t),t.classList.add("excalidraw-tooltip"),t},Nv=(e,t,n="bottom")=>{let a=e.getBoundingClientRect(),i=window.innerWidth,r=window.innerHeight,s=5,l=t.left+t.width/2-a.width/2;l<0?l=s:l+a.width>=i&&(l=i-a.width-s);let c;n==="bottom"?(c=t.top+t.height+s,c+a.height>=r&&(c=t.top-a.height-s)):(c=t.top-a.height-s,c<0&&(c=t.top+t.height+s)),Object.assign(e.style,{top:`${c}px`,left:`${l}px`})},$H=(e,t,n,a)=>{t.classList.add("excalidraw-tooltip--visible"),t.style.minWidth=a?"50ch":"10ch",t.style.maxWidth=a?"50ch":"15ch",t.textContent=n;let i=e.getBoundingClientRect();Nv(t,i)},ns=({children:e,label:t,long:n=!1,style:a,disabled:i})=>(S.useEffect(()=>()=>uo().classList.remove("excalidraw-tooltip--visible"),[]),i?null:f.jsx("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:r=>$H(r.currentTarget,uo(),t,n),onPointerLeave:()=>uo().classList.remove("excalidraw-tooltip--visible"),style:a,children:e}));Y({name:"changeViewBackgroundColor",label:"labels.canvasBackground",paletteName:"Change canvas background color",trackEvent:!1,predicate:(e,t,n,a)=>!!a.props.UIOptions.canvasActions.changeViewBackgroundColor&&!t.viewModeEnabled,perform:(e,t,n)=>({appState:{...t,...n},captureUpdate:n.viewBackgroundColor?B.IMMEDIATELY:B.EVENTUALLY}),PanelComponent:({elements:e,appState:t,updateData:n,appProps:a})=>f.jsx(fU,{palette:null,topPicks:a8,label:M("labels.canvasBackground"),type:"canvasBackground",color:t.viewBackgroundColor,onChange:i=>n({viewBackgroundColor:i}),"data-testid":"canvas-background-picker",elements:e,appState:t,updateData:n})});var fo=Y({name:"clearCanvas",label:"labels.clearCanvas",paletteName:"Clear canvas",icon:Zr,trackEvent:{category:"canvas"},predicate:(e,t,n,a)=>!!a.props.UIOptions.canvasActions.clearCanvas&&!t.viewModeEnabled&&t.openDialog?.name!=="elementLinkSelector",perform:(e,t,n,a)=>(a.imageCache.clear(),{elements:e.map(i=>pe(i,{isDeleted:!0})),appState:{...za(),files:{},theme:t.theme,penMode:t.penMode,penDetected:t.penDetected,exportBackground:t.exportBackground,exportEmbedScene:t.exportEmbedScene,gridSize:t.gridSize,gridStep:t.gridStep,gridModeEnabled:t.gridModeEnabled,stats:t.stats,pasteDialog:t.pasteDialog,activeTool:t.activeTool.type==="image"?{...t.activeTool,type:"selection"}:t.activeTool},captureUpdate:B.IMMEDIATELY})}),F6=Y({name:"zoomIn",label:"buttons.zoomIn",viewMode:!0,icon:k2,trackEvent:{category:"canvas"},perform:(e,t,n,a)=>({appState:{...t,...jr({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:ci(t.zoom.value+Lu)},t),userToFollow:null},captureUpdate:B.EVENTUALLY}),PanelComponent:({updateData:e,appState:t})=>f.jsx(Me,{type:"button",className:"zoom-in-button zoom-button",icon:k2,title:`${M("buttons.zoomIn")} — ${W("CtrlOrCmd++")}`,"aria-label":M("buttons.zoomIn"),disabled:t.zoom.value>=B0,onClick:()=>{e(null)}}),keyTest:e=>(e.code===Te.EQUAL||e.code===Te.NUM_ADD)&&(e[R.CTRL_OR_CMD]||e.shiftKey)}),z6=Y({name:"zoomOut",label:"buttons.zoomOut",icon:C2,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,t,n,a)=>({appState:{...t,...jr({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:ci(t.zoom.value-Lu)},t),userToFollow:null},captureUpdate:B.EVENTUALLY}),PanelComponent:({updateData:e,appState:t})=>f.jsx(Me,{type:"button",className:"zoom-out-button zoom-button",icon:C2,title:`${M("buttons.zoomOut")} — ${W("CtrlOrCmd+-")}`,"aria-label":M("buttons.zoomOut"),disabled:t.zoom.value<=z0,onClick:()=>{e(null)}}),keyTest:e=>(e.code===Te.MINUS||e.code===Te.NUM_SUBTRACT)&&(e[R.CTRL_OR_CMD]||e.shiftKey)}),B6=Y({name:"resetZoom",label:"buttons.resetZoom",icon:r_,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,t,n,a)=>({appState:{...t,...jr({viewportX:t.width/2+t.offsetLeft,viewportY:t.height/2+t.offsetTop,nextZoom:ci(1)},t),userToFollow:null},captureUpdate:B.EVENTUALLY}),PanelComponent:({updateData:e,appState:t})=>f.jsx(ns,{label:M("buttons.resetZoom"),style:{height:"100%"},children:f.jsxs(Me,{type:"button",className:"reset-zoom-button zoom-button",title:M("buttons.resetZoom"),"aria-label":M("buttons.resetZoom"),onClick:()=>{e(null)},children:[(t.zoom.value*100).toFixed(0),"%"]})}),keyTest:e=>(e.code===Te.ZERO||e.code===Te.NUM_ZERO)&&(e[R.CTRL_OR_CMD]||e.shiftKey)}),FH=(e,t,n=1)=>{let[a,i,r,s]=e,l=r-a,c=t.width/l,d=s-i,o=t.height/d,u=Math.min(c,o)*Se(n,.1,1);return Math.min(u,1)},Ov=({bounds:e,appState:t,canvasOffsets:n,fitToViewport:a=!1,viewportZoomFactor:i=1,minZoom:r=-1/0,maxZoom:s=1/0})=>{i=Se(i,z0,B0);let[l,c,d,o]=e,u=(l+d)/2,h=(c+o)/2,p=n?.left??0,U=n?.top??0,m=n?.right??0,g=n?.bottom??0,b=t.width-p-m,x=t.height-U-g,v;if(a){let k=d-l,C=o-c;v=Math.min(b/k,x/C)*i}else v=FH(e,{width:b,height:x},i);let y=ci(Se(GM(v,Lu,"floor"),r,s)),w=O7({scenePoint:{x:u,y:h},viewportDimensions:{width:t.width,height:t.height},offsets:n,zoom:{value:y}});return{appState:{...t,scrollX:w.scrollX,scrollY:w.scrollY,zoom:{value:y}},captureUpdate:B.EVENTUALLY}},bf=({canvasOffsets:e,targetElements:t,appState:n,fitToViewport:a,viewportZoomFactor:i,minZoom:r,maxZoom:s})=>{let l=Ne(Ve(t));return Ov({canvasOffsets:e,bounds:l,appState:n,fitToViewport:a,viewportZoomFactor:i,minZoom:r,maxZoom:s})};Y({name:"zoomToFitSelectionInViewport",label:"labels.zoomToFitViewport",icon:ip,trackEvent:{category:"canvas"},perform:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t);return bf({targetElements:i.length?i:e,appState:{...t,userToFollow:null},fitToViewport:!1,canvasOffsets:a.getEditorUIOffsets()})},keyTest:e=>e.code===Te.TWO&&e.shiftKey&&!e.altKey&&!e[R.CTRL_OR_CMD]});Y({name:"zoomToFitSelection",label:"helpDialog.zoomToSelection",icon:ip,trackEvent:{category:"canvas"},perform:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t);return bf({targetElements:i.length?i:e,appState:{...t,userToFollow:null},fitToViewport:!0,canvasOffsets:a.getEditorUIOffsets()})},keyTest:e=>e.code===Te.THREE&&e.shiftKey&&!e.altKey&&!e[R.CTRL_OR_CMD]});Y({name:"zoomToFit",label:"helpDialog.zoomToFit",icon:ip,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,t,n,a)=>bf({targetElements:e,appState:{...t,userToFollow:null},fitToViewport:!1,canvasOffsets:a.getEditorUIOffsets()}),keyTest:e=>e.code===Te.ONE&&e.shiftKey&&!e.altKey&&!e[R.CTRL_OR_CMD]});var mu=Y({name:"toggleTheme",label:(e,t)=>t.theme===Ce.DARK?"buttons.lightMode":"buttons.darkMode",keywords:["toggle","dark","light","mode","theme"],icon:e=>e.theme===Ce.LIGHT?E1:S1,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,t,n)=>({appState:{...t,theme:n||(t.theme===Ce.LIGHT?Ce.DARK:Ce.LIGHT)},captureUpdate:B.EVENTUALLY}),keyTest:e=>e.altKey&&e.shiftKey&&e.code===Te.D,predicate:(e,t,n,a)=>!!a.props.UIOptions.canvasActions.toggleTheme});Y({name:"toggleEraserTool",label:"toolBar.eraser",trackEvent:{category:"toolbar"},perform:(e,t)=>{let n;return Ma(t)?n=Et(t,{...t.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):n=Et(t,{type:"eraser",lastActiveToolBeforeEraser:t.activeTool}),{appState:{...t,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:B.IMMEDIATELY}},keyTest:e=>e.key===R.E});var zH=Y({name:"toggleHandTool",label:"toolBar.hand",paletteName:"Toggle hand tool",trackEvent:{category:"toolbar"},icon:W8,viewMode:!1,perform:(e,t,n,a)=>{let i;return Vs(t)?i=Et(t,{...t.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):(i=Et(t,{type:"hand",lastActiveToolBeforeEraser:t.activeTool}),He(a.interactiveCanvas,Fe.GRAB)),{appState:{...t,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:i},captureUpdate:B.IMMEDIATELY}},keyTest:e=>!e.altKey&&!e[R.CTRL_OR_CMD]&&e.key===R.H}),Kn=Y({name:"finalize",label:"",trackEvent:!1,perform:(e,t,n,a)=>{let{interactiveCanvas:i,focusContainer:r,scene:s}=a,l=s.getNonDeletedElementsMap();if(t.editingLinearElement){let{elementId:h,startBindingElement:p,endBindingElement:U}=t.editingLinearElement,m=J.getElement(h,l);if(m)return Da(m)&&Gu(m,p,U,l,s),{elements:m.points.length<2||es(m)?e.filter(g=>g.id!==m.id):void 0,appState:{...t,cursorButton:"up",editingLinearElement:null},captureUpdate:B.IMMEDIATELY}}let c=e,d=t.pendingImageElementId&&s.getElement(t.pendingImageElementId);d&&V(d,{isDeleted:!0},!1),window.document.activeElement instanceof HTMLElement&&r();let o=t.multiElement?t.multiElement:t.newElement?.type==="freedraw"?t.newElement:null;if(o){if(o.type!=="freedraw"&&t.lastPointerDownWith!=="touch"){let{points:p,lastCommittedPoint:U}=o;(!U||p[p.length-1]!==U)&&V(o,{points:o.points.slice(0,-1)})}es(o)&&(c=c.filter(p=>p.id!==o.id));let h=mi(o.points,t.zoom.value);if((o.type==="line"||o.type==="freedraw")&&h){let p=o.points,U=p[0];V(o,{points:p.map((m,g)=>g===p.length-1?E(U[0],U[1]):m)})}if(Da(o)&&!h&&o.points.length>1){let[p,U]=J.getPointAtIndexGlobalCoordinates(o,-1,oe(e));R1(o,t,{x:p,y:U},l,e)}}(!t.activeTool.locked&&t.activeTool.type!=="freedraw"||!o)&&Jn(i);let u;return t.activeTool.type==="eraser"?u=Et(t,{...t.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):u=Et(t,{type:"selection"}),{elements:c,appState:{...t,cursorButton:"up",activeTool:(t.activeTool.locked||t.activeTool.type==="freedraw")&&o?t.activeTool:u,activeEmbeddable:null,newElement:null,selectionElement:null,multiElement:null,editingTextElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:o&&!t.activeTool.locked&&t.activeTool.type!=="freedraw"?{...t.selectedElementIds,[o.id]:!0}:t.selectedElementIds,selectedLinearElement:o&&ue(o)?new J(o):t.selectedLinearElement,pendingImageElementId:null},captureUpdate:B.IMMEDIATELY}},keyTest:(e,t)=>e.key===R.ESCAPE&&(t.editingLinearElement!==null||!t.newElement&&t.multiElement===null)||(e.key===R.ESCAPE||e.key===R.ENTER)&&t.multiElement!==null,PanelComponent:({appState:e,updateData:t,data:n})=>f.jsx(Me,{type:"button",icon:U_,title:M("buttons.done"),"aria-label":M("buttons.done"),onClick:t,visible:e.multiElement!=null,size:n?.size||"medium",style:{pointerEvents:"all"}})}),BH=e=>{let{id:t}=Ka(),[n,a]=S.useState(e.value),i=s=>{e.ignoreFocus||hI(s.target);let l=s.target.value;l!==e.value&&e.onChange(l)},r=s=>{if(s.key===R.ENTER){if(s.preventDefault(),s.nativeEvent.isComposing||s.keyCode===229)return;s.currentTarget.blur()}};return f.jsxs("div",{className:"ProjectName",children:[f.jsx("label",{className:"ProjectName-label",htmlFor:"filename",children:`${e.label}:`}),f.jsx("input",{type:"text",className:"TextInput",onBlur:i,onKeyDown:r,id:`${t}-filename`,value:n,onChange:s=>a(s.target.value)})]})},HH=e=>{let t=e.title||(e.value===Ce.DARK?M("buttons.lightMode"):M("buttons.darkMode"));return f.jsx(Me,{type:"icon",icon:e.value===Ce.LIGHT?H6.MOON:H6.SUN,title:t,"aria-label":t,onClick:()=>e.onChange(e.value===Ce.DARK?Ce.LIGHT:Ce.DARK),"data-testid":"toggle-dark-mode"})},H6={SUN:f.jsx("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:f.jsx("path",{fill:"currentColor",d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"})}),MOON:f.jsx("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:f.jsx("path",{fill:"currentColor",d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"})})},vf=(e,{selectedElementIds:t},n)=>{e=Ve(e);let a=n&&_t(e,{selectedElementIds:t}),i=null,r=a?ve(e,{selectedElementIds:t},{includeBoundTextElement:!0}):e;return a&&(r.length===1&&ce(r[0])?(i=r[0],r=$p(e,i)):r.length>1&&(r=ve(e,{selectedElementIds:t},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:i,exportedElements:di(r)}},xf=async(e,t,n,a,{exportBackground:i,exportPadding:r=dl,viewBackgroundColor:s,name:l=n.name||u8,fileHandle:c=null,exportingFrame:d=null})=>{if(t.length===0)throw new Error(M("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let u=Sp(t,{exportBackground:i,exportWithDarkMode:n.exportWithDarkMode,viewBackgroundColor:s,exportPadding:r,exportScale:n.exportScale,exportEmbedScene:n.exportEmbedScene&&e==="svg"},a,{exportingFrame:d});if(e==="svg")return su(u.then(h=>new Blob([h.outerHTML],{type:ae.svg})),{description:"Export to SVG",name:l,extension:n.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[Ws.svg],fileHandle:c});if(e==="clipboard-svg"){let h=await u.then(p=>p.outerHTML);try{await pl(h)}catch{throw new Error(M("errors.copyToSystemClipboardFailed"))}return}}let o=S3(t,n,a,{exportBackground:i,viewBackgroundColor:s,exportPadding:r,exportingFrame:d});if(e==="png"){let u=zo(o);return n.exportEmbedScene&&(u=u.then(h=>ne(async()=>{const{encodePngMetadata:p}=await Promise.resolve().then(()=>Cy);return{encodePngMetadata:p}},void 0,import.meta.url).then(({encodePngMetadata:p})=>p({blob:h,metadata:rc(t,n,a,"local")})))),su(u,{description:"Export to PNG",name:l,extension:n.exportEmbedScene?"excalidraw.png":"png",mimeTypes:[Ws.png],fileHandle:c})}else if(e==="clipboard")try{let u=zo(o);await R3(u)}catch(u){throw console.warn(u),u.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(M("canvasError.canvasTooBig")):Co&&u.name==="TypeError"?new Error(`${M("alerts.couldNotCopyToClipboard")}
|
|
94
94
|
|
|
95
95
|
${M("hints.firefox_clipboard_write")}`):new Error(M("alerts.couldNotCopyToClipboard"))}else throw new Error("Unsupported export type")},XH=async(e,t,n,a)=>{let{exportBackground:i,viewBackgroundColor:r,fileHandle:s}=t,l=n4(s);if(!s||!a$(l))throw new Error("fileHandle should exist and should be of type svg or png when resaving");t={...t,exportEmbedScene:!0};let{exportedElements:c,exportingFrame:d}=vf(e,t,!1);return await xf(l,c,t,n,{exportBackground:i,viewBackgroundColor:r,name:a,fileHandle:s,exportingFrame:d}),{fileHandle:s}},mU=({children:e,checked:t,onChange:n,className:a})=>f.jsxs("div",{className:te("Checkbox",a,{"is-checked":t}),onClick:i=>{n(!t,i),i.currentTarget.querySelector(".Checkbox-box").focus()},children:[f.jsx("button",{type:"button",className:"Checkbox-box",role:"checkbox","aria-checked":t,children:d_}),f.jsx("div",{className:"Checkbox-label",children:e})]}),WH=Y({name:"changeProjectName",label:"labels.fileTitle",trackEvent:!1,perform:(e,t,n)=>({appState:{...t,name:n},captureUpdate:B.EVENTUALLY}),PanelComponent:({appState:e,updateData:t,appProps:n,data:a,app:i})=>f.jsx(BH,{label:M("labels.fileTitle"),value:i.getName(),onChange:r=>t(r),ignoreFocus:a?.ignoreFocus??!1})}),VH=Y({name:"changeExportScale",label:"imageExportDialog.scale",trackEvent:{category:"export",action:"scale"},perform:(e,t,n)=>({appState:{...t,exportScale:n},captureUpdate:B.EVENTUALLY}),PanelComponent:({elements:e,appState:t,updateData:n})=>{let a=Ve(e),i=_t(a,t)?ve(a,t):a;return f.jsx(f.Fragment,{children:X0.map(r=>{let[s,l]=BN(i,dl,r),c=`${M("imageExportDialog.label.scale")} ${r}x (${s}x${l})`;return f.jsx(Me,{size:"small",type:"radio",icon:`${r}x`,name:"export-canvas-scale",title:c,"aria-label":c,id:"export-canvas-scale",checked:r===t.exportScale,onChange:()=>n(r)},r)})})}}),GH=Y({name:"changeExportBackground",label:"imageExportDialog.label.withBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:(e,t,n)=>({appState:{...t,exportBackground:n},captureUpdate:B.EVENTUALLY}),PanelComponent:({appState:e,updateData:t})=>f.jsx(mU,{checked:e.exportBackground,onChange:n=>t(n),children:M("imageExportDialog.label.withBackground")})}),$v=Y({name:"changeExportEmbedScene",label:"imageExportDialog.tooltip.embedScene",trackEvent:{category:"export",action:"embedScene"},perform:(e,t,n)=>({appState:{...t,exportEmbedScene:n},captureUpdate:B.EVENTUALLY}),PanelComponent:({appState:e,updateData:t})=>f.jsxs(mU,{checked:e.exportEmbedScene,onChange:n=>t(n),children:[M("imageExportDialog.label.embedScene"),f.jsx(ns,{label:M("imageExportDialog.tooltip.embedScene"),long:!0,children:f.jsx("div",{className:"excalidraw-tooltip-icon",children:m_})})]})}),X6=Y({name:"saveToActiveFile",label:"buttons.save",icon:zu,trackEvent:{category:"export"},predicate:(e,t,n,a)=>!!a.props.UIOptions.canvasActions.saveToActiveFile&&!!t.fileHandle&&!t.viewModeEnabled,perform:async(e,t,n,a)=>{let i=!!t.fileHandle;try{let{fileHandle:r}=Yp(t.fileHandle)?await XH(e,t,a.files,a.getName()):await c3(e,t,a.files,a.getName());return{captureUpdate:B.EVENTUALLY,appState:{...t,fileHandle:r,toast:i?{message:r?.name?M("toast.fileSavedToFilename").replace("{filename}",`"${r.name}"`):M("toast.fileSaved")}:null}}}catch(r){return r?.name!=="AbortError"?console.error(r):console.warn(r),{captureUpdate:B.EVENTUALLY}}},keyTest:e=>e.key===R.S&&e[R.CTRL_OR_CMD]&&!e.shiftKey}),Fv=Y({name:"saveFileToDisk",label:"exportDialog.disk_title",icon:zu,viewMode:!0,trackEvent:{category:"export"},perform:async(e,t,n,a)=>{try{let{fileHandle:i}=await c3(e,{...t,fileHandle:null},a.files,a.getName());return{captureUpdate:B.EVENTUALLY,appState:{...t,openDialog:null,fileHandle:i,toast:{message:M("toast.fileSaved")}}}}catch(i){return i?.name!=="AbortError"?console.error(i):console.warn(i),{captureUpdate:B.EVENTUALLY}}},keyTest:e=>e.key===R.S&&e.shiftKey&&e[R.CTRL_OR_CMD],PanelComponent:({updateData:e})=>f.jsx(Me,{type:"button",icon:f_,title:M("buttons.saveAs"),"aria-label":M("buttons.saveAs"),showAriaLabel:Tt().editor.isMobile,hidden:!is,onClick:()=>e(null),"data-testid":"save-as-button"})}),u0=Y({name:"loadScene",label:"buttons.load",trackEvent:{category:"export"},predicate:(e,t,n,a)=>!!a.props.UIOptions.canvasActions.loadScene&&!t.viewModeEnabled,perform:async(e,t,n,a)=>{try{let{elements:i,appState:r,files:s}=await jN(t,e);return{elements:i,appState:r,files:s,captureUpdate:B.IMMEDIATELY}}catch(i){return i?.name==="AbortError"?(console.warn(i),!1):{elements:e,appState:{...t,errorMessage:i.message},files:a.files,captureUpdate:B.EVENTUALLY}}},keyTest:e=>e[R.CTRL_OR_CMD]&&e.key===R.O}),YH=Y({name:"exportWithDarkMode",label:"imageExportDialog.label.darkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:(e,t,n)=>({appState:{...t,exportWithDarkMode:n},captureUpdate:B.EVENTUALLY}),PanelComponent:({appState:e,updateData:t})=>f.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:f.jsx(HH,{value:e.exportWithDarkMode?Ce.DARK:Ce.LIGHT,onChange:n=>{t(n===Ce.DARK)},title:M("imageExportDialog.label.darkMode")})})}),zv="{}",ZH=Y({name:"copyStyles",label:"labels.copyStyles",icon:q8,trackEvent:{category:"element"},perform:(e,t,n,a)=>{let i=[],r=e.find(s=>t.selectedElementIds[s.id]);if(i.push(r),r&&Wn(r)){let s=ge(r,a.scene.getNonDeletedElementsMap());i.push(s)}return r&&(zv=JSON.stringify(i)),{appState:{...t,toast:{message:M("toast.copyStyles")}},captureUpdate:B.EVENTUALLY}},keyTest:e=>e[R.CTRL_OR_CMD]&&e.altKey&&e.code===Te.C}),KH=Y({name:"pasteStyles",label:"labels.pasteStyles",icon:q8,trackEvent:{category:"element"},perform:(e,t,n,a)=>{let i=JSON.parse(zv),r=i[0],s=i[1];if(!T8(r))return{elements:e,captureUpdate:B.EVENTUALLY};let l=ve(e,t,{includeBoundTextElement:!0}),c=l.map(d=>d.id);return{elements:e.map(d=>{if(c.includes(d.id)){let o=r;if(q(d)&&d.containerId&&(o=s),!o)return d;let u=pe(d,{backgroundColor:o?.backgroundColor,strokeWidth:o?.strokeWidth,strokeColor:o?.strokeColor,strokeStyle:o?.strokeStyle,fillStyle:o?.fillStyle,opacity:o?.opacity,roughness:o?.roughness,roundness:o.roundness?kI(o.roundness.type,d)?o.roundness:CI(d):null});if(q(u)){let h=o.fontSize||ki,p=o.fontFamily||dr;u=pe(u,{fontSize:h,fontFamily:p,textAlign:o.textAlign||qo,lineHeight:o.lineHeight||qr(p)});let U=null;u.containerId&&(U=l.find(m=>q(u)&&m.id===u.containerId)||null),on(u,U,a.scene.getNonDeletedElementsMap())}return u.type==="arrow"&&xe(o)&&(u=pe(u,{startArrowhead:o.startArrowhead,endArrowhead:o.endArrowhead})),ce(d)&&(u=pe(u,{roundness:null,backgroundColor:"transparent"})),u}return d}),captureUpdate:B.IMMEDIATELY}},keyTest:e=>e[R.CTRL_OR_CMD]&&e.altKey&&e.code===Te.V});Y({name:"toggleCanvasMenu",label:"buttons.menu",trackEvent:{category:"menu"},perform:(e,t)=>({appState:{...t,openMenu:t.openMenu==="canvas"?null:"canvas"},captureUpdate:B.EVENTUALLY}),PanelComponent:({appState:e,updateData:t})=>f.jsx(Me,{type:"button",icon:N8,"aria-label":M("buttons.menu"),onClick:t,selected:e.openMenu==="canvas"})});Y({name:"toggleEditMenu",label:"buttons.edit",trackEvent:{category:"menu"},perform:(e,t)=>({appState:{...t,openMenu:t.openMenu==="shape"?null:"shape"},captureUpdate:B.EVENTUALLY}),PanelComponent:({elements:e,appState:t,updateData:n})=>f.jsx(Me,{visible:Vp(t,Ve(e)),type:"button",icon:h_,"aria-label":M("buttons.edit"),onClick:n,selected:t.openMenu==="shape"})});var gU=Y({name:"toggleShortcuts",label:"welcomeScreen.defaults.helpHint",icon:l_,viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:(e,t,n,{focusContainer:a})=>(t.openDialog?.name==="help"&&a(),{appState:{...t,openDialog:t.openDialog?.name==="help"?null:{name:"help"}},captureUpdate:B.EVENTUALLY}),keyTest:e=>e.key===R.QUESTION_MARK}),qH=e=>{if(e.length>=2){let t=e[0].groupIds;for(let n of t)if(e.reduce((a,i)=>a&&Po(i,n),!0))return!0}return!1},W6=(e,t,n)=>{let a=n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0});return a.length>=2&&!qH(a)&&!H3(a)},JH=Y({name:"group",label:"labels.group",icon:e=>f.jsx(F2,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,t,n,a)=>{let i=Op(a.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0}));if(i.length<2)return{appState:t,elements:e,captureUpdate:B.EVENTUALLY};let r=Pr(t);if(r.length===1){let m=r[0],g=new Set(tt(e,m).map(x=>x.id)),b=new Set(i.map(x=>x.id));if(new Set([...Array.from(g),...Array.from(b)]).size===g.size)return{appState:t,elements:e,captureUpdate:B.EVENTUALLY}}let s=[...e];new Set(i.map(m=>m.frameId)).size>1&&TO(i).forEach((m,g)=>{rf(m,a.scene.getNonDeletedElementsMap())});let l=Vn(),c=oe(i);s=s.map(m=>c.get(m.id)?pe(m,{groupIds:FP(m.groupIds,l,t.editingGroupId)}):m);let d=tt(s,l),o=d[d.length-1],u=s.lastIndexOf(o),h=s.slice(u+1),p=s.slice(0,u).filter(m=>!Po(m,l)),U=Wa([...p,...d,...h],oe(d));return{appState:{...t,...F7(l,{...t,selectedGroupIds:{}},Ve(s))},elements:U,captureUpdate:B.IMMEDIATELY}},predicate:(e,t,n,a)=>W6(e,t,a),keyTest:e=>!e.shiftKey&&e[R.CTRL_OR_CMD]&&e.key===R.G,PanelComponent:({elements:e,appState:t,updateData:n,app:a})=>f.jsx(Me,{hidden:!W6(e,t,a),type:"button",icon:f.jsx(F2,{theme:t.theme}),onClick:()=>n(null),title:`${M("labels.group")} — ${W("CtrlOrCmd+G")}`,"aria-label":M("labels.group"),visible:_t(Ve(e),t)})}),QH=Y({name:"ungroup",label:"labels.ungroup",icon:e=>f.jsx(z2,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,t,n,a)=>{let i=Pr(t),r=oe(e);if(i.length===0)return{appState:t,elements:e,captureUpdate:B.EVENTUALLY};let s=[...e],l=[];s=s.map(u=>{nt(u)&&l.push(u.id);let h=zP(u.groupIds,t.selectedGroupIds);return h.length===u.groupIds.length?u:pe(u,{groupIds:h})});let c=ln(t,Ve(s),t,null),d=a.scene.getSelectedElements(t),o=new Set(d.filter(u=>u.frameId).map(u=>u.frameId));return Np(e).filter(u=>o.has(u.id)).forEach(u=>{u&&(s=z3(s,Ud(s,u,t,r),u,a))}),c.selectedElementIds=Object.entries(c.selectedElementIds).reduce((u,[h,p])=>(p&&!l.includes(h)&&(u[h]=!0),u),{}),{appState:{...t,...c},elements:s,captureUpdate:B.IMMEDIATELY}},keyTest:e=>e.shiftKey&&e[R.CTRL_OR_CMD]&&e.key===R.G.toUpperCase(),predicate:(e,t)=>Pr(t).length>0,PanelComponent:({elements:e,appState:t,updateData:n})=>f.jsx(Me,{type:"button",hidden:Pr(t).length===0,icon:f.jsx(z2,{theme:t.theme}),onClick:()=>n(null),title:`${M("labels.ungroup")} — ${W("CtrlOrCmd+Shift+G")}`,"aria-label":M("labels.ungroup"),visible:_t(Ve(e),t)})}),Bv=(e,t,n,a,i,r,s)=>{e.beginPath(),e.moveTo(t+r,n),e.lineTo(t+a-r,n),e.quadraticCurveTo(t+a,n,t+a,n+r),e.lineTo(t+a,n+i-r),e.quadraticCurveTo(t+a,n+i,t+a-r,n+i),e.lineTo(t+r,n+i),e.quadraticCurveTo(t,n+i,t,n+i-r),e.lineTo(t,n+r),e.quadraticCurveTo(t,n,t+r,n),e.closePath(),e.fill(),s&&(e.strokeStyle=s),e.stroke()};function eX(e){let t=0;if(e.length===0)return t;for(let n=0;n<e.length;n++){let a=e.charCodeAt(n);t=(t<<5)-t+a}return t}var yf=(e,t)=>`hsl(${Math.abs(eX(t?.id||e))%37*10}, 100%, 83%)`,tX=e=>{let t=e?.trim()?.codePointAt(0);return(t?String.fromCodePoint(t):"?").toUpperCase()},nX=({context:e,renderConfig:t,appState:n,normalizedWidth:a,normalizedHeight:i})=>{for(let[r,s]of t.remotePointerViewportCoords){let{x:l,y:c}=s,d=n.collaborators.get(r);l-=n.offsetLeft,c-=n.offsetTop;let o=11,u=14,h=l<0||l>a-o||c<0||c>i-u;l=Math.max(l,0),l=Math.min(l,a-o),c=Math.max(c,0),c=Math.min(c,i-u);let p=yf(r,d);e.save(),e.strokeStyle=p,e.fillStyle=p;let U=t.remotePointerUserStates.get(r),m=h||U==="idle"||U==="away";m&&(e.globalAlpha=.3),t.remotePointerButton.get(r)==="down"&&(e.beginPath(),e.arc(l,c,15,0,2*Math.PI,!1),e.lineWidth=3,e.strokeStyle="#ffffff88",e.stroke(),e.closePath(),e.beginPath(),e.arc(l,c,15,0,2*Math.PI,!1),e.lineWidth=1,e.strokeStyle=p,e.stroke(),e.closePath());let g=n.theme===Ce.DARK?"#2f6330":MM,b=d?.isSpeaking;b&&(e.fillStyle=g,e.strokeStyle=g,e.lineWidth=10,e.lineJoin="round",e.beginPath(),e.moveTo(l,c),e.lineTo(l+0,c+14),e.lineTo(l+4,c+9),e.lineTo(l+11,c+8),e.closePath(),e.stroke(),e.fill()),e.fillStyle=Ic,e.strokeStyle=Ic,e.lineWidth=6,e.lineJoin="round",e.beginPath(),e.moveTo(l,c),e.lineTo(l+0,c+14),e.lineTo(l+4,c+9),e.lineTo(l+11,c+8),e.closePath(),e.stroke(),e.fill(),e.fillStyle=p,e.strokeStyle=p,e.lineWidth=2,e.lineJoin="round",e.beginPath(),m?(e.moveTo(l-1,c-1),e.lineTo(l-1,c+15),e.lineTo(l+5,c+10),e.lineTo(l+12,c+9),e.closePath(),e.fill()):(e.moveTo(l,c),e.lineTo(l+0,c+14),e.lineTo(l+4,c+9),e.lineTo(l+11,c+8),e.closePath(),e.fill(),e.stroke());let x=t.remotePointerUsernames.get(r)||"";if(!h&&x){e.font="600 12px sans-serif";let v=(b?l+0:l)+o/2,y=(b?c+0:c)+u+2,w=5,k=3,C=e.measureText(x),I=C.actualBoundingBoxDescent+C.actualBoundingBoxAscent,A=Math.max(I,12),_=v-1,T=y-1,D=C.width+2+w*2+2,L=A+2+k*2+2;if(e.roundRect?(e.beginPath(),e.roundRect(_,T,D,L,8),e.fillStyle=p,e.fill(),e.strokeStyle=Ic,e.stroke(),b&&(e.beginPath(),e.roundRect(_-2,T-2,D+4,L+4,8),e.strokeStyle=g,e.stroke())):Bv(e,_,T,D,L,8,Ic),e.fillStyle=CM,e.fillText(x,v+w+1,y+k+C.actualBoundingBoxAscent+Math.floor((A-I)/2)+2),b){e.fillStyle=g;let F=8,P=8,O=5;e.fillRect(_+D+P,T+(L/2-F/2),2,F),e.fillRect(_+D+P+O,T+(L/2-F*2/2),2,F*2),e.fillRect(_+D+P+O*2,T+(L/2-F/2),2,F)}}e.restore(),e.closePath()}},V6=({color:e,onClick:t,name:n,src:a,className:i})=>{let r=tX(n),[s,l]=S.useState(!1),c=!s&&a,d=c?void 0:{background:e};return f.jsx("div",{className:te("Avatar",i),style:d,onClick:t,children:c?f.jsx("img",{className:"Avatar-img",src:a,alt:r,referrerPolicy:"no-referrer",onError:()=>l(!0)}):r})};Y({name:"goToCollaborator",label:"Go to a collaborator",viewMode:!0,trackEvent:{category:"collab"},perform:(e,t,n)=>!n.socketId||t.userToFollow?.socketId===n.socketId||n.isCurrentUser?{appState:{...t,userToFollow:null},captureUpdate:B.EVENTUALLY}:{appState:{...t,userToFollow:{socketId:n.socketId,username:n.username||""},openMenu:t.openMenu==="canvas"?null:t.openMenu},captureUpdate:B.EVENTUALLY},PanelComponent:({updateData:e,data:t,appState:n})=>{let{socketId:a,collaborator:i,withName:r,isBeingFollowed:s}=t,l=yf(a,i),c=te({"is-followed":s,"is-current-user":i.isCurrentUser===!0,"is-speaking":i.isSpeaking,"is-in-call":i.isInCall,"is-muted":i.isMuted}),d=i.isInCall?i.isSpeaking?f.jsxs("div",{className:"UserList__collaborator-status-icon-speaking-indicator",title:M("userList.hint.isSpeaking"),children:[f.jsx("div",{}),f.jsx("div",{}),f.jsx("div",{})]}):i.isMuted?f.jsx("div",{className:"UserList__collaborator-status-icon-microphone-muted",title:M("userList.hint.micMuted"),children:UT}):f.jsx("div",{title:M("userList.hint.inCall"),children:pT}):null;return r?f.jsxs("div",{className:`dropdown-menu-item dropdown-menu-item-base UserList__collaborator ${c}`,style:{"--avatar-size":"1.5rem"},onClick:()=>e(i),children:[f.jsx(V6,{color:l,onClick:()=>{},name:i.username||"",src:i.avatarUrl,className:c}),f.jsx("div",{className:"UserList__collaborator-name",children:i.username}),f.jsxs("div",{className:"UserList__collaborator-status-icons","aria-hidden":!0,children:[s&&f.jsx("div",{className:"UserList__collaborator-status-icon-is-followed",title:M("userList.hint.followStatus"),children:ap}),d]})]}):f.jsxs("div",{className:`UserList__collaborator UserList__collaborator--avatar-only ${c}`,children:[f.jsx(V6,{color:l,onClick:()=>{e(i)},name:i.username||"",src:i.avatarUrl,className:c}),d&&f.jsx("div",{className:"UserList__collaborator-status-icon",children:d})]})}});var aX=Y({name:"addToLibrary",trackEvent:{category:"element"},perform:(e,t,n,a)=>{let i=a.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});for(let r of d8)if(i.some(s=>s.type===r))return{captureUpdate:B.EVENTUALLY,appState:{...t,errorMessage:M(`errors.libraryElementTypeError.${r}`)}};return a.library.getLatestLibrary().then(r=>a.library.setLibrary([{id:Vn(),status:"unpublished",elements:i.map(ss),created:Date.now()},...r])).then(()=>({captureUpdate:B.EVENTUALLY,appState:{...t,toast:{message:M("toast.addedToLibrary")}}})).catch(r=>({captureUpdate:B.EVENTUALLY,appState:{...t,errorMessage:r.message}}))},label:"labels.addToLibrary"}),iX=(e,t,n,a)=>{let i=qu(e,t),r=da(e);return i.flatMap(s=>{let l=rX(s,r,n);return s.map(c=>{let d=V(c,{x:c.x+l.x,y:c.y+l.y});return xn(c,a.getNonDeletedElementsMap(),{simultaneouslyUpdated:s}),d})})},rX=(e,t,{axis:n,position:a})=>{let i=da(e),[r,s]=n==="x"?["minX","maxX"]:["minY","maxY"],l={x:0,y:0};return a==="start"?{...l,[n]:t[r]-i[r]}:a==="end"?{...l,[n]:t[s]-i[s]}:{...l,[n]:(t[r]+t[s])/2-(i[r]+i[s])/2}},Tn=(e,t)=>{let n=t.scene.getSelectedElements(e);return n.length>1&&!n.some(a=>ce(a))},ml=(e,t,n,a)=>{let i=n.scene.getSelectedElements(t),r=oe(e),s=iX(i,r,a,n.scene),l=oe(s);return al(e.map(c=>l.get(c.id)||c),t,n)};Y({name:"alignTop",label:"labels.alignTop",icon:D2,trackEvent:{category:"element"},predicate:(e,t,n,a)=>Tn(t,a),perform:(e,t,n,a)=>({appState:t,elements:ml(e,t,a,{position:"start",axis:"y"}),captureUpdate:B.IMMEDIATELY}),keyTest:e=>e[R.CTRL_OR_CMD]&&e.shiftKey&&e.key===R.ARROW_UP,PanelComponent:({elements:e,appState:t,updateData:n,app:a})=>f.jsx(Me,{hidden:!Tn(t,a),type:"button",icon:D2,onClick:()=>n(null),title:`${M("labels.alignTop")} — ${W("CtrlOrCmd+Shift+Up")}`,"aria-label":M("labels.alignTop"),visible:_t(Ve(e),t)})});Y({name:"alignBottom",label:"labels.alignBottom",icon:L2,trackEvent:{category:"element"},predicate:(e,t,n,a)=>Tn(t,a),perform:(e,t,n,a)=>({appState:t,elements:ml(e,t,a,{position:"end",axis:"y"}),captureUpdate:B.IMMEDIATELY}),keyTest:e=>e[R.CTRL_OR_CMD]&&e.shiftKey&&e.key===R.ARROW_DOWN,PanelComponent:({elements:e,appState:t,updateData:n,app:a})=>f.jsx(Me,{hidden:!Tn(t,a),type:"button",icon:L2,onClick:()=>n(null),title:`${M("labels.alignBottom")} — ${W("CtrlOrCmd+Shift+Down")}`,"aria-label":M("labels.alignBottom"),visible:_t(Ve(e),t)})});Y({name:"alignLeft",label:"labels.alignLeft",icon:P2,trackEvent:{category:"element"},predicate:(e,t,n,a)=>Tn(t,a),perform:(e,t,n,a)=>({appState:t,elements:ml(e,t,a,{position:"start",axis:"x"}),captureUpdate:B.IMMEDIATELY}),keyTest:e=>e[R.CTRL_OR_CMD]&&e.shiftKey&&e.key===R.ARROW_LEFT,PanelComponent:({elements:e,appState:t,updateData:n,app:a})=>f.jsx(Me,{hidden:!Tn(t,a),type:"button",icon:P2,onClick:()=>n(null),title:`${M("labels.alignLeft")} — ${W("CtrlOrCmd+Shift+Left")}`,"aria-label":M("labels.alignLeft"),visible:_t(Ve(e),t)})});Y({name:"alignRight",label:"labels.alignRight",icon:N2,trackEvent:{category:"element"},predicate:(e,t,n,a)=>Tn(t,a),perform:(e,t,n,a)=>({appState:t,elements:ml(e,t,a,{position:"end",axis:"x"}),captureUpdate:B.IMMEDIATELY}),keyTest:e=>e[R.CTRL_OR_CMD]&&e.shiftKey&&e.key===R.ARROW_RIGHT,PanelComponent:({elements:e,appState:t,updateData:n,app:a})=>f.jsx(Me,{hidden:!Tn(t,a),type:"button",icon:N2,onClick:()=>n(null),title:`${M("labels.alignRight")} — ${W("CtrlOrCmd+Shift+Right")}`,"aria-label":M("labels.alignRight"),visible:_t(Ve(e),t)})});Y({name:"alignVerticallyCentered",label:"labels.centerVertically",icon:O2,trackEvent:{category:"element"},predicate:(e,t,n,a)=>Tn(t,a),perform:(e,t,n,a)=>({appState:t,elements:ml(e,t,a,{position:"center",axis:"y"}),captureUpdate:B.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n,app:a})=>f.jsx(Me,{hidden:!Tn(t,a),type:"button",icon:O2,onClick:()=>n(null),title:M("labels.centerVertically"),"aria-label":M("labels.centerVertically"),visible:_t(Ve(e),t)})});Y({name:"alignHorizontallyCentered",label:"labels.centerHorizontally",icon:$2,trackEvent:{category:"element"},predicate:(e,t,n,a)=>Tn(t,a),perform:(e,t,n,a)=>({appState:t,elements:ml(e,t,a,{position:"center",axis:"x"}),captureUpdate:B.IMMEDIATELY}),PanelComponent:({elements:e,appState:t,updateData:n,app:a})=>f.jsx(Me,{hidden:!Tn(t,a),type:"button",icon:$2,onClick:()=>n(null),title:M("labels.centerHorizontally"),"aria-label":M("labels.centerHorizontally"),visible:_t(Ve(e),t)})});var sX=(e,t,n)=>{let[a,i,r,s]=n.axis==="x"?["minX","midX","maxX","width"]:["minY","midY","maxY","height"],l=da(e),c=qu(e,t).map(h=>[h,da(h)]).sort((h,p)=>h[1][i]-p[1][i]),d=0;for(let h of c)d+=h[1][s];let o=(l[s]-d)/(c.length-1);if(o<0){let h=c.findIndex(g=>g[1][a]===l[a]),p=c.findIndex(g=>g[1][r]===l[r]),U=(c[p][1][i]-c[h][1][i])/(c.length-1),m=c[h][1][i];return c.flatMap(([g,b],x)=>{let v={x:0,y:0};return x!==h&&x!==p&&(m+=U,v[n.axis]=m-b[i]),g.map(y=>pe(y,{x:y.x+v.x,y:y.y+v.y}))})}let u=l[a];return c.flatMap(([h,p])=>{let U={x:0,y:0};return U[n.axis]=u-p[a],u+=o,u+=p[s],h.map(m=>pe(m,{x:m.x+U.x,y:m.y+U.y}))})},Hv=(e,t)=>{let n=t.scene.getSelectedElements(e);return n.length>1&&!n.some(a=>ce(a))},Xv=(e,t,n,a)=>{let i=n.scene.getSelectedElements(t),r=sX(i,n.scene.getNonDeletedElementsMap(),a),s=oe(r);return al(e.map(l=>s.get(l.id)||l),t,n)};Y({name:"distributeHorizontally",label:"labels.distributeHorizontally",trackEvent:{category:"element"},perform:(e,t,n,a)=>({appState:t,elements:Xv(e,t,a,{axis:"x"}),captureUpdate:B.IMMEDIATELY}),keyTest:e=>!e[R.CTRL_OR_CMD]&&e.altKey&&e.code===Te.H,PanelComponent:({elements:e,appState:t,updateData:n,app:a})=>f.jsx(Me,{hidden:!Hv(t,a),type:"button",icon:b_,onClick:()=>n(null),title:`${M("labels.distributeHorizontally")} — ${W("Alt+H")}`,"aria-label":M("labels.distributeHorizontally"),visible:_t(Ve(e),t)})});Y({name:"distributeVertically",label:"labels.distributeVertically",trackEvent:{category:"element"},perform:(e,t,n,a)=>({appState:t,elements:Xv(e,t,a,{axis:"y"}),captureUpdate:B.IMMEDIATELY}),keyTest:e=>!e[R.CTRL_OR_CMD]&&e.altKey&&e.code===Te.V,PanelComponent:({elements:e,appState:t,updateData:n,app:a})=>f.jsx(Me,{hidden:!Hv(t,a),type:"button",icon:v_,onClick:()=>n(null),title:`${M("labels.distributeVertically")} — ${W("Alt+V")}`,"aria-label":M("labels.distributeVertically"),visible:_t(Ve(e),t)})});var lX=Y({name:"flipHorizontal",label:"labels.flipHorizontal",icon:vT,trackEvent:{category:"element"},perform:(e,t,n,a)=>({elements:al(Wv(e,a.scene.getNonDeletedElementsMap(),t,"horizontal",a),t,a),appState:t,captureUpdate:B.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===Te.H}),oX=Y({name:"flipVertical",label:"labels.flipVertical",icon:bT,trackEvent:{category:"element"},perform:(e,t,n,a)=>({elements:al(Wv(e,a.scene.getNonDeletedElementsMap(),t,"vertical",a),t,a),appState:t,captureUpdate:B.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===Te.V&&!e[R.CTRL_OR_CMD]}),Wv=(e,t,n,a,i)=>{let r=ve(Ve(e),n,{includeBoundTextElement:!0,includeElementsInFrames:!0}),s=cX(r,t,n,a,i),l=oe(s);return e.map(c=>l.get(c.id)||c)},cX=(e,t,n,a,i)=>{if(e.every(p=>xe(p)&&(p.startBinding||p.endBinding)))return e.map(p=>{let U=p;return pe(U,{startArrowhead:U.endArrowhead,endArrowhead:U.startArrowhead})});let{midX:r,midY:s}=da(e);q3(e,t,"nw",i.scene,new Map(Array.from(t.values()).map(p=>[p.id,ss(p)])),{flipByX:a==="horizontal",flipByY:a==="vertical",shouldResizeFromCenter:!0,shouldMaintainAspectRatio:!0}),eu(e.filter(ue),t,i.scene.getNonDeletedElements(),i.scene,Tr(n),[],n.zoom);let{elbowArrows:l,otherElements:c}=e.reduce((p,U)=>Q(U)?{...p,elbowArrows:p.elbowArrows.concat(U)}:{...p,otherElements:p.otherElements.concat(U)},{elbowArrows:[],otherElements:[]}),{midX:d,midY:o}=da(e),[u,h]=[r-d,s-o];return c.forEach(p=>V(p,{x:p.x+u,y:p.y+h})),l.forEach(p=>V(p,{x:p.x+u,y:p.y+h})),e},wd=Y({name:"copy",label:"labels.copy",icon:w1,trackEvent:{category:"element"},perform:async(e,t,n,a)=>{let i=a.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});try{await T3(i,a.files,n)}catch(r){return{captureUpdate:B.EVENTUALLY,appState:{...t,errorMessage:r.message}}}return{captureUpdate:B.EVENTUALLY}},keyTest:void 0}),G6=Y({name:"paste",label:"labels.paste",trackEvent:{category:"element"},perform:async(e,t,n,a)=>{let i;try{i=await yO()}catch(r){return r.name==="AbortError"||r.name==="NotAllowedError"?!1:(console.error(`actionPaste ${r.name}: ${r.message}`),Co?{captureUpdate:B.EVENTUALLY,appState:{...t,errorMessage:M("hints.firefox_clipboard_write")}}:{captureUpdate:B.EVENTUALLY,appState:{...t,errorMessage:M("errors.asyncPasteFailedOnRead")}})}try{a.pasteFromClipboard(gO({types:i}))}catch(r){return console.error(r),{captureUpdate:B.EVENTUALLY,appState:{...t,errorMessage:M("errors.asyncPasteFailedOnParse")}}}return{captureUpdate:B.EVENTUALLY}},keyTest:void 0}),Y6=Y({name:"cut",label:"labels.cut",icon:aT,trackEvent:{category:"element"},perform:(e,t,n,a)=>(wd.perform(e,t,n,a),mv.perform(e,t,null,a)),keyTest:e=>e[R.CTRL_OR_CMD]&&e.key===R.X}),Z6=Y({name:"copyAsSvg",label:"labels.copyAsSvg",icon:xT,trackEvent:{category:"element"},perform:async(e,t,n,a)=>{if(!a.canvas)return{captureUpdate:B.EVENTUALLY};let{exportedElements:i,exportingFrame:r}=vf(e,t,!0);try{await xf("clipboard-svg",i,t,a.files,{...t,exportingFrame:r,name:a.getName()});let s=a.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});return{appState:{toast:{message:M("toast.copyToClipboardAsSvg",{exportSelection:s.length?M("toast.selection"):M("toast.canvas"),exportColorScheme:t.exportWithDarkMode?M("buttons.darkMode"):M("buttons.lightMode")})}},captureUpdate:B.EVENTUALLY}}catch(s){return console.error(s),{appState:{errorMessage:s.message},captureUpdate:B.EVENTUALLY}}},predicate:e=>Rp&&e.length>0,keywords:["svg","clipboard","copy"]}),K6=Y({name:"copyAsPng",label:"labels.copyAsPng",icon:yT,trackEvent:{category:"element"},perform:async(e,t,n,a)=>{if(!a.canvas)return{captureUpdate:B.EVENTUALLY};let i=a.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),{exportedElements:r,exportingFrame:s}=vf(e,t,!0);try{return await xf("clipboard",r,t,a.files,{...t,exportingFrame:s,name:a.getName()}),{appState:{...t,toast:{message:M("toast.copyToClipboardAsPng",{exportSelection:i.length?M("toast.selection"):M("toast.canvas"),exportColorScheme:t.exportWithDarkMode?M("buttons.darkMode"):M("buttons.lightMode")})}},captureUpdate:B.EVENTUALLY}}catch(l){return console.error(l),{appState:{...t,errorMessage:l.message},captureUpdate:B.EVENTUALLY}}},predicate:e=>Dp&&e.length>0,keyTest:e=>e.code===Te.C&&e.altKey&&e.shiftKey,keywords:["png","clipboard","copy"]}),q6=Y({name:"copyText",label:"labels.copyText",trackEvent:{category:"element"},perform:(e,t,n,a)=>{let i=a.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0});try{pl(Y7(i))}catch{throw new Error(M("errors.copyToSystemClipboardFailed"))}return{captureUpdate:B.EVENTUALLY}},predicate:(e,t,n,a)=>Rp&&a.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0}).some(q),keywords:["text","clipboard","copy"]}),J6=Y({name:"gridMode",icon:CT,keywords:["snap"],label:"labels.toggleGrid",viewMode:!0,trackEvent:{category:"canvas",predicate:e=>e.gridModeEnabled},perform(e,t){return{appState:{...t,gridModeEnabled:!this.checked(t),objectsSnapModeEnabled:!1},captureUpdate:B.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,t,n)=>n.gridModeEnabled===void 0,keyTest:e=>e[R.CTRL_OR_CMD]&&e.code===Te.QUOTE}),f0=Y({name:"zenMode",label:"buttons.zenMode",icon:ET,paletteName:"Toggle zen mode",viewMode:!0,trackEvent:{category:"canvas",predicate:e=>!e.zenModeEnabled},perform(e,t){return{appState:{...t,zenModeEnabled:!this.checked(t)},captureUpdate:B.EVENTUALLY}},checked:e=>e.zenModeEnabled,predicate:(e,t,n)=>typeof n.zenModeEnabled>"u",keyTest:e=>!e[R.CTRL_OR_CMD]&&e.altKey&&e.code===Te.Z}),dX=Y({name:"objectsSnapMode",label:"buttons.objectsSnapMode",icon:wT,viewMode:!1,trackEvent:{category:"canvas",predicate:e=>!e.objectsSnapModeEnabled},perform(e,t){return{appState:{...t,objectsSnapModeEnabled:!this.checked(t),gridModeEnabled:!1},captureUpdate:B.EVENTUALLY}},checked:e=>e.objectsSnapModeEnabled,predicate:(e,t,n)=>typeof n.objectsSnapModeEnabled>"u",keyTest:e=>!e[R.CTRL_OR_CMD]&&e.altKey&&e.code===Te.S}),h0=Y({name:"stats",label:"stats.fullTitle",icon:gT,paletteName:"Toggle stats",viewMode:!0,trackEvent:{category:"menu"},keywords:["edit","attributes","customize"],perform(e,t){return{appState:{...t,stats:{...t.stats,open:!this.checked(t)}},captureUpdate:B.EVENTUALLY}},checked:e=>e.stats.open,keyTest:e=>!e[R.CTRL_OR_CMD]&&e.altKey&&e.code===Te.SLASH}),uX=Y({name:"unbindText",label:"labels.unbindText",trackEvent:{category:"element"},predicate:(e,t,n,a)=>a.scene.getSelectedElements(t).some(i=>Wn(i)),perform:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t),r=a.scene.getNonDeletedElementsMap();return i.forEach(s=>{let l=ge(s,r);if(l){let{width:c,height:d}=an(l.originalText,Xe(l),l.lineHeight),o=eN(s.id);V7(s.id);let{x:u,y:h}=Qu(s,l,r);V(l,{containerId:null,width:c,height:d,text:l.originalText,x:u,y:h}),V(s,{boundElements:s.boundElements?.filter(p=>p.id!==l.id),height:o||s.height})}}),{elements:e,appState:t,captureUpdate:B.IMMEDIATELY}}}),fX=Y({name:"bindText",label:"labels.bindText",trackEvent:{category:"element"},predicate:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t);if(i.length===2){let r=q(i[0])||q(i[1]),s;if(Lr(i[0])?s=i[0]:Lr(i[1])&&(s=i[1]),r&&s&&ge(s,a.scene.getNonDeletedElementsMap())===null)return!0}return!1},perform:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t),r,s;q(i[0])&&Lr(i[1])?(r=i[0],s=i[1]):(r=i[1],s=i[0]),V(r,{containerId:s.id,verticalAlign:Mn.MIDDLE,textAlign:Io.CENTER,autoResize:!0}),V(s,{boundElements:(s.boundElements||[]).concat({type:"text",id:r.id})});let l=s.height;return on(r,s,a.scene.getNonDeletedElementsMap()),nu(s.id,l),{elements:hX(e,s,r),appState:{...t,selectedElementIds:{[s.id]:!0}},captureUpdate:B.IMMEDIATELY}}}),hX=(e,t,n)=>{let a=e.slice(),i=a.findIndex(s=>s.id===n.id);a.splice(i,1);let r=a.findIndex(s=>s.id===t.id);return a.splice(r+1,0,n),Wa(a,oe([t,n])),a},pX=(e,t,n)=>{let a=e.slice(),i=a.findIndex(s=>s.id===t.id);a.splice(i,1);let r=a.findIndex(s=>s.id===n.id);return a.splice(r,0,t),Wa(a,oe([t,n])),a},UX=Y({name:"wrapTextInContainer",label:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t),r=i.every(s=>q(s));return i.length>0&&r},perform:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t),r=e.slice(),s={};for(let l of i)if(q(l)){let c=Xa({type:"rectangle",backgroundColor:t.currentItemBackgroundColor,boundElements:[...l.boundElements||[],{id:l.id,type:"text"}],angle:l.angle,fillStyle:t.currentItemFillStyle,strokeColor:t.currentItemStrokeColor,roughness:t.currentItemRoughness,strokeWidth:t.currentItemStrokeWidth,strokeStyle:t.currentItemStrokeStyle,roundness:t.currentItemRoundness==="round"?{type:fl("rectangle")?St.ADAPTIVE_RADIUS:St.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:l.x-It,y:l.y-It,width:Qr(l.width,"rectangle"),height:Qr(l.height,"rectangle"),groupIds:l.groupIds,frameId:l.frameId});if(l.boundElements?.length){let d=l.boundElements.filter(o=>o.type==="arrow").map(o=>o.id);r.filter(o=>d.includes(o.id)).forEach(o=>{let u=o.startBinding,h=o.endBinding;u?.elementId===l.id&&(u={...u,elementId:c.id}),h?.elementId===l.id&&(h={...h,elementId:c.id}),(u||h)&&V(o,{startBinding:u,endBinding:h},!1)})}V(l,{containerId:c.id,verticalAlign:Mn.MIDDLE,boundElements:null,textAlign:Io.CENTER,autoResize:!0},!1),on(l,c,a.scene.getNonDeletedElementsMap()),r=pX([...r,c],c,l),s[c.id]=!0}return{elements:r,appState:{...t,selectedElementIds:s},captureUpdate:B.IMMEDIATELY}}}),bU=380,mX=42,p0=5,Vv=85,gX=500,U0=!1,Hc=new Map,bX=({element:e,elementsMap:t,setAppState:n,onLinkOpen:a,setToast:i,updateEmbedValidationStatus:r})=>{let s=Uc(),l=pc(),c=Tt(),d=e.link||"",[o,u]=S.useState(d),h=S.useRef(null),p=s.showHyperlinkPopup==="editor",U=S.useCallback(()=>{if(!h.current)return;let v=yn(h.current.value)||null;if(!e.link&&v&&qe("hyperlink","create"),Un(e)){if(s.activeEmbeddable?.element===e&&n({activeEmbeddable:null}),!v){V(e,{link:null}),r(e,!1);return}if(!hd(v,l.validateEmbeddable))v&&i({message:M("toast.unableToEmbed"),closable:!0}),e.link&&Hc.set(e.id,e.link),V(e,{link:v}),r(e,!1);else{let{width:y,height:w}=e,k=As(v);k?.error instanceof URIError&&i({message:M("toast.unrecognizedLinkFormat"),closable:!0});let C=k?k.intrinsicSize.w/k.intrinsicSize.h:1,I=Hc.get(e.id)!==e.link;V(e,{...I?{width:k?.type==="video"?y>w?y:w*C:y,height:k?.type==="video"&&y>w?y/C:w}:{},link:v}),r(e,!0),Hc.has(e.id)&&Hc.delete(e.id)}}else V(e,{link:v})},[e,i,l.validateEmbeddable,s.activeEmbeddable,n,r]);S.useLayoutEffect(()=>()=>{U()},[U]),S.useEffect(()=>{p&&h?.current&&!(c.viewport.isMobile||c.isTouchScreen)&&h.current.select()},[p,c.viewport.isMobile,c.isTouchScreen]),S.useEffect(()=>{let v=null,y=w=>{p||(v&&clearTimeout(v),yX(e,t,s,E(w.clientX,w.clientY))&&(v=window.setTimeout(()=>{n({showHyperlinkPopup:!1})},gX)))};return window.addEventListener("pointermove",y,!1),()=>{window.removeEventListener("pointermove",y,!1),v&&clearTimeout(v)}},[s,e,p,n,t]);let m=S.useCallback(()=>{qe("hyperlink","delete"),V(e,{link:null}),n({showHyperlinkPopup:!1})},[n,e]),g=()=>{qe("hyperlink","edit","popup-ui"),n({showHyperlinkPopup:"editor"})},{x:b,y:x}=Gv(e,s,t);return s.contextMenu||s.selectedElementsAreBeingDragged||s.resizingElement||s.isRotating||s.openMenu||s.viewModeEnabled?null:f.jsxs("div",{className:"excalidraw-hyperlinkContainer",style:{top:`${x}px`,left:`${b}px`,width:bU,padding:p0},children:[p?f.jsx("input",{className:te("excalidraw-hyperlinkContainer-input"),placeholder:M("labels.link.hint"),ref:h,value:o,onChange:v=>u(v.target.value),autoFocus:!0,onKeyDown:v=>{v.stopPropagation(),v[R.CTRL_OR_CMD]&&v.key===R.K&&v.preventDefault(),(v.key===R.ENTER||v.key===R.ESCAPE)&&(U(),n({showHyperlinkPopup:"info"}))}}):e.link?f.jsx("a",{href:yn(e.link||""),className:"excalidraw-hyperlinkContainer-link",target:Z7(e.link)?"_self":"_blank",onClick:v=>{if(e.link&&a){let y=k8("excalidraw-link",v.nativeEvent);a({...e,link:yn(e.link)},y),y.defaultPrevented&&v.preventDefault()}},rel:"noopener noreferrer",children:e.link}):f.jsx("div",{className:"excalidraw-hyperlinkContainer-link",children:M("labels.link.empty")}),f.jsxs("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!p&&f.jsx(Me,{type:"button",title:M("buttons.edit"),"aria-label":M("buttons.edit"),label:M("buttons.edit"),onClick:g,className:"excalidraw-hyperlinkContainer--edit",icon:Ao}),f.jsx(Me,{type:"button",title:M("labels.linkToElement"),"aria-label":M("labels.linkToElement"),label:M("labels.linkToElement"),onClick:()=>{n({openDialog:{name:"elementLinkSelector",sourceElementId:e.id}})},icon:Q8}),d&&!Un(e)&&f.jsx(Me,{type:"button",title:M("buttons.remove"),"aria-label":M("buttons.remove"),label:M("buttons.remove"),onClick:m,className:"excalidraw-hyperlinkContainer--remove",icon:Zr})]})]})},Gv=(e,t,n)=>{let[a,i]=he(e,n),{x:r,y:s}=Nn({sceneX:a+e.width/2,sceneY:i},t),l=r-t.offsetLeft-bU/2,c=s-t.offsetTop-Vv;return{x:l,y:c}},Q6=(e,t)=>{let n=ve(e,t);return Un(n[0])?"labels.link.editEmbed":n[0]?.link?"labels.link.edit":"labels.link.create"},ho=null,vX=(e,t,n)=>{ho&&clearTimeout(ho),ho=window.setTimeout(()=>xX(e,t,n),RM)},xX=(e,t,n)=>{if(!e.link)return;let a=uo();a.classList.add("excalidraw-tooltip--visible"),a.style.maxWidth="20rem",a.textContent=Ns(e.link)?M("labels.link.goToElement"):e.link;let[i,r,s,l]=he(e,n),[c,d,o,u]=yp([i,r,s,l],e.angle,t),h=Nn({sceneX:c,sceneY:d},t);Nv(a,{left:h.x,top:h.y,width:o,height:u},"top"),qe("hyperlink","tooltip","link-icon"),U0=!0},e5=()=>{ho&&clearTimeout(ho),U0&&(U0=!1,uo().classList.remove("excalidraw-tooltip--visible"))},yX=(e,t,n,[a,i])=>{let{x:r,y:s}=Ge({clientX:a,clientY:i},n),l=15/n.zoom.value;if(sp(r,s,e,t))return!1;let[c,d,o]=he(e,t);if(r>=c&&r<=o&&s>=d-Vv&&s<=d)return!1;let{x:u,y:h}=Gv(e,n,t);return!(a>=u-l&&a<=u+bU+p0*2+l&&i>=h-l&&i<=h+l+p0*2+mX)},Yv=Y({name:"hyperlink",label:(e,t)=>Q6(e,t),icon:k1,perform:(e,t)=>t.showHyperlinkPopup==="editor"?!1:{elements:e,appState:{...t,showHyperlinkPopup:"editor",openMenu:null},captureUpdate:B.IMMEDIATELY},trackEvent:{category:"hyperlink",action:"click"},keyTest:e=>e[R.CTRL_OR_CMD]&&e.key===R.K,predicate:(e,t)=>ve(e,t).length===1,PanelComponent:({elements:e,appState:t,updateData:n})=>{let a=ve(e,t);return f.jsx(Me,{type:"button",icon:k1,"aria-label":M(Q6(e,t)),title:`${Un(e[0])?M("labels.link.labelEmbed"):M("labels.link.label")} - ${W("CtrlOrCmd+K")}`,onClick:()=>n(null),selected:a.length===1&&!!a[0].link})}}),Lh=e=>e.every(t=>!t.locked),wX=Y({name:"toggleElementLock",label:(e,t,n)=>{let a=n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!1});return a.length===1&&!ce(a[0])?a[0].locked?"labels.elementLock.unlock":"labels.elementLock.lock":Lh(a)?"labels.elementLock.lockAll":"labels.elementLock.unlockAll"},icon:(e,t)=>{let n=ve(t,e);return Lh(n)?Q0:Fu},trackEvent:{category:"element"},predicate:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t);return i.length>0&&!i.some(r=>r.locked&&r.frameId)},perform:(e,t,n,a)=>{let i=a.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});if(!i.length)return!1;let r=Lh(i),s=oe(i);return{elements:e.map(l=>s.has(l.id)?pe(l,{locked:r}):l),appState:{...t,selectedLinearElement:r?null:t.selectedLinearElement},captureUpdate:B.IMMEDIATELY}},keyTest:(e,t,n,a)=>e.key.toLocaleLowerCase()===R.L&&e[R.CTRL_OR_CMD]&&e.shiftKey&&a.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!1}).length>0}),EX=Y({name:"unlockAllElements",paletteName:"Unlock all elements",trackEvent:{category:"canvas"},viewMode:!1,icon:Fu,predicate:(e,t)=>ve(e,t).length===0&&e.some(n=>n.locked),perform:(e,t)=>{let n=e.filter(a=>a.locked);return{elements:e.map(a=>a.locked?pe(a,{locked:!1}):a),appState:{...t,selectedElementIds:Object.fromEntries(n.map(a=>[a.id,!0]))},captureUpdate:B.IMMEDIATELY}},label:"labels.elementLock.unlockAll"}),SX=()=>{let[e,t]=S.useState(null),n=S.useCallback(a=>t(a),[]);return[e,n]},kX=e=>{let{closeOnClickOutside:t=!0}=e,n=Cv({className:"excalidraw-modal-container"}),a=S.useRef(document.body.classList.contains("excalidraw-animations-disabled"));if(!n)return null;let i=r=>{r.key===R.ESCAPE&&(r.nativeEvent.stopImmediatePropagation(),r.stopPropagation(),e.onCloseRequest())};return Ft.createPortal(f.jsxs("div",{className:te("Modal",e.className,{"animations-disabled":a.current}),role:"dialog","aria-modal":"true",onKeyDown:i,"aria-labelledby":e.labelledBy,"data-prevent-outside-click":!0,children:[f.jsx("div",{className:"Modal__background",onClick:t?e.onCloseRequest:void 0}),f.jsx("div",{className:"Modal__content",style:{"--max-width":`${e.maxWidth}px`},tabIndex:0,children:e.children})]}),n)},Zv=Xt(new Map),t5=async e=>await af({elements:e,appState:{exportBackground:!1,viewBackgroundColor:Ee.white},files:null,renderEmbeddables:!1,skipInliningFonts:!0}),CX=(e,t,n)=>{let[a,i]=S.useState();return S.useEffect(()=>{if(t)if(e){let r=n.get(e);r?i(r):(async()=>{let s=await t5(t);s.querySelector(".style-fonts")?.remove(),s&&(n.set(e,s),i(s))})()}else(async()=>{let r=await t5(t);i(r)})()},[e,t,n,i]),a},Kv=()=>{let[e]=gt(Zv);return{clearLibraryCache:()=>e.clear(),deleteItemsFromLibraryCache:t=>{t.forEach(n=>e.delete(n))},svgCache:e}},MX=class{constructor(){j(this,"jobs",[]),j(this,"running",!1)}tick(){if(this.running)return;let e=this.jobs.shift();e?(this.running=!0,e.promise.resolve(ar(e.jobFactory,...e.args).finally(()=>{this.running=!1,this.tick()}))):this.running=!1}push(e,...t){let n=E8();return this.jobs.push({jobFactory:e,promise:n,args:t}),this.tick(),n}},IX=["excalidraw.com","raw.githubusercontent.com/excalidraw/excalidraw-libraries"],qv=new Ia,Ho=Xt({status:"loaded",isInitialized:!1,libraryItems:[]}),jl=e=>di(e),_X=(e,t)=>!e.find(n=>n.elements.length!==t.elements.length?!1:n.elements.every((a,i)=>a.id===t.elements[i].id&&a.versionNonce===t.elements[i].versionNonce)),Jv=(e,t)=>{let n=[];for(let a of t)_X(e,a)&&n.push(a);return[...n,...e]},Qv=(e,t)=>{let n=oe(t),a={deletedItems:new Map,addedItems:new Map};for(let r of e)n.has(r.id)||a.deletedItems.set(r.id,r);let i=oe(e);for(let r of t)i.has(r.id)||a.addedItems.set(r.id,r);return a},TX=class{constructor(e){j(this,"currLibraryItems",[]),j(this,"prevLibraryItems",jl(this.currLibraryItems)),j(this,"app"),j(this,"updateQueue",[]),j(this,"getLastUpdateTask",()=>this.updateQueue[this.updateQueue.length-1]),j(this,"notifyListeners",()=>{if(this.updateQueue.length>0)sa.set(Ho,t=>({status:"loading",libraryItems:this.currLibraryItems,isInitialized:t.isInitialized}));else{sa.set(Ho,{status:"loaded",libraryItems:this.currLibraryItems,isInitialized:!0});try{let t=this.prevLibraryItems;this.prevLibraryItems=jl(this.currLibraryItems);let n=jl(this.currLibraryItems);this.app.props.onLibraryChange?.(n),qv.trigger(Qv(t,n),n)}catch(t){console.error(t)}}}),j(this,"destroy",()=>{this.updateQueue=[],this.currLibraryItems=[],sa.set(Zv,new Map)}),j(this,"resetLibrary",()=>this.setLibrary([])),j(this,"getLatestLibrary",()=>new Promise(async t=>{try{let n=await(this.getLastUpdateTask()||this.currLibraryItems);this.updateQueue.length>0?t(this.getLatestLibrary()):t(jl(n))}catch{return t(this.currLibraryItems)}})),j(this,"updateLibrary",async({libraryItems:t,prompt:n=!1,merge:a=!1,openLibraryMenu:i=!1,defaultStatus:r="unpublished"})=>(i&&this.app.setState({openSidebar:{name:oa.name,tab:Fd}}),this.setLibrary(()=>new Promise(async(s,l)=>{try{let c=await(typeof t=="function"&&!(t instanceof Blob)?t(this.currLibraryItems):t),d;c instanceof Blob?d=await r4(c,r):d=lc(c,r),!n||window.confirm(M("alerts.confirmAddLibrary",{numShapes:d.length}))?(n&&this.app.focusContainer(),s(a?Jv(this.currLibraryItems,d):d)):l(new Hu)}catch(c){l(c)}})))),j(this,"setLibrary",t=>{let n=new Promise(async(a,i)=>{try{await this.getLastUpdateTask(),typeof t=="function"&&(t=t(this.currLibraryItems)),this.currLibraryItems=jl(await t),a(this.currLibraryItems)}catch(r){i(r)}}).catch(a=>{if(a.name==="AbortError")return console.warn("Library update aborted by user"),this.currLibraryItems;throw a}).finally(()=>{this.updateQueue=this.updateQueue.filter(a=>a!==n),this.notifyListeners()});return this.updateQueue.push(n),this.notifyListeners(),n}),this.app=e}},AX=TX,ex=e=>{let t=Math.ceil(Math.sqrt(e.length)),n=[],a=h=>e.slice(h*t,h*t+t).reduce((p,U)=>{let{height:m}=da(U.elements);return Math.max(p,m)},0),i=h=>{let p=0,U=0,m=0;for(let g of e){if(p%t===0&&(U=0),U===h){let{width:b}=da(g.elements);m=Math.max(m,b)}p++,U++}return m},r=0,s=0,l=0,c=0,d=0,o=0,u=0;for(let h of e){d&&d%t===0&&(s+=l+50,r=0,o=0,u++),o===0&&(l=a(u)),c=i(o);let{minX:p,minY:U,width:m,height:g}=da(h.elements),b=(c-m)/2,x=(l-g)/2;n.push(...h.elements.map(v=>({...v,x:v.x+r+b-p,y:v.y+s+x-U}))),r+=c+50,d++,o++}return n},jX=(e,t=IX)=>{if(typeof t=="function"?t(e):t.some(n=>{let a=new URL(`https://${n.replace(/^https?:\/\//,"")}`),{hostname:i,pathname:r}=new URL(e);return new RegExp(`(^|\\.)${a.hostname}$`).test(i)&&new RegExp(`^${a.pathname.replace(/\/+$/,"")}(/+|$)`).test(r)}))return!0;throw new Error(`Invalid or disallowed library URL: "${e}"`)},m0=()=>{let e=new URLSearchParams(window.location.hash.slice(1)).get(g1.addLibrary)||new URLSearchParams(window.location.search).get(m1.addLibrary),t=e?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return e?{libraryUrl:e,idToken:t}:null},Kl=class g0{constructor(t){j(this,"adapter"),this.adapter=t}static async getLibraryItems(t,n,a=!0){let i=()=>new Promise(async(r,s)=>{try{let l=await t.load({source:n});r(lc(l?.libraryItems||[],"published"))}catch(l){s(l)}});return a?g0.queue.push(i):i()}getLibraryItems(t){return g0.getLibraryItems(this.adapter,t,!1)}};j(Kl,"queue",new MX),j(Kl,"run",async(e,t)=>{let n=new Kl(e);return Kl.queue.push(()=>t(n))});var Ed=Kl,po=0,gu=0,bu=e=>Gp(e.map(t=>`${t.id}:${J3(t.elements)}`).sort().join()),n5=async(e,t)=>{try{return gu++,await Ed.run(e,async n=>{let a=oe(await n.getLibraryItems("save"));for(let[l]of t.deletedItems)a.delete(l);let i=[];for(let[l,c]of t.addedItems)a.has(l)?a.set(l,c):i.push(c);let r=i.concat(Array.from(a.values())),s=bu(r);return s!==po&&await e.save({libraryItems:r}),po=s,r})}finally{gu--}},RX=e=>{let{excalidrawAPI:t}=e,n=S.useRef(e);n.current=e;let a=S.useRef(!1);S.useEffect(()=>{if(!t)return;a.current=!1;let i=async({libraryUrl:l,idToken:c})=>{let d=new Promise(async(u,h)=>{try{l=decodeURIComponent(l),l=Up(l),jX(l,n.current.validateLibraryUrl);let p=await(await fetch(l)).blob();u(p)}catch(p){h(p)}}),o=c!==t.id;await(o&&document.hidden?new Promise(u=>{window.addEventListener("focus",()=>u(),{once:!0})}):null);try{await t.updateLibrary({libraryItems:d,prompt:o,merge:!0,defaultStatus:"published",openLibraryMenu:!0})}catch(u){throw t.updateScene({appState:{errorMessage:u.message}}),u}finally{if(window.location.hash.includes(g1.addLibrary)){let u=new URLSearchParams(window.location.hash.slice(1));u.delete(g1.addLibrary),window.history.replaceState({},U1,`#${u.toString()}`)}else if(window.location.search.includes(m1.addLibrary)){let u=new URLSearchParams(window.location.search);u.delete(m1.addLibrary),window.history.replaceState({},U1,`?${u.toString()}`)}}},r=l=>{l.preventDefault();let c=m0();c&&(l.stopImmediatePropagation(),window.history.replaceState({},"",l.oldURL),i(c))},s=m0();if(s&&i(s),"getInitialLibraryItems"in n.current&&n.current.getInitialLibraryItems&&(console.warn("useHandleLibrar `opts.getInitialLibraryItems` is deprecated. Use `opts.adapter` instead."),Promise.resolve(n.current.getInitialLibraryItems()).then(l=>{t.updateLibrary({libraryItems:l,merge:!0})}).catch(l=>{console.error(`UseHandeLibrary getInitialLibraryItems failed: ${l?.message}`)})),"adapter"in n.current&&n.current.adapter){let l=n.current.adapter,c=n.current.migrationAdapter,d=E8();c?d.resolve(ar(c.load).then(async o=>{let u=null;try{if(!o)return Ed.getLibraryItems(l,"load");u=lc(o.libraryItems||[],"published");let h=await n5(l,Qv([],u));try{await c.clear()}catch(p){console.error(`couldn't delete legacy library data: ${p.message}`)}return h}catch(h){return console.error(`couldn't migrate legacy library data: ${h.message}`),u}}).catch(o=>(console.error(`error during library migration: ${o.message}`),Ed.getLibraryItems(l,"load")))):d.resolve(ar(Ed.getLibraryItems,l,"load")),t.updateLibrary({libraryItems:d.then(o=>{let u=o||[];return po=bu(u),u}),merge:!0}).finally(()=>{a.current=!0})}return window.addEventListener("hashchange",r),()=>{window.removeEventListener("hashchange",r)}},[t]),S.useEffect(()=>{let i=qv.on(async(s,l)=>{let c=a.current,d="adapter"in n.current&&n.current.adapter||null;try{d&&po!==bu(l)&&await n5(d,s)}catch(o){console.error(`couldn't persist library update: ${o.message}`,s),c&&n.current.excalidrawAPI&&n.current.excalidrawAPI.updateScene({appState:{errorMessage:M("errors.saveLibraryError")}})}}),r=s=>{gu&&pI(s)};return window.addEventListener("beforeunload",r),()=>{window.removeEventListener("beforeunload",r),i(),po=0,gu=0}},[])},DX=S.forwardRef(({children:e,gap:t,align:n,justifyContent:a,className:i,style:r},s)=>f.jsx("div",{className:te("Stack Stack_horizontal",i),style:{"--gap":t,alignItems:n,justifyContent:a,...r},ref:s,children:e})),LX=S.forwardRef(({children:e,gap:t,align:n,justifyContent:a,className:i,style:r},s)=>f.jsx("div",{className:te("Stack Stack_vertical",i),style:{"--gap":t,justifyItems:n,justifyContent:a,...r},ref:s,children:e})),On={Row:DX,Col:LX},PX=({theme:e,id:t,libraryReturnUrl:n})=>{let a=n||window.location.origin+window.location.pathname;return f.jsx("a",{className:"library-menu-browse-button",href:`${be.VITE_APP_LIBRARY_URL}?target=${window.name||"_blank"}&referrer=${a}&useHash=true&token=${t}&theme=${e}&version=${Pu.excalidrawLibrary}`,target:"_excalidraw_libraries",children:M("labels.libraries")})},NX=PX,tx=({libraryReturnUrl:e,theme:t,id:n,style:a,children:i,className:r})=>f.jsxs("div",{className:te("library-menu-control-buttons",r),style:a,children:[f.jsx(NX,{id:n,libraryReturnUrl:e,theme:t}),i]}),OX=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,$X=/{{([\w-]+)}}/,FX=/<([\w-]+)>/,zX=/<\/([\w-]+)>/,BX=(e,t)=>{let n=[{name:"",children:[]}];return e.split(OX).filter(Boolean).forEach(a=>{let i=a.match(FX),r=a.match(zX),s=a.match($X);if(i!==null){let l=i[1];t.hasOwnProperty(l)?n.push({name:l,children:[]}):console.warn(`Trans: missed to pass in prop ${l} for interpolating ${e}`)}else if(r!==null)if(r[1]===n[n.length-1].name){let l=n.pop(),c=Z.createElement(Z.Fragment,{},...l.children),d=t[l.name];typeof d=="function"&&n[n.length-1].children.push(d(c))}else console.warn(`Trans: unexpected end tag ${a} for interpolating ${e}`);else if(s!==null){let l=s[1];t.hasOwnProperty(l)?n[n.length-1].children.push(t[l]):console.warn(`Trans: key ${l} not in props for interpolating ${e}`)}else n[n.length-1].children.push(a)}),n.length!==1&&console.warn(`Trans: stack not empty for interpolating ${e}`),n[0].children},HX=({i18nKey:e,children:t,...n})=>{let{t:a}=Yt();return Z.createElement(Z.Fragment,{},...BX(a(e),n))},Pa=HX,XX=({label:e,onClick:t,className:n,children:a,actionType:i,type:r="button",isLoading:s,...l})=>{let c=i?`Dialog__action-button--${i}`:"";return f.jsxs("button",{className:te("Dialog__action-button",c,n),type:r,"aria-label":e,onClick:t,...l,children:[a&&f.jsx("div",{style:s?{visibility:"hidden"}:{},children:a}),f.jsx("div",{style:s?{visibility:"hidden"}:{},children:e}),s&&f.jsx("div",{style:{position:"absolute",inset:0},children:f.jsx(wi,{})})]})},rl=XX,WX=e=>{let{onConfirm:t,onCancel:n,children:a,confirmText:i=M("buttons.confirm"),cancelText:r=M("buttons.cancel"),className:s="",...l}=e,c=At(),d=ff(vU),{container:o}=Ka();return f.jsxs(ba,{onCloseRequest:n,size:"small",...l,className:`confirm-dialog ${s}`,children:[a,f.jsxs("div",{className:"confirm-dialog-buttons",children:[f.jsx(rl,{label:r,onClick:()=>{c({openMenu:null}),d(!1),Ft.flushSync(()=>{n()}),o?.focus()}}),f.jsx(rl,{label:i,onClick:()=>{c({openMenu:null}),d(!1),Ft.flushSync(()=>{t()}),o?.focus()},actionType:"danger"})]})]})},nx=WX,$r=class{static has(e){try{return!!window.localStorage.getItem(e)}catch(t){return console.warn(`localStorage.getItem error: ${t.message}`),!1}}static get(e){try{let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return console.warn(`localStorage.getItem error: ${t.message}`),null}}};j($r,"set",(e,t)=>{try{return window.localStorage.setItem(e,JSON.stringify(t)),!0}catch(n){return console.warn(`localStorage.setItem error: ${n.message}`),!1}}),j($r,"delete",e=>{try{window.localStorage.removeItem(e)}catch(t){console.warn(`localStorage.removeItem error: ${t.message}`)}});var VX=async e=>{let t=Math.round(8),n=Math.max(Math.round(128/64),2),a=oI(e,6),i=document.createElement("canvas");i.width=a[0].length*128+(a[0].length+1)*(t*2)-t*2,i.height=a.length*128+(a.length+1)*(t*2)-t*2;let r=i.getContext("2d");r.fillStyle=Bt.white,r.fillRect(0,0,i.width,i.height);for(let[s,l]of e.entries()){let c=await oc({elements:l.elements,files:null,maxWidthOrHeight:128}),{width:d,height:o}=c,u=Math.floor(s/6)*(128+t*2),h=s%6*(128+t*2);r.drawImage(c,h+(128-d)/2+t,u+(128-o)/2+t),r.lineWidth=n,r.strokeStyle=Bt.gray[4],r.strokeRect(h+t/2,u+t/2,128+t,128+t)}return await Y1(new File([await zo(i)],"preview",{type:ae.png}),{outputType:ae.jpg,maxWidthOrHeight:5e3})},GX=({libItem:e,appState:t,index:n,onChange:a,onRemove:i})=>{let r=S.useRef(null),s=S.useRef(null);return S.useEffect(()=>{let l=r.current;l&&(async()=>{let c=await af({elements:e.elements,appState:{...t,viewBackgroundColor:Bt.white,exportBackground:!0},files:null,skipInliningFonts:!0});l.innerHTML=c.outerHTML})()},[e.elements,t]),f.jsxs("div",{className:"single-library-item",children:[e.status==="published"&&f.jsx("span",{className:"single-library-item-status",children:M("labels.statusPublished")}),f.jsx("div",{ref:r,className:"single-library-item__svg"}),f.jsx(Me,{"aria-label":M("buttons.remove"),type:"button",icon:hl,className:"single-library-item--remove",onClick:i.bind(null,e.id),title:M("buttons.remove")}),f.jsxs("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[f.jsxs("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[f.jsxs("div",{style:{padding:"0.5em 0"},children:[f.jsx("span",{style:{fontWeight:500,color:Bt.gray[6]},children:M("publishDialog.itemName")}),f.jsx("span",{"aria-hidden":"true",className:"required",children:"*"})]}),f.jsx("input",{type:"text",ref:s,style:{width:"80%",padding:"0.2rem"},defaultValue:e.name,placeholder:"Item name",onChange:l=>{a(l.target.value,n)}})]}),f.jsx("span",{className:"error",children:e.error})]})]})},YX=({onClose:e,libraryItems:t,appState:n,onSuccess:a,onError:i,updateItemsInStorage:r,onRemove:s})=>{let[l,c]=S.useState({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),[d,o]=S.useState(!1);S.useEffect(()=>{let v=$r.get(to.PUBLISH_LIBRARY);v&&c(v)},[]);let[u,h]=S.useState(t.slice());S.useEffect(()=>{h(t.slice())},[t]);let p=v=>{c({...l,[v.target.name]:v.target.value})},U=async v=>{v.preventDefault(),o(!0);let y=[],w=!1;if(u.forEach(T=>{let D="";T.name||(D=M("publishDialog.errors.required"),w=!0),y.push({...T,error:D})}),w){h(y),o(!1);return}let k=await VX(u),C={type:Fn.excalidrawLibrary,version:Pu.excalidrawLibrary,source:F0,libraryItems:u},I=JSON.stringify(C,null,2),A=new Blob([I],{type:"application/json"}),_=new FormData;_.append("excalidrawLib",A),_.append("previewImage",k),_.append("previewImageType",k.type),_.append("title",l.name),_.append("authorName",l.authorName),_.append("githubHandle",l.githubHandle),_.append("name",l.name),_.append("description",l.description),_.append("twitterHandle",l.twitterHandle),_.append("website",l.website),fetch(`${be.VITE_APP_LIBRARY_BACKEND}/submit`,{method:"post",body:_}).then(T=>T.ok?T.json().then(({url:D})=>{$r.delete(to.PUBLISH_LIBRARY),a({url:D,authorName:l.authorName,items:u})}):T.json().catch(()=>{throw new Error(T.statusText||"something went wrong")}).then(D=>{throw new Error(D.message||T.statusText||"something went wrong")}),T=>{console.error(T),i(T),o(!1)}).catch(T=>{console.error(T),i(T),o(!1)})},m=()=>{let v=[];return u.forEach((y,w)=>{v.push(f.jsx("div",{className:"single-library-item-wrapper",children:f.jsx(GX,{libItem:y,appState:n,index:w,onChange:(k,C)=>{let I=u.slice();I[C].name=k,h(I)},onRemove:s})},w))}),f.jsx("div",{className:"selected-library-items",children:v})},g=S.useCallback(()=>{r(u),$r.set(to.PUBLISH_LIBRARY,l),e()},[u,e,r,l]),b=!!t.length,x=t.some(v=>v.status==="published");return f.jsx(ba,{onCloseRequest:g,title:M("publishDialog.title"),className:"publish-library",children:b?f.jsxs("form",{onSubmit:U,children:[f.jsx("div",{className:"publish-library-note",children:f.jsx(Pa,{i18nKey:"publishDialog.noteDescription",link:v=>f.jsx("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:v})})}),f.jsx("span",{className:"publish-library-note",children:f.jsx(Pa,{i18nKey:"publishDialog.noteGuidelines",link:v=>f.jsx("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:v})})}),f.jsx("div",{className:"publish-library-note",children:M("publishDialog.noteItems")}),x&&f.jsx("span",{className:"publish-library-note publish-library-warning",children:M("publishDialog.republishWarning")}),m(),f.jsxs("div",{className:"publish-library__fields",children:[f.jsxs("label",{children:[f.jsxs("div",{children:[f.jsx("span",{children:M("publishDialog.libraryName")}),f.jsx("span",{"aria-hidden":"true",className:"required",children:"*"})]}),f.jsx("input",{type:"text",name:"name",required:!0,value:l.name,onChange:p,placeholder:M("publishDialog.placeholder.libraryName")})]}),f.jsxs("label",{style:{alignItems:"flex-start"},children:[f.jsxs("div",{children:[f.jsx("span",{children:M("publishDialog.libraryDesc")}),f.jsx("span",{"aria-hidden":"true",className:"required",children:"*"})]}),f.jsx("textarea",{name:"description",rows:4,required:!0,value:l.description,onChange:p,placeholder:M("publishDialog.placeholder.libraryDesc")})]}),f.jsxs("label",{children:[f.jsxs("div",{children:[f.jsx("span",{children:M("publishDialog.authorName")}),f.jsx("span",{"aria-hidden":"true",className:"required",children:"*"})]}),f.jsx("input",{type:"text",name:"authorName",required:!0,value:l.authorName,onChange:p,placeholder:M("publishDialog.placeholder.authorName")})]}),f.jsxs("label",{children:[f.jsx("span",{children:M("publishDialog.githubUsername")}),f.jsx("input",{type:"text",name:"githubHandle",value:l.githubHandle,onChange:p,placeholder:M("publishDialog.placeholder.githubHandle")})]}),f.jsxs("label",{children:[f.jsx("span",{children:M("publishDialog.twitterUsername")}),f.jsx("input",{type:"text",name:"twitterHandle",value:l.twitterHandle,onChange:p,placeholder:M("publishDialog.placeholder.twitterHandle")})]}),f.jsxs("label",{children:[f.jsx("span",{children:M("publishDialog.website")}),f.jsx("input",{type:"text",name:"website",pattern:"https?://.+",title:M("publishDialog.errors.website"),value:l.website,onChange:p,placeholder:M("publishDialog.placeholder.website")})]}),f.jsx("span",{className:"publish-library-note",children:f.jsx(Pa,{i18nKey:"publishDialog.noteLicense",link:v=>f.jsx("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:v})})})]}),f.jsxs("div",{className:"publish-library__buttons",children:[f.jsx(rl,{label:M("buttons.cancel"),onClick:g,"data-testid":"cancel-clear-canvas-button"}),f.jsx(rl,{type:"submit",label:M("buttons.submit"),actionType:"primary",isLoading:d})]})]}):f.jsx("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:M("publishDialog.atleastOneLibItem")})})},ZX=YX,ax=({className:e="",children:t,onToggle:n,title:a,...i})=>{let r=Tt(),s=te(`dropdown-menu-button ${e}`,"zen-mode-transition",{"dropdown-menu-button--mobile":r.editor.isMobile}).trim();return f.jsx("button",{"data-prevent-outside-click":!0,className:s,onClick:n,type:"button","data-testid":"dropdown-menu-button",title:a,...i,children:t})},KX=ax;ax.displayName="DropdownMenuTrigger";var ix=()=>f.jsx("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",margin:".5rem 0"}}),qX=ix;ix.displayName="DropdownMenuSeparator";var rx=({children:e,onClickOutside:t,className:n="",onSelect:a,style:i})=>{let r=Tt(),s=S.useRef(null),l=Uf({onClickOutside:t});uU(s,()=>{l.onClickOutside?.()}),S.useEffect(()=>{let d=u=>{u.key===R.ESCAPE&&(u.stopImmediatePropagation(),l.onClickOutside?.())},o={capture:!0};return document.addEventListener("keydown",d,o),()=>{document.removeEventListener("keydown",d,o)}},[l]);let c=te(`dropdown-menu ${n}`,{"dropdown-menu--mobile":r.editor.isMobile}).trim();return f.jsx(Av.Provider,{value:{onSelect:a},children:f.jsx("div",{ref:s,className:c,style:i,"data-testid":"dropdown-menu",children:r.editor.isMobile?f.jsx(On.Col,{className:"dropdown-menu-container",children:e}):f.jsx(ua,{className:"dropdown-menu-container",padding:2,style:{zIndex:2},children:e})})})};rx.displayName="DropdownMenuContent";var JX=rx,sx=({icon:e,shortcut:t,href:n,children:a,onSelect:i,className:r="",selected:s,rel:l="noreferrer",...c})=>{let d=Rv(c.onClick,i);return f.jsx("a",{...c,href:n,target:"_blank",rel:"noreferrer",className:jv(r,s),title:c.title??c["aria-label"],onClick:d,children:f.jsx(Dv,{icon:e,shortcut:t,children:a})})},Sd=sx;sx.displayName="DropdownMenuItemLink";var QX=({children:e,className:t="",selected:n,...a})=>f.jsx("div",{...a,className:`dropdown-menu-item-base dropdown-menu-item-custom ${t} ${n?"dropdown-menu-item--selected":""}`.trim(),children:e}),eW=QX,tW=e=>Z.Children.toArray(e).find(n=>Z.isValidElement(n)&&typeof n.type!="string"&&n?.type.displayName&&n.type.displayName==="DropdownMenuTrigger")||null,nW=e=>Z.Children.toArray(e).find(n=>Z.isValidElement(n)&&typeof n.type!="string"&&n?.type.displayName&&n.type.displayName==="DropdownMenuContent")||null,Mi=({children:e,open:t})=>{let n=tW(e),a=nW(e);return f.jsxs(f.Fragment,{children:[n,t&&a]})};Mi.Trigger=KX;Mi.Content=JX;Mi.Item=Gn;Mi.ItemLink=Sd;Mi.ItemCustom=eW;Mi.Group=d0;Mi.Separator=qX;var Je=Mi;Mi.displayName="DropdownMenu";var aW=(e,t)=>e.filter(n=>t.includes(n.id)),iW=({setAppState:e,selectedItems:t,library:n,onRemoveFromLibrary:a,resetLibrary:i,onSelectItems:r,appState:s,className:l})=>{let[c]=gt(Ho),[d,o]=gt(vU),u=()=>{let _=t.length?M("alerts.removeItemsFromsLibrary",{count:t.length}):M("alerts.resetLibrary"),T=t.length?M("confirmDialog.removeItemsFromLib"):M("confirmDialog.resetLibrary");return f.jsx(nx,{onConfirm:()=>{t.length?a():i(),p(!1)},onCancel:()=>{p(!1)},title:T,children:f.jsx("p",{children:_})})},[h,p]=S.useState(!1),U=!!t.length,m=U?c.libraryItems.filter(_=>t.includes(_.id)):c.libraryItems,g=M(U?"buttons.remove":"buttons.resetLibrary"),[b,x]=S.useState(!1),[v,y]=S.useState(null),w=S.useCallback(()=>f.jsxs(ba,{onCloseRequest:()=>y(null),title:M("publishSuccessDialog.title"),className:"publish-library-success",size:"small",children:[f.jsx("p",{children:f.jsx(Pa,{i18nKey:"publishSuccessDialog.content",authorName:v.authorName,link:_=>f.jsx("a",{href:v?.url,target:"_blank",rel:"noopener noreferrer",children:_})})}),f.jsx(Me,{type:"button",title:M("buttons.close"),"aria-label":M("buttons.close"),label:M("buttons.close"),onClick:()=>y(null),"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]}),[y,v]),k=(_,T)=>{x(!1),y({url:_.url,authorName:_.authorName});let D=T.slice();D.forEach(L=>{t.includes(L.id)&&(L.status="published")}),n.setLibrary(D)},C=async()=>{try{await n.updateLibrary({libraryItems:vp({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0})}catch(_){if(_?.name==="AbortError"){console.warn(_);return}e({errorMessage:M("errors.importLibraryError")})}},I=async()=>{let _=U?m:await n.getLatestLibrary();DN(_).catch(y8).catch(T=>{e({errorMessage:T.message})})},A=()=>f.jsxs(Je,{open:d,children:[f.jsx(Je.Trigger,{onToggle:()=>o(!d),children:WI}),f.jsxs(Je.Content,{onClickOutside:()=>o(!1),onSelect:()=>o(!1),className:"library-menu",children:[!U&&f.jsx(Je.Item,{onSelect:C,icon:tp,"data-testid":"lib-dropdown--load",children:M("buttons.load")}),!!m.length&&f.jsx(Je.Item,{onSelect:I,icon:zu,"data-testid":"lib-dropdown--export",children:M("buttons.export")}),!!m.length&&f.jsx(Je.Item,{onSelect:()=>p(!0),icon:Zr,children:g}),U&&f.jsx(Je.Item,{icon:nT,onSelect:()=>x(!0),"data-testid":"lib-dropdown--remove",children:M("buttons.publishLibrary")})]})]});return f.jsxs("div",{className:te("library-menu-dropdown-container",l),children:[A(),t.length>0&&f.jsx("div",{className:"library-actions-counter",children:t.length}),h&&u(),b&&f.jsx(ZX,{onClose:()=>x(!1),libraryItems:aW(c.libraryItems,t),appState:s,onSuccess:_=>k(_,c.libraryItems),onError:_=>window.alert(_),updateItemsInStorage:()=>n.setLibrary(c.libraryItems),onRemove:_=>r(t.filter(T=>T!==_))}),v&&w()]})},a5=({selectedItems:e,onSelectItems:t,className:n})=>{let{library:a}=va(),{clearLibraryCache:i,deleteItemsFromLibraryCache:r}=Kv(),s=Zt(),l=At(),[c]=gt(Ho),d=async o=>{let u=o.filter(h=>!e.includes(h.id));a.setLibrary(u).catch(()=>{l({errorMessage:M("alerts.errorRemovingFromLibrary")})}),r(e),t([])};return f.jsx(iW,{appState:s,setAppState:l,selectedItems:e,onSelectItems:t,library:a,onRemoveFromLibrary:()=>d(c.libraryItems),resetLibrary:()=>{a.resetLibrary(),i()},className:n})},rW=S.memo(({id:e,elements:t,isPending:n,onClick:a,selected:i,onToggle:r,onDrag:s,svgCache:l})=>{let c=S.useRef(null),d=CX(e,t,l);S.useEffect(()=>{let U=c.current;if(U)return d&&(U.innerHTML=d.outerHTML),()=>{U.innerHTML=""}},[d]);let[o,u]=S.useState(!1),h=Tt().editor.isMobile,p=n&&f.jsx("div",{className:"library-unit__adder",children:XI});return f.jsxs("div",{className:te("library-unit",{"library-unit__active":t,"library-unit--hover":t&&o,"library-unit--selected":i,"library-unit--skeleton":!d}),onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:[f.jsx("div",{className:te("library-unit__dragger",{"library-unit__pulse":!!n}),ref:c,draggable:!!t,onClick:t||n?U=>{e&&U.shiftKey?r(e,U):a(e)}:void 0,onDragStart:U=>{if(!e){U.preventDefault();return}u(!1),s(e,U)}}),p,e&&t&&(o||h||i)&&f.jsx(mU,{checked:i,onChange:(U,m)=>r(e,m),className:"library-unit__checkbox"})]})}),sW=()=>f.jsx("div",{className:"library-unit library-unit--skeleton"});function lW(){return[!1,S.useCallback(e=>e(),[])]}var oW=Z.useTransition||lW,i5=({children:e})=>f.jsx("div",{className:"library-menu-items-container__grid",children:e}),Ph=S.memo(({items:e,onItemSelectToggle:t,onItemDrag:n,isItemSelected:a,onClick:i,svgCache:r,itemsRenderedPerBatch:s})=>{let[,l]=oW(),[c,d]=S.useState(0);return S.useEffect(()=>{c<e.length&&l(()=>{d(c+s)})},[c,e.length,l,s]),f.jsx(f.Fragment,{children:e.map((o,u)=>u<c?f.jsx(rW,{elements:o?.elements,isPending:!o?.id&&!!o?.elements,onClick:i,svgCache:r,id:o?.id,selected:a(o.id),onToggle:t,onDrag:n},o?.id??u):f.jsx(sW,{},u))})}),cW=Xt(0),dW=e=>{let[t,n]=gt(cW);return S.useEffect(()=>{let{current:a}=e;if(!a)return;let i=Zo(()=>{let{scrollTop:r}=a;n(r)},200);return a.addEventListener("scroll",i),()=>{i.cancel(),a.removeEventListener("scroll",i)}},[e,n]),t},uW=17,fW=64;function hW({isLoading:e,libraryItems:t,onAddToLibrary:n,onInsertLibraryItems:a,pendingElements:i,theme:r,id:s,libraryReturnUrl:l,onSelectItems:c,selectedItems:d}){let o=S.useRef(null),u=dW(o);S.useEffect(()=>{u>0&&o.current?.scrollTo(0,u)},[]);let{svgCache:h}=Kv(),p=S.useMemo(()=>t.filter(_=>_.status!=="published"),[t]),U=S.useMemo(()=>t.filter(_=>_.status==="published"),[t]),m=!t.length&&!i.length,g=!i.length&&!p.length&&!U.length,[b,x]=S.useState(null),v=S.useCallback((_,T)=>{let D=!d.includes(_),L=[...p,...U];if(D){if(T.shiftKey&&b){let F=L.findIndex(X=>X.id===b),P=L.findIndex(X=>X.id===_);if(F===-1||P===-1){c([...d,_]);return}let O=oe(d),N=L.reduce((X,H,G)=>((G>=F&&G<=P||O.has(H.id))&&X.push(H.id),X),[]);c(N)}else c([...d,_]);x(_)}else x(null),c(d.filter(F=>F!==_))},[b,c,U,d,p]),y=S.useCallback(_=>{let T;return d.includes(_)?T=t.filter(D=>d.includes(D.id)):T=t.filter(D=>D.id===_),T.map(D=>({...D,elements:i3(D.elements,{randomizeSeed:!0})}))},[t,d]),w=S.useCallback((_,T)=>{T.dataTransfer.setData(ae.excalidrawlib,xp(y(_)))},[y]),k=S.useCallback(_=>_?d.includes(_):!1,[d]),C=S.useCallback(()=>{n(i)},[i,n]),I=S.useCallback(_=>{_&&a(y(_))},[y,a]),A=h.size>=t.length?fW:uW;return f.jsxs("div",{className:"library-menu-items-container",style:i.length||p.length||U.length?{justifyContent:"flex-start"}:{borderBottom:0},children:[!g&&f.jsx(a5,{selectedItems:d,onSelectItems:c,className:"library-menu-dropdown-container--in-heading"}),f.jsxs(On.Col,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:U.length>0?1:"0 1 auto",marginBottom:0},ref:o,children:[f.jsxs(f.Fragment,{children:[!g&&f.jsx("div",{className:"library-menu-items-container__header",children:M("labels.personalLib")}),e&&f.jsx("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",transform:"translateY(50%)"},children:f.jsx(wi,{})}),!i.length&&!p.length?f.jsxs("div",{className:"library-menu-items__no-items",children:[f.jsx("div",{className:"library-menu-items__no-items__label",children:M("library.noItems")}),f.jsx("div",{className:"library-menu-items__no-items__hint",children:U.length>0?M("library.hint_emptyPrivateLibrary"):M("library.hint_emptyLibrary")})]}):f.jsxs(i5,{children:[i.length>0&&f.jsx(Ph,{itemsRenderedPerBatch:A,items:[{id:null,elements:i}],onItemSelectToggle:v,onItemDrag:w,onClick:C,isItemSelected:k,svgCache:h}),f.jsx(Ph,{itemsRenderedPerBatch:A,items:p,onItemSelectToggle:v,onItemDrag:w,onClick:I,isItemSelected:k,svgCache:h})]})]}),f.jsxs(f.Fragment,{children:[(U.length>0||i.length>0||p.length>0)&&f.jsx("div",{className:"library-menu-items-container__header library-menu-items-container__header--excal",children:M("labels.excalidrawLib")}),U.length>0?f.jsx(i5,{children:f.jsx(Ph,{itemsRenderedPerBatch:A,items:U,onItemSelectToggle:v,onItemDrag:w,onClick:I,isItemSelected:k,svgCache:h})}):p.length>0?f.jsx("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:M("library.noItems")}):null]}),m&&f.jsx(tx,{style:{padding:"16px 0",width:"100%"},id:s,libraryReturnUrl:l,theme:r,children:f.jsx(a5,{selectedItems:d,onSelectItems:c})})]})]})}var vU=Xt(!1),r5=({children:e})=>f.jsx("div",{className:"layer-ui__library",children:e}),pW=S.memo(({onInsertLibraryItems:e,pendingElements:t,onAddToLibrary:n,setAppState:a,libraryReturnUrl:i,library:r,id:s,theme:l,selectedItems:c,onSelectItems:d})=>{let[o]=gt(Ho),u=S.useCallback(U=>{(async(m,g)=>{qe("element","addToLibrary","ui");for(let x of d8)if(m.some(v=>v.type===x))return a({errorMessage:M(`errors.libraryElementTypeError.${x}`)});let b=[{status:"unpublished",elements:m,id:Vn(),created:Date.now()},...g];n(),r.setLibrary(b).catch(()=>{a({errorMessage:M("alerts.errorAddingToLibrary")})})})(U,o.libraryItems)},[n,r,a,o.libraryItems]),h=S.useMemo(()=>o.libraryItems,[o]);if(o.status==="loading"&&!o.isInitialized)return f.jsx(r5,{children:f.jsx("div",{className:"layer-ui__library-message",children:f.jsxs("div",{children:[f.jsx(wi,{size:"2em"}),f.jsx("span",{children:M("labels.libraryLoadingMessage")})]})})});let p=o.libraryItems.length>0||t.length>0;return f.jsxs(r5,{children:[f.jsx(hW,{isLoading:o.status==="loading",libraryItems:h,onAddToLibrary:u,onInsertLibraryItems:e,pendingElements:t,id:s,libraryReturnUrl:i,theme:l,onSelectItems:d,selectedItems:c}),p&&f.jsx(tx,{className:"library-menu-control-buttons--at-bottom",style:{padding:"16px 12px 0 12px"},id:s,libraryReturnUrl:i,theme:l})]})}),Nh=(e,t)=>({elements:e,pending:ve(e,{selectedElementIds:t},{includeBoundTextElement:!0,includeElementsInFrames:!0}),selectedElementIds:t}),UW=(e,t)=>{let n=Sf(),[a,i]=S.useState(()=>Nh(n,e.selectedElementIds)),r=S.useRef(new Map);return S.useEffect(()=>{for(let s of a.pending)r.current.set(s.id,s.version)},[a.pending]),S.useEffect(()=>{t.state.cursorButton==="up"&&t.state.activeTool.type==="selection"&&i(s=>{if(!Gt(s.selectedElementIds,e.selectedElementIds))return r.current.clear(),Nh(n,e.selectedElementIds);let l=t.scene.getNonDeletedElementsMap();for(let c of Object.keys(e.selectedElementIds)){let d=l.get(c)?.version;if(d&&d!==r.current.get(c))return Nh(n,e.selectedElementIds)}return s})},[t,t.state.cursorButton,t.state.activeTool.type,e.selectedElementIds,n]),a.pending},mW=S.memo(()=>{let e=va(),{onInsertElements:t}=e,n=pc(),a=Zt(),i=At(),[r,s]=S.useState([]),l=S.useMemo(()=>e.library,[e.library]),c=UW(a,e),d=S.useCallback(u=>{t(ex(u))},[t]),o=S.useCallback(()=>{i({selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null})},[i]);return f.jsx(pW,{pendingElements:c,onInsertLibraryItems:d,onAddToLibrary:o,setAppState:i,libraryReturnUrl:n.libraryReturnUrl,library:l,id:e.id,theme:a.theme,selectedItems:r,onSelectItems:s})});function gW(e){if(e&&typeof e=="number")return e;switch(e){case"small":return 550;case"wide":return 1024;default:return 800}}var ba=e=>{let[t,n]=SX(),[a]=S.useState(document.activeElement),{id:i}=Ka(),r=Tt().viewport.isMobile;S.useEffect(()=>{if(!t)return;let d=y1(t);setTimeout(()=>{d.length>0&&e.autofocus!==!1&&(d[1]||d[0]).focus()});let o=u=>{if(u.key===R.TAB){let h=y1(t),{activeElement:p}=document,U=h.findIndex(m=>m===p);U===0&&u.shiftKey?(h[h.length-1].focus(),u.preventDefault()):U===h.length-1&&!u.shiftKey&&(h[0].focus(),u.preventDefault())}};return t.addEventListener("keydown",o),()=>t.removeEventListener("keydown",o)},[t,e.autofocus]);let s=At(),l=ff(vU),c=()=>{s({openMenu:null}),l(!1),a.focus(),e.onCloseRequest()};return f.jsx(kX,{className:te("Dialog",e.className,{"Dialog--fullscreen":r}),labelledBy:"dialog-title",maxWidth:gW(e.size),onCloseRequest:c,closeOnClickOutside:e.closeOnClickOutside,children:f.jsxs(ua,{ref:n,children:[e.title&&f.jsx("h2",{id:`${i}-dialog-title`,className:"Dialog__title",children:f.jsx("span",{className:"Dialog__titleContent",children:e.title})}),r&&f.jsx("button",{className:"Dialog__close",onClick:c,title:M("buttons.close"),"aria-label":M("buttons.close"),type:"button",children:hl}),f.jsx("div",{className:"Dialog__content",children:e.children})]})})},or=({type:e="button",onSelect:t,selected:n,children:a,className:i="",...r})=>f.jsx("button",{onClick:Ou(r.onClick,s=>{t()}),type:e,className:te("excalidraw-button",i,{selected:n}),...r,children:a}),xU=S.forwardRef(({onChange:e,label:t,fullWidth:n,placeholder:a,readonly:i,selectOnRender:r,onKeyDown:s,isRedacted:l=!1,icon:c,className:d,...o},u)=>{let h=S.useRef(null);S.useImperativeHandle(u,()=>h.current),S.useLayoutEffect(()=>{r&&(h.current?.focus(),h.current?.select())},[r]);let[p,U]=S.useState(!1);return f.jsxs("div",{className:te("ExcTextField",d,{"ExcTextField--fullWidth":n,"ExcTextField--hasIcon":!!c}),onClick:()=>{h.current?.focus()},children:[c,t&&f.jsx("div",{className:"ExcTextField__label",children:t}),f.jsxs("div",{className:te("ExcTextField__input",{"ExcTextField__input--readonly":i}),children:[f.jsx("input",{className:te({"is-redacted":"value"in o&&o.value&&l&&!p}),readOnly:i,value:"value"in o?o.value:void 0,defaultValue:"defaultValue"in o?o.defaultValue:void 0,placeholder:a,ref:h,onChange:m=>e?.(m.target.value),onKeyDown:s}),l&&f.jsx(or,{onSelect:()=>U(!p),style:{border:0,userSelect:"none"},children:p?dT:ap})]})]})}),bW={toggleTheme:[W("Shift+Alt+D")],saveScene:[W("CtrlOrCmd+S")],loadScene:[W("CtrlOrCmd+O")],clearCanvas:[W("CtrlOrCmd+Delete")],imageExport:[W("CtrlOrCmd+Shift+E")],commandPalette:[W("CtrlOrCmd+/"),W("CtrlOrCmd+Shift+P")],cut:[W("CtrlOrCmd+X")],copy:[W("CtrlOrCmd+C")],paste:[W("CtrlOrCmd+V")],copyStyles:[W("CtrlOrCmd+Alt+C")],pasteStyles:[W("CtrlOrCmd+Alt+V")],selectAll:[W("CtrlOrCmd+A")],deleteSelectedElements:[W("Delete")],duplicateSelection:[W("CtrlOrCmd+D"),W(`Alt+${M("helpDialog.drag")}`)],sendBackward:[W("CtrlOrCmd+[")],bringForward:[W("CtrlOrCmd+]")],sendToBack:[W(Fa?"CtrlOrCmd+Alt+[":"CtrlOrCmd+Shift+[")],bringToFront:[W(Fa?"CtrlOrCmd+Alt+]":"CtrlOrCmd+Shift+]")],copyAsPng:[W("Shift+Alt+C")],group:[W("CtrlOrCmd+G")],ungroup:[W("CtrlOrCmd+Shift+G")],gridMode:[W("CtrlOrCmd+'")],zenMode:[W("Alt+Z")],objectsSnapMode:[W("Alt+S")],stats:[W("Alt+/")],addToLibrary:[],flipHorizontal:[W("Shift+H")],flipVertical:[W("Shift+V")],viewMode:[W("Alt+R")],hyperlink:[W("CtrlOrCmd+K")],toggleElementLock:[W("CtrlOrCmd+Shift+L")],resetZoom:[W("CtrlOrCmd+0")],zoomOut:[W("CtrlOrCmd+-")],zoomIn:[W("CtrlOrCmd++")],zoomToFitSelection:[W("Shift+3")],zoomToFit:[W("Shift+1")],zoomToFitSelectionInViewport:[W("Shift+2")],toggleEraserTool:[W("E")],toggleHandTool:[W("H")],setFrameAsActiveTool:[W("F")],saveFileToDisk:[W("CtrlOrCmd+S")],saveToActiveFile:[W("CtrlOrCmd+S")],toggleShortcuts:[W("?")],searchMenu:[W("CtrlOrCmd+F")],wrapSelectionInFrame:[]},tn=(e,t=0)=>{let n=bW[e];return n&&n.length>0?n[t]||n[0]:""},vW="\\u0300-\\u036f",xW="\\ufe20-\\ufe2f",yW="\\u20d0-\\u20ff",wW=vW+xW+yW,EW=`[${wW}]`,SW=RegExp(EW,"g"),kW=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,CW={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"E",æ:"e",Þ:"T",þ:"t",ß:"s",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"I",ij:"i",Œ:"E",œ:"e",ʼn:"n",ſ:"s"},s5=e=>e.replace(kW,t=>CW[t]||t).replace(SW,""),lx=Z.createContext(null),un=()=>Z.useContext(lx),MW=i9(),IW=()=>Z.useMemo(()=>({MainMenuTunnel:Sa(),WelcomeScreenMenuHintTunnel:Sa(),WelcomeScreenToolbarHintTunnel:Sa(),WelcomeScreenHelpHintTunnel:Sa(),WelcomeScreenCenterTunnel:Sa(),FooterCenterTunnel:Sa(),DefaultSidebarTriggerTunnel:Sa(),DefaultSidebarTabTriggersTunnel:Sa(),OverwriteConfirmDialogTunnel:Sa(),TTDDialogTriggerTunnel:Sa(),tunnelsJotai:MW}),[]),ox=(e,t)=>{let n=t[0]?.type||null;for(let a of t)if(a.type!==n){n=null;break}return A1(e.activeTool.type)&&e.activeTool.type!=="image"&&n!=="image"&&n!=="frame"&&n!=="magicframe"||t.some(a=>A1(a.type))},cx=(e,t)=>qs(e.activeTool.type)||t.some(n=>qs(n.type)),dx=({appState:e,elementsMap:t,renderAction:n,app:a})=>{let i=W3(t,e),r=!1;i.length===2&&(Wn(i[0])||Wn(i[1]))&&(r=!0);let s=!!(e.editingTextElement||e.newElement),l=Tt(),c=document.documentElement.getAttribute("dir")==="rtl",d=qs(e.activeTool.type)&&!ia(e.currentItemBackgroundColor)||i.some(U=>qs(U.type)&&!ia(U.backgroundColor)),o=i.length===1||r,u=!e.editingLinearElement&&i.length===1&&ue(i[0])&&!Q(i[0]),h=!e.croppingElementId&&i.length===1&&Le(i[0]),p=!r&&Tn(e,a);return f.jsxs("div",{className:"panelColumn",children:[f.jsx("div",{children:ox(e,i)&&n("changeStrokeColor")}),cx(e,i)&&f.jsx("div",{children:n("changeBackgroundColor")}),d&&n("changeFillStyle"),(Y2(e.activeTool.type)||i.some(U=>Y2(U.type)))&&n("changeStrokeWidth"),(e.activeTool.type==="freedraw"||i.some(U=>U.type==="freedraw"))&&n("changeStrokeShape"),(Z2(e.activeTool.type)||i.some(U=>Z2(U.type)))&&f.jsxs(f.Fragment,{children:[n("changeStrokeStyle"),n("changeSloppiness")]}),(j1(e.activeTool.type)||i.some(U=>j1(U.type)))&&f.jsx(f.Fragment,{children:n("changeRoundness")}),(K2(e.activeTool.type)||i.some(U=>K2(U.type)))&&f.jsx(f.Fragment,{children:n("changeArrowType")}),(e.activeTool.type==="text"||i.some(q))&&f.jsxs(f.Fragment,{children:[n("changeFontFamily"),n("changeFontSize"),(e.activeTool.type==="text"||iN(i,t))&&n("changeTextAlign")]}),aN(i,t)&&n("changeVerticalAlign"),(Jd(e.activeTool.type)||i.some(U=>Jd(U.type)))&&f.jsx(f.Fragment,{children:n("changeArrowhead")}),n("changeOpacity"),f.jsxs("fieldset",{children:[f.jsx("legend",{children:M("labels.layers")}),f.jsxs("div",{className:"buttonList",children:[n("sendToBack"),n("sendBackward"),n("bringForward"),n("bringToFront")]})]}),p&&!r&&f.jsxs("fieldset",{children:[f.jsx("legend",{children:M("labels.align")}),f.jsxs("div",{className:"buttonList",children:[c?f.jsxs(f.Fragment,{children:[n("alignRight"),n("alignHorizontallyCentered"),n("alignLeft")]}):f.jsxs(f.Fragment,{children:[n("alignLeft"),n("alignHorizontallyCentered"),n("alignRight")]}),i.length>2&&n("distributeHorizontally"),f.jsx("div",{style:{flexBasis:"100%",height:0}}),f.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[n("alignTop"),n("alignVerticallyCentered"),n("alignBottom"),i.length>2&&n("distributeVertically")]})]})]}),!s&&i.length>0&&f.jsxs("fieldset",{children:[f.jsx("legend",{children:M("labels.actions")}),f.jsxs("div",{className:"buttonList",children:[!l.editor.isMobile&&n("duplicateSelection"),!l.editor.isMobile&&n("deleteSelectedElements"),n("group"),n("ungroup"),o&&n("hyperlink"),h&&n("cropEditor"),u&&n("toggleLinearEditor")]})]})]})},ux=({activeTool:e,appState:t,app:n,UIOptions:a})=>{let[i,r]=S.useState(!1),s=e.type==="frame",l=e.type==="laser",c=e.type==="embeddable",{TTDDialogTriggerTunnel:d}=un();return f.jsxs(f.Fragment,{children:[lp.map(({value:o,icon:u,key:h,numericKey:p,fillable:U},m)=>{if(a.tools?.[o]===!1)return null;let g=M(`toolBar.${o}`),b=h&&io(typeof h=="string"?h:h[0]),x=b?`${b} ${M("helpDialog.or")} ${p}`:`${p}`;return f.jsx(Me,{className:te("Shape",{fillable:U}),type:"radio",icon:u,checked:e.type===o,name:"editor-current-shape",title:`${io(g)} — ${x}`,keyBindingLabel:p||b,"aria-label":io(g),"aria-keyshortcuts":x,"data-testid":`toolbar-${o}`,onPointerDown:({pointerType:v})=>{!t.penDetected&&v==="pen"&&n.togglePenMode(!0)},onChange:({pointerType:v})=>{t.activeTool.type!==o&&qe("toolbar",o,"ui"),o==="image"?n.setActiveTool({type:o,insertOnCanvasDirectly:v!=="mouse"}):n.setActiveTool({type:o})}},o)}),f.jsx("div",{className:"App-toolbar__divider"}),f.jsxs(Je,{open:i,children:[f.jsx(Je.Trigger,{className:te("App-toolbar__extra-tools-trigger",{"App-toolbar__extra-tools-trigger--selected":s||c||l&&!n.props.isCollaborating}),onToggle:()=>r(!i),title:M("toolBar.extraTools"),children:oT}),f.jsxs(Je.Content,{onClickOutside:()=>r(!1),onSelect:()=>r(!1),className:"App-toolbar__extra-tools-dropdown",children:[f.jsx(Je.Item,{onSelect:()=>n.setActiveTool({type:"frame"}),icon:V8,shortcut:R.F.toLocaleUpperCase(),"data-testid":"toolbar-frame",selected:s,children:M("toolBar.frame")}),f.jsx(Je.Item,{onSelect:()=>n.setActiveTool({type:"embeddable"}),icon:s_,"data-testid":"toolbar-embeddable",selected:c,children:M("toolBar.embeddable")}),f.jsx(Je.Item,{onSelect:()=>n.setActiveTool({type:"laser"}),icon:Y8,"data-testid":"toolbar-laser",selected:l,shortcut:R.K.toLocaleUpperCase(),children:M("toolBar.laser")}),f.jsx("div",{style:{margin:"6px 0",fontSize:14,fontWeight:600},children:"Generate"}),n.props.aiEnabled!==!1&&f.jsx(d.Out,{}),f.jsx(Je.Item,{onSelect:()=>n.setOpenDialog({name:"ttd",tab:"mermaid"}),icon:G8,"data-testid":"toolbar-embeddable",children:M("toolBar.mermaidToExcalidraw")}),n.props.aiEnabled!==!1&&n.plugins.diagramToCode&&f.jsx(f.Fragment,{children:f.jsxs(Je.Item,{onSelect:()=>n.onMagicframeToolSelect(),icon:Z8,"data-testid":"toolbar-magicframe",children:[M("toolBar.magicframe"),f.jsx(Je.Item.Badge,{children:"AI"})]})})]})]})]})},_W=({renderAction:e,zoom:t})=>f.jsx(On.Col,{gap:1,className:Xs.ZOOM_ACTIONS,children:f.jsxs(On.Row,{align:"center",children:[e("zoomOut"),e("resetZoom"),e("zoomIn")]})}),TW=({renderAction:e,className:t})=>f.jsxs("div",{className:`undo-redo-buttons ${t}`,children:[f.jsx("div",{className:"undo-button-container",children:f.jsx(ns,{label:M("buttons.undo"),children:e("undo")})}),f.jsx("div",{className:"redo-button-container",children:f.jsxs(ns,{label:M("buttons.redo"),children:[" ",e("redo")]})})]}),AW=({actionManager:e,showExitZenModeBtn:t})=>f.jsx("button",{type:"button",className:te("disable-zen-mode",{"disable-zen-mode--visible":t}),onClick:()=>e.executeAction(f0),children:M("buttons.exitZenMode")}),jW=({renderAction:e,className:t})=>f.jsx("div",{className:`finalize-button ${t}`,children:e("finalize",{size:"small"})}),l5=e=>{let t=S.useRef({userFn:e});return t.current.userFn=e,t.current.stableFn||(t.current.stableFn=(...n)=>t.current.userFn(...n)),t.current.stableFn},wf=Xt(null),RW=()=>{let[e,t]=gt(wf),n=En();return e&&e==="clearCanvas"?f.jsx(nx,{onConfirm:()=>{n.executeAction(fo),t(null)},onCancel:()=>t(null),title:M("clearCanvasDialog.title"),children:f.jsxs("p",{className:"clear-canvas__content",children:[" ",M("alerts.clearReset")]})}):null},fx={};ab(fx,{toggleTheme:()=>DW});var DW={...mu,category:"App",label:"Toggle theme",perform:({actionManager:e})=>{e.executeAction(mu,"commandPalette")}},hx=Y({name:"copyElementLink",label:"labels.copyElementLink",icon:np,trackEvent:{category:"element"},perform:async(e,t,n,a)=>{let i=ve(e,t);try{if(window.location){let r=b3(i,t);return r?(await pl(a.props.generateLinkForSelection?a.props.generateLinkForSelection(r.id,r.type):g3(r.id,r.type)),{appState:{toast:{message:M("toast.elementLinkCopied"),closable:!0}},captureUpdate:B.EVENTUALLY}):{appState:t,elements:e,app:a,captureUpdate:B.EVENTUALLY}}}catch(r){console.error(r)}return{appState:t,elements:e,app:a,captureUpdate:B.EVENTUALLY}},predicate:(e,t)=>lu(ve(e,t))}),LW=Y({name:"linkToElement",label:"labels.linkToElement",icon:Q8,perform:(e,t,n,a)=>{let i=ve(e,t);return i.length!==1||!lu(i)?{elements:e,appState:t,app:a,captureUpdate:B.EVENTUALLY}:{appState:{...t,openDialog:{name:"elementLinkSelector",sourceElementId:ve(e,t)[0].id}},captureUpdate:B.IMMEDIATELY}},predicate:(e,t,n,a)=>{let i=ve(e,t);return t.openDialog?.name!=="elementLinkSelector"&&i.length===1&&lu(i)},trackEvent:!1}),PW=Xt(null),xt={app:"App",export:"Export",tools:"Tools",editor:"Editor",elements:"Elements",links:"Links"},NW=e=>{switch(e){case xt.app:return 1;case xt.export:return 2;case xt.editor:return 3;case xt.tools:return 4;case xt.elements:return 5;case xt.links:return 6;default:return 10}},kd=({shortcut:e,className:t,children:n})=>{let a=e.replace("++","+$").split("+");return f.jsxs("div",{className:te("shortcut",t),children:[a.map((i,r)=>f.jsx("div",{className:"shortcut-wrapper",children:f.jsx("div",{className:"shortcut-key",children:i==="$"?"+":i})},i)),f.jsx("div",{className:"shortcut-desc",children:n})]})},px=e=>!e.altKey&&e[R.CTRL_OR_CMD]&&(e.shiftKey&&e.key.toLowerCase()===R.P||e.key===R.SLASH);Object.assign(e=>{let t=Zt(),n=At();return S.useEffect(()=>{let a=i=>{px(i)&&(i.preventDefault(),i.stopPropagation(),n(r=>{let s=r.openDialog?.name==="commandPalette"?null:{name:"commandPalette"};return s&&qe("command_palette","open","shortcut"),{openDialog:s}}))};return window.addEventListener("keydown",a,{capture:!0}),()=>window.removeEventListener("keydown",a,{capture:!0})},[n]),t.openDialog?.name!=="commandPalette"?null:f.jsx(OW,{...e})},{defaultItems:fx});function OW({customCommandPaletteItems:e}){let t=va(),n=Zt(),a=At(),i=pc(),r=En(),[s,l]=gt(PW),[c,d]=S.useState(null),o=S.useRef(null),u=Uf({uiAppState:n,customCommandPaletteItems:e,appProps:i});S.useEffect(()=>{let{uiAppState:k,customCommandPaletteItems:C,appProps:I}=u,A=L=>{let F="";return L.label&&(typeof L.label=="function"?F=M(L.label(t.scene.getNonDeletedElements(),k,t)):F=M(L.label)),F},_=L=>typeof L.icon=="function"?L.icon(k,t.scene.getNonDeletedElements()):L.icon,T=[],D=(L,F,P)=>{let O={label:A(L),icon:_(L),category:F,shortcut:tn(L.name),keywords:L.keywords,predicate:L.predicate,viewMode:L.viewMode,perform:()=>{r.executeAction(L,"commandPalette")}};return P?P(O,L):O};if(k&&t.scene&&r){let L=[r.actions.group,r.actions.ungroup,r.actions.cut,r.actions.copy,r.actions.deleteSelectedElements,r.actions.wrapSelectionInFrame,r.actions.copyStyles,r.actions.pasteStyles,r.actions.bringToFront,r.actions.bringForward,r.actions.sendBackward,r.actions.sendToBack,r.actions.alignTop,r.actions.alignBottom,r.actions.alignLeft,r.actions.alignRight,r.actions.alignVerticallyCentered,r.actions.alignHorizontallyCentered,r.actions.duplicateSelection,r.actions.flipHorizontal,r.actions.flipVertical,r.actions.zoomToFitSelection,r.actions.zoomToFitSelectionInViewport,r.actions.increaseFontSize,r.actions.decreaseFontSize,r.actions.toggleLinearEditor,r.actions.cropEditor,Yv,hx,LW].map(H=>D(H,xt.elements,(G,se)=>({...G,predicate:se.predicate?se.predicate:(le,Ie,Qe,rt)=>ve(le,Ie).length>0}))),F=[r.actions.toggleHandTool,r.actions.setFrameAsActiveTool].map(H=>D(H,xt.tools)),P=[r.actions.undo,r.actions.redo,r.actions.zoomIn,r.actions.zoomOut,r.actions.resetZoom,r.actions.zoomToFit,r.actions.zenMode,r.actions.viewMode,r.actions.gridMode,r.actions.objectsSnapMode,r.actions.toggleShortcuts,r.actions.selectAll,r.actions.toggleElementLock,r.actions.unlockAllElements,r.actions.stats].map(H=>D(H,xt.editor)),O=[r.actions.saveToActiveFile,r.actions.saveFileToDisk,r.actions.copyAsPng,r.actions.copyAsSvg].map(H=>D(H,xt.export));T=[...L,...P,{label:A(fo),icon:_(fo),shortcut:tn(fo.name),category:xt.editor,keywords:["delete","destroy"],viewMode:!1,perform:()=>{sa.set(wf,"clearCanvas")}},{label:M("buttons.exportImage"),category:xt.export,icon:$8,shortcut:tn("imageExport"),keywords:["export","image","png","jpeg","svg","clipboard","picture"],perform:()=>{a({openDialog:{name:"imageExport"}})}},...O];let N=[{label:M("toolBar.library"),category:xt.app,icon:J0,viewMode:!1,perform:()=>{k.openSidebar?a({openSidebar:null}):a({openSidebar:{name:oa.name,tab:oa.defaultTab}})}},{label:M("search.title"),category:xt.app,icon:Kr,viewMode:!0,perform:()=>{r.executeAction(Ux)}},{label:M("labels.changeStroke"),keywords:["color","outline"],category:xt.elements,icon:lh,viewMode:!1,predicate:(H,G)=>{let se=ve(H,G);return se.length>0&&ox(G,se)},perform:()=>{a(H=>({openMenu:H.openMenu==="shape"?null:"shape",openPopup:"elementStroke"}))}},{label:M("labels.changeBackground"),keywords:["color","fill"],icon:lh,category:xt.elements,viewMode:!1,predicate:(H,G)=>{let se=ve(H,G);return se.length>0&&cx(G,se)},perform:()=>{a(H=>({openMenu:H.openMenu==="shape"?null:"shape",openPopup:"elementBackground"}))}},{label:M("labels.canvasBackground"),keywords:["color"],icon:lh,category:xt.editor,viewMode:!1,perform:()=>{a(H=>({openMenu:H.openMenu==="canvas"?null:"canvas",openPopup:"canvasBackground"}))}},...lp.reduce((H,G)=>{let{value:se,icon:le,key:Ie,numericKey:Qe}=G;if(I.UIOptions.tools?.[se]===!1)return H;let rt=Ie&&io(typeof Ie=="string"?Ie:Ie[0])||Qe,at={label:M(`toolBar.${se}`),category:xt.tools,shortcut:rt,icon:le,keywords:["toolbar"],viewMode:!1,perform:({event:de})=>{se==="image"?t.setActiveTool({type:se,insertOnCanvasDirectly:de.type==="keydown"}):t.setActiveTool({type:se})}};return H.push(at),H},[]),...F,{label:M("toolBar.lock"),category:xt.tools,icon:k.activeTool.locked?Q0:Fu,shortcut:R.Q.toLocaleUpperCase(),viewMode:!1,perform:()=>{t.toggleLock()}},{label:`${M("labels.textToDiagram")}...`,category:xt.tools,icon:fT,viewMode:!1,predicate:I.aiEnabled,perform:()=>{a(H=>({...H,openDialog:{name:"ttd",tab:"text-to-diagram"}}))}},{label:`${M("toolBar.mermaidToExcalidraw")}...`,category:xt.tools,icon:G8,viewMode:!1,predicate:I.aiEnabled,perform:()=>{a(H=>({...H,openDialog:{name:"ttd",tab:"mermaid"}}))}}],X=[...T,...N,...C||[]].map(H=>({...H,icon:H.icon||K8,order:H.order??NW(H.category),haystack:`${s5(H.label.toLocaleLowerCase())} ${H.keywords?.join(" ")||""}`}));d(X),l(X.find(H=>H.label===s?.label)??null)}},[u,t,r,d,s?.label,l,a]);let[h,p]=S.useState(""),[U,m]=S.useState(null),[g,b]=S.useState({}),x=k=>{a({openDialog:null},k),p("")},v=(k,C)=>{n.openDialog?.name==="commandPalette"&&(C.stopPropagation(),C.preventDefault(),document.body.classList.add("excalidraw-animations-disabled"),x(()=>{k.perform({actionManager:r,event:C}),l(k),requestAnimationFrame(()=>{document.body.classList.remove("excalidraw-animations-disabled")})}))},y=l5(k=>k.viewMode===!1&&n.viewModeEnabled?!1:typeof k.predicate=="function"?k.predicate(t.scene.getNonDeletedElements(),n,i,t):k.predicate===void 0||k.predicate),w=l5(k=>{let C=Er(k.target)||px(k)||k.key===R.ESCAPE;if(C&&k.key!==R.ARROW_UP&&k.key!==R.ARROW_DOWN&&k.key!==R.ENTER)return;let I=Object.values(g).flat(),A=s&&!h&&y(s);if(k.key===R.ARROW_UP){k.preventDefault();let _=I.findIndex(L=>L.label===U?.label);if(A){if(_===0){m(s);return}if(U===s){let L=I[I.length-1];L&&m(L);return}}let T;_===-1?T=I.length-1:T=_===0?I.length-1:(_-1)%I.length;let D=I[T];D&&m(D);return}if(k.key===R.ARROW_DOWN){k.preventDefault();let _=I.findIndex(L=>L.label===U?.label);if(A){if(!U||_===I.length-1){m(s);return}if(U===s){let L=I[0];L&&m(L);return}}let T=(_+1)%I.length,D=I[T];D&&m(D);return}if(k.key===R.ENTER&&U&&setTimeout(()=>{v(U,k)}),!C){if(k.stopPropagation(),/^[a-zA-Z0-9]$/.test(k.key)){o?.current?.focus();return}k.preventDefault()}});return S.useEffect(()=>(window.addEventListener("keydown",w,{capture:!0}),()=>window.removeEventListener("keydown",w,{capture:!0})),[w]),S.useEffect(()=>{if(!c)return;let k=_=>{let T={};for(let D of _)T[D.category]?T[D.category].push(D):T[D.category]=[D];return T},C=c.filter(y).sort((_,T)=>_.order-T.order),I=!h&&s&&y(s);if(!h){b(k(I?C.filter(_=>_.label!==s?.label):C)),m(I?s:C[0]||null);return}let A=s5(h.toLocaleLowerCase().replace(/[<>_| -]/g,""));C=fz.filter(A,C,{extract:_=>_.haystack}).sort((_,T)=>T.score-_.score).map(_=>_.original),b(k(C)),m(C[0]??null)},[h,c,y,s]),f.jsxs(ba,{onCloseRequest:()=>x(),closeOnClickOutside:!0,title:!1,size:720,autofocus:!0,className:"command-palette-dialog",children:[f.jsx(xU,{value:h,placeholder:M("commandPalette.search.placeholder"),onChange:k=>{p(k)},selectOnRender:!0,ref:o}),!t.device.viewport.isMobile&&f.jsxs("div",{className:"shortcuts-wrapper",children:[f.jsx(kd,{shortcut:"↑↓",children:M("commandPalette.shortcuts.select")}),f.jsx(kd,{shortcut:"↵",children:M("commandPalette.shortcuts.confirm")}),f.jsx(kd,{shortcut:W("Esc"),children:M("commandPalette.shortcuts.close")})]}),f.jsxs("div",{className:"commands",children:[s&&!h&&f.jsxs("div",{className:"command-category",children:[f.jsxs("div",{className:"command-category-title",children:[M("commandPalette.recents"),f.jsx("div",{className:"icon",style:{marginLeft:"6px"},children:hT})]}),f.jsx(o5,{command:s,isSelected:s.label===U?.label,onClick:k=>v(s,k),disabled:!y(s),onMouseMove:()=>m(s),showShortcut:!t.device.viewport.isMobile,appState:n})]}),Object.keys(g).length>0?Object.keys(g).map((k,C)=>f.jsxs("div",{className:"command-category",children:[f.jsx("div",{className:"command-category-title",children:k}),g[k].map(I=>f.jsx(o5,{command:I,isSelected:I.label===U?.label,onClick:A=>v(I,A),onMouseMove:()=>m(I),showShortcut:!t.device.viewport.isMobile,appState:n},I.label))]},k)):c?f.jsxs("div",{className:"no-match",children:[f.jsx("div",{className:"icon",children:Kr})," ",M("commandPalette.search.noMatch")]}):null]})]})}var o5=({command:e,isSelected:t,disabled:n,onMouseMove:a,onClick:i,showShortcut:r,appState:s})=>{let l=()=>{};return f.jsxs("div",{className:te("command-item",{"item-selected":t,"item-disabled":n}),ref:c=>{t&&!n&&c?.scrollIntoView?.({block:"nearest"})},onClick:n?l:i,onMouseMove:n?l:a,title:n?M("commandPalette.itemNotAvailable"):"",children:[f.jsxs("div",{className:"name",children:[e.icon&&f.jsx(gf,{icon:typeof e.icon=="function"?e.icon(s):e.icon}),e.label]}),r&&e.shortcut&&f.jsx(kd,{shortcut:e.shortcut})]})},$W=Y({name:"toggleLinearEditor",category:xt.elements,label:(e,t,n)=>n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds})[0]?.type==="arrow"?"labels.lineEditor.editArrow":"labels.lineEditor.edit",keywords:["line"],trackEvent:{category:"element"},predicate:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t);return!!(!t.editingLinearElement&&i.length===1&&ue(i[0])&&!Q(i[0]))},perform(e,t,n,a){let i=a.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0})[0],r=t.editingLinearElement?.elementId===i.id?null:new J(i);return{appState:{...t,editingLinearElement:r},captureUpdate:B.IMMEDIATELY}},PanelComponent:({appState:e,updateData:t,app:n})=>{let a=n.scene.getSelectedElements({selectedElementIds:e.selectedElementIds})[0],i=M(a.type==="arrow"?"labels.lineEditor.editArrow":"labels.lineEditor.edit");return f.jsx(Me,{type:"button",icon:MT,title:i,"aria-label":i,onClick:()=>t(null)})}}),Ux=Y({name:"searchMenu",icon:Kr,keywords:["search","find"],label:"search.title",viewMode:!0,trackEvent:{category:"search_menu",action:"toggle",predicate:e=>e.gridModeEnabled},perform(e,t,n,a){if(t.openSidebar?.name===oa.name&&t.openSidebar.tab===Ps){let i=a.excalidrawContainerValue.container?.querySelector(`.${Xs.SEARCH_MENU_INPUT_WRAPPER} input`);return i?.matches(":focus")?{appState:{...t,openSidebar:null},captureUpdate:B.EVENTUALLY}:(i?.focus(),i?.select(),!1)}return{appState:{...t,openSidebar:{name:oa.name,tab:Ps},openDialog:null},captureUpdate:B.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,t,n)=>n.gridModeEnabled===void 0,keyTest:e=>e[R.CTRL_OR_CMD]&&e.key===R.F}),FW=Y({name:"cropEditor",label:"helpDialog.cropStart",icon:H2,viewMode:!0,trackEvent:{category:"menu"},keywords:["image","crop"],perform(e,t,n,a){let i=a.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!0})[0];return{appState:{...t,isCropping:!1,croppingElementId:i.id},captureUpdate:B.IMMEDIATELY}},predicate:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t);return!!(!t.croppingElementId&&i.length===1&&Le(i[0]))},PanelComponent:({appState:e,updateData:t,app:n})=>{let a=M("helpDialog.cropStart");return f.jsx(Me,{type:"button",icon:H2,title:a,"aria-label":a,onClick:()=>t(null)})}}),vu=class{constructor(e=!0,t=!0){this.isUndoStackEmpty=e,this.isRedoStackEmpty=t}},c5=class ql{constructor(){j(this,"onHistoryChangedEmitter",new Ia),j(this,"undoStack",[]),j(this,"redoStack",[])}get isUndoStackEmpty(){return this.undoStack.length===0}get isRedoStackEmpty(){return this.redoStack.length===0}clear(){this.undoStack.length=0,this.redoStack.length=0}record(t,n){let a=zW.create(n,t);a.isEmpty()||(this.undoStack.push(a.inverse()),a.elementsChange.isEmpty()||(this.redoStack.length=0),this.onHistoryChangedEmitter.trigger(new vu(this.isUndoStackEmpty,this.isRedoStackEmpty)))}undo(t,n,a){return this.perform(t,n,a,()=>ql.pop(this.undoStack),i=>ql.push(this.redoStack,i,t))}redo(t,n,a){return this.perform(t,n,a,()=>ql.pop(this.redoStack),i=>ql.push(this.undoStack,i,t))}perform(t,n,a,i,r){try{let s=i();if(s===null)return;let l=t,c=n,d=!1;for(;s;){try{[l,c,d]=s.applyTo(l,c,a)}finally{r(s)}if(d)break;s=i()}return[l,c]}finally{this.onHistoryChangedEmitter.trigger(new vu(this.isUndoStackEmpty,this.isRedoStackEmpty))}}static pop(t){if(!t.length)return null;let n=t.pop();return n!==void 0?n:null}static push(t,n,a){let i=n.inverse().applyLatestChanges(a);return t.push(i)}},zW=class Cd{constructor(t,n){this.appStateChange=t,this.elementsChange=n}static create(t,n){return new Cd(t,n)}inverse(){return new Cd(this.appStateChange.inverse(),this.elementsChange.inverse())}applyTo(t,n,a){let[i,r]=this.elementsChange.applyTo(t,a.elements),[s,l]=this.appStateChange.applyTo(n,i);return[i,s,r||l]}applyLatestChanges(t){let n=this.elementsChange.applyLatestChanges(t);return Cd.create(this.appStateChange,n)}isEmpty(){return this.appStateChange.isEmpty()&&this.elementsChange.isEmpty()}},mx=(e,t)=>{let[n,a]=S.useState(t);return S.useEffect(()=>{let i=e.on(r=>{a(r)});return()=>{i()}},[e]),n},gx=(e,t,n)=>{if(!t.multiElement&&!t.resizingElement&&!t.editingTextElement&&!t.newElement&&!t.selectedElementsAreBeingDragged&&!t.selectionElement&&!e.flowChartCreator.isCreatingChart){let a=n();if(!a)return{captureUpdate:B.EVENTUALLY};let[i,r]=a,s=Array.from(i.values());return{appState:r,elements:s,captureUpdate:B.NEVER}}return{captureUpdate:B.EVENTUALLY}},BW=(e,t)=>({name:"undo",label:"buttons.undo",icon:I2,trackEvent:{category:"history"},viewMode:!1,perform:(n,a,i,r)=>gx(r,a,()=>e.undo(oe(n),a,t.snapshot)),keyTest:n=>n[R.CTRL_OR_CMD]&&_1(n,R.Z)&&!n.shiftKey,PanelComponent:({updateData:n,data:a})=>{let{isUndoStackEmpty:i}=mx(e.onHistoryChangedEmitter,new vu(e.isUndoStackEmpty,e.isRedoStackEmpty));return f.jsx(Me,{type:"button",icon:I2,"aria-label":M("buttons.undo"),onClick:n,size:a?.size||"medium",disabled:i,"data-testid":"button-undo"})}}),HW=(e,t)=>({name:"redo",label:"buttons.redo",icon:_2,trackEvent:{category:"history"},viewMode:!1,perform:(n,a,i,r)=>gx(r,a,()=>e.redo(oe(n),a,t.snapshot)),keyTest:n=>n[R.CTRL_OR_CMD]&&n.shiftKey&&_1(n,R.Z)||i8&&n.ctrlKey&&!n.shiftKey&&_1(n,R.Y),PanelComponent:({updateData:n,data:a})=>{let{isRedoStackEmpty:i}=mx(e.onHistoryChangedEmitter,new vu(e.isUndoStackEmpty,e.isRedoStackEmpty));return f.jsx(Me,{type:"button",icon:_2,"aria-label":M("buttons.redo"),onClick:n,size:a?.size||"medium",disabled:i,"data-testid":"button-redo"})}}),Oh=(e,t,n,a,i,r)=>{if(e.trackEvent)try{typeof e.trackEvent=="object"&&(!e.trackEvent.predicate||e.trackEvent.predicate(n,a,r))&&qe(e.trackEvent.category,e.trackEvent.action||e.name,`${t} (${i.device.editor.isMobile?"mobile":"desktop"})`)}catch(s){console.error("error while logging action:",s)}},XW=class{constructor(e,t,n,a){j(this,"actions",{}),j(this,"updater"),j(this,"getAppState"),j(this,"getElementsIncludingDeleted"),j(this,"app"),j(this,"renderAction",(i,r)=>{let s=this.app.props.UIOptions.canvasActions;if(this.actions[i]&&"PanelComponent"in this.actions[i]&&(!(i in s)||s[i])){let l=this.actions[i],c=l.PanelComponent;c.displayName="PanelComponent";let d=this.getElementsIncludingDeleted(),o=this.getAppState(),u=h=>{Oh(l,"ui",o,d,this.app,h),this.updater(l.perform(this.getElementsIncludingDeleted(),this.getAppState(),h,this.app))};return f.jsx(c,{elements:this.getElementsIncludingDeleted(),appState:this.getAppState(),updateData:u,appProps:this.app.props,app:this.app,data:r})}return null}),j(this,"isActionEnabled",i=>{let r=this.getElementsIncludingDeleted(),s=this.getAppState();return!i.predicate||i.predicate(r,s,this.app.props,this.app)}),this.updater=i=>{if(ec(i))i.then(r=>e(r));else return e(i)},this.getAppState=t,this.getElementsIncludingDeleted=n,this.app=a}registerAction(e){this.actions[e.name]=e}registerAll(e){e.forEach(t=>this.registerAction(t))}handleKeyDown(e){let t=this.app.props.UIOptions.canvasActions,n=Object.values(this.actions).sort((l,c)=>(c.keyPriority||0)-(l.keyPriority||0)).filter(l=>(l.name in t?t[l.name]:!0)&&l.keyTest&&l.keyTest(e,this.getAppState(),this.getElementsIncludingDeleted(),this.app));if(n.length!==1)return n.length>1&&console.warn("Canceling as multiple actions match this shortcut",n),!1;let a=n[0];if(this.getAppState().viewModeEnabled&&a.viewMode!==!0)return!1;let i=this.getElementsIncludingDeleted(),r=this.getAppState();return Oh(a,"keyboard",r,i,this.app,null),e.preventDefault(),e.stopPropagation(),this.updater(n[0].perform(i,r,null,this.app)),!0}executeAction(e,t="api",n=null){let a=this.getElementsIncludingDeleted(),i=this.getAppState();Oh(e,t,i,a,this.app,n),this.updater(e.perform(a,i,n,this.app))}},d5=e=>{let t=Array.from(e.values());return{x:f5(t,n=>n.x)/t.length,y:f5(t,n=>n.y)/t.length}},u5=([e,t])=>Math.hypot(e.x-t.x,e.y-t.y),f5=(e,t)=>e.reduce((n,a)=>n+t(a),0),WW=({children:e,left:t,top:n,onCloseRequest:a,fitInViewport:i=!1,offsetLeft:r=0,offsetTop:s=0,viewportWidth:l=window.innerWidth,viewportHeight:c=window.innerHeight})=>{let d=S.useRef(null);S.useEffect(()=>{let u=d.current;if(!u)return;u.contains(document.activeElement)||u.focus();let h=p=>{if(p.key===R.TAB){let U=y1(u),{activeElement:m}=document,g=U.findIndex(b=>b===m);m===u?(p.shiftKey?U[U.length-1]?.focus():U[0].focus(),p.preventDefault(),p.stopImmediatePropagation()):g===0&&p.shiftKey?(U[U.length-1]?.focus(),p.preventDefault(),p.stopImmediatePropagation()):g===U.length-1&&!p.shiftKey&&(U[0]?.focus(),p.preventDefault(),p.stopImmediatePropagation())}};return u.addEventListener("keydown",h),()=>u.removeEventListener("keydown",h)},[]);let o=S.useRef(null);return S.useLayoutEffect(()=>{if(i&&d.current&&n!=null&&t!=null){let u=d.current,{width:h,height:p}=u.getBoundingClientRect();if(o.current?.top===n&&o.current?.left===t)return;o.current={top:n,left:t},h>=l?(u.style.width=`${l}px`,u.style.left="0px",u.style.overflowX="scroll"):t+h-r>l?u.style.left=`${l-h-10}px`:u.style.left=`${t}px`,p>=c?(u.style.height=`${c-20}px`,u.style.top="10px",u.style.overflowY="scroll"):n+p-s>c?u.style.top=`${c-p}px`:u.style.top=`${n}px`}},[n,t,i,l,c,r,s]),S.useEffect(()=>{if(a){let u=h=>{d.current?.contains(h.target)||Ft.unstable_batchedUpdates(()=>a(h))};return document.addEventListener("pointerdown",u,!1),()=>document.removeEventListener("pointerdown",u,!1)}},[a]),f.jsx("div",{className:"popover",ref:d,tabIndex:-1,children:e})},jt="separator",VW=Z.memo(({actionManager:e,items:t,top:n,left:a,onClose:i})=>{let r=Uc(),s=Sf(),l=t.reduce((c,d)=>(d&&(d===jt||!d.predicate||d.predicate(s,r,e.app.props,e.app))&&c.push(d),c),[]);return f.jsx(WW,{onCloseRequest:()=>{i()},top:n,left:a,fitInViewport:!0,offsetLeft:r.offsetLeft,offsetTop:r.offsetTop,viewportWidth:r.width,viewportHeight:r.height,children:f.jsx("ul",{className:"context-menu",onContextMenu:c=>c.preventDefault(),children:l.map((c,d)=>{if(c===jt)return!l[d-1]||l[d-1]===jt?null:f.jsx("hr",{className:"context-menu-item-separator"},d);let o=c.name,u="";return c.label&&(typeof c.label=="function"?u=M(c.label(s,r,e.app)):u=M(c.label)),f.jsx("li",{"data-testid":o,onClick:()=>{i(()=>{e.executeAction(c,"contextMenu")})},children:f.jsxs("button",{type:"button",className:te("context-menu-item",{dangerous:o==="deleteSelectedElements",checkmark:c.checked?.(r)}),children:[f.jsx("div",{className:"context-menu-item__label",children:u}),f.jsx("kbd",{className:"context-menu-item__shortcut",children:o?tn(o):""})]})},d)})})})}),GW=({children:e,onClose:t})=>{let[n,a]=S.useState(!!e),{container:i}=Ka(),r=Z.useCallback(()=>{a(!1),t&&t(),i?.focus()},[t,i]);return f.jsx(f.Fragment,{children:n&&f.jsx(ba,{size:"small",onCloseRequest:r,title:M("errorDialog.title"),children:f.jsx("div",{style:{whiteSpace:"pre-wrap"},children:e})})})},bx=function({onChange:e,value:t,choices:n,name:a}){return f.jsx("div",{className:"RadioGroup",children:n.map(i=>f.jsxs("div",{className:te("RadioGroup__choice",{active:i.value===t}),title:i.ariaLabel,children:[f.jsx("input",{name:a,type:"radio",checked:i.value===t,onChange:()=>e(i.value),"aria-label":i.ariaLabel}),i.label]},String(i.value)))})},Xc=({title:e,name:t,checked:n,onChange:a,disabled:i=!1})=>f.jsx("div",{className:te("Switch",{toggled:n,disabled:i}),children:f.jsx("input",{name:t,id:t,title:e,type:"checkbox",checked:n,disabled:i,onChange:()=>a(!n),onKeyDown:r=>{r.key===" "&&a(!n)}})}),Uo=S.forwardRef(({children:e,icon:t,onClick:n,label:a,variant:i="filled",color:r="primary",size:s="medium",fullWidth:l,className:c,status:d},o)=>{let[u,h]=S.useState(!1),p=async m=>{let g=n?.(m);if(ec(g)){let b=window.setTimeout(()=>{h(!0)},50);try{await g}catch(x){if(x instanceof Hu)console.warn(x);else throw x}finally{clearTimeout(b),h(!1)}}},U=u?"loading":d;return r=U==="success"?"success":r,f.jsx("button",{className:te("ExcButton",`ExcButton--color-${r}`,`ExcButton--variant-${i}`,`ExcButton--size-${s}`,`ExcButton--status-${U}`,{"ExcButton--fullWidth":l},c),onClick:p,type:"button","aria-label":a,ref:o,disabled:U==="loading"||U==="success",children:f.jsxs("div",{className:"ExcButton__contents",children:[U==="loading"?f.jsx(wi,{className:"ExcButton__statusIcon"}):U==="success"&&f.jsx("div",{className:"ExcButton__statusIcon",children:rT}),t&&f.jsx("div",{className:"ExcButton__icon","aria-hidden":!0,children:t}),i!=="icon"&&(e??a)]})})}),YW=2e3,ZW=()=>{let[e,t]=S.useState(null),n=S.useRef(0),a=()=>{clearTimeout(n.current),t("success"),n.current=window.setTimeout(()=>{t(null)},YW)},i=S.useCallback(()=>{t(null)},[]);return{copyStatus:e,resetCopyStatus:i,onCopy:a}},KW="filter"in document.createElement("canvas").getContext("2d"),qW=()=>f.jsxs("div",{children:[f.jsx("h3",{children:M("canvasError.cannotShowPreview")}),f.jsx("p",{children:f.jsx("span",{children:M("canvasError.canvasTooBig")})}),f.jsxs("em",{children:["(",M("canvasError.canvasTooBigTip"),")"]})]}),JW=({appStateSnapshot:e,elementsSnapshot:t,files:n,actionManager:a,onExportImage:i,name:r})=>{let s=_t(t,e),[l,c]=S.useState(r),[d,o]=S.useState(s),[u,h]=S.useState(e.exportBackground),[p,U]=S.useState(e.exportWithDarkMode),[m,g]=S.useState(e.exportEmbedScene),[b,x]=S.useState(e.exportScale),v=S.useRef(null),[y,w]=S.useState(null),{onCopy:k,copyStatus:C,resetCopyStatus:I}=ZW();S.useEffect(()=>{I()},[l,u,p,b,m,I]);let{exportedElements:A,exportingFrame:_}=vf(t,e,d);return S.useEffect(()=>{let T=v.current;if(!T)return;let D=T.offsetWidth,L=T.offsetHeight;D&&oc({elements:A,appState:{...e,name:l,exportBackground:u,exportWithDarkMode:p,exportScale:b,exportEmbedScene:m},files:n,exportPadding:dl,maxWidthOrHeight:Math.max(D,L),exportingFrame:_}).then(F=>(w(null),zo(F).then(()=>{T.replaceChildren(F)}).catch(P=>{throw P.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(M("canvasError.canvasTooBig")):P}))).catch(F=>{console.error(F),w(F)})},[e,n,A,_,l,u,p,b,m]),f.jsxs("div",{className:"ImageExportModal",children:[f.jsx("h3",{children:M("imageExportDialog.header")}),f.jsxs("div",{className:"ImageExportModal__preview",children:[f.jsx("div",{className:"ImageExportModal__preview__canvas",ref:v,children:y&&f.jsx(qW,{})}),f.jsx("div",{className:"ImageExportModal__preview__filename",children:!is&&f.jsx("input",{type:"text",className:"TextInput",value:l,style:{width:"30ch"},onChange:T=>{c(T.target.value),a.executeAction(WH,"ui",T.target.value)}})})]}),f.jsxs("div",{className:"ImageExportModal__settings",children:[f.jsx("h3",{children:M("imageExportDialog.header")}),s&&f.jsx(Rl,{label:M("imageExportDialog.label.onlySelected"),name:"exportOnlySelected",children:f.jsx(Xc,{name:"exportOnlySelected",checked:d,onChange:T=>{o(T)}})}),f.jsx(Rl,{label:M("imageExportDialog.label.withBackground"),name:"exportBackgroundSwitch",children:f.jsx(Xc,{name:"exportBackgroundSwitch",checked:u,onChange:T=>{h(T),a.executeAction(GH,"ui",T)}})}),KW&&f.jsx(Rl,{label:M("imageExportDialog.label.darkMode"),name:"exportDarkModeSwitch",children:f.jsx(Xc,{name:"exportDarkModeSwitch",checked:p,onChange:T=>{U(T),a.executeAction(YH,"ui",T)}})}),f.jsx(Rl,{label:M("imageExportDialog.label.embedScene"),tooltip:M("imageExportDialog.tooltip.embedScene"),name:"exportEmbedSwitch",children:f.jsx(Xc,{name:"exportEmbedSwitch",checked:m,onChange:T=>{g(T),a.executeAction($v,"ui",T)}})}),f.jsx(Rl,{label:M("imageExportDialog.label.scale"),name:"exportScale",children:f.jsx(bx,{name:"exportScale",value:b,onChange:T=>{x(T),a.executeAction(VH,"ui",T)},choices:X0.map(T=>({value:T,label:`${T}×`}))})}),f.jsxs("div",{className:"ImageExportModal__settings__buttons",children:[f.jsx(Uo,{className:"ImageExportModal__settings__buttons__button",label:M("imageExportDialog.title.exportToPng"),onClick:()=>i(th.png,A,{exportingFrame:_}),icon:B2,children:M("imageExportDialog.button.exportToPng")}),f.jsx(Uo,{className:"ImageExportModal__settings__buttons__button",label:M("imageExportDialog.title.exportToSvg"),onClick:()=>i(th.svg,A,{exportingFrame:_}),icon:B2,children:M("imageExportDialog.button.exportToSvg")}),(Dp||Co)&&f.jsx(Uo,{className:"ImageExportModal__settings__buttons__button",label:M("imageExportDialog.title.copyPngToClipboard"),status:C,onClick:async()=>{await i(th.clipboard,A,{exportingFrame:_}),k()},icon:np,children:M("imageExportDialog.button.copyPngToClipboard")})]})]})]})},Rl=({label:e,children:t,tooltip:n,name:a})=>f.jsxs("div",{className:"ImageExportModal__settings__setting",title:e,children:[f.jsxs("label",{htmlFor:a,className:"ImageExportModal__settings__setting__label",children:[e,n&&f.jsx(ns,{label:n,long:!0,children:iT})]}),f.jsx("div",{className:"ImageExportModal__settings__setting__content",children:t})]}),QW=({elements:e,appState:t,files:n,actionManager:a,onExportImage:i,onCloseRequest:r,name:s})=>{let[{appStateSnapshot:l,elementsSnapshot:c}]=S.useState(()=>({appStateSnapshot:di(t),elementsSnapshot:di(e)}));return f.jsx(ba,{onCloseRequest:r,size:"wide",title:!1,children:f.jsx(JW,{elementsSnapshot:c,appStateSnapshot:l,files:n,actionManager:a,onExportImage:i,name:s})})},vx=({children:e,side:t,className:n})=>f.jsx("div",{className:te("FixedSideContainer",`FixedSideContainer_side_${t}`,n),children:e}),zs=100,Bs=100,h5=e=>{switch(e){case R.ARROW_UP:return"up";case R.ARROW_DOWN:return"down";case R.ARROW_RIGHT:return"right";case R.ARROW_LEFT:return"left";default:return"right"}},xx=(e,t,n,a)=>{let i=[...n.values()].reduce((r,s)=>{let l;if(Q(s)&&(l=s[e==="predecessors"?"startBinding":"endBinding"])&&s[e==="predecessors"?"endBinding":"startBinding"]?.elementId===t.id){let c=n.get(l.elementId);if(!c)return r;nn(Ua(c),"not an ExcalidrawBindableElement");let d=e==="predecessors"?s.points[s.points.length-1]:[0,0],o=k7(t,Ta(t),[d[0]+s.x,d[1]+s.y]);r.push({relative:c,heading:o})}return r},[]);switch(a){case"up":return i.filter(r=>mt(r.heading,gn)).map(r=>r.relative);case"down":return i.filter(r=>mt(r.heading,zt)).map(r=>r.relative);case"right":return i.filter(r=>mt(r.heading,pt)).map(r=>r.relative);case"left":return i.filter(r=>mt(r.heading,mn)).map(r=>r.relative)}},b0=(e,t,n)=>xx("successors",e,t,n),v0=(e,t,n)=>xx("predecessors",e,t,n),eV=(e,t,n)=>{let a=Bs+e.width;if(n==="up"||n==="down"){let l=zs+e.height,c=e.x,d=e.x+e.width;if(t.every(o=>o.x+o.width<c||o.x>d))return{x:0,y:l*(n==="up"?-1:1)}}else if(n==="right"||n==="left"){let l=e.y,c=e.y+e.height;if(t.every(d=>d.y+d.height<l||d.y>c))return{x:(Bs+e.width)*(n==="left"?-1:1),y:0}}if(n==="up"||n==="down"){let l=zs+e.height,c=(t.length,l),d=t.length===0?0:(t.length+1)%2===0?(t.length+1)/2*a:t.length/2*a*-1;return n==="up"?{x:d,y:c*-1}:{x:d,y:c}}let i=zs+e.height,r=(t.length,Bs+e.width),s=t.length===0?0:(t.length+1)%2===0?(t.length+1)/2*i:t.length/2*i*-1;return n==="left"?{x:r*-1,y:s}:{x:r,y:s}},tV=(e,t,n,a)=>{let i=b0(e,t,a),r=v0(e,t,a),s=eV(e,[...i,...r],a),l=Xa({type:e.type,x:e.x+s.x,y:e.y+s.y,width:e.width,height:e.height,roundness:e.roundness,roughness:e.roughness,backgroundColor:e.backgroundColor,strokeColor:e.strokeColor,strokeWidth:e.strokeWidth,opacity:e.opacity,fillStyle:e.fillStyle,strokeStyle:e.strokeStyle});nn($u(l),"not an ExcalidrawFlowchartNodeElement");let c=yx(e,l,t,a,n);return{nextNode:l,bindingArrow:c}},nV=(e,t,n,a,i)=>{let r=[];for(let s=0;s<i;s++){let l,c;if(a==="left"||a==="right"){let u=zs*(i-1)+i*e.height,h=e.y+e.height/2-u/2,p=Bs+e.width;a==="left"&&(p*=-1),l=e.x+p;let U=(zs+e.height)*s;c=h+U}else{let u=Bs*(i-1)+i*e.width,h=e.x+e.width/2-u/2,p=zs+e.height;a==="up"&&(p*=-1),c=e.y+p;let U=(Bs+e.width)*s;l=h+U}let d=Xa({type:e.type,x:l,y:c,width:e.width,height:e.height,roundness:e.roundness,roughness:e.roughness,backgroundColor:e.backgroundColor,strokeColor:e.strokeColor,strokeWidth:e.strokeWidth,opacity:e.opacity,fillStyle:e.fillStyle,strokeStyle:e.strokeStyle});nn($u(d),"not an ExcalidrawFlowchartNodeElement");let o=yx(e,d,t,a,n);r.push(d),r.push(o)}return r},yx=(e,t,n,a,i)=>{let r,s;switch(a){case"up":{r=e.x+e.width/2,s=e.y-6;break}case"down":{r=e.x+e.width/2,s=e.y+e.height+6;break}case"right":{r=e.x+e.width+6,s=e.y+e.height/2;break}case"left":{r=e.x-6,s=e.y+e.height/2;break}}let l,c;switch(a){case"up":{l=t.x+t.width/2-r,c=t.y+t.height-s+6;break}case"down":{l=t.x+t.width/2-r,c=t.y-s-6;break}case"right":{l=t.x-r-6,c=t.y-s+t.height/2;break}case"left":{l=t.x+t.width-r+6,c=t.y-s+t.height/2;break}}let d=gp({type:"arrow",x:r,y:s,startArrowhead:null,endArrowhead:i.currentItemEndArrowhead,strokeColor:e.strokeColor,strokeStyle:e.strokeStyle,strokeWidth:e.strokeWidth,opacity:e.opacity,roughness:e.roughness,points:[E(0,0),E(l,c)],elbowed:!0});Ba(d,e,"start",n),Ba(d,t,"end",n);let o=new Map;o.set(e.id,e),o.set(t.id,t),o.set(d.id,d),J.movePoints(d,[{index:1,point:d.points[1]}]);let u=Mp(d,Hn(new Map([...n.entries(),[e.id,e],[t.id,t],[d.id,d]])),{points:d.points});return{...d,...u}},aV=class{constructor(){j(this,"isExploring",!1),j(this,"sameLevelNodes",[]),j(this,"sameLevelIndex",0),j(this,"direction",null),j(this,"visitedNodes",new Set)}clear(){this.isExploring=!1,this.sameLevelNodes=[],this.sameLevelIndex=0,this.direction=null,this.visitedNodes.clear()}exploreByDirection(e,t,n){if(!Ua(e))return null;if(n!==this.direction&&this.clear(),this.visitedNodes.has(e.id)||this.visitedNodes.add(e.id),this.isExploring&&n===this.direction&&this.sameLevelNodes.length>1)return this.sameLevelIndex=(this.sameLevelIndex+1)%this.sameLevelNodes.length,this.sameLevelNodes[this.sameLevelIndex].id;let a=[...b0(e,t,n),...v0(e,t,n)];if(a.length>0)return this.sameLevelIndex=0,this.isExploring=!0,this.sameLevelNodes=a,this.direction=n,this.visitedNodes.add(a[0].id),a[0].id;if(n===this.direction||!this.isExploring){this.isExploring||this.visitedNodes.add(e.id);let i=["up","right","down","left"].filter(r=>r!==n).map(r=>[...b0(e,t,r),...v0(e,t,r)]).flat().filter(r=>!this.visitedNodes.has(r.id));for(let r of i)if(!this.visitedNodes.has(r.id))return this.visitedNodes.add(r.id),this.isExploring=!0,this.direction=n,r.id}return null}},iV=class{constructor(){j(this,"isCreatingChart",!1),j(this,"numberOfNodes",0),j(this,"direction","right"),j(this,"pendingNodes",null)}createNodes(e,t,n,a){if(a!==this.direction){let{nextNode:i,bindingArrow:r}=tV(e,t,n,a);this.numberOfNodes=1,this.isCreatingChart=!0,this.direction=a,this.pendingNodes=[i,r]}else{this.numberOfNodes+=1;let i=nV(e,t,n,a,this.numberOfNodes);this.isCreatingChart=!0,this.direction=a,this.pendingNodes=i}if(e.frameId){let i=t.get(e.frameId);nn(i&&I8(i),"not an ExcalidrawFrameElement"),i&&this.pendingNodes.every(r=>cc([r],i,t)||sr(r,i,t))&&(this.pendingNodes=this.pendingNodes.map(r=>V(r,{frameId:e.frameId},!1)))}}clear(){this.isCreatingChart=!1,this.pendingNodes=null,this.direction=null,this.numberOfNodes=0}},rV=(e,t)=>{for(let[,n]of t)if(n.type==="arrow"&&(n.startBinding?.elementId===e.id||n.endBinding?.elementId===e.id))return!0;return!1},sV=({appState:e,isMobile:t,device:n,app:a})=>{let{activeTool:i,isResizing:r,isRotating:s,lastPointerDownWith:l}=e,c=e.multiElement!==null;if(e.openSidebar?.name===oa.name&&e.openSidebar.tab===Ps&&e.searchMatches?.length)return M("hints.dismissSearch");if(e.openSidebar&&!n.editor.canFitSidebar)return null;if(Ma(e))return M("hints.eraserRevert");if(i.type==="arrow"||i.type==="line")return c?M("hints.linearElementMulti"):i.type==="arrow"?M("hints.arrowTool",{arrowShortcut:W("A")}):M("hints.linearElement");if(i.type==="freedraw")return M("hints.freeDraw");if(i.type==="text")return M("hints.text");if(i.type==="embeddable")return M("hints.embeddable");if(e.activeTool.type==="image"&&e.pendingImageElementId)return M("hints.placeImage");let d=a.scene.getSelectedElements(e);if(r&&l==="mouse"&&d.length===1){let o=d[0];return ue(o)&&o.points.length===2?M("hints.lockAngle"):Le(o)?M("hints.resizeImage"):M("hints.resize")}if(s&&l==="mouse")return M("hints.rotate");if(d.length===1&&q(d[0]))return M("hints.text_selected");if(e.editingTextElement)return M("hints.text_editing");if(e.croppingElementId)return M("hints.leaveCropEditor");if(d.length===1&&Le(d[0]))return M("hints.enterCropEditor");if(i.type==="selection"){if(e.selectionElement&&!d.length&&!e.editingTextElement&&!e.editingLinearElement)return M("hints.deepBoxSelect");if(No(a)&&e.selectedElementsAreBeingDragged)return M("hints.disableSnapping");if(!d.length&&!t)return M("hints.canvasPanning");if(d.length===1){if(ue(d[0]))return e.editingLinearElement?e.editingLinearElement.selectedPointsIndices?M("hints.lineEditor_pointSelected"):M("hints.lineEditor_nothingSelected"):M("hints.lineEditor_info");if(!e.newElement&&!e.selectedElementsAreBeingDragged&&Lr(d[0]))return $u(d[0])?rV(d[0],a.scene.getNonDeletedElementsMap())?[M("hints.bindTextToElement"),M("hints.createFlowchart")]:[M("hints.bindTextToElement"),M("hints.createFlowchart")]:M("hints.bindTextToElement")}}return null},wx=({appState:e,isMobile:t,device:n,app:a})=>{let i=sV({appState:e,isMobile:t,device:n,app:a});if(!i)return null;let r=Array.isArray(i)?i.map(s=>W(s).replace(/\. ?$/,"")).join(". "):W(i);return f.jsx("div",{className:"HintViewer",children:f.jsx("span",{children:r})})},lV="medium",p5={CHECKED:Q0,UNCHECKED:Fu},Ex=e=>f.jsxs("label",{className:te("ToolIcon ToolIcon__lock",`ToolIcon_size_${lV}`,{"is-mobile":e.isMobile}),title:`${e.title} — Q`,children:[f.jsx("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title,"data-testid":"toolbar-lock"}),f.jsx("div",{className:"ToolIcon__icon",children:e.checked?p5.CHECKED:p5.UNCHECKED})]}),Xo=({heading:e,children:t,...n})=>{let{id:a}=Ka(),i=f.jsx("h2",{className:"visually-hidden",id:`${a}-${e}-title`,children:M(`headings.${e}`)});return f.jsx("section",{...n,"aria-labelledby":`${a}-${e}-title`,children:typeof t=="function"?t(i):f.jsxs(f.Fragment,{children:[i,t]})})},_a=4,Vi=6,oV="rgba(0,0,0,0.3)",cV=(e,t,n,a)=>{if(!e.length)return{horizontal:null,vertical:null};let[i,r,s,l]=Ne(e),c=t/a.zoom.value,d=n/a.zoom.value,o=t-c,u=n-d,h={top:parseInt(Ac("sat"))||0,bottom:parseInt(Ac("sab"))||0,left:parseInt(Ac("sal"))||0,right:parseInt(Ac("sar"))||0},p=Bo().rtl,U=-a.scrollX+o/2+h.left,m=-a.scrollY+u/2+h.top,g=U+c-h.right,b=m+d-h.bottom,x=Math.min(i,U),v=Math.min(r,m),y=Math.max(s,g),w=Math.max(l,b);return{horizontal:U===x&&g===y?null:{x:Math.max(h.left,_a)+(U-x)/(y-x)*t,y:n-Vi-Math.max(_a,h.bottom),width:(g-U)/(y-x)*t-Math.max(_a*2,h.left+h.right),height:Vi},vertical:m===v&&b===w?null:{x:p?Math.max(h.left,_a):t-Vi-Math.max(h.right,_a),y:(m-v)/(w-v)*n+Math.max(h.top,_a),width:Vi,height:(b-m)/(w-v)*n-Math.max(_a*2,h.top+h.bottom)}}},U5=(e,t,n)=>{let[a,i]=[e.horizontal,e.vertical].map(r=>r!=null&&r.x<=t&&t<=r.x+r.width&&r.y<=n&&n<=r.y+r.height);return{isOverEither:a||i,isOverHorizontal:a,isOverVertical:i}},dV="medium",Sx=e=>e.penDetected?f.jsxs("label",{className:te("ToolIcon ToolIcon__penMode",`ToolIcon_size_${dV}`,{"is-mobile":e.isMobile}),title:`${e.title}`,children:[f.jsx("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title}),f.jsx("div",{className:"ToolIcon__icon",children:n_})]}):null,kx=e=>f.jsx(Me,{className:te("Shape",{fillable:!1}),type:"radio",icon:W8,name:"editor-current-shape",checked:e.checked,title:`${e.title} — H`,keyBindingLabel:e.isMobile?void 0:R.H.toLocaleUpperCase(),"aria-label":`${e.title} — H`,"aria-keyshortcuts":R.H,"data-testid":"toolbar-hand",onChange:()=>e.onChange?.()}),uV=({appState:e,elements:t,actionManager:n,setAppState:a,onLockToggle:i,onHandToolToggle:r,onPenModeToggle:s,renderTopRightUI:l,renderCustomStats:c,renderSidebars:d,device:o,renderWelcomeScreen:u,UIOptions:h,app:p})=>{let{WelcomeScreenCenterTunnel:U,MainMenuTunnel:m,DefaultSidebarTriggerTunnel:g}=un(),b=()=>f.jsxs(vx,{side:"top",className:"App-top-bar",children:[u&&f.jsx(U.Out,{}),f.jsx(Xo,{heading:"shapes",children:v=>f.jsx(On.Col,{gap:4,align:"center",children:f.jsxs(On.Row,{gap:1,className:"App-toolbar-container",children:[f.jsxs(ua,{padding:1,className:"App-toolbar App-toolbar--mobile",children:[v,f.jsx(On.Row,{gap:1,children:f.jsx(ux,{appState:e,activeTool:e.activeTool,UIOptions:h,app:p})})]}),l&&l(!0,e),f.jsxs("div",{className:"mobile-misc-tools-container",children:[!e.viewModeEnabled&&e.openDialog?.name!=="elementLinkSelector"&&f.jsx(g.Out,{}),f.jsx(Sx,{checked:e.penMode,onChange:()=>s(null),title:M("toolBar.penMode"),isMobile:!0,penDetected:e.penDetected}),f.jsx(Ex,{checked:e.activeTool.locked,onChange:i,title:M("toolBar.lock"),isMobile:!0}),f.jsx(kx,{checked:Vs(e),onChange:()=>r(),title:M("toolBar.hand"),isMobile:!0})]})]})})}),f.jsx(wx,{appState:e,isMobile:!0,device:o,app:p})]}),x=()=>e.viewModeEnabled||e.openDialog?.name==="elementLinkSelector"?f.jsx("div",{className:"App-toolbar-content",children:f.jsx(m.Out,{})}):f.jsxs("div",{className:"App-toolbar-content",children:[f.jsx(m.Out,{}),n.renderAction("toggleEditMenu"),n.renderAction(e.multiElement?"finalize":"duplicateSelection"),n.renderAction("deleteSelectedElements"),f.jsxs("div",{children:[n.renderAction("undo"),n.renderAction("redo")]})]});return f.jsxs(f.Fragment,{children:[d(),!e.viewModeEnabled&&e.openDialog?.name!=="elementLinkSelector"&&b(),f.jsx("div",{className:"App-bottom-bar",style:{marginBottom:Vi+_a*2,marginLeft:Vi+_a*2,marginRight:Vi+_a*2},children:f.jsxs(ua,{padding:0,children:[e.openMenu==="shape"&&!e.viewModeEnabled&&e.openDialog?.name!=="elementLinkSelector"&&Vp(e,t)?f.jsx(Xo,{className:"App-mobile-menu",heading:"selectedShapeActions",children:f.jsx(dx,{appState:e,elementsMap:p.scene.getNonDeletedElementsMap(),renderAction:n.renderAction,app:p})}):null,f.jsxs("footer",{className:"App-toolbar",children:[x(),e.scrolledOutside&&!e.openMenu&&!e.openSidebar&&f.jsx("button",{type:"button",className:"scroll-back-to-content",onClick:()=>{a(v=>({...Lo(t,v)}))},children:M("buttons.scrollBackToContent")})]})]})})]})},m5=e=>{let t=S.useRef(null),[n,a]=S.useState(null);return S.useLayoutEffect(()=>{if(!e.spreadsheet)return;let i=UO(e.chartType,e.spreadsheet,0,0);a(i);let r,s=t.current;return(async()=>(r=await Sp(i,{exportBackground:!1,viewBackgroundColor:Bt.white},null,{skipInliningFonts:!0}),r.querySelector(".style-fonts")?.remove(),s.replaceChildren(),s.appendChild(r),e.selected&&s.parentNode.focus()))(),()=>{s.replaceChildren()}},[e.spreadsheet,e.chartType,e.selected]),f.jsx("button",{type:"button",className:"ChartPreview",onClick:()=>{n&&e.onClick(e.chartType,n)},children:f.jsx("div",{ref:t})})},fV=({setAppState:e,appState:t,onClose:n})=>{let{onInsertElements:a}=va(),i=Z.useCallback(()=>{n&&n()},[n]),r=(s,l)=>{a(l),qe("paste","chart",s),e({currentChartType:s,pasteDialog:{shown:!1,data:null}})};return f.jsx(ba,{size:"small",onCloseRequest:i,title:M("labels.pasteCharts"),className:"PasteChartDialog",autofocus:!1,children:f.jsxs("div",{className:"container",children:[f.jsx(m5,{chartType:"bar",spreadsheet:t.pasteDialog.data,selected:t.currentChartType==="bar",onClick:r}),f.jsx(m5,{chartType:"line",spreadsheet:t.pasteDialog.data,selected:t.currentChartType==="line",onClick:r})]})})},hV=()=>f.jsxs("div",{className:"HelpDialog__header",children:[f.jsxs("a",{className:"HelpDialog__btn",href:"https://docs.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:[f.jsx("div",{className:"HelpDialog__link-icon",children:M2}),M("helpDialog.documentation")]}),f.jsxs("a",{className:"HelpDialog__btn",href:"https://plus.excalidraw.com/blog",target:"_blank",rel:"noopener noreferrer",children:[f.jsx("div",{className:"HelpDialog__link-icon",children:M2}),M("helpDialog.blog")]}),f.jsxs("a",{className:"HelpDialog__btn",href:"https://github.com/excalidraw/excalidraw/issues",target:"_blank",rel:"noopener noreferrer",children:[f.jsx("div",{className:"HelpDialog__link-icon",children:O8}),M("helpDialog.github")]}),f.jsxs("a",{className:"HelpDialog__btn",href:"https://youtube.com/@excalidraw",target:"_blank",rel:"noopener noreferrer",children:[f.jsx("div",{className:"HelpDialog__link-icon",children:kT}),"YouTube"]})]}),pV=e=>f.jsxs(f.Fragment,{children:[f.jsx("h3",{children:e.title}),f.jsx("div",{className:"HelpDialog__islands-container",children:e.children})]}),$h=e=>f.jsxs("div",{className:`HelpDialog__island ${e.className}`,children:[f.jsx("h4",{className:"HelpDialog__island-title",children:e.caption}),f.jsx("div",{className:"HelpDialog__island-content",children:e.children})]});function*UV(e,t){let n=!0;for(let a of e)n||(yield t),n=!1,yield a}var mV=e=>e.replace(/\b[a-z]\b/,t=>t.toUpperCase()),ee=({label:e,shortcuts:t,isOr:n=!0})=>{let a=t.map(i=>(i.endsWith("++")?[...i.slice(0,-2).split("+"),"+"]:i.split("+")).map(r=>f.jsx(gV,{children:mV(r)},r)));return f.jsxs("div",{className:"HelpDialog__shortcut",children:[f.jsx("div",{children:e}),f.jsx("div",{className:"HelpDialog__key-container",children:[...UV(a,n?M("helpDialog.or"):null)]})]})},gV=e=>f.jsx("kbd",{className:"HelpDialog__key",...e}),bV=({onClose:e})=>{let t=Z.useCallback(()=>{e&&e()},[e]);return f.jsx(f.Fragment,{children:f.jsxs(ba,{onCloseRequest:t,title:M("helpDialog.title"),className:"HelpDialog",children:[f.jsx(hV,{}),f.jsxs(pV,{title:M("helpDialog.shortcuts"),children:[f.jsxs($h,{className:"HelpDialog__island--tools",caption:M("helpDialog.tools"),children:[f.jsx(ee,{label:M("toolBar.hand"),shortcuts:[R.H]}),f.jsx(ee,{label:M("toolBar.selection"),shortcuts:[R.V,R[1]]}),f.jsx(ee,{label:M("toolBar.rectangle"),shortcuts:[R.R,R[2]]}),f.jsx(ee,{label:M("toolBar.diamond"),shortcuts:[R.D,R[3]]}),f.jsx(ee,{label:M("toolBar.ellipse"),shortcuts:[R.O,R[4]]}),f.jsx(ee,{label:M("toolBar.arrow"),shortcuts:[R.A,R[5]]}),f.jsx(ee,{label:M("toolBar.line"),shortcuts:[R.L,R[6]]}),f.jsx(ee,{label:M("toolBar.freedraw"),shortcuts:[R.P,R[7]]}),f.jsx(ee,{label:M("toolBar.text"),shortcuts:[R.T,R[8]]}),f.jsx(ee,{label:M("toolBar.image"),shortcuts:[R[9]]}),f.jsx(ee,{label:M("toolBar.eraser"),shortcuts:[R.E,R[0]]}),f.jsx(ee,{label:M("toolBar.frame"),shortcuts:[R.F]}),f.jsx(ee,{label:M("toolBar.laser"),shortcuts:[R.K]}),f.jsx(ee,{label:M("labels.eyeDropper"),shortcuts:[R.I,"Shift+S","Shift+G"]}),f.jsx(ee,{label:M("helpDialog.editLineArrowPoints"),shortcuts:[W("CtrlOrCmd+Enter")]}),f.jsx(ee,{label:M("helpDialog.editText"),shortcuts:[W("Enter")]}),f.jsx(ee,{label:M("helpDialog.textNewLine"),shortcuts:[W("Enter"),W("Shift+Enter")]}),f.jsx(ee,{label:M("helpDialog.textFinish"),shortcuts:[W("Esc"),W("CtrlOrCmd+Enter")]}),f.jsx(ee,{label:M("helpDialog.curvedArrow"),shortcuts:["A",M("helpDialog.click"),M("helpDialog.click"),M("helpDialog.click")],isOr:!1}),f.jsx(ee,{label:M("helpDialog.curvedLine"),shortcuts:["L",M("helpDialog.click"),M("helpDialog.click"),M("helpDialog.click")],isOr:!1}),f.jsx(ee,{label:M("helpDialog.cropStart"),shortcuts:[M("helpDialog.doubleClick"),W("Enter")],isOr:!0}),f.jsx(ee,{label:M("helpDialog.cropFinish"),shortcuts:[W("Enter"),W("Escape")],isOr:!0}),f.jsx(ee,{label:M("toolBar.lock"),shortcuts:[R.Q]}),f.jsx(ee,{label:M("helpDialog.preventBinding"),shortcuts:[W("CtrlOrCmd")]}),f.jsx(ee,{label:M("toolBar.link"),shortcuts:[W("CtrlOrCmd+K")]})]}),f.jsxs($h,{className:"HelpDialog__island--view",caption:M("helpDialog.view"),children:[f.jsx(ee,{label:M("buttons.zoomIn"),shortcuts:[W("CtrlOrCmd++")]}),f.jsx(ee,{label:M("buttons.zoomOut"),shortcuts:[W("CtrlOrCmd+-")]}),f.jsx(ee,{label:M("buttons.resetZoom"),shortcuts:[W("CtrlOrCmd+0")]}),f.jsx(ee,{label:M("helpDialog.zoomToFit"),shortcuts:["Shift+1"]}),f.jsx(ee,{label:M("helpDialog.zoomToSelection"),shortcuts:["Shift+2"]}),f.jsx(ee,{label:M("helpDialog.movePageUpDown"),shortcuts:["PgUp/PgDn"]}),f.jsx(ee,{label:M("helpDialog.movePageLeftRight"),shortcuts:["Shift+PgUp/PgDn"]}),f.jsx(ee,{label:M("buttons.zenMode"),shortcuts:[W("Alt+Z")]}),f.jsx(ee,{label:M("buttons.objectsSnapMode"),shortcuts:[W("Alt+S")]}),f.jsx(ee,{label:M("labels.toggleGrid"),shortcuts:[W("CtrlOrCmd+'")]}),f.jsx(ee,{label:M("labels.viewMode"),shortcuts:[W("Alt+R")]}),f.jsx(ee,{label:M("labels.toggleTheme"),shortcuts:[W("Alt+Shift+D")]}),f.jsx(ee,{label:M("stats.fullTitle"),shortcuts:[W("Alt+/")]}),f.jsx(ee,{label:M("search.title"),shortcuts:[tn("searchMenu")]}),f.jsx(ee,{label:M("commandPalette.title"),shortcuts:Co?[tn("commandPalette")]:[tn("commandPalette"),tn("commandPalette",1)]})]}),f.jsxs($h,{className:"HelpDialog__island--editor",caption:M("helpDialog.editor"),children:[f.jsx(ee,{label:M("helpDialog.createFlowchart"),shortcuts:[W("CtrlOrCmd+Arrow Key")],isOr:!0}),f.jsx(ee,{label:M("helpDialog.navigateFlowchart"),shortcuts:[W("Alt+Arrow Key")],isOr:!0}),f.jsx(ee,{label:M("labels.moveCanvas"),shortcuts:[W(`Space+${M("helpDialog.drag")}`),W(`Wheel+${M("helpDialog.drag")}`)],isOr:!0}),f.jsx(ee,{label:M("buttons.clearReset"),shortcuts:[W("CtrlOrCmd+Delete")]}),f.jsx(ee,{label:M("labels.delete"),shortcuts:[W("Delete")]}),f.jsx(ee,{label:M("labels.cut"),shortcuts:[W("CtrlOrCmd+X")]}),f.jsx(ee,{label:M("labels.copy"),shortcuts:[W("CtrlOrCmd+C")]}),f.jsx(ee,{label:M("labels.paste"),shortcuts:[W("CtrlOrCmd+V")]}),f.jsx(ee,{label:M("labels.pasteAsPlaintext"),shortcuts:[W("CtrlOrCmd+Shift+V")]}),f.jsx(ee,{label:M("labels.selectAll"),shortcuts:[W("CtrlOrCmd+A")]}),f.jsx(ee,{label:M("labels.multiSelect"),shortcuts:[W(`Shift+${M("helpDialog.click")}`)]}),f.jsx(ee,{label:M("helpDialog.deepSelect"),shortcuts:[W(`CtrlOrCmd+${M("helpDialog.click")}`)]}),f.jsx(ee,{label:M("helpDialog.deepBoxSelect"),shortcuts:[W(`CtrlOrCmd+${M("helpDialog.drag")}`)]}),(Dp||Co)&&f.jsx(ee,{label:M("labels.copyAsPng"),shortcuts:[W("Shift+Alt+C")]}),f.jsx(ee,{label:M("labels.copyStyles"),shortcuts:[W("CtrlOrCmd+Alt+C")]}),f.jsx(ee,{label:M("labels.pasteStyles"),shortcuts:[W("CtrlOrCmd+Alt+V")]}),f.jsx(ee,{label:M("labels.sendToBack"),shortcuts:[W(Fa?"CtrlOrCmd+Alt+[":"CtrlOrCmd+Shift+[")]}),f.jsx(ee,{label:M("labels.bringToFront"),shortcuts:[W(Fa?"CtrlOrCmd+Alt+]":"CtrlOrCmd+Shift+]")]}),f.jsx(ee,{label:M("labels.sendBackward"),shortcuts:[W("CtrlOrCmd+[")]}),f.jsx(ee,{label:M("labels.bringForward"),shortcuts:[W("CtrlOrCmd+]")]}),f.jsx(ee,{label:M("labels.alignTop"),shortcuts:[W("CtrlOrCmd+Shift+Up")]}),f.jsx(ee,{label:M("labels.alignBottom"),shortcuts:[W("CtrlOrCmd+Shift+Down")]}),f.jsx(ee,{label:M("labels.alignLeft"),shortcuts:[W("CtrlOrCmd+Shift+Left")]}),f.jsx(ee,{label:M("labels.alignRight"),shortcuts:[W("CtrlOrCmd+Shift+Right")]}),f.jsx(ee,{label:M("labels.duplicateSelection"),shortcuts:[W("CtrlOrCmd+D"),W(`Alt+${M("helpDialog.drag")}`)]}),f.jsx(ee,{label:M("helpDialog.toggleElementLock"),shortcuts:[W("CtrlOrCmd+Shift+L")]}),f.jsx(ee,{label:M("buttons.undo"),shortcuts:[W("CtrlOrCmd+Z")]}),f.jsx(ee,{label:M("buttons.redo"),shortcuts:i8?[W("CtrlOrCmd+Y"),W("CtrlOrCmd+Shift+Z")]:[W("CtrlOrCmd+Shift+Z")]}),f.jsx(ee,{label:M("labels.group"),shortcuts:[W("CtrlOrCmd+G")]}),f.jsx(ee,{label:M("labels.ungroup"),shortcuts:[W("CtrlOrCmd+Shift+G")]}),f.jsx(ee,{label:M("labels.flipHorizontal"),shortcuts:[W("Shift+H")]}),f.jsx(ee,{label:M("labels.flipVertical"),shortcuts:[W("Shift+V")]}),f.jsx(ee,{label:M("labels.showStroke"),shortcuts:[W("S")]}),f.jsx(ee,{label:M("labels.showBackground"),shortcuts:[W("G")]}),f.jsx(ee,{label:M("labels.showFonts"),shortcuts:[W("Shift+F")]}),f.jsx(ee,{label:M("labels.decreaseFontSize"),shortcuts:[W("CtrlOrCmd+Shift+<")]}),f.jsx(ee,{label:M("labels.increaseFontSize"),shortcuts:[W("CtrlOrCmd+Shift+>")]})]})]})]})})},vV=4,xV=8,yV=({shouldWrap:e,children:t,username:n})=>e?f.jsx(ns,{label:n||"Unknown user",children:t}):f.jsx(f.Fragment,{children:t}),Fh=({actionManager:e,collaborator:t,socketId:n,withName:a=!1,shouldWrapWithTooltip:i=!1,isBeingFollowed:r})=>{let s={socketId:n,collaborator:t,withName:a,isBeingFollowed:r},l=e.renderAction("goToCollaborator",s);return f.jsx(yV,{username:t.username,shouldWrap:i,children:l},n)},wV=["avatarUrl","id","socketId","username","isInCall","isSpeaking","isMuted"],Cx=Z.memo(({className:e,mobile:t,collaborators:n,userToFollow:a})=>{let i=En(),r=new Map;n.forEach((U,m)=>{let g=U.id||m;r.set(g,{...U,socketId:m})});let s=Array.from(r.values()).filter(U=>U.username?.trim()),[l,c]=Z.useState(""),d=s.filter(U=>U.username?.toLowerCase().includes(l)),o=Z.useRef(null);S.useLayoutEffect(()=>{if(o.current){let U=g=>{let b=Math.max(1,Math.min(8,Math.floor(g/38)));h(b)};if(U(o.current.clientWidth),!p1)return;let m=new ResizeObserver(g=>{for(let b of g){let{width:x}=b.contentRect;U(x)}});return m.observe(o.current),()=>{m.disconnect()}}},[]);let[u,h]=Z.useState(vV),p=s.slice(0,u-1).map(U=>Fh({actionManager:i,collaborator:U,socketId:U.socketId,shouldWrapWithTooltip:!0,isBeingFollowed:U.socketId===a}));return t?f.jsx("div",{className:te("UserList UserList_mobile",e),children:s.map(U=>Fh({actionManager:i,collaborator:U,socketId:U.socketId,shouldWrapWithTooltip:!0,isBeingFollowed:U.socketId===a}))}):f.jsx("div",{className:"UserList__wrapper",ref:o,children:f.jsxs("div",{className:te("UserList",e),style:{"--max-avatars":u},children:[p,s.length>u-1&&f.jsxs(cf,{children:[f.jsxs(df,{className:"UserList__more",children:["+",s.length-u+1]}),f.jsx(sU,{style:{zIndex:2,width:"15rem",textAlign:"left"},align:"end",sideOffset:10,children:f.jsxs(ua,{padding:2,children:[s.length>=xV&&f.jsx(Iv,{placeholder:M("quickSearch.placeholder"),onChange:c}),f.jsx(_v,{className:"dropdown-menu UserList__collaborators",placeholder:M("userList.empty"),children:d.length>0?[f.jsx("div",{className:"hint",children:M("userList.hint.text")}),d.map(U=>Fh({actionManager:i,collaborator:U,socketId:U.socketId,withName:!0,isBeingFollowed:U.socketId===a}))]:[]}),f.jsx(X9,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})]})]})})},(e,t)=>{if(e.collaborators.size!==t.collaborators.size||e.mobile!==t.mobile||e.className!==t.className||e.userToFollow!==t.userToFollow)return!1;let n=t.collaborators.keys();for(let[a,i]of e.collaborators){let r=t.collaborators.get(a);if(!r||a!==n.next().value||!Gt(i,r,wV))return!1}return!0}),g5=({children:e,color:t})=>f.jsx("div",{className:"Card",style:{"--card-color":t==="primary"?"var(--color-primary)":Bt[t][7],"--card-color-darker":t==="primary"?"var(--color-primary-darker)":Bt[t][8],"--card-color-darkest":t==="primary"?"var(--color-primary-darkest)":Bt[t][9]},children:e}),EV=({elements:e,appState:t,setAppState:n,files:a,actionManager:i,exportOpts:r,canvas:s,onCloseRequest:l})=>{let{onExportToBackend:c}=r;return f.jsx("div",{className:"ExportDialog ExportDialog--json",children:f.jsxs("div",{className:"ExportDialog-cards",children:[r.saveFileToDisk&&f.jsxs(g5,{color:"lime",children:[f.jsx("div",{className:"Card-icon",children:p_}),f.jsx("h2",{children:M("exportDialog.disk_title")}),f.jsxs("div",{className:"Card-details",children:[M("exportDialog.disk_details"),!is&&i.renderAction("changeProjectName")]}),f.jsx(Me,{className:"Card-button",type:"button",title:M("exportDialog.disk_button"),"aria-label":M("exportDialog.disk_button"),showAriaLabel:!0,onClick:()=>{i.executeAction(Fv,"ui")}})]}),c&&f.jsxs(g5,{color:"pink",children:[f.jsx("div",{className:"Card-icon",children:k1}),f.jsx("h2",{children:M("exportDialog.link_title")}),f.jsx("div",{className:"Card-details",children:M("exportDialog.link_details")}),f.jsx(Me,{className:"Card-button",type:"button",title:M("exportDialog.link_button"),"aria-label":M("exportDialog.link_button"),showAriaLabel:!0,onClick:async()=>{try{qe("export","link",`ui (${vI()})`),await c(e,t,a),l()}catch(d){n({errorMessage:d.message})}}})]}),r.renderCustomUI&&r.renderCustomUI(e,t,a,s)]})})},SV=({elements:e,appState:t,files:n,actionManager:a,exportOpts:i,canvas:r,setAppState:s})=>{let l=Z.useCallback(()=>{s({openDialog:null})},[s]);return f.jsx(f.Fragment,{children:t.openDialog?.name==="jsonExport"&&f.jsx(ba,{onCloseRequest:l,title:M("buttons.export"),children:f.jsx(EV,{elements:e,appState:t,setAppState:s,files:n,actionManager:a,onCloseRequest:l,exportOpts:i,canvas:r})})})},kV=e=>f.jsx("button",{className:"help-icon",onClick:e.onClick,type:"button",title:`${M("helpDialog.title")} — ?`,"aria-label":M("helpDialog.title"),children:ep}),Mx=({appState:e,actionManager:t,showExitZenModeBtn:n,renderWelcomeScreen:a})=>{let{FooterCenterTunnel:i,WelcomeScreenHelpHintTunnel:r}=un(),s=Tt(),l=!e.viewModeEnabled&&e.multiElement&&s.isTouchScreen;return f.jsxs("footer",{role:"contentinfo",className:"layer-ui__wrapper__footer App-menu App-menu_bottom",children:[f.jsx("div",{className:te("layer-ui__wrapper__footer-left zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":e.zenModeEnabled}),children:f.jsx(On.Col,{gap:2,children:f.jsxs(Xo,{heading:"canvasActions",children:[f.jsx(_W,{renderAction:t.renderAction,zoom:e.zoom}),!e.viewModeEnabled&&f.jsx(TW,{renderAction:t.renderAction,className:te("zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":e.zenModeEnabled})}),l&&f.jsx(jW,{renderAction:t.renderAction,className:te("zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":e.zenModeEnabled})})]})})}),f.jsx(i.Out,{}),f.jsx("div",{className:te("layer-ui__wrapper__footer-right zen-mode-transition",{"transition-right":e.zenModeEnabled}),children:f.jsxs("div",{style:{position:"relative"},children:[a&&f.jsx(r.Out,{}),f.jsx(kV,{onClick:()=>t.executeAction(gU)})]})}),f.jsx(AW,{actionManager:t,showExitZenModeBtn:n})]})},CV=Mx;Mx.displayName="Footer";var Ix=Z.createContext({}),_x=({children:e,className:t})=>{let n=Tt(),a=S.useContext(Ix),i=!!(n.editor.canFitSidebar&&a.shouldRenderDockButton);return f.jsxs("div",{className:te("sidebar__header",t),"data-testid":"sidebar-header",children:[e,f.jsxs("div",{className:"sidebar__header__buttons",children:[i&&f.jsx(ns,{label:M("labels.sidebarLock"),children:f.jsx(or,{onSelect:()=>a.onDock?.(!a.docked),selected:!!a.docked,className:"sidebar__dock","data-testid":"sidebar-dock","aria-label":M("labels.sidebarLock"),children:VI})}),f.jsx(or,{"data-testid":"sidebar-close",className:"sidebar__close",onSelect:a.onCloseRequest,"aria-label":M("buttons.close"),children:hl})]})]})};_x.displayName="SidebarHeader";var Tx=({name:e,tab:t,icon:n,title:a,children:i,onToggle:r,className:s,style:l})=>{let c=At(),d=Zt();return f.jsxs("label",{title:a,className:"sidebar-trigger__label-element",children:[f.jsx("input",{className:"ToolIcon_type_checkbox",type:"checkbox",onChange:o=>{document.querySelector(".layer-ui__wrapper")?.classList.remove("animate");let u=o.target.checked;c({openSidebar:u?{name:e,tab:t}:null}),r?.(u)},checked:d.openSidebar?.name===e,"aria-label":a,"aria-keyshortcuts":"0"}),f.jsxs("div",{className:te("sidebar-trigger",s),style:l,children:[n&&f.jsx("div",{children:n}),i&&f.jsx("div",{className:"sidebar-trigger__label",children:i})]})]})};Tx.displayName="SidebarTrigger";var Ax=({children:e,...t})=>f.jsx(ov,{className:"sidebar-triggers",...t,children:e});Ax.displayName="SidebarTabTriggers";var jx=({children:e,tab:t,onSelect:n,...a})=>f.jsx(cv,{value:t,asChild:!0,onSelect:n,children:f.jsx("button",{type:"button",className:"excalidraw-button sidebar-tab-trigger",...a,children:e})});jx.displayName="SidebarTabTrigger";var Rx=({children:e,...t})=>{let n=Zt(),a=At();if(!n.openSidebar)return null;let{name:i}=n.openSidebar;return f.jsx(lv,{className:"sidebar-tabs-root",value:n.openSidebar.tab,onValueChange:r=>a(s=>({...s,openSidebar:{...s.openSidebar,name:i,tab:r}})),...t,children:e})};Rx.displayName="SidebarTabs";var Dx=({tab:e,children:t,...n})=>f.jsx(dv,{...n,value:e,"data-testid":e,children:t});Dx.displayName="SidebarTab";var yU=Xt(!1),Lx=S.forwardRef(({name:e,children:t,onDock:n,docked:a,className:i,...r},s)=>{be.DEV&&n&&a==null&&console.warn("Sidebar: `docked` must be set when `onDock` is supplied for the sidebar to be user-dockable. To hide this message, either pass `docked` or remove `onDock`");let l=At(),c=ff(yU);S.useLayoutEffect(()=>(c(!!a),()=>{c(!1)}),[c,a]);let d=S.useRef({});d.current.onCloseRequest=()=>{l({openSidebar:null})},d.current.onDock=p=>n?.(p),d.current=id(d.current,{docked:a,shouldRenderDockButton:!!n&&a!=null});let o=S.useRef(null);S.useImperativeHandle(s,()=>o.current);let u=Tt(),h=S.useCallback(()=>{document.querySelector(".Dialog")||l({openSidebar:null})},[l]);return uU(o,S.useCallback(p=>{p.target.closest(".sidebar-trigger")||(!a||!u.editor.canFitSidebar)&&h()},[h,a,u.editor.canFitSidebar])),S.useEffect(()=>{let p=U=>{U.key===R.ESCAPE&&(!a||!u.editor.canFitSidebar)&&h()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[h,a,u.editor.canFitSidebar]),f.jsx(ua,{...r,className:te("sidebar",{"sidebar--docked":a},i),ref:o,children:f.jsx(Ix.Provider,{value:d.current,children:t})})});Lx.displayName="SidebarInner";var ea=Object.assign(S.forwardRef((e,t)=>{let n=Zt(),{onStateChange:a}=e,i=S.useRef(n.openSidebar);S.useEffect(()=>{(!n.openSidebar&&i?.current?.name===e.name||n.openSidebar?.name===e.name&&i?.current?.name!==e.name||i.current?.name===e.name)&&n.openSidebar!==i.current&&a?.(n.openSidebar?.name!==e.name?null:n.openSidebar),i.current=n.openSidebar},[n.openSidebar,a,e.name]);let[r,s]=S.useState(!1);return S.useLayoutEffect(()=>(s(!0),()=>s(!1)),[]),r&&n.openSidebar?.name===e.name?S.createElement(Lx,{...e,ref:t,key:e.name}):null}),{Header:_x,TabTriggers:Ax,TabTrigger:jx,Tabs:Rx,Tab:Dx,Trigger:Tx});ea.displayName="Sidebar";var Px={};ab(Px,{ChangeCanvasBackground:()=>Gx,ClearCanvas:()=>Wx,CommandPalette:()=>Bx,Export:()=>Yx,Help:()=>Xx,LiveCollaborationTrigger:()=>Kx,LoadScene:()=>$x,SaveAsImage:()=>zx,SaveToActiveFile:()=>Fx,SearchMenu:()=>Hx,Socials:()=>Zx,ToggleTheme:()=>Vx});var Nx=Xt({active:!1});async function MV({title:e,description:t,actionLabel:n,color:a}){return new Promise(i=>{sa.set(Nx,{active:!0,onConfirm:()=>i(!0),onClose:()=>i(!1),onReject:()=>i(!1),title:e,description:t,actionLabel:n,color:a})})}var Ox=({value:e,shortcut:t,onChange:n,choices:a,children:i,name:r})=>{let s=Tt();return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"dropdown-menu-item-base dropdown-menu-item-bare",children:[f.jsx("label",{className:"dropdown-menu-item__text",htmlFor:r,children:i}),f.jsx(bx,{name:r,value:e,onChange:n,choices:a})]}),t&&!s.editor.isMobile&&f.jsx("div",{className:"dropdown-menu-item__shortcut dropdown-menu-item__shortcut--orphaned",children:t})]})};Ox.displayName="DropdownMenuItemContentRadio";var IV=Ox,$x=()=>{let{t:e}=Yt(),t=En(),n=Sf();return t.isActionEnabled(u0)?f.jsx(Gn,{icon:tp,onSelect:async()=>{(!n.length||await MV({title:e("overwriteConfirm.modal.loadFromFile.title"),actionLabel:e("overwriteConfirm.modal.loadFromFile.button"),color:"warning",description:f.jsx(Pa,{i18nKey:"overwriteConfirm.modal.loadFromFile.description",bold:a=>f.jsx("strong",{children:a}),br:()=>f.jsx("br",{})})}))&&t.executeAction(u0)},"data-testid":"load-button",shortcut:tn("loadScene"),"aria-label":e("buttons.load"),children:e("buttons.load")}):null};$x.displayName="LoadScene";var Fx=()=>{let{t:e}=Yt(),t=En();return t.isActionEnabled(X6)?f.jsx(Gn,{shortcut:tn("saveScene"),"data-testid":"save-button",onSelect:()=>t.executeAction(X6),icon:u_,"aria-label":`${e("buttons.save")}`,children:`${e("buttons.save")}`}):null};Fx.displayName="SaveToActiveFile";var zx=()=>{let e=At(),{t}=Yt();return f.jsx(Gn,{icon:$8,"data-testid":"image-export-button",onSelect:()=>e({openDialog:{name:"imageExport"}}),shortcut:tn("imageExport"),"aria-label":t("buttons.exportImage"),children:t("buttons.exportImage")})};zx.displayName="SaveAsImage";var Bx=e=>{let t=At(),{t:n}=Yt();return f.jsx(Gn,{icon:K8,"data-testid":"command-palette-button",onSelect:()=>{qe("command_palette","open","menu"),t({openDialog:{name:"commandPalette"}})},shortcut:tn("commandPalette"),"aria-label":n("commandPalette.title"),className:e?.className,children:n("commandPalette.title")})};Bx.displayName="CommandPalette";var Hx=e=>{let{t}=Yt(),n=En();return f.jsx(Gn,{icon:Kr,"data-testid":"search-menu-button",onSelect:()=>{n.executeAction(Ux)},shortcut:tn("searchMenu"),"aria-label":t("search.title"),className:e?.className,children:t("search.title")})};Hx.displayName="SearchMenu";var Xx=()=>{let{t:e}=Yt(),t=En();return f.jsx(Gn,{"data-testid":"help-menu-item",icon:ep,onSelect:()=>t.executeAction(gU),shortcut:"?","aria-label":e("helpDialog.title"),children:e("helpDialog.title")})};Xx.displayName="Help";var Wx=()=>{let{t:e}=Yt(),t=ff(wf);return En().isActionEnabled(fo)?f.jsx(Gn,{icon:Zr,onSelect:()=>t("clearCanvas"),"data-testid":"clear-canvas-button","aria-label":e("buttons.clearReset"),children:e("buttons.clearReset")}):null};Wx.displayName="ClearCanvas";var Vx=e=>{let{t}=Yt(),n=Zt(),a=En(),i=tn("toggleTheme");return a.isActionEnabled(mu)?e?.allowSystemTheme?f.jsx(IV,{name:"theme",value:e.theme,onChange:r=>e.onSelect(r),choices:[{value:Ce.LIGHT,label:S1,ariaLabel:`${t("buttons.lightMode")} - ${i}`},{value:Ce.DARK,label:E1,ariaLabel:`${t("buttons.darkMode")} - ${i}`},{value:"system",label:ST,ariaLabel:t("buttons.systemMode")}],children:t("labels.theme")}):f.jsx(Gn,{onSelect:r=>{if(r.preventDefault(),e?.onSelect)e.onSelect(n.theme===Ce.DARK?Ce.LIGHT:Ce.DARK);else return a.executeAction(mu)},icon:n.theme===Ce.DARK?S1:E1,"data-testid":"toggle-dark-mode",shortcut:i,"aria-label":n.theme===Ce.DARK?t("buttons.lightMode"):t("buttons.darkMode"),children:n.theme===Ce.DARK?t("buttons.lightMode"):t("buttons.darkMode")}):null};Vx.displayName="ToggleTheme";var Gx=()=>{let{t:e}=Yt(),t=Zt(),n=En(),a=pc();return t.viewModeEnabled||!a.UIOptions.canvasActions.changeViewBackgroundColor?null:f.jsxs("div",{style:{marginTop:"0.5rem"},children:[f.jsx("div",{"data-testid":"canvas-background-label",style:{fontSize:".75rem",marginBottom:".5rem"},children:e("labels.canvasBackground")}),f.jsx("div",{style:{padding:"0 0.625rem"},children:n.renderAction("changeViewBackgroundColor")})]})};Gx.displayName="ChangeCanvasBackground";var Yx=()=>{let{t:e}=Yt(),t=At();return f.jsx(Gn,{icon:zu,onSelect:()=>{t({openDialog:{name:"jsonExport"}})},"data-testid":"json-export-button","aria-label":e("buttons.export"),children:e("buttons.export")})};Yx.displayName="Export";var Zx=()=>{let{t:e}=Yt();return f.jsxs(f.Fragment,{children:[f.jsx(Sd,{icon:O8,href:"https://github.com/excalidraw/excalidraw","aria-label":"GitHub",children:"GitHub"}),f.jsx(Sd,{icon:c_,href:"https://x.com/excalidraw","aria-label":"X",children:e("labels.followUs")}),f.jsx(Sd,{icon:o_,href:"https://discord.gg/UexuTaE","aria-label":"Discord",children:e("labels.discordChat")})]})};Zx.displayName="Socials";var Kx=({onSelect:e,isCollaborating:t})=>{let{t:n}=Yt();return f.jsx(Gn,{"data-testid":"collab-button",icon:B8,className:te({"active-collab":t}),onSelect:e,children:n("labels.liveCollaboration")})};Kx.displayName="LiveCollaborationTrigger";var fc=(e,t)=>{let n=Xt(0),a=i=>{let{tunnelsJotai:{useAtom:r}}=un(),[,s]=r(n),l=S.useRef({preferHost:!1,counter:0});return S.useLayoutEffect(()=>{let c=l.current;return s(d=>{let o=d+1;return c.counter=o,o}),()=>{s(d=>{let o=d-1;return c.counter=o,o||(c.preferHost=!1),o})}},[s]),i.__fallback||(l.current.preferHost=!0),!l.current.counter&&i.__fallback&&l.current.preferHost||l.current.counter>1&&i.__fallback?null:f.jsx(t,{...i})};return a.displayName=e,a},_V=Object.assign(fc("MainMenu",({children:e,onSelect:t})=>{let{MainMenuTunnel:n}=un(),a=Tt(),i=Zt(),r=At(),s=a.editor.isMobile?void 0:()=>r({openMenu:null});return f.jsx(n.In,{children:f.jsxs(Je,{open:i.openMenu==="canvas",children:[f.jsx(Je.Trigger,{onToggle:()=>{r({openMenu:i.openMenu==="canvas"?null:"canvas"})},"data-testid":"main-menu-trigger",className:"main-menu-trigger",children:N8}),f.jsxs(Je.Content,{onClickOutside:s,onSelect:Ou(t,()=>{r({openMenu:null})}),children:[e,a.editor.isMobile&&i.collaborators.size>0&&f.jsxs("fieldset",{className:"UserList-Wrapper",children:[f.jsx("legend",{children:M("labels.collaborators")}),f.jsx(Cx,{mobile:!0,collaborators:i.collaborators,userToFollow:i.userToFollow?.socketId||null})]})]})]})})}),{Trigger:Je.Trigger,Item:Je.Item,ItemLink:Je.ItemLink,ItemCustom:Je.ItemCustom,Group:Je.Group,Separator:Je.Separator,DefaultItems:Px}),sn=_V,wU=({title:e,children:t,actionLabel:n,onClick:a})=>f.jsxs("div",{className:"OverwriteConfirm__Actions__Action",children:[f.jsx("h4",{children:e}),f.jsx("div",{className:"OverwriteConfirm__Actions__Action__content",children:t}),f.jsx(Uo,{variant:"outlined",color:"muted",label:n,size:"large",fullWidth:!0,onClick:a})]}),TV=()=>{let{t:e}=Yt(),t=En(),n=At();return f.jsx(wU,{title:e("overwriteConfirm.action.exportToImage.title"),actionLabel:e("overwriteConfirm.action.exportToImage.button"),onClick:()=>{t.executeAction($v,"ui",!0),n({openDialog:{name:"imageExport"}})},children:e("overwriteConfirm.action.exportToImage.description")})},AV=()=>{let{t:e}=Yt(),t=En();return f.jsx(wU,{title:e("overwriteConfirm.action.saveToDisk.title"),actionLabel:e("overwriteConfirm.action.saveToDisk.button"),onClick:()=>{t.executeAction(Fv,"ui")},children:e("overwriteConfirm.action.saveToDisk.description")})},b5=Object.assign(({children:e})=>f.jsx("div",{className:"OverwriteConfirm__Actions",children:e}),{ExportToImage:TV,SaveToDisk:AV}),zh=Object.assign(fc("OverwriteConfirmDialog",({children:e})=>{let{OverwriteConfirmDialogTunnel:t}=un(),[n,a]=gt(Nx);if(!n.active)return null;let i=()=>{n.onClose(),a(s=>({...s,active:!1}))},r=()=>{n.onConfirm(),a(s=>({...s,active:!1}))};return f.jsx(t.In,{children:f.jsx(ba,{onCloseRequest:i,title:!1,size:916,children:f.jsxs("div",{className:"OverwriteConfirm",children:[f.jsx("h3",{children:n.title}),f.jsxs("div",{className:`OverwriteConfirm__Description OverwriteConfirm__Description--color-${n.color}`,children:[f.jsx("div",{className:"OverwriteConfirm__Description__icon",children:sT}),f.jsx("div",{children:n.description}),f.jsx("div",{className:"OverwriteConfirm__Description__spacer"}),f.jsx(Uo,{color:n.color,size:"large",label:n.actionLabel,onClick:r})]}),f.jsx(b5,{children:e})]})})})}),{Actions:b5,Action:wU}),jV=Xt(""),qx=Xt(null),RV=350,DV=()=>{let e=va(),t=At(),n=S.useRef(null),[a,i]=gt(jV),r=a.trim(),[s,l]=S.useState(!1),[c,d]=S.useState({nonce:null,items:[]}),o=S.useRef(null),u=S.useRef(void 0),[h,p]=gt(qx),U=e.scene.getNonDeletedElementsMap();S.useEffect(()=>{s||(r!==o.current||e.scene.getSceneNonce()!==u.current)&&(o.current=null,v5(r,e,(v,y)=>{d({nonce:Ha(),items:v}),o.current=r,u.current=e.scene.getSceneNonce(),t({searchMatches:v.map(w=>({id:w.textElement.id,focus:!1,matchedLines:w.matchedLines}))})}))},[s,r,U,e,t,p,u]);let m=()=>{c.items.length>0&&p(v=>v===null?0:(v+1)%c.items.length)},g=()=>{c.items.length>0&&p(v=>v===null?0:v-1<0?c.items.length-1:v-1)};S.useEffect(()=>{t(v=>({searchMatches:v.searchMatches.map((y,w)=>w===h?{...y,focus:!0}:{...y,focus:!1})}))},[h,t]),S.useEffect(()=>{if(c.items.length>0&&h!==null){let v=c.items[h];if(v){let y=e.state.zoom.value,w=_n({text:v.searchQuery,x:v.textElement.x+(v.matchedLines[0]?.offsetX??0),y:v.textElement.y+(v.matchedLines[0]?.offsetY??0),width:v.matchedLines[0]?.width,height:v.matchedLines[0]?.height,fontSize:v.textElement.fontSize,fontFamily:v.textElement.fontFamily}),k=14,C=v.textElement.fontSize,I=C*y<k;if(!gd([w],e.canvas.width/window.devicePixelRatio,e.canvas.height/window.devicePixelRatio,{offsetLeft:e.state.offsetLeft,offsetTop:e.state.offsetTop,scrollX:e.state.scrollX,scrollY:e.state.scrollY,zoom:e.state.zoom},e.scene.getNonDeletedElementsMap(),e.getEditorUIOffsets())||I){let A;I?C>=k?A={fitToContent:!0}:A={fitToViewport:!0,maxZoom:Oa(k/C,1)}:A={fitToContent:!0},e.scrollToContent(w,{animate:!0,duration:300,...A,canvasOffsets:e.getEditorUIOffsets()})}}}},[h,c,e]),S.useEffect(()=>()=>{p(null),o.current=null,u.current=void 0,t({searchMatches:[]}),l(!1)},[t,p]);let b=Uf({goToNextItem:m,goToPreviousItem:g,searchMatches:c});S.useEffect(()=>lt(window,"keydown",y=>{if(y.key===R.ESCAPE&&!e.state.openDialog&&!e.state.openPopup){y.preventDefault(),y.stopPropagation(),t({openSidebar:null});return}y[R.CTRL_OR_CMD]&&y.key===R.F&&(y.preventDefault(),y.stopPropagation(),n.current?.matches(":focus")?t({openSidebar:null}):(e.state.openDialog&&t({openDialog:null}),n.current?.focus(),n.current?.select())),y.target instanceof HTMLElement&&y.target.closest(".layer-ui__search")&&b.searchMatches.items.length&&(y.key===R.ENTER&&(y.stopPropagation(),b.goToNextItem()),y.key===R.ARROW_UP?(y.stopPropagation(),b.goToPreviousItem()):y.key===R.ARROW_DOWN&&(y.stopPropagation(),b.goToNextItem()))},{capture:!0,passive:!1}),[t,b,e]);let x=`${c.items.length} ${c.items.length===1?M("search.singleResult"):M("search.multipleResults")}`;return f.jsxs("div",{className:"layer-ui__search",children:[f.jsx("div",{className:"layer-ui__search-header",children:f.jsx(xU,{className:Xs.SEARCH_MENU_INPUT_WRAPPER,value:a,ref:n,placeholder:M("search.placeholder"),icon:Kr,onChange:v=>{i(v),l(!0);let y=v.trim();v5(y,e,(w,k)=>{d({nonce:Ha(),items:w}),p(k),o.current=y,u.current=e.scene.getSceneNonce(),t({searchMatches:w.map(C=>({id:C.textElement.id,focus:!1,matchedLines:C.matchedLines}))}),l(!1)})},selectOnRender:!0})}),f.jsxs("div",{className:"layer-ui__search-count",children:[c.items.length>0&&f.jsxs(f.Fragment,{children:[h!==null&&h>-1?f.jsxs("div",{children:[h+1," / ",x]}):f.jsx("div",{children:x}),f.jsxs("div",{className:"result-nav",children:[f.jsx(or,{onSelect:()=>{m()},className:"result-nav-btn",children:J8}),f.jsx(or,{onSelect:()=>{g()},className:"result-nav-btn",children:jT})]})]}),c.items.length===0&&r&&o.current&&f.jsx("div",{style:{margin:"1rem auto"},children:M("search.noMatch")})]}),f.jsx(OV,{matches:c,onItemClick:p,focusIndex:h,searchQuery:r})]})},LV=e=>{let t=[e.preview.moreBefore?"...":"",e.preview.previewText.slice(0,e.preview.indexInSearchQuery),e.preview.previewText.slice(e.preview.indexInSearchQuery,e.preview.indexInSearchQuery+e.searchQuery.length),e.preview.previewText.slice(e.preview.indexInSearchQuery+e.searchQuery.length),e.preview.moreAfter?"...":""];return f.jsx("div",{tabIndex:-1,className:te("layer-ui__result-item",{active:e.highlighted}),onClick:e.onClick,ref:n=>{e.highlighted&&n?.scrollIntoView({behavior:"auto",block:"nearest"})},children:f.jsx("div",{className:"preview-text",children:t.flatMap((n,a)=>f.jsx(S.Fragment,{children:a===2?f.jsx("b",{children:n}):n},a))})})},PV=e=>f.jsx("div",{className:"layer-ui__search-result-container",children:e.matches.items.map((t,n)=>f.jsx(LV,{searchQuery:e.searchQuery,preview:t.preview,highlighted:n===e.focusIndex,onClick:()=>e.onItemClick(n)},t.textElement.id+t.index))}),NV=(e,t)=>e.matches.nonce===t.matches.nonce&&e.focusIndex===t.focusIndex,OV=S.memo(PV,NV),$V=(e,t,n)=>{let a=e.slice(0,t),i=a.split(/\s+/),r=a.endsWith(" "),s=i.length-2-1-(r?0:1),l=i.slice(s<=0?0:s).join(" ")+(r?" ":""),c=20;l=l.length>c?l.slice(-c):l;let d=e.slice(t+n.length),o=d.split(/\s+/),u=!d.startsWith(" "),h=u?6:5,p=(u?"":" ")+o.slice(0,h).join(" ");return{indexInSearchQuery:l.length,previewText:l+n+p,moreBefore:s>0,moreAfter:o.length>h}},FV=(e,t)=>{let n=e.split(`
|
|
@@ -101,8 +101,8 @@ ${M("hints.firefox_clipboard_write")}`):new Error(M("alerts.couldNotCopyToClipbo
|
|
|
101
101
|
C -->|One| D[Laptop]
|
|
102
102
|
C -->|Two| E[iPhone]
|
|
103
103
|
C -->|Three| F[Car]`,x5=Ys(EU,300),YV=({mermaidToExcalidrawLib:e})=>{let[t,n]=S.useState(()=>$r.get(to.MERMAID_TO_EXCALIDRAW)||GV),a=S.useDeferredValue(t.trim()),[i,r]=S.useState(null),s=S.useRef(null),l=S.useRef({elements:[],files:null}),c=va();S.useEffect(()=>{ey({canvasRef:s,data:l,mermaidToExcalidrawLib:e,setError:r,mermaidDefinition:a}).catch(o=>{S8()&&console.error("Failed to parse mermaid definition",o)}),x5(a)},[a,e]),S.useEffect(()=>()=>{x5.flush()},[]);let d=()=>{ty({app:c,data:l,text:t,shouldSaveMermaidDataToStorage:!0})};return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"ttd-dialog-desc",children:f.jsx(Pa,{i18nKey:"mermaid.description",flowchartLink:o=>f.jsx("a",{href:"https://mermaid.js.org/syntax/flowchart.html",children:o}),sequenceLink:o=>f.jsx("a",{href:"https://mermaid.js.org/syntax/sequenceDiagram.html",children:o}),classLink:o=>f.jsx("a",{href:"https://mermaid.js.org/syntax/classDiagram.html",children:o})})}),f.jsxs(ny,{children:[f.jsx(xu,{label:M("mermaid.syntax"),children:f.jsx(ay,{input:t,placeholder:"Write Mermaid diagram defintion here...",onChange:o=>n(o.target.value),onKeyboardSubmit:()=>{d()}})}),f.jsx(xu,{label:M("mermaid.preview"),panelAction:{action:()=>{d()},label:M("mermaid.button"),icon:od},renderSubmitShortcut:()=>f.jsx(ry,{}),children:f.jsx(iy,{canvasRef:s,loaded:e.loaded,error:i})})]})]})},ZV=YV,sy=e=>{let t=At(),n=S.useRef(null),a=S.useRef(0);return f.jsx(lv,{ref:n,className:"ttd-dialog-tabs-root",value:e.tab,onValueChange:i=>{if(!i)return;let r=n.current?.closest(".Modal__content");if(r){let s=r.offsetHeight||0;s>a.current&&(a.current=s,r.style.minHeight=`min(${a.current}px, 100%)`)}e.dialog==="ttd"&&C8(["text-to-diagram","mermaid"],i)&&t({openDialog:{name:e.dialog,tab:i}})},children:e.children})};sy.displayName="TTDDialogTabs";var KV=sy,ly=({children:e,...t})=>f.jsx(ov,{className:"ttd-dialog-triggers",...t,children:e});ly.displayName="TTDDialogTabTriggers";var y0=({children:e,tab:t,onSelect:n,...a})=>f.jsx(cv,{value:t,asChild:!0,onSelect:n,children:f.jsx("button",{type:"button",className:"ttd-dialog-tab-trigger",...a,children:e})});y0.displayName="TTDDialogTabTrigger";var w0=({tab:e,children:t,...n})=>f.jsx(dv,{...n,value:e,children:t});w0.displayName="TTDDialogTab";var Bh=3,vs=1e3,qV=Xt(null),JV=Xt(null),oy=e=>{let t=Zt();return t.openDialog?.name!=="ttd"?null:f.jsx(QV,{...e,tab:t.openDialog.tab})},QV=fc("TTDDialogBase",({tab:e,...t})=>{let n=va(),a=At(),i=S.useRef(null),[r,s]=gt(JV),[l,c]=S.useState(r?.prompt??""),d=l.trim(),o=k=>{c(k.target.value),s(C=>({generatedResponse:C?.generatedResponse??null,prompt:k.target.value}))},[u,h]=S.useState(!1),[p,U]=gt(qV),m=async()=>{if(d.length>vs||d.length<Bh||u||p?.rateLimitRemaining===0||"__fallback"in t){d.length<Bh&&w(new Error(`Prompt is too short (min ${Bh} characters)`)),d.length>vs&&w(new Error(`Prompt is too long (max ${vs} characters)`));return}try{h(!0),qe("ai","generate","ttd");let{generatedResponse:k,error:C,rateLimit:I,rateLimitRemaining:A}=await t.onTextSubmit(d);if(typeof k=="string"&&s(_=>({generatedResponse:k,prompt:_?.prompt??null})),no(I)&&no(A)&&U({rateLimit:I,rateLimitRemaining:A}),C){w(C);return}if(!k){w(new Error("Generation failed"));return}try{await ey({canvasRef:i,data:v,mermaidToExcalidrawLib:b,setError:w,mermaidDefinition:k}),qe("ai","mermaid parse success","ttd")}catch(_){console.info(`%cTTD mermaid render errror: ${_.message}`,"color: red"),console.info(`>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
|
104
|
-
TTD mermaid definition render errror: ${_.message}`,"color: yellow"),qe("ai","mermaid parse failed","ttd"),w(new Error("Generated an invalid diagram :(. You may also try a different prompt."))}}catch(k){let C=k.message;(!C||C==="Failed to fetch")&&(C="Request failed"),w(new Error(C))}finally{h(!1)}},g=S.useRef(m);g.current=m;let[b,x]=S.useState({loaded:!1,api:ne(()=>import("./index-CsJIZuMr.js").then(k=>k.b5),__vite__mapDeps([59,2,3]),import.meta.url)});S.useEffect(()=>{(async()=>(await b.api,x(k=>({...k,loaded:!0}))))()},[b.api]);let v=S.useRef({elements:[],files:null}),[y,w]=S.useState(null);return f.jsx(ba,{className:"ttd-dialog",onCloseRequest:()=>{n.setOpenDialog(null)},size:1200,title:!1,...t,autofocus:!1,children:f.jsxs(KV,{dialog:"ttd",tab:e,children:["__fallback"in t&&t.__fallback?f.jsx("p",{className:"dialog-mermaid-title",children:M("mermaid.title")}):f.jsxs(ly,{children:[f.jsx(y0,{tab:"text-to-diagram",children:f.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[M("labels.textToDiagram"),f.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"1px 6px",marginLeft:"10px",fontSize:10,borderRadius:"12px",background:"var(--color-promo)",color:"var(--color-surface-lowest)"},children:"AI Beta"})]})}),f.jsx(y0,{tab:"mermaid",children:"Mermaid"})]}),f.jsx(w0,{className:"ttd-dialog-content",tab:"mermaid",children:f.jsx(ZV,{mermaidToExcalidrawLib:b})}),!("__fallback"in t)&&f.jsxs(w0,{className:"ttd-dialog-content",tab:"text-to-diagram",children:[f.jsx("div",{className:"ttd-dialog-desc",children:"Currently we use Mermaid as a middle step, so you'll get best results if you describe a diagram, workflow, flow chart, and similar."}),f.jsxs(ny,{children:[f.jsx(xu,{label:M("labels.prompt"),panelAction:{action:m,label:"Generate",icon:od},onTextSubmitInProgess:u,panelActionDisabled:d.length>vs||p?.rateLimitRemaining===0,renderTopRight:()=>p?f.jsxs("div",{className:"ttd-dialog-rate-limit",style:{fontSize:12,marginLeft:"auto",color:p.rateLimitRemaining===0?"var(--color-danger)":void 0},children:[p.rateLimitRemaining," requests left today"]}):null,renderSubmitShortcut:()=>f.jsx(ry,{}),renderBottomRight:()=>{if(typeof r?.generatedResponse=="string")return f.jsxs("div",{className:"excalidraw-link",style:{marginLeft:"auto",fontSize:14},onClick:()=>{typeof r?.generatedResponse=="string"&&(EU(r.generatedResponse),a({openDialog:{name:"ttd",tab:"mermaid"}}))},children:["View as Mermaid",f.jsx(gf,{icon:od})]});let k=d.length/vs;return k>.8?f.jsxs("div",{style:{marginLeft:"auto",fontSize:12,fontFamily:"monospace",color:k>1?"var(--color-danger)":void 0},children:["Length: ",d.length,"/",vs]}):null},children:f.jsx(ay,{onChange:o,input:l,placeholder:"Describe what you want to see...",onKeyboardSubmit:()=>{g.current()}})}),f.jsx(xu,{label:"Preview",panelAction:{action:()=>{console.info("Panel action clicked"),ty({app:n,data:v})},label:"Insert",icon:od},children:f.jsx(iy,{canvasRef:i,error:y,loaded:b.loaded})})]})]})]})})}),eG=.01,Ei=(e,t)=>!(t==="height"&&q(e)||t==="width"&&q(e)||t==="angle"&&ce(e)),Qt=(e,t)=>{let n=e+t/2;return n-n%t},yu=(e,t,n)=>Object.keys(e).map(a=>({original:(n??t).get(a),latest:t.get(a)})).filter(a=>a.original!==void 0&&a.latest!==void 0),Wo=(e,t,n,a,i,r,s,l=!0)=>{let c=a.get(n.id);if(!c)return;let[d,o]=[n.x+n.width/2,n.y+n.height/2],[u,h]=z(E(n.x,n.y),E(d,o),n.angle),p=e-u,U=t-h,[m,g]=z(E(e,t),E(d+p,o+U),-n.angle);V(c,{x:m,y:g},l),E0(c,a,i,r);let b=ge(n,s);if(b){let x=a.get(b.id);x&&V(x,{x:b.x+p,y:b.y+U},l)}},SU=(e,t)=>{let n=Pr(t).map(a=>tt(e,a).reduce((i,r)=>(i[r.id]=!0,i),{}));return e.filter(a=>!Qs(a)).forEach(a=>{n.push({[a.id]:!0})}),n},E0=(e,t,n,a,i)=>{ue(e)?eu([e],t,n,a,!0,[],i?.zoom):xn(e,t,i)},tG=({label:e,icon:t,dragInputCallback:n,value:a,elements:i,editable:r=!0,shouldKeepAspectRatio:s,property:l,scene:c,appState:d,sensitivity:o=1})=>{let u=va(),h=S.useRef(null),p=S.useRef(null),[U,m]=S.useState(a.toString()),g=S.useRef(null);g.current||(g.current={originalAppState:di(d),originalElements:i,lastUpdatedValue:U,updatePending:!1}),S.useEffect(()=>{let v=a.toString();m(v),g.current.lastUpdatedValue=v},[a]);let b=(v,y,w)=>{if(!g.current.updatePending)return!1;g.current.updatePending=!1;let k=Number(v);if(isNaN(k)){m(a.toString());return}let C=Number(k.toFixed(2)),I=Number(a);(isNaN(I)||Math.abs(C-I)>=eG)&&(g.current.lastUpdatedValue=v,n({accumulatedChange:0,instantChange:0,originalElements:y,originalElementsMap:u.scene.getNonDeletedElementsMap(),shouldKeepAspectRatio:s,shouldChangeByStepSize:!1,scene:c,nextValue:C,property:l,originalAppState:w,setInputValue:A=>m(String(A))}),u.syncActionResult({captureUpdate:B.IMMEDIATELY}))},x=S.useRef({});return x.current.handleInputValue=b,S.useEffect(()=>{let v=h.current,y=x.current;return()=>{let w=v?.value;w&&y.handleInputValue?.(w,g.current.originalElements,g.current.originalAppState),window.removeEventListener("pointermove",y.onPointerMove,!1),window.removeEventListener("pointerup",y.onPointerUp,!1)}},[r]),r?f.jsxs("div",{className:te("drag-input-container",!r&&"disabled"),"data-testid":e,children:[f.jsx("div",{className:"drag-input-label",ref:p,onPointerDown:v=>{if(h.current&&r){document.body.classList.add("excalidraw-cursor-resize"),Number(h.current.value);let y=null,w=u.scene.getNonDeletedElements().reduce((D,L)=>(D.set(L.id,ss(L)),D),new Map),k=i.map(D=>w.get(D.id)),C=di(d),I=0,A=0,_=D=>{if(y&&w!==null&&k!==null){let L=D.clientX-y.x;L!==0&&(A+=L,Math.abs(A)>=o&&(A=Math.sign(A)*Math.floor(Math.abs(A)/o),I+=A,n({accumulatedChange:I,instantChange:A,originalElements:k,originalElementsMap:w,shouldKeepAspectRatio:s,shouldChangeByStepSize:D.shiftKey,property:l,scene:c,originalAppState:C,setInputValue:F=>m(String(F))}),A=0))}y={x:D.clientX,y:D.clientY}},T=()=>{window.removeEventListener("pointermove",_,!1),u.syncActionResult({captureUpdate:B.IMMEDIATELY}),y=null,I=0,A=0,k=null,w=null,document.body.classList.remove("excalidraw-cursor-resize"),window.removeEventListener("pointerup",T,!1)};x.current.onPointerMove=_,x.current.onPointerUp=T,window.addEventListener("pointermove",_,!1),window.addEventListener("pointerup",T,!1)}},onPointerEnter:()=>{p.current&&(p.current.style.cursor="ew-resize")},children:t?f.jsx(gf,{icon:t}):e}),f.jsx("input",{className:"drag-input",autoComplete:"off",spellCheck:"false",onKeyDown:v=>{if(r){let y=v.target;y instanceof HTMLInputElement&&v.key===R.ENTER&&(b(y.value,i,d),u.focusContainer())}},ref:h,value:U,onChange:v=>{g.current.updatePending=!0,m(v.target.value)},onFocus:v=>{v.target.select(),g.current.originalElements=i,g.current.originalAppState=di(d)},onBlur:v=>{U?r&&b(v.target.value,g.current.originalElements,g.current.originalAppState):m(a.toString())},disabled:!r})]}):null},Ii=tG,y5=10,nG=e=>e.type==="image",aG=({accumulatedChange:e,originalElements:t,originalElementsMap:n,shouldKeepAspectRatio:a,shouldChangeByStepSize:i,nextValue:r,property:s,originalAppState:l,instantChange:c,scene:d})=>{let o=d.getNonDeletedElementsMap(),u=t[0],h=o.get(u.id);if(u&&h){let p=a||nG(u),U=u.width/u.height;if(l.croppingElementId===u.id){let v=o.get(u.id);if(!v||!Le(v)||!v.crop)return;let y=v.crop,w={...y},k=v.scale[0]===-1,C=v.scale[1]===-1,{width:I,height:A}=gi(v),_=y.naturalWidth/I,T=y.naturalHeight/A,D=k?y.width+y.x:y.naturalWidth-y.x,L=C?y.height+y.y:y.naturalHeight-y.y,F=Nt*_,P=Nt*T;if(r!==void 0){if(s==="width"){let G=r*_,se=Se(G,F,D);w={...w,width:se,x:k?y.x+y.width-se:y.x}}else if(s==="height"){let G=r*T,se=Se(G,P,L);w={...w,height:se,y:C?y.y+y.height-se:y.y}}V(v,{crop:w,width:w.width/(y.naturalWidth/I),height:w.height/(y.naturalHeight/A)});return}let O=s==="width"?c:0,N=s==="height"?c:0,X=Se(y.width+O,F,D),H=Se(y.height+N,F,L);w={...y,x:k?y.x+y.width-X:y.x,y:C?y.y+y.height-H:y.y,width:X,height:H},V(v,{crop:w,width:w.width/(y.naturalWidth/I),height:w.height/(y.naturalHeight/A)});return}if(r!==void 0){let v=Math.max(s==="width"?r:p?r*U:u.width,Dn),y=Math.max(s==="height"?r:p?r/U:u.height,Dn);Fo(v,y,h,u,o,n,s==="width"?"e":"s",{shouldMaintainAspectRatio:p});return}let m=s==="width"?e:0,g=s==="height"?e:0,b=Math.max(0,u.width+m);s==="width"&&(i?b=Qt(b,y5):b=Math.round(b));let x=Math.max(0,u.height+g);s==="height"&&(i?x=Qt(x,y5):x=Math.round(x)),p&&(s==="width"?x=Math.round(b/U*100)/100:b=Math.round(x*U*100)/100),x=Math.max(Dn,x),b=Math.max(Dn,b),Fo(b,x,h,u,o,n,s==="width"?"e":"s",{shouldMaintainAspectRatio:p})}},iG=({property:e,element:t,scene:n,appState:a})=>{let i=Oa(e==="width"?t.width:t.height,2);if(a.croppingElementId&&a.croppingElementId===t.id&&Le(t)&&t.crop){let{width:r,height:s}=gi(t);if(e==="width"){let l=r/t.crop.naturalWidth;i=Oa(t.crop.width*l,2)}if(e==="height"){let l=s/t.crop.naturalHeight;i=Oa(t.crop.height*l,2)}}return f.jsx(Ii,{label:e==="width"?"W":"H",elements:[t],dragInputCallback:aG,value:i,editable:Ei(t,e),scene:n,appState:a,property:e})},w5=iG,rG=15,sG=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:a,scene:i})=>{let r=i.getNonDeletedElementsMap(),s=i.getNonDeletedElements(),l=t[0];if(l&&!Q(l)){let c=r.get(l.id);if(!c)return;if(a!==void 0){let U=Rr(a);V(c,{angle:U}),E0(c,r,s,i);let m=ge(c,r);m&&!xe(c)&&V(m,{angle:U});return}let d=Math.round(Jo(l.angle)*100)/100,o=Math.round(e),u=(d+o)%360;n&&(u=Qt(u,rG)),u=u<0?u+360:u;let h=Rr(u);V(c,{angle:h}),E0(c,r,s,i);let p=ge(c,r);p&&!xe(c)&&V(p,{angle:h})}},lG=({element:e,scene:t,appState:n,property:a})=>f.jsx(Ii,{label:"A",icon:X8,value:Math.round(Jo(e.angle)%360*100)/100,elements:[e],dragInputCallback:sG,editable:Ei(e,"angle"),scene:t,appState:n,property:a}),oG=lG,E5=4,cG=4,dG=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:a,scene:i})=>{let r=i.getNonDeletedElementsMap(),s=t[0];if(s){let l=r.get(s.id);if(!l||!q(l))return;let c;if(a!==void 0)c=Math.max(Math.round(a),E5);else if(s.type==="text"){let d=Math.round(s.fontSize),o=Math.round(e);c=Math.max(d+o,E5),n&&(c=Qt(c,cG))}c&&(V(l,{fontSize:c}),on(l,i.getContainerElement(l),i.getNonDeletedElementsMap()))}},uG=({element:e,scene:t,appState:n,property:a})=>{let i=q(e)?e:Wn(e)?ge(e,t.getNonDeletedElementsMap()):null;return i?f.jsx(Ii,{label:"F",value:Math.round(i.fontSize*10)/10,elements:[i],dragInputCallback:dG,icon:Bu,appState:n,scene:t,property:a}):null},fG=uG,xs=10,hG=(e,t,n,a)=>{let i=a.x-e,r=a.y-t,s=a.width*n,l=a.height*n,c=e+i*n,d=t+r*n;return{width:s,height:l,x:c,y:d,...Xp(a,s,l,!1),...q(a)?{fontSize:a.fontSize*n}:{}}},pG=(e,t,n,a,i,r,s,l)=>{let c=hG(e,t,a,r);V(i,c,!1);let d=ge(r,l);if(d){let o=d.fontSize*a;xn(i,s,{newSize:{width:c.width,height:c.height}});let u=s.get(d.id);u&&q(u)&&(V(u,{fontSize:o},!1),ic(i,s,n==="width"?"e":"s",!0))}},S5=(e,t,n,a,i,r,s,l,c,d)=>{r==="width"?t=Math.round(e/a*100)/100:e=Math.round(t*a*100)/100;let o=t/n;for(let u=0;u<l.length;u++){let h=l[u],p=s[u];pG(i[0],i[1],r,o,p,h,c,d)}},UG=({accumulatedChange:e,originalElements:t,originalElementsMap:n,originalAppState:a,shouldChangeByStepSize:i,nextValue:r,scene:s,property:l})=>{let c=s.getNonDeletedElementsMap(),d=SU(t,a);if(r!==void 0){for(let h of d){let p=yu(h,c,n);if(p.length>1){let U=p.map(A=>A.latest),m=p.map(A=>A.original),[g,b,x,v]=Ne(m),y=x-g,w=v-b,k=y/w,C=Math.max(Dn,l==="width"?Math.max(0,r):y),I=Math.max(Dn,l==="height"?Math.max(0,r):w);S5(C,I,w,k,E(g,b),l,U,m,c,n)}else{let[U]=p,m=U?.latest,g=U?.original;if(m&&g&&Ei(m,l)){let b=l==="width"?Math.max(0,r):m.width;l==="width"&&(i?b=Qt(b,xs):b=Math.round(b));let x=l==="height"?Math.max(0,r):m.height;l==="height"&&(i?x=Qt(x,xs):x=Math.round(x)),b=Math.max(Dn,b),x=Math.max(Dn,x),Fo(b,x,m,g,c,n,l==="width"?"e":"s",{shouldInformMutation:!1})}}}s.triggerUpdate();return}let o=l==="width"?e:0,u=l==="height"?e:0;for(let h of d){let p=yu(h,c,n);if(p.length>1){let U=p.map(A=>A.latest),m=p.map(A=>A.original),[g,b,x,v]=Ne(m),y=x-g,w=v-b,k=y/w,C=Math.max(0,y+o);l==="width"&&(i?C=Qt(C,xs):C=Math.round(C));let I=Math.max(0,w+u);l==="height"&&(i?I=Qt(I,xs):I=Math.round(I)),C=Math.max(Dn,C),I=Math.max(Dn,I),S5(C,I,w,k,E(g,b),l,U,m,c,n)}else{let[U]=p,m=U?.latest,g=U?.original;if(m&&g&&Ei(m,l)){let b=Math.max(0,g.width+o);l==="width"&&(i?b=Qt(b,xs):b=Math.round(b));let x=Math.max(0,g.height+u);l==="height"&&(i?x=Qt(x,xs):x=Math.round(x)),b=Math.max(Dn,b),x=Math.max(Dn,x),Fo(b,x,m,g,c,n,l==="width"?"e":"s",{shouldInformMutation:!1})}}}s.triggerUpdate()},mG=({property:e,elements:t,elementsMap:n,atomicUnits:a,scene:i,appState:r})=>{let s=S.useMemo(()=>a.map(d=>{let o=yu(d,n);if(o.length>1){let[h,p,U,m]=Ne(o.map(g=>g.latest));return Math.round((e==="width"?U-h:m-p)*100)/100}let[u]=o;return Math.round((e==="width"?u.latest.width:u.latest.height)*100)/100}),[n,a,e]),l=new Set(s).size===1?Math.round(s[0]*100)/100:"Mixed",c=s.length>0;return f.jsx(Ii,{label:e==="width"?"W":"H",elements:t,dragInputCallback:UG,value:l,editable:c,appState:r,property:e,scene:i})},k5=mG,gG=15,bG=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:a,property:i,scene:r})=>{let s=r.getNonDeletedElementsMap(),l=t.map(d=>s.get(d.id)).filter(d=>d&&!Qs(d)&&Ei(d,i)),c=t.filter(d=>!Qs(d)&&Ei(d,i));if(a!==void 0){let d=Rr(a);for(let o of l){if(!o)continue;V(o,{angle:d},!1);let u=ge(o,s);u&&!xe(o)&&V(u,{angle:d},!1)}r.triggerUpdate();return}for(let d=0;d<l.length;d++){let o=l[d];if(!o)continue;let u=c[d],h=Math.round(Jo(u.angle)*100)/100,p=Math.round(e),U=(h+p)%360;n&&(U=Qt(U,gG)),U=U<0?U+360:U;let m=Rr(U);V(o,{angle:m},!1);let g=ge(o,s);g&&!xe(o)&&V(g,{angle:m},!1)}r.triggerUpdate()},vG=({elements:e,scene:t,appState:n,property:a})=>{let i=e.filter(c=>!Qs(c)&&Ei(c,"angle")),r=i.map(c=>Math.round(Jo(c.angle)%360*100)/100),s=new Set(r).size===1?r[0]:"Mixed",l=i.some(c=>Ei(c,"angle"));return f.jsx(Ii,{label:"A",icon:X8,value:s,elements:e,dragInputCallback:bG,editable:l,appState:n,scene:t,property:a})},xG=vG,C5=4,yG=4,wG=(e,t)=>e.reduce((n,a)=>{if(!a||Qs(a))return n;if(q(a))return n.push(a),n;if(Wn(a)){let i=ge(a,t);if(i)return n.push(i),n}return n},[]),EG=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:a,scene:i})=>{let r=i.getNonDeletedElementsMap(),s=t.map(c=>r.get(c.id)),l;if(a){l=Math.max(Math.round(a),C5);for(let c of s)V(c,{fontSize:l},!1),on(c,i.getContainerElement(c),r,!1);i.triggerUpdate()}else{let c=t;for(let d=0;d<s.length;d++){let o=s[d],u=c[d],h=Math.round(u.fontSize),p=Math.round(e),U=Math.max(h+p,C5);n&&(U=Qt(U,yG)),V(o,{fontSize:U},!1),on(o,i.getContainerElement(o),r,!1)}i.triggerUpdate()}},SG=({elements:e,scene:t,appState:n,property:a,elementsMap:i})=>{let r=wG(e,i);if(!r.length)return null;let s=r.map(d=>Math.round(d.fontSize*10)/10),l=new Set(s).size===1?s[0]:"Mixed",c=s.length>0;return f.jsx(Ii,{label:"F",icon:Bu,elements:r,dragInputCallback:EG,value:l,editable:c,scene:t,property:a,appState:n})},kG=SG,M5=10,CG=({accumulatedChange:e,instantChange:t,originalElements:n,originalElementsMap:a,shouldChangeByStepSize:i,nextValue:r,property:s,scene:l,originalAppState:c})=>{let d=l.getNonDeletedElementsMap(),o=l.getNonDeletedElements(),u=n[0],[h,p]=[u.x+u.width/2,u.y+u.height/2],[U,m]=z(E(u.x,u.y),E(h,p),u.angle);if(c.croppingElementId===u.id){let y=d.get(u.id);if(!y||!Le(y)||!y.crop)return;let w=y.crop,k=w,C=y.scale[0]===-1,I=y.scale[1]===-1,{width:A,height:_}=gi(y);if(r!==void 0){if(s==="x"){let L=r*(w.naturalWidth/A);C?k={...w,x:Se(w.naturalWidth-L-w.width,0,w.naturalWidth-w.width)}:k={...w,x:Se(r*(w.naturalWidth/A),0,w.naturalWidth-w.width)}}s==="y"&&(k={...w,y:Se(r*(w.naturalHeight/_),0,w.naturalHeight-w.height)}),V(y,{crop:k});return}let T=(s==="x"?t:0)*(C?-1:1),D=(s==="y"?t:0)*(I?-1:1);k={...w,x:Se(w.x+T,0,w.naturalWidth-w.width),y:Se(w.y+D,0,w.naturalHeight-w.height)},V(y,{crop:k});return}if(r!==void 0){Wo(s==="x"?r:U,s==="y"?r:m,u,d,o,l,a);return}let g=s==="x"?e:0,b=s==="y"?e:0,x=s==="x"?Math.round(i?Qt(u.x+g,M5):U+g):U,v=s==="y"?Math.round(i?Qt(u.y+b,M5):m+b):m;Wo(x,v,u,d,o,l,a)},MG=({property:e,element:t,elementsMap:n,scene:a,appState:i})=>{let[r,s]=z(E(t.x,t.y),E(t.x+t.width/2,t.y+t.height/2),t.angle),l=Oa(e==="x"?r:s,2);if(i.croppingElementId===t.id&&Le(t)&&t.crop){let c=FL(t);c&&(l=Oa(e==="x"?c.x:c.y,2))}return f.jsx(Ii,{label:e==="x"?"X":"Y",elements:[t],dragInputCallback:CG,scene:a,value:l,property:e,appState:i})},I5=MG,IG=10,_G=(e,t,n,a,i,r,s,l)=>{for(let c=0;c<a.length;c++){let d=i[c],[o,u]=[d.x+d.width/2,d.y+d.height/2],[h,p]=z(E(d.x,d.y),E(o,u),d.angle),U=e==="x"?Math.round(h+t):h,m=e==="y"?Math.round(p+n):p;Wo(U,m,d,r,a,l,s,!1)}},TG=(e,t,n,a,i,r,s)=>{let[l,c,,]=Ne(n),d=e-l,o=t-c;for(let u=0;u<n.length;u++){let h=n[u],p=a.get(h.id);if(p&&(!q(p)||!p.containerId)){let[U,m]=[p.x+p.width/2,p.y+p.height/2],[g,b]=z(E(p.x,p.y),E(U,m),p.angle);Wo(g+d,b+o,h,a,i,s,r,!1)}}},AG=({accumulatedChange:e,originalElements:t,originalElementsMap:n,shouldChangeByStepSize:a,nextValue:i,property:r,scene:s,originalAppState:l})=>{let c=s.getNonDeletedElementsMap(),d=s.getNonDeletedElements();if(i!==void 0){for(let u of SU(t,l)){let h=yu(u,c,n);if(h.length>1){let[p,U,,]=Ne(h.map(m=>m.latest));TG(r==="x"?i:p,r==="y"?i:U,h.map(m=>m.original),c,d,n,s)}else{let p=h[0]?.original,U=h[0]?.latest;if(p&&U&&Ei(U,r)){let[m,g]=[p.x+p.width/2,p.y+p.height/2],[b,x]=z(E(p.x,p.y),E(m,g),p.angle);Wo(r==="x"?i:b,r==="y"?i:x,p,c,d,s,n,!1)}}}s.triggerUpdate();return}let o=a?Qt(e,IG):e;_G(r,r==="x"?o:0,r==="y"?o:0,t,t,c,n,s),s.triggerUpdate()},jG=({property:e,elements:t,elementsMap:n,atomicUnits:a,scene:i,appState:r})=>{let s=S.useMemo(()=>a.map(c=>{let d=Object.keys(c).map(m=>n.get(m)).filter(m=>m!==void 0);if(d.length>1){let[m,g]=Ne(d);return Math.round((e==="x"?m:g)*100)/100}let[o]=d,[u,h]=[o.x+o.width/2,o.y+o.height/2],[p,U]=z(E(o.x,o.y),E(u,h),o.angle);return Math.round((e==="x"?p:U)*100)/100}),[a,n,e]),l=new Set(s).size===1?s[0]:"Mixed";return f.jsx(Ii,{label:e==="x"?"X":"Y",elements:t,dragInputCallback:AG,value:l,property:e,scene:i,appState:r})},_5=jG,T5=5,RG=({property:e,scene:t,appState:n,setAppState:a})=>f.jsx(Ii,{label:"Grid step",sensitivity:8,elements:[],dragInputCallback:({nextValue:i,instantChange:r,shouldChangeByStepSize:s,setInputValue:l})=>{a(c=>{let d;return i?d=i:r&&(d=s?Qt(c.gridStep+T5*Math.sign(r),T5):c.gridStep+r),d?(d=$7(d),l(d),{gridStep:d}):(l(c.gridStep),null)})},scene:t,value:n.gridStep,property:e,appState:n}),DG=RG,LG=50,Ef=e=>{let t=Uc(),n=e.app.scene.getSceneNonce()||1,a=e.app.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!1}),i=No(e.app);return f.jsx(PG,{...e,appState:t,sceneNonce:n,selectedElements:a,gridModeEnabled:i})},et=({children:e,columns:t=1,heading:n,style:a,...i})=>f.jsx("div",{className:te("exc-stats__row",{"exc-stats__row--heading":n}),style:{gridTemplateColumns:`repeat(${t}, 1fr)`,...a},...i,children:e});et.displayName="StatsRow";var wu=({children:e,order:t,style:n,...a})=>f.jsx("div",{className:"exc-stats__rows",style:{order:t,...n},...a,children:e});wu.displayName="StatsRows";Ef.StatsRow=et;Ef.StatsRows=wu;var PG=S.memo(({app:e,onClose:t,renderCustomStats:n,selectedElements:a,appState:i,sceneNonce:r,gridModeEnabled:s})=>{let l=e.scene,c=l.getNonDeletedElements(),d=l.getNonDeletedElementsMap(),o=At(),u=a.length===1?a[0]:null,h=a.length>1?a:null,p=i.croppingElementId&&Le(u),U=p?gi(u):null,[m,g]=S.useState({width:0,height:0}),b=S.useMemo(()=>Zo(y=>{let w=Ne(y);g({width:Math.round(w[2])-Math.round(w[0]),height:Math.round(w[3])-Math.round(w[1])})},LG),[]);S.useEffect(()=>{b(c)},[r,c,b]),S.useEffect(()=>()=>b.cancel(),[b]);let x=S.useMemo(()=>SU(a,i),[a,i]),v=S.useMemo(()=>H3(a),[a]);return f.jsx("div",{className:"exc-stats",children:f.jsxs(ua,{padding:3,children:[f.jsxs("div",{className:"title",children:[f.jsx("h2",{children:M("stats.title")}),f.jsx("div",{className:"close",onClick:t,children:hl})]}),f.jsxs(c0,{label:f.jsx("h3",{children:M("stats.generalStats")}),open:!!(i.stats.panels&Ms.generalStats),openTrigger:()=>o(y=>({stats:{open:!0,panels:y.stats.panels^Ms.generalStats}})),children:[f.jsxs(wu,{children:[f.jsx(et,{heading:!0,children:M("stats.scene")}),f.jsxs(et,{columns:2,children:[f.jsx("div",{children:M("stats.shapes")}),f.jsx("div",{children:c.length})]}),f.jsxs(et,{columns:2,children:[f.jsx("div",{children:M("stats.width")}),f.jsx("div",{children:m.width})]}),f.jsxs(et,{columns:2,children:[f.jsx("div",{children:M("stats.height")}),f.jsx("div",{children:m.height})]}),s&&f.jsxs(f.Fragment,{children:[f.jsx(et,{heading:!0,children:"Canvas"}),f.jsx(et,{children:f.jsx(DG,{property:"gridStep",scene:l,appState:i,setAppState:o})})]})]}),n?.(c,i)]}),!v&&a.length>0&&f.jsx("div",{id:"elementStats",style:{marginTop:12},children:f.jsx(c0,{label:f.jsx("h3",{children:M("stats.elementProperties")}),open:!!(i.stats.panels&Ms.elementProperties),openTrigger:()=>o(y=>({stats:{open:!0,panels:y.stats.panels^Ms.elementProperties}})),children:f.jsxs(wu,{children:[u&&f.jsxs(f.Fragment,{children:[p&&f.jsx(et,{heading:!0,children:M("labels.unCroppedDimension")}),i.croppingElementId&&Le(u)&&U&&f.jsxs(et,{columns:2,children:[f.jsx("div",{children:M("stats.width")}),f.jsx("div",{children:Oa(U.width,2)})]}),i.croppingElementId&&Le(u)&&U&&f.jsxs(et,{columns:2,children:[f.jsx("div",{children:M("stats.height")}),f.jsx("div",{children:Oa(U.height,2)})]}),f.jsx(et,{heading:!0,"data-testid":"stats-element-type",children:i.croppingElementId?M("labels.imageCropping"):M(`element.${u.type}`)}),f.jsx(et,{children:f.jsx(I5,{element:u,property:"x",elementsMap:d,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(I5,{element:u,property:"y",elementsMap:d,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(w5,{property:"width",element:u,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(w5,{property:"height",element:u,scene:l,appState:i})}),!Q(u)&&f.jsx(et,{children:f.jsx(oG,{property:"angle",element:u,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(fG,{property:"fontSize",element:u,scene:l,appState:i})})]}),h&&f.jsxs(f.Fragment,{children:[X7(h)&&f.jsx(et,{heading:!0,children:M("element.group")}),f.jsxs(et,{columns:2,style:{margin:"0.3125rem 0"},children:[f.jsx("div",{children:M("stats.shapes")}),f.jsx("div",{children:a.length})]}),f.jsx(et,{children:f.jsx(_5,{property:"x",elements:h,elementsMap:d,atomicUnits:x,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(_5,{property:"y",elements:h,elementsMap:d,atomicUnits:x,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(k5,{property:"width",elements:h,elementsMap:d,atomicUnits:x,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(k5,{property:"height",elements:h,elementsMap:d,atomicUnits:x,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(xG,{property:"angle",elements:h,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(kG,{property:"fontSize",elements:h,scene:l,appState:i,elementsMap:d})})]})]})})})]})})},(e,t)=>e.sceneNonce===t.sceneNonce&&e.selectedElements===t.selectedElements&&e.appState.stats.panels===t.appState.stats.panels&&e.gridModeEnabled===t.gridModeEnabled&&e.appState.gridStep===t.appState.gridStep&&e.appState.croppingElementId===t.appState.croppingElementId),NG=({sourceElementId:e,onClose:t,elementsMap:n,appState:a,generateLinkForSelection:i=g3})=>{let r=n.get(e)?.link??null,[s,l]=S.useState(r),[c,d]=S.useState(!1);S.useEffect(()=>{let u=ve(n,a),h=r;if(u.length>0&&i){let p=b3(u,a);p&&(h=yn(i(p.id,p.type)))}l(h)},[n,a,a.selectedElementIds,r,i]);let o=S.useCallback(()=>{if(s&&s!==n.get(e)?.link){let u=n.get(e);u&&V(u,{link:s})}if(!s&&c&&e){let u=n.get(e);u&&V(u,{link:null})}t?.()},[e,s,n,c,t]);return S.useEffect(()=>{let u=h=>{a.openDialog?.name==="elementLinkSelector"&&h.key===R.ENTER&&o(),a.openDialog?.name==="elementLinkSelector"&&h.key===R.ESCAPE&&t?.()};return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[a,t,o]),f.jsxs("div",{className:"ElementLinkDialog",children:[f.jsxs("div",{className:"ElementLinkDialog__header",children:[f.jsx("h2",{children:M("elementLink.title")}),f.jsx("p",{children:M("elementLink.desc")})]}),f.jsxs("div",{className:"ElementLinkDialog__input",children:[f.jsx(xU,{value:s??"",onChange:u=>{c||d(!0),l(u)},onKeyDown:u=>{u.key===R.ENTER&&o()},className:"ElementLinkDialog__input-field",selectOnRender:!0}),r&&s&&f.jsx(Me,{type:"button",title:M("buttons.remove"),"aria-label":M("buttons.remove"),label:M("buttons.remove"),onClick:()=>{l(null),d(!0)},className:"ElementLinkDialog__remove",icon:Zr})]}),f.jsxs("div",{className:"ElementLinkDialog__actions",children:[f.jsx(rl,{label:M("buttons.cancel"),onClick:()=>{t?.()},style:{marginRight:10}}),f.jsx(rl,{label:M("buttons.confirm"),onClick:o,actionType:"primary"})]})]})},OG=NG,$G=({UIOptions:e})=>f.jsxs(sn,{__fallback:!0,children:[f.jsx(sn.DefaultItems.LoadScene,{}),f.jsx(sn.DefaultItems.SaveToActiveFile,{}),e.canvasActions.export&&f.jsx(sn.DefaultItems.Export,{}),e.canvasActions.saveAsImage&&f.jsx(sn.DefaultItems.SaveAsImage,{}),f.jsx(sn.DefaultItems.SearchMenu,{}),f.jsx(sn.DefaultItems.Help,{}),f.jsx(sn.DefaultItems.ClearCanvas,{}),f.jsx(sn.Separator,{}),f.jsx(sn.Group,{title:"Excalidraw links",children:f.jsx(sn.DefaultItems.Socials,{})}),f.jsx(sn.Separator,{}),f.jsx(sn.DefaultItems.ToggleTheme,{}),f.jsx(sn.DefaultItems.ChangeCanvasBackground,{})]}),FG=()=>f.jsxs(zh,{__fallback:!0,children:[f.jsx(zh.Actions.SaveToDisk,{}),f.jsx(zh.Actions.ExportToImage,{})]}),zG=({actionManager:e,appState:t,files:n,setAppState:a,elements:i,canvas:r,onLockToggle:s,onHandToolToggle:l,onPenModeToggle:c,showExitZenModeBtn:d,renderTopRightUI:o,renderCustomStats:u,UIOptions:h,onExportImage:p,renderWelcomeScreen:U,children:m,app:g,isCollaborating:b,generateLinkForSelection:x})=>{let v=Tt(),y=IW(),w=y.tunnelsJotai.Provider,[k,C]=gt(mf),I=()=>h.canvasActions.export?f.jsx(SV,{elements:i,appState:t,files:n,actionManager:e,exportOpts:h.canvasActions.export,canvas:r,setAppState:a}):null,A=()=>!h.canvasActions.saveAsImage||t.openDialog?.name!=="imageExport"?null:f.jsx(QW,{elements:i,appState:t,files:n,actionManager:e,onExportImage:p,onCloseRequest:()=>a({openDialog:null}),name:g.getName()}),_=()=>f.jsxs("div",{style:{position:"relative"},children:[f.jsx(y.MainMenuTunnel.Out,{}),U&&f.jsx(y.WelcomeScreenMenuHintTunnel.Out,{})]}),T=()=>f.jsx(Xo,{heading:"selectedShapeActions",className:te("selected-shape-actions zen-mode-transition",{"transition-left":t.zenModeEnabled}),children:f.jsx(ua,{className:Xs.SHAPE_ACTIONS_MENU,padding:2,style:{maxHeight:`${t.height-166}px`},children:f.jsx(dx,{appState:t,elementsMap:g.scene.getNonDeletedElementsMap(),renderAction:e.renderAction,app:g})})}),D=()=>{let O=Vp(t,i),N=t.stats.open&&!t.zenModeEnabled&&!t.viewModeEnabled&&t.openDialog?.name!=="elementLinkSelector";return f.jsx(vx,{side:"top",children:f.jsxs("div",{className:"App-menu App-menu_top",children:[f.jsxs(On.Col,{gap:6,className:te("App-menu_top__left"),children:[_(),O&&T()]}),!t.viewModeEnabled&&t.openDialog?.name!=="elementLinkSelector"&&f.jsx(Xo,{heading:"shapes",className:"shapes-section",children:X=>f.jsxs("div",{style:{position:"relative"},children:[U&&f.jsx(y.WelcomeScreenToolbarHintTunnel.Out,{}),f.jsx(On.Col,{gap:4,align:"start",children:f.jsxs(On.Row,{gap:1,className:te("App-toolbar-container",{"zen-mode":t.zenModeEnabled}),children:[f.jsxs(ua,{padding:1,className:te("App-toolbar",{"zen-mode":t.zenModeEnabled}),children:[f.jsx(wx,{appState:t,isMobile:v.editor.isMobile,device:v,app:g}),X,f.jsxs(On.Row,{gap:1,children:[f.jsx(Sx,{zenModeEnabled:t.zenModeEnabled,checked:t.penMode,onChange:()=>c(null),title:M("toolBar.penMode"),penDetected:t.penDetected}),f.jsx(Ex,{checked:t.activeTool.locked,onChange:s,title:M("toolBar.lock")}),f.jsx("div",{className:"App-toolbar__divider"}),f.jsx(kx,{checked:Vs(t),onChange:()=>l(),title:M("toolBar.hand"),isMobile:!0}),f.jsx(ux,{appState:t,activeTool:t.activeTool,UIOptions:h,app:g})]})]}),b&&f.jsx(ua,{style:{marginLeft:8,alignSelf:"center",height:"fit-content"},children:f.jsx(XV,{title:M("toolBar.laser"),checked:t.activeTool.type===Dt.laser,onChange:()=>g.setActiveTool({type:Dt.laser}),isMobile:!0})})]})})]})}),f.jsxs("div",{className:te("layer-ui__wrapper__top-right zen-mode-transition",{"transition-right":t.zenModeEnabled}),children:[t.collaborators.size>0&&f.jsx(Cx,{collaborators:t.collaborators,userToFollow:t.userToFollow?.socketId||null}),o?.(v.editor.isMobile,t),!t.viewModeEnabled&&t.openDialog?.name!=="elementLinkSelector"&&(!F||t.openSidebar?.name!==oa.name)&&f.jsx(y.DefaultSidebarTriggerTunnel.Out,{}),N&&f.jsx(Ef,{app:g,onClose:()=>{e.executeAction(h0)},renderCustomStats:u})]})]})})},L=()=>f.jsx(x0,{__fallback:!0,onDock:O=>{qe("sidebar",`toggleDock (${O?"dock":"undock"})`,`(${v.editor.isMobile?"mobile":"desktop"})`)}}),F=fv(yU),P=f.jsxs(f.Fragment,{children:[m,f.jsx($G,{UIOptions:h}),f.jsx(x0.Trigger,{__fallback:!0,icon:J0,title:io(M("toolBar.library")),onToggle:O=>{O&&qe("sidebar",`${oa.name} (open)`,`button (${v.editor.isMobile?"mobile":"desktop"})`)},tab:oa.defaultTab,children:M("toolBar.library")}),f.jsx(FG,{}),t.openDialog?.name==="ttd"&&f.jsx(oy,{__fallback:!0}),t.isLoading&&f.jsx(Uv,{delay:250}),t.errorMessage&&f.jsx(GW,{onClose:()=>a({errorMessage:null}),children:t.errorMessage}),k&&!v.editor.isMobile&&f.jsx(wH,{colorPickerType:k.colorPickerType,onCancel:()=>{C(null)},onChange:(O,N,X,{altKey:H})=>{if(!(O!=="elementBackground"&&O!=="elementStroke"))if(X.length){for(let G of X)V(G,{[H&&k.swapPreviewOnAlt?O==="elementBackground"?"strokeColor":"backgroundColor":O==="elementBackground"?"backgroundColor":"strokeColor"]:N},!1),ut.delete(G);xi.getScene(X[0])?.triggerUpdate()}else a(O==="elementBackground"?{currentItemBackgroundColor:N}:{currentItemStrokeColor:N})},onSelect:(O,N)=>{C(X=>X?.keepOpenOnAlt&&N.altKey?X:null),k?.onSelect?.(O,N)}}),t.openDialog?.name==="help"&&f.jsx(bV,{onClose:()=>{a({openDialog:null})}}),f.jsx(RW,{}),t.openDialog?.name==="elementLinkSelector"&&f.jsx(OG,{sourceElementId:t.openDialog.sourceElementId,onClose:()=>{a({openDialog:null})},elementsMap:g.scene.getNonDeletedElementsMap(),appState:t,generateLinkForSelection:x}),f.jsx(y.OverwriteConfirmDialogTunnel.Out,{}),A(),I(),t.pasteDialog.shown&&f.jsx(fV,{setAppState:a,appState:t,onClose:()=>a({pasteDialog:{shown:!1,data:null}})}),v.editor.isMobile&&f.jsx(uV,{app:g,appState:t,elements:i,actionManager:e,renderJSONExportDialog:I,renderImageExportDialog:A,setAppState:a,onLockToggle:s,onHandToolToggle:l,onPenModeToggle:c,renderTopRightUI:o,renderCustomStats:u,renderSidebars:L,device:v,renderWelcomeScreen:U,UIOptions:h}),!v.editor.isMobile&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"layer-ui__wrapper",style:t.openSidebar&&F&&v.editor.canFitSidebar?{width:"calc(100% - var(--right-sidebar-width))"}:{},children:[U&&f.jsx(y.WelcomeScreenCenterTunnel.Out,{}),D(),f.jsx(CV,{appState:t,actionManager:e,showExitZenModeBtn:d,renderWelcomeScreen:U}),t.scrolledOutside&&f.jsx("button",{type:"button",className:"scroll-back-to-content",onClick:()=>{a(O=>({...Lo(i,O)}))},children:M("buttons.scrollBackToContent")})]}),L()]})]});return f.jsx(kv.Provider,{value:t,children:f.jsx(w,{children:f.jsx(lx.Provider,{value:y,children:P})})})},A5=e=>{let{suggestedBindings:t,startBoundElement:n,cursorButton:a,scrollX:i,scrollY:r,...s}=e;return s},BG=(e,t)=>{if(e.children!==t.children)return!1;let{canvas:n,appState:a,...i}=e,{canvas:r,appState:s,...l}=t;return Gt(A5(a),A5(s),{selectedElementIds:Gt,selectedGroupIds:Gt})&&Gt(i,l)},HG=Z.memo(zG,BG),XG=5e3,WG=({message:e,onClose:t,closable:n=!1,duration:a=XG,style:i})=>{let r=S.useRef(0),s=a!==1/0,l=S.useCallback(()=>{s&&(r.current=window.setTimeout(()=>t(),a))},[t,a,s]);return S.useEffect(()=>{if(s)return l(),()=>clearTimeout(r.current)},[l,e,a,s]),f.jsxs("div",{className:"Toast",onMouseEnter:s?()=>clearTimeout(r?.current):void 0,onMouseLeave:s?l:void 0,style:i,children:[f.jsx("p",{className:"Toast__message",children:e}),n&&f.jsx(Me,{icon:hl,"aria-label":"close",type:"icon",onClick:t,className:"close"})]})},j5=Y({name:"viewMode",label:"labels.viewMode",paletteName:"Toggle view mode",icon:ap,viewMode:!0,trackEvent:{category:"canvas",predicate:e=>!e.viewModeEnabled},perform(e,t){return{appState:{...t,viewModeEnabled:!this.checked(t)},captureUpdate:B.EVENTUALLY}},checked:e=>e.viewModeEnabled,predicate:(e,t,n)=>typeof n.viewModeEnabled>"u",keyTest:e=>!e[R.CTRL_OR_CMD]&&e.altKey&&e.code===Te.R}),cy=(e,t)=>{let n=t.scene.getSelectedElements(e);return n.length===1&&ce(n[0])},VG=Y({name:"selectAllElementsInFrame",label:"labels.selectAllElementsInFrame",trackEvent:{category:"canvas"},perform:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t).at(0)||null;if(ce(i)){let r=Ga(Ve(e),i.id).filter(s=>!(s.type==="text"&&s.containerId));return{elements:e,appState:{...t,selectedElementIds:r.reduce((s,l)=>(s[l.id]=!0,s),{})},captureUpdate:B.IMMEDIATELY}}return{elements:e,appState:t,captureUpdate:B.EVENTUALLY}},predicate:(e,t,n,a)=>cy(t,a)}),GG=Y({name:"removeAllElementsFromFrame",label:"labels.removeAllElementsFromFrame",trackEvent:{category:"history"},perform:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t).at(0)||null;return ce(i)?{elements:F3(e,i),appState:{...t,selectedElementIds:{[i.id]:!0}},captureUpdate:B.IMMEDIATELY}:{elements:e,appState:t,captureUpdate:B.EVENTUALLY}},predicate:(e,t,n,a)=>cy(t,a)});Y({name:"updateFrameRendering",label:"labels.updateFrameRendering",viewMode:!0,trackEvent:{category:"canvas"},perform:(e,t)=>({elements:e,appState:{...t,frameRendering:{...t.frameRendering,enabled:!t.frameRendering.enabled}},captureUpdate:B.EVENTUALLY}),checked:e=>e.frameRendering.enabled});Y({name:"setFrameAsActiveTool",label:"toolBar.frame",trackEvent:{category:"toolbar"},icon:V8,viewMode:!1,perform:(e,t,n,a)=>{let i=Et(t,{type:"frame"});return Ca(a.interactiveCanvas,{...t,activeTool:i}),{elements:e,appState:{...t,activeTool:Et(t,{type:"frame"})},captureUpdate:B.EVENTUALLY}},keyTest:e=>!e[R.CTRL_OR_CMD]&&!e.shiftKey&&!e.altKey&&e.key.toLocaleLowerCase()===R.F});var YG=Y({name:"wrapSelectionInFrame",label:"labels.wrapSelectionInFrame",trackEvent:{category:"element"},predicate:(e,t,n,a)=>{let i=ve(e,t);return i.length>0&&!i.some(r=>ce(r))},perform:(e,t,n,a)=>{let i=ve(e,t),[r,s,l,c]=Ne(i,a.scene.getNonDeletedElementsMap()),d=16,o=mp({x:r-d,y:s-d,width:l-r+d*2,height:c-s+d*2});if(t.editingGroupId){let u=tt(i,t.editingGroupId);for(let h of u){let p=h.groupIds.indexOf(t.editingGroupId);V(h,{groupIds:h.groupIds.slice(0,p)},!1)}}return{elements:lo([...a.scene.getElementsIncludingDeleted(),o],i,o,t),appState:{selectedElementIds:{[o.id]:!0}},captureUpdate:B.IMMEDIATELY}}}),ZG=()=>f.jsxs("div",{"data-testid":"brave-measure-text-error",children:[f.jsx("p",{children:f.jsx(Pa,{i18nKey:"errors.brave_measure_text_error.line1",bold:e=>f.jsx("span",{style:{fontWeight:600},children:e})})}),f.jsx("p",{children:f.jsx(Pa,{i18nKey:"errors.brave_measure_text_error.line2",bold:e=>f.jsx("span",{style:{fontWeight:600},children:e})})}),f.jsx("p",{children:f.jsx(Pa,{i18nKey:"errors.brave_measure_text_error.line3",link:e=>f.jsx("a",{href:"http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser",children:e})})}),f.jsx("p",{children:f.jsx(Pa,{i18nKey:"errors.brave_measure_text_error.line4",issueLink:e=>f.jsx("a",{href:"https://github.com/excalidraw/excalidraw/issues/new",children:e}),discordLink:e=>f.jsxs("a",{href:"https://discord.gg/UexuTaE",children:[e,"."]})})})]}),KG=ZG,Wc={width:100,height:0},Gi=100,qG=(e,t,n)=>{let a=_n({x:0,y:0,textAlign:Io.CENTER,verticalAlign:Mn.MIDDLE,...t,containerId:e.id,strokeColor:t.strokeColor||e.strokeColor});return Object.assign(e,{boundElements:(e.boundElements||[]).concat({type:"text",id:a.id})}),on(a,e,n),[e,a]},R5=(e,t,n,a,i)=>{let r,s;if(Object.assign(e,{startBinding:e?.startBinding||null,endBinding:e.endBinding||null}),t){let o=t?.width??Gi,u=t?.height??Gi,h;t.id&&(h=a.getElement(t.id),h||console.error(`No element for start binding with id ${t.id} found`));let p=t.x||e.x-o,U=t.y||e.y-u/2,m=h?h.type:t.type;if(m){if(m==="text"){let g="";h&&h.type==="text"?g=h.text:t.type==="text"&&(g=t.text),g||console.error(`No text found for start binding text element for ${e.id}`),r=_n({x:p,y:U,type:"text",...h,...t,text:g}),Object.assign(r,{x:t.x||e.x-r.width,y:t.y||e.y-r.height/2})}else switch(m){case"rectangle":case"ellipse":case"diamond":{r=Xa({x:p,y:U,width:o,height:u,...h,...t,type:m});break}default:Gr(e,`Unhandled element start type "${t.type}"`,!0)}Ba(e,r,"start",i)}}if(n){let o=n?.height??Gi,u=n?.width??Gi,h;n.id&&(h=a.getElement(n.id),h||console.error(`No element for end binding with id ${n.id} found`));let p=n.x||e.x+e.width,U=n.y||e.y-o/2,m=h?h.type:n.type;if(m){if(m==="text"){let g="";h&&h.type==="text"?g=h.text:n.type==="text"&&(g=n.text),g||console.error(`No text found for end binding text element for ${e.id}`),s=_n({x:p,y:U,type:"text",...h,...n,text:g}),Object.assign(s,{y:n.y||e.y-s.height/2})}else switch(m){case"rectangle":case"ellipse":case"diamond":{s=Xa({x:p,y:U,width:u,height:o,...h,...n,type:m});break}default:Gr(e,`Unhandled element end type "${m}"`,!0)}Ba(e,s,"end",i)}}if(e.points.length<2)return{linearElement:e,startBoundElement:r,endBoundElement:s};let l=e.points.length-1,c=.5,d=di(e.points);return e.points[l][0]>e.points[l-1][0]&&(d[0][0]=c,d[l][0]-=c),e.points[l][0]<e.points[l-1][0]&&(d[0][0]=-c,d[l][0]+=c),e.points[l][1]>e.points[l-1][1]&&(d[0][1]=c,d[l][1]-=c),e.points[l][1]<e.points[l-1][1]&&(d[0][1]=-c,d[l][1]+=c),Object.assign(e,{points:d}),{linearElement:e,startBoundElement:r,endBoundElement:s}},JG=class{constructor(){j(this,"excalidrawElements",new Map),j(this,"add",e=>{e&&this.excalidrawElements.set(e.id,e)}),j(this,"getElements",()=>Va(Array.from(this.excalidrawElements.values()))),j(this,"getElementsMap",()=>Hn(oe(this.getElements()))),j(this,"getElement",e=>this.excalidrawElements.get(e))}},Eu=(e,t)=>{if(!e)return[];let n=di(e),a=new JG,i=new Map,r=new Map;for(let l of n){let c,d=l.id;switch(t?.regenerateIds!==!1&&Object.assign(l,{id:Vn()}),l.type){case"rectangle":case"ellipse":case"diamond":{let o=l?.label?.text&&l.width===void 0?0:l?.width||Gi,u=l?.label?.text&&l.height===void 0?0:l?.height||Gi;c=Xa({...l,width:o,height:u});break}case"line":{let o=l.width||Wc.width,u=l.height||Wc.height;c=Nr({width:o,height:u,points:[E(0,0),E(o,u)],...l});break}case"arrow":{let o=l.width||Wc.width,u=l.height||Wc.height;c=gp({width:o,height:u,endArrowhead:"arrow",points:[E(0,0),E(o,u)],...l,type:"arrow"}),Object.assign(c,Js(c.points));break}case"text":{let o=l?.fontFamily||dr,u=l?.fontSize||ki,h=l?.lineHeight||qr(o),p=l.text??"",U=Zs(p),m=an(U,Xe({fontFamily:o,fontSize:u}),h);c=_n({width:m.width,height:m.height,fontFamily:o,fontSize:u,...l});break}case"image":{c=t3({width:l?.width||Gi,height:l?.height||Gi,...l});break}case"frame":{c=mp({x:0,y:0,...l});break}case"magicframe":{c=P1({x:0,y:0,...l});break}case"freedraw":case"iframe":case"embeddable":{c=l;break}default:c=l,Gr(l,`Unhandled element type "${l.type}"`,!0)}a.getElement(c.id)?console.error(`Duplicate id found for ${c.id}`):(a.add(c),i.set(c.id,l),d&&r.set(d,c.id))}let s=a.getElementsMap();for(let[l,c]of i){let d=a.getElement(l);switch(c.type){case"rectangle":case"ellipse":case"diamond":case"arrow":{if(c.label?.text){let[o,u]=qG(d,c?.label,s);if(a.add(o),a.add(u),xe(o)){let h=c.type==="arrow"?c?.start:void 0,p=c.type==="arrow"?c?.end:void 0;if(h&&h.id){let b=r.get(h.id);b&&Object.assign(h,{id:b})}if(p&&p.id){let b=r.get(p.id);b&&Object.assign(p,{id:b})}let{linearElement:U,startBoundElement:m,endBoundElement:g}=R5(o,h,p,a,s);o=U,a.add(U),a.add(m),a.add(g)}}else switch(c.type){case"arrow":{let{start:o,end:u}=c;if(o&&o.id){let m=r.get(o.id);Object.assign(o,{id:m})}if(u&&u.id){let m=r.get(u.id);Object.assign(u,{id:m})}let{linearElement:h,startBoundElement:p,endBoundElement:U}=R5(d,o,u,a,s);a.add(h),a.add(p),a.add(U);break}}break}}}for(let[l,c]of i){if(c.type!=="frame"&&c.type!=="magicframe")continue;let d=a.getElement(l);if(!d)throw new Error(`Excalidraw element with id ${l} doesn't exist`);let o=[];c.children.forEach(y=>{let w=r.get(y);if(!w)throw new Error(`Element with ${y} wasn't mapped correctly`);let k=a.getElement(w);if(!k)throw new Error(`Frame element with id ${w} doesn't exist`);Object.assign(k,{frameId:d.id}),k?.boundElements?.forEach(C=>{let I=a.getElement(C.id);if(!I)throw new Error(`Bound element with id ${C.id} doesn't exist`);Object.assign(I,{frameId:d.id}),o.push(I)}),o.push(k)});let[u,h,p,U]=Ne(o),m=10;u=u-m,h=h-m,p=p+m,U=U+m;let g=d?.x||u,b=d?.y||h,x=d?.width||p-u,v=d?.height||U-h;Object.assign(d,{x:g,y:b,width:x,height:v}),S8()&&c.children.length&&(d?.x||d?.y||d?.width||d?.height)&&console.info("User provided frame attributes are being considered, if you find this inaccurate, please remove any of the attributes - x, y, width and height so frame coordinates and dimensions are calculated automatically")}return a.getElements()},ft=e=>t=>{Ft.unstable_batchedUpdates(e,t)},Hh=e=>Nu(t=>{Ft.unstable_batchedUpdates(e,t)}),kU=(()=>{let e;try{let n=S.version.split(".");e=Number(n[0])>17}catch{e=!1}let t=!1;return()=>window.EXCALIDRAW_THROTTLE_RENDER===!0?e?!0:(t||(t=!0,console.warn("Excalidraw: render throttling is disabled on React versions < 18.")),!1):!1})(),QG="#ff6b6b",eY="#ff0000",D5=1,L5=2,tY=(e,t)=>{if(!t.snapLines.length)return;let n=t.theme===Ce.LIGHT||t.zenModeEnabled?QG:eY,a=(t.zenModeEnabled?D5*1.5:D5)/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY);for(let i of t.snapLines)i.type==="pointer"?(e.lineWidth=a,e.strokeStyle=n,aY(i,e,t)):i.type==="gap"?(e.lineWidth=a,e.strokeStyle=n,iY(i.points[0],i.points[1],i.direction,t,e)):i.type==="points"&&(e.lineWidth=a,e.strokeStyle=n,nY(i,e,t));e.restore()},nY=(e,t,n)=>{if(!n.zenModeEnabled){let a=e.points[0],i=e.points[e.points.length-1];jn(a,i,t)}for(let a of e.points)dy(a,n,t)},aY=(e,t,n)=>{dy(e.points[0],n,t),n.zenModeEnabled||jn(e.points[0],e.points[1],t)},dy=([e,t],n,a)=>{a.save();let i=(n.zenModeEnabled?L5*1.5:L5)/n.zoom.value;a.beginPath(),a.moveTo(e-i,t-i),a.lineTo(e+i,t+i),a.moveTo(e+i,t-i),a.lineTo(e-i,t+i),a.stroke(),a.restore()},jn=(e,t,n)=>{n.beginPath(),n.lineTo(e[0],e[1]),n.lineTo(t[0],t[1]),n.stroke()},iY=(e,t,n,a,i)=>{let r=8/a.zoom.value,s=r/2,l=r/4;if(n==="horizontal"){let c=[(e[0]+t[0])/2,e[1]];a.zenModeEnabled||jn(E(e[0],e[1]-r),E(e[0],e[1]+r),i),jn(E(c[0]-l,c[1]-s),E(c[0]-l,c[1]+s),i),jn(E(c[0]+l,c[1]-s),E(c[0]+l,c[1]+s),i),a.zenModeEnabled||(jn(E(t[0],t[1]-r),E(t[0],t[1]+r),i),jn(e,t,i))}else{let c=[e[0],(e[1]+t[1])/2];a.zenModeEnabled||jn(E(e[0]-r,e[1]),E(e[0]+r,e[1]),i),jn(E(c[0]-s,c[1]-l),E(c[0]+s,c[1]-l),i),jn(E(c[0]-s,c[1]+l),E(c[0]+s,c[1]+l),i),a.zenModeEnabled||(jn(E(t[0]-r,t[1]),E(t[0]+r,t[1]),i),jn(e,t,i))}},rY=(e,t)=>{nn(t.selectedLinearElement,"selectedLinearElement is null");let{segmentMidPointHoveredCoords:n}=t.selectedLinearElement;nn(n,"midPointCoords is null"),e.save(),e.translate(t.scrollX,t.scrollY),uy(n,e,t),e.restore()},sY=(e,t,n)=>{let{elementId:a,hoverPointIndex:i}=t.selectedLinearElement;if(t.editingLinearElement?.selectedPointsIndices?.includes(i))return;let r=J.getElement(a,n);if(!r)return;let s=J.getPointAtIndexGlobalCoordinates(r,i,n);e.save(),e.translate(t.scrollX,t.scrollY),uy(s,e,t),e.restore()},uy=(e,t,n)=>{t.fillStyle="rgba(105, 101, 219, 0.4)",tf(t,e[0],e[1],J.POINT_HANDLE_SIZE/n.zoom.value,!1)},hc=(e,t,n,a,i,r,s,l,c=!1,d=0)=>{e.save(),e.translate(r,s),e.rotate(l),c&&e.fillRect(t-r,n-s,a,i),d&&e.roundRect?(e.beginPath(),e.roundRect(t-r,n-s,a,i,d),e.stroke(),e.closePath()):e.strokeRect(t-r,n-s,a,i),e.restore()},lY=(e,t,n,a,i,r)=>{e.save(),e.translate(a,i),e.rotate(r),e.beginPath(),e.moveTo(0,n/2),e.lineTo(t/2,0),e.lineTo(0,-n/2),e.lineTo(-t/2,0),e.closePath(),e.stroke(),e.restore()},Xh=(e,t,n,a,i,r=!1)=>{e.strokeStyle="#5e5ad8",e.setLineDash([]),e.fillStyle="rgba(255, 255, 255, 0.9)",i?e.fillStyle="rgba(134, 131, 226, 0.9)":r&&(e.fillStyle="rgba(177, 151, 252, 0.7)"),tf(e,n[0],n[1],a/t.zoom.value,!r)},oY=(e,t,n,a,i,r)=>{e.beginPath(),e.ellipse(a,i,t/2,n/2,r,0,Math.PI*2),e.stroke()},cY=(e,t,n,a)=>{let[i,r,s,l]=he(t,n),c=s-i,d=l-r;e.strokeStyle="rgba(0,0,0,.05)";let o=a.value<1?a.value:1;e.lineWidth=fp/o;let u=e.lineWidth/2+hp,h=ca(Math.min(t.width,t.height),t);switch(t.type){case"rectangle":case"text":case"image":case"iframe":case"embeddable":case"frame":case"magicframe":hc(e,i-u,r-u,c+u*2,d+u*2,i+c/2,r+d/2,t.angle,void 0,h);break;case"diamond":let p=Math.hypot(c,d),U=u*p/d,m=u*p/c;lY(e,c+U*2,d+m*2,i+c/2,r+d/2,t.angle);break;case"ellipse":oY(e,c+u*2,d+u*2,i+c/2,r+d/2,t.angle);break}},dY=(e,t,n,a)=>{let[i,r,s]=t,l=ac(s,s.width,s.height,a);e.strokeStyle="rgba(0,0,0,0)",e.fillStyle="rgba(0,0,0,.05)",(r==="both"?[0,-1]:r==="start"?[0]:[-1]).forEach(c=>{let[d,o]=J.getPointAtIndexGlobalCoordinates(i,c,n);tf(e,d,o,l)})},fy=(e,t,n)=>{let{angle:a,x1:i,y1:r,x2:s,y2:l,selectionColors:c,cx:d,cy:o,dashed:u,activeEmbeddable:h}=n,p=s-i,U=l-r,m=(n.padding??Wr*2)/t.zoom.value,g=8/t.zoom.value,b=4/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=(h?4:1)/t.zoom.value;let x=c.length;for(let v=0;v<x;++v)e.strokeStyle=c[v],u&&e.setLineDash([g,b+(g+b)*(x-1)]),e.lineDashOffset=(g+b)*v,hc(e,i-m,r-m,p+m*2,U+m*2,d,o,a);e.restore()},uY=(e,t,n,a)=>{let i=Array.isArray(n)?dY:cY;e.save(),e.translate(t.scrollX,t.scrollY),i(e,n,a,t.zoom),e.restore()},fY=(e,t,n,a)=>{let[i,r,s,l]=he(n,a),c=s-i,d=l-r;e.strokeStyle="rgb(0,118,255)",e.lineWidth=ct.strokeWidth/t.zoom.value,e.save(),e.translate(t.scrollX,t.scrollY),hc(e,i,r,c,d,i+c/2,r+d/2,n.angle,!1,ct.radius/t.zoom.value),e.restore()},hY=(e,t,n)=>{let a=n.filter(l=>l.groupIds.length===0),i=n.filter(l=>l.groupIds.length>0),r=l=>{let[c,d,o,u]=Ne(l);return{angle:0,x1:c,x2:o,y1:d,y2:u,selectionColors:["rgb(0,118,255)"],dashed:!1,cx:c+(o-c)/2,cy:d+(u-d)/2,activeEmbeddable:!1}},s=l=>{let c=tt(n,l);return r(c)};Object.entries(H7(i,t)).filter(([l,c])=>c).map(([l,c])=>l).map(l=>s(l)).concat(a.map(l=>r([l]))).forEach(l=>fy(e,t,l))},Wh=(e,t,n,a)=>{if(!t.selectedLinearElement)return;e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=1/t.zoom.value;let i=J.getPointsGlobalCoordinates(n,a),{POINT_HANDLE_SIZE:r}=J,s=t.editingLinearElement?r:r/2;if(i.forEach((l,c)=>{if(Q(n)&&c!==0&&c!==i.length-1)return;let d=!!t.editingLinearElement?.selectedPointsIndices?.includes(c);Xh(e,t,l,s,d)}),Q(n)){let l=n.fixedSegments?.map(c=>c.index)||[];i.slice(0,-1).forEach((c,d)=>{J.isSegmentTooShort(n,i[d+1],i[d],d,t.zoom)||Xh(e,t,E((c[0]+i[d+1][0])/2,(c[1]+i[d+1][1])/2),r/2,!1,!l.includes(d+1))})}else J.getEditorMidPoints(n,a,t).filter((l,c,d)=>l!==null&&!(Q(n)&&(c===0||c===d.length-1))).forEach(l=>{(t.editingLinearElement||i.length===2)&&Xh(e,t,l,r/2,!1,!0)});e.restore()},P5=(e,t,n,a,i)=>{Object.keys(a).forEach(r=>{let s=a[r];if(s!==void 0){let[l,c,d,o]=s;e.save(),e.lineWidth=1/n.zoom.value,t.selectionColor&&(e.strokeStyle=t.selectionColor),r==="rotation"?tf(e,l+d/2,c+o/2,d/2):e.roundRect?(e.beginPath(),e.roundRect(l,c,d,o,2/n.zoom.value),e.fill(),e.stroke()):hc(e,l,c,d,o,l+d/2,c+o/2,i,!0),e.restore()}})},pY=(e,t,n,a,i)=>{let[r,s,,,l,c]=he(a,i),d=3,o=20,u=d/n.zoom.value,h=u/2,p=l-r+u,U=c-s+u,m=Math.min(o/n.zoom.value,p),g=Math.min(o/n.zoom.value,U);e.save(),e.fillStyle=t.selectionColor,e.strokeStyle=t.selectionColor,e.lineWidth=u,[[[-p,-U],[0,h],[m,h],[h,0],[h,g]],[[p-h,-U],[h,h],[-m+h,h],[0,0],[0,g]],[[-p,U],[0,-h],[m,-h],[h,0],[h,-g]],[[p-h,U],[h,-h],[-m+h,-h],[0,0],[0,-g]]].forEach(b=>{let[[x,v],[y,w],[k,C],[I,A],[_,T]]=b;e.save(),e.translate(l,c),e.rotate(a.angle),e.beginPath(),e.moveTo(x+y,v+w),e.lineTo(x+k,v+C),e.stroke(),e.beginPath(),e.moveTo(x+I,v+A),e.lineTo(x+_,v+T),e.stroke(),e.restore()}),e.restore()},UY=(e,t,n,a)=>{t.save();let i=Wr*2/n.zoom.value,r=e.width+i*2,s=e.height+i*2,l=e.x+r/2,c=e.y+s/2,d=-(r/2+i),o=-(s/2+i);t.translate(l+n.scrollX,c+n.scrollY),t.rotate(e.angle),t.lineWidth=1/n.zoom.value,t.strokeStyle=a,t.strokeRect(d,o,r,s),t.restore()},hy=({canvas:e,elementsMap:t,visibleElements:n,selectedElements:a,allElementsMap:i,scale:r,appState:s,renderConfig:l,device:c})=>{if(e===null)return{atLeastOneVisibleElement:!1,elementsMap:t};let[d,o]=wp(e,r),u=Ep({canvas:e,scale:r,normalizedWidth:d,normalizedHeight:o});u.save(),u.scale(s.zoom.value,s.zoom.value);let h;if(n.forEach(m=>{s.editingLinearElement?.elementId===m.id&&m&&(h=m)}),h&&Wh(u,s,h,t),s.selectionElement&&!s.isCropping)try{WL(s.selectionElement,u,s,l.selectionColor)}catch(m){console.error(m)}if(s.editingTextElement&&q(s.editingTextElement)){let m=i.get(s.editingTextElement.id);m&&!m.autoResize&&UY(m,u,s,l.selectionColor)}s.isBindingEnabled&&s.suggestedBindings.filter(m=>m!=null).forEach(m=>{uY(u,s,m,t)}),s.frameToHighlight&&fY(u,s,s.frameToHighlight,t),s.elementsToHighlight&&hY(u,s,s.elementsToHighlight);let p=a.some(m=>ce(m));if(a.length===1&&s.editingLinearElement?.elementId===a[0].id&&Wh(u,s,a[0],t),Q(a[0])&&s.selectedLinearElement&&s.selectedLinearElement.segmentMidPointHoveredCoords?rY(u,s):s.selectedLinearElement&&s.selectedLinearElement.hoverPointIndex>=0&&!(Q(a[0])&&s.selectedLinearElement.hoverPointIndex>0&&s.selectedLinearElement.hoverPointIndex<a[0].points.length-1)&&sY(u,s,t),!s.multiElement&&!s.editingLinearElement){let m=Z3(a,s),g=a.length===1&&ue(a[0]);g&&s.selectedLinearElement?.elementId===a[0].id&&!a[0].locked&&Wh(u,s,a[0],t);let b=l.selectionColor||Bt.black;if(m){let x=oe(a),v=[];for(let w of t.values()){let k=[],C=l.remoteSelectedElementIds.get(w.id);if(g&&Q(w)&&(w.startBinding||w.endBinding)||(x.has(w.id)&&!z7(s,w)&&k.push(b),C&&k.push(...C.map(I=>yf(I,s.collaborators.get(I))))),k.length){let[I,A,_,T,D,L]=he(w,t,!0);v.push({angle:w.angle,x1:I,y1:A,x2:_,y2:T,selectionColors:k,dashed:!!C,cx:D,cy:L,activeEmbeddable:s.activeEmbeddable?.element===w&&s.activeEmbeddable.state==="active",padding:w.id===s.croppingElementId||Le(w)?0:void 0})}}let y=w=>{let k=tt(t,w),[C,I,A,_]=Ne(k);v.push({angle:0,x1:C,x2:A,y1:I,y2:_,selectionColors:[Bt.black],dashed:!0,cx:C+(A-C)/2,cy:I+(_-I)/2,activeEmbeddable:!1})};for(let w of Pr(s))y(w);s.editingGroupId&&y(s.editingGroupId),v.forEach(w=>fy(u,s,w))}if(u.save(),u.translate(s.scrollX,s.scrollY),a.length===1){u.fillStyle=Bt.white;let x=Y3(a[0],s.zoom,t,"mouse",oo(c));if(!s.viewModeEnabled&&m&&!q(s.editingTextElement)&&!s.croppingElementId&&P5(u,l,s,x,a[0].angle),s.croppingElementId&&!s.isCropping){let v=t.get(s.croppingElementId);v&&Le(v)&&pY(u,l,s,v,t)}}else if(a.length>1&&!s.isRotating){let x=Wr*2/s.zoom.value;u.fillStyle=Bt.white;let[v,y,w,k]=Ne(a),C=u.getLineDash();u.setLineDash([2/s.zoom.value]);let I=u.lineWidth;u.lineWidth=1/s.zoom.value,u.strokeStyle=b,hc(u,v-x,y-x,w-v+x*2,k-y+x*2,(v+w)/2,(y+k)/2,0),u.lineWidth=I,u.setLineDash(C);let A=Hp([v,y,w,k,(v+w)/2,(y+k)/2],0,s.zoom,"mouse",p?{...oo(c),rotation:!0}:oo(c));a.some(_=>!_.locked)&&P5(u,l,s,A,0)}u.restore()}s.searchMatches.forEach(({id:m,focus:g,matchedLines:b})=>{let x=t.get(m);if(x&&q(x)){let[v,y,,,w,k]=he(x,t,!0);u.save(),s.theme===Ce.LIGHT?g?u.fillStyle="rgba(255, 124, 0, 0.4)":u.fillStyle="rgba(255, 226, 0, 0.4)":g?u.fillStyle="rgba(229, 82, 0, 0.4)":u.fillStyle="rgba(99, 52, 0, 0.4)",u.translate(s.scrollX,s.scrollY),u.translate(w,k),u.rotate(x.angle),b.forEach(C=>{u.fillRect(v+C.offsetX-w,y+C.offsetY-k,C.width,C.height)}),u.restore()}}),tY(u,s),u.restore(),nX({context:u,renderConfig:l,appState:s,normalizedWidth:d,normalizedHeight:o});let U;return l.renderScrollbars&&(U=cV(n,d,o,s),u.save(),u.fillStyle=oV,u.strokeStyle="rgba(255,255,255,0.8)",[U.horizontal,U.vertical].forEach(m=>{m&&Bv(u,m.x,m.y,m.width,m.height,Vi/2)}),u.restore()),{scrollBars:U,atLeastOneVisibleElement:n.length>0,elementsMap:t}},py=Nu(e=>{let t=hy(e);e.callback?.(t)},{trailing:!0}),mY=(e,t)=>{if(t){py(e);return}let n=hy(e);return e.callback(n),n},gY=e=>{let t=S.useRef(!1);return S.useEffect(()=>{if(!t.current){t.current=!0;return}let n=new Map,a=new Map,i=new Map,r=new Map,s=new Map;e.appState.collaborators.forEach((c,d)=>{if(c.selectedElementIds)for(let o of Object.keys(c.selectedElementIds))i.has(o)||i.set(o,[]),i.get(o).push(d);!c.pointer||c.pointer.renderCursor===!1||(c.username&&r.set(d,c.username),c.userState&&s.set(d,c.userState),a.set(d,Nn({sceneX:c.pointer.x,sceneY:c.pointer.y},e.appState)),n.set(d,c.button))});let l=e.containerRef?.current&&getComputedStyle(e.containerRef.current).getPropertyValue("--color-selection")||"#6965db";mY({canvas:e.canvas,elementsMap:e.elementsMap,visibleElements:e.visibleElements,selectedElements:e.selectedElements,allElementsMap:e.allElementsMap,scale:window.devicePixelRatio,appState:e.appState,renderConfig:{remotePointerViewportCoords:a,remotePointerButton:n,remoteSelectedElementIds:i,remotePointerUsernames:r,remotePointerUserStates:s,selectionColor:l,renderScrollbars:!1},device:e.device,callback:e.renderInteractiveSceneCallback},kU())}),f.jsx("canvas",{className:"excalidraw__canvas interactive",style:{width:e.appState.width,height:e.appState.height,cursor:e.appState.viewModeEnabled?Fe.GRAB:Fe.AUTO},width:e.appState.width*e.scale,height:e.appState.height*e.scale,ref:e.handleCanvasRef,onContextMenu:e.onContextMenu,onPointerMove:e.onPointerMove,onPointerUp:e.onPointerUp,onPointerCancel:e.onPointerCancel,onTouchMove:e.onTouchMove,onPointerDown:e.onPointerDown,onDoubleClick:e.appState.viewModeEnabled?void 0:e.onDoubleClick,children:M("labels.drawingCanvas")})},N5=e=>({zoom:e.zoom,scrollX:e.scrollX,scrollY:e.scrollY,width:e.width,height:e.height,viewModeEnabled:e.viewModeEnabled,openDialog:e.openDialog,editingGroupId:e.editingGroupId,editingLinearElement:e.editingLinearElement,selectedElementIds:e.selectedElementIds,frameToHighlight:e.frameToHighlight,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,theme:e.theme,pendingImageElementId:e.pendingImageElementId,selectionElement:e.selectionElement,selectedGroupIds:e.selectedGroupIds,selectedLinearElement:e.selectedLinearElement,multiElement:e.multiElement,isBindingEnabled:e.isBindingEnabled,suggestedBindings:e.suggestedBindings,isRotating:e.isRotating,elementsToHighlight:e.elementsToHighlight,collaborators:e.collaborators,activeEmbeddable:e.activeEmbeddable,snapLines:e.snapLines,zenModeEnabled:e.zenModeEnabled,editingTextElement:e.editingTextElement,isCropping:e.isCropping,croppingElementId:e.croppingElementId,searchMatches:e.searchMatches}),bY=(e,t)=>e.selectionNonce!==t.selectionNonce||e.sceneNonce!==t.sceneNonce||e.scale!==t.scale||e.elementsMap!==t.elementsMap||e.visibleElements!==t.visibleElements||e.selectedElements!==t.selectedElements?!1:Gt(N5(e.appState),N5(t.appState)),vY=Z.memo(gY,bY),xY=e=>{let t=S.useRef(null),n=S.useRef(!1);return S.useEffect(()=>{let a=t.current;if(!a)return;let i=e.canvas;n.current||(n.current=!0,a.replaceChildren(i),i.classList.add("excalidraw__canvas","static"));let r=`${e.appState.width}px`,s=`${e.appState.height}px`;i.style.width!==r&&(i.style.width=r),i.style.height!==s&&(i.style.height=s);let l=e.appState.width*e.scale,c=e.appState.height*e.scale;i.width!==l&&(i.width=l),i.height!==c&&(i.height=c),y3({canvas:i,rc:e.rc,scale:e.scale,elementsMap:e.elementsMap,allElementsMap:e.allElementsMap,visibleElements:e.visibleElements,appState:e.appState,renderConfig:e.renderConfig},kU())}),f.jsx("div",{className:"excalidraw__canvas-wrapper",ref:t})},O5=e=>({zoom:e.zoom,scrollX:e.scrollX,scrollY:e.scrollY,width:e.width,height:e.height,viewModeEnabled:e.viewModeEnabled,openDialog:e.openDialog,hoveredElementIds:e.hoveredElementIds,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,theme:e.theme,pendingImageElementId:e.pendingImageElementId,shouldCacheIgnoreZoom:e.shouldCacheIgnoreZoom,viewBackgroundColor:e.viewBackgroundColor,exportScale:e.exportScale,selectedElementsAreBeingDragged:e.selectedElementsAreBeingDragged,gridSize:e.gridSize,gridStep:e.gridStep,frameRendering:e.frameRendering,selectedElementIds:e.selectedElementIds,frameToHighlight:e.frameToHighlight,editingGroupId:e.editingGroupId,currentHoveredFontFamily:e.currentHoveredFontFamily,croppingElementId:e.croppingElementId}),yY=(e,t)=>e.sceneNonce!==t.sceneNonce||e.scale!==t.scale||e.elementsMap!==t.elementsMap||e.visibleElements!==t.visibleElements?!1:Gt(O5(e.appState),O5(t.appState))&&Gt(e.renderConfig,t.renderConfig),wY=Z.memo(xY,yY),$5=class{constructor(e){j(this,"scene"),j(this,"getRenderableElements",(()=>{let t=({elementsMap:a,zoom:i,offsetLeft:r,offsetTop:s,scrollX:l,scrollY:c,height:d,width:o})=>{let u=[];for(let h of a.values())du(h,o,d,{zoom:i,offsetLeft:r,offsetTop:s,scrollX:l,scrollY:c},a)&&u.push(h);return u},n=({elements:a,editingTextElement:i,newElementId:r,pendingImageElementId:s})=>{let l=Hn(new Map);for(let c of a)Le(c)&&s===c.id||r!==c.id&&(!i||i.type!=="text"||c.id!==i.id)&&l.set(c.id,c);return l};return xI(({zoom:a,offsetLeft:i,offsetTop:r,scrollX:s,scrollY:l,height:c,width:d,editingTextElement:o,newElementId:u,pendingImageElementId:h,sceneNonce:p})=>{let U=this.scene.getNonDeletedElements(),m=n({elements:U,editingTextElement:o,newElementId:u,pendingImageElementId:h}),g=t({elementsMap:m,zoom:a,offsetLeft:i,offsetTop:r,scrollX:s,scrollY:l,height:c,width:d});return{elementsMap:m,visibleElements:g}})})()),this.scene=e}destroy(){py.cancel(),x3.cancel(),this.getRenderableElements.clear()}},EY=({trails:e})=>{let t=S.useRef(null);return S.useEffect(()=>{if(t.current)for(let n of e)n.start(t.current);return()=>{for(let n of e)n.stop()}},e),f.jsx("div",{className:"SVGLayer",children:f.jsx("svg",{ref:t})})},SY=5,kY=(e,t,n)=>{let[a,i]=he(e,n),{x:r,y:s}=Nn({sceneX:a+e.width,sceneY:i},t),l=r-t.offsetLeft+10,c=s-t.offsetTop;return{x:l,y:c}},F5=({children:e,element:t,elementsMap:n})=>{let a=Uc();if(a.contextMenu||a.newElement||a.resizingElement||a.isRotating||a.openMenu||a.viewModeEnabled)return null;let{x:i,y:r}=kY(t,a,n);return f.jsx("div",{className:"excalidraw-canvas-buttons",style:{top:`${r}px`,left:`${i}px`,padding:SY},children:e})},CY="small",Vh=e=>f.jsxs("label",{className:te("ToolIcon ToolIcon__MagicButton",`ToolIcon_size_${CY}`,{"is-mobile":e.isMobile}),title:`${e.title}`,children:[f.jsx("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title}),f.jsx("div",{className:"ToolIcon__icon",children:e.icon})]}),MY=({height:e,width:t,userToFollow:n,onDisconnect:a})=>f.jsx("div",{className:"follow-mode",style:{width:t,height:e},children:f.jsxs("div",{className:"follow-mode__badge",children:[f.jsxs("div",{className:"follow-mode__badge__label",children:["Following"," ",f.jsx("span",{className:"follow-mode__badge__username",title:n.username,children:n.username})]}),f.jsx("button",{type:"button",onClick:a,className:"follow-mode__disconnect-btn",children:hl})]})}),IY=MY,_Y=class{constructor(){j(this,"targets",new WeakMap),j(this,"rafIds",new WeakMap)}register(e,t){this.targets.set(e,{callback:t,stopped:!0})}start(e){let t=this.targets.get(e);t&&(this.rafIds.has(e)||(this.targets.set(e,{...t,stopped:!1}),this.scheduleFrame(e)))}stop(e){let t=this.targets.get(e);t&&!t.stopped&&this.targets.set(e,{...t,stopped:!0}),this.cancelFrame(e)}constructFrame(e){return t=>{let n=this.targets.get(e);if(!n)return;let a=this.onFrame(n,t);!n.stopped&&!a?this.scheduleFrame(e):this.cancelFrame(e)}}scheduleFrame(e){let t=requestAnimationFrame(this.constructFrame(e));this.rafIds.set(e,t)}cancelFrame(e){if(this.rafIds.has(e)){let t=this.rafIds.get(e);cancelAnimationFrame(t)}this.rafIds.delete(e)}onFrame(e,t){return e.callback(t)??!1}},S0=class{constructor(e,t,n){this.animationFrameHandler=e,this.app=t,this.options=n,j(this,"currentTrail"),j(this,"pastTrails",[]),j(this,"container"),j(this,"trailElement"),this.animationFrameHandler.register(this,this.onFrame.bind(this)),this.trailElement=document.createElementNS(Ae,"path")}get hasCurrentTrail(){return!!this.currentTrail}hasLastPoint(e,t){if(this.currentTrail){let n=this.currentTrail.originalPoints.length;return this.currentTrail.originalPoints[n-1][0]===e&&this.currentTrail.originalPoints[n-1][1]===t}return!1}start(e){e&&(this.container=e),this.trailElement.parentNode!==this.container&&this.container&&this.container.appendChild(this.trailElement),this.animationFrameHandler.start(this)}stop(){this.animationFrameHandler.stop(this),this.trailElement.parentNode===this.container&&this.container?.removeChild(this.trailElement)}startPath(e,t){this.currentTrail=new pu(this.options),this.currentTrail.addPoint([e,t,performance.now()]),this.update()}addPointToPath(e,t){this.currentTrail&&(this.currentTrail.addPoint([e,t,performance.now()]),this.update())}endPath(){this.currentTrail&&(this.currentTrail.close(),this.currentTrail.options.keepHead=!1,this.pastTrails.push(this.currentTrail),this.currentTrail=void 0,this.update())}update(){this.start()}onFrame(){let e=[];for(let n of this.pastTrails)e.push(this.drawTrail(n,this.app.state));if(this.currentTrail){let n=this.drawTrail(this.currentTrail,this.app.state);e.push(n)}this.pastTrails=this.pastTrails.filter(n=>n.getStrokeOutline().length!==0),e.length===0&&this.stop();let t=e.join(" ").trim();this.trailElement.setAttribute("d",t),this.trailElement.setAttribute("fill",(this.options.fill??(()=>"black"))(this))}drawTrail(e,t){let n=e.getStrokeOutline(e.options.size/t.zoom.value).map(([a,i])=>{let r=Nn({sceneX:a,sceneY:i},t);return[r.x,r.y]});return yI(n,!0)}},TY=class{constructor(e,t){this.animationFrameHandler=e,this.app=t,j(this,"localTrail"),j(this,"collabTrails",new Map),j(this,"container"),this.animationFrameHandler.register(this,this.onFrame.bind(this)),this.localTrail=new S0(e,t,{...this.getTrailOptions(),fill:()=>s8})}getTrailOptions(){return{simplify:0,streamline:.4,sizeMapping:e=>{let t=Math.max(0,1-(performance.now()-e.pressure)/1e3),n=(50-Math.min(50,e.totalLength-e.currentIndex))/50;return Math.min(Dr(n),Dr(t))}}}startPath(e,t){this.localTrail.startPath(e,t)}addPointToPath(e,t){this.localTrail.addPointToPath(e,t)}endPath(){this.localTrail.endPath()}start(e){this.container=e,this.animationFrameHandler.start(this),this.localTrail.start(e)}stop(){this.animationFrameHandler.stop(this),this.localTrail.stop()}onFrame(){this.updateCollabTrails()}updateCollabTrails(){if(!(!this.container||this.app.state.collaborators.size===0)){for(let[e,t]of this.app.state.collaborators.entries()){let n;this.collabTrails.has(e)?n=this.collabTrails.get(e):(n=new S0(this.animationFrameHandler,this.app,{...this.getTrailOptions(),fill:()=>t.pointer?.laserColor||yf(e,t)}),n.start(this.container),this.collabTrails.set(e,n)),t.pointer&&t.pointer.tool==="laser"&&(t.button==="down"&&!n.hasCurrentTrail&&n.startPath(t.pointer.x,t.pointer.y),t.button==="down"&&n.hasCurrentTrail&&!n.hasLastPoint(t.pointer.x,t.pointer.y)&&n.addPointToPath(t.pointer.x,t.pointer.y),t.button==="up"&&n.hasCurrentTrail&&(n.addPointToPath(t.pointer.x,t.pointer.y),n.endPath()))}for(let e of this.collabTrails.keys())this.app.state.collaborators.has(e)||(this.collabTrails.get(e).stop(),this.collabTrails.delete(e))}}},AY=(e,t,n,a,i,r)=>{let{zoom:s}=a,l=180*n/Math.PI,c=e*(s.value-1)/2,d=t*(s.value-1)/2;return e>i&&s.value!==1&&(c=i*(s.value-1)/2),t>r&&s.value!==1&&(d=r*(s.value-1)/2),`translate(${c}px, ${d}px) scale(${s.value}) rotate(${l}deg)`},jY=({id:e,onChange:t,onSubmit:n,getViewportCoords:a,element:i,canvas:r,excalidrawContainer:s,app:l,autoSelect:c=!0})=>{let d=(P,O)=>{if(!O.style.fontFamily||!O.style.fontSize)return!1;let N=O.style.fontFamily.replace(/"/g,"");return Gs({fontFamily:P.fontFamily})!==N||`${P.fontSize}px`!==O.style.fontSize},o=()=>{let P=l.state,O=xi.getScene(i)?.getElement(e);if(!O)return;let{textAlign:N,verticalAlign:X}=O,H=l.scene.getNonDeletedElementsMap();if(O&&q(O)){let G=O.x,se=O.y,le=Ht(O,l.scene.getNonDeletedElementsMap()),Ie=O.width,Qe=O.height,rt=O.width,at=O.height;if(le&&O.containerId){if(xe(le)){let _i=J.getBoundTextElementPosition(le,O,H);G=_i.x,se=_i.y}let gc=d(O,u),gl;if(gc?gl=nu(le.id,le.height):(gl=tl[le.id],gl||(gl=nu(le.id,le.height))),rt=vi(le,O),at=ef(le,O),!xe(le)&&Qe>at){let _i=Qr(Qe,le.type);V(le,{height:_i});return}else if(!xe(le)&&le.height>gl.height&&Qe<at){let _i=Qr(Qe,le.type);V(le,{height:_i})}else{let{y:_i}=Qu(le,O,H);se=_i}}let[de,me]=a(G,se),Be=u.selectionStart,ye=u.selectionEnd,je=u.value.length;if(Be===ye&&ye!==je){let gc=je-ye;u.selectionStart=u.value.length-gc,u.selectionEnd=u.value.length-gc}le?Ie+=.5:(rt=(P.width-8-de)/P.zoom.value,Ie=Math.min(Ie,rt)),Qe*=1.05;let kt=Xe(O),pr=(P.height-me)/P.zoom.value;Object.assign(u.style,{font:kt,lineHeight:O.lineHeight,width:`${Ie}px`,height:`${Qe}px`,left:`${de}px`,top:`${me}px`,transform:AY(Ie,Qe,nN(O,le),P,rt,pr),textAlign:N,verticalAlign:X,color:O.strokeColor,opacity:O.opacity/100,filter:"var(--theme-filter)",maxHeight:`${pr}px`}),u.scrollTop=0,Ui()&&(u.style.fontFamily=Gs(O)),V(O,{x:G,y:se})}},u=document.createElement("textarea");u.dir="auto",u.tabIndex=0,u.dataset.type="wysiwyg",u.wrap="off",u.classList.add("excalidraw-wysiwyg");let h="pre",p="normal";(nt(i)||!i.autoResize)&&(h="pre-wrap",p="break-word"),Object.assign(u.style,{position:"absolute",display:"inline-block",minHeight:"1em",backfaceVisibility:"hidden",margin:0,padding:0,border:0,outline:0,resize:"none",background:"transparent",overflow:"hidden",zIndex:"var(--zIndex-wysiwyg)",wordBreak:p,whiteSpace:h,overflowWrap:"break-word",boxSizing:"content-box"}),u.value=i.originalText,o(),t&&(u.onpaste=async P=>{let O=await j3(P,!0);if(!O.text)return;let N=Zs(O.text);if(!N)return;let X=Ht(i,l.scene.getNonDeletedElementsMap()),H=Xe({fontSize:l.state.currentItemFontSize,fontFamily:l.state.currentItemFontFamily});if(X){let G=ge(X,l.scene.getNonDeletedElementsMap()),se=rs(`${u.value}${N}`,H,vi(X,G)),le=K0(se,H);u.style.width=`${le}px`}},u.oninput=()=>{let P=Zs(u.value);if(u.value!==P){let O=u.selectionStart;u.value=P,u.selectionStart=O,u.selectionEnd=O}t(u.value)}),u.onkeydown=P=>{if(!P.shiftKey&&F6.keyTest(P))P.preventDefault(),l.actionManager.executeAction(F6),o();else if(!P.shiftKey&&z6.keyTest(P))P.preventDefault(),l.actionManager.executeAction(z6),o();else if(!P.shiftKey&&B6.keyTest(P))P.preventDefault(),l.actionManager.executeAction(B6),o();else if(N6.keyTest(P))l.actionManager.executeAction(N6);else if(O6.keyTest(P))l.actionManager.executeAction(O6);else if(P.key===R.ESCAPE)P.preventDefault(),w=!0,k();else if(P.key===R.ENTER&&P[R.CTRL_OR_CMD]){if(P.preventDefault(),P.isComposing||P.keyCode===229)return;w=!0,k()}else if(P.key===R.TAB||P[R.CTRL_OR_CMD]&&(P.code===Te.BRACKET_LEFT||P.code===Te.BRACKET_RIGHT)){if(P.preventDefault(),P.isComposing)return;P.shiftKey||P.code===Te.BRACKET_LEFT?x():b(),u.dispatchEvent(new Event("input"))}};let U=4,m=" ".repeat(U),g=new RegExp(`^ {1,${U}}`),b=()=>{let{selectionStart:P,selectionEnd:O}=u,N=v(),X=u.value;N.forEach(H=>{let G=X.slice(0,H),se=X.slice(H);X=`${G}${m}${se}`}),u.value=X,u.selectionStart=P+U,u.selectionEnd=O+U*N.length},x=()=>{let{selectionStart:P,selectionEnd:O}=u,N=v(),X=[],H=u.value;N.forEach(G=>{let se=H.slice(G,G+U).match(g);if(se){let le=H.slice(0,G),Ie=H.slice(G+se[0].length);H=`${le}${Ie}`,X.push(G)}}),u.value=H,X.length&&(P>X[X.length-1]?u.selectionStart=Math.max(P-U,X[X.length-1]):u.selectionStart=P,u.selectionEnd=Math.max(u.selectionStart,O-U*X.length))},v=()=>{let{selectionStart:P,selectionEnd:O,value:N}=u,X=N.slice(0,P).match(/[^\n]*$/)[0].length;return P=P-X,N.slice(P,O).split(`
|
|
105
|
-
`).reduce((H,G,se,le)=>H.concat(se?H[se-1]+le[se-1].length+1:P),[]).reverse()},y=P=>{P.target instanceof HTMLCanvasElement&&(P.preventDefault(),P.stopPropagation())},w=!1,k=()=>{if(L)return;L=!0,C();let P=xi.getScene(i)?.getElement(i.id);if(!P)return;let O=Ht(P,l.scene.getNonDeletedElementsMap());if(O){if(u.value.trim()){let N=bi(O);!N||N!==i.id?V(O,{boundElements:(O.boundElements||[]).concat({type:"text",id:i.id})}):xe(O)&&dc(O)}else V(O,{boundElements:O.boundElements?.filter(N=>!q(N))});on(P,O,l.scene.getNonDeletedElementsMap())}n({viaKeyboard:w,nextOriginalText:u.value})},C=()=>{u.onblur=null,u.oninput=null,u.onkeydown=null,F&&F.disconnect(),window.removeEventListener("resize",o),window.removeEventListener("wheel",y,!0),window.removeEventListener("pointerdown",_),window.removeEventListener("pointerup",I),window.removeEventListener("blur",k),window.removeEventListener("beforeunload",k),T(),D(),u.remove()},I=P=>{window.removeEventListener("pointerup",I);let O=P?.target,N=O instanceof HTMLElement&&O.classList.contains("properties-trigger");setTimeout(()=>{u.onblur=k,N||u.focus()})},A=()=>{u.onblur=null,window.addEventListener("pointerup",I),window.addEventListener("blur",k)},_=P=>{let O=P?.target;if(P.button===Li.WHEEL){O instanceof HTMLTextAreaElement&&(P.preventDefault(),l.handleCanvasPanUsingWheelOrSpaceDrag(P)),A();return}let N=O instanceof HTMLElement&&O.classList.contains("properties-trigger");(P.target instanceof HTMLElement||P.target instanceof SVGElement)&&P.target.closest(`.${Xs.SHAPE_ACTIONS_MENU}, .${Xs.ZOOM_ACTIONS}`)&&!Er(P.target)||N?A():P.target instanceof HTMLCanvasElement&&!Ui()&&requestAnimationFrame(()=>{k()})},T=l.scene.onUpdate(()=>{o(),document.activeElement?.closest(".properties-content")||u.focus()}),D=l.onScrollChangeEmitter.on(()=>{o()}),L=!1;c&&u.select(),I();let F=null;r&&"ResizeObserver"in window?(F=new window.ResizeObserver(()=>{o()}),F.observe(r)):window.addEventListener("resize",o),u.onpointerdown=P=>P.stopPropagation(),requestAnimationFrame(()=>{window.addEventListener("pointerdown",_,{capture:!0})}),window.addEventListener("beforeunload",k),s?.querySelector(".excalidraw-textEditorContainer").appendChild(u)},RY=Y({name:"autoResize",label:"labels.autoResize",icon:null,trackEvent:{category:"element"},predicate:(e,t,n,a)=>{let i=ve(e,t);return i.length===1&&q(i[0])&&!i[0].autoResize},perform:(e,t,n,a)=>{let i=ve(e,t);return{appState:t,elements:e.map(r=>{if(r.id===i[0].id&&q(r)){let s=an(r.originalText,Xe(r),r.lineHeight);return pe(r,{autoResize:!0,width:s.width,height:s.height,text:r.originalText})}return r}),captureUpdate:B.IMMEDIATELY}}}),DY=e=>{let t=["flowchart","graph","sequenceDiagram","classDiagram","stateDiagram","stateDiagram-v2","erDiagram","journey","gantt","pie","quadrantChart","requirementDiagram","gitGraph","C4Context","mindmap","timeline","zenuml","sankey","xychart","block"];return new RegExp(`^(?:%%{.*?}%%[\\s\\n]*)?\\b(?:${t.map(n=>`\\s*${n}(-beta)?`).join("|")})\\b`).test(e.trim())},Uy=({canvas:e,rc:t,newElement:n,elementsMap:a,allElementsMap:i,scale:r,appState:s,renderConfig:l})=>{if(e){let[c,d]=wp(e,r),o=Ep({canvas:e,scale:r,normalizedWidth:c,normalizedHeight:d});o.save(),o.scale(s.zoom.value,s.zoom.value),n&&n.type!=="selection"?wr(n,a,i,t,o,l,s):o.clearRect(0,0,c,d)}},LY=Nu(e=>{Uy(e)},{trailing:!0}),PY=(e,t)=>{if(t){LY(e);return}Uy(e)},NY=e=>{let t=S.useRef(null);return S.useEffect(()=>{t.current&&PY({canvas:t.current,scale:e.scale,newElement:e.appState.newElement,elementsMap:e.elementsMap,allElementsMap:e.allElementsMap,rc:e.rc,renderConfig:e.renderConfig,appState:e.appState},kU())}),f.jsx("canvas",{className:"excalidraw__canvas",style:{width:e.appState.width,height:e.appState.height},width:e.appState.width*e.scale,height:e.appState.height*e.scale,ref:t})},OY=NY,my=Z.createContext(null),gy=Z.createContext(null),by={viewport:{isMobile:!1,isLandscape:!1},editor:{isMobile:!1,canFitSidebar:!1},isTouchScreen:!1},CU=Z.createContext(by);CU.displayName="DeviceContext";var MU=Z.createContext({container:null,id:null});MU.displayName="ExcalidrawContainerContext";var IU=Z.createContext([]);IU.displayName="ExcalidrawElementsContext";var _U=Z.createContext({...za(),width:0,height:0,offsetLeft:0,offsetTop:0});_U.displayName="ExcalidrawAppStateContext";var TU=Z.createContext(()=>{console.warn("Uninitialized ExcalidrawSetAppStateContext context!")});TU.displayName="ExcalidrawSetAppStateContext";var AU=Z.createContext(null);AU.displayName="ExcalidrawActionManagerContext";var va=()=>S.useContext(my),pc=()=>S.useContext(gy),Tt=()=>S.useContext(CU),Ka=()=>S.useContext(MU),Sf=()=>S.useContext(IU),Uc=()=>S.useContext(_U),At=()=>S.useContext(TU),En=()=>S.useContext(AU),Dl=!1,Gh=0,gr=!1,Ll=!1,Yh=!1,Zh={horizontal:null,vertical:null},Ri=0,Pl=!1,Kh=new Map,Vc=!1,z5=0,B5=!1,Nl=null,Re={pointers:new Map,lastCenter:null,initialDistance:null,initialScale:null},$Y=class vy extends Z.Component{constructor(t){super(t),j(this,"canvas"),j(this,"interactiveCanvas",null),j(this,"rc"),j(this,"unmounted",!1),j(this,"actionManager"),j(this,"device",by),j(this,"excalidrawContainerRef",Z.createRef()),j(this,"scene"),j(this,"fonts"),j(this,"renderer"),j(this,"visibleElements"),j(this,"resizeObserver"),j(this,"nearestScrollableContainer"),j(this,"library"),j(this,"libraryItemsFromStorage"),j(this,"id"),j(this,"store"),j(this,"history"),j(this,"excalidrawContainerValue"),j(this,"files",{}),j(this,"imageCache",new Map),j(this,"iFrameRefs",new Map),j(this,"embedsValidationStatus",new Map),j(this,"initializedEmbeds",new Set),j(this,"elementsPendingErasure",new Set),j(this,"flowChartCreator",new iV),j(this,"flowChartNavigator",new aV),j(this,"hitLinkElement"),j(this,"lastPointerDownEvent",null),j(this,"lastPointerUpEvent",null),j(this,"lastPointerMoveEvent",null),j(this,"lastPointerMoveCoords",null),j(this,"lastViewportPosition",{x:0,y:0}),j(this,"animationFrameHandler",new _Y),j(this,"laserTrails",new TY(this.animationFrameHandler,this)),j(this,"eraserTrail",new S0(this.animationFrameHandler,this,{streamline:.2,size:5,keepHead:!0,sizeMapping:o=>{let u=Math.max(0,1-(performance.now()-o.pressure)/200),h=(10-Math.min(10,o.totalLength-o.currentIndex))/10;return Math.min(Dr(h),Dr(u))},fill:()=>this.state.theme===Ce.LIGHT?"rgba(0, 0, 0, 0.2)":"rgba(255, 255, 255, 0.2)"})),j(this,"onChangeEmitter",new Ia),j(this,"onPointerDownEmitter",new Ia),j(this,"onPointerUpEmitter",new Ia),j(this,"onUserFollowEmitter",new Ia),j(this,"onScrollChangeEmitter",new Ia),j(this,"missingPointerEventCleanupEmitter",new Ia),j(this,"onRemoveEventListenersEmitter",new Ia),j(this,"getEffectiveGridSize",()=>No(this)?this.state.gridSize:null),j(this,"updateEmbedValidationStatus",(o,u)=>{this.embedsValidationStatus.set(o.id,u),ut.delete(o)}),j(this,"updateEmbeddables",()=>{let o=new Set,u=!1;this.scene.getNonDeletedElements().filter(h=>{if(Un(h)){if(o.add(h.id),!this.embedsValidationStatus.has(h.id)){u=!0;let p=hd(h.link,this.props.validateEmbeddable);this.updateEmbedValidationStatus(h,p)}}else $i(h)&&o.add(h.id);return!1}),u&&this.scene.triggerUpdate(),this.iFrameRefs.forEach((h,p)=>{o.has(p)||this.iFrameRefs.delete(p)})}),j(this,"getFrameNameDOMId",o=>`${this.id}-frame-name-${o.id}`),j(this,"frameNameBoundsCache",{get:o=>{let u=this.frameNameBoundsCache._cache.get(o.id);if(!u||u.zoom!==this.state.zoom.value||u.versionNonce!==o.versionNonce){let h=document.getElementById(this.getFrameNameDOMId(o));if(h){let p=h.getBoundingClientRect(),U=Ge({clientX:p.x,clientY:p.y},this.state),m=Ge({clientX:p.right,clientY:p.bottom},this.state);return u={x:U.x,y:U.y,width:m.x-U.x,height:m.y-U.y,angle:0,zoom:this.state.zoom.value,versionNonce:o.versionNonce},this.frameNameBoundsCache._cache.set(o.id,u),u}return null}return u},_cache:new Map}),j(this,"resetEditingFrame",o=>{o&&V(o,{name:o.name?.trim()||null}),this.setState({editingFrame:null})}),j(this,"renderFrameNames",()=>{if(!this.state.frameRendering.enabled||!this.state.frameRendering.name)return this.state.editingFrame&&this.resetEditingFrame(null),null;let o=this.state.theme===Ce.DARK;return this.scene.getNonDeletedFramesLikes().map(u=>{if(!du(u,this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap()))return this.state.editingFrame===u.id&&this.resetEditingFrame(u),null;let{x:h,y:p}=Nn({sceneX:u.x,sceneY:u.y},this.state),U=6,m,g=B3(u);if(u.id===this.state.editingFrame){let b=g;m=f.jsx("input",{autoFocus:!0,value:b,onChange:x=>{V(u,{name:x.target.value})},onFocus:x=>x.target.select(),onBlur:()=>this.resetEditingFrame(u),onKeyDown:x=>{(x.key===R.ESCAPE||x.key===R.ENTER)&&this.resetEditingFrame(u)},style:{background:this.state.viewBackgroundColor,filter:o?H0:"none",zIndex:2,border:"none",display:"block",padding:`${U}px`,borderRadius:4,boxShadow:"inset 0 0 0 1px var(--color-primary)",fontFamily:"Assistant",fontSize:"14px",transform:`translate(-${U}px, ${U}px)`,color:"var(--color-gray-80)",overflow:"hidden",maxWidth:`${document.body.clientWidth-h-U}px`},size:b.length+1||1,dir:"auto",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off"})}else m=g;return f.jsx("div",{id:this.getFrameNameDOMId(u),style:{position:"absolute",bottom:`${this.state.height+ct.nameOffsetY-p+this.state.offsetTop}px`,left:`${h-this.state.offsetLeft}px`,zIndex:2,fontSize:ct.nameFontSize,color:o?ct.nameColorDarkTheme:ct.nameColorLightTheme,lineHeight:ct.nameLineHeight,width:"max-content",maxWidth:`${u.width}px`,overflow:u.id===this.state.editingFrame?"visible":"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:Fe.MOVE,pointerEvents:this.state.viewModeEnabled?fs.disabled:fs.enabled},onPointerDown:b=>this.handleCanvasPointerDown(b),onWheel:b=>this.handleWheel(b),onContextMenu:this.handleCanvasContextMenu,onDoubleClick:()=>{this.setState({editingFrame:u.id})},children:m},u.id)})}),j(this,"focusContainer",()=>{this.excalidrawContainerRef.current?.focus()}),j(this,"getSceneElementsIncludingDeleted",()=>this.scene.getElementsIncludingDeleted()),j(this,"getSceneElements",()=>this.scene.getNonDeletedElements()),j(this,"onInsertElements",o=>{this.addElementsFromPasteOrLibrary({elements:o,position:"center",files:null})}),j(this,"onExportImage",async(o,u,h)=>{qe("export",o,"ui");let p=await xf(o,u,this.state,this.files,{exportBackground:this.state.exportBackground,name:this.getName(),viewBackgroundColor:this.state.viewBackgroundColor,exportingFrame:h.exportingFrame}).catch(y8).catch(U=>{console.error(U),this.setState({errorMessage:U.message})});this.state.exportEmbedScene&&p&&Yp(p)&&this.setState({fileHandle:p})}),j(this,"magicGenerations",new Map),j(this,"updateMagicGeneration",({frameElement:o,data:u})=>{u.status==="pending"?V(o,{customData:{generationData:void 0}},!1):V(o,{customData:{generationData:u}},!1),this.magicGenerations.set(o.id,u),this.triggerRender()}),j(this,"plugins",{}),j(this,"onMagicframeToolSelect",()=>{let o=this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds});if(o.length===0)this.setActiveTool({type:Dt.magicframe}),qe("ai","tool-select (empty-selection)","d2c");else{let u=o.length===1&&sd(o[0])&&o[0];if(!u&&o.some(p=>ce(p)||p.frameId)){this.setActiveTool({type:Dt.magicframe});return}qe("ai","tool-select (existing selection)","d2c");let h;if(u)h=u;else{let[p,U,m,g]=Ne(o),b=50;h=P1({...ct,x:p-b,y:U-b,width:m-p+b*2,height:g-U+b*2,opacity:100,locked:!1}),this.scene.insertElement(h);for(let x of o)V(x,{frameId:h.id});this.setState({selectedElementIds:{[h.id]:!0}})}this.onMagicFrameGenerate(h,"upstream")}}),j(this,"openEyeDropper",({type:o})=>{sa.set(mf,{swapPreviewOnAlt:!0,colorPickerType:o==="stroke"?"elementStroke":"elementBackground",onSelect:(u,h)=>{let p=o==="background"&&h.altKey||o==="stroke"&&!h.altKey;!this.scene.getSelectedElements(this.state).length||this.state.activeTool.type!=="selection"?p?this.syncActionResult({appState:{...this.state,currentItemStrokeColor:u},captureUpdate:B.IMMEDIATELY}):this.syncActionResult({appState:{...this.state,currentItemBackgroundColor:u},captureUpdate:B.IMMEDIATELY}):this.updateScene({elements:this.scene.getElementsIncludingDeleted().map(U=>this.state.selectedElementIds[U.id]?pe(U,{[p?"strokeColor":"backgroundColor"]:u}):U),captureUpdate:B.IMMEDIATELY})},keepOpenOnAlt:!1})}),j(this,"dismissLinearEditor",()=>{setTimeout(()=>{this.setState({editingLinearElement:null})})}),j(this,"syncActionResult",ft(o=>{if(this.unmounted||o===!1)return;o.captureUpdate===B.NEVER?this.store.shouldUpdateSnapshot():o.captureUpdate===B.IMMEDIATELY&&this.store.shouldCaptureIncrement();let u=!1,h=null;if(o.elements&&(this.scene.replaceAllElements(o.elements),u=!0),o.files&&(this.addMissingFiles(o.files,o.replaceFiles),this.addNewImagesToImageCache()),o.appState||h||this.state.contextMenu){let p=o?.appState?.viewModeEnabled||!1,U=o?.appState?.zenModeEnabled||!1,m=o?.appState?.theme||this.props.theme||Ce.LIGHT,g=o?.appState?.name??this.state.name,b=o?.appState?.errorMessage??this.state.errorMessage;typeof this.props.viewModeEnabled<"u"&&(p=this.props.viewModeEnabled),typeof this.props.zenModeEnabled<"u"&&(U=this.props.zenModeEnabled),h=o.appState?.editingTextElement||null,o.elements&&h&&o.elements.forEach(x=>{h?.id===x.id&&h!==x&&V1(x)&&q(x)&&(h=x)}),h?.isDeleted&&(h=null),this.setState(x=>{let v=o.appState||{};return{...x,...v,contextMenu:null,editingTextElement:h,viewModeEnabled:p,zenModeEnabled:U,theme:m,name:g,errorMessage:b}}),u=!0}!u&&o.captureUpdate!==B.EVENTUALLY&&this.scene.triggerUpdate()})),j(this,"onBlur",ft(()=>{gr=!1,this.setState({isBindingEnabled:!0})})),j(this,"onUnload",()=>{this.onBlur()}),j(this,"disableEvent",o=>{o.preventDefault()}),j(this,"resetHistory",()=>{this.history.clear()}),j(this,"resetStore",()=>{this.store.clear()}),j(this,"resetScene",ft(o=>{this.scene.replaceAllElements([]),this.setState(u=>({...za(),isLoading:o?.resetLoadingState?!1:u.isLoading,theme:this.state.theme})),this.resetStore(),this.resetHistory()})),j(this,"initializeScene",async()=>{"launchQueue"in window&&"LaunchParams"in window&&window.launchQueue.setConsumer(async h=>{if(!h.files.length)return;let p=h.files[0],U=await p.getFile();this.loadFileToCanvas(new File([U],U.name||"",{type:U.type}),p)}),this.props.theme&&this.setState({theme:this.props.theme}),this.state.isLoading||this.setState({isLoading:!0});let o=null;try{typeof this.props.initialData=="function"?o=await this.props.initialData()||null:o=await this.props.initialData||null,o?.libraryItems&&this.library.updateLibrary({libraryItems:o.libraryItems,merge:!0}).catch(h=>{console.error(h)})}catch(h){console.error(h),o={appState:{errorMessage:h.message||"Encountered an error during importing or restoring scene data"}}}let u=sc(o,null,null,{repairBindings:!0});u.appState={...u.appState,theme:this.props.theme||u.appState.theme,openSidebar:u.appState?.openSidebar||this.state.openSidebar,activeTool:u.appState.activeTool.type==="image"?{...u.appState.activeTool,type:"selection"}:u.appState.activeTool,isLoading:!1,toast:this.state.toast},o?.scrollToContent&&(u.appState={...u.appState,...Lo(u.elements,{...u.appState,width:this.state.width,height:this.state.height,offsetTop:this.state.offsetTop,offsetLeft:this.state.offsetLeft})}),this.resetStore(),this.resetHistory(),this.syncActionResult({...u,captureUpdate:B.NEVER}),this.clearImageShapeCache(),this.fonts.loadSceneFonts().then(h=>{this.fonts.onLoaded(h)}),Ns(window.location.href)&&this.scrollToContent(window.location.href,{animate:!1})}),j(this,"isMobileBreakpoint",(o,u)=>o<DM||u<PM&&o<LM),j(this,"refreshViewportBreakpoints",()=>{if(!this.excalidrawContainerRef.current)return;let{clientWidth:o,clientHeight:u}=document.body,h=this.device.viewport,p=id(h,{isLandscape:o>u,isMobile:this.isMobileBreakpoint(o,u)});return h!==p?(this.device={...this.device,viewport:p},!0):!1}),j(this,"refreshEditorBreakpoints",()=>{let o=this.excalidrawContainerRef.current;if(!o)return;let{width:u,height:h}=o.getBoundingClientRect(),p=this.props.UIOptions.dockedSidebarBreakpoint!=null?this.props.UIOptions.dockedSidebarBreakpoint:NM,U=this.device.editor,m=id(U,{isMobile:this.isMobileBreakpoint(u,h),canFitSidebar:u>p});return U!==m?(this.device={...this.device,editor:m},!0):!1}),j(this,"onResize",ft(()=>{this.scene.getElementsIncludingDeleted().forEach(o=>ut.delete(o)),this.refreshViewportBreakpoints(),this.updateDOMRect(),p1||this.refreshEditorBreakpoints(),this.setState({})})),j(this,"onFullscreenChange",()=>{!document.fullscreenElement&&this.state.activeEmbeddable?.state==="active"&&this.setState({activeEmbeddable:null})}),j(this,"renderInteractiveSceneCallback",({atLeastOneVisibleElement:o,scrollBars:u,elementsMap:h})=>{u&&(Zh=u);let p=this.state.editingTextElement?!1:!o&&h.size>0;this.state.scrolledOutside!==p&&this.setState({scrolledOutside:p}),this.scheduleImageRefresh()}),j(this,"onScroll",Ys(()=>{let{offsetTop:o,offsetLeft:u}=this.getCanvasOffsets();this.setState(h=>h.offsetLeft===u&&h.offsetTop===o?null:{offsetTop:o,offsetLeft:u})},jM)),j(this,"onCut",ft(o=>{!this.excalidrawContainerRef.current?.contains(document.activeElement)||Er(o.target)||(this.actionManager.executeAction(Y6,"keyboard",o),o.preventDefault(),o.stopPropagation())})),j(this,"onCopy",ft(o=>{!this.excalidrawContainerRef.current?.contains(document.activeElement)||Er(o.target)||(this.actionManager.executeAction(wd,"keyboard",o),o.preventDefault(),o.stopPropagation())})),j(this,"onTouchStart",o=>{if(r8&&o.preventDefault(),!Dl){Dl=!0,clearTimeout(Gh),Gh=window.setTimeout(vy.resetTapTwice,TM);return}if(Dl&&o.touches.length===1){let u=o.touches[0];this.handleCanvasDoubleClick({clientX:u.clientX,clientY:u.clientY}),Dl=!1,clearTimeout(Gh)}o.touches.length===2&&this.setState({selectedElementIds:De({},this.state),activeEmbeddable:null})}),j(this,"onTouchEnd",o=>{this.resetContextMenuTimer(),o.touches.length>0?this.setState({previousSelectedElementIds:{},selectedElementIds:De(this.state.previousSelectedElementIds,this.state)}):Re.pointers.clear()}),j(this,"pasteFromClipboard",ft(async o=>{let u=!!Vc,h=document.activeElement,p=this.excalidrawContainerRef.current?.contains(h);if(o&&!p)return;let U=document.elementFromPoint(this.lastViewportPosition.x,this.lastViewportPosition.y);if(o&&(!(U instanceof HTMLCanvasElement)||Er(h)))return;let{x:m,y:g}=Ge({clientX:this.lastViewportPosition.x,clientY:this.lastViewportPosition.y},this.state),b=o?.clipboardData?.files[0],x=await j3(o,u);if(!b&&!u){if(x.mixedContent)return this.addElementsFromMixedContentPaste(x.mixedContent,{isPlainPaste:u,sceneX:m,sceneY:g});if(x.text){let v=x.text.trim();v.startsWith("<svg")&&v.endsWith("</svg>")&&(b=qg(v))}}if(Or(b)&&!x.spreadsheet){if(!this.isToolSupported("image")){this.setState({errorMessage:M("errors.imageToolNotSupported")});return}let v=this.createImageElement({sceneX:m,sceneY:g});this.insertImageElement(v,b),this.initializeImageDimensions(v),this.setState({selectedElementIds:De({[v.id]:!0},this.state)});return}if(this.props.onPaste)try{if(await this.props.onPaste(x,o)===!1)return}catch(v){console.error(v)}if(x.errorMessage)this.setState({errorMessage:x.errorMessage});else if(x.spreadsheet&&!u)this.setState({pasteDialog:{data:x.spreadsheet,shown:!0}});else if(x.elements){let v=x.programmaticAPI?Eu(x.elements):x.elements;this.addElementsFromPasteOrLibrary({elements:v,files:x.files||null,position:"cursor",retainSeed:u})}else if(x.text){if(x.text&&DY(x.text)){let w=await ne(()=>import("./index-CsJIZuMr.js").then(k=>k.b5),__vite__mapDeps([59,2,3]),import.meta.url);try{let{elements:k,files:C}=await w.parseMermaidToExcalidraw(x.text),I=Eu(k,{regenerateIds:!0});this.addElementsFromPasteOrLibrary({elements:I,files:C,position:"cursor"});return}catch(k){console.warn(`parsing pasted text as mermaid definition failed: ${k.message}`)}}let v=M8(x.text).split(/\n+/).map(w=>w.trim()).filter(Boolean),y=v.map(w=>_N(w)).filter(w=>hd(w,this.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(w)||As(w)?.type==="video"));if(!Vc&&y.length>0&&y.length===v.length){let w=[];for(let k of y){let C=w[w.length-1],I=this.insertEmbeddableElement({sceneX:C?C.x+C.width+20:m,sceneY:g,link:yn(k)});I&&w.push(I)}w.length&&this.setState({selectedElementIds:Object.fromEntries(w.map(k=>[k.id,!0]))});return}this.addTextFromPaste(x.text,u)}this.setActiveTool({type:"selection"}),o?.preventDefault()})),j(this,"addElementsFromPasteOrLibrary",o=>{let u=nf(o.elements,null,void 0),[h,p,U,m]=Ne(u),g=Jt(h,U)/2,b=Jt(p,m)/2,x=typeof o.position=="object"?o.position.clientX:o.position==="cursor"?this.lastViewportPosition.x:this.state.width/2+this.state.offsetLeft,v=typeof o.position=="object"?o.position.clientY:o.position==="cursor"?this.lastViewportPosition.y:this.state.height/2+this.state.offsetTop,{x:y,y:w}=Ge({clientX:x,clientY:v},this.state),k=y-g,C=w-b,[I,A]=Mt(k,C,this.getEffectiveGridSize()),_=i3(u.map(P=>pe(P,{x:P.x+I-h,y:P.y+A-p})),{randomizeSeed:!o.retainSeed}),T=this.scene.getElementsIncludingDeleted(),D=[...T,..._];D=this.props.onDuplicate?.(D,T)||D,Wa(D,oe(_));let L=this.getTopLayerFrameAtSceneCoords({x:y,y:w});if(L){let P=RO(_,L);lo(D,P,L,this.state)}this.scene.replaceAllElements(D),_.forEach(P=>{if(q(P)&&nt(P)){let O=Ht(P,this.scene.getElementsMapIncludingDeleted());on(P,O,this.scene.getElementsMapIncludingDeleted())}}),vM&&ui.loadElementsFonts(_).then(P=>{this.fonts.onLoaded(P)}),o.files&&this.addMissingFiles(o.files),this.store.shouldCaptureIncrement();let F=Fp(_);this.setState({...this.state,openSidebar:this.state.openSidebar&&this.device.editor.canFitSidebar&&sa.get(yU)?this.state.openSidebar:null,...ln({editingGroupId:null,selectedElementIds:F.reduce((P,O)=>(nt(O)||(P[O.id]=!0),P),{})},this.scene.getNonDeletedElements(),this.state,this)},()=>{o.files&&this.addNewImagesToImageCache()}),this.setActiveTool({type:"selection"}),o.fitToContent&&this.scrollToContent(_,{fitToContent:!0,canvasOffsets:this.getEditorUIOffsets()})}),j(this,"setAppState",(o,u)=>{this.setState(o,u)}),j(this,"removePointer",o=>{Ri&&this.resetContextMenuTimer(),Re.pointers.delete(o.pointerId)}),j(this,"toggleLock",(o="ui")=>{this.state.activeTool.locked||qe("toolbar","toggleLock",`${o} (${this.device.editor.isMobile?"mobile":"desktop"})`),this.setState(u=>({activeTool:{...u.activeTool,...Et(this.state,u.activeTool.locked?{type:"selection"}:u.activeTool),locked:!u.activeTool.locked}}))}),j(this,"updateFrameRendering",o=>{this.setState(u=>{let h=typeof o=="function"?o(u.frameRendering):o;return{frameRendering:{enabled:h?.enabled??u.frameRendering.enabled,clip:h?.clip??u.frameRendering.clip,name:h?.name??u.frameRendering.name,outline:h?.outline??u.frameRendering.outline}}})}),j(this,"togglePenMode",o=>{this.setState(u=>({penMode:o??!u.penMode,penDetected:!0}))}),j(this,"onHandToolToggle",()=>{this.actionManager.executeAction(zH)}),j(this,"zoomCanvas",o=>{this.setState({...jr({viewportX:this.state.width/2+this.state.offsetLeft,viewportY:this.state.height/2+this.state.offsetTop,nextZoom:ci(o)},this.state)})}),j(this,"cancelInProgressAnimation",null),j(this,"scrollToContent",(o=this.scene.getNonDeletedElements(),u)=>{if(typeof o=="string"){let g;if(Ns(o)?g=PN(o):g=o,g){let b=this.scene.getElementsFromId(g);b?.length?this.scrollToContent(b,{fitToContent:u?.fitToContent??!0,animate:u?.animate??!0}):Ns(o)&&this.setState({toast:{message:M("elementLink.notFound"),duration:3e3,closable:!0}})}return}this.cancelInProgressAnimation?.();let h=Array.isArray(o)?o:[o],p=this.state.zoom,U=this.state.scrollX,m=this.state.scrollY;if(u?.fitToContent||u?.fitToViewport){let{appState:g}=bf({canvasOffsets:u.canvasOffsets,targetElements:h,appState:this.state,fitToViewport:!!u?.fitToViewport,viewportZoomFactor:u?.viewportZoomFactor,minZoom:u?.minZoom,maxZoom:u?.maxZoom});p=g.zoom,U=g.scrollX,m=g.scrollY}else{let g=Lo(h,this.state);U=g.scrollX,m=g.scrollY}if(u?.animate){let g=this.state.scrollX,b=this.state.scrollY,x=this.state.zoom.value,v=lI({fromValues:{scrollX:g,scrollY:b,zoom:x},toValues:{scrollX:U,scrollY:m,zoom:p.value},interpolateValue:(y,w,k,C)=>{if(C==="zoom")return y*Math.pow(w/y,Dr(k))},onStep:({scrollX:y,scrollY:w,zoom:k})=>{this.setState({scrollX:y,scrollY:w,zoom:{value:k}})},onStart:()=>{this.setState({shouldCacheIgnoreZoom:!0})},onEnd:()=>{this.setState({shouldCacheIgnoreZoom:!1})},onCancel:()=>{this.setState({shouldCacheIgnoreZoom:!1})},duration:u?.duration??500});this.cancelInProgressAnimation=()=>{v(),this.cancelInProgressAnimation=null}}else this.setState({scrollX:U,scrollY:m,zoom:p})}),j(this,"maybeUnfollowRemoteUser",()=>{this.state.userToFollow&&this.setState({userToFollow:null})}),j(this,"translateCanvas",o=>{this.cancelInProgressAnimation?.(),this.maybeUnfollowRemoteUser(),this.setState(o)}),j(this,"setToast",o=>{this.setState({toast:o})}),j(this,"restoreFileFromShare",async()=>{try{let o=await caches.open("web-share-target"),u=await o.match("shared-file");if(u){let h=await u.blob(),p=new File([h],h.name||"",{type:h.type});this.loadFileToCanvas(p,null),await o.delete("shared-file"),window.history.replaceState(null,U1,window.location.pathname)}}catch(o){this.setState({errorMessage:o.message})}}),j(this,"addFiles",ft(o=>{let{addedFiles:u}=this.addMissingFiles(o);this.clearImageShapeCache(u),this.scene.triggerUpdate(),this.addNewImagesToImageCache()})),j(this,"addMissingFiles",(o,u=!1)=>{let h=u?{}:{...this.files},p={},U=Array.isArray(o)?o:Object.values(o);for(let m of U)if(!h[m.id]&&(p[m.id]=m,h[m.id]=m,m.mimeType===ae.svg))try{let g=r$(Eg(l$(m.dataURL)),ae.svg);m.dataURL!==g&&(m.version=(m.version??1)+1,m.dataURL=g)}catch(g){console.error(g)}return this.files=h,{addedFiles:p}}),j(this,"updateScene",ft(o=>{let u=Va(o.elements??[]);if(o.captureUpdate&&o.captureUpdate!==B.EVENTUALLY){let h=this.store.snapshot.appState,p=this.store.snapshot.elements,U=o.appState?Object.assign({},h,o.appState):h,m=o.elements?this.store.filterUncomittedElements(this.scene.getElementsMapIncludingDeleted(),oe(u)):p;o.captureUpdate===B.IMMEDIATELY?this.store.captureIncrement(m,U):o.captureUpdate===B.NEVER&&this.store.updateSnapshot(m,U)}o.appState&&this.setState(o.appState),o.elements&&this.scene.replaceAllElements(u),o.collaborators&&this.setState({collaborators:o.collaborators})})),j(this,"triggerRender",o=>{o===!0?this.scene.triggerUpdate():this.setState({})}),j(this,"toggleSidebar",({name:o,tab:u,force:h})=>{let p;h===void 0?p=this.state.openSidebar?.name===o&&this.state.openSidebar?.tab===u?null:o:p=h?o:null;let U=p?{name:p}:null;return U&&u&&(U.tab=u),this.setState({openSidebar:U}),!!p}),j(this,"updateCurrentCursorPosition",ft(o=>{this.lastViewportPosition.x=o.clientX,this.lastViewportPosition.y=o.clientY})),j(this,"getEditorUIOffsets",()=>{let o=this.excalidrawContainerRef?.current?.querySelector(".App-toolbar")?.getBoundingClientRect()?.bottom??0,u=this.excalidrawContainerRef?.current?.querySelector(".sidebar")?.getBoundingClientRect(),h=this.excalidrawContainerRef?.current?.querySelector(".App-menu__left")?.getBoundingClientRect(),p=16;return Bo().rtl?{top:o+p,right:Math.max(this.state.width-(h?.left??this.state.width),0)+p,bottom:p,left:Math.max(u?.right??0,0)+p}:{top:o+p,right:Math.max(this.state.width-(u?.left??this.state.width)+p,0),bottom:p,left:Math.max(h?.right??0,0)+p}}),j(this,"onKeyDown",ft(o=>{if("Proxy"in window&&(!o.shiftKey&&/^[A-Z]$/.test(o.key)||o.shiftKey&&/^[a-z]$/.test(o.key))&&(o=new Proxy(o,{get(U,m){let g=U[m];return typeof g=="function"?g.bind(U):m==="key"?o.shiftKey?U.key.toUpperCase():U.key.toLowerCase():g}})),!x1(o.target)){if((o.key===R.ESCAPE||o.key===R.ENTER)&&this.state.croppingElementId){this.finishImageCropping();return}let U=ve(this.scene.getNonDeletedElementsMap(),this.state);if(U.length===1&&Le(U[0])&&o.key===R.ENTER){this.startImageCropping(U[0]);return}if(o.key===R.ESCAPE&&this.flowChartCreator.isCreatingChart){this.flowChartCreator.clear(),this.triggerRender(!0);return}let m=Hl(o.key);if(o[R.CTRL_OR_CMD]&&m&&!o.shiftKey){o.preventDefault();let g=ve(this.scene.getNonDeletedElementsMap(),this.state);g.length===1&&$u(g[0])&&this.flowChartCreator.createNodes(g[0],this.scene.getNonDeletedElementsMap(),this.state,h5(o.key)),this.flowChartCreator.pendingNodes?.length&&!gd(this.flowChartCreator.pendingNodes,this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap(),this.getEditorUIOffsets())&&this.scrollToContent(this.flowChartCreator.pendingNodes,{animate:!0,duration:300,fitToContent:!0,canvasOffsets:this.getEditorUIOffsets()});return}if(o.altKey){let g=ve(this.scene.getNonDeletedElementsMap(),this.state);if(g.length===1&&m){o.preventDefault();let b=this.flowChartNavigator.exploreByDirection(g[0],this.scene.getNonDeletedElementsMap(),h5(o.key));if(b){this.setState(v=>({selectedElementIds:De({[b]:!0},v)}));let x=this.scene.getNonDeletedElementsMap().get(b);x&&!gd([x],this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap(),this.getEditorUIOffsets())&&this.scrollToContent(x,{animate:!0,duration:300,canvasOffsets:this.getEditorUIOffsets()})}return}}}if(o[R.CTRL_OR_CMD]&&o.key===R.P&&!o.shiftKey&&!o.altKey){this.setToast({message:M("commandPalette.shortcutHint",{shortcut:tn("commandPalette")})}),o.preventDefault();return}if(o[R.CTRL_OR_CMD]&&o.key.toLowerCase()===R.V&&(Vc=o.shiftKey,clearTimeout(z5),z5=window.setTimeout(()=>{Vc=!1},100)),o[R.CTRL_OR_CMD]&&Er(o.target)&&(o.code===Te.MINUS||o.code===Te.EQUAL)){o.preventDefault();return}if(Er(o.target)&&o.key!==R.ESCAPE||Hl(o.key)&&x1(o.target))return;if(o.key===R.QUESTION_MARK){this.setState({openDialog:{name:"help"}});return}else if(o.key.toLowerCase()===R.E&&o.shiftKey&&o[R.CTRL_OR_CMD]){o.preventDefault(),this.setState({openDialog:{name:"imageExport"}});return}if(o.key===R.PAGE_UP||o.key===R.PAGE_DOWN){let U=(o.shiftKey?this.state.width:this.state.height)/this.state.zoom.value;o.key===R.PAGE_DOWN&&(U=-U),o.shiftKey?this.translateCanvas(m=>({scrollX:m.scrollX+U})):this.translateCanvas(m=>({scrollY:m.scrollY+U}))}if(this.state.openDialog?.name==="elementLinkSelector"||this.actionManager.handleKeyDown(o)||this.state.viewModeEnabled)return;if(o[R.CTRL_OR_CMD]&&this.state.isBindingEnabled&&this.setState({isBindingEnabled:!1}),Hl(o.key)){let U=this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),m=U.find(Q),g=new Set;U.filter(Q).filter(y=>{let w=y.startBinding&&!U.some(C=>C.id===y.startBinding?.elementId),k=y.endBinding&&!U.some(C=>C.id===y.endBinding?.elementId);return w||k}).forEach(y=>g.add(y.id)),U=U.filter(y=>!g.has(y.id));let b=this.getEffectiveGridSize()&&(o.shiftKey?f2:this.getEffectiveGridSize())||(o.shiftKey?wM:f2),x=0,v=0;o.key===R.ARROW_LEFT?x=-b:o.key===R.ARROW_RIGHT?x=b:o.key===R.ARROW_UP?v=-b:o.key===R.ARROW_DOWN&&(v=b),U.forEach(y=>{V(y,{x:y.x+x,y:y.y+v},!1),xn(y,this.scene.getNonDeletedElementsMap(),{simultaneouslyUpdated:U})}),this.setState({suggestedBindings:hh(U.filter(y=>y.id!==m?.id||b!==0),this.scene.getNonDeletedElementsMap(),this.state.zoom)}),this.scene.triggerUpdate(),o.preventDefault()}else if(o.key===R.ENTER){let U=this.scene.getSelectedElements(this.state);if(U.length===1){let m=U[0];if(o[R.CTRL_OR_CMD])ue(m)&&(!this.state.editingLinearElement||this.state.editingLinearElement.elementId!==U[0].id)&&(this.store.shouldCaptureIncrement(),Q(m)||this.setState({editingLinearElement:new J(m)}));else if(q(m)||sN(m)){let g;q(m)||(g=m);let b=ph(m,this.state,this.scene.getNonDeletedElementsMap()),x=b.x,v=b.y;this.startTextEditing({sceneX:x,sceneY:v,container:g}),o.preventDefault();return}else ce(m)&&this.setState({editingFrame:m.id})}}else if(!o.ctrlKey&&!o.altKey&&!o.metaKey&&!this.state.newElement&&!this.state.selectionElement&&!this.state.selectedElementsAreBeingDragged){let U=jL(o.key);U?(this.state.activeTool.type!==U&&qe("toolbar",U,`keyboard (${this.device.editor.isMobile?"mobile":"desktop"})`),U==="arrow"&&this.state.activeTool.type==="arrow"&&this.setState(m=>({currentItemArrowType:m.currentItemArrowType===$t.sharp?$t.round:m.currentItemArrowType===$t.round?$t.elbow:$t.sharp})),this.setActiveTool({type:U}),o.stopPropagation()):o.key===R.Q&&(this.toggleLock("keyboard"),o.stopPropagation())}if(o.key===R.SPACE&&Re.pointers.size===0&&(gr=!0,He(this.interactiveCanvas,Fe.GRAB),o.preventDefault()),(o.key===R.G||o.key===R.S)&&!o.altKey&&!o[R.CTRL_OR_CMD]){let U=this.scene.getSelectedElements(this.state);if(this.state.activeTool.type==="selection"&&!U.length)return;o.key===R.G&&(qs(this.state.activeTool.type)||U.some(m=>qs(m.type)))&&(this.setState({openPopup:"elementBackground"}),o.stopPropagation()),o.key===R.S&&(this.setState({openPopup:"elementStroke"}),o.stopPropagation())}if(!o[R.CTRL_OR_CMD]&&o.shiftKey&&o.key.toLowerCase()===R.F){let U=this.scene.getSelectedElements(this.state);if(this.state.activeTool.type==="selection"&&!U.length)return;(this.state.activeTool.type==="text"||U.find(m=>q(m)||ge(m,this.scene.getNonDeletedElementsMap())))&&(o.preventDefault(),this.setState({openPopup:"fontFamily"}))}if(o.key===R.K&&!o.altKey&&!o[R.CTRL_OR_CMD]){this.state.activeTool.type==="laser"?this.setActiveTool({type:"selection"}):this.setActiveTool({type:"laser"});return}o[R.CTRL_OR_CMD]&&(o.key===R.BACKSPACE||o.key===R.DELETE)&&sa.set(wf,"clearCanvas");let u=o.key.toLocaleLowerCase(),h=u===R.S&&o.shiftKey,p=o.key===R.I||u===R.G&&o.shiftKey;(h||p)&&this.openEyeDropper({type:h?"stroke":"background"})})),j(this,"onKeyUp",ft(o=>{if(o.key===R.SPACE&&(this.state.viewModeEnabled||this.state.openDialog?.name==="elementLinkSelector"?He(this.interactiveCanvas,Fe.GRAB):this.state.activeTool.type==="selection"?Jn(this.interactiveCanvas):(Ca(this.interactiveCanvas,this.state),this.setState({selectedElementIds:De({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})),gr=!1),!o[R.CTRL_OR_CMD]&&!this.state.isBindingEnabled&&this.setState({isBindingEnabled:!0}),Hl(o.key)&&(eu(this.scene.getSelectedElements(this.state).filter(ue),this.scene.getNonDeletedElementsMap(),this.scene.getNonDeletedElements(),this.scene,Tr(this.state),this.state.selectedLinearElement?.selectedPointsIndices??[],this.state.zoom),this.setState({suggestedBindings:[]})),o.altKey||this.flowChartNavigator.isExploring&&(this.flowChartNavigator.clear(),this.syncActionResult({captureUpdate:B.IMMEDIATELY})),!o[R.CTRL_OR_CMD]&&this.flowChartCreator.isCreatingChart){this.flowChartCreator.pendingNodes?.length&&this.scene.insertElements(this.flowChartCreator.pendingNodes);let u=this.flowChartCreator.pendingNodes?.[0];u&&(this.setState(h=>({selectedElementIds:De({[u.id]:!0},h)})),gd([u],this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap(),this.getEditorUIOffsets())||this.scrollToContent(u,{animate:!0,duration:300,canvasOffsets:this.getEditorUIOffsets()})),this.flowChartCreator.clear(),this.syncActionResult({captureUpdate:B.IMMEDIATELY})}})),j(this,"isToolSupported",o=>this.props.UIOptions.tools?.[o]!==!1),j(this,"setActiveTool",o=>{if(!this.isToolSupported(o.type)){console.warn(`"${o.type}" tool is disabled via "UIOptions.canvasActions.tools.${o.type}"`);return}let u=Et(this.state,o);u.type==="hand"?He(this.interactiveCanvas,Fe.GRAB):gr||Ca(this.interactiveCanvas,{...this.state,activeTool:u}),rI(document.activeElement)&&this.focusContainer(),G0(u.type)||this.setState({suggestedBindings:[]}),u.type==="image"&&this.onImageAction({insertOnCanvasDirectly:(o.type==="image"&&o.insertOnCanvasDirectly)??!1}),this.setState(h=>{let p={snapLines:h.snapLines.length?[]:h.snapLines,originSnapOffset:null,activeEmbeddable:null};return u.type==="freedraw"&&this.store.shouldCaptureIncrement(),u.type!=="selection"?{...h,activeTool:u,selectedElementIds:De({},h),selectedGroupIds:De({},h),editingGroupId:null,multiElement:null,...p}:{...h,activeTool:u,...p}})}),j(this,"setOpenDialog",o=>{this.setState({openDialog:o})}),j(this,"setCursor",o=>{He(this.interactiveCanvas,o)}),j(this,"resetCursor",()=>{Jn(this.interactiveCanvas)}),j(this,"isTouchScreenMultiTouchGesture",()=>Re.pointers.size>=2),j(this,"getName",()=>this.state.name||this.props.name||`${M("labels.untitled")}-${x2()}`),j(this,"onGestureStart",ft(o=>{o.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({selectedElementIds:De({},this.state),activeEmbeddable:null}),Re.initialScale=this.state.zoom.value})),j(this,"onGestureChange",ft(o=>{if(o.preventDefault(),this.isTouchScreenMultiTouchGesture())return;let u=Re.initialScale;u&&this.setState(h=>({...jr({viewportX:this.lastViewportPosition.x,viewportY:this.lastViewportPosition.y,nextZoom:ci(u*o.scale)},h)}))})),j(this,"onGestureEnd",ft(o=>{o.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({previousSelectedElementIds:{},selectedElementIds:De(this.state.previousSelectedElementIds,this.state)}),Re.initialScale=null})),j(this,"startTextEditing",({sceneX:o,sceneY:u,insertAtParentCenter:h=!0,container:p,autoEdit:U=!0})=>{let m=!1,g=h&&this.getTextWysiwygSnappedToCenterPosition(o,u,this.state,p);p&&g&&(ge(p,this.scene.getNonDeletedElementsMap())||(m=!0));let b=null,x=this.scene.getSelectedElements(this.state);x.length===1?q(x[0])?b=x[0]:p?b=ge(x[0],this.scene.getNonDeletedElementsMap()):b=this.getTextElementAtPosition(o,u):b=this.getTextElementAtPosition(o,u);let v=b?.fontFamily||this.state.currentItemFontFamily,y=b?.lineHeight||qr(v),w=this.state.currentItemFontSize;if(!b&&m&&p&&!xe(p)){let I=R8(Xe({fontSize:w,fontFamily:v}),y),A=D8(w,y),_=Math.max(p.height,A),T=Math.max(p.width,I);V(p,{height:_,width:T}),o=p.x+T/2,u=p.y+_/2,g&&(g=this.getTextWysiwygSnappedToCenterPosition(o,u,this.state,p))}let k=this.getTopLayerFrameAtSceneCoords({x:o,y:u}),C=b||_n({x:g?g.elementCenterX:o,y:g?g.elementCenterY:u,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,text:"",fontSize:w,fontFamily:v,textAlign:g?"center":this.state.currentItemTextAlign,verticalAlign:g?Mn.MIDDLE:Nd,containerId:m?p?.id:void 0,groupIds:p?.groupIds??[],lineHeight:y,angle:p?.angle??0,frameId:k?k.id:null});if(!b&&m&&p&&V(p,{boundElements:(p.boundElements||[]).concat({type:"text",id:C.id})}),this.setState({editingTextElement:C}),!b)if(p&&m){let I=this.scene.getElementIndex(p.id);this.scene.insertElementAtIndex(C,I+1)}else this.scene.insertElement(C);U||b||p?this.handleTextWysiwyg(C,{isExistingElement:!!b}):this.setState({newElement:C,multiElement:null})}),j(this,"startImageCropping",o=>{this.store.shouldCaptureIncrement(),this.setState({croppingElementId:o.id})}),j(this,"finishImageCropping",()=>{this.state.croppingElementId&&(this.store.shouldCaptureIncrement(),this.setState({croppingElementId:null}))}),j(this,"handleCanvasDoubleClick",o=>{if(this.state.multiElement||this.state.activeTool.type!=="selection")return;let u=this.scene.getSelectedElements(this.state),{x:h,y:p}=Ge(o,this.state);if(u.length===1&&ue(u[0])){if(o[R.CTRL_OR_CMD]&&(!this.state.editingLinearElement||this.state.editingLinearElement.elementId!==u[0].id)&&!Q(u[0])){this.store.shouldCaptureIncrement(),this.setState({editingLinearElement:new J(u[0])});return}else if(this.state.selectedLinearElement&&Q(u[0])){let U=J.getSegmentMidpointHitCoords(this.state.selectedLinearElement,{x:h,y:p},this.state,this.scene.getNonDeletedElementsMap()),m=U?J.getSegmentMidPointIndex(this.state.selectedLinearElement,this.state,U,this.scene.getNonDeletedElementsMap()):-1;if(m&&m>-1){this.store.shouldCaptureIncrement(),J.deleteFixedSegment(u[0],m);let g=J.getSegmentMidpointHitCoords({...this.state.selectedLinearElement,segmentMidPointHoveredCoords:null},{x:h,y:p},this.state,this.scene.getNonDeletedElementsMap()),b=g?J.getSegmentMidPointIndex(this.state.selectedLinearElement,this.state,g,this.scene.getNonDeletedElementsMap()):null;this.setState({selectedLinearElement:{...this.state.selectedLinearElement,pointerDownState:{...this.state.selectedLinearElement.pointerDownState,segmentMidpoint:{index:b,value:U,added:!1}},segmentMidPointHoveredCoords:g}});return}}}if(u.length===1&&Le(u[0])){this.startImageCropping(u[0]);return}if(Jn(this.interactiveCanvas),Pr(this.state).length>0){let U=this.getElementAtPosition(h,p),m=U&&OP(U,this.state.selectedGroupIds);if(m){this.store.shouldCaptureIncrement(),this.setState(g=>({...g,...ln({editingGroupId:m,selectedElementIds:{[U.id]:!0}},this.scene.getNonDeletedElements(),g,this)}));return}}if(Jn(this.interactiveCanvas),!o[R.CTRL_OR_CMD]&&!this.state.viewModeEnabled){let U=this.getElementAtPosition(h,p);if(Pn(U)){this.setState({activeEmbeddable:{element:U,state:"active"}});return}let m=this.getTextBindableContainerAtPosition(h,p);if(m&&(Wn(m)||!ia(m.backgroundColor)||Es({x:h,y:p,element:m,shape:ri(m,this.scene.getNonDeletedElementsMap()),threshold:this.getElementHitThreshold()}))){let g=ph(m,this.state,this.scene.getNonDeletedElementsMap());h=g.x,p=g.y}this.startTextEditing({sceneX:h,sceneY:p,insertAtParentCenter:!o.altKey,container:m})}}),j(this,"getElementLinkAtPosition",(o,u)=>{let h=this.scene.getNonDeletedElements(),p=-1;for(let U=h.length-1;U>=0;U--){let m=h[U];if(u&&m.id===u.id&&(p=U),m.link&&U>=p&&Uh(m,this.scene.getNonDeletedElementsMap(),this.state,E(o.x,o.y),this.device.editor.isMobile))return m}}),j(this,"redirectToLink",(o,u)=>{let h=Pe(E(this.lastPointerDownEvent.clientX,this.lastPointerDownEvent.clientY),E(this.lastPointerUpEvent.clientX,this.lastPointerUpEvent.clientY));if(!this.hitLinkElement||h>yr)return;let p=Ge(this.lastPointerDownEvent,this.state),U=this.scene.getNonDeletedElementsMap(),m=Uh(this.hitLinkElement,U,this.state,E(p.x,p.y),this.device.editor.isMobile),g=Ge(this.lastPointerUpEvent,this.state),b=Uh(this.hitLinkElement,U,this.state,E(g.x,g.y),this.device.editor.isMobile);if(m&&b){e5();let x=this.hitLinkElement.link;if(x){x=yn(x);let v;if(this.props.onLinkOpen&&(v=k8("excalidraw-link",o.nativeEvent),this.props.onLinkOpen({...this.hitLinkElement,link:x},v)),!v?.defaultPrevented){let y=Z7(x)?"_self":"_blank",w=window.open(void 0,y);w&&(w.opener=null,w.location=x)}}}}),j(this,"getTopLayerFrameAtSceneCoords",o=>{let u=this.scene.getNonDeletedElementsMap(),h=this.scene.getNonDeletedFramesLikes().filter(p=>$g(o,p,u));return h.length?h[h.length-1]:null}),j(this,"handleCanvasPointerMove",o=>{this.savePointer(o.clientX,o.clientY,this.state.cursorButton),this.lastPointerMoveEvent=o.nativeEvent,Re.pointers.has(o.pointerId)&&Re.pointers.set(o.pointerId,{x:o.clientX,y:o.clientY});let u=Re.initialScale;if(Re.pointers.size===2&&Re.lastCenter&&u&&Re.initialDistance){let v=d5(Re.pointers),y=v.x-Re.lastCenter.x,w=v.y-Re.lastCenter.y;Re.lastCenter=v;let k=u5(Array.from(Re.pointers.values())),C=this.state.activeTool.type==="freedraw"&&this.state.penMode?1:k/Re.initialDistance,I=C?ci(u*C):this.state.zoom.value;this.setState(A=>{let _=jr({viewportX:v.x,viewportY:v.y,nextZoom:I},A);this.translateCanvas({zoom:_.zoom,scrollX:_.scrollX+2*(y/I),scrollY:_.scrollY+2*(w/I),shouldCacheIgnoreZoom:!0})}),this.resetShouldCacheIgnoreZoomDebounced()}else Re.lastCenter=Re.initialDistance=Re.initialScale=null;if(gr||Ll||Yh||Vs(this.state))return;let h=U5(Zh,o.clientX-this.state.offsetLeft,o.clientY-this.state.offsetTop).isOverEither;!this.state.newElement&&!this.state.selectionElement&&!this.state.selectedElementsAreBeingDragged&&!this.state.multiElement&&(h?Jn(this.interactiveCanvas):Ca(this.interactiveCanvas,this.state));let p=Ge(o,this.state),{x:U,y:m}=p;if(!this.state.newElement&&JP(this.state.activeTool.type)){let{originOffset:v,snapLines:y}=qP(this.scene.getNonDeletedElements(),this,{x:U,y:m},o,this.scene.getNonDeletedElementsMap());this.setState(w=>{let k=Cl(w.snapLines,y),C=w.originSnapOffset?Cl(w.originSnapOffset,v):v;return w.snapLines===k&&w.originSnapOffset===C?null:{snapLines:k,originSnapOffset:C}})}else!this.state.newElement&&!this.state.selectedElementsAreBeingDragged&&!this.state.selectionElement&&this.setState(v=>v.snapLines.length?{snapLines:[]}:null);if(this.state.editingLinearElement&&!this.state.editingLinearElement.isDragging){let v=J.handlePointerMove(o,U,m,this,this.scene.getNonDeletedElementsMap());v&&v!==this.state.editingLinearElement&&Ft.flushSync(()=>{this.setState({editingLinearElement:v})}),v?.lastUncommittedPoint!=null?this.maybeSuggestBindingAtCursor(p,v.elbowed):Ft.flushSync(()=>{this.setState({suggestedBindings:[]})})}if(_8(this.state.activeTool.type)){let{newElement:v}=this.state;Da(v,!1)?this.maybeSuggestBindingsForLinearElementAtCoords(v,[p],this.state.startBoundElement):this.maybeSuggestBindingAtCursor(p,!1)}if(this.state.multiElement){let{multiElement:v}=this.state,{x:y,y:w}=v,{points:k,lastCommittedPoint:C}=v,I=k[k.length-1];if(Ca(this.interactiveCanvas,this.state),I===C)Pe(E(U-y,m-w),I)>=ad?V(v,{points:[...k,E(U-y,m-w)]},!1):He(this.interactiveCanvas,Fe.POINTER);else if(k.length>2&&C&&Pe(E(U-y,m-w),C)<ad)He(this.interactiveCanvas,Fe.POINTER),V(v,{points:k.slice(0,-1)},!1);else{let[A,_]=Mt(U,m,o[R.CTRL_OR_CMD]||Q(v)?null:this.getEffectiveGridSize()),[T,D]=v?.lastCommittedPoint??[0,0],L=A-y-T,F=_-w-D;ro(o)&&({width:L,height:F}=X1(T+y,D+w,A,_)),mi(k,this.state.zoom.value)&&He(this.interactiveCanvas,Fe.POINTER),V(v,{points:[...k.slice(0,-1),E(T+L,D+F)]},!1,{isDragging:!0}),this.triggerRender(!1)}return}if(o.buttons||this.state.activeTool.type!=="selection"&&this.state.activeTool.type!=="text"&&this.state.activeTool.type!=="eraser")return;let g=this.scene.getNonDeletedElements(),b=this.scene.getSelectedElements(this.state);if(b.length===1&&!h&&!this.state.editingLinearElement){if(this.state.selectedLinearElement&&this.handleHoverSelectedLinearElement(this.state.selectedLinearElement,U,m),(!this.state.selectedLinearElement||this.state.selectedLinearElement.hoverPointIndex===-1)&&this.state.openDialog?.name!=="elementLinkSelector"&&!(b.length===1&&Q(b[0]))){let v=Vg(g,this.state,U,m,this.state.zoom,o.pointerType,this.scene.getNonDeletedElementsMap(),this.device);if(v&&v.transformHandleType){He(this.interactiveCanvas,Yg(v));return}}}else if(b.length>1&&!h&&this.state.openDialog?.name!=="elementLinkSelector"){let v=Gg(Ne(b),U,m,this.state.zoom,o.pointerType,this.device);if(v){He(this.interactiveCanvas,Yg({transformHandleType:v}));return}}let x=this.getElementAtPosition(p.x,p.y);this.hitLinkElement=this.getElementLinkAtPosition(p,x),!Ma(this.state)&&(this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id]?(He(this.interactiveCanvas,Fe.POINTER),vX(this.hitLinkElement,this.state,this.scene.getNonDeletedElementsMap())):(e5(),x&&(x.link||Un(x))&&this.state.selectedElementIds[x.id]&&!this.state.contextMenu&&!this.state.showHyperlinkPopup?this.setState({showHyperlinkPopup:"info"}):this.state.activeTool.type==="text"?He(this.interactiveCanvas,q(x)?Fe.TEXT:Fe.CROSSHAIR):this.state.viewModeEnabled?He(this.interactiveCanvas,Fe.GRAB):this.state.openDialog?.name==="elementLinkSelector"?He(this.interactiveCanvas,Fe.AUTO):h?He(this.interactiveCanvas,Fe.AUTO):this.state.selectedLinearElement?this.handleHoverSelectedLinearElement(this.state.selectedLinearElement,U,m):o[R.CTRL_OR_CMD]?He(this.interactiveCanvas,Fe.AUTO):(x||this.isHittingCommonBoundingBoxOfSelectedElements(p,b))&&!x?.locked&&(x&&Pn(x)&&this.isIframeLikeElementCenter(x,o,U,m)?(He(this.interactiveCanvas,Fe.POINTER),this.setState({activeEmbeddable:{element:x,state:"hover"}})):(!x||!Q(x))&&(He(this.interactiveCanvas,Fe.MOVE),this.state.activeEmbeddable?.state==="hover"&&this.setState({activeEmbeddable:null})))),this.state.openDialog?.name==="elementLinkSelector"&&x?this.setState(v=>({hoveredElementIds:Cl(v.hoveredElementIds,ln({editingGroupId:v.editingGroupId,selectedElementIds:{[x.id]:!0}},this.scene.getNonDeletedElements(),v,this).selectedElementIds)})):this.state.openDialog?.name==="elementLinkSelector"&&!x&&this.setState(v=>({hoveredElementIds:Cl(v.hoveredElementIds,{})})))}),j(this,"handleEraser",(o,u,h)=>{this.eraserTrail.addPointToPath(h.x,h.y);let p=!1,U=new Set,m=this.scene.getNonDeletedElements(),g=w=>{for(let k of w){if(k.locked)return;if(o.altKey?this.elementsPendingErasure.delete(k.id)&&(p=!0):this.elementsPendingErasure.has(k.id)||(p=!0,this.elementsPendingErasure.add(k.id)),p&&k.groupIds?.length){let C=k.groupIds.at(-1);if(!U.has(C)){U.add(C);let I=tt(m,C);for(let A of I)o.altKey?this.elementsPendingErasure.delete(A.id):this.elementsPendingErasure.add(A.id)}}}},b=Pe(E(u.lastCoords.x,u.lastCoords.y),E(h.x,h.y)),x=this.getElementHitThreshold(),v={...u.lastCoords},y=0;for(;y<=b;){let w=this.getElementsAtPosition(v.x,v.y);if(g(w),y===b)break;y=Math.min(y+x,b);let k=y/b,C=(1-k)*v.x+k*h.x,I=(1-k)*v.y+k*h.y;v.x=C,v.y=I}if(u.lastCoords.x=h.x,u.lastCoords.y=h.y,p){for(let w of this.scene.getNonDeletedElements())nt(w)&&(this.elementsPendingErasure.has(w.id)||this.elementsPendingErasure.has(w.containerId))&&(o.altKey?(this.elementsPendingErasure.delete(w.id),this.elementsPendingErasure.delete(w.containerId)):(this.elementsPendingErasure.add(w.id),this.elementsPendingErasure.add(w.containerId)));this.elementsPendingErasure=new Set(this.elementsPendingErasure),this.triggerRender()}}),j(this,"handleTouchMove",o=>{Pl=!0}),j(this,"handleCanvasPointerDown",o=>{let u=o.target;if(u.setPointerCapture&&u.setPointerCapture(o.pointerId),this.maybeCleanupAfterMissingPointerUp(o.nativeEvent),this.maybeUnfollowRemoteUser(),this.state.searchMatches&&(this.setState(x=>({searchMatches:x.searchMatches.map(v=>({...v,focus:!1}))})),sa.set(qx,null)),this.state.contextMenu&&this.setState({contextMenu:null}),this.state.snapLines&&this.setAppState({snapLines:[]}),this.updateGestureOnPointerDown(o),o.pointerType==="touch"&&this.state.newElement&&this.state.newElement.type==="freedraw"){let x=this.state.newElement;this.updateScene({...x.points.length<10?{elements:this.scene.getElementsIncludingDeleted().filter(v=>v.id!==x.id)}:{},appState:{newElement:null,editingTextElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:De(Object.keys(this.state.selectedElementIds).filter(v=>v!==x.id).reduce((v,y)=>(v[y]=this.state.selectedElementIds[y],v),{}),this.state)},captureUpdate:this.state.openDialog?.name==="elementLinkSelector"?B.EVENTUALLY:B.NEVER});return}let h=document.getSelection();if(h?.anchorNode&&h.removeAllRanges(),this.maybeOpenContextMenuAfterPointerDownOnTouchDevices(o),!this.state.penDetected&&o.pointerType==="pen"&&this.setState(x=>({penMode:!0,penDetected:!0})),!this.device.isTouchScreen&&["pen","touch"].includes(o.pointerType)&&(this.device=id(this.device,{isTouchScreen:!0})),Ll||(this.lastPointerDownEvent=o,this.handleCanvasPanUsingWheelOrSpaceDrag(o)))return;if(this.setState({lastPointerDownWith:o.pointerType,cursorButton:"down"}),this.savePointer(o.clientX,o.clientY,"down"),o.button===Li.ERASER&&this.state.activeTool.type!==Dt.eraser){this.setState({activeTool:Et(this.state,{type:Dt.eraser,lastActiveToolBeforeEraser:this.state.activeTool})},()=>{this.handleCanvasPointerDown(o);let x=()=>{v(),y?.(),Ma(this.state)&&this.setState({activeTool:Et(this.state,{...this.state.activeTool.lastActiveTool||{type:Dt.selection},lastActiveToolBeforeEraser:null})})},v=lt(window,"pointerup",x,{once:!0}),y;requestAnimationFrame(()=>{y=this.missingPointerEventCleanupEmitter.once(x)})});return}if(o.button!==Li.MAIN&&o.button!==Li.TOUCH&&o.button!==Li.ERASER||Re.pointers.size>1)return;let p=this.initialPointerDownState(o);if(this.setState({selectedElementsAreBeingDragged:!1}),this.handleDraggingScrollBar(o,p)||(this.clearSelectionIfNotUsingSelection(),this.updateBindingEnabledOnPointerMove(o),this.handleSelectionOnPointerDown(o,p))||!(!this.state.penMode||o.pointerType!=="touch"||this.state.activeTool.type==="selection"||this.state.activeTool.type==="text"||this.state.activeTool.type==="image"))return;if(this.state.activeTool.type==="text")this.handleTextOnPointerDown(o,p);else if(this.state.activeTool.type==="arrow"||this.state.activeTool.type==="line")this.handleLinearElementOnPointerDown(o,this.state.activeTool.type,p);else if(this.state.activeTool.type==="image"){He(this.interactiveCanvas,Fe.CROSSHAIR);let x=this.state.pendingImageElementId&&this.scene.getElement(this.state.pendingImageElementId);if(!x)return;this.setState({newElement:x,pendingImageElementId:null,multiElement:null});let{x:v,y}=Ge(o,this.state),w=this.getTopLayerFrameAtSceneCoords({x:v,y});V(x,{x:v,y,frameId:w?w.id:null})}else this.state.activeTool.type==="freedraw"?this.handleFreeDrawElementOnPointerDown(o,this.state.activeTool.type,p):this.state.activeTool.type==="custom"?Ca(this.interactiveCanvas,this.state):this.state.activeTool.type===Dt.frame||this.state.activeTool.type===Dt.magicframe?this.createFrameElementOnPointerDown(p,this.state.activeTool.type):this.state.activeTool.type==="laser"?this.laserTrails.startPath(p.lastCoords.x,p.lastCoords.y):this.state.activeTool.type!=="eraser"&&this.state.activeTool.type!=="hand"&&this.createGenericElementOnPointerDown(this.state.activeTool.type,p);this.props?.onPointerDown?.(this.state.activeTool,p),this.onPointerDownEmitter.trigger(this.state.activeTool,p,o),this.state.activeTool.type==="eraser"&&this.eraserTrail.startPath(p.lastCoords.x,p.lastCoords.y);let U=this.onPointerMoveFromPointerDownHandler(p),m=this.onPointerUpFromPointerDownHandler(p),g=this.onKeyDownFromPointerDownHandler(p),b=this.onKeyUpFromPointerDownHandler(p);this.missingPointerEventCleanupEmitter.once(x=>m(x||o.nativeEvent)),(!this.state.viewModeEnabled||this.state.activeTool.type==="laser")&&(window.addEventListener("pointermove",U),window.addEventListener("pointerup",m),window.addEventListener("keydown",g),window.addEventListener("keyup",b),p.eventListeners.onMove=U,p.eventListeners.onUp=m,p.eventListeners.onKeyUp=b,p.eventListeners.onKeyDown=g)}),j(this,"handleCanvasPointerUp",o=>{this.removePointer(o),this.lastPointerUpEvent=o;let u=Ge({clientX:o.clientX,clientY:o.clientY},this.state),h=o.timeStamp-(this.lastPointerDownEvent?.timeStamp??0);if(this.device.editor.isMobile&&h<300){let p=this.getElementAtPosition(u.x,u.y);if(Pn(p)&&this.isIframeLikeElementCenter(p,o,u.x,u.y)){this.handleEmbeddableCenterClick(p);return}}if(this.device.isTouchScreen){let p=this.getElementAtPosition(u.x,u.y);this.hitLinkElement=this.getElementLinkAtPosition(u,p)}this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id]?h<300&&Pn(this.hitLinkElement)&&!m3(this.hitLinkElement,this.scene.getNonDeletedElementsMap(),this.state,E(u.x,u.y))?this.handleEmbeddableCenterClick(this.hitLinkElement):this.redirectToLink(o,this.device.isTouchScreen):this.state.viewModeEnabled&&this.setState({activeEmbeddable:null,selectedElementIds:{}})}),j(this,"maybeOpenContextMenuAfterPointerDownOnTouchDevices",o=>{o.pointerType==="touch"&&(Pl=!1,Ri?Pl=!0:Ri=window.setTimeout(()=>{Ri=0,Pl||this.handleCanvasContextMenu(o)},AM))}),j(this,"resetContextMenuTimer",()=>{clearTimeout(Ri),Ri=0,Pl=!1}),j(this,"maybeCleanupAfterMissingPointerUp",o=>{Nl?.(),this.missingPointerEventCleanupEmitter.trigger(o).clear()}),j(this,"handleCanvasPanUsingWheelOrSpaceDrag",o=>{if(!(Re.pointers.size<=1&&(o.button===Li.WHEEL||o.button===Li.MAIN&&gr||Vs(this.state)||this.state.viewModeEnabled)))return!1;Ll=!0,this.focusContainer(),this.state.editingTextElement||o.preventDefault();let u=!1,h=typeof window===void 0?!1:/Linux/.test(window.navigator.platform);He(this.interactiveCanvas,Fe.GRABBING);let{clientX:p,clientY:U}=o,m=Hh(b=>{let x=p-b.clientX,v=U-b.clientY;if(p=b.clientX,U=b.clientY,h&&!u&&(Math.abs(x)>1||Math.abs(v)>1)){u=!0;let y=k=>{document.body.removeEventListener("paste",y),k.stopPropagation()},w=()=>{setTimeout(()=>{document.body.removeEventListener("paste",y),window.removeEventListener("pointerup",w)},100)};document.body.addEventListener("paste",y),window.addEventListener("pointerup",w)}this.translateCanvas({scrollX:this.state.scrollX-x/this.state.zoom.value,scrollY:this.state.scrollY-v/this.state.zoom.value})}),g=ft(Nl=()=>{Nl=null,Ll=!1,gr||(this.state.viewModeEnabled?He(this.interactiveCanvas,Fe.GRAB):Ca(this.interactiveCanvas,this.state)),this.setState({cursorButton:"up"}),this.savePointer(o.clientX,o.clientY,"up"),window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",g),window.removeEventListener("blur",g),m.flush()});return window.addEventListener("blur",g),window.addEventListener("pointermove",m,{passive:!0}),window.addEventListener("pointerup",g),!0}),j(this,"clearSelectionIfNotUsingSelection",()=>{this.state.activeTool.type!=="selection"&&this.setState({selectedElementIds:De({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})}),j(this,"handleSelectionOnPointerDown",(o,u)=>{if(this.state.activeTool.type==="selection"){let h=this.scene.getNonDeletedElements(),p=this.scene.getNonDeletedElementsMap(),U=this.scene.getSelectedElements(this.state);if(U.length===1&&!this.state.editingLinearElement&&!Q(U[0])&&!(this.state.selectedLinearElement&&this.state.selectedLinearElement.hoverPointIndex!==-1)){let m=Vg(h,this.state,u.origin.x,u.origin.y,this.state.zoom,o.pointerType,this.scene.getNonDeletedElementsMap(),this.device);m!=null&&(m.transformHandleType==="rotation"?(this.setState({resizingElement:m.element}),u.resize.handleType=m.transformHandleType):(this.state.croppingElementId||this.setState({resizingElement:m.element}),u.resize.handleType=m.transformHandleType))}else U.length>1&&(u.resize.handleType=Gg(Ne(U),u.origin.x,u.origin.y,this.state.zoom,o.pointerType,this.device));if(u.resize.handleType)u.resize.isResizing=!0,u.resize.offset=aa(WO(u.resize.handleType,U,p,u.origin.x,u.origin.y)),U.length===1&&ue(U[0])&&U[0].points.length===2&&(u.resize.arrowDirection=VO(u.resize.handleType,U[0]));else{if(this.state.selectedLinearElement){let b=this.state.editingLinearElement||this.state.selectedLinearElement,x=J.handlePointerDown(o,this,this.store,u.origin,b,this.scene);if(x.hitElement&&(u.hit.element=x.hitElement),x.linearElementEditor&&(this.setState({selectedLinearElement:x.linearElementEditor}),this.state.editingLinearElement&&this.setState({editingLinearElement:x.linearElementEditor})),x.didAddPoint)return!0}if(u.hit.element=u.hit.element??this.getElementAtPosition(u.origin.x,u.origin.y),this.hitLinkElement=this.getElementLinkAtPosition(u.origin,u.hit.element),this.hitLinkElement)return!0;if(this.state.croppingElementId&&u.hit.element?.id!==this.state.croppingElementId&&this.finishImageCropping(),u.hit.element&&this.getElementLinkAtPosition({x:u.origin.x,y:u.origin.y},u.hit.element))return!1;u.hit.allHitElements=this.getElementsAtPosition(u.origin.x,u.origin.y);let m=u.hit.element,g=u.hit.allHitElements.some(b=>this.isASelectedElement(b));if((m===null||!g)&&!o.shiftKey&&!u.hit.hasHitCommonBoundingBoxOfSelectedElements&&this.clearSelection(m),this.state.editingLinearElement)this.setState({selectedElementIds:De({[this.state.editingLinearElement.elementId]:!0},this.state)});else if(m!=null){if(o[R.CTRL_OR_CMD])return this.state.selectedElementIds[m.id]||(u.hit.wasAddedToSelection=!0),this.setState(b=>({...NP(b,m),previousSelectedElementIds:this.state.selectedElementIds})),!1;this.state.selectedElementIds[m.id]||(this.state.editingGroupId&&!Po(m,this.state.editingGroupId)&&this.setState({selectedElementIds:De({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null}),!g&&!u.hit.hasHitCommonBoundingBoxOfSelectedElements&&(this.setState(b=>{let x={...b.selectedElementIds,[m.id]:!0},v=[];if(Object.keys(b.selectedElementIds).forEach(y=>{let w=this.scene.getElement(y);w&&v.push(w)}),ce(m))Ga(v,m.id).forEach(y=>{delete x[y.id]});else if(m.frameId)x[m.frameId]&&delete x[m.id];else{let y=m.groupIds,w=new Set(y.flatMap(k=>tt(this.scene.getNonDeletedElements(),k)).filter(k=>ce(k)).map(k=>k.id));w.size>0&&v.forEach(k=>{k.frameId&&w.has(k.frameId)&&(delete x[k.id],k.groupIds.flatMap(C=>tt(this.scene.getNonDeletedElements(),C)).forEach(C=>{delete x[C.id]}))})}return b.openDialog?.name==="elementLinkSelector"&&(m.groupIds.some(y=>b.selectedGroupIds[y])||(x={[m.id]:!0})),{...ln({editingGroupId:b.editingGroupId,selectedElementIds:x},this.scene.getNonDeletedElements(),b,this),showHyperlinkPopup:m.link||Un(m)?"info":!1}}),u.hit.wasAddedToSelection=!0))}this.setState({previousSelectedElementIds:this.state.selectedElementIds})}}return!1}),j(this,"handleTextOnPointerDown",(o,u)=>{if(this.state.editingTextElement)return;let h=u.origin.x,p=u.origin.y,U=this.getElementAtPosition(h,p,{includeBoundTextElement:!0}),m=this.getTextBindableContainerAtPosition(h,p);Wn(U)&&(m=U,h=U.x+U.width/2,p=U.y+U.height/2),this.startTextEditing({sceneX:h,sceneY:p,insertAtParentCenter:!o.altKey,container:m,autoEdit:!1}),Jn(this.interactiveCanvas),this.state.activeTool.locked||this.setState({activeTool:Et(this.state,{type:"selection"})})}),j(this,"handleFreeDrawElementOnPointerDown",(o,u,h)=>{let[p,U]=Mt(h.origin.x,h.origin.y,null),m=this.getTopLayerFrameAtSceneCoords({x:p,y:U}),g=o.pressure===.5,b=UN({type:u,x:p,y:U,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:null,simulatePressure:g,locked:!1,frameId:m?m.id:null,points:[E(0,0)],pressures:g?[]:[o.pressure]});this.scene.insertElement(b),this.setState(v=>{let y={...v.selectedElementIds};return delete y[b.id],{selectedElementIds:De(y,v)}});let x=ra(h.origin,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom);this.setState({newElement:b,startBoundElement:x,suggestedBindings:[]})}),j(this,"insertIframeElement",({sceneX:o,sceneY:u,width:h,height:p})=>{let[U,m]=Mt(o,u,this.lastPointerDownEvent?.[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),g=fN({type:"iframe",x:U,y:m,strokeColor:"transparent",backgroundColor:"transparent",fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:this.getCurrentItemRoundness("iframe"),opacity:this.state.currentItemOpacity,locked:!1,width:h,height:p});return this.scene.insertElement(g),g}),j(this,"insertEmbeddableElement",({sceneX:o,sceneY:u,link:h})=>{let[p,U]=Mt(o,u,this.lastPointerDownEvent?.[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),m=As(h);if(!m)return;m.error instanceof URIError&&this.setToast({message:M("toast.unrecognizedLinkFormat"),closable:!0});let g=fg({type:"embeddable",x:p,y:U,strokeColor:"transparent",backgroundColor:"transparent",fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:this.getCurrentItemRoundness("embeddable"),opacity:this.state.currentItemOpacity,locked:!1,width:m.intrinsicSize.w,height:m.intrinsicSize.h,link:h});return this.scene.insertElement(g),g}),j(this,"createImageElement",({sceneX:o,sceneY:u,addToFrameUnderCursor:h=!0})=>{let[p,U]=Mt(o,u,this.lastPointerDownEvent?.[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),m=h?this.getTopLayerFrameAtSceneCoords({x:p,y:U}):null;return t3({type:"image",x:p,y:U,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:null,opacity:this.state.currentItemOpacity,locked:!1,frameId:m?m.id:null})}),j(this,"handleLinearElementOnPointerDown",(o,u,h)=>{if(this.state.multiElement){let{multiElement:p}=this.state;if(p.type==="line"&&mi(p.points,this.state.zoom.value)){V(p,{lastCommittedPoint:p.points[p.points.length-1]}),this.actionManager.executeAction(Kn);return}if(Q(p)&&p.points.length>1){V(p,{lastCommittedPoint:p.points[p.points.length-1]}),this.actionManager.executeAction(Kn);return}let{x:U,y:m,lastCommittedPoint:g}=p;if(p.points.length>1&&g&&Pe(E(h.origin.x-U,h.origin.y-m),g)<ad){this.actionManager.executeAction(Kn);return}this.setState(b=>({selectedElementIds:De({...b.selectedElementIds,[p.id]:!0},b)})),V(p,{lastCommittedPoint:p.points[p.points.length-1]}),He(this.interactiveCanvas,Fe.POINTER)}else{let[p,U]=Mt(h.origin.x,h.origin.y,o[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),m=this.getTopLayerFrameAtSceneCoords({x:p,y:U}),{currentItemStartArrowhead:g,currentItemEndArrowhead:b}=this.state,[x,v]=u==="arrow"?[g,b]:[null,null],y=u==="arrow"?gp({type:u,x:p,y:U,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:this.state.currentItemArrowType===$t.round?{type:St.PROPORTIONAL_RADIUS}:null,startArrowhead:x,endArrowhead:v,locked:!1,frameId:m?m.id:null,elbowed:this.state.currentItemArrowType===$t.elbow,fixedSegments:this.state.currentItemArrowType===$t.elbow?[]:null}):Nr({type:u,x:p,y:U,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:this.state.currentItemRoundness==="round"?{type:St.PROPORTIONAL_RADIUS}:null,locked:!1,frameId:m?m.id:null});this.setState(k=>{let C={...k.selectedElementIds};return delete C[y.id],{selectedElementIds:De(C,k)}}),V(y,{points:[...y.points,E(0,0)]});let w=ra(h.origin,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom,Q(y),Q(y));this.scene.insertElement(y),this.setState({newElement:y,startBoundElement:w,suggestedBindings:[]})}}),j(this,"createGenericElementOnPointerDown",(o,u)=>{let[h,p]=Mt(u.origin.x,u.origin.y,this.lastPointerDownEvent?.[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),U=this.getTopLayerFrameAtSceneCoords({x:h,y:p}),m={x:h,y:p,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:this.getCurrentItemRoundness(o),locked:!1,frameId:U?U.id:null},g;o==="embeddable"?g=fg({type:"embeddable",...m}):g=Xa({type:o,...m}),g.type==="selection"?this.setState({selectionElement:g}):(this.scene.insertElement(g),this.setState({multiElement:null,newElement:g}))}),j(this,"createFrameElementOnPointerDown",(o,u)=>{let[h,p]=Mt(o.origin.x,o.origin.y,this.lastPointerDownEvent?.[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),U={x:h,y:p,opacity:this.state.currentItemOpacity,locked:!1,...ct},m=u===Dt.magicframe?P1(U):mp(U);this.scene.insertElement(m),this.setState({multiElement:null,newElement:m})}),j(this,"restoreReadyToEraseElements",()=>{this.elementsPendingErasure=new Set,this.triggerRender()}),j(this,"eraseElements",()=>{let o=!1,u=this.scene.getElementsIncludingDeleted().map(h=>this.elementsPendingErasure.has(h.id)||h.frameId&&this.elementsPendingErasure.has(h.frameId)||nt(h)&&this.elementsPendingErasure.has(h.containerId)?(o=!0,pe(h,{isDeleted:!0})):h);this.elementsPendingErasure=new Set,o&&(this.store.shouldCaptureIncrement(),this.scene.replaceAllElements(u))}),j(this,"initializeImage",async({imageFile:o,imageElement:u,showCursorImagePreview:h=!1})=>{if(!Or(o))throw new Error(M("errors.unsupportedFileType"));let p=o.type;if(He(this.interactiveCanvas,"wait"),p===ae.svg)try{o=qg(Eg(await o.text()),o.name)}catch(b){throw console.warn(b),new Error(M("errors.svgImageInsertError"))}let U=await(this.props.generateIdForFile?.(o)||i$(o));if(!U)throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),new Error(M("errors.imageInsertError"));if(!this.files[U]?.dataURL){try{o=await Y1(o,{maxWidthOrHeight:OM})}catch(b){console.error("Error trying to resizing image file on insertion",b)}if(o.size>p2)throw new Error(M("errors.fileTooBig",{maxSize:`${Math.trunc(p2/1024/1024)}MB`}))}if(h){let b=this.files[U]?.dataURL,x=b&&s$(b);this.setImagePreviewCursor(x||o)}let m=this.files[U]?.dataURL||await G1(o),g=V(u,{fileId:U},!1);return new Promise(async(b,x)=>{try{this.addMissingFiles([{mimeType:p,id:U,dataURL:m,created:Date.now(),lastRetrieved:Date.now()}]);let v=this.imageCache.get(U);v||(this.addNewImagesToImageCache(),await this.updateImageCache([g])),v?.image instanceof Promise&&await v.image,this.state.pendingImageElementId!==g.id&&this.state.newElement?.id!==g.id&&this.initializeImageDimensions(g,!0),b(g)}catch(v){console.error(v),x(new Error(M("errors.imageInsertError")))}finally{h||Jn(this.interactiveCanvas)}})}),j(this,"insertImageElement",async(o,u,h)=>{if(!this.isToolSupported("image")){this.setState({errorMessage:M("errors.imageToolNotSupported")});return}this.scene.insertElement(o);try{return await this.initializeImage({imageFile:u,imageElement:o,showCursorImagePreview:h})}catch(p){return V(o,{isDeleted:!0}),this.actionManager.executeAction(Kn),this.setState({errorMessage:p.message||M("errors.imageInsertError")}),null}}),j(this,"setImagePreviewCursor",async o=>{let u;try{u=await Y1(o,{maxWidthOrHeight:96})}catch(p){throw p.cause==="UNSUPPORTED"?new Error(M("errors.unsupportedFileType")):p}let h=await G1(u);if(o.type===ae.svg){let p=await u3(h),U=Math.min(p.height,96),m=U*(p.width/p.height);m>96&&(m=96,U=m*(p.height/p.width));let g=document.createElement("canvas");g.height=U,g.width=m,g.getContext("2d").drawImage(p,0,0,m,U),h=g.toDataURL(ae.svg)}this.state.pendingImageElementId&&He(this.interactiveCanvas,`url(${h}) 4 4, auto`)}),j(this,"onImageAction",async({insertOnCanvasDirectly:o})=>{try{let u=this.state.width/2+this.state.offsetLeft,h=this.state.height/2+this.state.offsetTop,{x:p,y:U}=Ge({clientX:u,clientY:h},this.state),m=await vp({description:"Image",extensions:Object.keys(Ws)}),g=this.createImageElement({sceneX:p,sceneY:U,addToFrameUnderCursor:!1});o?(this.insertImageElement(g,m),this.initializeImageDimensions(g),this.setState({selectedElementIds:De({[g.id]:!0},this.state)},()=>{this.actionManager.executeAction(Kn)})):this.setState({pendingImageElementId:g.id},()=>{this.insertImageElement(g,m,!0)})}catch(u){u.name!=="AbortError"?console.error(u):console.warn(u),this.setState({pendingImageElementId:null,newElement:null,activeTool:Et(this.state,{type:"selection"})},()=>{this.actionManager.executeAction(Kn)})}}),j(this,"initializeImageDimensions",(o,u=!1)=>{let h=Ln(o)&&this.imageCache.get(o.fileId)?.image;if(!h||h instanceof Promise){if(o.width<yr/this.state.zoom.value&&o.height<yr/this.state.zoom.value){let p=100/this.state.zoom.value;V(o,{x:o.x-p/2,y:o.y-p/2,width:p,height:p})}return}if(u||o.width<yr/this.state.zoom.value&&o.height<yr/this.state.zoom.value){let p=Math.max(this.state.height-120,160),U=Math.min(p,Math.floor(this.state.height*.5)/this.state.zoom.value),m=Math.min(h.naturalHeight,U),g=m*(h.naturalWidth/h.naturalHeight),b=o.x+o.width/2-g/2,x=o.y+o.height/2-m/2;V(o,{x:b,y:x,width:g,height:m,crop:null})}}),j(this,"updateImageCache",async(o,u=this.files)=>{let{updatedFiles:h,erroredFiles:p}=await f3({imageCache:this.imageCache,fileIds:o.map(U=>U.fileId),files:u});if(h.size||p.size)for(let U of o)h.has(U.fileId)&&ut.delete(U);return p.size&&this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().map(U=>Ln(U)&&p.has(U.fileId)?pe(U,{status:"error"}):U)),{updatedFiles:h,erroredFiles:p}}),j(this,"addNewImagesToImageCache",async(o=h3(this.scene.getNonDeletedElements()),u=this.files)=>{let h=o.filter(p=>!p.isDeleted&&!this.imageCache.has(p.fileId));if(h.length){let{updatedFiles:p}=await this.updateImageCache(h,u);p.size&&this.scene.triggerUpdate()}}),j(this,"scheduleImageRefresh",Zo(()=>{this.addNewImagesToImageCache()},_M)),j(this,"updateBindingEnabledOnPointerMove",o=>{let u=fP(o);this.state.isBindingEnabled!==u&&this.setState({isBindingEnabled:u})}),j(this,"maybeSuggestBindingAtCursor",(o,u)=>{let h=ra(o,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom,!1,u);this.setState({suggestedBindings:h!=null?[h]:[]})}),j(this,"maybeSuggestBindingsForLinearElementAtCoords",(o,u,h)=>{if(!u.length)return;let p=u.reduce((U,m)=>{let g=ra(m,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom,Q(o),Q(o));return g!=null&&!R7(o,h?.id,g)&&U.push(g),U},[]);this.setState({suggestedBindings:p})}),j(this,"handleInteractiveCanvasRef",o=>{o!==null?(this.interactiveCanvas=o,this.interactiveCanvas.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.interactiveCanvas.addEventListener("touchend",this.onTouchEnd)):(this.interactiveCanvas?.removeEventListener("touchstart",this.onTouchStart),this.interactiveCanvas?.removeEventListener("touchend",this.onTouchEnd))}),j(this,"handleAppOnDrop",async o=>{let{file:u,fileHandle:h}=await c$(o),{x:p,y:U}=Ge(o,this.state);try{if(Or(u)&&this.isToolSupported("image")){if(u?.type===ae.png||u?.type===ae.svg)try{let b=await Kp(u,this.state,this.scene.getElementsIncludingDeleted(),h);this.syncActionResult({...b,appState:{...b.appState||this.state,isLoading:!1},replaceFiles:!0,captureUpdate:B.IMMEDIATELY});return}catch(b){if(b.name!=="EncodingError")throw new Error(M("alerts.couldNotLoadInvalidFile"))}let g=this.createImageElement({sceneX:p,sceneY:U});this.insertImageElement(g,u),this.initializeImageDimensions(g),this.setState({selectedElementIds:De({[g.id]:!0},this.state)});return}}catch(g){return this.setState({isLoading:!1,errorMessage:g.message})}let m=o.dataTransfer.getData(ae.excalidrawlib);if(m&&typeof m=="string"){try{let g=i4(m);this.addElementsFromPasteOrLibrary({elements:ex(g),position:o,files:null})}catch(g){this.setState({errorMessage:g.message})}return}if(u&&await this.loadFileToCanvas(u,h),o.dataTransfer?.types?.includes("text/plain")){let g=o.dataTransfer?.getData("text");if(g&&hd(g,this.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(g)||As(g)?.type==="video")){let b=this.insertEmbeddableElement({sceneX:p,sceneY:U,link:yn(g)});b&&this.setState({selectedElementIds:{[b.id]:!0}})}}}),j(this,"loadFileToCanvas",async(o,u)=>{o=await qp(o);try{let h=this.scene.getElementsIncludingDeleted(),p;try{p=await Zp(o,this.state,h,u)}catch(U){let m=U instanceof _r;if(m&&U.code==="IMAGE_NOT_CONTAINS_SCENE_DATA"&&!this.isToolSupported("image")){this.setState({isLoading:!1,errorMessage:M("errors.imageToolNotSupported")});return}let g=M(m?"alerts.cannotRestoreFromImage":"alerts.couldNotLoadInvalidFile");this.setState({isLoading:!1,errorMessage:g})}if(!p)return;p.type===ae.excalidraw?(Va(h.concat(p.data.elements)),this.store.updateSnapshot(oe(h),this.state),this.setState({isLoading:!0}),this.syncActionResult({...p.data,appState:{...p.data.appState||this.state,isLoading:!1},replaceFiles:!0,captureUpdate:B.IMMEDIATELY})):p.type===ae.excalidrawlib&&await this.library.updateLibrary({libraryItems:o,merge:!0,openLibraryMenu:!0}).catch(U=>{console.error(U),this.setState({errorMessage:M("errors.importLibraryError")})})}catch(h){this.setState({isLoading:!1,errorMessage:h.message})}}),j(this,"handleCanvasContextMenu",o=>{if(o.preventDefault(),("pointerType"in o.nativeEvent&&o.nativeEvent.pointerType==="touch"||"pointerType"in o.nativeEvent&&o.nativeEvent.pointerType==="pen"&&o.button!==Li.SECONDARY)&&this.state.activeTool.type!=="selection")return;let{x:u,y:h}=Ge(o,this.state),p=this.getElementAtPosition(u,h,{preferSelected:!0,includeLockedElements:!0}),U=this.scene.getSelectedElements(this.state),m=this.isHittingCommonBoundingBoxOfSelectedElements({x:u,y:h},U),g=p||m?"element":"canvas",b=this.excalidrawContainerRef.current,{top:x,left:v}=b.getBoundingClientRect(),y=o.clientX-v,w=o.clientY-x;qe("contextMenu","openContextMenu",g),this.setState({...p&&!this.state.selectedElementIds[p.id]?{...this.state,...ln({editingGroupId:this.state.editingGroupId,selectedElementIds:{[p.id]:!0}},this.scene.getNonDeletedElements(),this.state,this),selectedLinearElement:ue(p)?new J(p):null}:this.state,showHyperlinkPopup:!1},()=>{this.setState({contextMenu:{top:w,left:y,items:this.getContextMenuItems(g)}})})}),j(this,"maybeDragNewGenericElement",(o,u,h=!0)=>{let p=this.state.selectionElement,U=o.lastCoords;if(p&&this.state.activeTool.type!=="eraser"){Kg({newElement:p,elementType:this.state.activeTool.type,originX:o.origin.x,originY:o.origin.y,x:U.x,y:U.y,width:Jt(o.origin.x,U.x),height:Jt(o.origin.y,U.y),shouldMaintainAspectRatio:Ml(u),shouldResizeFromCenter:uh(u),zoom:this.state.zoom.value,informMutation:h});return}let m=this.state.newElement;if(!m)return;let[g,b]=Mt(U.x,U.y,u[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),x=Ln(m)&&this.imageCache.get(m.fileId)?.image,v=x&&!(x instanceof Promise)?x.width/x.height:null;this.maybeCacheReferenceSnapPoints(u,[m]);let{snapOffset:y,snapLines:w}=KP(m,this,u,{x:o.originInGrid.x+(this.state.originSnapOffset?.x??0),y:o.originInGrid.y+(this.state.originSnapOffset?.y??0)},{x:g-o.originInGrid.x,y:b-o.originInGrid.y},this.scene.getNonDeletedElementsMap());g+=y.x,b+=y.y,this.setState({snapLines:w}),Kg({newElement:m,elementType:this.state.activeTool.type,originX:o.originInGrid.x,originY:o.originInGrid.y,x:g,y:b,width:Jt(o.originInGrid.x,g),height:Jt(o.originInGrid.y,b),shouldMaintainAspectRatio:Le(m)?!Ml(u):Ml(u),shouldResizeFromCenter:uh(u),zoom:this.state.zoom.value,widthAspectRatio:v,originOffset:this.state.originSnapOffset,informMutation:h}),this.setState({newElement:m}),(this.state.activeTool.type===Dt.frame||this.state.activeTool.type===Dt.magicframe)&&this.setState({elementsToHighlight:Ud(this.scene.getNonDeletedElements(),m,this.state,this.scene.getNonDeletedElementsMap())})}),j(this,"maybeHandleCrop",(o,u)=>{if(!this.state.croppingElementId)return!1;let h=o.resize.handleType,p=o.lastCoords,[U,m]=Mt(p.x-o.resize.offset.x,p.y-o.resize.offset.y,u[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),g=this.scene.getNonDeletedElementsMap().get(this.state.croppingElementId);if(h&&g&&Le(g)){let b=o.originalElements.get(g.id),x=Ln(g)&&this.imageCache.get(g.fileId)?.image;if(b&&Le(b)&&x&&!(x instanceof Promise)){let[v,y]=Mt(p.x,p.y,u[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),w={x:v-o.originInGrid.x,y:y-o.originInGrid.y};this.maybeCacheReferenceSnapPoints(u,[g]);let{snapOffset:k,snapLines:C}=dg([g],[b],this,u,w,h);V(g,PL(g,h,x.naturalWidth,x.naturalHeight,U+k.x,m+k.y,u.shiftKey?b.width/b.height:void 0)),xn(g,this.scene.getNonDeletedElementsMap(),{newSize:{width:g.width,height:g.height}}),this.setState({isCropping:h&&h!=="rotation",snapLines:C})}return!0}return!1}),j(this,"maybeHandleResize",(o,u)=>{let h=this.scene.getSelectedElements(this.state),p=h.filter(v=>ce(v)),U=o.resize.handleType;if(p.length>0&&U==="rotation"||h.length===1&&Q(h[0])||this.state.croppingElementId)return!1;this.setState({isResizing:U&&U!=="rotation",isRotating:U==="rotation",activeEmbeddable:null});let m=o.lastCoords,[g,b]=Mt(m.x-o.resize.offset.x,m.y-o.resize.offset.y,u[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),x=new Map;if(p.forEach(v=>{Ga(this.scene.getNonDeletedElements(),v.id).forEach(y=>{x.set(v.id+y.id,{x:y.x-v.x,y:y.y-v.y})})}),!this.state.selectedElementsAreBeingDragged){let[v,y]=Mt(m.x,m.y,u[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),w={x:v-o.originInGrid.x,y:y-o.originInGrid.y},k=[...o.originalElements.values()];this.maybeCacheReferenceSnapPoints(u,h);let{snapOffset:C,snapLines:I}=dg(h,ve(k,this.state),this,u,w,U);g+=C.x,b+=C.y,this.setState({snapLines:I})}if(zO(o.originalElements,U,h,this.scene.getElementsMapIncludingDeleted(),this.scene,ro(u),uh(u),h.some(v=>Le(v))?!Ml(u):Ml(u),g,b,o.resize.center.x,o.resize.center.y)){let v=hh(h,this.scene.getNonDeletedElementsMap(),this.state.zoom),y=new Set;return p.forEach(w=>{Ud(this.scene.getNonDeletedElements(),w,this.state,this.scene.getNonDeletedElementsMap()).forEach(k=>y.add(k))}),this.setState({elementsToHighlight:[...y],suggestedBindings:v}),!0}return!1}),j(this,"getContextMenuItems",o=>{let u=[];return u.push(K6,Z6),o==="canvas"?this.state.viewModeEnabled?[...u,J6,f0,j5,h0]:[G6,jt,K6,Z6,q6,jt,aH,EX,jt,J6,dX,f0,j5,h0]:(u.push(q6),this.state.viewModeEnabled?[wd,...u]:[jt,Y6,wd,G6,jt,VG,GG,YG,jt,FW,jt,...u,jt,ZH,KH,jt,JH,RY,uX,fX,UX,QH,jt,aX,jt,QB,eH,tH,nH,jt,lX,oX,jt,$W,jt,Yv,hx,jt,lH,wX,jt,mv])}),j(this,"handleWheel",ft(o=>{if(!(o.target instanceof HTMLCanvasElement||o.target instanceof HTMLTextAreaElement||o.target instanceof HTMLIFrameElement)){o[R.CTRL_OR_CMD]&&o.preventDefault();return}if(o.preventDefault(),Ll)return;let{deltaX:u,deltaY:h}=o;if(o.metaKey||o.ctrlKey){let p=Math.sign(h),U=Lu*100,m=Math.abs(h),g=h;m>U&&(g=U*p);let b=this.state.zoom.value-g/100;b+=Math.log10(Math.max(1,this.state.zoom.value))*-p*Math.min(1,m/20),this.translateCanvas(x=>({...jr({viewportX:this.lastViewportPosition.x,viewportY:this.lastViewportPosition.y,nextZoom:ci(b)},x),shouldCacheIgnoreZoom:!0})),this.resetShouldCacheIgnoreZoomDebounced();return}if(o.shiftKey){this.translateCanvas(({zoom:p,scrollX:U})=>({scrollX:U-(h||u)/p.value}));return}this.translateCanvas(({zoom:p,scrollX:U,scrollY:m})=>({scrollX:U-u/p.value,scrollY:m-h/p.value}))})),j(this,"savePointer",(o,u,h)=>{if(!o||!u)return;let{x:p,y:U}=Ge({clientX:o,clientY:u},this.state),m={x:p,y:U,tool:this.state.activeTool.type==="laser"?"laser":"pointer"};this.props.onPointerUpdate?.({pointer:m,button:h,pointersMap:Re.pointers})}),j(this,"resetShouldCacheIgnoreZoomDebounced",Ys(()=>{this.unmounted||this.setState({shouldCacheIgnoreZoom:!1})},300)),j(this,"updateDOMRect",o=>{if(this.excalidrawContainerRef?.current){let u=this.excalidrawContainerRef.current,{width:h,height:p,left:U,top:m}=u.getBoundingClientRect(),{width:g,height:b,offsetTop:x,offsetLeft:v}=this.state;if(h===g&&p===b&&U===v&&m===x){o&&o();return}this.setState({width:h,height:p,offsetLeft:U,offsetTop:m},()=>{o&&o()})}}),j(this,"refresh",()=>{this.setState({...this.getCanvasOffsets()})});let n=za(),{excalidrawAPI:a,viewModeEnabled:i=!1,zenModeEnabled:r=!1,gridModeEnabled:s=!1,objectsSnapModeEnabled:l=!1,theme:c=n.theme,name:d=`${M("labels.untitled")}-${x2()}`}=t;if(this.state={...n,theme:c,isLoading:!0,...this.getCanvasOffsets(),viewModeEnabled:i,zenModeEnabled:r,objectsSnapModeEnabled:l,gridModeEnabled:s??n.gridModeEnabled,name:d,width:window.innerWidth,height:window.innerHeight},this.id=P0(),this.library=new AX(this),this.actionManager=new XW(this.syncActionResult,()=>this.state,()=>this.scene.getElementsIncludingDeleted(),this),this.scene=new xi,this.canvas=document.createElement("canvas"),this.rc=cr.canvas(this.canvas),this.renderer=new $5(this.scene),this.visibleElements=[],this.store=new xN,this.history=new c5,a){let o={updateScene:this.updateScene,updateLibrary:this.library.updateLibrary,addFiles:this.addFiles,resetScene:this.resetScene,getSceneElementsIncludingDeleted:this.getSceneElementsIncludingDeleted,history:{clear:this.resetHistory},scrollToContent:this.scrollToContent,getSceneElements:this.getSceneElements,getAppState:()=>this.state,getFiles:()=>this.files,getName:this.getName,registerAction:u=>{this.actionManager.registerAction(u)},refresh:this.refresh,setToast:this.setToast,id:this.id,setActiveTool:this.setActiveTool,setCursor:this.setCursor,resetCursor:this.resetCursor,updateFrameRendering:this.updateFrameRendering,toggleSidebar:this.toggleSidebar,onChange:u=>this.onChangeEmitter.on(u),onPointerDown:u=>this.onPointerDownEmitter.on(u),onPointerUp:u=>this.onPointerUpEmitter.on(u),onScrollChange:u=>this.onScrollChangeEmitter.on(u),onUserFollow:u=>this.onUserFollowEmitter.on(u)};typeof a=="function"?a(o):console.error("excalidrawAPI should be a function!")}this.excalidrawContainerValue={container:this.excalidrawContainerRef.current,id:this.id},this.fonts=new ui(this.scene),this.history=new c5,this.actionManager.registerAll(L1),this.actionManager.registerAction(BW(this.history,this.store)),this.actionManager.registerAction(HW(this.history,this.store))}onWindowMessage(t){if(t.origin!=="https://player.vimeo.com"&&t.origin!=="https://www.youtube.com")return;let n=null;try{n=JSON.parse(t.data)}catch{}if(n)switch(t.origin){case"https://player.vimeo.com":if(n.method==="paused"){let a=null,i=document.body.querySelectorAll("iframe.excalidraw__embeddable");if(!i)break;for(let r of i)r.contentWindow===t.source&&(a=r.contentWindow);a?.postMessage(JSON.stringify({method:n.value?"play":"pause",value:!0}),"*")}break;case"https://www.youtube.com":if(n.event==="infoDelivery"&&n.info&&n.id&&typeof n.info.playerState=="number"){let a=n.id,i=n.info.playerState;Object.values(Mc).includes(i)&&Kh.set(a,i)}break}}cacheEmbeddableRef(t,n){n&&this.iFrameRefs.set(t.id,n)}getHTMLIFrameElement(t){return this.iFrameRefs.get(t.id)}handleEmbeddableCenterClick(t){if(this.state.activeEmbeddable?.element===t&&this.state.activeEmbeddable?.state==="active"||(setTimeout(()=>{this.setState({activeEmbeddable:{element:t,state:"active"},selectedElementIds:{[t.id]:!0},newElement:null,selectionElement:null})},100),$i(t)))return;let n=this.getHTMLIFrameElement(t);if(n?.contentWindow){if(n.src.includes("youtube")){let a=Kh.get(t.id);switch(a||(Kh.set(t.id,Mc.UNSTARTED),n.contentWindow.postMessage(JSON.stringify({event:"listening",id:t.id}),"*")),a){case Mc.PLAYING:case Mc.BUFFERING:n.contentWindow?.postMessage(JSON.stringify({event:"command",func:"pauseVideo",args:""}),"*");break;default:n.contentWindow?.postMessage(JSON.stringify({event:"command",func:"playVideo",args:""}),"*")}}n.src.includes("player.vimeo.com")&&n.contentWindow.postMessage(JSON.stringify({method:"paused"}),"*")}}isIframeLikeElementCenter(t,n,a,i){return t&&!n.altKey&&!n.shiftKey&&!n.metaKey&&!n.ctrlKey&&(this.state.activeEmbeddable?.element!==t||this.state.activeEmbeddable?.state==="hover"||!this.state.activeEmbeddable)&&a>=t.x+t.width/3&&a<=t.x+2*t.width/3&&i>=t.y+t.height/3&&i<=t.y+2*t.height/3}renderEmbeddables(){let t=this.state.zoom.value,n=this.state.width,a=this.state.height,i=this.scene.getNonDeletedElements().filter(r=>Un(r)&&this.embedsValidationStatus.get(r.id)===!0||$i(r));return f.jsx(f.Fragment,{children:i.map(r=>{let{x:s,y:l}=Nn({sceneX:r.x,sceneY:r.y},this.state),c=du(r,n,a,this.state,this.scene.getNonDeletedElementsMap()),d=this.initializedEmbeds.has(r.id);if(c&&!d&&this.initializedEmbeds.add(r.id),!(c||d))return null;let o;if($i(r)){o=null;let p=(r.customData?.generationData??this.magicGenerations.get(r.id))||{status:"error",message:"No generation data",code:"ERR_NO_GENERATION_DATA"};if(p.status==="done"){let U=p.html;o={intrinsicSize:{w:r.width,h:r.height},type:"document",srcdoc:()=>U}}else if(p.status==="pending")o={intrinsicSize:{w:r.width,h:r.height},type:"document",srcdoc:()=>so(`
|
|
104
|
+
TTD mermaid definition render errror: ${_.message}`,"color: yellow"),qe("ai","mermaid parse failed","ttd"),w(new Error("Generated an invalid diagram :(. You may also try a different prompt."))}}catch(k){let C=k.message;(!C||C==="Failed to fetch")&&(C="Request failed"),w(new Error(C))}finally{h(!1)}},g=S.useRef(m);g.current=m;let[b,x]=S.useState({loaded:!1,api:ne(()=>import("./index-x_yLI1Xq.js").then(k=>k.b5),__vite__mapDeps([59,2,3]),import.meta.url)});S.useEffect(()=>{(async()=>(await b.api,x(k=>({...k,loaded:!0}))))()},[b.api]);let v=S.useRef({elements:[],files:null}),[y,w]=S.useState(null);return f.jsx(ba,{className:"ttd-dialog",onCloseRequest:()=>{n.setOpenDialog(null)},size:1200,title:!1,...t,autofocus:!1,children:f.jsxs(KV,{dialog:"ttd",tab:e,children:["__fallback"in t&&t.__fallback?f.jsx("p",{className:"dialog-mermaid-title",children:M("mermaid.title")}):f.jsxs(ly,{children:[f.jsx(y0,{tab:"text-to-diagram",children:f.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[M("labels.textToDiagram"),f.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"1px 6px",marginLeft:"10px",fontSize:10,borderRadius:"12px",background:"var(--color-promo)",color:"var(--color-surface-lowest)"},children:"AI Beta"})]})}),f.jsx(y0,{tab:"mermaid",children:"Mermaid"})]}),f.jsx(w0,{className:"ttd-dialog-content",tab:"mermaid",children:f.jsx(ZV,{mermaidToExcalidrawLib:b})}),!("__fallback"in t)&&f.jsxs(w0,{className:"ttd-dialog-content",tab:"text-to-diagram",children:[f.jsx("div",{className:"ttd-dialog-desc",children:"Currently we use Mermaid as a middle step, so you'll get best results if you describe a diagram, workflow, flow chart, and similar."}),f.jsxs(ny,{children:[f.jsx(xu,{label:M("labels.prompt"),panelAction:{action:m,label:"Generate",icon:od},onTextSubmitInProgess:u,panelActionDisabled:d.length>vs||p?.rateLimitRemaining===0,renderTopRight:()=>p?f.jsxs("div",{className:"ttd-dialog-rate-limit",style:{fontSize:12,marginLeft:"auto",color:p.rateLimitRemaining===0?"var(--color-danger)":void 0},children:[p.rateLimitRemaining," requests left today"]}):null,renderSubmitShortcut:()=>f.jsx(ry,{}),renderBottomRight:()=>{if(typeof r?.generatedResponse=="string")return f.jsxs("div",{className:"excalidraw-link",style:{marginLeft:"auto",fontSize:14},onClick:()=>{typeof r?.generatedResponse=="string"&&(EU(r.generatedResponse),a({openDialog:{name:"ttd",tab:"mermaid"}}))},children:["View as Mermaid",f.jsx(gf,{icon:od})]});let k=d.length/vs;return k>.8?f.jsxs("div",{style:{marginLeft:"auto",fontSize:12,fontFamily:"monospace",color:k>1?"var(--color-danger)":void 0},children:["Length: ",d.length,"/",vs]}):null},children:f.jsx(ay,{onChange:o,input:l,placeholder:"Describe what you want to see...",onKeyboardSubmit:()=>{g.current()}})}),f.jsx(xu,{label:"Preview",panelAction:{action:()=>{console.info("Panel action clicked"),ty({app:n,data:v})},label:"Insert",icon:od},children:f.jsx(iy,{canvasRef:i,error:y,loaded:b.loaded})})]})]})]})})}),eG=.01,Ei=(e,t)=>!(t==="height"&&q(e)||t==="width"&&q(e)||t==="angle"&&ce(e)),Qt=(e,t)=>{let n=e+t/2;return n-n%t},yu=(e,t,n)=>Object.keys(e).map(a=>({original:(n??t).get(a),latest:t.get(a)})).filter(a=>a.original!==void 0&&a.latest!==void 0),Wo=(e,t,n,a,i,r,s,l=!0)=>{let c=a.get(n.id);if(!c)return;let[d,o]=[n.x+n.width/2,n.y+n.height/2],[u,h]=z(E(n.x,n.y),E(d,o),n.angle),p=e-u,U=t-h,[m,g]=z(E(e,t),E(d+p,o+U),-n.angle);V(c,{x:m,y:g},l),E0(c,a,i,r);let b=ge(n,s);if(b){let x=a.get(b.id);x&&V(x,{x:b.x+p,y:b.y+U},l)}},SU=(e,t)=>{let n=Pr(t).map(a=>tt(e,a).reduce((i,r)=>(i[r.id]=!0,i),{}));return e.filter(a=>!Qs(a)).forEach(a=>{n.push({[a.id]:!0})}),n},E0=(e,t,n,a,i)=>{ue(e)?eu([e],t,n,a,!0,[],i?.zoom):xn(e,t,i)},tG=({label:e,icon:t,dragInputCallback:n,value:a,elements:i,editable:r=!0,shouldKeepAspectRatio:s,property:l,scene:c,appState:d,sensitivity:o=1})=>{let u=va(),h=S.useRef(null),p=S.useRef(null),[U,m]=S.useState(a.toString()),g=S.useRef(null);g.current||(g.current={originalAppState:di(d),originalElements:i,lastUpdatedValue:U,updatePending:!1}),S.useEffect(()=>{let v=a.toString();m(v),g.current.lastUpdatedValue=v},[a]);let b=(v,y,w)=>{if(!g.current.updatePending)return!1;g.current.updatePending=!1;let k=Number(v);if(isNaN(k)){m(a.toString());return}let C=Number(k.toFixed(2)),I=Number(a);(isNaN(I)||Math.abs(C-I)>=eG)&&(g.current.lastUpdatedValue=v,n({accumulatedChange:0,instantChange:0,originalElements:y,originalElementsMap:u.scene.getNonDeletedElementsMap(),shouldKeepAspectRatio:s,shouldChangeByStepSize:!1,scene:c,nextValue:C,property:l,originalAppState:w,setInputValue:A=>m(String(A))}),u.syncActionResult({captureUpdate:B.IMMEDIATELY}))},x=S.useRef({});return x.current.handleInputValue=b,S.useEffect(()=>{let v=h.current,y=x.current;return()=>{let w=v?.value;w&&y.handleInputValue?.(w,g.current.originalElements,g.current.originalAppState),window.removeEventListener("pointermove",y.onPointerMove,!1),window.removeEventListener("pointerup",y.onPointerUp,!1)}},[r]),r?f.jsxs("div",{className:te("drag-input-container",!r&&"disabled"),"data-testid":e,children:[f.jsx("div",{className:"drag-input-label",ref:p,onPointerDown:v=>{if(h.current&&r){document.body.classList.add("excalidraw-cursor-resize"),Number(h.current.value);let y=null,w=u.scene.getNonDeletedElements().reduce((D,L)=>(D.set(L.id,ss(L)),D),new Map),k=i.map(D=>w.get(D.id)),C=di(d),I=0,A=0,_=D=>{if(y&&w!==null&&k!==null){let L=D.clientX-y.x;L!==0&&(A+=L,Math.abs(A)>=o&&(A=Math.sign(A)*Math.floor(Math.abs(A)/o),I+=A,n({accumulatedChange:I,instantChange:A,originalElements:k,originalElementsMap:w,shouldKeepAspectRatio:s,shouldChangeByStepSize:D.shiftKey,property:l,scene:c,originalAppState:C,setInputValue:F=>m(String(F))}),A=0))}y={x:D.clientX,y:D.clientY}},T=()=>{window.removeEventListener("pointermove",_,!1),u.syncActionResult({captureUpdate:B.IMMEDIATELY}),y=null,I=0,A=0,k=null,w=null,document.body.classList.remove("excalidraw-cursor-resize"),window.removeEventListener("pointerup",T,!1)};x.current.onPointerMove=_,x.current.onPointerUp=T,window.addEventListener("pointermove",_,!1),window.addEventListener("pointerup",T,!1)}},onPointerEnter:()=>{p.current&&(p.current.style.cursor="ew-resize")},children:t?f.jsx(gf,{icon:t}):e}),f.jsx("input",{className:"drag-input",autoComplete:"off",spellCheck:"false",onKeyDown:v=>{if(r){let y=v.target;y instanceof HTMLInputElement&&v.key===R.ENTER&&(b(y.value,i,d),u.focusContainer())}},ref:h,value:U,onChange:v=>{g.current.updatePending=!0,m(v.target.value)},onFocus:v=>{v.target.select(),g.current.originalElements=i,g.current.originalAppState=di(d)},onBlur:v=>{U?r&&b(v.target.value,g.current.originalElements,g.current.originalAppState):m(a.toString())},disabled:!r})]}):null},Ii=tG,y5=10,nG=e=>e.type==="image",aG=({accumulatedChange:e,originalElements:t,originalElementsMap:n,shouldKeepAspectRatio:a,shouldChangeByStepSize:i,nextValue:r,property:s,originalAppState:l,instantChange:c,scene:d})=>{let o=d.getNonDeletedElementsMap(),u=t[0],h=o.get(u.id);if(u&&h){let p=a||nG(u),U=u.width/u.height;if(l.croppingElementId===u.id){let v=o.get(u.id);if(!v||!Le(v)||!v.crop)return;let y=v.crop,w={...y},k=v.scale[0]===-1,C=v.scale[1]===-1,{width:I,height:A}=gi(v),_=y.naturalWidth/I,T=y.naturalHeight/A,D=k?y.width+y.x:y.naturalWidth-y.x,L=C?y.height+y.y:y.naturalHeight-y.y,F=Nt*_,P=Nt*T;if(r!==void 0){if(s==="width"){let G=r*_,se=Se(G,F,D);w={...w,width:se,x:k?y.x+y.width-se:y.x}}else if(s==="height"){let G=r*T,se=Se(G,P,L);w={...w,height:se,y:C?y.y+y.height-se:y.y}}V(v,{crop:w,width:w.width/(y.naturalWidth/I),height:w.height/(y.naturalHeight/A)});return}let O=s==="width"?c:0,N=s==="height"?c:0,X=Se(y.width+O,F,D),H=Se(y.height+N,F,L);w={...y,x:k?y.x+y.width-X:y.x,y:C?y.y+y.height-H:y.y,width:X,height:H},V(v,{crop:w,width:w.width/(y.naturalWidth/I),height:w.height/(y.naturalHeight/A)});return}if(r!==void 0){let v=Math.max(s==="width"?r:p?r*U:u.width,Dn),y=Math.max(s==="height"?r:p?r/U:u.height,Dn);Fo(v,y,h,u,o,n,s==="width"?"e":"s",{shouldMaintainAspectRatio:p});return}let m=s==="width"?e:0,g=s==="height"?e:0,b=Math.max(0,u.width+m);s==="width"&&(i?b=Qt(b,y5):b=Math.round(b));let x=Math.max(0,u.height+g);s==="height"&&(i?x=Qt(x,y5):x=Math.round(x)),p&&(s==="width"?x=Math.round(b/U*100)/100:b=Math.round(x*U*100)/100),x=Math.max(Dn,x),b=Math.max(Dn,b),Fo(b,x,h,u,o,n,s==="width"?"e":"s",{shouldMaintainAspectRatio:p})}},iG=({property:e,element:t,scene:n,appState:a})=>{let i=Oa(e==="width"?t.width:t.height,2);if(a.croppingElementId&&a.croppingElementId===t.id&&Le(t)&&t.crop){let{width:r,height:s}=gi(t);if(e==="width"){let l=r/t.crop.naturalWidth;i=Oa(t.crop.width*l,2)}if(e==="height"){let l=s/t.crop.naturalHeight;i=Oa(t.crop.height*l,2)}}return f.jsx(Ii,{label:e==="width"?"W":"H",elements:[t],dragInputCallback:aG,value:i,editable:Ei(t,e),scene:n,appState:a,property:e})},w5=iG,rG=15,sG=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:a,scene:i})=>{let r=i.getNonDeletedElementsMap(),s=i.getNonDeletedElements(),l=t[0];if(l&&!Q(l)){let c=r.get(l.id);if(!c)return;if(a!==void 0){let U=Rr(a);V(c,{angle:U}),E0(c,r,s,i);let m=ge(c,r);m&&!xe(c)&&V(m,{angle:U});return}let d=Math.round(Jo(l.angle)*100)/100,o=Math.round(e),u=(d+o)%360;n&&(u=Qt(u,rG)),u=u<0?u+360:u;let h=Rr(u);V(c,{angle:h}),E0(c,r,s,i);let p=ge(c,r);p&&!xe(c)&&V(p,{angle:h})}},lG=({element:e,scene:t,appState:n,property:a})=>f.jsx(Ii,{label:"A",icon:X8,value:Math.round(Jo(e.angle)%360*100)/100,elements:[e],dragInputCallback:sG,editable:Ei(e,"angle"),scene:t,appState:n,property:a}),oG=lG,E5=4,cG=4,dG=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:a,scene:i})=>{let r=i.getNonDeletedElementsMap(),s=t[0];if(s){let l=r.get(s.id);if(!l||!q(l))return;let c;if(a!==void 0)c=Math.max(Math.round(a),E5);else if(s.type==="text"){let d=Math.round(s.fontSize),o=Math.round(e);c=Math.max(d+o,E5),n&&(c=Qt(c,cG))}c&&(V(l,{fontSize:c}),on(l,i.getContainerElement(l),i.getNonDeletedElementsMap()))}},uG=({element:e,scene:t,appState:n,property:a})=>{let i=q(e)?e:Wn(e)?ge(e,t.getNonDeletedElementsMap()):null;return i?f.jsx(Ii,{label:"F",value:Math.round(i.fontSize*10)/10,elements:[i],dragInputCallback:dG,icon:Bu,appState:n,scene:t,property:a}):null},fG=uG,xs=10,hG=(e,t,n,a)=>{let i=a.x-e,r=a.y-t,s=a.width*n,l=a.height*n,c=e+i*n,d=t+r*n;return{width:s,height:l,x:c,y:d,...Xp(a,s,l,!1),...q(a)?{fontSize:a.fontSize*n}:{}}},pG=(e,t,n,a,i,r,s,l)=>{let c=hG(e,t,a,r);V(i,c,!1);let d=ge(r,l);if(d){let o=d.fontSize*a;xn(i,s,{newSize:{width:c.width,height:c.height}});let u=s.get(d.id);u&&q(u)&&(V(u,{fontSize:o},!1),ic(i,s,n==="width"?"e":"s",!0))}},S5=(e,t,n,a,i,r,s,l,c,d)=>{r==="width"?t=Math.round(e/a*100)/100:e=Math.round(t*a*100)/100;let o=t/n;for(let u=0;u<l.length;u++){let h=l[u],p=s[u];pG(i[0],i[1],r,o,p,h,c,d)}},UG=({accumulatedChange:e,originalElements:t,originalElementsMap:n,originalAppState:a,shouldChangeByStepSize:i,nextValue:r,scene:s,property:l})=>{let c=s.getNonDeletedElementsMap(),d=SU(t,a);if(r!==void 0){for(let h of d){let p=yu(h,c,n);if(p.length>1){let U=p.map(A=>A.latest),m=p.map(A=>A.original),[g,b,x,v]=Ne(m),y=x-g,w=v-b,k=y/w,C=Math.max(Dn,l==="width"?Math.max(0,r):y),I=Math.max(Dn,l==="height"?Math.max(0,r):w);S5(C,I,w,k,E(g,b),l,U,m,c,n)}else{let[U]=p,m=U?.latest,g=U?.original;if(m&&g&&Ei(m,l)){let b=l==="width"?Math.max(0,r):m.width;l==="width"&&(i?b=Qt(b,xs):b=Math.round(b));let x=l==="height"?Math.max(0,r):m.height;l==="height"&&(i?x=Qt(x,xs):x=Math.round(x)),b=Math.max(Dn,b),x=Math.max(Dn,x),Fo(b,x,m,g,c,n,l==="width"?"e":"s",{shouldInformMutation:!1})}}}s.triggerUpdate();return}let o=l==="width"?e:0,u=l==="height"?e:0;for(let h of d){let p=yu(h,c,n);if(p.length>1){let U=p.map(A=>A.latest),m=p.map(A=>A.original),[g,b,x,v]=Ne(m),y=x-g,w=v-b,k=y/w,C=Math.max(0,y+o);l==="width"&&(i?C=Qt(C,xs):C=Math.round(C));let I=Math.max(0,w+u);l==="height"&&(i?I=Qt(I,xs):I=Math.round(I)),C=Math.max(Dn,C),I=Math.max(Dn,I),S5(C,I,w,k,E(g,b),l,U,m,c,n)}else{let[U]=p,m=U?.latest,g=U?.original;if(m&&g&&Ei(m,l)){let b=Math.max(0,g.width+o);l==="width"&&(i?b=Qt(b,xs):b=Math.round(b));let x=Math.max(0,g.height+u);l==="height"&&(i?x=Qt(x,xs):x=Math.round(x)),b=Math.max(Dn,b),x=Math.max(Dn,x),Fo(b,x,m,g,c,n,l==="width"?"e":"s",{shouldInformMutation:!1})}}}s.triggerUpdate()},mG=({property:e,elements:t,elementsMap:n,atomicUnits:a,scene:i,appState:r})=>{let s=S.useMemo(()=>a.map(d=>{let o=yu(d,n);if(o.length>1){let[h,p,U,m]=Ne(o.map(g=>g.latest));return Math.round((e==="width"?U-h:m-p)*100)/100}let[u]=o;return Math.round((e==="width"?u.latest.width:u.latest.height)*100)/100}),[n,a,e]),l=new Set(s).size===1?Math.round(s[0]*100)/100:"Mixed",c=s.length>0;return f.jsx(Ii,{label:e==="width"?"W":"H",elements:t,dragInputCallback:UG,value:l,editable:c,appState:r,property:e,scene:i})},k5=mG,gG=15,bG=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:a,property:i,scene:r})=>{let s=r.getNonDeletedElementsMap(),l=t.map(d=>s.get(d.id)).filter(d=>d&&!Qs(d)&&Ei(d,i)),c=t.filter(d=>!Qs(d)&&Ei(d,i));if(a!==void 0){let d=Rr(a);for(let o of l){if(!o)continue;V(o,{angle:d},!1);let u=ge(o,s);u&&!xe(o)&&V(u,{angle:d},!1)}r.triggerUpdate();return}for(let d=0;d<l.length;d++){let o=l[d];if(!o)continue;let u=c[d],h=Math.round(Jo(u.angle)*100)/100,p=Math.round(e),U=(h+p)%360;n&&(U=Qt(U,gG)),U=U<0?U+360:U;let m=Rr(U);V(o,{angle:m},!1);let g=ge(o,s);g&&!xe(o)&&V(g,{angle:m},!1)}r.triggerUpdate()},vG=({elements:e,scene:t,appState:n,property:a})=>{let i=e.filter(c=>!Qs(c)&&Ei(c,"angle")),r=i.map(c=>Math.round(Jo(c.angle)%360*100)/100),s=new Set(r).size===1?r[0]:"Mixed",l=i.some(c=>Ei(c,"angle"));return f.jsx(Ii,{label:"A",icon:X8,value:s,elements:e,dragInputCallback:bG,editable:l,appState:n,scene:t,property:a})},xG=vG,C5=4,yG=4,wG=(e,t)=>e.reduce((n,a)=>{if(!a||Qs(a))return n;if(q(a))return n.push(a),n;if(Wn(a)){let i=ge(a,t);if(i)return n.push(i),n}return n},[]),EG=({accumulatedChange:e,originalElements:t,shouldChangeByStepSize:n,nextValue:a,scene:i})=>{let r=i.getNonDeletedElementsMap(),s=t.map(c=>r.get(c.id)),l;if(a){l=Math.max(Math.round(a),C5);for(let c of s)V(c,{fontSize:l},!1),on(c,i.getContainerElement(c),r,!1);i.triggerUpdate()}else{let c=t;for(let d=0;d<s.length;d++){let o=s[d],u=c[d],h=Math.round(u.fontSize),p=Math.round(e),U=Math.max(h+p,C5);n&&(U=Qt(U,yG)),V(o,{fontSize:U},!1),on(o,i.getContainerElement(o),r,!1)}i.triggerUpdate()}},SG=({elements:e,scene:t,appState:n,property:a,elementsMap:i})=>{let r=wG(e,i);if(!r.length)return null;let s=r.map(d=>Math.round(d.fontSize*10)/10),l=new Set(s).size===1?s[0]:"Mixed",c=s.length>0;return f.jsx(Ii,{label:"F",icon:Bu,elements:r,dragInputCallback:EG,value:l,editable:c,scene:t,property:a,appState:n})},kG=SG,M5=10,CG=({accumulatedChange:e,instantChange:t,originalElements:n,originalElementsMap:a,shouldChangeByStepSize:i,nextValue:r,property:s,scene:l,originalAppState:c})=>{let d=l.getNonDeletedElementsMap(),o=l.getNonDeletedElements(),u=n[0],[h,p]=[u.x+u.width/2,u.y+u.height/2],[U,m]=z(E(u.x,u.y),E(h,p),u.angle);if(c.croppingElementId===u.id){let y=d.get(u.id);if(!y||!Le(y)||!y.crop)return;let w=y.crop,k=w,C=y.scale[0]===-1,I=y.scale[1]===-1,{width:A,height:_}=gi(y);if(r!==void 0){if(s==="x"){let L=r*(w.naturalWidth/A);C?k={...w,x:Se(w.naturalWidth-L-w.width,0,w.naturalWidth-w.width)}:k={...w,x:Se(r*(w.naturalWidth/A),0,w.naturalWidth-w.width)}}s==="y"&&(k={...w,y:Se(r*(w.naturalHeight/_),0,w.naturalHeight-w.height)}),V(y,{crop:k});return}let T=(s==="x"?t:0)*(C?-1:1),D=(s==="y"?t:0)*(I?-1:1);k={...w,x:Se(w.x+T,0,w.naturalWidth-w.width),y:Se(w.y+D,0,w.naturalHeight-w.height)},V(y,{crop:k});return}if(r!==void 0){Wo(s==="x"?r:U,s==="y"?r:m,u,d,o,l,a);return}let g=s==="x"?e:0,b=s==="y"?e:0,x=s==="x"?Math.round(i?Qt(u.x+g,M5):U+g):U,v=s==="y"?Math.round(i?Qt(u.y+b,M5):m+b):m;Wo(x,v,u,d,o,l,a)},MG=({property:e,element:t,elementsMap:n,scene:a,appState:i})=>{let[r,s]=z(E(t.x,t.y),E(t.x+t.width/2,t.y+t.height/2),t.angle),l=Oa(e==="x"?r:s,2);if(i.croppingElementId===t.id&&Le(t)&&t.crop){let c=FL(t);c&&(l=Oa(e==="x"?c.x:c.y,2))}return f.jsx(Ii,{label:e==="x"?"X":"Y",elements:[t],dragInputCallback:CG,scene:a,value:l,property:e,appState:i})},I5=MG,IG=10,_G=(e,t,n,a,i,r,s,l)=>{for(let c=0;c<a.length;c++){let d=i[c],[o,u]=[d.x+d.width/2,d.y+d.height/2],[h,p]=z(E(d.x,d.y),E(o,u),d.angle),U=e==="x"?Math.round(h+t):h,m=e==="y"?Math.round(p+n):p;Wo(U,m,d,r,a,l,s,!1)}},TG=(e,t,n,a,i,r,s)=>{let[l,c,,]=Ne(n),d=e-l,o=t-c;for(let u=0;u<n.length;u++){let h=n[u],p=a.get(h.id);if(p&&(!q(p)||!p.containerId)){let[U,m]=[p.x+p.width/2,p.y+p.height/2],[g,b]=z(E(p.x,p.y),E(U,m),p.angle);Wo(g+d,b+o,h,a,i,s,r,!1)}}},AG=({accumulatedChange:e,originalElements:t,originalElementsMap:n,shouldChangeByStepSize:a,nextValue:i,property:r,scene:s,originalAppState:l})=>{let c=s.getNonDeletedElementsMap(),d=s.getNonDeletedElements();if(i!==void 0){for(let u of SU(t,l)){let h=yu(u,c,n);if(h.length>1){let[p,U,,]=Ne(h.map(m=>m.latest));TG(r==="x"?i:p,r==="y"?i:U,h.map(m=>m.original),c,d,n,s)}else{let p=h[0]?.original,U=h[0]?.latest;if(p&&U&&Ei(U,r)){let[m,g]=[p.x+p.width/2,p.y+p.height/2],[b,x]=z(E(p.x,p.y),E(m,g),p.angle);Wo(r==="x"?i:b,r==="y"?i:x,p,c,d,s,n,!1)}}}s.triggerUpdate();return}let o=a?Qt(e,IG):e;_G(r,r==="x"?o:0,r==="y"?o:0,t,t,c,n,s),s.triggerUpdate()},jG=({property:e,elements:t,elementsMap:n,atomicUnits:a,scene:i,appState:r})=>{let s=S.useMemo(()=>a.map(c=>{let d=Object.keys(c).map(m=>n.get(m)).filter(m=>m!==void 0);if(d.length>1){let[m,g]=Ne(d);return Math.round((e==="x"?m:g)*100)/100}let[o]=d,[u,h]=[o.x+o.width/2,o.y+o.height/2],[p,U]=z(E(o.x,o.y),E(u,h),o.angle);return Math.round((e==="x"?p:U)*100)/100}),[a,n,e]),l=new Set(s).size===1?s[0]:"Mixed";return f.jsx(Ii,{label:e==="x"?"X":"Y",elements:t,dragInputCallback:AG,value:l,property:e,scene:i,appState:r})},_5=jG,T5=5,RG=({property:e,scene:t,appState:n,setAppState:a})=>f.jsx(Ii,{label:"Grid step",sensitivity:8,elements:[],dragInputCallback:({nextValue:i,instantChange:r,shouldChangeByStepSize:s,setInputValue:l})=>{a(c=>{let d;return i?d=i:r&&(d=s?Qt(c.gridStep+T5*Math.sign(r),T5):c.gridStep+r),d?(d=$7(d),l(d),{gridStep:d}):(l(c.gridStep),null)})},scene:t,value:n.gridStep,property:e,appState:n}),DG=RG,LG=50,Ef=e=>{let t=Uc(),n=e.app.scene.getSceneNonce()||1,a=e.app.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,includeBoundTextElement:!1}),i=No(e.app);return f.jsx(PG,{...e,appState:t,sceneNonce:n,selectedElements:a,gridModeEnabled:i})},et=({children:e,columns:t=1,heading:n,style:a,...i})=>f.jsx("div",{className:te("exc-stats__row",{"exc-stats__row--heading":n}),style:{gridTemplateColumns:`repeat(${t}, 1fr)`,...a},...i,children:e});et.displayName="StatsRow";var wu=({children:e,order:t,style:n,...a})=>f.jsx("div",{className:"exc-stats__rows",style:{order:t,...n},...a,children:e});wu.displayName="StatsRows";Ef.StatsRow=et;Ef.StatsRows=wu;var PG=S.memo(({app:e,onClose:t,renderCustomStats:n,selectedElements:a,appState:i,sceneNonce:r,gridModeEnabled:s})=>{let l=e.scene,c=l.getNonDeletedElements(),d=l.getNonDeletedElementsMap(),o=At(),u=a.length===1?a[0]:null,h=a.length>1?a:null,p=i.croppingElementId&&Le(u),U=p?gi(u):null,[m,g]=S.useState({width:0,height:0}),b=S.useMemo(()=>Zo(y=>{let w=Ne(y);g({width:Math.round(w[2])-Math.round(w[0]),height:Math.round(w[3])-Math.round(w[1])})},LG),[]);S.useEffect(()=>{b(c)},[r,c,b]),S.useEffect(()=>()=>b.cancel(),[b]);let x=S.useMemo(()=>SU(a,i),[a,i]),v=S.useMemo(()=>H3(a),[a]);return f.jsx("div",{className:"exc-stats",children:f.jsxs(ua,{padding:3,children:[f.jsxs("div",{className:"title",children:[f.jsx("h2",{children:M("stats.title")}),f.jsx("div",{className:"close",onClick:t,children:hl})]}),f.jsxs(c0,{label:f.jsx("h3",{children:M("stats.generalStats")}),open:!!(i.stats.panels&Ms.generalStats),openTrigger:()=>o(y=>({stats:{open:!0,panels:y.stats.panels^Ms.generalStats}})),children:[f.jsxs(wu,{children:[f.jsx(et,{heading:!0,children:M("stats.scene")}),f.jsxs(et,{columns:2,children:[f.jsx("div",{children:M("stats.shapes")}),f.jsx("div",{children:c.length})]}),f.jsxs(et,{columns:2,children:[f.jsx("div",{children:M("stats.width")}),f.jsx("div",{children:m.width})]}),f.jsxs(et,{columns:2,children:[f.jsx("div",{children:M("stats.height")}),f.jsx("div",{children:m.height})]}),s&&f.jsxs(f.Fragment,{children:[f.jsx(et,{heading:!0,children:"Canvas"}),f.jsx(et,{children:f.jsx(DG,{property:"gridStep",scene:l,appState:i,setAppState:o})})]})]}),n?.(c,i)]}),!v&&a.length>0&&f.jsx("div",{id:"elementStats",style:{marginTop:12},children:f.jsx(c0,{label:f.jsx("h3",{children:M("stats.elementProperties")}),open:!!(i.stats.panels&Ms.elementProperties),openTrigger:()=>o(y=>({stats:{open:!0,panels:y.stats.panels^Ms.elementProperties}})),children:f.jsxs(wu,{children:[u&&f.jsxs(f.Fragment,{children:[p&&f.jsx(et,{heading:!0,children:M("labels.unCroppedDimension")}),i.croppingElementId&&Le(u)&&U&&f.jsxs(et,{columns:2,children:[f.jsx("div",{children:M("stats.width")}),f.jsx("div",{children:Oa(U.width,2)})]}),i.croppingElementId&&Le(u)&&U&&f.jsxs(et,{columns:2,children:[f.jsx("div",{children:M("stats.height")}),f.jsx("div",{children:Oa(U.height,2)})]}),f.jsx(et,{heading:!0,"data-testid":"stats-element-type",children:i.croppingElementId?M("labels.imageCropping"):M(`element.${u.type}`)}),f.jsx(et,{children:f.jsx(I5,{element:u,property:"x",elementsMap:d,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(I5,{element:u,property:"y",elementsMap:d,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(w5,{property:"width",element:u,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(w5,{property:"height",element:u,scene:l,appState:i})}),!Q(u)&&f.jsx(et,{children:f.jsx(oG,{property:"angle",element:u,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(fG,{property:"fontSize",element:u,scene:l,appState:i})})]}),h&&f.jsxs(f.Fragment,{children:[X7(h)&&f.jsx(et,{heading:!0,children:M("element.group")}),f.jsxs(et,{columns:2,style:{margin:"0.3125rem 0"},children:[f.jsx("div",{children:M("stats.shapes")}),f.jsx("div",{children:a.length})]}),f.jsx(et,{children:f.jsx(_5,{property:"x",elements:h,elementsMap:d,atomicUnits:x,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(_5,{property:"y",elements:h,elementsMap:d,atomicUnits:x,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(k5,{property:"width",elements:h,elementsMap:d,atomicUnits:x,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(k5,{property:"height",elements:h,elementsMap:d,atomicUnits:x,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(xG,{property:"angle",elements:h,scene:l,appState:i})}),f.jsx(et,{children:f.jsx(kG,{property:"fontSize",elements:h,scene:l,appState:i,elementsMap:d})})]})]})})})]})})},(e,t)=>e.sceneNonce===t.sceneNonce&&e.selectedElements===t.selectedElements&&e.appState.stats.panels===t.appState.stats.panels&&e.gridModeEnabled===t.gridModeEnabled&&e.appState.gridStep===t.appState.gridStep&&e.appState.croppingElementId===t.appState.croppingElementId),NG=({sourceElementId:e,onClose:t,elementsMap:n,appState:a,generateLinkForSelection:i=g3})=>{let r=n.get(e)?.link??null,[s,l]=S.useState(r),[c,d]=S.useState(!1);S.useEffect(()=>{let u=ve(n,a),h=r;if(u.length>0&&i){let p=b3(u,a);p&&(h=yn(i(p.id,p.type)))}l(h)},[n,a,a.selectedElementIds,r,i]);let o=S.useCallback(()=>{if(s&&s!==n.get(e)?.link){let u=n.get(e);u&&V(u,{link:s})}if(!s&&c&&e){let u=n.get(e);u&&V(u,{link:null})}t?.()},[e,s,n,c,t]);return S.useEffect(()=>{let u=h=>{a.openDialog?.name==="elementLinkSelector"&&h.key===R.ENTER&&o(),a.openDialog?.name==="elementLinkSelector"&&h.key===R.ESCAPE&&t?.()};return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[a,t,o]),f.jsxs("div",{className:"ElementLinkDialog",children:[f.jsxs("div",{className:"ElementLinkDialog__header",children:[f.jsx("h2",{children:M("elementLink.title")}),f.jsx("p",{children:M("elementLink.desc")})]}),f.jsxs("div",{className:"ElementLinkDialog__input",children:[f.jsx(xU,{value:s??"",onChange:u=>{c||d(!0),l(u)},onKeyDown:u=>{u.key===R.ENTER&&o()},className:"ElementLinkDialog__input-field",selectOnRender:!0}),r&&s&&f.jsx(Me,{type:"button",title:M("buttons.remove"),"aria-label":M("buttons.remove"),label:M("buttons.remove"),onClick:()=>{l(null),d(!0)},className:"ElementLinkDialog__remove",icon:Zr})]}),f.jsxs("div",{className:"ElementLinkDialog__actions",children:[f.jsx(rl,{label:M("buttons.cancel"),onClick:()=>{t?.()},style:{marginRight:10}}),f.jsx(rl,{label:M("buttons.confirm"),onClick:o,actionType:"primary"})]})]})},OG=NG,$G=({UIOptions:e})=>f.jsxs(sn,{__fallback:!0,children:[f.jsx(sn.DefaultItems.LoadScene,{}),f.jsx(sn.DefaultItems.SaveToActiveFile,{}),e.canvasActions.export&&f.jsx(sn.DefaultItems.Export,{}),e.canvasActions.saveAsImage&&f.jsx(sn.DefaultItems.SaveAsImage,{}),f.jsx(sn.DefaultItems.SearchMenu,{}),f.jsx(sn.DefaultItems.Help,{}),f.jsx(sn.DefaultItems.ClearCanvas,{}),f.jsx(sn.Separator,{}),f.jsx(sn.Group,{title:"Excalidraw links",children:f.jsx(sn.DefaultItems.Socials,{})}),f.jsx(sn.Separator,{}),f.jsx(sn.DefaultItems.ToggleTheme,{}),f.jsx(sn.DefaultItems.ChangeCanvasBackground,{})]}),FG=()=>f.jsxs(zh,{__fallback:!0,children:[f.jsx(zh.Actions.SaveToDisk,{}),f.jsx(zh.Actions.ExportToImage,{})]}),zG=({actionManager:e,appState:t,files:n,setAppState:a,elements:i,canvas:r,onLockToggle:s,onHandToolToggle:l,onPenModeToggle:c,showExitZenModeBtn:d,renderTopRightUI:o,renderCustomStats:u,UIOptions:h,onExportImage:p,renderWelcomeScreen:U,children:m,app:g,isCollaborating:b,generateLinkForSelection:x})=>{let v=Tt(),y=IW(),w=y.tunnelsJotai.Provider,[k,C]=gt(mf),I=()=>h.canvasActions.export?f.jsx(SV,{elements:i,appState:t,files:n,actionManager:e,exportOpts:h.canvasActions.export,canvas:r,setAppState:a}):null,A=()=>!h.canvasActions.saveAsImage||t.openDialog?.name!=="imageExport"?null:f.jsx(QW,{elements:i,appState:t,files:n,actionManager:e,onExportImage:p,onCloseRequest:()=>a({openDialog:null}),name:g.getName()}),_=()=>f.jsxs("div",{style:{position:"relative"},children:[f.jsx(y.MainMenuTunnel.Out,{}),U&&f.jsx(y.WelcomeScreenMenuHintTunnel.Out,{})]}),T=()=>f.jsx(Xo,{heading:"selectedShapeActions",className:te("selected-shape-actions zen-mode-transition",{"transition-left":t.zenModeEnabled}),children:f.jsx(ua,{className:Xs.SHAPE_ACTIONS_MENU,padding:2,style:{maxHeight:`${t.height-166}px`},children:f.jsx(dx,{appState:t,elementsMap:g.scene.getNonDeletedElementsMap(),renderAction:e.renderAction,app:g})})}),D=()=>{let O=Vp(t,i),N=t.stats.open&&!t.zenModeEnabled&&!t.viewModeEnabled&&t.openDialog?.name!=="elementLinkSelector";return f.jsx(vx,{side:"top",children:f.jsxs("div",{className:"App-menu App-menu_top",children:[f.jsxs(On.Col,{gap:6,className:te("App-menu_top__left"),children:[_(),O&&T()]}),!t.viewModeEnabled&&t.openDialog?.name!=="elementLinkSelector"&&f.jsx(Xo,{heading:"shapes",className:"shapes-section",children:X=>f.jsxs("div",{style:{position:"relative"},children:[U&&f.jsx(y.WelcomeScreenToolbarHintTunnel.Out,{}),f.jsx(On.Col,{gap:4,align:"start",children:f.jsxs(On.Row,{gap:1,className:te("App-toolbar-container",{"zen-mode":t.zenModeEnabled}),children:[f.jsxs(ua,{padding:1,className:te("App-toolbar",{"zen-mode":t.zenModeEnabled}),children:[f.jsx(wx,{appState:t,isMobile:v.editor.isMobile,device:v,app:g}),X,f.jsxs(On.Row,{gap:1,children:[f.jsx(Sx,{zenModeEnabled:t.zenModeEnabled,checked:t.penMode,onChange:()=>c(null),title:M("toolBar.penMode"),penDetected:t.penDetected}),f.jsx(Ex,{checked:t.activeTool.locked,onChange:s,title:M("toolBar.lock")}),f.jsx("div",{className:"App-toolbar__divider"}),f.jsx(kx,{checked:Vs(t),onChange:()=>l(),title:M("toolBar.hand"),isMobile:!0}),f.jsx(ux,{appState:t,activeTool:t.activeTool,UIOptions:h,app:g})]})]}),b&&f.jsx(ua,{style:{marginLeft:8,alignSelf:"center",height:"fit-content"},children:f.jsx(XV,{title:M("toolBar.laser"),checked:t.activeTool.type===Dt.laser,onChange:()=>g.setActiveTool({type:Dt.laser}),isMobile:!0})})]})})]})}),f.jsxs("div",{className:te("layer-ui__wrapper__top-right zen-mode-transition",{"transition-right":t.zenModeEnabled}),children:[t.collaborators.size>0&&f.jsx(Cx,{collaborators:t.collaborators,userToFollow:t.userToFollow?.socketId||null}),o?.(v.editor.isMobile,t),!t.viewModeEnabled&&t.openDialog?.name!=="elementLinkSelector"&&(!F||t.openSidebar?.name!==oa.name)&&f.jsx(y.DefaultSidebarTriggerTunnel.Out,{}),N&&f.jsx(Ef,{app:g,onClose:()=>{e.executeAction(h0)},renderCustomStats:u})]})]})})},L=()=>f.jsx(x0,{__fallback:!0,onDock:O=>{qe("sidebar",`toggleDock (${O?"dock":"undock"})`,`(${v.editor.isMobile?"mobile":"desktop"})`)}}),F=fv(yU),P=f.jsxs(f.Fragment,{children:[m,f.jsx($G,{UIOptions:h}),f.jsx(x0.Trigger,{__fallback:!0,icon:J0,title:io(M("toolBar.library")),onToggle:O=>{O&&qe("sidebar",`${oa.name} (open)`,`button (${v.editor.isMobile?"mobile":"desktop"})`)},tab:oa.defaultTab,children:M("toolBar.library")}),f.jsx(FG,{}),t.openDialog?.name==="ttd"&&f.jsx(oy,{__fallback:!0}),t.isLoading&&f.jsx(Uv,{delay:250}),t.errorMessage&&f.jsx(GW,{onClose:()=>a({errorMessage:null}),children:t.errorMessage}),k&&!v.editor.isMobile&&f.jsx(wH,{colorPickerType:k.colorPickerType,onCancel:()=>{C(null)},onChange:(O,N,X,{altKey:H})=>{if(!(O!=="elementBackground"&&O!=="elementStroke"))if(X.length){for(let G of X)V(G,{[H&&k.swapPreviewOnAlt?O==="elementBackground"?"strokeColor":"backgroundColor":O==="elementBackground"?"backgroundColor":"strokeColor"]:N},!1),ut.delete(G);xi.getScene(X[0])?.triggerUpdate()}else a(O==="elementBackground"?{currentItemBackgroundColor:N}:{currentItemStrokeColor:N})},onSelect:(O,N)=>{C(X=>X?.keepOpenOnAlt&&N.altKey?X:null),k?.onSelect?.(O,N)}}),t.openDialog?.name==="help"&&f.jsx(bV,{onClose:()=>{a({openDialog:null})}}),f.jsx(RW,{}),t.openDialog?.name==="elementLinkSelector"&&f.jsx(OG,{sourceElementId:t.openDialog.sourceElementId,onClose:()=>{a({openDialog:null})},elementsMap:g.scene.getNonDeletedElementsMap(),appState:t,generateLinkForSelection:x}),f.jsx(y.OverwriteConfirmDialogTunnel.Out,{}),A(),I(),t.pasteDialog.shown&&f.jsx(fV,{setAppState:a,appState:t,onClose:()=>a({pasteDialog:{shown:!1,data:null}})}),v.editor.isMobile&&f.jsx(uV,{app:g,appState:t,elements:i,actionManager:e,renderJSONExportDialog:I,renderImageExportDialog:A,setAppState:a,onLockToggle:s,onHandToolToggle:l,onPenModeToggle:c,renderTopRightUI:o,renderCustomStats:u,renderSidebars:L,device:v,renderWelcomeScreen:U,UIOptions:h}),!v.editor.isMobile&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"layer-ui__wrapper",style:t.openSidebar&&F&&v.editor.canFitSidebar?{width:"calc(100% - var(--right-sidebar-width))"}:{},children:[U&&f.jsx(y.WelcomeScreenCenterTunnel.Out,{}),D(),f.jsx(CV,{appState:t,actionManager:e,showExitZenModeBtn:d,renderWelcomeScreen:U}),t.scrolledOutside&&f.jsx("button",{type:"button",className:"scroll-back-to-content",onClick:()=>{a(O=>({...Lo(i,O)}))},children:M("buttons.scrollBackToContent")})]}),L()]})]});return f.jsx(kv.Provider,{value:t,children:f.jsx(w,{children:f.jsx(lx.Provider,{value:y,children:P})})})},A5=e=>{let{suggestedBindings:t,startBoundElement:n,cursorButton:a,scrollX:i,scrollY:r,...s}=e;return s},BG=(e,t)=>{if(e.children!==t.children)return!1;let{canvas:n,appState:a,...i}=e,{canvas:r,appState:s,...l}=t;return Gt(A5(a),A5(s),{selectedElementIds:Gt,selectedGroupIds:Gt})&&Gt(i,l)},HG=Z.memo(zG,BG),XG=5e3,WG=({message:e,onClose:t,closable:n=!1,duration:a=XG,style:i})=>{let r=S.useRef(0),s=a!==1/0,l=S.useCallback(()=>{s&&(r.current=window.setTimeout(()=>t(),a))},[t,a,s]);return S.useEffect(()=>{if(s)return l(),()=>clearTimeout(r.current)},[l,e,a,s]),f.jsxs("div",{className:"Toast",onMouseEnter:s?()=>clearTimeout(r?.current):void 0,onMouseLeave:s?l:void 0,style:i,children:[f.jsx("p",{className:"Toast__message",children:e}),n&&f.jsx(Me,{icon:hl,"aria-label":"close",type:"icon",onClick:t,className:"close"})]})},j5=Y({name:"viewMode",label:"labels.viewMode",paletteName:"Toggle view mode",icon:ap,viewMode:!0,trackEvent:{category:"canvas",predicate:e=>!e.viewModeEnabled},perform(e,t){return{appState:{...t,viewModeEnabled:!this.checked(t)},captureUpdate:B.EVENTUALLY}},checked:e=>e.viewModeEnabled,predicate:(e,t,n)=>typeof n.viewModeEnabled>"u",keyTest:e=>!e[R.CTRL_OR_CMD]&&e.altKey&&e.code===Te.R}),cy=(e,t)=>{let n=t.scene.getSelectedElements(e);return n.length===1&&ce(n[0])},VG=Y({name:"selectAllElementsInFrame",label:"labels.selectAllElementsInFrame",trackEvent:{category:"canvas"},perform:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t).at(0)||null;if(ce(i)){let r=Ga(Ve(e),i.id).filter(s=>!(s.type==="text"&&s.containerId));return{elements:e,appState:{...t,selectedElementIds:r.reduce((s,l)=>(s[l.id]=!0,s),{})},captureUpdate:B.IMMEDIATELY}}return{elements:e,appState:t,captureUpdate:B.EVENTUALLY}},predicate:(e,t,n,a)=>cy(t,a)}),GG=Y({name:"removeAllElementsFromFrame",label:"labels.removeAllElementsFromFrame",trackEvent:{category:"history"},perform:(e,t,n,a)=>{let i=a.scene.getSelectedElements(t).at(0)||null;return ce(i)?{elements:F3(e,i),appState:{...t,selectedElementIds:{[i.id]:!0}},captureUpdate:B.IMMEDIATELY}:{elements:e,appState:t,captureUpdate:B.EVENTUALLY}},predicate:(e,t,n,a)=>cy(t,a)});Y({name:"updateFrameRendering",label:"labels.updateFrameRendering",viewMode:!0,trackEvent:{category:"canvas"},perform:(e,t)=>({elements:e,appState:{...t,frameRendering:{...t.frameRendering,enabled:!t.frameRendering.enabled}},captureUpdate:B.EVENTUALLY}),checked:e=>e.frameRendering.enabled});Y({name:"setFrameAsActiveTool",label:"toolBar.frame",trackEvent:{category:"toolbar"},icon:V8,viewMode:!1,perform:(e,t,n,a)=>{let i=Et(t,{type:"frame"});return Ca(a.interactiveCanvas,{...t,activeTool:i}),{elements:e,appState:{...t,activeTool:Et(t,{type:"frame"})},captureUpdate:B.EVENTUALLY}},keyTest:e=>!e[R.CTRL_OR_CMD]&&!e.shiftKey&&!e.altKey&&e.key.toLocaleLowerCase()===R.F});var YG=Y({name:"wrapSelectionInFrame",label:"labels.wrapSelectionInFrame",trackEvent:{category:"element"},predicate:(e,t,n,a)=>{let i=ve(e,t);return i.length>0&&!i.some(r=>ce(r))},perform:(e,t,n,a)=>{let i=ve(e,t),[r,s,l,c]=Ne(i,a.scene.getNonDeletedElementsMap()),d=16,o=mp({x:r-d,y:s-d,width:l-r+d*2,height:c-s+d*2});if(t.editingGroupId){let u=tt(i,t.editingGroupId);for(let h of u){let p=h.groupIds.indexOf(t.editingGroupId);V(h,{groupIds:h.groupIds.slice(0,p)},!1)}}return{elements:lo([...a.scene.getElementsIncludingDeleted(),o],i,o,t),appState:{selectedElementIds:{[o.id]:!0}},captureUpdate:B.IMMEDIATELY}}}),ZG=()=>f.jsxs("div",{"data-testid":"brave-measure-text-error",children:[f.jsx("p",{children:f.jsx(Pa,{i18nKey:"errors.brave_measure_text_error.line1",bold:e=>f.jsx("span",{style:{fontWeight:600},children:e})})}),f.jsx("p",{children:f.jsx(Pa,{i18nKey:"errors.brave_measure_text_error.line2",bold:e=>f.jsx("span",{style:{fontWeight:600},children:e})})}),f.jsx("p",{children:f.jsx(Pa,{i18nKey:"errors.brave_measure_text_error.line3",link:e=>f.jsx("a",{href:"http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser",children:e})})}),f.jsx("p",{children:f.jsx(Pa,{i18nKey:"errors.brave_measure_text_error.line4",issueLink:e=>f.jsx("a",{href:"https://github.com/excalidraw/excalidraw/issues/new",children:e}),discordLink:e=>f.jsxs("a",{href:"https://discord.gg/UexuTaE",children:[e,"."]})})})]}),KG=ZG,Wc={width:100,height:0},Gi=100,qG=(e,t,n)=>{let a=_n({x:0,y:0,textAlign:Io.CENTER,verticalAlign:Mn.MIDDLE,...t,containerId:e.id,strokeColor:t.strokeColor||e.strokeColor});return Object.assign(e,{boundElements:(e.boundElements||[]).concat({type:"text",id:a.id})}),on(a,e,n),[e,a]},R5=(e,t,n,a,i)=>{let r,s;if(Object.assign(e,{startBinding:e?.startBinding||null,endBinding:e.endBinding||null}),t){let o=t?.width??Gi,u=t?.height??Gi,h;t.id&&(h=a.getElement(t.id),h||console.error(`No element for start binding with id ${t.id} found`));let p=t.x||e.x-o,U=t.y||e.y-u/2,m=h?h.type:t.type;if(m){if(m==="text"){let g="";h&&h.type==="text"?g=h.text:t.type==="text"&&(g=t.text),g||console.error(`No text found for start binding text element for ${e.id}`),r=_n({x:p,y:U,type:"text",...h,...t,text:g}),Object.assign(r,{x:t.x||e.x-r.width,y:t.y||e.y-r.height/2})}else switch(m){case"rectangle":case"ellipse":case"diamond":{r=Xa({x:p,y:U,width:o,height:u,...h,...t,type:m});break}default:Gr(e,`Unhandled element start type "${t.type}"`,!0)}Ba(e,r,"start",i)}}if(n){let o=n?.height??Gi,u=n?.width??Gi,h;n.id&&(h=a.getElement(n.id),h||console.error(`No element for end binding with id ${n.id} found`));let p=n.x||e.x+e.width,U=n.y||e.y-o/2,m=h?h.type:n.type;if(m){if(m==="text"){let g="";h&&h.type==="text"?g=h.text:n.type==="text"&&(g=n.text),g||console.error(`No text found for end binding text element for ${e.id}`),s=_n({x:p,y:U,type:"text",...h,...n,text:g}),Object.assign(s,{y:n.y||e.y-s.height/2})}else switch(m){case"rectangle":case"ellipse":case"diamond":{s=Xa({x:p,y:U,width:u,height:o,...h,...n,type:m});break}default:Gr(e,`Unhandled element end type "${m}"`,!0)}Ba(e,s,"end",i)}}if(e.points.length<2)return{linearElement:e,startBoundElement:r,endBoundElement:s};let l=e.points.length-1,c=.5,d=di(e.points);return e.points[l][0]>e.points[l-1][0]&&(d[0][0]=c,d[l][0]-=c),e.points[l][0]<e.points[l-1][0]&&(d[0][0]=-c,d[l][0]+=c),e.points[l][1]>e.points[l-1][1]&&(d[0][1]=c,d[l][1]-=c),e.points[l][1]<e.points[l-1][1]&&(d[0][1]=-c,d[l][1]+=c),Object.assign(e,{points:d}),{linearElement:e,startBoundElement:r,endBoundElement:s}},JG=class{constructor(){j(this,"excalidrawElements",new Map),j(this,"add",e=>{e&&this.excalidrawElements.set(e.id,e)}),j(this,"getElements",()=>Va(Array.from(this.excalidrawElements.values()))),j(this,"getElementsMap",()=>Hn(oe(this.getElements()))),j(this,"getElement",e=>this.excalidrawElements.get(e))}},Eu=(e,t)=>{if(!e)return[];let n=di(e),a=new JG,i=new Map,r=new Map;for(let l of n){let c,d=l.id;switch(t?.regenerateIds!==!1&&Object.assign(l,{id:Vn()}),l.type){case"rectangle":case"ellipse":case"diamond":{let o=l?.label?.text&&l.width===void 0?0:l?.width||Gi,u=l?.label?.text&&l.height===void 0?0:l?.height||Gi;c=Xa({...l,width:o,height:u});break}case"line":{let o=l.width||Wc.width,u=l.height||Wc.height;c=Nr({width:o,height:u,points:[E(0,0),E(o,u)],...l});break}case"arrow":{let o=l.width||Wc.width,u=l.height||Wc.height;c=gp({width:o,height:u,endArrowhead:"arrow",points:[E(0,0),E(o,u)],...l,type:"arrow"}),Object.assign(c,Js(c.points));break}case"text":{let o=l?.fontFamily||dr,u=l?.fontSize||ki,h=l?.lineHeight||qr(o),p=l.text??"",U=Zs(p),m=an(U,Xe({fontFamily:o,fontSize:u}),h);c=_n({width:m.width,height:m.height,fontFamily:o,fontSize:u,...l});break}case"image":{c=t3({width:l?.width||Gi,height:l?.height||Gi,...l});break}case"frame":{c=mp({x:0,y:0,...l});break}case"magicframe":{c=P1({x:0,y:0,...l});break}case"freedraw":case"iframe":case"embeddable":{c=l;break}default:c=l,Gr(l,`Unhandled element type "${l.type}"`,!0)}a.getElement(c.id)?console.error(`Duplicate id found for ${c.id}`):(a.add(c),i.set(c.id,l),d&&r.set(d,c.id))}let s=a.getElementsMap();for(let[l,c]of i){let d=a.getElement(l);switch(c.type){case"rectangle":case"ellipse":case"diamond":case"arrow":{if(c.label?.text){let[o,u]=qG(d,c?.label,s);if(a.add(o),a.add(u),xe(o)){let h=c.type==="arrow"?c?.start:void 0,p=c.type==="arrow"?c?.end:void 0;if(h&&h.id){let b=r.get(h.id);b&&Object.assign(h,{id:b})}if(p&&p.id){let b=r.get(p.id);b&&Object.assign(p,{id:b})}let{linearElement:U,startBoundElement:m,endBoundElement:g}=R5(o,h,p,a,s);o=U,a.add(U),a.add(m),a.add(g)}}else switch(c.type){case"arrow":{let{start:o,end:u}=c;if(o&&o.id){let m=r.get(o.id);Object.assign(o,{id:m})}if(u&&u.id){let m=r.get(u.id);Object.assign(u,{id:m})}let{linearElement:h,startBoundElement:p,endBoundElement:U}=R5(d,o,u,a,s);a.add(h),a.add(p),a.add(U);break}}break}}}for(let[l,c]of i){if(c.type!=="frame"&&c.type!=="magicframe")continue;let d=a.getElement(l);if(!d)throw new Error(`Excalidraw element with id ${l} doesn't exist`);let o=[];c.children.forEach(y=>{let w=r.get(y);if(!w)throw new Error(`Element with ${y} wasn't mapped correctly`);let k=a.getElement(w);if(!k)throw new Error(`Frame element with id ${w} doesn't exist`);Object.assign(k,{frameId:d.id}),k?.boundElements?.forEach(C=>{let I=a.getElement(C.id);if(!I)throw new Error(`Bound element with id ${C.id} doesn't exist`);Object.assign(I,{frameId:d.id}),o.push(I)}),o.push(k)});let[u,h,p,U]=Ne(o),m=10;u=u-m,h=h-m,p=p+m,U=U+m;let g=d?.x||u,b=d?.y||h,x=d?.width||p-u,v=d?.height||U-h;Object.assign(d,{x:g,y:b,width:x,height:v}),S8()&&c.children.length&&(d?.x||d?.y||d?.width||d?.height)&&console.info("User provided frame attributes are being considered, if you find this inaccurate, please remove any of the attributes - x, y, width and height so frame coordinates and dimensions are calculated automatically")}return a.getElements()},ft=e=>t=>{Ft.unstable_batchedUpdates(e,t)},Hh=e=>Nu(t=>{Ft.unstable_batchedUpdates(e,t)}),kU=(()=>{let e;try{let n=S.version.split(".");e=Number(n[0])>17}catch{e=!1}let t=!1;return()=>window.EXCALIDRAW_THROTTLE_RENDER===!0?e?!0:(t||(t=!0,console.warn("Excalidraw: render throttling is disabled on React versions < 18.")),!1):!1})(),QG="#ff6b6b",eY="#ff0000",D5=1,L5=2,tY=(e,t)=>{if(!t.snapLines.length)return;let n=t.theme===Ce.LIGHT||t.zenModeEnabled?QG:eY,a=(t.zenModeEnabled?D5*1.5:D5)/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY);for(let i of t.snapLines)i.type==="pointer"?(e.lineWidth=a,e.strokeStyle=n,aY(i,e,t)):i.type==="gap"?(e.lineWidth=a,e.strokeStyle=n,iY(i.points[0],i.points[1],i.direction,t,e)):i.type==="points"&&(e.lineWidth=a,e.strokeStyle=n,nY(i,e,t));e.restore()},nY=(e,t,n)=>{if(!n.zenModeEnabled){let a=e.points[0],i=e.points[e.points.length-1];jn(a,i,t)}for(let a of e.points)dy(a,n,t)},aY=(e,t,n)=>{dy(e.points[0],n,t),n.zenModeEnabled||jn(e.points[0],e.points[1],t)},dy=([e,t],n,a)=>{a.save();let i=(n.zenModeEnabled?L5*1.5:L5)/n.zoom.value;a.beginPath(),a.moveTo(e-i,t-i),a.lineTo(e+i,t+i),a.moveTo(e+i,t-i),a.lineTo(e-i,t+i),a.stroke(),a.restore()},jn=(e,t,n)=>{n.beginPath(),n.lineTo(e[0],e[1]),n.lineTo(t[0],t[1]),n.stroke()},iY=(e,t,n,a,i)=>{let r=8/a.zoom.value,s=r/2,l=r/4;if(n==="horizontal"){let c=[(e[0]+t[0])/2,e[1]];a.zenModeEnabled||jn(E(e[0],e[1]-r),E(e[0],e[1]+r),i),jn(E(c[0]-l,c[1]-s),E(c[0]-l,c[1]+s),i),jn(E(c[0]+l,c[1]-s),E(c[0]+l,c[1]+s),i),a.zenModeEnabled||(jn(E(t[0],t[1]-r),E(t[0],t[1]+r),i),jn(e,t,i))}else{let c=[e[0],(e[1]+t[1])/2];a.zenModeEnabled||jn(E(e[0]-r,e[1]),E(e[0]+r,e[1]),i),jn(E(c[0]-s,c[1]-l),E(c[0]+s,c[1]-l),i),jn(E(c[0]-s,c[1]+l),E(c[0]+s,c[1]+l),i),a.zenModeEnabled||(jn(E(t[0]-r,t[1]),E(t[0]+r,t[1]),i),jn(e,t,i))}},rY=(e,t)=>{nn(t.selectedLinearElement,"selectedLinearElement is null");let{segmentMidPointHoveredCoords:n}=t.selectedLinearElement;nn(n,"midPointCoords is null"),e.save(),e.translate(t.scrollX,t.scrollY),uy(n,e,t),e.restore()},sY=(e,t,n)=>{let{elementId:a,hoverPointIndex:i}=t.selectedLinearElement;if(t.editingLinearElement?.selectedPointsIndices?.includes(i))return;let r=J.getElement(a,n);if(!r)return;let s=J.getPointAtIndexGlobalCoordinates(r,i,n);e.save(),e.translate(t.scrollX,t.scrollY),uy(s,e,t),e.restore()},uy=(e,t,n)=>{t.fillStyle="rgba(105, 101, 219, 0.4)",tf(t,e[0],e[1],J.POINT_HANDLE_SIZE/n.zoom.value,!1)},hc=(e,t,n,a,i,r,s,l,c=!1,d=0)=>{e.save(),e.translate(r,s),e.rotate(l),c&&e.fillRect(t-r,n-s,a,i),d&&e.roundRect?(e.beginPath(),e.roundRect(t-r,n-s,a,i,d),e.stroke(),e.closePath()):e.strokeRect(t-r,n-s,a,i),e.restore()},lY=(e,t,n,a,i,r)=>{e.save(),e.translate(a,i),e.rotate(r),e.beginPath(),e.moveTo(0,n/2),e.lineTo(t/2,0),e.lineTo(0,-n/2),e.lineTo(-t/2,0),e.closePath(),e.stroke(),e.restore()},Xh=(e,t,n,a,i,r=!1)=>{e.strokeStyle="#5e5ad8",e.setLineDash([]),e.fillStyle="rgba(255, 255, 255, 0.9)",i?e.fillStyle="rgba(134, 131, 226, 0.9)":r&&(e.fillStyle="rgba(177, 151, 252, 0.7)"),tf(e,n[0],n[1],a/t.zoom.value,!r)},oY=(e,t,n,a,i,r)=>{e.beginPath(),e.ellipse(a,i,t/2,n/2,r,0,Math.PI*2),e.stroke()},cY=(e,t,n,a)=>{let[i,r,s,l]=he(t,n),c=s-i,d=l-r;e.strokeStyle="rgba(0,0,0,.05)";let o=a.value<1?a.value:1;e.lineWidth=fp/o;let u=e.lineWidth/2+hp,h=ca(Math.min(t.width,t.height),t);switch(t.type){case"rectangle":case"text":case"image":case"iframe":case"embeddable":case"frame":case"magicframe":hc(e,i-u,r-u,c+u*2,d+u*2,i+c/2,r+d/2,t.angle,void 0,h);break;case"diamond":let p=Math.hypot(c,d),U=u*p/d,m=u*p/c;lY(e,c+U*2,d+m*2,i+c/2,r+d/2,t.angle);break;case"ellipse":oY(e,c+u*2,d+u*2,i+c/2,r+d/2,t.angle);break}},dY=(e,t,n,a)=>{let[i,r,s]=t,l=ac(s,s.width,s.height,a);e.strokeStyle="rgba(0,0,0,0)",e.fillStyle="rgba(0,0,0,.05)",(r==="both"?[0,-1]:r==="start"?[0]:[-1]).forEach(c=>{let[d,o]=J.getPointAtIndexGlobalCoordinates(i,c,n);tf(e,d,o,l)})},fy=(e,t,n)=>{let{angle:a,x1:i,y1:r,x2:s,y2:l,selectionColors:c,cx:d,cy:o,dashed:u,activeEmbeddable:h}=n,p=s-i,U=l-r,m=(n.padding??Wr*2)/t.zoom.value,g=8/t.zoom.value,b=4/t.zoom.value;e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=(h?4:1)/t.zoom.value;let x=c.length;for(let v=0;v<x;++v)e.strokeStyle=c[v],u&&e.setLineDash([g,b+(g+b)*(x-1)]),e.lineDashOffset=(g+b)*v,hc(e,i-m,r-m,p+m*2,U+m*2,d,o,a);e.restore()},uY=(e,t,n,a)=>{let i=Array.isArray(n)?dY:cY;e.save(),e.translate(t.scrollX,t.scrollY),i(e,n,a,t.zoom),e.restore()},fY=(e,t,n,a)=>{let[i,r,s,l]=he(n,a),c=s-i,d=l-r;e.strokeStyle="rgb(0,118,255)",e.lineWidth=ct.strokeWidth/t.zoom.value,e.save(),e.translate(t.scrollX,t.scrollY),hc(e,i,r,c,d,i+c/2,r+d/2,n.angle,!1,ct.radius/t.zoom.value),e.restore()},hY=(e,t,n)=>{let a=n.filter(l=>l.groupIds.length===0),i=n.filter(l=>l.groupIds.length>0),r=l=>{let[c,d,o,u]=Ne(l);return{angle:0,x1:c,x2:o,y1:d,y2:u,selectionColors:["rgb(0,118,255)"],dashed:!1,cx:c+(o-c)/2,cy:d+(u-d)/2,activeEmbeddable:!1}},s=l=>{let c=tt(n,l);return r(c)};Object.entries(H7(i,t)).filter(([l,c])=>c).map(([l,c])=>l).map(l=>s(l)).concat(a.map(l=>r([l]))).forEach(l=>fy(e,t,l))},Wh=(e,t,n,a)=>{if(!t.selectedLinearElement)return;e.save(),e.translate(t.scrollX,t.scrollY),e.lineWidth=1/t.zoom.value;let i=J.getPointsGlobalCoordinates(n,a),{POINT_HANDLE_SIZE:r}=J,s=t.editingLinearElement?r:r/2;if(i.forEach((l,c)=>{if(Q(n)&&c!==0&&c!==i.length-1)return;let d=!!t.editingLinearElement?.selectedPointsIndices?.includes(c);Xh(e,t,l,s,d)}),Q(n)){let l=n.fixedSegments?.map(c=>c.index)||[];i.slice(0,-1).forEach((c,d)=>{J.isSegmentTooShort(n,i[d+1],i[d],d,t.zoom)||Xh(e,t,E((c[0]+i[d+1][0])/2,(c[1]+i[d+1][1])/2),r/2,!1,!l.includes(d+1))})}else J.getEditorMidPoints(n,a,t).filter((l,c,d)=>l!==null&&!(Q(n)&&(c===0||c===d.length-1))).forEach(l=>{(t.editingLinearElement||i.length===2)&&Xh(e,t,l,r/2,!1,!0)});e.restore()},P5=(e,t,n,a,i)=>{Object.keys(a).forEach(r=>{let s=a[r];if(s!==void 0){let[l,c,d,o]=s;e.save(),e.lineWidth=1/n.zoom.value,t.selectionColor&&(e.strokeStyle=t.selectionColor),r==="rotation"?tf(e,l+d/2,c+o/2,d/2):e.roundRect?(e.beginPath(),e.roundRect(l,c,d,o,2/n.zoom.value),e.fill(),e.stroke()):hc(e,l,c,d,o,l+d/2,c+o/2,i,!0),e.restore()}})},pY=(e,t,n,a,i)=>{let[r,s,,,l,c]=he(a,i),d=3,o=20,u=d/n.zoom.value,h=u/2,p=l-r+u,U=c-s+u,m=Math.min(o/n.zoom.value,p),g=Math.min(o/n.zoom.value,U);e.save(),e.fillStyle=t.selectionColor,e.strokeStyle=t.selectionColor,e.lineWidth=u,[[[-p,-U],[0,h],[m,h],[h,0],[h,g]],[[p-h,-U],[h,h],[-m+h,h],[0,0],[0,g]],[[-p,U],[0,-h],[m,-h],[h,0],[h,-g]],[[p-h,U],[h,-h],[-m+h,-h],[0,0],[0,-g]]].forEach(b=>{let[[x,v],[y,w],[k,C],[I,A],[_,T]]=b;e.save(),e.translate(l,c),e.rotate(a.angle),e.beginPath(),e.moveTo(x+y,v+w),e.lineTo(x+k,v+C),e.stroke(),e.beginPath(),e.moveTo(x+I,v+A),e.lineTo(x+_,v+T),e.stroke(),e.restore()}),e.restore()},UY=(e,t,n,a)=>{t.save();let i=Wr*2/n.zoom.value,r=e.width+i*2,s=e.height+i*2,l=e.x+r/2,c=e.y+s/2,d=-(r/2+i),o=-(s/2+i);t.translate(l+n.scrollX,c+n.scrollY),t.rotate(e.angle),t.lineWidth=1/n.zoom.value,t.strokeStyle=a,t.strokeRect(d,o,r,s),t.restore()},hy=({canvas:e,elementsMap:t,visibleElements:n,selectedElements:a,allElementsMap:i,scale:r,appState:s,renderConfig:l,device:c})=>{if(e===null)return{atLeastOneVisibleElement:!1,elementsMap:t};let[d,o]=wp(e,r),u=Ep({canvas:e,scale:r,normalizedWidth:d,normalizedHeight:o});u.save(),u.scale(s.zoom.value,s.zoom.value);let h;if(n.forEach(m=>{s.editingLinearElement?.elementId===m.id&&m&&(h=m)}),h&&Wh(u,s,h,t),s.selectionElement&&!s.isCropping)try{WL(s.selectionElement,u,s,l.selectionColor)}catch(m){console.error(m)}if(s.editingTextElement&&q(s.editingTextElement)){let m=i.get(s.editingTextElement.id);m&&!m.autoResize&&UY(m,u,s,l.selectionColor)}s.isBindingEnabled&&s.suggestedBindings.filter(m=>m!=null).forEach(m=>{uY(u,s,m,t)}),s.frameToHighlight&&fY(u,s,s.frameToHighlight,t),s.elementsToHighlight&&hY(u,s,s.elementsToHighlight);let p=a.some(m=>ce(m));if(a.length===1&&s.editingLinearElement?.elementId===a[0].id&&Wh(u,s,a[0],t),Q(a[0])&&s.selectedLinearElement&&s.selectedLinearElement.segmentMidPointHoveredCoords?rY(u,s):s.selectedLinearElement&&s.selectedLinearElement.hoverPointIndex>=0&&!(Q(a[0])&&s.selectedLinearElement.hoverPointIndex>0&&s.selectedLinearElement.hoverPointIndex<a[0].points.length-1)&&sY(u,s,t),!s.multiElement&&!s.editingLinearElement){let m=Z3(a,s),g=a.length===1&&ue(a[0]);g&&s.selectedLinearElement?.elementId===a[0].id&&!a[0].locked&&Wh(u,s,a[0],t);let b=l.selectionColor||Bt.black;if(m){let x=oe(a),v=[];for(let w of t.values()){let k=[],C=l.remoteSelectedElementIds.get(w.id);if(g&&Q(w)&&(w.startBinding||w.endBinding)||(x.has(w.id)&&!z7(s,w)&&k.push(b),C&&k.push(...C.map(I=>yf(I,s.collaborators.get(I))))),k.length){let[I,A,_,T,D,L]=he(w,t,!0);v.push({angle:w.angle,x1:I,y1:A,x2:_,y2:T,selectionColors:k,dashed:!!C,cx:D,cy:L,activeEmbeddable:s.activeEmbeddable?.element===w&&s.activeEmbeddable.state==="active",padding:w.id===s.croppingElementId||Le(w)?0:void 0})}}let y=w=>{let k=tt(t,w),[C,I,A,_]=Ne(k);v.push({angle:0,x1:C,x2:A,y1:I,y2:_,selectionColors:[Bt.black],dashed:!0,cx:C+(A-C)/2,cy:I+(_-I)/2,activeEmbeddable:!1})};for(let w of Pr(s))y(w);s.editingGroupId&&y(s.editingGroupId),v.forEach(w=>fy(u,s,w))}if(u.save(),u.translate(s.scrollX,s.scrollY),a.length===1){u.fillStyle=Bt.white;let x=Y3(a[0],s.zoom,t,"mouse",oo(c));if(!s.viewModeEnabled&&m&&!q(s.editingTextElement)&&!s.croppingElementId&&P5(u,l,s,x,a[0].angle),s.croppingElementId&&!s.isCropping){let v=t.get(s.croppingElementId);v&&Le(v)&&pY(u,l,s,v,t)}}else if(a.length>1&&!s.isRotating){let x=Wr*2/s.zoom.value;u.fillStyle=Bt.white;let[v,y,w,k]=Ne(a),C=u.getLineDash();u.setLineDash([2/s.zoom.value]);let I=u.lineWidth;u.lineWidth=1/s.zoom.value,u.strokeStyle=b,hc(u,v-x,y-x,w-v+x*2,k-y+x*2,(v+w)/2,(y+k)/2,0),u.lineWidth=I,u.setLineDash(C);let A=Hp([v,y,w,k,(v+w)/2,(y+k)/2],0,s.zoom,"mouse",p?{...oo(c),rotation:!0}:oo(c));a.some(_=>!_.locked)&&P5(u,l,s,A,0)}u.restore()}s.searchMatches.forEach(({id:m,focus:g,matchedLines:b})=>{let x=t.get(m);if(x&&q(x)){let[v,y,,,w,k]=he(x,t,!0);u.save(),s.theme===Ce.LIGHT?g?u.fillStyle="rgba(255, 124, 0, 0.4)":u.fillStyle="rgba(255, 226, 0, 0.4)":g?u.fillStyle="rgba(229, 82, 0, 0.4)":u.fillStyle="rgba(99, 52, 0, 0.4)",u.translate(s.scrollX,s.scrollY),u.translate(w,k),u.rotate(x.angle),b.forEach(C=>{u.fillRect(v+C.offsetX-w,y+C.offsetY-k,C.width,C.height)}),u.restore()}}),tY(u,s),u.restore(),nX({context:u,renderConfig:l,appState:s,normalizedWidth:d,normalizedHeight:o});let U;return l.renderScrollbars&&(U=cV(n,d,o,s),u.save(),u.fillStyle=oV,u.strokeStyle="rgba(255,255,255,0.8)",[U.horizontal,U.vertical].forEach(m=>{m&&Bv(u,m.x,m.y,m.width,m.height,Vi/2)}),u.restore()),{scrollBars:U,atLeastOneVisibleElement:n.length>0,elementsMap:t}},py=Nu(e=>{let t=hy(e);e.callback?.(t)},{trailing:!0}),mY=(e,t)=>{if(t){py(e);return}let n=hy(e);return e.callback(n),n},gY=e=>{let t=S.useRef(!1);return S.useEffect(()=>{if(!t.current){t.current=!0;return}let n=new Map,a=new Map,i=new Map,r=new Map,s=new Map;e.appState.collaborators.forEach((c,d)=>{if(c.selectedElementIds)for(let o of Object.keys(c.selectedElementIds))i.has(o)||i.set(o,[]),i.get(o).push(d);!c.pointer||c.pointer.renderCursor===!1||(c.username&&r.set(d,c.username),c.userState&&s.set(d,c.userState),a.set(d,Nn({sceneX:c.pointer.x,sceneY:c.pointer.y},e.appState)),n.set(d,c.button))});let l=e.containerRef?.current&&getComputedStyle(e.containerRef.current).getPropertyValue("--color-selection")||"#6965db";mY({canvas:e.canvas,elementsMap:e.elementsMap,visibleElements:e.visibleElements,selectedElements:e.selectedElements,allElementsMap:e.allElementsMap,scale:window.devicePixelRatio,appState:e.appState,renderConfig:{remotePointerViewportCoords:a,remotePointerButton:n,remoteSelectedElementIds:i,remotePointerUsernames:r,remotePointerUserStates:s,selectionColor:l,renderScrollbars:!1},device:e.device,callback:e.renderInteractiveSceneCallback},kU())}),f.jsx("canvas",{className:"excalidraw__canvas interactive",style:{width:e.appState.width,height:e.appState.height,cursor:e.appState.viewModeEnabled?Fe.GRAB:Fe.AUTO},width:e.appState.width*e.scale,height:e.appState.height*e.scale,ref:e.handleCanvasRef,onContextMenu:e.onContextMenu,onPointerMove:e.onPointerMove,onPointerUp:e.onPointerUp,onPointerCancel:e.onPointerCancel,onTouchMove:e.onTouchMove,onPointerDown:e.onPointerDown,onDoubleClick:e.appState.viewModeEnabled?void 0:e.onDoubleClick,children:M("labels.drawingCanvas")})},N5=e=>({zoom:e.zoom,scrollX:e.scrollX,scrollY:e.scrollY,width:e.width,height:e.height,viewModeEnabled:e.viewModeEnabled,openDialog:e.openDialog,editingGroupId:e.editingGroupId,editingLinearElement:e.editingLinearElement,selectedElementIds:e.selectedElementIds,frameToHighlight:e.frameToHighlight,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,theme:e.theme,pendingImageElementId:e.pendingImageElementId,selectionElement:e.selectionElement,selectedGroupIds:e.selectedGroupIds,selectedLinearElement:e.selectedLinearElement,multiElement:e.multiElement,isBindingEnabled:e.isBindingEnabled,suggestedBindings:e.suggestedBindings,isRotating:e.isRotating,elementsToHighlight:e.elementsToHighlight,collaborators:e.collaborators,activeEmbeddable:e.activeEmbeddable,snapLines:e.snapLines,zenModeEnabled:e.zenModeEnabled,editingTextElement:e.editingTextElement,isCropping:e.isCropping,croppingElementId:e.croppingElementId,searchMatches:e.searchMatches}),bY=(e,t)=>e.selectionNonce!==t.selectionNonce||e.sceneNonce!==t.sceneNonce||e.scale!==t.scale||e.elementsMap!==t.elementsMap||e.visibleElements!==t.visibleElements||e.selectedElements!==t.selectedElements?!1:Gt(N5(e.appState),N5(t.appState)),vY=Z.memo(gY,bY),xY=e=>{let t=S.useRef(null),n=S.useRef(!1);return S.useEffect(()=>{let a=t.current;if(!a)return;let i=e.canvas;n.current||(n.current=!0,a.replaceChildren(i),i.classList.add("excalidraw__canvas","static"));let r=`${e.appState.width}px`,s=`${e.appState.height}px`;i.style.width!==r&&(i.style.width=r),i.style.height!==s&&(i.style.height=s);let l=e.appState.width*e.scale,c=e.appState.height*e.scale;i.width!==l&&(i.width=l),i.height!==c&&(i.height=c),y3({canvas:i,rc:e.rc,scale:e.scale,elementsMap:e.elementsMap,allElementsMap:e.allElementsMap,visibleElements:e.visibleElements,appState:e.appState,renderConfig:e.renderConfig},kU())}),f.jsx("div",{className:"excalidraw__canvas-wrapper",ref:t})},O5=e=>({zoom:e.zoom,scrollX:e.scrollX,scrollY:e.scrollY,width:e.width,height:e.height,viewModeEnabled:e.viewModeEnabled,openDialog:e.openDialog,hoveredElementIds:e.hoveredElementIds,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,theme:e.theme,pendingImageElementId:e.pendingImageElementId,shouldCacheIgnoreZoom:e.shouldCacheIgnoreZoom,viewBackgroundColor:e.viewBackgroundColor,exportScale:e.exportScale,selectedElementsAreBeingDragged:e.selectedElementsAreBeingDragged,gridSize:e.gridSize,gridStep:e.gridStep,frameRendering:e.frameRendering,selectedElementIds:e.selectedElementIds,frameToHighlight:e.frameToHighlight,editingGroupId:e.editingGroupId,currentHoveredFontFamily:e.currentHoveredFontFamily,croppingElementId:e.croppingElementId}),yY=(e,t)=>e.sceneNonce!==t.sceneNonce||e.scale!==t.scale||e.elementsMap!==t.elementsMap||e.visibleElements!==t.visibleElements?!1:Gt(O5(e.appState),O5(t.appState))&&Gt(e.renderConfig,t.renderConfig),wY=Z.memo(xY,yY),$5=class{constructor(e){j(this,"scene"),j(this,"getRenderableElements",(()=>{let t=({elementsMap:a,zoom:i,offsetLeft:r,offsetTop:s,scrollX:l,scrollY:c,height:d,width:o})=>{let u=[];for(let h of a.values())du(h,o,d,{zoom:i,offsetLeft:r,offsetTop:s,scrollX:l,scrollY:c},a)&&u.push(h);return u},n=({elements:a,editingTextElement:i,newElementId:r,pendingImageElementId:s})=>{let l=Hn(new Map);for(let c of a)Le(c)&&s===c.id||r!==c.id&&(!i||i.type!=="text"||c.id!==i.id)&&l.set(c.id,c);return l};return xI(({zoom:a,offsetLeft:i,offsetTop:r,scrollX:s,scrollY:l,height:c,width:d,editingTextElement:o,newElementId:u,pendingImageElementId:h,sceneNonce:p})=>{let U=this.scene.getNonDeletedElements(),m=n({elements:U,editingTextElement:o,newElementId:u,pendingImageElementId:h}),g=t({elementsMap:m,zoom:a,offsetLeft:i,offsetTop:r,scrollX:s,scrollY:l,height:c,width:d});return{elementsMap:m,visibleElements:g}})})()),this.scene=e}destroy(){py.cancel(),x3.cancel(),this.getRenderableElements.clear()}},EY=({trails:e})=>{let t=S.useRef(null);return S.useEffect(()=>{if(t.current)for(let n of e)n.start(t.current);return()=>{for(let n of e)n.stop()}},e),f.jsx("div",{className:"SVGLayer",children:f.jsx("svg",{ref:t})})},SY=5,kY=(e,t,n)=>{let[a,i]=he(e,n),{x:r,y:s}=Nn({sceneX:a+e.width,sceneY:i},t),l=r-t.offsetLeft+10,c=s-t.offsetTop;return{x:l,y:c}},F5=({children:e,element:t,elementsMap:n})=>{let a=Uc();if(a.contextMenu||a.newElement||a.resizingElement||a.isRotating||a.openMenu||a.viewModeEnabled)return null;let{x:i,y:r}=kY(t,a,n);return f.jsx("div",{className:"excalidraw-canvas-buttons",style:{top:`${r}px`,left:`${i}px`,padding:SY},children:e})},CY="small",Vh=e=>f.jsxs("label",{className:te("ToolIcon ToolIcon__MagicButton",`ToolIcon_size_${CY}`,{"is-mobile":e.isMobile}),title:`${e.title}`,children:[f.jsx("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:e.name,onChange:e.onChange,checked:e.checked,"aria-label":e.title}),f.jsx("div",{className:"ToolIcon__icon",children:e.icon})]}),MY=({height:e,width:t,userToFollow:n,onDisconnect:a})=>f.jsx("div",{className:"follow-mode",style:{width:t,height:e},children:f.jsxs("div",{className:"follow-mode__badge",children:[f.jsxs("div",{className:"follow-mode__badge__label",children:["Following"," ",f.jsx("span",{className:"follow-mode__badge__username",title:n.username,children:n.username})]}),f.jsx("button",{type:"button",onClick:a,className:"follow-mode__disconnect-btn",children:hl})]})}),IY=MY,_Y=class{constructor(){j(this,"targets",new WeakMap),j(this,"rafIds",new WeakMap)}register(e,t){this.targets.set(e,{callback:t,stopped:!0})}start(e){let t=this.targets.get(e);t&&(this.rafIds.has(e)||(this.targets.set(e,{...t,stopped:!1}),this.scheduleFrame(e)))}stop(e){let t=this.targets.get(e);t&&!t.stopped&&this.targets.set(e,{...t,stopped:!0}),this.cancelFrame(e)}constructFrame(e){return t=>{let n=this.targets.get(e);if(!n)return;let a=this.onFrame(n,t);!n.stopped&&!a?this.scheduleFrame(e):this.cancelFrame(e)}}scheduleFrame(e){let t=requestAnimationFrame(this.constructFrame(e));this.rafIds.set(e,t)}cancelFrame(e){if(this.rafIds.has(e)){let t=this.rafIds.get(e);cancelAnimationFrame(t)}this.rafIds.delete(e)}onFrame(e,t){return e.callback(t)??!1}},S0=class{constructor(e,t,n){this.animationFrameHandler=e,this.app=t,this.options=n,j(this,"currentTrail"),j(this,"pastTrails",[]),j(this,"container"),j(this,"trailElement"),this.animationFrameHandler.register(this,this.onFrame.bind(this)),this.trailElement=document.createElementNS(Ae,"path")}get hasCurrentTrail(){return!!this.currentTrail}hasLastPoint(e,t){if(this.currentTrail){let n=this.currentTrail.originalPoints.length;return this.currentTrail.originalPoints[n-1][0]===e&&this.currentTrail.originalPoints[n-1][1]===t}return!1}start(e){e&&(this.container=e),this.trailElement.parentNode!==this.container&&this.container&&this.container.appendChild(this.trailElement),this.animationFrameHandler.start(this)}stop(){this.animationFrameHandler.stop(this),this.trailElement.parentNode===this.container&&this.container?.removeChild(this.trailElement)}startPath(e,t){this.currentTrail=new pu(this.options),this.currentTrail.addPoint([e,t,performance.now()]),this.update()}addPointToPath(e,t){this.currentTrail&&(this.currentTrail.addPoint([e,t,performance.now()]),this.update())}endPath(){this.currentTrail&&(this.currentTrail.close(),this.currentTrail.options.keepHead=!1,this.pastTrails.push(this.currentTrail),this.currentTrail=void 0,this.update())}update(){this.start()}onFrame(){let e=[];for(let n of this.pastTrails)e.push(this.drawTrail(n,this.app.state));if(this.currentTrail){let n=this.drawTrail(this.currentTrail,this.app.state);e.push(n)}this.pastTrails=this.pastTrails.filter(n=>n.getStrokeOutline().length!==0),e.length===0&&this.stop();let t=e.join(" ").trim();this.trailElement.setAttribute("d",t),this.trailElement.setAttribute("fill",(this.options.fill??(()=>"black"))(this))}drawTrail(e,t){let n=e.getStrokeOutline(e.options.size/t.zoom.value).map(([a,i])=>{let r=Nn({sceneX:a,sceneY:i},t);return[r.x,r.y]});return yI(n,!0)}},TY=class{constructor(e,t){this.animationFrameHandler=e,this.app=t,j(this,"localTrail"),j(this,"collabTrails",new Map),j(this,"container"),this.animationFrameHandler.register(this,this.onFrame.bind(this)),this.localTrail=new S0(e,t,{...this.getTrailOptions(),fill:()=>s8})}getTrailOptions(){return{simplify:0,streamline:.4,sizeMapping:e=>{let t=Math.max(0,1-(performance.now()-e.pressure)/1e3),n=(50-Math.min(50,e.totalLength-e.currentIndex))/50;return Math.min(Dr(n),Dr(t))}}}startPath(e,t){this.localTrail.startPath(e,t)}addPointToPath(e,t){this.localTrail.addPointToPath(e,t)}endPath(){this.localTrail.endPath()}start(e){this.container=e,this.animationFrameHandler.start(this),this.localTrail.start(e)}stop(){this.animationFrameHandler.stop(this),this.localTrail.stop()}onFrame(){this.updateCollabTrails()}updateCollabTrails(){if(!(!this.container||this.app.state.collaborators.size===0)){for(let[e,t]of this.app.state.collaborators.entries()){let n;this.collabTrails.has(e)?n=this.collabTrails.get(e):(n=new S0(this.animationFrameHandler,this.app,{...this.getTrailOptions(),fill:()=>t.pointer?.laserColor||yf(e,t)}),n.start(this.container),this.collabTrails.set(e,n)),t.pointer&&t.pointer.tool==="laser"&&(t.button==="down"&&!n.hasCurrentTrail&&n.startPath(t.pointer.x,t.pointer.y),t.button==="down"&&n.hasCurrentTrail&&!n.hasLastPoint(t.pointer.x,t.pointer.y)&&n.addPointToPath(t.pointer.x,t.pointer.y),t.button==="up"&&n.hasCurrentTrail&&(n.addPointToPath(t.pointer.x,t.pointer.y),n.endPath()))}for(let e of this.collabTrails.keys())this.app.state.collaborators.has(e)||(this.collabTrails.get(e).stop(),this.collabTrails.delete(e))}}},AY=(e,t,n,a,i,r)=>{let{zoom:s}=a,l=180*n/Math.PI,c=e*(s.value-1)/2,d=t*(s.value-1)/2;return e>i&&s.value!==1&&(c=i*(s.value-1)/2),t>r&&s.value!==1&&(d=r*(s.value-1)/2),`translate(${c}px, ${d}px) scale(${s.value}) rotate(${l}deg)`},jY=({id:e,onChange:t,onSubmit:n,getViewportCoords:a,element:i,canvas:r,excalidrawContainer:s,app:l,autoSelect:c=!0})=>{let d=(P,O)=>{if(!O.style.fontFamily||!O.style.fontSize)return!1;let N=O.style.fontFamily.replace(/"/g,"");return Gs({fontFamily:P.fontFamily})!==N||`${P.fontSize}px`!==O.style.fontSize},o=()=>{let P=l.state,O=xi.getScene(i)?.getElement(e);if(!O)return;let{textAlign:N,verticalAlign:X}=O,H=l.scene.getNonDeletedElementsMap();if(O&&q(O)){let G=O.x,se=O.y,le=Ht(O,l.scene.getNonDeletedElementsMap()),Ie=O.width,Qe=O.height,rt=O.width,at=O.height;if(le&&O.containerId){if(xe(le)){let _i=J.getBoundTextElementPosition(le,O,H);G=_i.x,se=_i.y}let gc=d(O,u),gl;if(gc?gl=nu(le.id,le.height):(gl=tl[le.id],gl||(gl=nu(le.id,le.height))),rt=vi(le,O),at=ef(le,O),!xe(le)&&Qe>at){let _i=Qr(Qe,le.type);V(le,{height:_i});return}else if(!xe(le)&&le.height>gl.height&&Qe<at){let _i=Qr(Qe,le.type);V(le,{height:_i})}else{let{y:_i}=Qu(le,O,H);se=_i}}let[de,me]=a(G,se),Be=u.selectionStart,ye=u.selectionEnd,je=u.value.length;if(Be===ye&&ye!==je){let gc=je-ye;u.selectionStart=u.value.length-gc,u.selectionEnd=u.value.length-gc}le?Ie+=.5:(rt=(P.width-8-de)/P.zoom.value,Ie=Math.min(Ie,rt)),Qe*=1.05;let kt=Xe(O),pr=(P.height-me)/P.zoom.value;Object.assign(u.style,{font:kt,lineHeight:O.lineHeight,width:`${Ie}px`,height:`${Qe}px`,left:`${de}px`,top:`${me}px`,transform:AY(Ie,Qe,nN(O,le),P,rt,pr),textAlign:N,verticalAlign:X,color:O.strokeColor,opacity:O.opacity/100,filter:"var(--theme-filter)",maxHeight:`${pr}px`}),u.scrollTop=0,Ui()&&(u.style.fontFamily=Gs(O)),V(O,{x:G,y:se})}},u=document.createElement("textarea");u.dir="auto",u.tabIndex=0,u.dataset.type="wysiwyg",u.wrap="off",u.classList.add("excalidraw-wysiwyg");let h="pre",p="normal";(nt(i)||!i.autoResize)&&(h="pre-wrap",p="break-word"),Object.assign(u.style,{position:"absolute",display:"inline-block",minHeight:"1em",backfaceVisibility:"hidden",margin:0,padding:0,border:0,outline:0,resize:"none",background:"transparent",overflow:"hidden",zIndex:"var(--zIndex-wysiwyg)",wordBreak:p,whiteSpace:h,overflowWrap:"break-word",boxSizing:"content-box"}),u.value=i.originalText,o(),t&&(u.onpaste=async P=>{let O=await j3(P,!0);if(!O.text)return;let N=Zs(O.text);if(!N)return;let X=Ht(i,l.scene.getNonDeletedElementsMap()),H=Xe({fontSize:l.state.currentItemFontSize,fontFamily:l.state.currentItemFontFamily});if(X){let G=ge(X,l.scene.getNonDeletedElementsMap()),se=rs(`${u.value}${N}`,H,vi(X,G)),le=K0(se,H);u.style.width=`${le}px`}},u.oninput=()=>{let P=Zs(u.value);if(u.value!==P){let O=u.selectionStart;u.value=P,u.selectionStart=O,u.selectionEnd=O}t(u.value)}),u.onkeydown=P=>{if(!P.shiftKey&&F6.keyTest(P))P.preventDefault(),l.actionManager.executeAction(F6),o();else if(!P.shiftKey&&z6.keyTest(P))P.preventDefault(),l.actionManager.executeAction(z6),o();else if(!P.shiftKey&&B6.keyTest(P))P.preventDefault(),l.actionManager.executeAction(B6),o();else if(N6.keyTest(P))l.actionManager.executeAction(N6);else if(O6.keyTest(P))l.actionManager.executeAction(O6);else if(P.key===R.ESCAPE)P.preventDefault(),w=!0,k();else if(P.key===R.ENTER&&P[R.CTRL_OR_CMD]){if(P.preventDefault(),P.isComposing||P.keyCode===229)return;w=!0,k()}else if(P.key===R.TAB||P[R.CTRL_OR_CMD]&&(P.code===Te.BRACKET_LEFT||P.code===Te.BRACKET_RIGHT)){if(P.preventDefault(),P.isComposing)return;P.shiftKey||P.code===Te.BRACKET_LEFT?x():b(),u.dispatchEvent(new Event("input"))}};let U=4,m=" ".repeat(U),g=new RegExp(`^ {1,${U}}`),b=()=>{let{selectionStart:P,selectionEnd:O}=u,N=v(),X=u.value;N.forEach(H=>{let G=X.slice(0,H),se=X.slice(H);X=`${G}${m}${se}`}),u.value=X,u.selectionStart=P+U,u.selectionEnd=O+U*N.length},x=()=>{let{selectionStart:P,selectionEnd:O}=u,N=v(),X=[],H=u.value;N.forEach(G=>{let se=H.slice(G,G+U).match(g);if(se){let le=H.slice(0,G),Ie=H.slice(G+se[0].length);H=`${le}${Ie}`,X.push(G)}}),u.value=H,X.length&&(P>X[X.length-1]?u.selectionStart=Math.max(P-U,X[X.length-1]):u.selectionStart=P,u.selectionEnd=Math.max(u.selectionStart,O-U*X.length))},v=()=>{let{selectionStart:P,selectionEnd:O,value:N}=u,X=N.slice(0,P).match(/[^\n]*$/)[0].length;return P=P-X,N.slice(P,O).split(`
|
|
105
|
+
`).reduce((H,G,se,le)=>H.concat(se?H[se-1]+le[se-1].length+1:P),[]).reverse()},y=P=>{P.target instanceof HTMLCanvasElement&&(P.preventDefault(),P.stopPropagation())},w=!1,k=()=>{if(L)return;L=!0,C();let P=xi.getScene(i)?.getElement(i.id);if(!P)return;let O=Ht(P,l.scene.getNonDeletedElementsMap());if(O){if(u.value.trim()){let N=bi(O);!N||N!==i.id?V(O,{boundElements:(O.boundElements||[]).concat({type:"text",id:i.id})}):xe(O)&&dc(O)}else V(O,{boundElements:O.boundElements?.filter(N=>!q(N))});on(P,O,l.scene.getNonDeletedElementsMap())}n({viaKeyboard:w,nextOriginalText:u.value})},C=()=>{u.onblur=null,u.oninput=null,u.onkeydown=null,F&&F.disconnect(),window.removeEventListener("resize",o),window.removeEventListener("wheel",y,!0),window.removeEventListener("pointerdown",_),window.removeEventListener("pointerup",I),window.removeEventListener("blur",k),window.removeEventListener("beforeunload",k),T(),D(),u.remove()},I=P=>{window.removeEventListener("pointerup",I);let O=P?.target,N=O instanceof HTMLElement&&O.classList.contains("properties-trigger");setTimeout(()=>{u.onblur=k,N||u.focus()})},A=()=>{u.onblur=null,window.addEventListener("pointerup",I),window.addEventListener("blur",k)},_=P=>{let O=P?.target;if(P.button===Li.WHEEL){O instanceof HTMLTextAreaElement&&(P.preventDefault(),l.handleCanvasPanUsingWheelOrSpaceDrag(P)),A();return}let N=O instanceof HTMLElement&&O.classList.contains("properties-trigger");(P.target instanceof HTMLElement||P.target instanceof SVGElement)&&P.target.closest(`.${Xs.SHAPE_ACTIONS_MENU}, .${Xs.ZOOM_ACTIONS}`)&&!Er(P.target)||N?A():P.target instanceof HTMLCanvasElement&&!Ui()&&requestAnimationFrame(()=>{k()})},T=l.scene.onUpdate(()=>{o(),document.activeElement?.closest(".properties-content")||u.focus()}),D=l.onScrollChangeEmitter.on(()=>{o()}),L=!1;c&&u.select(),I();let F=null;r&&"ResizeObserver"in window?(F=new window.ResizeObserver(()=>{o()}),F.observe(r)):window.addEventListener("resize",o),u.onpointerdown=P=>P.stopPropagation(),requestAnimationFrame(()=>{window.addEventListener("pointerdown",_,{capture:!0})}),window.addEventListener("beforeunload",k),s?.querySelector(".excalidraw-textEditorContainer").appendChild(u)},RY=Y({name:"autoResize",label:"labels.autoResize",icon:null,trackEvent:{category:"element"},predicate:(e,t,n,a)=>{let i=ve(e,t);return i.length===1&&q(i[0])&&!i[0].autoResize},perform:(e,t,n,a)=>{let i=ve(e,t);return{appState:t,elements:e.map(r=>{if(r.id===i[0].id&&q(r)){let s=an(r.originalText,Xe(r),r.lineHeight);return pe(r,{autoResize:!0,width:s.width,height:s.height,text:r.originalText})}return r}),captureUpdate:B.IMMEDIATELY}}}),DY=e=>{let t=["flowchart","graph","sequenceDiagram","classDiagram","stateDiagram","stateDiagram-v2","erDiagram","journey","gantt","pie","quadrantChart","requirementDiagram","gitGraph","C4Context","mindmap","timeline","zenuml","sankey","xychart","block"];return new RegExp(`^(?:%%{.*?}%%[\\s\\n]*)?\\b(?:${t.map(n=>`\\s*${n}(-beta)?`).join("|")})\\b`).test(e.trim())},Uy=({canvas:e,rc:t,newElement:n,elementsMap:a,allElementsMap:i,scale:r,appState:s,renderConfig:l})=>{if(e){let[c,d]=wp(e,r),o=Ep({canvas:e,scale:r,normalizedWidth:c,normalizedHeight:d});o.save(),o.scale(s.zoom.value,s.zoom.value),n&&n.type!=="selection"?wr(n,a,i,t,o,l,s):o.clearRect(0,0,c,d)}},LY=Nu(e=>{Uy(e)},{trailing:!0}),PY=(e,t)=>{if(t){LY(e);return}Uy(e)},NY=e=>{let t=S.useRef(null);return S.useEffect(()=>{t.current&&PY({canvas:t.current,scale:e.scale,newElement:e.appState.newElement,elementsMap:e.elementsMap,allElementsMap:e.allElementsMap,rc:e.rc,renderConfig:e.renderConfig,appState:e.appState},kU())}),f.jsx("canvas",{className:"excalidraw__canvas",style:{width:e.appState.width,height:e.appState.height},width:e.appState.width*e.scale,height:e.appState.height*e.scale,ref:t})},OY=NY,my=Z.createContext(null),gy=Z.createContext(null),by={viewport:{isMobile:!1,isLandscape:!1},editor:{isMobile:!1,canFitSidebar:!1},isTouchScreen:!1},CU=Z.createContext(by);CU.displayName="DeviceContext";var MU=Z.createContext({container:null,id:null});MU.displayName="ExcalidrawContainerContext";var IU=Z.createContext([]);IU.displayName="ExcalidrawElementsContext";var _U=Z.createContext({...za(),width:0,height:0,offsetLeft:0,offsetTop:0});_U.displayName="ExcalidrawAppStateContext";var TU=Z.createContext(()=>{console.warn("Uninitialized ExcalidrawSetAppStateContext context!")});TU.displayName="ExcalidrawSetAppStateContext";var AU=Z.createContext(null);AU.displayName="ExcalidrawActionManagerContext";var va=()=>S.useContext(my),pc=()=>S.useContext(gy),Tt=()=>S.useContext(CU),Ka=()=>S.useContext(MU),Sf=()=>S.useContext(IU),Uc=()=>S.useContext(_U),At=()=>S.useContext(TU),En=()=>S.useContext(AU),Dl=!1,Gh=0,gr=!1,Ll=!1,Yh=!1,Zh={horizontal:null,vertical:null},Ri=0,Pl=!1,Kh=new Map,Vc=!1,z5=0,B5=!1,Nl=null,Re={pointers:new Map,lastCenter:null,initialDistance:null,initialScale:null},$Y=class vy extends Z.Component{constructor(t){super(t),j(this,"canvas"),j(this,"interactiveCanvas",null),j(this,"rc"),j(this,"unmounted",!1),j(this,"actionManager"),j(this,"device",by),j(this,"excalidrawContainerRef",Z.createRef()),j(this,"scene"),j(this,"fonts"),j(this,"renderer"),j(this,"visibleElements"),j(this,"resizeObserver"),j(this,"nearestScrollableContainer"),j(this,"library"),j(this,"libraryItemsFromStorage"),j(this,"id"),j(this,"store"),j(this,"history"),j(this,"excalidrawContainerValue"),j(this,"files",{}),j(this,"imageCache",new Map),j(this,"iFrameRefs",new Map),j(this,"embedsValidationStatus",new Map),j(this,"initializedEmbeds",new Set),j(this,"elementsPendingErasure",new Set),j(this,"flowChartCreator",new iV),j(this,"flowChartNavigator",new aV),j(this,"hitLinkElement"),j(this,"lastPointerDownEvent",null),j(this,"lastPointerUpEvent",null),j(this,"lastPointerMoveEvent",null),j(this,"lastPointerMoveCoords",null),j(this,"lastViewportPosition",{x:0,y:0}),j(this,"animationFrameHandler",new _Y),j(this,"laserTrails",new TY(this.animationFrameHandler,this)),j(this,"eraserTrail",new S0(this.animationFrameHandler,this,{streamline:.2,size:5,keepHead:!0,sizeMapping:o=>{let u=Math.max(0,1-(performance.now()-o.pressure)/200),h=(10-Math.min(10,o.totalLength-o.currentIndex))/10;return Math.min(Dr(h),Dr(u))},fill:()=>this.state.theme===Ce.LIGHT?"rgba(0, 0, 0, 0.2)":"rgba(255, 255, 255, 0.2)"})),j(this,"onChangeEmitter",new Ia),j(this,"onPointerDownEmitter",new Ia),j(this,"onPointerUpEmitter",new Ia),j(this,"onUserFollowEmitter",new Ia),j(this,"onScrollChangeEmitter",new Ia),j(this,"missingPointerEventCleanupEmitter",new Ia),j(this,"onRemoveEventListenersEmitter",new Ia),j(this,"getEffectiveGridSize",()=>No(this)?this.state.gridSize:null),j(this,"updateEmbedValidationStatus",(o,u)=>{this.embedsValidationStatus.set(o.id,u),ut.delete(o)}),j(this,"updateEmbeddables",()=>{let o=new Set,u=!1;this.scene.getNonDeletedElements().filter(h=>{if(Un(h)){if(o.add(h.id),!this.embedsValidationStatus.has(h.id)){u=!0;let p=hd(h.link,this.props.validateEmbeddable);this.updateEmbedValidationStatus(h,p)}}else $i(h)&&o.add(h.id);return!1}),u&&this.scene.triggerUpdate(),this.iFrameRefs.forEach((h,p)=>{o.has(p)||this.iFrameRefs.delete(p)})}),j(this,"getFrameNameDOMId",o=>`${this.id}-frame-name-${o.id}`),j(this,"frameNameBoundsCache",{get:o=>{let u=this.frameNameBoundsCache._cache.get(o.id);if(!u||u.zoom!==this.state.zoom.value||u.versionNonce!==o.versionNonce){let h=document.getElementById(this.getFrameNameDOMId(o));if(h){let p=h.getBoundingClientRect(),U=Ge({clientX:p.x,clientY:p.y},this.state),m=Ge({clientX:p.right,clientY:p.bottom},this.state);return u={x:U.x,y:U.y,width:m.x-U.x,height:m.y-U.y,angle:0,zoom:this.state.zoom.value,versionNonce:o.versionNonce},this.frameNameBoundsCache._cache.set(o.id,u),u}return null}return u},_cache:new Map}),j(this,"resetEditingFrame",o=>{o&&V(o,{name:o.name?.trim()||null}),this.setState({editingFrame:null})}),j(this,"renderFrameNames",()=>{if(!this.state.frameRendering.enabled||!this.state.frameRendering.name)return this.state.editingFrame&&this.resetEditingFrame(null),null;let o=this.state.theme===Ce.DARK;return this.scene.getNonDeletedFramesLikes().map(u=>{if(!du(u,this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap()))return this.state.editingFrame===u.id&&this.resetEditingFrame(u),null;let{x:h,y:p}=Nn({sceneX:u.x,sceneY:u.y},this.state),U=6,m,g=B3(u);if(u.id===this.state.editingFrame){let b=g;m=f.jsx("input",{autoFocus:!0,value:b,onChange:x=>{V(u,{name:x.target.value})},onFocus:x=>x.target.select(),onBlur:()=>this.resetEditingFrame(u),onKeyDown:x=>{(x.key===R.ESCAPE||x.key===R.ENTER)&&this.resetEditingFrame(u)},style:{background:this.state.viewBackgroundColor,filter:o?H0:"none",zIndex:2,border:"none",display:"block",padding:`${U}px`,borderRadius:4,boxShadow:"inset 0 0 0 1px var(--color-primary)",fontFamily:"Assistant",fontSize:"14px",transform:`translate(-${U}px, ${U}px)`,color:"var(--color-gray-80)",overflow:"hidden",maxWidth:`${document.body.clientWidth-h-U}px`},size:b.length+1||1,dir:"auto",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off"})}else m=g;return f.jsx("div",{id:this.getFrameNameDOMId(u),style:{position:"absolute",bottom:`${this.state.height+ct.nameOffsetY-p+this.state.offsetTop}px`,left:`${h-this.state.offsetLeft}px`,zIndex:2,fontSize:ct.nameFontSize,color:o?ct.nameColorDarkTheme:ct.nameColorLightTheme,lineHeight:ct.nameLineHeight,width:"max-content",maxWidth:`${u.width}px`,overflow:u.id===this.state.editingFrame?"visible":"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:Fe.MOVE,pointerEvents:this.state.viewModeEnabled?fs.disabled:fs.enabled},onPointerDown:b=>this.handleCanvasPointerDown(b),onWheel:b=>this.handleWheel(b),onContextMenu:this.handleCanvasContextMenu,onDoubleClick:()=>{this.setState({editingFrame:u.id})},children:m},u.id)})}),j(this,"focusContainer",()=>{this.excalidrawContainerRef.current?.focus()}),j(this,"getSceneElementsIncludingDeleted",()=>this.scene.getElementsIncludingDeleted()),j(this,"getSceneElements",()=>this.scene.getNonDeletedElements()),j(this,"onInsertElements",o=>{this.addElementsFromPasteOrLibrary({elements:o,position:"center",files:null})}),j(this,"onExportImage",async(o,u,h)=>{qe("export",o,"ui");let p=await xf(o,u,this.state,this.files,{exportBackground:this.state.exportBackground,name:this.getName(),viewBackgroundColor:this.state.viewBackgroundColor,exportingFrame:h.exportingFrame}).catch(y8).catch(U=>{console.error(U),this.setState({errorMessage:U.message})});this.state.exportEmbedScene&&p&&Yp(p)&&this.setState({fileHandle:p})}),j(this,"magicGenerations",new Map),j(this,"updateMagicGeneration",({frameElement:o,data:u})=>{u.status==="pending"?V(o,{customData:{generationData:void 0}},!1):V(o,{customData:{generationData:u}},!1),this.magicGenerations.set(o.id,u),this.triggerRender()}),j(this,"plugins",{}),j(this,"onMagicframeToolSelect",()=>{let o=this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds});if(o.length===0)this.setActiveTool({type:Dt.magicframe}),qe("ai","tool-select (empty-selection)","d2c");else{let u=o.length===1&&sd(o[0])&&o[0];if(!u&&o.some(p=>ce(p)||p.frameId)){this.setActiveTool({type:Dt.magicframe});return}qe("ai","tool-select (existing selection)","d2c");let h;if(u)h=u;else{let[p,U,m,g]=Ne(o),b=50;h=P1({...ct,x:p-b,y:U-b,width:m-p+b*2,height:g-U+b*2,opacity:100,locked:!1}),this.scene.insertElement(h);for(let x of o)V(x,{frameId:h.id});this.setState({selectedElementIds:{[h.id]:!0}})}this.onMagicFrameGenerate(h,"upstream")}}),j(this,"openEyeDropper",({type:o})=>{sa.set(mf,{swapPreviewOnAlt:!0,colorPickerType:o==="stroke"?"elementStroke":"elementBackground",onSelect:(u,h)=>{let p=o==="background"&&h.altKey||o==="stroke"&&!h.altKey;!this.scene.getSelectedElements(this.state).length||this.state.activeTool.type!=="selection"?p?this.syncActionResult({appState:{...this.state,currentItemStrokeColor:u},captureUpdate:B.IMMEDIATELY}):this.syncActionResult({appState:{...this.state,currentItemBackgroundColor:u},captureUpdate:B.IMMEDIATELY}):this.updateScene({elements:this.scene.getElementsIncludingDeleted().map(U=>this.state.selectedElementIds[U.id]?pe(U,{[p?"strokeColor":"backgroundColor"]:u}):U),captureUpdate:B.IMMEDIATELY})},keepOpenOnAlt:!1})}),j(this,"dismissLinearEditor",()=>{setTimeout(()=>{this.setState({editingLinearElement:null})})}),j(this,"syncActionResult",ft(o=>{if(this.unmounted||o===!1)return;o.captureUpdate===B.NEVER?this.store.shouldUpdateSnapshot():o.captureUpdate===B.IMMEDIATELY&&this.store.shouldCaptureIncrement();let u=!1,h=null;if(o.elements&&(this.scene.replaceAllElements(o.elements),u=!0),o.files&&(this.addMissingFiles(o.files,o.replaceFiles),this.addNewImagesToImageCache()),o.appState||h||this.state.contextMenu){let p=o?.appState?.viewModeEnabled||!1,U=o?.appState?.zenModeEnabled||!1,m=o?.appState?.theme||this.props.theme||Ce.LIGHT,g=o?.appState?.name??this.state.name,b=o?.appState?.errorMessage??this.state.errorMessage;typeof this.props.viewModeEnabled<"u"&&(p=this.props.viewModeEnabled),typeof this.props.zenModeEnabled<"u"&&(U=this.props.zenModeEnabled),h=o.appState?.editingTextElement||null,o.elements&&h&&o.elements.forEach(x=>{h?.id===x.id&&h!==x&&V1(x)&&q(x)&&(h=x)}),h?.isDeleted&&(h=null),this.setState(x=>{let v=o.appState||{};return{...x,...v,contextMenu:null,editingTextElement:h,viewModeEnabled:p,zenModeEnabled:U,theme:m,name:g,errorMessage:b}}),u=!0}!u&&o.captureUpdate!==B.EVENTUALLY&&this.scene.triggerUpdate()})),j(this,"onBlur",ft(()=>{gr=!1,this.setState({isBindingEnabled:!0})})),j(this,"onUnload",()=>{this.onBlur()}),j(this,"disableEvent",o=>{o.preventDefault()}),j(this,"resetHistory",()=>{this.history.clear()}),j(this,"resetStore",()=>{this.store.clear()}),j(this,"resetScene",ft(o=>{this.scene.replaceAllElements([]),this.setState(u=>({...za(),isLoading:o?.resetLoadingState?!1:u.isLoading,theme:this.state.theme})),this.resetStore(),this.resetHistory()})),j(this,"initializeScene",async()=>{"launchQueue"in window&&"LaunchParams"in window&&window.launchQueue.setConsumer(async h=>{if(!h.files.length)return;let p=h.files[0],U=await p.getFile();this.loadFileToCanvas(new File([U],U.name||"",{type:U.type}),p)}),this.props.theme&&this.setState({theme:this.props.theme}),this.state.isLoading||this.setState({isLoading:!0});let o=null;try{typeof this.props.initialData=="function"?o=await this.props.initialData()||null:o=await this.props.initialData||null,o?.libraryItems&&this.library.updateLibrary({libraryItems:o.libraryItems,merge:!0}).catch(h=>{console.error(h)})}catch(h){console.error(h),o={appState:{errorMessage:h.message||"Encountered an error during importing or restoring scene data"}}}let u=sc(o,null,null,{repairBindings:!0});u.appState={...u.appState,theme:this.props.theme||u.appState.theme,openSidebar:u.appState?.openSidebar||this.state.openSidebar,activeTool:u.appState.activeTool.type==="image"?{...u.appState.activeTool,type:"selection"}:u.appState.activeTool,isLoading:!1,toast:this.state.toast},o?.scrollToContent&&(u.appState={...u.appState,...Lo(u.elements,{...u.appState,width:this.state.width,height:this.state.height,offsetTop:this.state.offsetTop,offsetLeft:this.state.offsetLeft})}),this.resetStore(),this.resetHistory(),this.syncActionResult({...u,captureUpdate:B.NEVER}),this.clearImageShapeCache(),this.fonts.loadSceneFonts().then(h=>{this.fonts.onLoaded(h)}),Ns(window.location.href)&&this.scrollToContent(window.location.href,{animate:!1})}),j(this,"isMobileBreakpoint",(o,u)=>o<DM||u<PM&&o<LM),j(this,"refreshViewportBreakpoints",()=>{if(!this.excalidrawContainerRef.current)return;let{clientWidth:o,clientHeight:u}=document.body,h=this.device.viewport,p=id(h,{isLandscape:o>u,isMobile:this.isMobileBreakpoint(o,u)});return h!==p?(this.device={...this.device,viewport:p},!0):!1}),j(this,"refreshEditorBreakpoints",()=>{let o=this.excalidrawContainerRef.current;if(!o)return;let{width:u,height:h}=o.getBoundingClientRect(),p=this.props.UIOptions.dockedSidebarBreakpoint!=null?this.props.UIOptions.dockedSidebarBreakpoint:NM,U=this.device.editor,m=id(U,{isMobile:this.isMobileBreakpoint(u,h),canFitSidebar:u>p});return U!==m?(this.device={...this.device,editor:m},!0):!1}),j(this,"onResize",ft(()=>{this.scene.getElementsIncludingDeleted().forEach(o=>ut.delete(o)),this.refreshViewportBreakpoints(),this.updateDOMRect(),p1||this.refreshEditorBreakpoints(),this.setState({})})),j(this,"onFullscreenChange",()=>{!document.fullscreenElement&&this.state.activeEmbeddable?.state==="active"&&this.setState({activeEmbeddable:null})}),j(this,"renderInteractiveSceneCallback",({atLeastOneVisibleElement:o,scrollBars:u,elementsMap:h})=>{u&&(Zh=u);let p=this.state.editingTextElement?!1:!o&&h.size>0;this.state.scrolledOutside!==p&&this.setState({scrolledOutside:p}),this.scheduleImageRefresh()}),j(this,"onScroll",Ys(()=>{let{offsetTop:o,offsetLeft:u}=this.getCanvasOffsets();this.setState(h=>h.offsetLeft===u&&h.offsetTop===o?null:{offsetTop:o,offsetLeft:u})},jM)),j(this,"onCut",ft(o=>{!this.excalidrawContainerRef.current?.contains(document.activeElement)||Er(o.target)||(this.actionManager.executeAction(Y6,"keyboard",o),o.preventDefault(),o.stopPropagation())})),j(this,"onCopy",ft(o=>{!this.excalidrawContainerRef.current?.contains(document.activeElement)||Er(o.target)||(this.actionManager.executeAction(wd,"keyboard",o),o.preventDefault(),o.stopPropagation())})),j(this,"onTouchStart",o=>{if(r8&&o.preventDefault(),!Dl){Dl=!0,clearTimeout(Gh),Gh=window.setTimeout(vy.resetTapTwice,TM);return}if(Dl&&o.touches.length===1){let u=o.touches[0];this.handleCanvasDoubleClick({clientX:u.clientX,clientY:u.clientY}),Dl=!1,clearTimeout(Gh)}o.touches.length===2&&this.setState({selectedElementIds:De({},this.state),activeEmbeddable:null})}),j(this,"onTouchEnd",o=>{this.resetContextMenuTimer(),o.touches.length>0?this.setState({previousSelectedElementIds:{},selectedElementIds:De(this.state.previousSelectedElementIds,this.state)}):Re.pointers.clear()}),j(this,"pasteFromClipboard",ft(async o=>{let u=!!Vc,h=document.activeElement,p=this.excalidrawContainerRef.current?.contains(h);if(o&&!p)return;let U=document.elementFromPoint(this.lastViewportPosition.x,this.lastViewportPosition.y);if(o&&(!(U instanceof HTMLCanvasElement)||Er(h)))return;let{x:m,y:g}=Ge({clientX:this.lastViewportPosition.x,clientY:this.lastViewportPosition.y},this.state),b=o?.clipboardData?.files[0],x=await j3(o,u);if(!b&&!u){if(x.mixedContent)return this.addElementsFromMixedContentPaste(x.mixedContent,{isPlainPaste:u,sceneX:m,sceneY:g});if(x.text){let v=x.text.trim();v.startsWith("<svg")&&v.endsWith("</svg>")&&(b=qg(v))}}if(Or(b)&&!x.spreadsheet){if(!this.isToolSupported("image")){this.setState({errorMessage:M("errors.imageToolNotSupported")});return}let v=this.createImageElement({sceneX:m,sceneY:g});this.insertImageElement(v,b),this.initializeImageDimensions(v),this.setState({selectedElementIds:De({[v.id]:!0},this.state)});return}if(this.props.onPaste)try{if(await this.props.onPaste(x,o)===!1)return}catch(v){console.error(v)}if(x.errorMessage)this.setState({errorMessage:x.errorMessage});else if(x.spreadsheet&&!u)this.setState({pasteDialog:{data:x.spreadsheet,shown:!0}});else if(x.elements){let v=x.programmaticAPI?Eu(x.elements):x.elements;this.addElementsFromPasteOrLibrary({elements:v,files:x.files||null,position:"cursor",retainSeed:u})}else if(x.text){if(x.text&&DY(x.text)){let w=await ne(()=>import("./index-x_yLI1Xq.js").then(k=>k.b5),__vite__mapDeps([59,2,3]),import.meta.url);try{let{elements:k,files:C}=await w.parseMermaidToExcalidraw(x.text),I=Eu(k,{regenerateIds:!0});this.addElementsFromPasteOrLibrary({elements:I,files:C,position:"cursor"});return}catch(k){console.warn(`parsing pasted text as mermaid definition failed: ${k.message}`)}}let v=M8(x.text).split(/\n+/).map(w=>w.trim()).filter(Boolean),y=v.map(w=>_N(w)).filter(w=>hd(w,this.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(w)||As(w)?.type==="video"));if(!Vc&&y.length>0&&y.length===v.length){let w=[];for(let k of y){let C=w[w.length-1],I=this.insertEmbeddableElement({sceneX:C?C.x+C.width+20:m,sceneY:g,link:yn(k)});I&&w.push(I)}w.length&&this.setState({selectedElementIds:Object.fromEntries(w.map(k=>[k.id,!0]))});return}this.addTextFromPaste(x.text,u)}this.setActiveTool({type:"selection"}),o?.preventDefault()})),j(this,"addElementsFromPasteOrLibrary",o=>{let u=nf(o.elements,null,void 0),[h,p,U,m]=Ne(u),g=Jt(h,U)/2,b=Jt(p,m)/2,x=typeof o.position=="object"?o.position.clientX:o.position==="cursor"?this.lastViewportPosition.x:this.state.width/2+this.state.offsetLeft,v=typeof o.position=="object"?o.position.clientY:o.position==="cursor"?this.lastViewportPosition.y:this.state.height/2+this.state.offsetTop,{x:y,y:w}=Ge({clientX:x,clientY:v},this.state),k=y-g,C=w-b,[I,A]=Mt(k,C,this.getEffectiveGridSize()),_=i3(u.map(P=>pe(P,{x:P.x+I-h,y:P.y+A-p})),{randomizeSeed:!o.retainSeed}),T=this.scene.getElementsIncludingDeleted(),D=[...T,..._];D=this.props.onDuplicate?.(D,T)||D,Wa(D,oe(_));let L=this.getTopLayerFrameAtSceneCoords({x:y,y:w});if(L){let P=RO(_,L);lo(D,P,L,this.state)}this.scene.replaceAllElements(D),_.forEach(P=>{if(q(P)&&nt(P)){let O=Ht(P,this.scene.getElementsMapIncludingDeleted());on(P,O,this.scene.getElementsMapIncludingDeleted())}}),vM&&ui.loadElementsFonts(_).then(P=>{this.fonts.onLoaded(P)}),o.files&&this.addMissingFiles(o.files),this.store.shouldCaptureIncrement();let F=Fp(_);this.setState({...this.state,openSidebar:this.state.openSidebar&&this.device.editor.canFitSidebar&&sa.get(yU)?this.state.openSidebar:null,...ln({editingGroupId:null,selectedElementIds:F.reduce((P,O)=>(nt(O)||(P[O.id]=!0),P),{})},this.scene.getNonDeletedElements(),this.state,this)},()=>{o.files&&this.addNewImagesToImageCache()}),this.setActiveTool({type:"selection"}),o.fitToContent&&this.scrollToContent(_,{fitToContent:!0,canvasOffsets:this.getEditorUIOffsets()})}),j(this,"setAppState",(o,u)=>{this.setState(o,u)}),j(this,"removePointer",o=>{Ri&&this.resetContextMenuTimer(),Re.pointers.delete(o.pointerId)}),j(this,"toggleLock",(o="ui")=>{this.state.activeTool.locked||qe("toolbar","toggleLock",`${o} (${this.device.editor.isMobile?"mobile":"desktop"})`),this.setState(u=>({activeTool:{...u.activeTool,...Et(this.state,u.activeTool.locked?{type:"selection"}:u.activeTool),locked:!u.activeTool.locked}}))}),j(this,"updateFrameRendering",o=>{this.setState(u=>{let h=typeof o=="function"?o(u.frameRendering):o;return{frameRendering:{enabled:h?.enabled??u.frameRendering.enabled,clip:h?.clip??u.frameRendering.clip,name:h?.name??u.frameRendering.name,outline:h?.outline??u.frameRendering.outline}}})}),j(this,"togglePenMode",o=>{this.setState(u=>({penMode:o??!u.penMode,penDetected:!0}))}),j(this,"onHandToolToggle",()=>{this.actionManager.executeAction(zH)}),j(this,"zoomCanvas",o=>{this.setState({...jr({viewportX:this.state.width/2+this.state.offsetLeft,viewportY:this.state.height/2+this.state.offsetTop,nextZoom:ci(o)},this.state)})}),j(this,"cancelInProgressAnimation",null),j(this,"scrollToContent",(o=this.scene.getNonDeletedElements(),u)=>{if(typeof o=="string"){let g;if(Ns(o)?g=PN(o):g=o,g){let b=this.scene.getElementsFromId(g);b?.length?this.scrollToContent(b,{fitToContent:u?.fitToContent??!0,animate:u?.animate??!0}):Ns(o)&&this.setState({toast:{message:M("elementLink.notFound"),duration:3e3,closable:!0}})}return}this.cancelInProgressAnimation?.();let h=Array.isArray(o)?o:[o],p=this.state.zoom,U=this.state.scrollX,m=this.state.scrollY;if(u?.fitToContent||u?.fitToViewport){let{appState:g}=bf({canvasOffsets:u.canvasOffsets,targetElements:h,appState:this.state,fitToViewport:!!u?.fitToViewport,viewportZoomFactor:u?.viewportZoomFactor,minZoom:u?.minZoom,maxZoom:u?.maxZoom});p=g.zoom,U=g.scrollX,m=g.scrollY}else{let g=Lo(h,this.state);U=g.scrollX,m=g.scrollY}if(u?.animate){let g=this.state.scrollX,b=this.state.scrollY,x=this.state.zoom.value,v=lI({fromValues:{scrollX:g,scrollY:b,zoom:x},toValues:{scrollX:U,scrollY:m,zoom:p.value},interpolateValue:(y,w,k,C)=>{if(C==="zoom")return y*Math.pow(w/y,Dr(k))},onStep:({scrollX:y,scrollY:w,zoom:k})=>{this.setState({scrollX:y,scrollY:w,zoom:{value:k}})},onStart:()=>{this.setState({shouldCacheIgnoreZoom:!0})},onEnd:()=>{this.setState({shouldCacheIgnoreZoom:!1})},onCancel:()=>{this.setState({shouldCacheIgnoreZoom:!1})},duration:u?.duration??500});this.cancelInProgressAnimation=()=>{v(),this.cancelInProgressAnimation=null}}else this.setState({scrollX:U,scrollY:m,zoom:p})}),j(this,"maybeUnfollowRemoteUser",()=>{this.state.userToFollow&&this.setState({userToFollow:null})}),j(this,"translateCanvas",o=>{this.cancelInProgressAnimation?.(),this.maybeUnfollowRemoteUser(),this.setState(o)}),j(this,"setToast",o=>{this.setState({toast:o})}),j(this,"restoreFileFromShare",async()=>{try{let o=await caches.open("web-share-target"),u=await o.match("shared-file");if(u){let h=await u.blob(),p=new File([h],h.name||"",{type:h.type});this.loadFileToCanvas(p,null),await o.delete("shared-file"),window.history.replaceState(null,U1,window.location.pathname)}}catch(o){this.setState({errorMessage:o.message})}}),j(this,"addFiles",ft(o=>{let{addedFiles:u}=this.addMissingFiles(o);this.clearImageShapeCache(u),this.scene.triggerUpdate(),this.addNewImagesToImageCache()})),j(this,"addMissingFiles",(o,u=!1)=>{let h=u?{}:{...this.files},p={},U=Array.isArray(o)?o:Object.values(o);for(let m of U)if(!h[m.id]&&(p[m.id]=m,h[m.id]=m,m.mimeType===ae.svg))try{let g=r$(Eg(l$(m.dataURL)),ae.svg);m.dataURL!==g&&(m.version=(m.version??1)+1,m.dataURL=g)}catch(g){console.error(g)}return this.files=h,{addedFiles:p}}),j(this,"updateScene",ft(o=>{let u=Va(o.elements??[]);if(o.captureUpdate&&o.captureUpdate!==B.EVENTUALLY){let h=this.store.snapshot.appState,p=this.store.snapshot.elements,U=o.appState?Object.assign({},h,o.appState):h,m=o.elements?this.store.filterUncomittedElements(this.scene.getElementsMapIncludingDeleted(),oe(u)):p;o.captureUpdate===B.IMMEDIATELY?this.store.captureIncrement(m,U):o.captureUpdate===B.NEVER&&this.store.updateSnapshot(m,U)}o.appState&&this.setState(o.appState),o.elements&&this.scene.replaceAllElements(u),o.collaborators&&this.setState({collaborators:o.collaborators})})),j(this,"triggerRender",o=>{o===!0?this.scene.triggerUpdate():this.setState({})}),j(this,"toggleSidebar",({name:o,tab:u,force:h})=>{let p;h===void 0?p=this.state.openSidebar?.name===o&&this.state.openSidebar?.tab===u?null:o:p=h?o:null;let U=p?{name:p}:null;return U&&u&&(U.tab=u),this.setState({openSidebar:U}),!!p}),j(this,"updateCurrentCursorPosition",ft(o=>{this.lastViewportPosition.x=o.clientX,this.lastViewportPosition.y=o.clientY})),j(this,"getEditorUIOffsets",()=>{let o=this.excalidrawContainerRef?.current?.querySelector(".App-toolbar")?.getBoundingClientRect()?.bottom??0,u=this.excalidrawContainerRef?.current?.querySelector(".sidebar")?.getBoundingClientRect(),h=this.excalidrawContainerRef?.current?.querySelector(".App-menu__left")?.getBoundingClientRect(),p=16;return Bo().rtl?{top:o+p,right:Math.max(this.state.width-(h?.left??this.state.width),0)+p,bottom:p,left:Math.max(u?.right??0,0)+p}:{top:o+p,right:Math.max(this.state.width-(u?.left??this.state.width)+p,0),bottom:p,left:Math.max(h?.right??0,0)+p}}),j(this,"onKeyDown",ft(o=>{if("Proxy"in window&&(!o.shiftKey&&/^[A-Z]$/.test(o.key)||o.shiftKey&&/^[a-z]$/.test(o.key))&&(o=new Proxy(o,{get(U,m){let g=U[m];return typeof g=="function"?g.bind(U):m==="key"?o.shiftKey?U.key.toUpperCase():U.key.toLowerCase():g}})),!x1(o.target)){if((o.key===R.ESCAPE||o.key===R.ENTER)&&this.state.croppingElementId){this.finishImageCropping();return}let U=ve(this.scene.getNonDeletedElementsMap(),this.state);if(U.length===1&&Le(U[0])&&o.key===R.ENTER){this.startImageCropping(U[0]);return}if(o.key===R.ESCAPE&&this.flowChartCreator.isCreatingChart){this.flowChartCreator.clear(),this.triggerRender(!0);return}let m=Hl(o.key);if(o[R.CTRL_OR_CMD]&&m&&!o.shiftKey){o.preventDefault();let g=ve(this.scene.getNonDeletedElementsMap(),this.state);g.length===1&&$u(g[0])&&this.flowChartCreator.createNodes(g[0],this.scene.getNonDeletedElementsMap(),this.state,h5(o.key)),this.flowChartCreator.pendingNodes?.length&&!gd(this.flowChartCreator.pendingNodes,this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap(),this.getEditorUIOffsets())&&this.scrollToContent(this.flowChartCreator.pendingNodes,{animate:!0,duration:300,fitToContent:!0,canvasOffsets:this.getEditorUIOffsets()});return}if(o.altKey){let g=ve(this.scene.getNonDeletedElementsMap(),this.state);if(g.length===1&&m){o.preventDefault();let b=this.flowChartNavigator.exploreByDirection(g[0],this.scene.getNonDeletedElementsMap(),h5(o.key));if(b){this.setState(v=>({selectedElementIds:De({[b]:!0},v)}));let x=this.scene.getNonDeletedElementsMap().get(b);x&&!gd([x],this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap(),this.getEditorUIOffsets())&&this.scrollToContent(x,{animate:!0,duration:300,canvasOffsets:this.getEditorUIOffsets()})}return}}}if(o[R.CTRL_OR_CMD]&&o.key===R.P&&!o.shiftKey&&!o.altKey){this.setToast({message:M("commandPalette.shortcutHint",{shortcut:tn("commandPalette")})}),o.preventDefault();return}if(o[R.CTRL_OR_CMD]&&o.key.toLowerCase()===R.V&&(Vc=o.shiftKey,clearTimeout(z5),z5=window.setTimeout(()=>{Vc=!1},100)),o[R.CTRL_OR_CMD]&&Er(o.target)&&(o.code===Te.MINUS||o.code===Te.EQUAL)){o.preventDefault();return}if(Er(o.target)&&o.key!==R.ESCAPE||Hl(o.key)&&x1(o.target))return;if(o.key===R.QUESTION_MARK){this.setState({openDialog:{name:"help"}});return}else if(o.key.toLowerCase()===R.E&&o.shiftKey&&o[R.CTRL_OR_CMD]){o.preventDefault(),this.setState({openDialog:{name:"imageExport"}});return}if(o.key===R.PAGE_UP||o.key===R.PAGE_DOWN){let U=(o.shiftKey?this.state.width:this.state.height)/this.state.zoom.value;o.key===R.PAGE_DOWN&&(U=-U),o.shiftKey?this.translateCanvas(m=>({scrollX:m.scrollX+U})):this.translateCanvas(m=>({scrollY:m.scrollY+U}))}if(this.state.openDialog?.name==="elementLinkSelector"||this.actionManager.handleKeyDown(o)||this.state.viewModeEnabled)return;if(o[R.CTRL_OR_CMD]&&this.state.isBindingEnabled&&this.setState({isBindingEnabled:!1}),Hl(o.key)){let U=this.scene.getSelectedElements({selectedElementIds:this.state.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),m=U.find(Q),g=new Set;U.filter(Q).filter(y=>{let w=y.startBinding&&!U.some(C=>C.id===y.startBinding?.elementId),k=y.endBinding&&!U.some(C=>C.id===y.endBinding?.elementId);return w||k}).forEach(y=>g.add(y.id)),U=U.filter(y=>!g.has(y.id));let b=this.getEffectiveGridSize()&&(o.shiftKey?f2:this.getEffectiveGridSize())||(o.shiftKey?wM:f2),x=0,v=0;o.key===R.ARROW_LEFT?x=-b:o.key===R.ARROW_RIGHT?x=b:o.key===R.ARROW_UP?v=-b:o.key===R.ARROW_DOWN&&(v=b),U.forEach(y=>{V(y,{x:y.x+x,y:y.y+v},!1),xn(y,this.scene.getNonDeletedElementsMap(),{simultaneouslyUpdated:U})}),this.setState({suggestedBindings:hh(U.filter(y=>y.id!==m?.id||b!==0),this.scene.getNonDeletedElementsMap(),this.state.zoom)}),this.scene.triggerUpdate(),o.preventDefault()}else if(o.key===R.ENTER){let U=this.scene.getSelectedElements(this.state);if(U.length===1){let m=U[0];if(o[R.CTRL_OR_CMD])ue(m)&&(!this.state.editingLinearElement||this.state.editingLinearElement.elementId!==U[0].id)&&(this.store.shouldCaptureIncrement(),Q(m)||this.setState({editingLinearElement:new J(m)}));else if(q(m)||sN(m)){let g;q(m)||(g=m);let b=ph(m,this.state,this.scene.getNonDeletedElementsMap()),x=b.x,v=b.y;this.startTextEditing({sceneX:x,sceneY:v,container:g}),o.preventDefault();return}else ce(m)&&this.setState({editingFrame:m.id})}}else if(!o.ctrlKey&&!o.altKey&&!o.metaKey&&!this.state.newElement&&!this.state.selectionElement&&!this.state.selectedElementsAreBeingDragged){let U=jL(o.key);U?(this.state.activeTool.type!==U&&qe("toolbar",U,`keyboard (${this.device.editor.isMobile?"mobile":"desktop"})`),U==="arrow"&&this.state.activeTool.type==="arrow"&&this.setState(m=>({currentItemArrowType:m.currentItemArrowType===$t.sharp?$t.round:m.currentItemArrowType===$t.round?$t.elbow:$t.sharp})),this.setActiveTool({type:U}),o.stopPropagation()):o.key===R.Q&&(this.toggleLock("keyboard"),o.stopPropagation())}if(o.key===R.SPACE&&Re.pointers.size===0&&(gr=!0,He(this.interactiveCanvas,Fe.GRAB),o.preventDefault()),(o.key===R.G||o.key===R.S)&&!o.altKey&&!o[R.CTRL_OR_CMD]){let U=this.scene.getSelectedElements(this.state);if(this.state.activeTool.type==="selection"&&!U.length)return;o.key===R.G&&(qs(this.state.activeTool.type)||U.some(m=>qs(m.type)))&&(this.setState({openPopup:"elementBackground"}),o.stopPropagation()),o.key===R.S&&(this.setState({openPopup:"elementStroke"}),o.stopPropagation())}if(!o[R.CTRL_OR_CMD]&&o.shiftKey&&o.key.toLowerCase()===R.F){let U=this.scene.getSelectedElements(this.state);if(this.state.activeTool.type==="selection"&&!U.length)return;(this.state.activeTool.type==="text"||U.find(m=>q(m)||ge(m,this.scene.getNonDeletedElementsMap())))&&(o.preventDefault(),this.setState({openPopup:"fontFamily"}))}if(o.key===R.K&&!o.altKey&&!o[R.CTRL_OR_CMD]){this.state.activeTool.type==="laser"?this.setActiveTool({type:"selection"}):this.setActiveTool({type:"laser"});return}o[R.CTRL_OR_CMD]&&(o.key===R.BACKSPACE||o.key===R.DELETE)&&sa.set(wf,"clearCanvas");let u=o.key.toLocaleLowerCase(),h=u===R.S&&o.shiftKey,p=o.key===R.I||u===R.G&&o.shiftKey;(h||p)&&this.openEyeDropper({type:h?"stroke":"background"})})),j(this,"onKeyUp",ft(o=>{if(o.key===R.SPACE&&(this.state.viewModeEnabled||this.state.openDialog?.name==="elementLinkSelector"?He(this.interactiveCanvas,Fe.GRAB):this.state.activeTool.type==="selection"?Jn(this.interactiveCanvas):(Ca(this.interactiveCanvas,this.state),this.setState({selectedElementIds:De({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})),gr=!1),!o[R.CTRL_OR_CMD]&&!this.state.isBindingEnabled&&this.setState({isBindingEnabled:!0}),Hl(o.key)&&(eu(this.scene.getSelectedElements(this.state).filter(ue),this.scene.getNonDeletedElementsMap(),this.scene.getNonDeletedElements(),this.scene,Tr(this.state),this.state.selectedLinearElement?.selectedPointsIndices??[],this.state.zoom),this.setState({suggestedBindings:[]})),o.altKey||this.flowChartNavigator.isExploring&&(this.flowChartNavigator.clear(),this.syncActionResult({captureUpdate:B.IMMEDIATELY})),!o[R.CTRL_OR_CMD]&&this.flowChartCreator.isCreatingChart){this.flowChartCreator.pendingNodes?.length&&this.scene.insertElements(this.flowChartCreator.pendingNodes);let u=this.flowChartCreator.pendingNodes?.[0];u&&(this.setState(h=>({selectedElementIds:De({[u.id]:!0},h)})),gd([u],this.canvas.width/window.devicePixelRatio,this.canvas.height/window.devicePixelRatio,{offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,zoom:this.state.zoom},this.scene.getNonDeletedElementsMap(),this.getEditorUIOffsets())||this.scrollToContent(u,{animate:!0,duration:300,canvasOffsets:this.getEditorUIOffsets()})),this.flowChartCreator.clear(),this.syncActionResult({captureUpdate:B.IMMEDIATELY})}})),j(this,"isToolSupported",o=>this.props.UIOptions.tools?.[o]!==!1),j(this,"setActiveTool",o=>{if(!this.isToolSupported(o.type)){console.warn(`"${o.type}" tool is disabled via "UIOptions.canvasActions.tools.${o.type}"`);return}let u=Et(this.state,o);u.type==="hand"?He(this.interactiveCanvas,Fe.GRAB):gr||Ca(this.interactiveCanvas,{...this.state,activeTool:u}),rI(document.activeElement)&&this.focusContainer(),G0(u.type)||this.setState({suggestedBindings:[]}),u.type==="image"&&this.onImageAction({insertOnCanvasDirectly:(o.type==="image"&&o.insertOnCanvasDirectly)??!1}),this.setState(h=>{let p={snapLines:h.snapLines.length?[]:h.snapLines,originSnapOffset:null,activeEmbeddable:null};return u.type==="freedraw"&&this.store.shouldCaptureIncrement(),u.type!=="selection"?{...h,activeTool:u,selectedElementIds:De({},h),selectedGroupIds:De({},h),editingGroupId:null,multiElement:null,...p}:{...h,activeTool:u,...p}})}),j(this,"setOpenDialog",o=>{this.setState({openDialog:o})}),j(this,"setCursor",o=>{He(this.interactiveCanvas,o)}),j(this,"resetCursor",()=>{Jn(this.interactiveCanvas)}),j(this,"isTouchScreenMultiTouchGesture",()=>Re.pointers.size>=2),j(this,"getName",()=>this.state.name||this.props.name||`${M("labels.untitled")}-${x2()}`),j(this,"onGestureStart",ft(o=>{o.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({selectedElementIds:De({},this.state),activeEmbeddable:null}),Re.initialScale=this.state.zoom.value})),j(this,"onGestureChange",ft(o=>{if(o.preventDefault(),this.isTouchScreenMultiTouchGesture())return;let u=Re.initialScale;u&&this.setState(h=>({...jr({viewportX:this.lastViewportPosition.x,viewportY:this.lastViewportPosition.y,nextZoom:ci(u*o.scale)},h)}))})),j(this,"onGestureEnd",ft(o=>{o.preventDefault(),this.isTouchScreenMultiTouchGesture()&&this.setState({previousSelectedElementIds:{},selectedElementIds:De(this.state.previousSelectedElementIds,this.state)}),Re.initialScale=null})),j(this,"startTextEditing",({sceneX:o,sceneY:u,insertAtParentCenter:h=!0,container:p,autoEdit:U=!0})=>{let m=!1,g=h&&this.getTextWysiwygSnappedToCenterPosition(o,u,this.state,p);p&&g&&(ge(p,this.scene.getNonDeletedElementsMap())||(m=!0));let b=null,x=this.scene.getSelectedElements(this.state);x.length===1?q(x[0])?b=x[0]:p?b=ge(x[0],this.scene.getNonDeletedElementsMap()):b=this.getTextElementAtPosition(o,u):b=this.getTextElementAtPosition(o,u);let v=b?.fontFamily||this.state.currentItemFontFamily,y=b?.lineHeight||qr(v),w=this.state.currentItemFontSize;if(!b&&m&&p&&!xe(p)){let I=R8(Xe({fontSize:w,fontFamily:v}),y),A=D8(w,y),_=Math.max(p.height,A),T=Math.max(p.width,I);V(p,{height:_,width:T}),o=p.x+T/2,u=p.y+_/2,g&&(g=this.getTextWysiwygSnappedToCenterPosition(o,u,this.state,p))}let k=this.getTopLayerFrameAtSceneCoords({x:o,y:u}),C=b||_n({x:g?g.elementCenterX:o,y:g?g.elementCenterY:u,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,text:"",fontSize:w,fontFamily:v,textAlign:g?"center":this.state.currentItemTextAlign,verticalAlign:g?Mn.MIDDLE:Nd,containerId:m?p?.id:void 0,groupIds:p?.groupIds??[],lineHeight:y,angle:p?.angle??0,frameId:k?k.id:null});if(!b&&m&&p&&V(p,{boundElements:(p.boundElements||[]).concat({type:"text",id:C.id})}),this.setState({editingTextElement:C}),!b)if(p&&m){let I=this.scene.getElementIndex(p.id);this.scene.insertElementAtIndex(C,I+1)}else this.scene.insertElement(C);U||b||p?this.handleTextWysiwyg(C,{isExistingElement:!!b}):this.setState({newElement:C,multiElement:null})}),j(this,"startImageCropping",o=>{this.store.shouldCaptureIncrement(),this.setState({croppingElementId:o.id})}),j(this,"finishImageCropping",()=>{this.state.croppingElementId&&(this.store.shouldCaptureIncrement(),this.setState({croppingElementId:null}))}),j(this,"handleCanvasDoubleClick",o=>{if(this.state.multiElement||this.state.activeTool.type!=="selection")return;let u=this.scene.getSelectedElements(this.state),{x:h,y:p}=Ge(o,this.state);if(u.length===1&&ue(u[0])){if(o[R.CTRL_OR_CMD]&&(!this.state.editingLinearElement||this.state.editingLinearElement.elementId!==u[0].id)&&!Q(u[0])){this.store.shouldCaptureIncrement(),this.setState({editingLinearElement:new J(u[0])});return}else if(this.state.selectedLinearElement&&Q(u[0])){let U=J.getSegmentMidpointHitCoords(this.state.selectedLinearElement,{x:h,y:p},this.state,this.scene.getNonDeletedElementsMap()),m=U?J.getSegmentMidPointIndex(this.state.selectedLinearElement,this.state,U,this.scene.getNonDeletedElementsMap()):-1;if(m&&m>-1){this.store.shouldCaptureIncrement(),J.deleteFixedSegment(u[0],m);let g=J.getSegmentMidpointHitCoords({...this.state.selectedLinearElement,segmentMidPointHoveredCoords:null},{x:h,y:p},this.state,this.scene.getNonDeletedElementsMap()),b=g?J.getSegmentMidPointIndex(this.state.selectedLinearElement,this.state,g,this.scene.getNonDeletedElementsMap()):null;this.setState({selectedLinearElement:{...this.state.selectedLinearElement,pointerDownState:{...this.state.selectedLinearElement.pointerDownState,segmentMidpoint:{index:b,value:U,added:!1}},segmentMidPointHoveredCoords:g}});return}}}if(u.length===1&&Le(u[0])){this.startImageCropping(u[0]);return}if(Jn(this.interactiveCanvas),Pr(this.state).length>0){let U=this.getElementAtPosition(h,p),m=U&&OP(U,this.state.selectedGroupIds);if(m){this.store.shouldCaptureIncrement(),this.setState(g=>({...g,...ln({editingGroupId:m,selectedElementIds:{[U.id]:!0}},this.scene.getNonDeletedElements(),g,this)}));return}}if(Jn(this.interactiveCanvas),!o[R.CTRL_OR_CMD]&&!this.state.viewModeEnabled){let U=this.getElementAtPosition(h,p);if(Pn(U)){this.setState({activeEmbeddable:{element:U,state:"active"}});return}let m=this.getTextBindableContainerAtPosition(h,p);if(m&&(Wn(m)||!ia(m.backgroundColor)||Es({x:h,y:p,element:m,shape:ri(m,this.scene.getNonDeletedElementsMap()),threshold:this.getElementHitThreshold()}))){let g=ph(m,this.state,this.scene.getNonDeletedElementsMap());h=g.x,p=g.y}this.startTextEditing({sceneX:h,sceneY:p,insertAtParentCenter:!o.altKey,container:m})}}),j(this,"getElementLinkAtPosition",(o,u)=>{let h=this.scene.getNonDeletedElements(),p=-1;for(let U=h.length-1;U>=0;U--){let m=h[U];if(u&&m.id===u.id&&(p=U),m.link&&U>=p&&Uh(m,this.scene.getNonDeletedElementsMap(),this.state,E(o.x,o.y),this.device.editor.isMobile))return m}}),j(this,"redirectToLink",(o,u)=>{let h=Pe(E(this.lastPointerDownEvent.clientX,this.lastPointerDownEvent.clientY),E(this.lastPointerUpEvent.clientX,this.lastPointerUpEvent.clientY));if(!this.hitLinkElement||h>yr)return;let p=Ge(this.lastPointerDownEvent,this.state),U=this.scene.getNonDeletedElementsMap(),m=Uh(this.hitLinkElement,U,this.state,E(p.x,p.y),this.device.editor.isMobile),g=Ge(this.lastPointerUpEvent,this.state),b=Uh(this.hitLinkElement,U,this.state,E(g.x,g.y),this.device.editor.isMobile);if(m&&b){e5();let x=this.hitLinkElement.link;if(x){x=yn(x);let v;if(this.props.onLinkOpen&&(v=k8("excalidraw-link",o.nativeEvent),this.props.onLinkOpen({...this.hitLinkElement,link:x},v)),!v?.defaultPrevented){let y=Z7(x)?"_self":"_blank",w=window.open(void 0,y);w&&(w.opener=null,w.location=x)}}}}),j(this,"getTopLayerFrameAtSceneCoords",o=>{let u=this.scene.getNonDeletedElementsMap(),h=this.scene.getNonDeletedFramesLikes().filter(p=>$g(o,p,u));return h.length?h[h.length-1]:null}),j(this,"handleCanvasPointerMove",o=>{this.savePointer(o.clientX,o.clientY,this.state.cursorButton),this.lastPointerMoveEvent=o.nativeEvent,Re.pointers.has(o.pointerId)&&Re.pointers.set(o.pointerId,{x:o.clientX,y:o.clientY});let u=Re.initialScale;if(Re.pointers.size===2&&Re.lastCenter&&u&&Re.initialDistance){let v=d5(Re.pointers),y=v.x-Re.lastCenter.x,w=v.y-Re.lastCenter.y;Re.lastCenter=v;let k=u5(Array.from(Re.pointers.values())),C=this.state.activeTool.type==="freedraw"&&this.state.penMode?1:k/Re.initialDistance,I=C?ci(u*C):this.state.zoom.value;this.setState(A=>{let _=jr({viewportX:v.x,viewportY:v.y,nextZoom:I},A);this.translateCanvas({zoom:_.zoom,scrollX:_.scrollX+2*(y/I),scrollY:_.scrollY+2*(w/I),shouldCacheIgnoreZoom:!0})}),this.resetShouldCacheIgnoreZoomDebounced()}else Re.lastCenter=Re.initialDistance=Re.initialScale=null;if(gr||Ll||Yh||Vs(this.state))return;let h=U5(Zh,o.clientX-this.state.offsetLeft,o.clientY-this.state.offsetTop).isOverEither;!this.state.newElement&&!this.state.selectionElement&&!this.state.selectedElementsAreBeingDragged&&!this.state.multiElement&&(h?Jn(this.interactiveCanvas):Ca(this.interactiveCanvas,this.state));let p=Ge(o,this.state),{x:U,y:m}=p;if(!this.state.newElement&&JP(this.state.activeTool.type)){let{originOffset:v,snapLines:y}=qP(this.scene.getNonDeletedElements(),this,{x:U,y:m},o,this.scene.getNonDeletedElementsMap());this.setState(w=>{let k=Cl(w.snapLines,y),C=w.originSnapOffset?Cl(w.originSnapOffset,v):v;return w.snapLines===k&&w.originSnapOffset===C?null:{snapLines:k,originSnapOffset:C}})}else!this.state.newElement&&!this.state.selectedElementsAreBeingDragged&&!this.state.selectionElement&&this.setState(v=>v.snapLines.length?{snapLines:[]}:null);if(this.state.editingLinearElement&&!this.state.editingLinearElement.isDragging){let v=J.handlePointerMove(o,U,m,this,this.scene.getNonDeletedElementsMap());v&&v!==this.state.editingLinearElement&&Ft.flushSync(()=>{this.setState({editingLinearElement:v})}),v?.lastUncommittedPoint!=null?this.maybeSuggestBindingAtCursor(p,v.elbowed):Ft.flushSync(()=>{this.setState({suggestedBindings:[]})})}if(_8(this.state.activeTool.type)){let{newElement:v}=this.state;Da(v,!1)?this.maybeSuggestBindingsForLinearElementAtCoords(v,[p],this.state.startBoundElement):this.maybeSuggestBindingAtCursor(p,!1)}if(this.state.multiElement){let{multiElement:v}=this.state,{x:y,y:w}=v,{points:k,lastCommittedPoint:C}=v,I=k[k.length-1];if(Ca(this.interactiveCanvas,this.state),I===C)Pe(E(U-y,m-w),I)>=ad?V(v,{points:[...k,E(U-y,m-w)]},!1):He(this.interactiveCanvas,Fe.POINTER);else if(k.length>2&&C&&Pe(E(U-y,m-w),C)<ad)He(this.interactiveCanvas,Fe.POINTER),V(v,{points:k.slice(0,-1)},!1);else{let[A,_]=Mt(U,m,o[R.CTRL_OR_CMD]||Q(v)?null:this.getEffectiveGridSize()),[T,D]=v?.lastCommittedPoint??[0,0],L=A-y-T,F=_-w-D;ro(o)&&({width:L,height:F}=X1(T+y,D+w,A,_)),mi(k,this.state.zoom.value)&&He(this.interactiveCanvas,Fe.POINTER),V(v,{points:[...k.slice(0,-1),E(T+L,D+F)]},!1,{isDragging:!0}),this.triggerRender(!1)}return}if(o.buttons||this.state.activeTool.type!=="selection"&&this.state.activeTool.type!=="text"&&this.state.activeTool.type!=="eraser")return;let g=this.scene.getNonDeletedElements(),b=this.scene.getSelectedElements(this.state);if(b.length===1&&!h&&!this.state.editingLinearElement){if(this.state.selectedLinearElement&&this.handleHoverSelectedLinearElement(this.state.selectedLinearElement,U,m),(!this.state.selectedLinearElement||this.state.selectedLinearElement.hoverPointIndex===-1)&&this.state.openDialog?.name!=="elementLinkSelector"&&!(b.length===1&&Q(b[0]))){let v=Vg(g,this.state,U,m,this.state.zoom,o.pointerType,this.scene.getNonDeletedElementsMap(),this.device);if(v&&v.transformHandleType){He(this.interactiveCanvas,Yg(v));return}}}else if(b.length>1&&!h&&this.state.openDialog?.name!=="elementLinkSelector"){let v=Gg(Ne(b),U,m,this.state.zoom,o.pointerType,this.device);if(v){He(this.interactiveCanvas,Yg({transformHandleType:v}));return}}let x=this.getElementAtPosition(p.x,p.y);this.hitLinkElement=this.getElementLinkAtPosition(p,x),!Ma(this.state)&&(this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id]?(He(this.interactiveCanvas,Fe.POINTER),vX(this.hitLinkElement,this.state,this.scene.getNonDeletedElementsMap())):(e5(),x&&(x.link||Un(x))&&this.state.selectedElementIds[x.id]&&!this.state.contextMenu&&!this.state.showHyperlinkPopup?this.setState({showHyperlinkPopup:"info"}):this.state.activeTool.type==="text"?He(this.interactiveCanvas,q(x)?Fe.TEXT:Fe.CROSSHAIR):this.state.viewModeEnabled?He(this.interactiveCanvas,Fe.GRAB):this.state.openDialog?.name==="elementLinkSelector"?He(this.interactiveCanvas,Fe.AUTO):h?He(this.interactiveCanvas,Fe.AUTO):this.state.selectedLinearElement?this.handleHoverSelectedLinearElement(this.state.selectedLinearElement,U,m):o[R.CTRL_OR_CMD]?He(this.interactiveCanvas,Fe.AUTO):(x||this.isHittingCommonBoundingBoxOfSelectedElements(p,b))&&!x?.locked&&(x&&Pn(x)&&this.isIframeLikeElementCenter(x,o,U,m)?(He(this.interactiveCanvas,Fe.POINTER),this.setState({activeEmbeddable:{element:x,state:"hover"}})):(!x||!Q(x))&&(He(this.interactiveCanvas,Fe.MOVE),this.state.activeEmbeddable?.state==="hover"&&this.setState({activeEmbeddable:null})))),this.state.openDialog?.name==="elementLinkSelector"&&x?this.setState(v=>({hoveredElementIds:Cl(v.hoveredElementIds,ln({editingGroupId:v.editingGroupId,selectedElementIds:{[x.id]:!0}},this.scene.getNonDeletedElements(),v,this).selectedElementIds)})):this.state.openDialog?.name==="elementLinkSelector"&&!x&&this.setState(v=>({hoveredElementIds:Cl(v.hoveredElementIds,{})})))}),j(this,"handleEraser",(o,u,h)=>{this.eraserTrail.addPointToPath(h.x,h.y);let p=!1,U=new Set,m=this.scene.getNonDeletedElements(),g=w=>{for(let k of w){if(k.locked)return;if(o.altKey?this.elementsPendingErasure.delete(k.id)&&(p=!0):this.elementsPendingErasure.has(k.id)||(p=!0,this.elementsPendingErasure.add(k.id)),p&&k.groupIds?.length){let C=k.groupIds.at(-1);if(!U.has(C)){U.add(C);let I=tt(m,C);for(let A of I)o.altKey?this.elementsPendingErasure.delete(A.id):this.elementsPendingErasure.add(A.id)}}}},b=Pe(E(u.lastCoords.x,u.lastCoords.y),E(h.x,h.y)),x=this.getElementHitThreshold(),v={...u.lastCoords},y=0;for(;y<=b;){let w=this.getElementsAtPosition(v.x,v.y);if(g(w),y===b)break;y=Math.min(y+x,b);let k=y/b,C=(1-k)*v.x+k*h.x,I=(1-k)*v.y+k*h.y;v.x=C,v.y=I}if(u.lastCoords.x=h.x,u.lastCoords.y=h.y,p){for(let w of this.scene.getNonDeletedElements())nt(w)&&(this.elementsPendingErasure.has(w.id)||this.elementsPendingErasure.has(w.containerId))&&(o.altKey?(this.elementsPendingErasure.delete(w.id),this.elementsPendingErasure.delete(w.containerId)):(this.elementsPendingErasure.add(w.id),this.elementsPendingErasure.add(w.containerId)));this.elementsPendingErasure=new Set(this.elementsPendingErasure),this.triggerRender()}}),j(this,"handleTouchMove",o=>{Pl=!0}),j(this,"handleCanvasPointerDown",o=>{let u=o.target;if(u.setPointerCapture&&u.setPointerCapture(o.pointerId),this.maybeCleanupAfterMissingPointerUp(o.nativeEvent),this.maybeUnfollowRemoteUser(),this.state.searchMatches&&(this.setState(x=>({searchMatches:x.searchMatches.map(v=>({...v,focus:!1}))})),sa.set(qx,null)),this.state.contextMenu&&this.setState({contextMenu:null}),this.state.snapLines&&this.setAppState({snapLines:[]}),this.updateGestureOnPointerDown(o),o.pointerType==="touch"&&this.state.newElement&&this.state.newElement.type==="freedraw"){let x=this.state.newElement;this.updateScene({...x.points.length<10?{elements:this.scene.getElementsIncludingDeleted().filter(v=>v.id!==x.id)}:{},appState:{newElement:null,editingTextElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:De(Object.keys(this.state.selectedElementIds).filter(v=>v!==x.id).reduce((v,y)=>(v[y]=this.state.selectedElementIds[y],v),{}),this.state)},captureUpdate:this.state.openDialog?.name==="elementLinkSelector"?B.EVENTUALLY:B.NEVER});return}let h=document.getSelection();if(h?.anchorNode&&h.removeAllRanges(),this.maybeOpenContextMenuAfterPointerDownOnTouchDevices(o),!this.state.penDetected&&o.pointerType==="pen"&&this.setState(x=>({penMode:!0,penDetected:!0})),!this.device.isTouchScreen&&["pen","touch"].includes(o.pointerType)&&(this.device=id(this.device,{isTouchScreen:!0})),Ll||(this.lastPointerDownEvent=o,this.handleCanvasPanUsingWheelOrSpaceDrag(o)))return;if(this.setState({lastPointerDownWith:o.pointerType,cursorButton:"down"}),this.savePointer(o.clientX,o.clientY,"down"),o.button===Li.ERASER&&this.state.activeTool.type!==Dt.eraser){this.setState({activeTool:Et(this.state,{type:Dt.eraser,lastActiveToolBeforeEraser:this.state.activeTool})},()=>{this.handleCanvasPointerDown(o);let x=()=>{v(),y?.(),Ma(this.state)&&this.setState({activeTool:Et(this.state,{...this.state.activeTool.lastActiveTool||{type:Dt.selection},lastActiveToolBeforeEraser:null})})},v=lt(window,"pointerup",x,{once:!0}),y;requestAnimationFrame(()=>{y=this.missingPointerEventCleanupEmitter.once(x)})});return}if(o.button!==Li.MAIN&&o.button!==Li.TOUCH&&o.button!==Li.ERASER||Re.pointers.size>1)return;let p=this.initialPointerDownState(o);if(this.setState({selectedElementsAreBeingDragged:!1}),this.handleDraggingScrollBar(o,p)||(this.clearSelectionIfNotUsingSelection(),this.updateBindingEnabledOnPointerMove(o),this.handleSelectionOnPointerDown(o,p))||!(!this.state.penMode||o.pointerType!=="touch"||this.state.activeTool.type==="selection"||this.state.activeTool.type==="text"||this.state.activeTool.type==="image"))return;if(this.state.activeTool.type==="text")this.handleTextOnPointerDown(o,p);else if(this.state.activeTool.type==="arrow"||this.state.activeTool.type==="line")this.handleLinearElementOnPointerDown(o,this.state.activeTool.type,p);else if(this.state.activeTool.type==="image"){He(this.interactiveCanvas,Fe.CROSSHAIR);let x=this.state.pendingImageElementId&&this.scene.getElement(this.state.pendingImageElementId);if(!x)return;this.setState({newElement:x,pendingImageElementId:null,multiElement:null});let{x:v,y}=Ge(o,this.state),w=this.getTopLayerFrameAtSceneCoords({x:v,y});V(x,{x:v,y,frameId:w?w.id:null})}else this.state.activeTool.type==="freedraw"?this.handleFreeDrawElementOnPointerDown(o,this.state.activeTool.type,p):this.state.activeTool.type==="custom"?Ca(this.interactiveCanvas,this.state):this.state.activeTool.type===Dt.frame||this.state.activeTool.type===Dt.magicframe?this.createFrameElementOnPointerDown(p,this.state.activeTool.type):this.state.activeTool.type==="laser"?this.laserTrails.startPath(p.lastCoords.x,p.lastCoords.y):this.state.activeTool.type!=="eraser"&&this.state.activeTool.type!=="hand"&&this.createGenericElementOnPointerDown(this.state.activeTool.type,p);this.props?.onPointerDown?.(this.state.activeTool,p),this.onPointerDownEmitter.trigger(this.state.activeTool,p,o),this.state.activeTool.type==="eraser"&&this.eraserTrail.startPath(p.lastCoords.x,p.lastCoords.y);let U=this.onPointerMoveFromPointerDownHandler(p),m=this.onPointerUpFromPointerDownHandler(p),g=this.onKeyDownFromPointerDownHandler(p),b=this.onKeyUpFromPointerDownHandler(p);this.missingPointerEventCleanupEmitter.once(x=>m(x||o.nativeEvent)),(!this.state.viewModeEnabled||this.state.activeTool.type==="laser")&&(window.addEventListener("pointermove",U),window.addEventListener("pointerup",m),window.addEventListener("keydown",g),window.addEventListener("keyup",b),p.eventListeners.onMove=U,p.eventListeners.onUp=m,p.eventListeners.onKeyUp=b,p.eventListeners.onKeyDown=g)}),j(this,"handleCanvasPointerUp",o=>{this.removePointer(o),this.lastPointerUpEvent=o;let u=Ge({clientX:o.clientX,clientY:o.clientY},this.state),h=o.timeStamp-(this.lastPointerDownEvent?.timeStamp??0);if(this.device.editor.isMobile&&h<300){let p=this.getElementAtPosition(u.x,u.y);if(Pn(p)&&this.isIframeLikeElementCenter(p,o,u.x,u.y)){this.handleEmbeddableCenterClick(p);return}}if(this.device.isTouchScreen){let p=this.getElementAtPosition(u.x,u.y);this.hitLinkElement=this.getElementLinkAtPosition(u,p)}this.hitLinkElement&&!this.state.selectedElementIds[this.hitLinkElement.id]?h<300&&Pn(this.hitLinkElement)&&!m3(this.hitLinkElement,this.scene.getNonDeletedElementsMap(),this.state,E(u.x,u.y))?this.handleEmbeddableCenterClick(this.hitLinkElement):this.redirectToLink(o,this.device.isTouchScreen):this.state.viewModeEnabled&&this.setState({activeEmbeddable:null,selectedElementIds:{}})}),j(this,"maybeOpenContextMenuAfterPointerDownOnTouchDevices",o=>{o.pointerType==="touch"&&(Pl=!1,Ri?Pl=!0:Ri=window.setTimeout(()=>{Ri=0,Pl||this.handleCanvasContextMenu(o)},AM))}),j(this,"resetContextMenuTimer",()=>{clearTimeout(Ri),Ri=0,Pl=!1}),j(this,"maybeCleanupAfterMissingPointerUp",o=>{Nl?.(),this.missingPointerEventCleanupEmitter.trigger(o).clear()}),j(this,"handleCanvasPanUsingWheelOrSpaceDrag",o=>{if(!(Re.pointers.size<=1&&(o.button===Li.WHEEL||o.button===Li.MAIN&&gr||Vs(this.state)||this.state.viewModeEnabled)))return!1;Ll=!0,this.focusContainer(),this.state.editingTextElement||o.preventDefault();let u=!1,h=typeof window===void 0?!1:/Linux/.test(window.navigator.platform);He(this.interactiveCanvas,Fe.GRABBING);let{clientX:p,clientY:U}=o,m=Hh(b=>{let x=p-b.clientX,v=U-b.clientY;if(p=b.clientX,U=b.clientY,h&&!u&&(Math.abs(x)>1||Math.abs(v)>1)){u=!0;let y=k=>{document.body.removeEventListener("paste",y),k.stopPropagation()},w=()=>{setTimeout(()=>{document.body.removeEventListener("paste",y),window.removeEventListener("pointerup",w)},100)};document.body.addEventListener("paste",y),window.addEventListener("pointerup",w)}this.translateCanvas({scrollX:this.state.scrollX-x/this.state.zoom.value,scrollY:this.state.scrollY-v/this.state.zoom.value})}),g=ft(Nl=()=>{Nl=null,Ll=!1,gr||(this.state.viewModeEnabled?He(this.interactiveCanvas,Fe.GRAB):Ca(this.interactiveCanvas,this.state)),this.setState({cursorButton:"up"}),this.savePointer(o.clientX,o.clientY,"up"),window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",g),window.removeEventListener("blur",g),m.flush()});return window.addEventListener("blur",g),window.addEventListener("pointermove",m,{passive:!0}),window.addEventListener("pointerup",g),!0}),j(this,"clearSelectionIfNotUsingSelection",()=>{this.state.activeTool.type!=="selection"&&this.setState({selectedElementIds:De({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})}),j(this,"handleSelectionOnPointerDown",(o,u)=>{if(this.state.activeTool.type==="selection"){let h=this.scene.getNonDeletedElements(),p=this.scene.getNonDeletedElementsMap(),U=this.scene.getSelectedElements(this.state);if(U.length===1&&!this.state.editingLinearElement&&!Q(U[0])&&!(this.state.selectedLinearElement&&this.state.selectedLinearElement.hoverPointIndex!==-1)){let m=Vg(h,this.state,u.origin.x,u.origin.y,this.state.zoom,o.pointerType,this.scene.getNonDeletedElementsMap(),this.device);m!=null&&(m.transformHandleType==="rotation"?(this.setState({resizingElement:m.element}),u.resize.handleType=m.transformHandleType):(this.state.croppingElementId||this.setState({resizingElement:m.element}),u.resize.handleType=m.transformHandleType))}else U.length>1&&(u.resize.handleType=Gg(Ne(U),u.origin.x,u.origin.y,this.state.zoom,o.pointerType,this.device));if(u.resize.handleType)u.resize.isResizing=!0,u.resize.offset=aa(WO(u.resize.handleType,U,p,u.origin.x,u.origin.y)),U.length===1&&ue(U[0])&&U[0].points.length===2&&(u.resize.arrowDirection=VO(u.resize.handleType,U[0]));else{if(this.state.selectedLinearElement){let b=this.state.editingLinearElement||this.state.selectedLinearElement,x=J.handlePointerDown(o,this,this.store,u.origin,b,this.scene);if(x.hitElement&&(u.hit.element=x.hitElement),x.linearElementEditor&&(this.setState({selectedLinearElement:x.linearElementEditor}),this.state.editingLinearElement&&this.setState({editingLinearElement:x.linearElementEditor})),x.didAddPoint)return!0}if(u.hit.element=u.hit.element??this.getElementAtPosition(u.origin.x,u.origin.y),this.hitLinkElement=this.getElementLinkAtPosition(u.origin,u.hit.element),this.hitLinkElement)return!0;if(this.state.croppingElementId&&u.hit.element?.id!==this.state.croppingElementId&&this.finishImageCropping(),u.hit.element&&this.getElementLinkAtPosition({x:u.origin.x,y:u.origin.y},u.hit.element))return!1;u.hit.allHitElements=this.getElementsAtPosition(u.origin.x,u.origin.y);let m=u.hit.element,g=u.hit.allHitElements.some(b=>this.isASelectedElement(b));if((m===null||!g)&&!o.shiftKey&&!u.hit.hasHitCommonBoundingBoxOfSelectedElements&&this.clearSelection(m),this.state.editingLinearElement)this.setState({selectedElementIds:De({[this.state.editingLinearElement.elementId]:!0},this.state)});else if(m!=null){if(o[R.CTRL_OR_CMD])return this.state.selectedElementIds[m.id]||(u.hit.wasAddedToSelection=!0),this.setState(b=>({...NP(b,m),previousSelectedElementIds:this.state.selectedElementIds})),!1;this.state.selectedElementIds[m.id]||(this.state.editingGroupId&&!Po(m,this.state.editingGroupId)&&this.setState({selectedElementIds:De({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null}),!g&&!u.hit.hasHitCommonBoundingBoxOfSelectedElements&&(this.setState(b=>{let x={...b.selectedElementIds,[m.id]:!0},v=[];if(Object.keys(b.selectedElementIds).forEach(y=>{let w=this.scene.getElement(y);w&&v.push(w)}),ce(m))Ga(v,m.id).forEach(y=>{delete x[y.id]});else if(m.frameId)x[m.frameId]&&delete x[m.id];else{let y=m.groupIds,w=new Set(y.flatMap(k=>tt(this.scene.getNonDeletedElements(),k)).filter(k=>ce(k)).map(k=>k.id));w.size>0&&v.forEach(k=>{k.frameId&&w.has(k.frameId)&&(delete x[k.id],k.groupIds.flatMap(C=>tt(this.scene.getNonDeletedElements(),C)).forEach(C=>{delete x[C.id]}))})}return b.openDialog?.name==="elementLinkSelector"&&(m.groupIds.some(y=>b.selectedGroupIds[y])||(x={[m.id]:!0})),{...ln({editingGroupId:b.editingGroupId,selectedElementIds:x},this.scene.getNonDeletedElements(),b,this),showHyperlinkPopup:m.link||Un(m)?"info":!1}}),u.hit.wasAddedToSelection=!0))}this.setState({previousSelectedElementIds:this.state.selectedElementIds})}}return!1}),j(this,"handleTextOnPointerDown",(o,u)=>{if(this.state.editingTextElement)return;let h=u.origin.x,p=u.origin.y,U=this.getElementAtPosition(h,p,{includeBoundTextElement:!0}),m=this.getTextBindableContainerAtPosition(h,p);Wn(U)&&(m=U,h=U.x+U.width/2,p=U.y+U.height/2),this.startTextEditing({sceneX:h,sceneY:p,insertAtParentCenter:!o.altKey,container:m,autoEdit:!1}),Jn(this.interactiveCanvas),this.state.activeTool.locked||this.setState({activeTool:Et(this.state,{type:"selection"})})}),j(this,"handleFreeDrawElementOnPointerDown",(o,u,h)=>{let[p,U]=Mt(h.origin.x,h.origin.y,null),m=this.getTopLayerFrameAtSceneCoords({x:p,y:U}),g=o.pressure===.5,b=UN({type:u,x:p,y:U,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:null,simulatePressure:g,locked:!1,frameId:m?m.id:null,points:[E(0,0)],pressures:g?[]:[o.pressure]});this.scene.insertElement(b),this.setState(v=>{let y={...v.selectedElementIds};return delete y[b.id],{selectedElementIds:De(y,v)}});let x=ra(h.origin,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom);this.setState({newElement:b,startBoundElement:x,suggestedBindings:[]})}),j(this,"insertIframeElement",({sceneX:o,sceneY:u,width:h,height:p})=>{let[U,m]=Mt(o,u,this.lastPointerDownEvent?.[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),g=fN({type:"iframe",x:U,y:m,strokeColor:"transparent",backgroundColor:"transparent",fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:this.getCurrentItemRoundness("iframe"),opacity:this.state.currentItemOpacity,locked:!1,width:h,height:p});return this.scene.insertElement(g),g}),j(this,"insertEmbeddableElement",({sceneX:o,sceneY:u,link:h})=>{let[p,U]=Mt(o,u,this.lastPointerDownEvent?.[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),m=As(h);if(!m)return;m.error instanceof URIError&&this.setToast({message:M("toast.unrecognizedLinkFormat"),closable:!0});let g=fg({type:"embeddable",x:p,y:U,strokeColor:"transparent",backgroundColor:"transparent",fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:this.getCurrentItemRoundness("embeddable"),opacity:this.state.currentItemOpacity,locked:!1,width:m.intrinsicSize.w,height:m.intrinsicSize.h,link:h});return this.scene.insertElement(g),g}),j(this,"createImageElement",({sceneX:o,sceneY:u,addToFrameUnderCursor:h=!0})=>{let[p,U]=Mt(o,u,this.lastPointerDownEvent?.[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),m=h?this.getTopLayerFrameAtSceneCoords({x:p,y:U}):null;return t3({type:"image",x:p,y:U,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,roundness:null,opacity:this.state.currentItemOpacity,locked:!1,frameId:m?m.id:null})}),j(this,"handleLinearElementOnPointerDown",(o,u,h)=>{if(this.state.multiElement){let{multiElement:p}=this.state;if(p.type==="line"&&mi(p.points,this.state.zoom.value)){V(p,{lastCommittedPoint:p.points[p.points.length-1]}),this.actionManager.executeAction(Kn);return}if(Q(p)&&p.points.length>1){V(p,{lastCommittedPoint:p.points[p.points.length-1]}),this.actionManager.executeAction(Kn);return}let{x:U,y:m,lastCommittedPoint:g}=p;if(p.points.length>1&&g&&Pe(E(h.origin.x-U,h.origin.y-m),g)<ad){this.actionManager.executeAction(Kn);return}this.setState(b=>({selectedElementIds:De({...b.selectedElementIds,[p.id]:!0},b)})),V(p,{lastCommittedPoint:p.points[p.points.length-1]}),He(this.interactiveCanvas,Fe.POINTER)}else{let[p,U]=Mt(h.origin.x,h.origin.y,o[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),m=this.getTopLayerFrameAtSceneCoords({x:p,y:U}),{currentItemStartArrowhead:g,currentItemEndArrowhead:b}=this.state,[x,v]=u==="arrow"?[g,b]:[null,null],y=u==="arrow"?gp({type:u,x:p,y:U,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:this.state.currentItemArrowType===$t.round?{type:St.PROPORTIONAL_RADIUS}:null,startArrowhead:x,endArrowhead:v,locked:!1,frameId:m?m.id:null,elbowed:this.state.currentItemArrowType===$t.elbow,fixedSegments:this.state.currentItemArrowType===$t.elbow?[]:null}):Nr({type:u,x:p,y:U,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:this.state.currentItemRoundness==="round"?{type:St.PROPORTIONAL_RADIUS}:null,locked:!1,frameId:m?m.id:null});this.setState(k=>{let C={...k.selectedElementIds};return delete C[y.id],{selectedElementIds:De(C,k)}}),V(y,{points:[...y.points,E(0,0)]});let w=ra(h.origin,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom,Q(y),Q(y));this.scene.insertElement(y),this.setState({newElement:y,startBoundElement:w,suggestedBindings:[]})}}),j(this,"createGenericElementOnPointerDown",(o,u)=>{let[h,p]=Mt(u.origin.x,u.origin.y,this.lastPointerDownEvent?.[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),U=this.getTopLayerFrameAtSceneCoords({x:h,y:p}),m={x:h,y:p,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,roundness:this.getCurrentItemRoundness(o),locked:!1,frameId:U?U.id:null},g;o==="embeddable"?g=fg({type:"embeddable",...m}):g=Xa({type:o,...m}),g.type==="selection"?this.setState({selectionElement:g}):(this.scene.insertElement(g),this.setState({multiElement:null,newElement:g}))}),j(this,"createFrameElementOnPointerDown",(o,u)=>{let[h,p]=Mt(o.origin.x,o.origin.y,this.lastPointerDownEvent?.[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),U={x:h,y:p,opacity:this.state.currentItemOpacity,locked:!1,...ct},m=u===Dt.magicframe?P1(U):mp(U);this.scene.insertElement(m),this.setState({multiElement:null,newElement:m})}),j(this,"restoreReadyToEraseElements",()=>{this.elementsPendingErasure=new Set,this.triggerRender()}),j(this,"eraseElements",()=>{let o=!1,u=this.scene.getElementsIncludingDeleted().map(h=>this.elementsPendingErasure.has(h.id)||h.frameId&&this.elementsPendingErasure.has(h.frameId)||nt(h)&&this.elementsPendingErasure.has(h.containerId)?(o=!0,pe(h,{isDeleted:!0})):h);this.elementsPendingErasure=new Set,o&&(this.store.shouldCaptureIncrement(),this.scene.replaceAllElements(u))}),j(this,"initializeImage",async({imageFile:o,imageElement:u,showCursorImagePreview:h=!1})=>{if(!Or(o))throw new Error(M("errors.unsupportedFileType"));let p=o.type;if(He(this.interactiveCanvas,"wait"),p===ae.svg)try{o=qg(Eg(await o.text()),o.name)}catch(b){throw console.warn(b),new Error(M("errors.svgImageInsertError"))}let U=await(this.props.generateIdForFile?.(o)||i$(o));if(!U)throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),new Error(M("errors.imageInsertError"));if(!this.files[U]?.dataURL){try{o=await Y1(o,{maxWidthOrHeight:OM})}catch(b){console.error("Error trying to resizing image file on insertion",b)}if(o.size>p2)throw new Error(M("errors.fileTooBig",{maxSize:`${Math.trunc(p2/1024/1024)}MB`}))}if(h){let b=this.files[U]?.dataURL,x=b&&s$(b);this.setImagePreviewCursor(x||o)}let m=this.files[U]?.dataURL||await G1(o),g=V(u,{fileId:U},!1);return new Promise(async(b,x)=>{try{this.addMissingFiles([{mimeType:p,id:U,dataURL:m,created:Date.now(),lastRetrieved:Date.now()}]);let v=this.imageCache.get(U);v||(this.addNewImagesToImageCache(),await this.updateImageCache([g])),v?.image instanceof Promise&&await v.image,this.state.pendingImageElementId!==g.id&&this.state.newElement?.id!==g.id&&this.initializeImageDimensions(g,!0),b(g)}catch(v){console.error(v),x(new Error(M("errors.imageInsertError")))}finally{h||Jn(this.interactiveCanvas)}})}),j(this,"insertImageElement",async(o,u,h)=>{if(!this.isToolSupported("image")){this.setState({errorMessage:M("errors.imageToolNotSupported")});return}this.scene.insertElement(o);try{return await this.initializeImage({imageFile:u,imageElement:o,showCursorImagePreview:h})}catch(p){return V(o,{isDeleted:!0}),this.actionManager.executeAction(Kn),this.setState({errorMessage:p.message||M("errors.imageInsertError")}),null}}),j(this,"setImagePreviewCursor",async o=>{let u;try{u=await Y1(o,{maxWidthOrHeight:96})}catch(p){throw p.cause==="UNSUPPORTED"?new Error(M("errors.unsupportedFileType")):p}let h=await G1(u);if(o.type===ae.svg){let p=await u3(h),U=Math.min(p.height,96),m=U*(p.width/p.height);m>96&&(m=96,U=m*(p.height/p.width));let g=document.createElement("canvas");g.height=U,g.width=m,g.getContext("2d").drawImage(p,0,0,m,U),h=g.toDataURL(ae.svg)}this.state.pendingImageElementId&&He(this.interactiveCanvas,`url(${h}) 4 4, auto`)}),j(this,"onImageAction",async({insertOnCanvasDirectly:o})=>{try{let u=this.state.width/2+this.state.offsetLeft,h=this.state.height/2+this.state.offsetTop,{x:p,y:U}=Ge({clientX:u,clientY:h},this.state),m=await vp({description:"Image",extensions:Object.keys(Ws)}),g=this.createImageElement({sceneX:p,sceneY:U,addToFrameUnderCursor:!1});o?(this.insertImageElement(g,m),this.initializeImageDimensions(g),this.setState({selectedElementIds:De({[g.id]:!0},this.state)},()=>{this.actionManager.executeAction(Kn)})):this.setState({pendingImageElementId:g.id},()=>{this.insertImageElement(g,m,!0)})}catch(u){u.name!=="AbortError"?console.error(u):console.warn(u),this.setState({pendingImageElementId:null,newElement:null,activeTool:Et(this.state,{type:"selection"})},()=>{this.actionManager.executeAction(Kn)})}}),j(this,"initializeImageDimensions",(o,u=!1)=>{let h=Ln(o)&&this.imageCache.get(o.fileId)?.image;if(!h||h instanceof Promise){if(o.width<yr/this.state.zoom.value&&o.height<yr/this.state.zoom.value){let p=100/this.state.zoom.value;V(o,{x:o.x-p/2,y:o.y-p/2,width:p,height:p})}return}if(u||o.width<yr/this.state.zoom.value&&o.height<yr/this.state.zoom.value){let p=Math.max(this.state.height-120,160),U=Math.min(p,Math.floor(this.state.height*.5)/this.state.zoom.value),m=Math.min(h.naturalHeight,U),g=m*(h.naturalWidth/h.naturalHeight),b=o.x+o.width/2-g/2,x=o.y+o.height/2-m/2;V(o,{x:b,y:x,width:g,height:m,crop:null})}}),j(this,"updateImageCache",async(o,u=this.files)=>{let{updatedFiles:h,erroredFiles:p}=await f3({imageCache:this.imageCache,fileIds:o.map(U=>U.fileId),files:u});if(h.size||p.size)for(let U of o)h.has(U.fileId)&&ut.delete(U);return p.size&&this.scene.replaceAllElements(this.scene.getElementsIncludingDeleted().map(U=>Ln(U)&&p.has(U.fileId)?pe(U,{status:"error"}):U)),{updatedFiles:h,erroredFiles:p}}),j(this,"addNewImagesToImageCache",async(o=h3(this.scene.getNonDeletedElements()),u=this.files)=>{let h=o.filter(p=>!p.isDeleted&&!this.imageCache.has(p.fileId));if(h.length){let{updatedFiles:p}=await this.updateImageCache(h,u);p.size&&this.scene.triggerUpdate()}}),j(this,"scheduleImageRefresh",Zo(()=>{this.addNewImagesToImageCache()},_M)),j(this,"updateBindingEnabledOnPointerMove",o=>{let u=fP(o);this.state.isBindingEnabled!==u&&this.setState({isBindingEnabled:u})}),j(this,"maybeSuggestBindingAtCursor",(o,u)=>{let h=ra(o,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom,!1,u);this.setState({suggestedBindings:h!=null?[h]:[]})}),j(this,"maybeSuggestBindingsForLinearElementAtCoords",(o,u,h)=>{if(!u.length)return;let p=u.reduce((U,m)=>{let g=ra(m,this.scene.getNonDeletedElements(),this.scene.getNonDeletedElementsMap(),this.state.zoom,Q(o),Q(o));return g!=null&&!R7(o,h?.id,g)&&U.push(g),U},[]);this.setState({suggestedBindings:p})}),j(this,"handleInteractiveCanvasRef",o=>{o!==null?(this.interactiveCanvas=o,this.interactiveCanvas.addEventListener("touchstart",this.onTouchStart,{passive:!1}),this.interactiveCanvas.addEventListener("touchend",this.onTouchEnd)):(this.interactiveCanvas?.removeEventListener("touchstart",this.onTouchStart),this.interactiveCanvas?.removeEventListener("touchend",this.onTouchEnd))}),j(this,"handleAppOnDrop",async o=>{let{file:u,fileHandle:h}=await c$(o),{x:p,y:U}=Ge(o,this.state);try{if(Or(u)&&this.isToolSupported("image")){if(u?.type===ae.png||u?.type===ae.svg)try{let b=await Kp(u,this.state,this.scene.getElementsIncludingDeleted(),h);this.syncActionResult({...b,appState:{...b.appState||this.state,isLoading:!1},replaceFiles:!0,captureUpdate:B.IMMEDIATELY});return}catch(b){if(b.name!=="EncodingError")throw new Error(M("alerts.couldNotLoadInvalidFile"))}let g=this.createImageElement({sceneX:p,sceneY:U});this.insertImageElement(g,u),this.initializeImageDimensions(g),this.setState({selectedElementIds:De({[g.id]:!0},this.state)});return}}catch(g){return this.setState({isLoading:!1,errorMessage:g.message})}let m=o.dataTransfer.getData(ae.excalidrawlib);if(m&&typeof m=="string"){try{let g=i4(m);this.addElementsFromPasteOrLibrary({elements:ex(g),position:o,files:null})}catch(g){this.setState({errorMessage:g.message})}return}if(u&&await this.loadFileToCanvas(u,h),o.dataTransfer?.types?.includes("text/plain")){let g=o.dataTransfer?.getData("text");if(g&&hd(g,this.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(g)||As(g)?.type==="video")){let b=this.insertEmbeddableElement({sceneX:p,sceneY:U,link:yn(g)});b&&this.setState({selectedElementIds:{[b.id]:!0}})}}}),j(this,"loadFileToCanvas",async(o,u)=>{o=await qp(o);try{let h=this.scene.getElementsIncludingDeleted(),p;try{p=await Zp(o,this.state,h,u)}catch(U){let m=U instanceof _r;if(m&&U.code==="IMAGE_NOT_CONTAINS_SCENE_DATA"&&!this.isToolSupported("image")){this.setState({isLoading:!1,errorMessage:M("errors.imageToolNotSupported")});return}let g=M(m?"alerts.cannotRestoreFromImage":"alerts.couldNotLoadInvalidFile");this.setState({isLoading:!1,errorMessage:g})}if(!p)return;p.type===ae.excalidraw?(Va(h.concat(p.data.elements)),this.store.updateSnapshot(oe(h),this.state),this.setState({isLoading:!0}),this.syncActionResult({...p.data,appState:{...p.data.appState||this.state,isLoading:!1},replaceFiles:!0,captureUpdate:B.IMMEDIATELY})):p.type===ae.excalidrawlib&&await this.library.updateLibrary({libraryItems:o,merge:!0,openLibraryMenu:!0}).catch(U=>{console.error(U),this.setState({errorMessage:M("errors.importLibraryError")})})}catch(h){this.setState({isLoading:!1,errorMessage:h.message})}}),j(this,"handleCanvasContextMenu",o=>{if(o.preventDefault(),("pointerType"in o.nativeEvent&&o.nativeEvent.pointerType==="touch"||"pointerType"in o.nativeEvent&&o.nativeEvent.pointerType==="pen"&&o.button!==Li.SECONDARY)&&this.state.activeTool.type!=="selection")return;let{x:u,y:h}=Ge(o,this.state),p=this.getElementAtPosition(u,h,{preferSelected:!0,includeLockedElements:!0}),U=this.scene.getSelectedElements(this.state),m=this.isHittingCommonBoundingBoxOfSelectedElements({x:u,y:h},U),g=p||m?"element":"canvas",b=this.excalidrawContainerRef.current,{top:x,left:v}=b.getBoundingClientRect(),y=o.clientX-v,w=o.clientY-x;qe("contextMenu","openContextMenu",g),this.setState({...p&&!this.state.selectedElementIds[p.id]?{...this.state,...ln({editingGroupId:this.state.editingGroupId,selectedElementIds:{[p.id]:!0}},this.scene.getNonDeletedElements(),this.state,this),selectedLinearElement:ue(p)?new J(p):null}:this.state,showHyperlinkPopup:!1},()=>{this.setState({contextMenu:{top:w,left:y,items:this.getContextMenuItems(g)}})})}),j(this,"maybeDragNewGenericElement",(o,u,h=!0)=>{let p=this.state.selectionElement,U=o.lastCoords;if(p&&this.state.activeTool.type!=="eraser"){Kg({newElement:p,elementType:this.state.activeTool.type,originX:o.origin.x,originY:o.origin.y,x:U.x,y:U.y,width:Jt(o.origin.x,U.x),height:Jt(o.origin.y,U.y),shouldMaintainAspectRatio:Ml(u),shouldResizeFromCenter:uh(u),zoom:this.state.zoom.value,informMutation:h});return}let m=this.state.newElement;if(!m)return;let[g,b]=Mt(U.x,U.y,u[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),x=Ln(m)&&this.imageCache.get(m.fileId)?.image,v=x&&!(x instanceof Promise)?x.width/x.height:null;this.maybeCacheReferenceSnapPoints(u,[m]);let{snapOffset:y,snapLines:w}=KP(m,this,u,{x:o.originInGrid.x+(this.state.originSnapOffset?.x??0),y:o.originInGrid.y+(this.state.originSnapOffset?.y??0)},{x:g-o.originInGrid.x,y:b-o.originInGrid.y},this.scene.getNonDeletedElementsMap());g+=y.x,b+=y.y,this.setState({snapLines:w}),Kg({newElement:m,elementType:this.state.activeTool.type,originX:o.originInGrid.x,originY:o.originInGrid.y,x:g,y:b,width:Jt(o.originInGrid.x,g),height:Jt(o.originInGrid.y,b),shouldMaintainAspectRatio:Le(m)?!Ml(u):Ml(u),shouldResizeFromCenter:uh(u),zoom:this.state.zoom.value,widthAspectRatio:v,originOffset:this.state.originSnapOffset,informMutation:h}),this.setState({newElement:m}),(this.state.activeTool.type===Dt.frame||this.state.activeTool.type===Dt.magicframe)&&this.setState({elementsToHighlight:Ud(this.scene.getNonDeletedElements(),m,this.state,this.scene.getNonDeletedElementsMap())})}),j(this,"maybeHandleCrop",(o,u)=>{if(!this.state.croppingElementId)return!1;let h=o.resize.handleType,p=o.lastCoords,[U,m]=Mt(p.x-o.resize.offset.x,p.y-o.resize.offset.y,u[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),g=this.scene.getNonDeletedElementsMap().get(this.state.croppingElementId);if(h&&g&&Le(g)){let b=o.originalElements.get(g.id),x=Ln(g)&&this.imageCache.get(g.fileId)?.image;if(b&&Le(b)&&x&&!(x instanceof Promise)){let[v,y]=Mt(p.x,p.y,u[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),w={x:v-o.originInGrid.x,y:y-o.originInGrid.y};this.maybeCacheReferenceSnapPoints(u,[g]);let{snapOffset:k,snapLines:C}=dg([g],[b],this,u,w,h);V(g,PL(g,h,x.naturalWidth,x.naturalHeight,U+k.x,m+k.y,u.shiftKey?b.width/b.height:void 0)),xn(g,this.scene.getNonDeletedElementsMap(),{newSize:{width:g.width,height:g.height}}),this.setState({isCropping:h&&h!=="rotation",snapLines:C})}return!0}return!1}),j(this,"maybeHandleResize",(o,u)=>{let h=this.scene.getSelectedElements(this.state),p=h.filter(v=>ce(v)),U=o.resize.handleType;if(p.length>0&&U==="rotation"||h.length===1&&Q(h[0])||this.state.croppingElementId)return!1;this.setState({isResizing:U&&U!=="rotation",isRotating:U==="rotation",activeEmbeddable:null});let m=o.lastCoords,[g,b]=Mt(m.x-o.resize.offset.x,m.y-o.resize.offset.y,u[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),x=new Map;if(p.forEach(v=>{Ga(this.scene.getNonDeletedElements(),v.id).forEach(y=>{x.set(v.id+y.id,{x:y.x-v.x,y:y.y-v.y})})}),!this.state.selectedElementsAreBeingDragged){let[v,y]=Mt(m.x,m.y,u[R.CTRL_OR_CMD]?null:this.getEffectiveGridSize()),w={x:v-o.originInGrid.x,y:y-o.originInGrid.y},k=[...o.originalElements.values()];this.maybeCacheReferenceSnapPoints(u,h);let{snapOffset:C,snapLines:I}=dg(h,ve(k,this.state),this,u,w,U);g+=C.x,b+=C.y,this.setState({snapLines:I})}if(zO(o.originalElements,U,h,this.scene.getElementsMapIncludingDeleted(),this.scene,ro(u),uh(u),h.some(v=>Le(v))?!Ml(u):Ml(u),g,b,o.resize.center.x,o.resize.center.y)){let v=hh(h,this.scene.getNonDeletedElementsMap(),this.state.zoom),y=new Set;return p.forEach(w=>{Ud(this.scene.getNonDeletedElements(),w,this.state,this.scene.getNonDeletedElementsMap()).forEach(k=>y.add(k))}),this.setState({elementsToHighlight:[...y],suggestedBindings:v}),!0}return!1}),j(this,"getContextMenuItems",o=>{let u=[];return u.push(K6,Z6),o==="canvas"?this.state.viewModeEnabled?[...u,J6,f0,j5,h0]:[G6,jt,K6,Z6,q6,jt,aH,EX,jt,J6,dX,f0,j5,h0]:(u.push(q6),this.state.viewModeEnabled?[wd,...u]:[jt,Y6,wd,G6,jt,VG,GG,YG,jt,FW,jt,...u,jt,ZH,KH,jt,JH,RY,uX,fX,UX,QH,jt,aX,jt,QB,eH,tH,nH,jt,lX,oX,jt,$W,jt,Yv,hx,jt,lH,wX,jt,mv])}),j(this,"handleWheel",ft(o=>{if(!(o.target instanceof HTMLCanvasElement||o.target instanceof HTMLTextAreaElement||o.target instanceof HTMLIFrameElement)){o[R.CTRL_OR_CMD]&&o.preventDefault();return}if(o.preventDefault(),Ll)return;let{deltaX:u,deltaY:h}=o;if(o.metaKey||o.ctrlKey){let p=Math.sign(h),U=Lu*100,m=Math.abs(h),g=h;m>U&&(g=U*p);let b=this.state.zoom.value-g/100;b+=Math.log10(Math.max(1,this.state.zoom.value))*-p*Math.min(1,m/20),this.translateCanvas(x=>({...jr({viewportX:this.lastViewportPosition.x,viewportY:this.lastViewportPosition.y,nextZoom:ci(b)},x),shouldCacheIgnoreZoom:!0})),this.resetShouldCacheIgnoreZoomDebounced();return}if(o.shiftKey){this.translateCanvas(({zoom:p,scrollX:U})=>({scrollX:U-(h||u)/p.value}));return}this.translateCanvas(({zoom:p,scrollX:U,scrollY:m})=>({scrollX:U-u/p.value,scrollY:m-h/p.value}))})),j(this,"savePointer",(o,u,h)=>{if(!o||!u)return;let{x:p,y:U}=Ge({clientX:o,clientY:u},this.state),m={x:p,y:U,tool:this.state.activeTool.type==="laser"?"laser":"pointer"};this.props.onPointerUpdate?.({pointer:m,button:h,pointersMap:Re.pointers})}),j(this,"resetShouldCacheIgnoreZoomDebounced",Ys(()=>{this.unmounted||this.setState({shouldCacheIgnoreZoom:!1})},300)),j(this,"updateDOMRect",o=>{if(this.excalidrawContainerRef?.current){let u=this.excalidrawContainerRef.current,{width:h,height:p,left:U,top:m}=u.getBoundingClientRect(),{width:g,height:b,offsetTop:x,offsetLeft:v}=this.state;if(h===g&&p===b&&U===v&&m===x){o&&o();return}this.setState({width:h,height:p,offsetLeft:U,offsetTop:m},()=>{o&&o()})}}),j(this,"refresh",()=>{this.setState({...this.getCanvasOffsets()})});let n=za(),{excalidrawAPI:a,viewModeEnabled:i=!1,zenModeEnabled:r=!1,gridModeEnabled:s=!1,objectsSnapModeEnabled:l=!1,theme:c=n.theme,name:d=`${M("labels.untitled")}-${x2()}`}=t;if(this.state={...n,theme:c,isLoading:!0,...this.getCanvasOffsets(),viewModeEnabled:i,zenModeEnabled:r,objectsSnapModeEnabled:l,gridModeEnabled:s??n.gridModeEnabled,name:d,width:window.innerWidth,height:window.innerHeight},this.id=P0(),this.library=new AX(this),this.actionManager=new XW(this.syncActionResult,()=>this.state,()=>this.scene.getElementsIncludingDeleted(),this),this.scene=new xi,this.canvas=document.createElement("canvas"),this.rc=cr.canvas(this.canvas),this.renderer=new $5(this.scene),this.visibleElements=[],this.store=new xN,this.history=new c5,a){let o={updateScene:this.updateScene,updateLibrary:this.library.updateLibrary,addFiles:this.addFiles,resetScene:this.resetScene,getSceneElementsIncludingDeleted:this.getSceneElementsIncludingDeleted,history:{clear:this.resetHistory},scrollToContent:this.scrollToContent,getSceneElements:this.getSceneElements,getAppState:()=>this.state,getFiles:()=>this.files,getName:this.getName,registerAction:u=>{this.actionManager.registerAction(u)},refresh:this.refresh,setToast:this.setToast,id:this.id,setActiveTool:this.setActiveTool,setCursor:this.setCursor,resetCursor:this.resetCursor,updateFrameRendering:this.updateFrameRendering,toggleSidebar:this.toggleSidebar,onChange:u=>this.onChangeEmitter.on(u),onPointerDown:u=>this.onPointerDownEmitter.on(u),onPointerUp:u=>this.onPointerUpEmitter.on(u),onScrollChange:u=>this.onScrollChangeEmitter.on(u),onUserFollow:u=>this.onUserFollowEmitter.on(u)};typeof a=="function"?a(o):console.error("excalidrawAPI should be a function!")}this.excalidrawContainerValue={container:this.excalidrawContainerRef.current,id:this.id},this.fonts=new ui(this.scene),this.history=new c5,this.actionManager.registerAll(L1),this.actionManager.registerAction(BW(this.history,this.store)),this.actionManager.registerAction(HW(this.history,this.store))}onWindowMessage(t){if(t.origin!=="https://player.vimeo.com"&&t.origin!=="https://www.youtube.com")return;let n=null;try{n=JSON.parse(t.data)}catch{}if(n)switch(t.origin){case"https://player.vimeo.com":if(n.method==="paused"){let a=null,i=document.body.querySelectorAll("iframe.excalidraw__embeddable");if(!i)break;for(let r of i)r.contentWindow===t.source&&(a=r.contentWindow);a?.postMessage(JSON.stringify({method:n.value?"play":"pause",value:!0}),"*")}break;case"https://www.youtube.com":if(n.event==="infoDelivery"&&n.info&&n.id&&typeof n.info.playerState=="number"){let a=n.id,i=n.info.playerState;Object.values(Mc).includes(i)&&Kh.set(a,i)}break}}cacheEmbeddableRef(t,n){n&&this.iFrameRefs.set(t.id,n)}getHTMLIFrameElement(t){return this.iFrameRefs.get(t.id)}handleEmbeddableCenterClick(t){if(this.state.activeEmbeddable?.element===t&&this.state.activeEmbeddable?.state==="active"||(setTimeout(()=>{this.setState({activeEmbeddable:{element:t,state:"active"},selectedElementIds:{[t.id]:!0},newElement:null,selectionElement:null})},100),$i(t)))return;let n=this.getHTMLIFrameElement(t);if(n?.contentWindow){if(n.src.includes("youtube")){let a=Kh.get(t.id);switch(a||(Kh.set(t.id,Mc.UNSTARTED),n.contentWindow.postMessage(JSON.stringify({event:"listening",id:t.id}),"*")),a){case Mc.PLAYING:case Mc.BUFFERING:n.contentWindow?.postMessage(JSON.stringify({event:"command",func:"pauseVideo",args:""}),"*");break;default:n.contentWindow?.postMessage(JSON.stringify({event:"command",func:"playVideo",args:""}),"*")}}n.src.includes("player.vimeo.com")&&n.contentWindow.postMessage(JSON.stringify({method:"paused"}),"*")}}isIframeLikeElementCenter(t,n,a,i){return t&&!n.altKey&&!n.shiftKey&&!n.metaKey&&!n.ctrlKey&&(this.state.activeEmbeddable?.element!==t||this.state.activeEmbeddable?.state==="hover"||!this.state.activeEmbeddable)&&a>=t.x+t.width/3&&a<=t.x+2*t.width/3&&i>=t.y+t.height/3&&i<=t.y+2*t.height/3}renderEmbeddables(){let t=this.state.zoom.value,n=this.state.width,a=this.state.height,i=this.scene.getNonDeletedElements().filter(r=>Un(r)&&this.embedsValidationStatus.get(r.id)===!0||$i(r));return f.jsx(f.Fragment,{children:i.map(r=>{let{x:s,y:l}=Nn({sceneX:r.x,sceneY:r.y},this.state),c=du(r,n,a,this.state,this.scene.getNonDeletedElementsMap()),d=this.initializedEmbeds.has(r.id);if(c&&!d&&this.initializedEmbeds.add(r.id),!(c||d))return null;let o;if($i(r)){o=null;let p=(r.customData?.generationData??this.magicGenerations.get(r.id))||{status:"error",message:"No generation data",code:"ERR_NO_GENERATION_DATA"};if(p.status==="done"){let U=p.html;o={intrinsicSize:{w:r.width,h:r.height},type:"document",srcdoc:()=>U}}else if(p.status==="pending")o={intrinsicSize:{w:r.width,h:r.height},type:"document",srcdoc:()=>so(`
|
|
106
106
|
<style>
|
|
107
107
|
html, body {
|
|
108
108
|
width: 100%;
|