@myoc/excalidraw 0.18.20 → 0.18.21
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/dev/{chunk-GR6GZQQD.js → chunk-DUURZLYX.js} +2 -2
- package/dist/dev/{chunk-5IFOUNFV.js → chunk-XJGMBAJT.js} +3 -3
- package/dist/dev/data/{image-QMTJGSU7.js → image-NCRXXRJW.js} +3 -3
- package/dist/dev/index.js +3 -3
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/{chunk-PPT7KBS3.js → chunk-4UANJTGP.js} +1 -1
- package/dist/prod/{chunk-SHSFPXHA.js → chunk-ESVIN3T7.js} +2 -2
- package/dist/prod/data/image-7MUHAX25.js +1 -0
- package/dist/prod/index.js +2 -2
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/package.json +7 -7
- package/dist/prod/data/image-TZAIFXB2.js +0 -1
- /package/dist/dev/{chunk-GR6GZQQD.js.map → chunk-DUURZLYX.js.map} +0 -0
- /package/dist/dev/{chunk-5IFOUNFV.js.map → chunk-XJGMBAJT.js.map} +0 -0
- /package/dist/dev/data/{image-QMTJGSU7.js.map → image-NCRXXRJW.js.map} +0 -0
package/dist/prod/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{$ as Hl,A as um,B as Qf,C as e1,D as t1,E as Bl,F as qi,G as Fl,H as Ol,I as o1,J as r1,K as Ji,L as n1,M as i1,N as a1,O as l1,P as zl,Q as En,R as s1,S as hm,T as oC,U as yn,V as Qi,X as c1,Z as d1,_ as m1,a as $f,aa as p1,b as Or,ba as ea,c as uo,ca as gm,d as jf,da as Gl,e as Ee,ea as u1,f as qf,fa as fm,g as $,ga as Lo,h as _l,ha as h1,i as Ko,ia as bm,j as lm,ja as g1,k as sm,ka as f1,l as gn,la as Ul,m as cm,ma as xm,n as fn,na as b1,o as Jf,oa as x1,p as dm,pa as E1,q as Zo,qa as y1,r as bn,s as Et,t as qt,u as xn,v as Rl,w as mm,x as ji,y as Nl,z as pm}from"./chunk-SHSFPXHA.js";import{a as T}from"./chunk-PPT7KBS3.js";import{J as am}from"./chunk-KZXLT4YB.js";import{c as Zf}from"./chunk-Z3N5DIM6.js";import{b as Xf,c as Kf,d as I}from"./chunk-SRAX5OIU.js";import rU,{useEffect as nU}from"react";import{DEFAULT_UI_OPTIONS as QI,isShallowEqual as iU}from"@excalidraw/common";import DT from"clsx";import zz from"lodash.throttle";import Mo,{useContext as Nr}from"react";import{flushSync as Yi}from"react-dom";import Hz from"roughjs/bin/rough";import{nanoid as Gz}from"nanoid";import{clamp as _T,pointFrom as ne,pointDistance as sn,vector as RT,pointRotateRads as qg,vectorScale as Uz,vectorFromPoint as Jg,vectorSubtract as NT,vectorDot as BT,vectorNormalize as FT}from"@excalidraw/math";import{COLOR_PALETTE as Yz,CODES as OT,shouldResizeFromCenter as zT,shouldMaintainAspectRatio as bl,shouldRotateWithDiscreteAngle as Qg,isArrowKey as Vd,KEYS as U,APP_NAME as Wz,CURSOR_TYPE as De,DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT as Vz,DEFAULT_VERTICAL_ALIGN as HT,DRAGGING_THRESHOLD as Xz,ELEMENT_SHIFT_TRANSLATE_AMOUNT as Kz,ELEMENT_TRANSLATE_AMOUNT as GT,EVENT as ee,FRAME_STYLE as Pr,IMAGE_MIME_TYPES as Zz,IMAGE_RENDER_TIMEOUT as $z,isBrave as jz,LINE_CONFIRM_THRESHOLD as ef,MAX_ALLOWED_FILE_BYTES as UT,MIME_TYPES as Ar,MQ_MAX_HEIGHT_LANDSCAPE as qz,MQ_MAX_WIDTH_LANDSCAPE as Jz,MQ_MAX_WIDTH_PORTRAIT as Qz,MQ_RIGHT_SIDEBAR_MIN_WIDTH as eH,POINTER_BUTTON as cn,ROUNDNESS as Xd,SCROLL_TIMEOUT as tH,TAP_TWICE_TIMEOUT as oH,TEXT_TO_CENTER_SNAP_THRESHOLD as rH,THEME as Kd,THEME_FILTER as nH,TOUCH_CTX_MENU_TIMEOUT as iH,VERTICAL_ALIGN as aH,YOUTUBE_STATES as Zd,ZOOM_STEP as lH,POINTER_EVENTS as Wi,TOOL_TYPE as ko,isIOS as sH,supportsResizeObserver as YT,DEFAULT_COLLISION_THRESHOLD as WT,DEFAULT_TEXT_ALIGN as cH,ARROW_TYPE as Dr,DEFAULT_REDUCED_GLOBAL_ALPHA as dH,isSafari as mH,isLocalLink as pH,normalizeLink as tf,toValidURL as uH,getGridPoint as nt,getLineHeight as VT,debounce as XT,distance as Vi,getFontString as of,getNearestScrollableContainer as hH,isInputLike as KT,isToolIcon as gH,isWritableElement as xl,sceneCoordsToViewportCoords as $d,tupleToCoors as rf,viewportCoordsToSceneCoords as Fe,wrapEvent as fH,updateObject as nf,updateActiveTool as Vo,getShortcutKey as bH,isTransparent as xH,easeToValuesRAF as EH,muteFSAbortError as yH,isTestEnv as Sf,isDevEnv as AI,easeOut as wH,updateStable as El,addEventListener as _e,normalizeEOL as vH,getDateTime as ZT,isShallowEqual as TH,arrayToMap as jd,randomInteger as IH,CLASSES as CH,Emitter as dn,MINIMUM_ARROW_SIZE as $T}from"@excalidraw/common";import{getObservedAppState as SH,getCommonBounds as Xi,maybeSuggestBindingsForLinearElementAtCoords as jT,getElementAbsoluteCoords as qT,bindOrUnbindLinearElements as JT,fixBindingsAfterDeletion as kH,getHoveredElementForBinding as af,isBindingEnabled as lf,shouldEnableBindingForPointerEvent as MH,updateBoundElements as sf,getSuggestedBindingsForArrows as cf,LinearElementEditor as Ce,newElementWith as mn,newFrameElement as LH,newFreeDrawElement as PH,newEmbeddableElement as QT,newMagicFrameElement as eI,newIframeElement as AH,newArrowElement as DH,newElement as _H,newImageElement as RH,newLinearElement as NH,newTextElement as tI,refreshTextDimensions as BH,deepCopyElement as oI,duplicateElements as rI,hasBoundTextElement as nI,isArrowElement as df,isBindingElement as mf,isBindingElementType as iI,isBoundToContainer as pf,isFrameLikeElement as Zt,isImageElement as pn,isEmbeddableElement as _r,isInitializedImageElement as yl,isLinearElement as $t,isLinearElementType as FH,isUsingAdaptiveRadius as OH,isIframeElement as Ki,isIframeLikeElement as wl,isMagicFrameElement as uf,isTextBindableContainer as aI,isElbowArrow as Ge,isFlowchartNodeElement as zH,isBindableElement as HH,isTextElement as mo,getLockedLinearCursorAlignSize as lI,getNormalizedDimensions as GH,isElementCompletelyInViewport as hf,isElementInViewport as sI,isInvisiblySmallElement as cI,getCornerRadius as UH,isPathALoop as dI,createSrcDoc as mI,embeddableURLValidator as gf,maybeParseEmbedSrc as YH,getEmbedLink as qd,getInitializedImageElements as WH,normalizeSVG as pI,updateImageCache as VH,getBoundTextElement as ff,getContainerCenter as bf,getContainerElement as uI,isValidTextContainer as XH,redrawTextBoundingBox as KH,shouldShowBoundingBox as ZH,getFrameChildren as hI,isCursorInFrame as gI,addElementsToFrame as xf,replaceAllElementsInFrame as $H,removeElementsFromFrame as jH,getElementsInResizingFrame as Ef,getElementsInNewFrame as qH,getContainingFrame as yf,elementOverlapsWithFrame as JH,updateFrameMembershipOfSelectedElements as fI,isElementInFrame as bI,getFrameLikeTitle as QH,getElementsOverlappingFrame as eG,filterElementsEligibleAsFrameChildren as tG,hitElementBoundText as oG,hitElementBoundingBoxOnly as rG,hitElementItself as vl,getVisibleSceneBounds as nG,FlowChartCreator as iG,FlowChartNavigator as aG,getLinkDirectionFromKey as xI,cropElement as lG,wrapText as sG,isElementLink as wf,parseElementLinkFromURL as cG,isMeasureTextSupported as dG,normalizeText as mG,measureText as EI,getLineHeightInPx as pG,getApproxMinLineWidth as uG,getApproxMinLineHeight as hG,getMinTextElementWidth as gG,ShapeCache as Tl,getRenderOpacity as fG,editGroupForSelectedElement as bG,getElementsInGroup as Il,getSelectedGroupIdForElement as xG,getSelectedGroupIds as EG,isElementInGroup as yI,isSelectedViaGroup as yG,selectGroupsForSelectedElements as po,syncInvalidIndices as DI,syncMovedIndices as wI,excludeElementsInFramesFromSelection as wG,getSelectionStateForElements as vG,makeNextSelectedElementIds as fe,getResizeOffsetXY as TG,getResizeArrowDirection as IG,transformElements as CG,getCursorForResizingElement as vI,getElementWithTransformHandleType as TI,getTransformHandleTypeFromCoords as II,dragNewElement as CI,dragSelectedElements as SG,getDragOffsetXY as kG,isNonDeletedElement as SI,Scene as kI,Store as MG,CaptureUpdateAction as mt,hitElementBoundingBox as LG,isLineElement as vf,isSimpleArrow as PG}from"@excalidraw/element";import{arrangeElements as MI}from"@excalidraw/element/arrange";import{KEYS as Vm,updateActiveTool as fC}from"@excalidraw/common";import{getNonDeletedElements as Xm}from"@excalidraw/element";import{fixBindingsAfterDeletion as bC}from"@excalidraw/element";import{LinearElementEditor as hb}from"@excalidraw/element";import{newElementWith as ds}from"@excalidraw/element";import{getContainerElement as gb}from"@excalidraw/element";import{isBoundToContainer as ss,isElbowArrow as xC,isFrameLikeElement as EC}from"@excalidraw/element";import{getFrameChildren as yC}from"@excalidraw/element";import{getElementsInGroup as Km,selectGroupsForSelectedElements as wC}from"@excalidraw/element";import{CaptureUpdateAction as cs}from"@excalidraw/element";import{isDevEnv as aC}from"@excalidraw/common";import{atom as he,createStore as rC}from"jotai";import{createIsolation as nC}from"jotai-scope";var w1=nC();var{useAtom:se,useSetAtom:wn,useAtomValue:Yl,useStore:mU}=w1,v1=w1.Provider,Ke=rC();var iC=Xf({"./locales/ar-SA.json":()=>import("./locales/ar-SA-G6X2FPQ2.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-76LH7QW2.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-XCXSNQG7.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-2XOGV67Q.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-6MX7JW3Y.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-2BRQDIVT.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-5WZEPLOC.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-XR44H4JA.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-BZB4AONW.js"),"./locales/en.json":()=>import("./locales/en-XFR6MADM.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-U4NZUMDT.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-A7QVB2H4.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-HGAKTJCU.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-Z5N7JZ37.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-RHASNOE6.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-HMX3MZ6V.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-6SHJWFNN.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-IWLTKZ5I.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-A5ZG7DT2.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-SAP4L64H.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-JPQ66NNP.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-DBVTYXUO.js"),"./locales/kaa.json":()=>import("./locales/kaa-6HZHGXH3.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-ZGHBKWFO.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-P5N5QNE5.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-HSX4SM5Z.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-MTYHY66A.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-6OUDTVRD.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-XHIRWOB4.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-5QDEKY6T.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-CRQNXWMA.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-5M5IBNSE.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-T6EIAALU.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-IS3SIHDZ.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-6E72VCQL.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-POXYY2M6.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-N4M65BXN.js"),"./locales/percentages.json":()=>import("./locales/percentages-BXMCSKIN.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-T2D74RX3.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-5N22H2LF.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-UZXXM6DQ.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-JPDTUUEW.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-B4JR7IUQ.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-N5RQ5JYF.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-C5VTKIMK.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-NN7IZMDC.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-XGPEYMSR.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-2NMHFXQM.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-HPSO5L25.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-DEFEU3FU.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-QMV73CPH.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-M7AON7JQ.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-LNUGB5OW.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-E62DVLB3.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-RAJ6MFWO.js")});var lC=85,ho={code:"en",label:"English"},Tn=[ho,...[{code:"ar-SA",label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",rtl:!0},{code:"bg-BG",label:"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438"},{code:"ca-ES",label:"Catal\xE0"},{code:"cs-CZ",label:"\u010Cesky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},{code:"es-ES",label:"Espa\xF1ol"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"\u0641\u0627\u0631\u0633\u06CC",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Fran\xE7ais"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"\u05E2\u05D1\u05E8\u05D9\u05EA",rtl:!0},{code:"hi-IN",label:"\u0939\u093F\u0928\u094D\u0926\u0940"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"\u65E5\u672C\u8A9E"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"\u049A\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456"},{code:"ko-KR",label:"\uD55C\uAD6D\uC5B4"},{code:"ku-TR",label:"Kurd\xEE"},{code:"lt-LT",label:"Lietuvi\u0173"},{code:"lv-LV",label:"Latvie\u0161u"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokm\xE5l"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Portugu\xEAs Brasileiro"},{code:"pt-PT",label:"Portugu\xEAs"},{code:"ro-RO",label:"Rom\xE2n\u0103"},{code:"ru-RU",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},{code:"sk-SK",label:"Sloven\u010Dina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Sloven\u0161\u010Dina"},{code:"tr-TR",label:"T\xFCrk\xE7e"},{code:"uk-UA",label:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"},{code:"zh-CN",label:"\u7B80\u4F53\u4E2D\u6587"},{code:"zh-TW",label:"\u7E41\u9AD4\u4E2D\u6587"},{code:"vi-VN",label:"Ti\u1EBFng Vi\u1EC7t"},{code:"mr-IN",label:"\u092E\u0930\u093E\u0920\u0940"}].filter(e=>Zf[e.code]>=lC).sort((e,o)=>e.label>o.label?1:-1)],Vl="__test__";aC()&&Tn.unshift({code:Vl,label:"test language"},{code:`${Vl}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var vn=ho,Wl={},Xl=async e=>{if(vn=e,document.documentElement.dir=vn.rtl?"rtl":"ltr",document.documentElement.lang=vn.code,e.code.startsWith(Vl))Wl={};else try{Wl=await iC(`./locales/${vn.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),Wl=am}Ke.set(I1,e.code)},Po=()=>vn,T1=(e,o)=>{for(let t=0;t<o.length;++t){let r=o[t];if(e[r]===void 0)return;e=e[r]}if(typeof e=="string")return e},g=(e,o,t)=>{if(vn.code.startsWith(Vl))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let r=e.split("."),n=T1(Wl,r)||T1(am,r)||t;if(n===void 0){let i=`Can't find translation for ${e}`;if(T.PROD)return console.warn(i),"";throw new Error(i)}if(o)for(let i in o)n=n.replace(`{{${i}}}`,String(o[i]));return n},I1=he(ho.code),Oe=()=>{let e=Yl(I1);return{t:g,langCode:e}};import sC from"clsx";import cC from"open-color";import et from"react";import{THEME as dC}from"@excalidraw/common";import{Fragment as be,jsx as h,jsxs as D}from"react/jsx-runtime";var Jt=e=>"var(--icon-fill-color)",C1=e=>e===dC.LIGHT?cC.white:"#1e1e1e",M=(e,o=512)=>{let{width:t=512,height:r=t,mirror:n,style:i,...a}=typeof o=="number"?{width:o}:o;return h("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${r}`,className:sC({"rtl-mirror":n}),style:i,...a,children:typeof e=="string"?h("path",{fill:"currentColor",d:e}):e})},F={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},te={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},kU=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:3,y:8,width:18,height:4,rx:1}),h("line",{x1:12,y1:8,x2:12,y2:21}),h("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),h("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"})]}),F),In=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),h("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),h("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),F),S1=M(D("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),F),k1=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"1"}),h("circle",{cx:"12",cy:"19",r:"1"}),h("circle",{cx:"12",cy:"5",r:"1"})]}),F),M1=M(D("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),h("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),h("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),F),Em=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M6.5 9.5l3.5 -3"}),h("path",{d:"M14 5.5l3 1.5"}),h("path",{d:"M18.5 10l-2.5 7"}),h("path",{d:"M13.5 17.5l-7 -5"})]}),F),Ao=M(D("g",{children:[h("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"}),h("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"}),h("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:h("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"})}),h("g",{mask:"url(#UnlockedIcon)",children:h("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"})})]}),te),$o=M(D("g",{strokeWidth:"1.25",children:[h("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"}),h("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),h("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"})]}),te),L1=M(h("g",{fill:"currentColor",children:h("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-6a3 3 0 0 1 3 -3v-3a5 5 0 0 1 5 -5m0 12a2 2 0 0 0 -1.995 1.85l-.005 .15a2 2 0 1 0 2 -2m0 -10a3 3 0 0 0 -3 3v3h6v-3a3 3 0 0 0 -3 -3"})}),{width:24,height:24}),P1=M(D(be,{children:[h("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"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),h("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"}),A1=M(D(be,{children:[h("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"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),h("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"}),D1=M(D(be,{children:[h("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"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),h("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"}),MU=M(h("g",{fill:"currentColor",children:h("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"}),_1=M(D("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),ta=M(D("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[h("path",{d:"M4.028 13.252c-.657 -.972 -1.028 -2.078 -1.028 -3.252c0 -3.866 4.03 -7 9 -7s9 3.134 9 7s-4.03 7 -9 7c-1.913 0 -3.686 -.464 -5.144 -1.255"}),h("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),Cn=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),F),Sn=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"})]}),F),kn=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"})]}),F),Kl=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),F),Mn=M(h("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),te),R1=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),h("path",{d:"M16 7h4"}),h("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),F),jo=M(D("g",{strokeWidth:"1.25",children:[h("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"}),h("path",{d:"m11.25 5.417 3.333 3.333"})]}),te),Ln=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),h("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),h("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),h("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),h("polyline",{points:"5 20 11 4 13 4 20 20"})]}),F),N1=M(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M12.5 6.667h.01"}),h("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"}),h("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),h("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),te),B1=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M18 13.3l-6.3 -6.3"})]}),F),ym=M(h("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),te),wm=M(h("path",{d:"M5 10h10",strokeWidth:"1.25"}),te),F1=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 21l-6 -6"}),h("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"}),h("path",{d:"M3 4v4h4"})]}),F),Do=M(h("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"}),te),O1=M(D("g",{strokeWidth:"1.5",children:[h("polyline",{points:"12 16 18 10 12 4"}),h("polyline",{points:"8 4 2 10 8 16"})]}),te),oa=M(D("g",{strokeWidth:"1.25",children:[h("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"}),h("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"})]}),te),ra=M(h("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"}),te),na=M(h("g",{stroke:"currentColor",strokeLinejoin:"round",children:h("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"})}),{...te,strokeWidth:1.5}),Zl=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),h("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),F),zr=M(h("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"}),te),Pn=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),F),z1=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),F),LU=M(h("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"}),te),H1=M(h("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"}),te),G1=M(D("g",{strokeWidth:"1.25",children:[h("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"}),h("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"})]}),te),U1=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),h("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),F),Y1=M(h("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),ia=M(D("g",{strokeWidth:"1.25",children:[h("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"}),h("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"})]}),te),W1=M("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}),V1=M("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}),An=M(h("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"}),te),PU=M("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}),X1=M("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"),$l=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),h("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"}),h("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"})]}),F),K1=M(h("g",{strokeWidth:1.5,children:h("path",{d:"M6 18l12 -12"})}),F),jl=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8h.01"}),h("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),h("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),h("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),h("path",{d:"M19 16v6"}),h("path",{d:"M22 19l-3 3l-3 -3"})]}),F),Z1=M("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}),AU=M("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}),DU=M("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}),$1=M("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"),_U=M("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"),vm=M(h("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"}),te),Tm=M(h("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"}),te),j1=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}),q1=M(h("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"}),te),RU=M("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"),NU=M("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}),BU=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M12 14v-11"}),h("path",{d:"M9 6l3 -3l3 3"})]}),F),FU=M(D(be,{children:[h("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"}),h("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}),OU=M(h("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}),J1=D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 10l0 10"}),h("path",{d:"M12 10l4 4"}),h("path",{d:"M12 10l-4 4"}),h("path",{d:"M4 4l16 0"})]}),Q1=D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5l0 14"}),h("path",{d:"M16 9l-4 -4"}),h("path",{d:"M8 9l4 -4"})]}),Im=M(Q1,F),Cm=M(Q1,{...F,style:{transform:"rotate(180deg)"}}),Sm=M(J1,F),km=M(J1,{...F,style:{transform:"rotate(180deg)"}}),Mm=M(D(be,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),Lm=M(D(be,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),Pm=M(D(be,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),Am=M(D(be,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),e0=M(D(be,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),t0=M(D(be,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),Dm=M(D("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),h("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),te),_m=M(D("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),h("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),te),ql=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"9",cy:"7",r:"4"}),h("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),h("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),h("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),F),zU=M("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"),HU=M("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"),Ft=M(D(be,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M15 5 5 15M5 5l10 10"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),GU=M("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}),UU=M("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}),YU=M("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}),Rm=et.memo(({theme:e})=>M(D(be,{children:[h("path",{d:"M25 26H111V111H25",fill:Jt(e)}),h("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:Jt(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:Jt(e)}),h("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:Jt(e),strokeWidth:"2"}),D("g",{fill:C1(e),stroke:Jt(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Nm=et.memo(({theme:e})=>M(D(be,{children:[h("path",{d:"M25 26H111V111H25",fill:Jt(e)}),h("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:Jt(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:Jt(e)}),h("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:Jt(e),strokeWidth:"2"}),D("g",{fill:C1(e),stroke:Jt(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),h("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),o0=M(h("g",{strokeWidth:1.25,children:h("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"})}),te),r0=M(D(be,{children:[h("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"}),h("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:h("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"})}),h("g",{mask:"url(#FillHachureIcon)",children:h("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"})})]}),te),n0=M(D(be,{children:[D("g",{clipPath:"url(#a)",children:[h("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"}),h("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:h("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"})}),h("g",{mask:"url(#FillCrossHatchIcon)",children:h("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"})})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),i0=M(D(be,{children:[h("g",{clipPath:"url(#a)",children:h("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"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...te,fill:"currentColor"}),Bm=M(h(be,{children:h("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),te),a0=M(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),te),l0=M(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),te),WU=et.memo(({theme:e})=>M(h("path",{d:"M6 10H34",stroke:Jt(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),s0=M(D("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12h2"}),h("path",{d:"M17 12h2"}),h("path",{d:"M11 12h2"})]}),F),c0=M(D("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M8 12v.01"}),h("path",{d:"M12 12v.01"}),h("path",{d:"M16 12v.01"}),h("path",{d:"M20 12v.01"})]}),F),d0=M(h("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"}),te),m0=M(h("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"}),te),p0=M(h("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"}),te),u0=M(D("svg",{strokeWidth:"1.5",children:[h("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"}),h("path",{d:"M13.3333 3.33331V3.34331"}),h("path",{d:"M16.6667 3.33331V3.34331"}),h("path",{d:"M16.6667 6.66669V6.67669"}),h("path",{d:"M16.6667 10V10.01"}),h("path",{d:"M3.33334 13.3333V13.3433"}),h("path",{d:"M16.6667 13.3333V13.3433"}),h("path",{d:"M3.33334 16.6667V16.6767"}),h("path",{d:"M6.66666 16.6667V16.6767"}),h("path",{d:"M10 16.6667V16.6767"}),h("path",{d:"M13.3333 16.6667V16.6767"}),h("path",{d:"M16.6667 16.6667V16.6767"})]}),te),h0=M(D("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),h("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),h("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),h("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),h("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),h("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),h("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),h("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),h("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),h("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),h("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),h("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),F),g0=M(D("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[h("path",{d:"M12 12l9 0"}),h("path",{d:"M3 9l6 6"}),h("path",{d:"M3 15l6 -6"})]}),F),f0=et.memo(({flip:e=!1})=>M(D("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[h("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),h("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),b0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),x0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[h("path",{d:"M26 10L6 10"}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),E0=et.memo(({flip:e=!1})=>M(h("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:h("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),y0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),w0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[h("path",{d:"M6,9.5H27"}),h("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),v0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),T0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),I0=et.memo(({flip:e=!1})=>M(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),C0=et.memo(({flip:e=!1})=>M(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),S0=et.memo(({flip:e=!1})=>M(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),k0=M(D(be,{children:[h("g",{clipPath:"url(#a)",children:h("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"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),M0=M(D(be,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),L0=M(D(be,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),P0=M(h(be,{children:h("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"})}),te),Hr=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 7v-2h13v2"}),h("path",{d:"M10 5v14"}),h("path",{d:"M12 19h-4"}),h("path",{d:"M15 13v-1h6v1"}),h("path",{d:"M18 12v7"}),h("path",{d:"M17 19h2"})]}),F),A0=M(h(be,{children:D("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 12h10"}),h("path",{d:"M7 5v14"}),h("path",{d:"M17 5v14"}),h("path",{d:"M15 19h4"}),h("path",{d:"M15 5h4"}),h("path",{d:"M5 19h4"}),h("path",{d:"M5 5h4"})]})}),F),aa=M(h(be,{children:h("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("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"})})}),te),Jl=M(D(be,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("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"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),D0=M(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),h("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),F),_0=M(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),h("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),F),R0=M(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),F),N0=et.memo(({theme:e})=>M(D("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),h("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),F)),B0=et.memo(({theme:e})=>M(D("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),h("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),F)),F0=et.memo(({theme:e})=>M(D("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),h("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),h("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),F)),Ql=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 19h-18l9 -15"}),h("path",{d:"M20.615 15.171h.015"}),h("path",{d:"M19.515 11.771h.015"}),h("path",{d:"M17.715 8.671h.015"}),h("path",{d:"M15.415 5.971h.015"})]}),F),O0=M(h("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}),VU=M(h("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"})),es=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),h("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),h("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"})]}),F),Fm=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M7 11l5 5l5 -5"}),h("path",{d:"M12 4l0 12"})]}),F),Dn=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),F),z0=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M9.15 14.85l8.85 -10.85"}),h("path",{d:"M6 4l8.85 10.85"})]}),F),H0=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),h("path",{d:"M12 17l0 .01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),F),XU=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 4v16l13 -8z"})]}),F),KU=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"})]}),F),G0=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12l5 5l10 -10"})]}),F),U0=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M12 9v4"}),h("path",{d:"M12 17h.01"})]}),F),Y0=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11 7l6 6"}),h("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"})]}),F),Om=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l-4 7h8z"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("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"})]}),F),_n=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 7l16 0"}),h("path",{d:"M4 17l16 0"}),h("path",{d:"M7 4l0 16"}),h("path",{d:"M17 4l0 16"})]}),F),W0=M(h("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"})),Rn=M(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M4.16602 10H15.8327"}),h("path",{d:"M12.5 13.3333L15.8333 10"}),h("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),te),la=M(D("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[h("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"}),h("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),V0=M(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("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"}),h("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"})]}),F),ZU=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("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"}),h("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"})]}),F),$U=M(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),h("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),h("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"}),h("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),h("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),h("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"})]}),F),X0=M(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),h("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),h("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),h("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),F),Gr=M(D("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),h("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"})]}),F),K0=M(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),h("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"}),h("path",{d:"M3 3l18 18"})]}),F),Z0=M(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("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"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),F),$0=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("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"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),F),At=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),h("path",{d:"M21 21l-6 -6"})]}),F),j0=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),h("path",{d:"M12 7v5l3 3"}),h("path",{d:"M19 16l-2 3h4l-2 3"})]}),F),q0=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M5 10a7 7 0 0 0 14 0"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),F),J0=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 3l18 18"}),h("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"}),h("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),F),sa=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),F),Q0=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M12 20v.01"}),h("path",{d:"M16 20v.01"}),h("path",{d:"M8 20v.01"}),h("path",{d:"M4 20v.01"}),h("path",{d:"M4 16v.01"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M4 8v.01"}),h("path",{d:"M4 4v.01"}),h("path",{d:"M8 4v.01"}),h("path",{d:"M12 4v.01"}),h("path",{d:"M16 4v.01"}),h("path",{d:"M20 4v.01"}),h("path",{d:"M20 8v.01"}),h("path",{d:"M20 12v.01"}),h("path",{d:"M20 16v.01"}),h("path",{d:"M20 20v.01"})]}),F),eb=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 3v18"}),h("path",{d:"M19 21v-18"}),h("path",{d:"M5 7h14"}),h("path",{d:"M5 15h14"}),h("path",{d:"M8 13v4"}),h("path",{d:"M11 13v4"}),h("path",{d:"M16 13v4"}),h("path",{d:"M14 5v4"}),h("path",{d:"M11 5v4"}),h("path",{d:"M8 5v4"}),h("path",{d:"M3 21h18"})]}),F),tb=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 12l18 0"}),h("path",{d:"M7 16l10 0l-10 5l0 -5"}),h("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),F),ob=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l0 18"}),h("path",{d:"M16 7l0 10l5 0l-5 -10"}),h("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),F),zm=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),h("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"})]}),F),ts=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),h("path",{d:"M22 22l-3 -3"}),h("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),h("path",{d:"M3 11v-1"}),h("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),h("path",{d:"M10 3h1"}),h("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),F),rb=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("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"}),h("path",{d:"M10 15l2 6l2 -6"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),F),nb=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),h("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),h("path",{d:"M11 21v-6l3 6v-6"})]}),F),ib=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M4 8l5 0"}),h("path",{d:"M15 8l4 0"})]}),F),ab=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),h("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),F),lb=M(D("g",{stroke:"currentColor",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"})]}),{...F,strokeWidth:1.5}),jU=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M21 12h-13l3 -3"}),h("path",{d:"M11 15l-3 -3"})]}),F),qU=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M10 9l5 3l-5 3z"})]}),F),sb=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 6h18"}),h("path",{d:"M3 12h18"}),h("path",{d:"M3 18h18"}),h("path",{d:"M6 3v18"}),h("path",{d:"M12 3v18"}),h("path",{d:"M18 3v18"})]}),F),cb=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("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"}),h("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),F),os=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 18l12 -12"}),h("path",{d:"M18 10v-4h-4"})]}),F),rs=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),h("path",{d:"M18 4l3 3l-3 3"})]}),F),ns=M(D("g",{children:[h("path",{d:"M16,12L20,9L16,6"}),h("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),F),is=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 9l6 6l6 -6"})]}),F),db=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),F),mb=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),F),Hm=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),h("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),F),as=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 7l0 10"}),h("path",{d:"M7 5l10 0"}),h("path",{d:"M7 19l10 0"}),h("path",{d:"M19 7l0 10"})]}),F),Gm=M(D("g",{strokeWidth:"1.25",children:[h("rect",{x:"4",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"4",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"4",y:"16",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"16",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"16",width:"4",height:"4",rx:"1"})]}),F),Um=M(h("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:.5,viewBox:"0 0 640 512",children:h("path",{d:"M15 15C24.4 5.7 39.6 5.7 49 15l63 63L112 40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96c0 13.3-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l38.1 0L15 49C5.7 39.6 5.7 24.4 15 15zM133.5 243.9C158.6 193.6 222.7 112 320 112s161.4 81.6 186.5 131.9c3.8 7.6 3.8 16.5 0 24.2C481.4 318.4 417.3 400 320 400s-161.4-81.6-186.5-131.9c-3.8-7.6-3.8-16.5 0-24.2zM320 320a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM591 15c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-63 63 38.1 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24s24 10.7 24 24l0 38.1 63-63zM15 497c-9.4-9.4-9.4-24.6 0-33.9l63-63L40 400c-13.3 0-24-10.7-24-24s10.7-24 24-24l96 0c13.3 0 24 10.7 24 24l0 96c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-38.1L49 497c-9.4 9.4-24.6 9.4-33.9 0zm576 0l-63-63 0 38.1c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24l96 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-38.1 0 63 63c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0z"})}),F);import pb from"clsx";import Wm,{useEffect as uC,useRef as ub,useState as hC}from"react";import{isPromiseLike as gC}from"@excalidraw/common";import mC from"react";import{jsx as Ym}from"react/jsx-runtime";var pC=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:r=""})=>{let i=-(mC.useRef(Date.now()).current%1600);return Ym("div",{className:`Spinner ${r}`,children:Ym("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:Ym("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},tt=pC;import{jsx as ca,jsxs as da}from"react/jsx-runtime";var W=Wm.forwardRef(({size:e="medium",visible:o=!0,className:t="",...r},n)=>{let{id:i}=ze(),a=Wm.useRef(null);Wm.useImperativeHandle(n,()=>a.current);let l=`ToolIcon_size_${e}`,[s,c]=hC(!1),d=ub(!0),m=async u=>{let f="onClick"in r&&r.onClick?.(u);if(gC(f))try{c(!0),await f}catch(b){if(b instanceof fn)console.warn(b);else throw b}finally{d.current&&c(!1)}};uC(()=>(d.current=!0,()=>{d.current=!1}),[]);let p=ub(null);if(r.type==="button"||r.type==="icon"||r.type==="submit"){let u=r.type==="icon"?"button":r.type;return da("button",{className:pb("ToolIcon_type_button",l,t,o&&!r.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!r.hidden,"ToolIcon--selected":r.selected,"ToolIcon--plain":r.type==="icon"}),style:r.style,"data-testid":r["data-testid"],hidden:r.hidden,title:r.title,"aria-label":r["aria-label"],type:u,onClick:m,ref:a,disabled:s||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&da("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&ca("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel}),r.isLoading&&ca(tt,{})]}),r.showAriaLabel&&da("div",{className:"ToolIcon__label",children:[r["aria-label"]," ",s&&ca(tt,{})]}),r.children]})}return da("label",{className:pb("ToolIcon",t),title:r.title,onPointerDown:u=>{p.current=u.pointerType||null,r.onPointerDown?.({pointerType:u.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[ca("input",{className:`ToolIcon_type_radio ${l}`,type:"radio",name:r.name,"aria-label":r["aria-label"],"aria-keyshortcuts":r["aria-keyshortcuts"],"data-testid":r["data-testid"],id:`${i}-${r.id}`,onChange:()=>{r.onChange?.({pointerType:p.current})},checked:r.checked,ref:a}),da("div",{className:"ToolIcon__icon",children:[r.icon,r.keyBindingLabel&&ca("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel})]})]})});W.displayName="ToolButton";var ls=[],N=e=>(ls=ls.concat(e),e);import{jsx as TC}from"react/jsx-runtime";var vC=(e,o,t)=>{let r=new Set($(e.filter(d=>EC(d)),o).map(d=>d.id)),n={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let d of r){let m=yC(e,d);for(let p of m)if(!a.has(p.id)){if(ss(p)){let u=gb(p,i);u&&(n[u.id]=!0)}else n[p.id]=!0;a.add(p.id)}}let l=!0,s=e.map(d=>{if(o.selectedElementIds[d.id]){let m=ss(d)?gb(d,i):null;return d.frameId&&r.has(d.frameId)?(l=!1,n[d.id]=!0,d):m?.frameId&&r.has(m?.frameId)?d:(d.boundElements&&d.boundElements.forEach(p=>{let u=t.scene.getNonDeletedElementsMap().get(p.id);u&&xC(u)&&t.scene.mutateElement(u,{startBinding:d.id===u.startBinding?.elementId?null:u.startBinding,endBinding:d.id===u.endBinding?.elementId?null:u.endBinding})}),ds(d,{isDeleted:!0}))}return d.frameId&&r.has(d.frameId)?(l=!1,ss(d)||(n[d.id]=!0),ds(d,{frameId:null})):ss(d)&&o.selectedElementIds[d.containerId]?ds(d,{isDeleted:!0}):d}),c=o.editingGroupId;if(l&&o.editingGroupId){let d=Km(s,o.editingGroupId).filter(m=>!m.isDeleted);if(d.length>1)d[0]&&(n[d[0].id]=!0);else{c=null,d[0]&&(n[d[0].id]=!0);let m=d[0];if(m){let p=m.groupIds.findIndex(f=>f===o.editingGroupId),u=m.groupIds[p+1];if(u){let f=Km(s,u).filter(b=>!b.isDeleted);f.length>1&&(c=u,f.forEach(b=>{n[b.id]=!0}))}}}}return{elements:s,appState:{...o,...wC({selectedElementIds:n,editingGroupId:c},s,o,null)}}},fb=(e,o)=>{if(e.editingGroupId){let t=Km(Xm(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},ma=N({name:"deleteSelectedElements",label:"labels.delete",icon:Do,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:l,startBindingElement:s,endBindingElement:c}=o.selectedLinearElement,d=r.scene.getNonDeletedElementsMap(),m=hb.getElement(a,d);if(!m||l==null)return!1;if(l.length>=m.points.length){let u=e.map(b=>b.id===m.id?ds(b,{isDeleted:!0}):b),f=fb(o,u);return{elements:u,appState:{...f,selectedLinearElement:null},captureUpdate:cs.IMMEDIATELY}}let p={startBindingElement:l?.includes(0)?null:s,endBindingElement:l?.includes(m.points.length-1)?null:c};return hb.deletePoints(m,r,l),{elements:e,appState:{...o,selectedLinearElement:{...o.selectedLinearElement,...p,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:cs.IMMEDIATELY}}let{elements:n,appState:i}=vC(e,o,r);return bC(n,n.filter(a=>a.isDeleted)),i=fb(i,n),{elements:n,appState:{...i,activeTool:fC(o,{type:"selection"}),multiElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:Ee(Xm(e),o)?cs.IMMEDIATELY:cs.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===Vm.BACKSPACE||e.key===Vm.DELETE)&&!e[Vm.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t})=>TC(W,{type:"button",icon:Do,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>t(null),visible:Ee(Xm(e),o)})});import{KEYS as Nn,CODES as Bn,getShortcutKey as Fn,isDarwin as ms}from"@excalidraw/common";import{moveOneLeft as IC,moveOneRight as CC,moveAllLeft as SC,moveAllRight as kC}from"@excalidraw/element";import{CaptureUpdateAction as ps}from"@excalidraw/element";import{jsx as us}from"react/jsx-runtime";var Zm=N({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:Cm,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:IC(e,o,r.scene),appState:o,captureUpdate:ps.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Nn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Bn.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>us("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendBackward")} \u2014 ${Fn("CtrlOrCmd+[")}`,children:Cm})}),$m=N({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:Im,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:CC(e,o,r.scene),appState:o,captureUpdate:ps.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Nn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Bn.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>us("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.bringForward")} \u2014 ${Fn("CtrlOrCmd+]")}`,children:Im})}),jm=N({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:km,trackEvent:{category:"element"},perform:(e,o)=>({elements:SC(e,o),appState:o,captureUpdate:ps.IMMEDIATELY}),keyTest:e=>ms?e[Nn.CTRL_OR_CMD]&&e.altKey&&e.code===Bn.BRACKET_LEFT:e[Nn.CTRL_OR_CMD]&&e.shiftKey&&e.code===Bn.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>us("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendToBack")} \u2014 ${ms?Fn("CtrlOrCmd+Alt+["):Fn("CtrlOrCmd+Shift+[")}`,children:km})}),qm=N({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:Sm,trackEvent:{category:"element"},perform:(e,o)=>({elements:kC(e,o),appState:o,captureUpdate:ps.IMMEDIATELY}),keyTest:e=>ms?e[Nn.CTRL_OR_CMD]&&e.altKey&&e.code===Bn.BRACKET_RIGHT:e[Nn.CTRL_OR_CMD]&&e.shiftKey&&e.code===Bn.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>us("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${g("labels.bringToFront")} \u2014 ${ms?Fn("CtrlOrCmd+Alt+]"):Fn("CtrlOrCmd+Shift+]")}`,children:Sm})});import{getNonDeletedElements as MC}from"@excalidraw/element";import{LinearElementEditor as LC}from"@excalidraw/element";import{isLinearElement as PC,isTextElement as AC}from"@excalidraw/element";import{arrayToMap as DC,KEYS as bb}from"@excalidraw/common";import{selectGroupsForSelectedElements as _C}from"@excalidraw/element";import{CaptureUpdateAction as RC}from"@excalidraw/element";var Jm=N({name:"selectAll",label:"labels.selectAll",icon:Q0,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing)return!1;let n=e.filter(i=>!i.isDeleted&&!(AC(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,..._C({editingGroupId:null,selectedElementIds:n},MC(e),o,r),selectedLinearElement:Object.keys(n).length===1&&PC(e[0])?new LC(e[0],DC(e)):null},captureUpdate:RC.IMMEDIATELY}},keyTest:e=>e[bb.CTRL_OR_CMD]&&e.key===bb.A});import{DEFAULT_GRID_SIZE as xb,KEYS as Eb,arrayToMap as yb,getShortcutKey as NC}from"@excalidraw/common";import{getNonDeletedElements as wb}from"@excalidraw/element";import{LinearElementEditor as BC}from"@excalidraw/element";import{getSelectedElements as FC,getSelectionStateForElements as OC}from"@excalidraw/element";import{syncMovedIndices as zC}from"@excalidraw/element";import{duplicateElements as HC}from"@excalidraw/element";import{CaptureUpdateAction as vb}from"@excalidraw/element";import{jsx as GC}from"react/jsx-runtime";var Qm=N({name:"duplicateSelection",label:"labels.duplicateSelection",icon:oa,trackEvent:{category:"element"},perform:(e,o,t,r)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.selectedLinearElement?.isEditing)try{let a=BC.duplicateSelectedPoints(o,r.scene);return{elements:e,appState:a,captureUpdate:vb.IMMEDIATELY}}catch{return!1}let{duplicatedElements:n,elementsWithDuplicates:i}=HC({type:"in-place",elements:e,idsOfElementsToDuplicate:yb(FC(e,o,{includeBoundTextElement:!0,includeElementsInFrames:!0})),appState:o,randomizeSeed:!0,overrides:({origElement:a,origIdToDuplicateId:l})=>{let s=a.frameId&&l.get(a.frameId);return{x:a.x+xb/2,y:a.y+xb/2,frameId:s??a.frameId}}});if(r.props.onDuplicate&&i){let a=r.props.onDuplicate(i,e);a&&(i=a)}return{elements:zC(i,yb(n)),appState:{...o,...OC(n,wb(i),o)},captureUpdate:vb.IMMEDIATELY}},keyTest:e=>e[Eb.CTRL_OR_CMD]&&e.key===Eb.D,PanelComponent:({elements:e,appState:o,updateData:t})=>GC(W,{type:"button",icon:oa,title:`${g("labels.duplicateSelection")} \u2014 ${NC("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>t(null),visible:Ee(wb(e),o)})});import{pointFrom as U4}from"@excalidraw/math";import{useEffect as wp,useMemo as Y4,useRef as vp,useState as W4}from"react";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE as V4,DEFAULT_ELEMENT_BACKGROUND_PICKS as X4,DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as K4,DEFAULT_ELEMENT_STROKE_PICKS as Z4,ARROW_TYPE as Ro,DEFAULT_FONT_FAMILY as $4,DEFAULT_FONT_SIZE as j4,FONT_FAMILY as q4,ROUNDNESS as Ps,STROKE_WIDTH as Tp,VERTICAL_ALIGN as Ls,KEYS as Zn,randomInteger as J4,arrayToMap as Sp,getFontFamilyString as Q4,getShortcutKey as e6,getLineHeight as t6,isTransparent as o6,reduceToCommonValue as r6}from"@excalidraw/common";import{canBecomePolygon as n6,getNonDeletedElements as cx}from"@excalidraw/element";import{bindLinearElement as ix,calculateFixedPointForElbowArrowBinding as ax,updateBoundElements as i6}from"@excalidraw/element";import{LinearElementEditor as Ip}from"@excalidraw/element";import{newElementWith as Ve}from"@excalidraw/element";import{getBoundTextElement as nr,redrawTextBoundingBox as wa}from"@excalidraw/element";import{isArrowElement as As,isBoundToContainer as a6,isElbowArrow as dx,isLinearElement as Cp,isLineElement as lx,isTextElement as wt,isUsingAdaptiveRadius as l6}from"@excalidraw/element";import{hasStrokeColor as s6}from"@excalidraw/element";import{updateElbowArrowPoints as c6,CaptureUpdateAction as Xe,toggleLinePolygonState as d6}from"@excalidraw/element";import{isDevEnv as UC}from"@excalidraw/common";var YC=new Set(["command_palette","export"]),re=(e,o,t,r)=>{try{if(typeof window>"u"||T.VITE_WORKER_ID||T.VITE_APP_ENABLE_TRACKING!=="true"||!YC.has(e)||UC())return;T.PROD||console.info("trackEvent",{category:e,action:o,label:t,value:r}),window.sa_event&&window.sa_event(o,{category:e,label:t,value:r})}catch(n){console.error("error during analytics",n)}};import KC from"clsx";import WC from"clsx";import{forwardRef as VC}from"react";import{jsx as XC}from"react/jsx-runtime";var On=VC((e,o)=>{let{title:t,className:r,testId:n,active:i,standalone:a,icon:l,onClick:s}=e;return XC("button",{type:"button",ref:o,title:t,"data-testid":n,className:WC(r,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as $C,jsx as ep,jsxs as ZC}from"react/jsx-runtime";var Ot=e=>ep($C,{children:e.options.map(o=>e.type==="button"?ep(On,{icon:o.icon,title:o.text,testId:o.testId,active:o.active??e.value===o.value,onClick:t=>e.onClick(o.value,t)},o.text):ZC("label",{className:KC({active:e.value===o.value}),title:o.text,children:[ep("input",{type:"radio",name:e.group,onChange:()=>e.onChange(o.value),checked:e.value===o.value,"data-testid":o.testId}),o.icon]},o.text))});import*as ys from"@radix-ui/react-popover";import ZS from"clsx";import{useRef as $S}from"react";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as jS,COLOR_PALETTE as Gb,isTransparent as qS}from"@excalidraw/common";import{jsx as jC}from"react/jsx-runtime";var hs=()=>jC("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as tS,useRef as oS}from"react";import{createPortal as rS}from"react-dom";import{EVENT as Jo,KEYS as nS,rgbToHex as iS}from"@excalidraw/common";import Tb from"react";var tp=Tb.createContext(null),ge=()=>Tb.useContext(tp);import{useState as qC,useLayoutEffect as Ib}from"react";import{THEME as JC}from"@excalidraw/common";var gs=e=>{let[o,t]=qC(null),r=ce(),{theme:n}=ge(),{container:i}=ze();return Ib(()=>{o&&(o.className="",o.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),o.classList.toggle("excalidraw--mobile",r.editor.isMobile),o.classList.toggle("theme--dark",n===JC.DARK))},[o,n,r.editor.isMobile,e?.className]),Ib(()=>{let a=e?.parentSelector?i?.querySelector(e.parentSelector):document.body;if(!a)return;let l=document.createElement("div");return a.appendChild(l),t(l),()=>{a.removeChild(l)}},[i,e?.parentSelector]),o};import{useEffect as QC}from"react";import{EVENT as fs}from"@excalidraw/common";function zn(e,o,t){QC(()=>{function r(n){let i=n;if(!e.current)return;let a=t?.(i,e.current);if(a===!0)return;if(a===!1)return o(i);e.current.contains(i.target)||!document.documentElement.contains(i.target)||i.target.closest("[data-radix-portal]")||i.target===document.documentElement&&document.body.style.pointerEvents==="none"||i.target.closest("[data-prevent-outside-click]")||o(i)}return document.addEventListener(fs.POINTER_DOWN,r),document.addEventListener(fs.TOUCH_START,r),()=>{document.removeEventListener(fs.POINTER_DOWN,r),document.removeEventListener(fs.TOUCH_START,r)}},[e,o,t])}import{useRef as eS}from"react";var qo=e=>{let o=eS(e);return Object.assign(o.current,e),o.current};import{jsx as aS}from"react/jsx-runtime";var Qo=he(null),Cb=({onCancel:e,onChange:o,onSelect:t,colorPickerType:r})=>{let n=gs({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=ge(),a=er(),l=Re(),s=$(a,i),c=qo({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:d}=ze();tS(()=>{let p=m.current;if(!p||!l.canvas||!n)return;let u=!1,f=l.canvas.getContext("2d"),b=({clientX:S,clientY:L})=>{let k=f.getImageData((S-i.offsetLeft)*window.devicePixelRatio,(L-i.offsetTop)*window.devicePixelRatio,1,1).data;return iS(k[0],k[1],k[2])},x=({clientX:S,clientY:L,altKey:k})=>{p.style.top=`${L+20}px`,p.style.left=`${S+20}px`;let A=b({clientX:S,clientY:L});u&&c.onChange(r,A,c.selectedElements,{altKey:k}),p.style.background=A},w=()=>{c.onCancel()},E=(S,L)=>{c.onSelect(S,L)},y=S=>{u=!0,S.stopImmediatePropagation()},v=S=>{u=!1,d?.focus(),S.stopImmediatePropagation(),S.preventDefault(),E(b(S),S)},C=S=>{S.key===nS.ESCAPE&&(S.preventDefault(),S.stopImmediatePropagation(),w())};return n.tabIndex=-1,n.focus(),x({clientX:c.app.lastViewportPosition.x,clientY:c.app.lastViewportPosition.y,altKey:!1}),n.addEventListener(Jo.KEYDOWN,C),n.addEventListener(Jo.POINTER_DOWN,y),n.addEventListener(Jo.POINTER_UP,v),window.addEventListener("pointermove",x,{passive:!0}),window.addEventListener(Jo.BLUR,w),()=>{u=!1,n.removeEventListener(Jo.KEYDOWN,C),n.removeEventListener(Jo.POINTER_DOWN,y),n.removeEventListener(Jo.POINTER_UP,v),window.removeEventListener("pointermove",x),window.removeEventListener(Jo.BLUR,w)}},[c,l.canvas,n,r,d,i.offsetLeft,i.offsetTop]);let m=oS(null);return zn(m,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?rS(aS("div",{ref:m,className:"excalidraw-eye-dropper-preview"}),n):null};import*as Hn from"@radix-ui/react-popover";import dS from"clsx";import mS from"react";import{isInteractive as pS}from"@excalidraw/common";import lS from"react";import sS from"clsx";import{jsx as cS}from"react/jsx-runtime";var We=lS.forwardRef(({children:e,padding:o,className:t,style:r},n)=>cS("div",{className:sS("Island",t),style:{"--padding":o,...r},ref:n,children:e}));import{jsx as op,jsxs as uS}from"react/jsx-runtime";var bs=mS.forwardRef(({className:e,container:o,children:t,style:r,onClose:n,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s},c)=>{let d=ce();return op(Hn.Portal,{container:o,children:uS(Hn.Content,{ref:c,className:dS("focus-visible-none",e),"data-prevent-outside-click":!0,side:d.editor.isMobile&&!d.viewport.isLandscape?"bottom":"right",align:d.editor.isMobile&&!d.viewport.isLandscape?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:"var(--zIndex-popup)"},onPointerLeave:l,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:s,onCloseAutoFocus:m=>{m.stopPropagation(),m.preventDefault(),o&&!pS(document.activeElement)&&o.focus(),n()},children:[op(We,{padding:3,style:r,children:t}),op(Hn.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import gS from"clsx";import{useCallback as fS,useEffect as np,useRef as Mb,useState as bS}from"react";import{KEYS as ip,getShortcutKey as xS}from"@excalidraw/common";import{MAX_CUSTOM_COLORS_USED_IN_CANVAS as hS}from"@excalidraw/common";var tr=({palette:e,color:o})=>{if(!o)return null;for(let[t,r]of Object.entries(e))if(Array.isArray(r)){let n=r.indexOf(o);if(n>-1)return{colorName:t,shade:n}}else if(r===o)return{colorName:t,shade:null};return null},pa=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),rp=({color:e,palette:o})=>!Object.values(o).flat().includes(e),kb=(e,o,t)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=e.filter(a=>{if(a.isDeleted)return!1;let l=a[r[o]];return rp({color:l,palette:t})}),i=new Map;return n.forEach(a=>{let l=a[r[o]];i.has(l)?i.set(l,i.get(l)+1):i.set(l,1)}),[...i.entries()].sort((a,l)=>l[1]-a[1]).map(a=>a[0]).slice(0,hS)},zt=he(null),Sb=(e,o,t)=>(e*299+o*587+t*114)/1e3,Gn=(e,o=160)=>{if(!e)return!0;if(e==="transparent")return!1;if(!e.startsWith("#")){let i=document.createElement("div");if(i.style.color=e,i.style.color){i.style.position="absolute",i.style.visibility="hidden",i.style.width="0",i.style.height="0",document.body.appendChild(i);let a=getComputedStyle(i).color;document.body.removeChild(i);let l=a.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),s=parseInt(l[0]),c=parseInt(l[1]),d=parseInt(l[2]);return Sb(s,c,d)<o}return!0}let t=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return Sb(t,r,n)<o};import{Fragment as ES,jsx as xs,jsxs as Lb}from"react/jsx-runtime";var Pb=({color:e,onChange:o,label:t,colorPickerType:r,placeholder:n})=>{let i=ce(),[a,l]=bS(e),[s,c]=se(zt);np(()=>{l(e)},[e]);let d=fS(b=>{let x=b.toLowerCase(),w=Ab(x);w&&o(w),l(x)},[o]),m=Mb(null),p=Mb(null);np(()=>{m.current&&m.current.focus()},[s]);let[u,f]=se(Qo);return np(()=>()=>{f(null)},[f]),Lb("div",{className:"color-picker__input-label",children:[xs("div",{className:"color-picker__input-hash",children:"#"}),xs("input",{ref:s==="hex"?m:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,onChange:b=>{d(b.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{l(e)},tabIndex:-1,onFocus:()=>c("hex"),onKeyDown:b=>{b.key!==ip.TAB&&(b.key===ip.ESCAPE&&p.current?.focus(),b.stopPropagation())},placeholder:n}),!i.editor.isMobile&&Lb(ES,{children:[xs("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),xs("div",{ref:p,className:gS("excalidraw-eye-dropper-trigger",{selected:u}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:x=>o(x),colorPickerType:r}),title:`${g("labels.eyeDropper")} \u2014 ${ip.I.toLocaleUpperCase()} or ${xS("Alt")} `,children:Y0})]})]})};import cp,{useEffect as dp,useImperativeHandle as OS,useState as zS}from"react";import{EVENT as Fb}from"@excalidraw/common";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX as HS,DEFAULT_ELEMENT_STROKE_COLOR_INDEX as GS,KEYS as US}from"@excalidraw/common";import vS from"clsx";import{useEffect as TS,useRef as IS}from"react";import{jsxs as wS}from"react/jsx-runtime";var yS=({color:e,keyLabel:o,isShade:t=!1})=>wS("div",{className:"color-picker__button__hotkey-label",style:{color:Gn(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),Un=yS;import{jsx as ap,jsxs as CS}from"react/jsx-runtime";var Db=({colors:e,color:o,onChange:t,label:r})=>{let[n,i]=se(zt),a=IS(null);return TS(()=>{a.current&&a.current.focus()},[o,n]),ap("div",{className:"color-picker-content--default",children:e.map((l,s)=>CS("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:vS("color-picker__button color-picker__button--large has-outline",{active:o===l,"is-transparent":l==="transparent"||!l}),onClick:()=>{t(l),i("custom")},title:l,"aria-label":r,style:{"--swatch-color":l},children:[ap("div",{className:"color-picker__button-outline"}),ap(Un,{color:l,keyLabel:s+1})]},s))})};import SS from"clsx";import{useEffect as kS,useRef as MS}from"react";import{jsx as lp,jsxs as PS}from"react/jsx-runtime";var LS=({palette:e,color:o,onChange:t,activeShade:r})=>{let n=tr({color:o,palette:e}),[i,a]=se(zt),l=MS(null);return kS(()=>{l.current&&i==="baseColors"&&l.current.focus()},[n?.colorName,i]),lp("div",{className:"color-picker-content--default",children:Object.entries(e).map(([s,c],d)=>{let m=(Array.isArray(c)?c[r]:c)||"transparent",p=pa[d],u=g(`colors.${s.replace(/\d+/,"")}`,null,"");return PS("button",{ref:n?.colorName===s?l:void 0,tabIndex:-1,type:"button",className:SS("color-picker__button color-picker__button--large has-outline",{active:n?.colorName===s,"is-transparent":m==="transparent"||!m}),onClick:()=>{t(m),a("baseColors")},title:`${u}${m.startsWith("#")?` ${m}`:""} \u2014 ${p}`,"aria-label":`${u} \u2014 ${p}`,style:m?{"--swatch-color":m}:void 0,"data-testid":`color-${s}`,children:[lp("div",{className:"color-picker__button-outline"}),lp(Un,{color:m,keyLabel:p})]},s)})})},_b=LS;import{jsx as DS}from"react/jsx-runtime";var AS=({children:e})=>DS("div",{className:"color-picker__heading",children:e}),Yn=AS;import _S from"clsx";import{useEffect as RS,useRef as NS}from"react";import{jsx as ua,jsxs as Rb}from"react/jsx-runtime";var Nb=({color:e,onChange:o,palette:t})=>{let r=tr({color:e||"transparent",palette:t}),[n,i]=se(zt),a=NS(null);if(RS(()=>{a.current&&n==="shades"&&a.current.focus()},[r,n]),r){let{colorName:l,shade:s}=r,c=t[l];if(Array.isArray(c))return ua("div",{className:"color-picker-content--default shades",children:c.map((d,m)=>Rb("button",{ref:m===s&&n==="shades"?a:void 0,tabIndex:-1,type:"button",className:_S("color-picker__button color-picker__button--large has-outline",{active:m===s}),"aria-label":"Shade",title:`${l} - ${m+1}`,style:d?{"--swatch-color":d}:void 0,onClick:()=>{o(d),i("shades")},children:[ua("div",{className:"color-picker__button-outline"}),ua(Un,{color:d,keyLabel:m+1,isShade:!0})]},m))})}return Rb("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[ua("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),ua("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:g("colorPicker.noShades")})]})};import{COLORS_PER_ROW as Wn,COLOR_PALETTE as BS,KEYS as ha}from"@excalidraw/common";var sp=(e,o,t)=>{let r=Math.ceil(t/Wn);switch(o=o??-1,e){case"ArrowLeft":{let n=o-1;return n<0?t-1:n}case"ArrowRight":return(o+1)%t;case"ArrowDown":{let n=o+Wn;return n>=t?o%Wn:n}case"ArrowUp":{let n=o-Wn,i=n<0?Wn*r+n:n;return i>=t?void 0:i}}},FS=({e,colorObj:o,onChange:t,palette:r,customColors:n,setActiveColorPickerSection:i,activeShade:a})=>{if(o?.shade!=null&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(e.code)&&e.shiftKey){let l=Number(e.code.slice(-1))-1;return t(r[o.colorName][l]),i("shades"),!0}if(["1","2","3","4","5"].includes(e.key)&&n[Number(e.key)-1])return t(n[Number(e.key)-1]),i("custom"),!0;if(pa.includes(e.key)){let l=pa.indexOf(e.key),s=Object.keys(r)[l],c=r[s],d=Array.isArray(c)?c[a]:c;return t(d),i("baseColors"),!0}return!1},Bb=({event:e,activeColorPickerSection:o,palette:t,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:c,onEscape:d})=>{if(e[ha.CTRL_OR_CMD])return!1;if(e.key===ha.ESCAPE)return d(e),!0;if(e.key===ha.ALT)return c(!0),!0;if(e.key===ha.I)return c(),!0;let m=tr({color:r,palette:t});if(e.key===ha.TAB){let p={custom:!!i.length,baseColors:!0,shades:m?.shade!=null,hex:!0},u=Object.entries(p).reduce((E,[y,v])=>(v&&E.push(y),E),[]),f=u.indexOf(o),b=e.shiftKey?-1:1,x=f+b>u.length-1?0:f+b<0?u.length-1:f+b,w=u[x];return w&&a(w),w==="custom"?n(i[0]):w==="baseColors"&&(Object.entries(t).find(([y,v])=>Array.isArray(v)?v.includes(r):v===r?y:null)||n(BS.black)),e.preventDefault(),e.stopPropagation(),!0}if(FS({e,colorObj:m,onChange:n,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&m){let{shade:p}=m,u=sp(e.key,p,Wn);if(u!==void 0)return n(t[m.colorName][u]),!0}if(o==="baseColors"&&m){let{colorName:p}=m,u=Object.keys(t),f=u.indexOf(p),b=sp(e.key,f,u.length);if(b!==void 0){let x=u[b],w=t[x];return n(Array.isArray(w)?w[s]:w),!0}}if(o==="custom"){let p=r!=null?i.indexOf(r):0,u=sp(e.key,p,i.length);if(u!==void 0){let f=i[u];return n(f),!0}}return!1};import{jsx as Ur,jsxs as Es}from"react/jsx-runtime";var Ob=cp.forwardRef(({color:e,onChange:o,type:t,elements:r,palette:n,updateData:i,children:a,onEyeDropperToggle:l,onEscape:s},c)=>{let[d]=cp.useState(()=>t==="canvasBackground"?[]:kb(r,t,n)),[m,p]=se(zt),u=tr({color:e,palette:n});dp(()=>{if(!m){let w=!!e&&rp({color:e,palette:n}),E=w&&!d.includes(e);p(E?null:w?"custom":u?.shade!=null?"shades":"baseColors")}},[m,e,n,p,u,d]);let[f,b]=zS(u?.shade??(t==="elementBackground"?HS:GS));dp(()=>{u?.shade!=null&&b(u.shade);let w=E=>{E.key===US.ALT&&l(!1)};return document.addEventListener(Fb.KEYUP,w,{capture:!0}),()=>{document.removeEventListener(Fb.KEYUP,w,{capture:!0})}},[u,l]);let x=cp.useRef(null);return OS(c,()=>x.current),dp(()=>{x?.current?.focus()},[]),Ur("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:Es("div",{ref:x,onKeyDown:w=>{Bb({event:w,activeColorPickerSection:m,palette:n,color:e,onChange:o,onEyeDropperToggle:l,customColors:d,setActiveColorPickerSection:p,updateData:i,activeShade:f,onEscape:s})&&(w.preventDefault(),w.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[!!d.length&&Es("div",{children:[Ur(Yn,{children:g("colorPicker.mostUsedCustomColors")}),Ur(Db,{colors:d,color:e,label:g("colorPicker.mostUsedCustomColors"),onChange:o})]}),Es("div",{children:[Ur(Yn,{children:g("colorPicker.colors")}),Ur(_b,{color:e,palette:n,onChange:o,activeShade:f})]}),Es("div",{children:[Ur(Yn,{children:g("colorPicker.shades")}),Ur(Nb,{color:e,onChange:o,palette:n})]}),a]})})});import YS from"clsx";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as WS,DEFAULT_CANVAS_BACKGROUND_PICKS as VS,DEFAULT_ELEMENT_BACKGROUND_PICKS as XS,DEFAULT_ELEMENT_STROKE_PICKS as KS}from"@excalidraw/common";import{jsx as mp}from"react/jsx-runtime";var zb=({onChange:e,type:o,activeColor:t,topPicks:r})=>{let n;return o==="elementStroke"&&(n=KS),o==="elementBackground"&&(n=XS),o==="canvasBackground"&&(n=VS),r&&(n=r),n?mp("div",{className:"color-picker__top-picks",children:n.map(i=>mp("button",{className:YS("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!Gn(i,WS)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:mp("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as Qt,jsxs as pp}from"react/jsx-runtime";var Hb=e=>{let o=new Option().style;return o.color=e,!!o.color},Ab=e=>qS(e)?e:Hb(`#${e}`)?`#${e}`:Hb(e)?e:null,JS=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=Gb,updateData:a})=>{let{container:l}=ze(),[,s]=se(zt),[c,d]=se(Qo),m=pp("div",{children:[Qt(Yn,{children:g("colorPicker.hexCode")}),Qt(Pb,{color:o||"",label:r,onChange:f=>{t(f)},colorPickerType:e,placeholder:g("colorPicker.color")})]}),p=$S(null),u=()=>{p.current?.focus()};return Qt(bs,{container:l,style:{maxWidth:"13rem"},onFocusOutside:f=>{u(),f.preventDefault()},onPointerDownOutside:f=>{c&&f.preventDefault()},onClose:()=>{a({openPopup:null}),s(null)},children:i?Qt(Ob,{ref:p,palette:i,color:o,onChange:f=>{t(f)},onEyeDropperToggle:f=>{d(b=>f?(b=b||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},b.keepOpenOnAlt=!0,b):f===!1||b?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:f=>{c?d(null):a({openPopup:null})},type:e,elements:n,updateData:a,children:m}):m})},QS=({label:e,color:o,type:t})=>Qt(ys.Trigger,{type:"button",className:ZS("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!Gn(o,jS)}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),children:Qt("div",{className:"color-picker__button-outline",children:!o&&K1})}),ga=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=Gb,topPicks:a,updateData:l,appState:s})=>Qt("div",{children:pp("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[Qt(zb,{activeColor:o,onChange:t,type:e,topPicks:a}),Qt(hs,{}),pp(ys.Root,{open:s.openPopup===e,onOpenChange:c=>{l({openPopup:c?e:null})},children:[Qt(QS,{color:o,label:r,type:e}),s.openPopup===e&&Qt(JS,{type:e,color:o,onChange:t,label:r,elements:n,palette:i,updateData:l})]})]})});import*as qb from"@radix-ui/react-popover";import L4,{useCallback as P4,useMemo as A4}from"react";import{FONT_FAMILY as bp}from"@excalidraw/common";import E4,{useMemo as or,useState as y4,useRef as w4,useEffect as v4,useCallback as T4}from"react";import{arrayToList as I4,debounce as C4,FONT_FAMILY as Yr,getFontFamilyString as S4}from"@excalidraw/common";import e4 from"clsx";import t4 from"react";import{jsx as o4,jsxs as r4}from"react/jsx-runtime";var ws=t4.forwardRef(({className:e,placeholder:o,onChange:t},r)=>r4("div",{className:e4("QuickSearch__wrapper",e),children:[At,o4("input",{ref:r,className:"QuickSearch__input",type:"text",placeholder:o,onChange:n=>t(n.target.value.trim().toLowerCase())})]}));import n4 from"clsx";import{Children as i4}from"react";import{jsx as Ub}from"react/jsx-runtime";var vs=({className:e,placeholder:o,children:t})=>{let r=!i4.count(t);return Ub("div",{className:n4("ScrollableList__wrapper",e),role:"menu",children:r?Ub("div",{className:"empty",children:o}):t})};import{jsx as a4,jsxs as l4}from"react/jsx-runtime";var Yb=({children:e,className:o="",style:t,title:r})=>l4("div",{className:`dropdown-menu-group ${o}`,style:t,children:[r&&a4("p",{className:"dropdown-menu-group-title",children:r}),e]}),fa=Yb;Yb.displayName="DropdownMenuGroup";import{useEffect as f4,useRef as b4}from"react";import{THEME as x4}from"@excalidraw/common";import{jsx as s4}from"react/jsx-runtime";var ba=({children:e,...o})=>s4("span",{...o,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...o.style},children:e});import{Fragment as d4,jsx as Ts,jsxs as m4}from"react/jsx-runtime";var c4=({textStyle:e,icon:o,shortcut:t,children:r})=>{let n=ce();return m4(d4,{children:[o&&Ts("div",{className:"dropdown-menu-item__icon",children:o}),Ts("div",{style:e,className:"dropdown-menu-item__text",children:Ts(ba,{children:r})}),t&&!n.editor.isMobile&&Ts("div",{className:"dropdown-menu-item__shortcut",children:t})]})},Is=c4;import p4,{useContext as u4}from"react";import{EVENT as h4,composeEventHandlers as g4}from"@excalidraw/common";var up=p4.createContext({}),Cs=(e="",o=!1,t=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
|
|
1
|
+
import{$ as Hl,A as um,B as Qf,C as e1,D as t1,E as Bl,F as qi,G as Fl,H as Ol,I as o1,J as r1,K as Ji,L as n1,M as i1,N as a1,O as l1,P as zl,Q as En,R as s1,S as hm,T as oC,U as yn,V as Qi,X as c1,Z as d1,_ as m1,a as $f,aa as p1,b as Or,ba as ea,c as uo,ca as gm,d as jf,da as Gl,e as Ee,ea as u1,f as qf,fa as fm,g as $,ga as Lo,h as _l,ha as h1,i as Ko,ia as bm,j as lm,ja as g1,k as sm,ka as f1,l as gn,la as Ul,m as cm,ma as xm,n as fn,na as b1,o as Jf,oa as x1,p as dm,pa as E1,q as Zo,qa as y1,r as bn,s as Et,t as qt,u as xn,v as Rl,w as mm,x as ji,y as Nl,z as pm}from"./chunk-ESVIN3T7.js";import{a as T}from"./chunk-4UANJTGP.js";import{J as am}from"./chunk-KZXLT4YB.js";import{c as Zf}from"./chunk-Z3N5DIM6.js";import{b as Xf,c as Kf,d as I}from"./chunk-SRAX5OIU.js";import rU,{useEffect as nU}from"react";import{DEFAULT_UI_OPTIONS as QI,isShallowEqual as iU}from"@excalidraw/common";import DT from"clsx";import zz from"lodash.throttle";import Mo,{useContext as Nr}from"react";import{flushSync as Yi}from"react-dom";import Hz from"roughjs/bin/rough";import{nanoid as Gz}from"nanoid";import{clamp as _T,pointFrom as ne,pointDistance as sn,vector as RT,pointRotateRads as qg,vectorScale as Uz,vectorFromPoint as Jg,vectorSubtract as NT,vectorDot as BT,vectorNormalize as FT}from"@excalidraw/math";import{COLOR_PALETTE as Yz,CODES as OT,shouldResizeFromCenter as zT,shouldMaintainAspectRatio as bl,shouldRotateWithDiscreteAngle as Qg,isArrowKey as Vd,KEYS as U,APP_NAME as Wz,CURSOR_TYPE as De,DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT as Vz,DEFAULT_VERTICAL_ALIGN as HT,DRAGGING_THRESHOLD as Xz,ELEMENT_SHIFT_TRANSLATE_AMOUNT as Kz,ELEMENT_TRANSLATE_AMOUNT as GT,EVENT as ee,FRAME_STYLE as Pr,IMAGE_MIME_TYPES as Zz,IMAGE_RENDER_TIMEOUT as $z,isBrave as jz,LINE_CONFIRM_THRESHOLD as ef,MAX_ALLOWED_FILE_BYTES as UT,MIME_TYPES as Ar,MQ_MAX_HEIGHT_LANDSCAPE as qz,MQ_MAX_WIDTH_LANDSCAPE as Jz,MQ_MAX_WIDTH_PORTRAIT as Qz,MQ_RIGHT_SIDEBAR_MIN_WIDTH as eH,POINTER_BUTTON as cn,ROUNDNESS as Xd,SCROLL_TIMEOUT as tH,TAP_TWICE_TIMEOUT as oH,TEXT_TO_CENTER_SNAP_THRESHOLD as rH,THEME as Kd,THEME_FILTER as nH,TOUCH_CTX_MENU_TIMEOUT as iH,VERTICAL_ALIGN as aH,YOUTUBE_STATES as Zd,ZOOM_STEP as lH,POINTER_EVENTS as Wi,TOOL_TYPE as ko,isIOS as sH,supportsResizeObserver as YT,DEFAULT_COLLISION_THRESHOLD as WT,DEFAULT_TEXT_ALIGN as cH,ARROW_TYPE as Dr,DEFAULT_REDUCED_GLOBAL_ALPHA as dH,isSafari as mH,isLocalLink as pH,normalizeLink as tf,toValidURL as uH,getGridPoint as nt,getLineHeight as VT,debounce as XT,distance as Vi,getFontString as of,getNearestScrollableContainer as hH,isInputLike as KT,isToolIcon as gH,isWritableElement as xl,sceneCoordsToViewportCoords as $d,tupleToCoors as rf,viewportCoordsToSceneCoords as Fe,wrapEvent as fH,updateObject as nf,updateActiveTool as Vo,getShortcutKey as bH,isTransparent as xH,easeToValuesRAF as EH,muteFSAbortError as yH,isTestEnv as Sf,isDevEnv as AI,easeOut as wH,updateStable as El,addEventListener as _e,normalizeEOL as vH,getDateTime as ZT,isShallowEqual as TH,arrayToMap as jd,randomInteger as IH,CLASSES as CH,Emitter as dn,MINIMUM_ARROW_SIZE as $T}from"@excalidraw/common";import{getObservedAppState as SH,getCommonBounds as Xi,maybeSuggestBindingsForLinearElementAtCoords as jT,getElementAbsoluteCoords as qT,bindOrUnbindLinearElements as JT,fixBindingsAfterDeletion as kH,getHoveredElementForBinding as af,isBindingEnabled as lf,shouldEnableBindingForPointerEvent as MH,updateBoundElements as sf,getSuggestedBindingsForArrows as cf,LinearElementEditor as Ce,newElementWith as mn,newFrameElement as LH,newFreeDrawElement as PH,newEmbeddableElement as QT,newMagicFrameElement as eI,newIframeElement as AH,newArrowElement as DH,newElement as _H,newImageElement as RH,newLinearElement as NH,newTextElement as tI,refreshTextDimensions as BH,deepCopyElement as oI,duplicateElements as rI,hasBoundTextElement as nI,isArrowElement as df,isBindingElement as mf,isBindingElementType as iI,isBoundToContainer as pf,isFrameLikeElement as Zt,isImageElement as pn,isEmbeddableElement as _r,isInitializedImageElement as yl,isLinearElement as $t,isLinearElementType as FH,isUsingAdaptiveRadius as OH,isIframeElement as Ki,isIframeLikeElement as wl,isMagicFrameElement as uf,isTextBindableContainer as aI,isElbowArrow as Ge,isFlowchartNodeElement as zH,isBindableElement as HH,isTextElement as mo,getLockedLinearCursorAlignSize as lI,getNormalizedDimensions as GH,isElementCompletelyInViewport as hf,isElementInViewport as sI,isInvisiblySmallElement as cI,getCornerRadius as UH,isPathALoop as dI,createSrcDoc as mI,embeddableURLValidator as gf,maybeParseEmbedSrc as YH,getEmbedLink as qd,getInitializedImageElements as WH,normalizeSVG as pI,updateImageCache as VH,getBoundTextElement as ff,getContainerCenter as bf,getContainerElement as uI,isValidTextContainer as XH,redrawTextBoundingBox as KH,shouldShowBoundingBox as ZH,getFrameChildren as hI,isCursorInFrame as gI,addElementsToFrame as xf,replaceAllElementsInFrame as $H,removeElementsFromFrame as jH,getElementsInResizingFrame as Ef,getElementsInNewFrame as qH,getContainingFrame as yf,elementOverlapsWithFrame as JH,updateFrameMembershipOfSelectedElements as fI,isElementInFrame as bI,getFrameLikeTitle as QH,getElementsOverlappingFrame as eG,filterElementsEligibleAsFrameChildren as tG,hitElementBoundText as oG,hitElementBoundingBoxOnly as rG,hitElementItself as vl,getVisibleSceneBounds as nG,FlowChartCreator as iG,FlowChartNavigator as aG,getLinkDirectionFromKey as xI,cropElement as lG,wrapText as sG,isElementLink as wf,parseElementLinkFromURL as cG,isMeasureTextSupported as dG,normalizeText as mG,measureText as EI,getLineHeightInPx as pG,getApproxMinLineWidth as uG,getApproxMinLineHeight as hG,getMinTextElementWidth as gG,ShapeCache as Tl,getRenderOpacity as fG,editGroupForSelectedElement as bG,getElementsInGroup as Il,getSelectedGroupIdForElement as xG,getSelectedGroupIds as EG,isElementInGroup as yI,isSelectedViaGroup as yG,selectGroupsForSelectedElements as po,syncInvalidIndices as DI,syncMovedIndices as wI,excludeElementsInFramesFromSelection as wG,getSelectionStateForElements as vG,makeNextSelectedElementIds as fe,getResizeOffsetXY as TG,getResizeArrowDirection as IG,transformElements as CG,getCursorForResizingElement as vI,getElementWithTransformHandleType as TI,getTransformHandleTypeFromCoords as II,dragNewElement as CI,dragSelectedElements as SG,getDragOffsetXY as kG,isNonDeletedElement as SI,Scene as kI,Store as MG,CaptureUpdateAction as mt,hitElementBoundingBox as LG,isLineElement as vf,isSimpleArrow as PG}from"@excalidraw/element";import{arrangeElements as MI}from"@excalidraw/element/arrange";import{KEYS as Vm,updateActiveTool as fC}from"@excalidraw/common";import{getNonDeletedElements as Xm}from"@excalidraw/element";import{fixBindingsAfterDeletion as bC}from"@excalidraw/element";import{LinearElementEditor as hb}from"@excalidraw/element";import{newElementWith as ds}from"@excalidraw/element";import{getContainerElement as gb}from"@excalidraw/element";import{isBoundToContainer as ss,isElbowArrow as xC,isFrameLikeElement as EC}from"@excalidraw/element";import{getFrameChildren as yC}from"@excalidraw/element";import{getElementsInGroup as Km,selectGroupsForSelectedElements as wC}from"@excalidraw/element";import{CaptureUpdateAction as cs}from"@excalidraw/element";import{isDevEnv as aC}from"@excalidraw/common";import{atom as he,createStore as rC}from"jotai";import{createIsolation as nC}from"jotai-scope";var w1=nC();var{useAtom:se,useSetAtom:wn,useAtomValue:Yl,useStore:mU}=w1,v1=w1.Provider,Ke=rC();var iC=Xf({"./locales/ar-SA.json":()=>import("./locales/ar-SA-G6X2FPQ2.js"),"./locales/az-AZ.json":()=>import("./locales/az-AZ-76LH7QW2.js"),"./locales/bg-BG.json":()=>import("./locales/bg-BG-XCXSNQG7.js"),"./locales/bn-BD.json":()=>import("./locales/bn-BD-2XOGV67Q.js"),"./locales/ca-ES.json":()=>import("./locales/ca-ES-6MX7JW3Y.js"),"./locales/cs-CZ.json":()=>import("./locales/cs-CZ-2BRQDIVT.js"),"./locales/da-DK.json":()=>import("./locales/da-DK-5WZEPLOC.js"),"./locales/de-DE.json":()=>import("./locales/de-DE-XR44H4JA.js"),"./locales/el-GR.json":()=>import("./locales/el-GR-BZB4AONW.js"),"./locales/en.json":()=>import("./locales/en-XFR6MADM.js"),"./locales/es-ES.json":()=>import("./locales/es-ES-U4NZUMDT.js"),"./locales/eu-ES.json":()=>import("./locales/eu-ES-A7QVB2H4.js"),"./locales/fa-IR.json":()=>import("./locales/fa-IR-HGAKTJCU.js"),"./locales/fi-FI.json":()=>import("./locales/fi-FI-Z5N7JZ37.js"),"./locales/fr-FR.json":()=>import("./locales/fr-FR-RHASNOE6.js"),"./locales/gl-ES.json":()=>import("./locales/gl-ES-HMX3MZ6V.js"),"./locales/he-IL.json":()=>import("./locales/he-IL-6SHJWFNN.js"),"./locales/hi-IN.json":()=>import("./locales/hi-IN-IWLTKZ5I.js"),"./locales/hu-HU.json":()=>import("./locales/hu-HU-A5ZG7DT2.js"),"./locales/id-ID.json":()=>import("./locales/id-ID-SAP4L64H.js"),"./locales/it-IT.json":()=>import("./locales/it-IT-JPQ66NNP.js"),"./locales/ja-JP.json":()=>import("./locales/ja-JP-DBVTYXUO.js"),"./locales/kaa.json":()=>import("./locales/kaa-6HZHGXH3.js"),"./locales/kab-KAB.json":()=>import("./locales/kab-KAB-ZGHBKWFO.js"),"./locales/kk-KZ.json":()=>import("./locales/kk-KZ-P5N5QNE5.js"),"./locales/km-KH.json":()=>import("./locales/km-KH-HSX4SM5Z.js"),"./locales/ko-KR.json":()=>import("./locales/ko-KR-MTYHY66A.js"),"./locales/ku-TR.json":()=>import("./locales/ku-TR-6OUDTVRD.js"),"./locales/lt-LT.json":()=>import("./locales/lt-LT-XHIRWOB4.js"),"./locales/lv-LV.json":()=>import("./locales/lv-LV-5QDEKY6T.js"),"./locales/mr-IN.json":()=>import("./locales/mr-IN-CRQNXWMA.js"),"./locales/my-MM.json":()=>import("./locales/my-MM-5M5IBNSE.js"),"./locales/nb-NO.json":()=>import("./locales/nb-NO-T6EIAALU.js"),"./locales/nl-NL.json":()=>import("./locales/nl-NL-IS3SIHDZ.js"),"./locales/nn-NO.json":()=>import("./locales/nn-NO-6E72VCQL.js"),"./locales/oc-FR.json":()=>import("./locales/oc-FR-POXYY2M6.js"),"./locales/pa-IN.json":()=>import("./locales/pa-IN-N4M65BXN.js"),"./locales/percentages.json":()=>import("./locales/percentages-BXMCSKIN.js"),"./locales/pl-PL.json":()=>import("./locales/pl-PL-T2D74RX3.js"),"./locales/pt-BR.json":()=>import("./locales/pt-BR-5N22H2LF.js"),"./locales/pt-PT.json":()=>import("./locales/pt-PT-UZXXM6DQ.js"),"./locales/ro-RO.json":()=>import("./locales/ro-RO-JPDTUUEW.js"),"./locales/ru-RU.json":()=>import("./locales/ru-RU-B4JR7IUQ.js"),"./locales/si-LK.json":()=>import("./locales/si-LK-N5RQ5JYF.js"),"./locales/sk-SK.json":()=>import("./locales/sk-SK-C5VTKIMK.js"),"./locales/sl-SI.json":()=>import("./locales/sl-SI-NN7IZMDC.js"),"./locales/sv-SE.json":()=>import("./locales/sv-SE-XGPEYMSR.js"),"./locales/ta-IN.json":()=>import("./locales/ta-IN-2NMHFXQM.js"),"./locales/th-TH.json":()=>import("./locales/th-TH-HPSO5L25.js"),"./locales/tr-TR.json":()=>import("./locales/tr-TR-DEFEU3FU.js"),"./locales/uk-UA.json":()=>import("./locales/uk-UA-QMV73CPH.js"),"./locales/vi-VN.json":()=>import("./locales/vi-VN-M7AON7JQ.js"),"./locales/zh-CN.json":()=>import("./locales/zh-CN-LNUGB5OW.js"),"./locales/zh-HK.json":()=>import("./locales/zh-HK-E62DVLB3.js"),"./locales/zh-TW.json":()=>import("./locales/zh-TW-RAJ6MFWO.js")});var lC=85,ho={code:"en",label:"English"},Tn=[ho,...[{code:"ar-SA",label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",rtl:!0},{code:"bg-BG",label:"\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438"},{code:"ca-ES",label:"Catal\xE0"},{code:"cs-CZ",label:"\u010Cesky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"},{code:"es-ES",label:"Espa\xF1ol"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"\u0641\u0627\u0631\u0633\u06CC",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Fran\xE7ais"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"\u05E2\u05D1\u05E8\u05D9\u05EA",rtl:!0},{code:"hi-IN",label:"\u0939\u093F\u0928\u094D\u0926\u0940"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"\u65E5\u672C\u8A9E"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"\u049A\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456"},{code:"ko-KR",label:"\uD55C\uAD6D\uC5B4"},{code:"ku-TR",label:"Kurd\xEE"},{code:"lt-LT",label:"Lietuvi\u0173"},{code:"lv-LV",label:"Latvie\u0161u"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokm\xE5l"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Portugu\xEAs Brasileiro"},{code:"pt-PT",label:"Portugu\xEAs"},{code:"ro-RO",label:"Rom\xE2n\u0103"},{code:"ru-RU",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"},{code:"sk-SK",label:"Sloven\u010Dina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Sloven\u0161\u010Dina"},{code:"tr-TR",label:"T\xFCrk\xE7e"},{code:"uk-UA",label:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"},{code:"zh-CN",label:"\u7B80\u4F53\u4E2D\u6587"},{code:"zh-TW",label:"\u7E41\u9AD4\u4E2D\u6587"},{code:"vi-VN",label:"Ti\u1EBFng Vi\u1EC7t"},{code:"mr-IN",label:"\u092E\u0930\u093E\u0920\u0940"}].filter(e=>Zf[e.code]>=lC).sort((e,o)=>e.label>o.label?1:-1)],Vl="__test__";aC()&&Tn.unshift({code:Vl,label:"test language"},{code:`${Vl}.rtl`,label:"\u202Atest language (rtl)\u202C",rtl:!0});var vn=ho,Wl={},Xl=async e=>{if(vn=e,document.documentElement.dir=vn.rtl?"rtl":"ltr",document.documentElement.lang=vn.code,e.code.startsWith(Vl))Wl={};else try{Wl=await iC(`./locales/${vn.code}.json`)}catch(o){console.error(`Failed to load language ${e.code}:`,o.message),Wl=am}Ke.set(I1,e.code)},Po=()=>vn,T1=(e,o)=>{for(let t=0;t<o.length;++t){let r=o[t];if(e[r]===void 0)return;e=e[r]}if(typeof e=="string")return e},g=(e,o,t)=>{if(vn.code.startsWith(Vl))return`\u202A[[${o?`${e}(${JSON.stringify(o).slice(1,-1)})`:e}]]\u202C`;let r=e.split("."),n=T1(Wl,r)||T1(am,r)||t;if(n===void 0){let i=`Can't find translation for ${e}`;if(T.PROD)return console.warn(i),"";throw new Error(i)}if(o)for(let i in o)n=n.replace(`{{${i}}}`,String(o[i]));return n},I1=he(ho.code),Oe=()=>{let e=Yl(I1);return{t:g,langCode:e}};import sC from"clsx";import cC from"open-color";import et from"react";import{THEME as dC}from"@excalidraw/common";import{Fragment as be,jsx as h,jsxs as D}from"react/jsx-runtime";var Jt=e=>"var(--icon-fill-color)",C1=e=>e===dC.LIGHT?cC.white:"#1e1e1e",M=(e,o=512)=>{let{width:t=512,height:r=t,mirror:n,style:i,...a}=typeof o=="number"?{width:o}:o;return h("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${t} ${r}`,className:sC({"rtl-mirror":n}),style:i,...a,children:typeof e=="string"?h("path",{fill:"currentColor",d:e}):e})},F={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},te={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},kU=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:3,y:8,width:18,height:4,rx:1}),h("line",{x1:12,y1:8,x2:12,y2:21}),h("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),h("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"})]}),F),In=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),h("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),h("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),h("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),F),S1=M(D("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),F),k1=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"1"}),h("circle",{cx:"12",cy:"19",r:"1"}),h("circle",{cx:"12",cy:"5",r:"1"})]}),F),M1=M(D("svg",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),h("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),h("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),F),Em=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 8m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 11m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M15 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M6.5 9.5l3.5 -3"}),h("path",{d:"M14 5.5l3 1.5"}),h("path",{d:"M18.5 10l-2.5 7"}),h("path",{d:"M13.5 17.5l-7 -5"})]}),F),Ao=M(D("g",{children:[h("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"}),h("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"}),h("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:h("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"})}),h("g",{mask:"url(#UnlockedIcon)",children:h("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"})})]}),te),$o=M(D("g",{strokeWidth:"1.25",children:[h("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"}),h("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),h("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"})]}),te),L1=M(h("g",{fill:"currentColor",children:h("path",{d:"M12 2a5 5 0 0 1 5 5v3a3 3 0 0 1 3 3v6a3 3 0 0 1 -3 3h-10a3 3 0 0 1 -3 -3v-6a3 3 0 0 1 3 -3v-3a5 5 0 0 1 5 -5m0 12a2 2 0 0 0 -1.995 1.85l-.005 .15a2 2 0 1 0 2 -2m0 -10a3 3 0 0 0 -3 3v3h6v-3a3 3 0 0 0 -3 -3"})}),{width:24,height:24}),P1=M(D(be,{children:[h("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"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),h("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"}),A1=M(D(be,{children:[h("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"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),h("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"}),D1=M(D(be,{children:[h("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"}),h("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),h("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"}),MU=M(h("g",{fill:"currentColor",children:h("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"}),_1=M(D("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),ta=M(D("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,children:[h("path",{d:"M4.028 13.252c-.657 -.972 -1.028 -2.078 -1.028 -3.252c0 -3.866 4.03 -7 9 -7s9 3.134 9 7s-4.03 7 -9 7c-1.913 0 -3.686 -.464 -5.144 -1.255"}),h("path",{d:"M5 15m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 17c0 1.42 .316 2.805 1 4"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),Cn=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),F),Sn=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"})]}),F),kn=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"})]}),F),Kl=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),h("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),F),Mn=M(h("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),te),R1=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),h("path",{d:"M16 7h4"}),h("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),F),jo=M(D("g",{strokeWidth:"1.25",children:[h("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"}),h("path",{d:"m11.25 5.417 3.333 3.333"})]}),te),Ln=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),h("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),h("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),h("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),h("polyline",{points:"5 20 11 4 13 4 20 20"})]}),F),N1=M(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M12.5 6.667h.01"}),h("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"}),h("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),h("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),te),B1=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M18 13.3l-6.3 -6.3"})]}),F),ym=M(h("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),te),wm=M(h("path",{d:"M5 10h10",strokeWidth:"1.25"}),te),F1=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 21l-6 -6"}),h("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"}),h("path",{d:"M3 4v4h4"})]}),F),Do=M(h("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"}),te),O1=M(D("g",{strokeWidth:"1.5",children:[h("polyline",{points:"12 16 18 10 12 4"}),h("polyline",{points:"8 4 2 10 8 16"})]}),te),oa=M(D("g",{strokeWidth:"1.25",children:[h("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"}),h("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"})]}),te),ra=M(h("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"}),te),na=M(h("g",{stroke:"currentColor",strokeLinejoin:"round",children:h("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"})}),{...te,strokeWidth:1.5}),Zl=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),h("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),F),zr=M(h("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"}),te),Pn=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),F),z1=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"12",cy:"12",r:"9"}),h("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),F),LU=M(h("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"}),te),H1=M(h("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"}),te),G1=M(D("g",{strokeWidth:"1.25",children:[h("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"}),h("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"})]}),te),U1=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),h("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),F),Y1=M(h("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),ia=M(D("g",{strokeWidth:"1.25",children:[h("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"}),h("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"})]}),te),W1=M("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}),V1=M("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}),An=M(h("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"}),te),PU=M("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}),X1=M("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"),$l=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),h("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"}),h("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"})]}),F),K1=M(h("g",{strokeWidth:1.5,children:h("path",{d:"M6 18l12 -12"})}),F),jl=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 8h.01"}),h("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),h("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),h("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),h("path",{d:"M19 16v6"}),h("path",{d:"M22 19l-3 3l-3 -3"})]}),F),Z1=M("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}),AU=M("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}),DU=M("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}),$1=M("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"),_U=M("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"),vm=M(h("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"}),te),Tm=M(h("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"}),te),j1=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}),q1=M(h("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"}),te),RU=M("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"),NU=M("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}),BU=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M12 14v-11"}),h("path",{d:"M9 6l3 -3l3 3"})]}),F),FU=M(D(be,{children:[h("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"}),h("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}),OU=M(h("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}),J1=D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 10l0 10"}),h("path",{d:"M12 10l4 4"}),h("path",{d:"M12 10l-4 4"}),h("path",{d:"M4 4l16 0"})]}),Q1=D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 5l0 14"}),h("path",{d:"M16 9l-4 -4"}),h("path",{d:"M8 9l4 -4"})]}),Im=M(Q1,F),Cm=M(Q1,{...F,style:{transform:"rotate(180deg)"}}),Sm=M(J1,F),km=M(J1,{...F,style:{transform:"rotate(180deg)"}}),Mm=M(D(be,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),Lm=M(D(be,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),Pm=M(D(be,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),Am=M(D(be,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),e0=M(D(be,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),t0=M(D(be,{children:[D("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),Dm=M(D("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),h("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),te),_m=M(D("g",{stroke:"currentColor",strokeWidth:"1.25",children:[h("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),h("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),h("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),h("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"})]}),te),ql=M(D("g",{strokeWidth:"1.5",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("circle",{cx:"9",cy:"7",r:"4"}),h("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),h("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),h("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),F),zU=M("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"),HU=M("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"),Ft=M(D(be,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("path",{d:"M15 5 5 15M5 5l10 10"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),GU=M("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}),UU=M("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}),YU=M("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}),Rm=et.memo(({theme:e})=>M(D(be,{children:[h("path",{d:"M25 26H111V111H25",fill:Jt(e)}),h("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:Jt(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:Jt(e)}),h("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:Jt(e),strokeWidth:"2"}),D("g",{fill:C1(e),stroke:Jt(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),Nm=et.memo(({theme:e})=>M(D(be,{children:[h("path",{d:"M25 26H111V111H25",fill:Jt(e)}),h("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:Jt(e),strokeWidth:"2"}),h("path",{d:"M100 100H160V160H100",fill:Jt(e)}),h("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:Jt(e),strokeWidth:"2"}),D("g",{fill:C1(e),stroke:Jt(e),strokeWidth:"6",children:[h("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),h("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),h("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),h("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),o0=M(h("g",{strokeWidth:1.25,children:h("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"})}),te),r0=M(D(be,{children:[h("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"}),h("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:h("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"})}),h("g",{mask:"url(#FillHachureIcon)",children:h("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"})})]}),te),n0=M(D(be,{children:[D("g",{clipPath:"url(#a)",children:[h("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"}),h("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:h("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"})}),h("g",{mask:"url(#FillCrossHatchIcon)",children:h("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"})})]}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),i0=M(D(be,{children:[h("g",{clipPath:"url(#a)",children:h("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"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...te,fill:"currentColor"}),Bm=M(h(be,{children:h("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),te),a0=M(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),te),l0=M(h("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),te),WU=et.memo(({theme:e})=>M(h("path",{d:"M6 10H34",stroke:Jt(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),s0=M(D("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12h2"}),h("path",{d:"M17 12h2"}),h("path",{d:"M11 12h2"})]}),F),c0=M(D("g",{strokeWidth:"2",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M8 12v.01"}),h("path",{d:"M12 12v.01"}),h("path",{d:"M16 12v.01"}),h("path",{d:"M20 12v.01"})]}),F),d0=M(h("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"}),te),m0=M(h("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"}),te),p0=M(h("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"}),te),u0=M(D("svg",{strokeWidth:"1.5",children:[h("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"}),h("path",{d:"M13.3333 3.33331V3.34331"}),h("path",{d:"M16.6667 3.33331V3.34331"}),h("path",{d:"M16.6667 6.66669V6.67669"}),h("path",{d:"M16.6667 10V10.01"}),h("path",{d:"M3.33334 13.3333V13.3433"}),h("path",{d:"M16.6667 13.3333V13.3433"}),h("path",{d:"M3.33334 16.6667V16.6767"}),h("path",{d:"M6.66666 16.6667V16.6767"}),h("path",{d:"M10 16.6667V16.6767"}),h("path",{d:"M13.3333 16.6667V16.6767"}),h("path",{d:"M16.6667 16.6667V16.6767"})]}),te),h0=M(D("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),h("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),h("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),h("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),h("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),h("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),h("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),h("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),h("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),h("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),h("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),h("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),F),g0=M(D("g",{stroke:"currentColor",opacity:.3,strokeWidth:2,children:[h("path",{d:"M12 12l9 0"}),h("path",{d:"M3 9l6 6"}),h("path",{d:"M3 15l6 -6"})]}),F),f0=et.memo(({flip:e=!1})=>M(D("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[h("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),h("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),b0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),x0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[h("path",{d:"M26 10L6 10"}),h("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),E0=et.memo(({flip:e=!1})=>M(h("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:h("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),y0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[h("path",{d:"M32 10L6 10",strokeWidth:2}),h("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),w0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[h("path",{d:"M6,9.5H27"}),h("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),v0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),T0=et.memo(({flip:e=!1})=>M(D("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{d:"M6,9.5H20"}),h("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),I0=et.memo(({flip:e=!1})=>M(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),C0=et.memo(({flip:e=!1})=>M(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,15 L15,5"})}),{width:40,height:20})),S0=et.memo(({flip:e=!1})=>M(h("g",{stroke:"currentColor",fill:"none",transform:e?"":"translate(40, 0) scale(-1, 1)",strokeLinejoin:"round",strokeWidth:2,children:h("path",{d:"M34,10 H6 M15,10 L15,16 L15,4 M15,10 L7,5 M15,10 L7,15"})}),{width:40,height:20})),k0=M(D(be,{children:[h("g",{clipPath:"url(#a)",children:h("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"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),M0=M(D(be,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),L0=M(D(be,{children:[h("g",{clipPath:"url(#a)",children:h("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),P0=M(h(be,{children:h("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"})}),te),Hr=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 7v-2h13v2"}),h("path",{d:"M10 5v14"}),h("path",{d:"M12 19h-4"}),h("path",{d:"M15 13v-1h6v1"}),h("path",{d:"M18 12v7"}),h("path",{d:"M17 19h2"})]}),F),A0=M(h(be,{children:D("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 12h10"}),h("path",{d:"M7 5v14"}),h("path",{d:"M17 5v14"}),h("path",{d:"M15 19h4"}),h("path",{d:"M15 5h4"}),h("path",{d:"M5 19h4"}),h("path",{d:"M5 5h4"})]})}),F),aa=M(h(be,{children:h("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("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"})})}),te),Jl=M(D(be,{children:[h("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:h("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"})}),h("defs",{children:h("clipPath",{id:"a",children:h("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),te),D0=M(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),h("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),F),_0=M(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),h("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),F),R0=M(D("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),h("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),h("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),F),N0=et.memo(({theme:e})=>M(D("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),h("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),F)),B0=et.memo(({theme:e})=>M(D("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),h("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),F)),F0=et.memo(({theme:e})=>M(D("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),h("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),h("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),F)),Ql=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M21 19h-18l9 -15"}),h("path",{d:"M20.615 15.171h.015"}),h("path",{d:"M19.515 11.771h.015"}),h("path",{d:"M17.715 8.671h.015"}),h("path",{d:"M15.415 5.971h.015"})]}),F),O0=M(h("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}),VU=M(h("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"})),es=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),h("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),h("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),h("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"})]}),F),Fm=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),h("path",{d:"M7 11l5 5l5 -5"}),h("path",{d:"M12 4l0 12"})]}),F),Dn=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),F),z0=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("path",{d:"M9.15 14.85l8.85 -10.85"}),h("path",{d:"M6 4l8.85 10.85"})]}),F),H0=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),h("path",{d:"M12 17l0 .01"}),h("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),F),XU=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M7 4v16l13 -8z"})]}),F),KU=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"})]}),F),G0=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 12l5 5l10 -10"})]}),F),U0=M(D(be,{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M12 9v4"}),h("path",{d:"M12 17h.01"})]}),F),Y0=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11 7l6 6"}),h("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"})]}),F),Om=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l-4 7h8z"}),h("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),h("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"})]}),F),_n=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 7l16 0"}),h("path",{d:"M4 17l16 0"}),h("path",{d:"M7 4l0 16"}),h("path",{d:"M17 4l0 16"})]}),F),W0=M(h("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"})),Rn=M(D("g",{strokeWidth:"1.25",children:[h("path",{d:"M4.16602 10H15.8327"}),h("path",{d:"M12.5 13.3333L15.8333 10"}),h("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),te),la=M(D("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[h("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"}),h("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),V0=M(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("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"}),h("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"})]}),F),ZU=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z"}),h("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),h("path",{d:"M15 6l3 3"}),h("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"}),h("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"})]}),F),$U=M(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),h("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),h("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"}),h("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),h("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),h("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"})]}),F),X0=M(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),h("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),h("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),h("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),F),Gr=M(D("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),h("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"})]}),F),K0=M(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),h("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"}),h("path",{d:"M3 3l18 18"})]}),F),Z0=M(D("g",{stroke:"currentColor",fill:"none",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("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"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),F),$0=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("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"}),h("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),h("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),h("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),h("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),F),At=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),h("path",{d:"M21 21l-6 -6"})]}),F),j0=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),h("path",{d:"M12 7v5l3 3"}),h("path",{d:"M19 16l-2 3h4l-2 3"})]}),F),q0=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M5 10a7 7 0 0 0 14 0"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),F),J0=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 3l18 18"}),h("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"}),h("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),h("path",{d:"M8 21l8 0"}),h("path",{d:"M12 17l0 4"})]}),F),sa=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),F),Q0=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M12 20v.01"}),h("path",{d:"M16 20v.01"}),h("path",{d:"M8 20v.01"}),h("path",{d:"M4 20v.01"}),h("path",{d:"M4 16v.01"}),h("path",{d:"M4 12v.01"}),h("path",{d:"M4 8v.01"}),h("path",{d:"M4 4v.01"}),h("path",{d:"M8 4v.01"}),h("path",{d:"M12 4v.01"}),h("path",{d:"M16 4v.01"}),h("path",{d:"M20 4v.01"}),h("path",{d:"M20 8v.01"}),h("path",{d:"M20 12v.01"}),h("path",{d:"M20 16v.01"}),h("path",{d:"M20 20v.01"})]}),F),eb=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 3v18"}),h("path",{d:"M19 21v-18"}),h("path",{d:"M5 7h14"}),h("path",{d:"M5 15h14"}),h("path",{d:"M8 13v4"}),h("path",{d:"M11 13v4"}),h("path",{d:"M16 13v4"}),h("path",{d:"M14 5v4"}),h("path",{d:"M11 5v4"}),h("path",{d:"M8 5v4"}),h("path",{d:"M3 21h18"})]}),F),tb=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 12l18 0"}),h("path",{d:"M7 16l10 0l-10 5l0 -5"}),h("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),F),ob=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M12 3l0 18"}),h("path",{d:"M16 7l0 10l5 0l-5 -10"}),h("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),F),zm=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),h("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"})]}),F),ts=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),h("path",{d:"M22 22l-3 -3"}),h("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),h("path",{d:"M3 11v-1"}),h("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),h("path",{d:"M10 3h1"}),h("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),F),rb=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("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"}),h("path",{d:"M10 15l2 6l2 -6"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),F),nb=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),h("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),h("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),h("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),h("path",{d:"M11 21v-6l3 6v-6"})]}),F),ib=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M4 8l5 0"}),h("path",{d:"M15 8l4 0"})]}),F),ab=M(D("g",{strokeWidth:1.25,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),h("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),h("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),F),lb=M(D("g",{stroke:"currentColor",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"})]}),{...F,strokeWidth:1.5}),jU=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M21 12h-13l3 -3"}),h("path",{d:"M11 15l-3 -3"})]}),F),qU=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("path",{d:"M10 9l5 3l-5 3z"})]}),F),sb=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M3 6h18"}),h("path",{d:"M3 12h18"}),h("path",{d:"M3 18h18"}),h("path",{d:"M6 3v18"}),h("path",{d:"M12 3v18"}),h("path",{d:"M18 3v18"})]}),F),cb=M(D("g",{strokeWidth:1.5,children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("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"}),h("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"}),h("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),F),os=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 18l12 -12"}),h("path",{d:"M18 10v-4h-4"})]}),F),rs=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),h("path",{d:"M18 4l3 3l-3 3"})]}),F),ns=M(D("g",{children:[h("path",{d:"M16,12L20,9L16,6"}),h("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),F),is=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 9l6 6l6 -6"})]}),F),db=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),F),mb=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M6 15l6 -6l6 6"})]}),F),Hm=M(D("g",{strokeWidth:"1.25",children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M8 5v10a1 1 0 0 0 1 1h10"}),h("path",{d:"M5 8h10a1 1 0 0 1 1 1v10"})]}),F),as=M(D("g",{children:[h("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),h("path",{d:"M5 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M19 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),h("path",{d:"M5 7l0 10"}),h("path",{d:"M7 5l10 0"}),h("path",{d:"M7 19l10 0"}),h("path",{d:"M19 7l0 10"})]}),F),Gm=M(D("g",{strokeWidth:"1.25",children:[h("rect",{x:"4",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"4",width:"4",height:"4",rx:"1"}),h("rect",{x:"4",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"10",width:"4",height:"4",rx:"1"}),h("rect",{x:"4",y:"16",width:"4",height:"4",rx:"1"}),h("rect",{x:"10",y:"16",width:"4",height:"4",rx:"1"}),h("rect",{x:"16",y:"16",width:"4",height:"4",rx:"1"})]}),F),Um=M(h("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:.5,viewBox:"0 0 640 512",children:h("path",{d:"M15 15C24.4 5.7 39.6 5.7 49 15l63 63L112 40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 96c0 13.3-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l38.1 0L15 49C5.7 39.6 5.7 24.4 15 15zM133.5 243.9C158.6 193.6 222.7 112 320 112s161.4 81.6 186.5 131.9c3.8 7.6 3.8 16.5 0 24.2C481.4 318.4 417.3 400 320 400s-161.4-81.6-186.5-131.9c-3.8-7.6-3.8-16.5 0-24.2zM320 320a64 64 0 1 0 0-128 64 64 0 1 0 0 128zM591 15c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-63 63 38.1 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-96 0c-13.3 0-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24s24 10.7 24 24l0 38.1 63-63zM15 497c-9.4-9.4-9.4-24.6 0-33.9l63-63L40 400c-13.3 0-24-10.7-24-24s10.7-24 24-24l96 0c13.3 0 24 10.7 24 24l0 96c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-38.1L49 497c-9.4 9.4-24.6 9.4-33.9 0zm576 0l-63-63 0 38.1c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-96c0-13.3 10.7-24 24-24l96 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-38.1 0 63 63c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0z"})}),F);import pb from"clsx";import Wm,{useEffect as uC,useRef as ub,useState as hC}from"react";import{isPromiseLike as gC}from"@excalidraw/common";import mC from"react";import{jsx as Ym}from"react/jsx-runtime";var pC=({size:e="1em",circleWidth:o=8,synchronized:t=!1,className:r=""})=>{let i=-(mC.useRef(Date.now()).current%1600);return Ym("div",{className:`Spinner ${r}`,children:Ym("svg",{viewBox:"0 0 100 100",style:{width:e,height:e,"--spinner-delay":t?`${i}ms`:0},children:Ym("circle",{cx:"50",cy:"50",r:50-o/2,strokeWidth:o,fill:"none",strokeMiterlimit:"10"})})})},tt=pC;import{jsx as ca,jsxs as da}from"react/jsx-runtime";var W=Wm.forwardRef(({size:e="medium",visible:o=!0,className:t="",...r},n)=>{let{id:i}=ze(),a=Wm.useRef(null);Wm.useImperativeHandle(n,()=>a.current);let l=`ToolIcon_size_${e}`,[s,c]=hC(!1),d=ub(!0),m=async u=>{let f="onClick"in r&&r.onClick?.(u);if(gC(f))try{c(!0),await f}catch(b){if(b instanceof fn)console.warn(b);else throw b}finally{d.current&&c(!1)}};uC(()=>(d.current=!0,()=>{d.current=!1}),[]);let p=ub(null);if(r.type==="button"||r.type==="icon"||r.type==="submit"){let u=r.type==="icon"?"button":r.type;return da("button",{className:pb("ToolIcon_type_button",l,t,o&&!r.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!r.hidden,"ToolIcon--selected":r.selected,"ToolIcon--plain":r.type==="icon"}),style:r.style,"data-testid":r["data-testid"],hidden:r.hidden,title:r.title,"aria-label":r["aria-label"],type:u,onClick:m,ref:a,disabled:s||r.isLoading||!!r.disabled,children:[(r.icon||r.label)&&da("div",{className:"ToolIcon__icon","aria-hidden":"true","aria-disabled":!!r.disabled,children:[r.icon||r.label,r.keyBindingLabel&&ca("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel}),r.isLoading&&ca(tt,{})]}),r.showAriaLabel&&da("div",{className:"ToolIcon__label",children:[r["aria-label"]," ",s&&ca(tt,{})]}),r.children]})}return da("label",{className:pb("ToolIcon",t),title:r.title,onPointerDown:u=>{p.current=u.pointerType||null,r.onPointerDown?.({pointerType:u.pointerType||null})},onPointerUp:()=>{requestAnimationFrame(()=>{p.current=null})},children:[ca("input",{className:`ToolIcon_type_radio ${l}`,type:"radio",name:r.name,"aria-label":r["aria-label"],"aria-keyshortcuts":r["aria-keyshortcuts"],"data-testid":r["data-testid"],id:`${i}-${r.id}`,onChange:()=>{r.onChange?.({pointerType:p.current})},checked:r.checked,ref:a}),da("div",{className:"ToolIcon__icon",children:[r.icon,r.keyBindingLabel&&ca("span",{className:"ToolIcon__keybinding",children:r.keyBindingLabel})]})]})});W.displayName="ToolButton";var ls=[],N=e=>(ls=ls.concat(e),e);import{jsx as TC}from"react/jsx-runtime";var vC=(e,o,t)=>{let r=new Set($(e.filter(d=>EC(d)),o).map(d=>d.id)),n={},i=t.scene.getNonDeletedElementsMap(),a=new Set;for(let d of r){let m=yC(e,d);for(let p of m)if(!a.has(p.id)){if(ss(p)){let u=gb(p,i);u&&(n[u.id]=!0)}else n[p.id]=!0;a.add(p.id)}}let l=!0,s=e.map(d=>{if(o.selectedElementIds[d.id]){let m=ss(d)?gb(d,i):null;return d.frameId&&r.has(d.frameId)?(l=!1,n[d.id]=!0,d):m?.frameId&&r.has(m?.frameId)?d:(d.boundElements&&d.boundElements.forEach(p=>{let u=t.scene.getNonDeletedElementsMap().get(p.id);u&&xC(u)&&t.scene.mutateElement(u,{startBinding:d.id===u.startBinding?.elementId?null:u.startBinding,endBinding:d.id===u.endBinding?.elementId?null:u.endBinding})}),ds(d,{isDeleted:!0}))}return d.frameId&&r.has(d.frameId)?(l=!1,ss(d)||(n[d.id]=!0),ds(d,{frameId:null})):ss(d)&&o.selectedElementIds[d.containerId]?ds(d,{isDeleted:!0}):d}),c=o.editingGroupId;if(l&&o.editingGroupId){let d=Km(s,o.editingGroupId).filter(m=>!m.isDeleted);if(d.length>1)d[0]&&(n[d[0].id]=!0);else{c=null,d[0]&&(n[d[0].id]=!0);let m=d[0];if(m){let p=m.groupIds.findIndex(f=>f===o.editingGroupId),u=m.groupIds[p+1];if(u){let f=Km(s,u).filter(b=>!b.isDeleted);f.length>1&&(c=u,f.forEach(b=>{n[b.id]=!0}))}}}}return{elements:s,appState:{...o,...wC({selectedElementIds:n,editingGroupId:c},s,o,null)}}},fb=(e,o)=>{if(e.editingGroupId){let t=Km(Xm(o),e.editingGroupId);if(t.length)return{...e,selectedElementIds:{[t[0].id]:!0}}}return e},ma=N({name:"deleteSelectedElements",label:"labels.delete",icon:Do,trackEvent:{category:"element",action:"delete"},perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing){let{elementId:a,selectedPointsIndices:l,startBindingElement:s,endBindingElement:c}=o.selectedLinearElement,d=r.scene.getNonDeletedElementsMap(),m=hb.getElement(a,d);if(!m||l==null)return!1;if(l.length>=m.points.length){let u=e.map(b=>b.id===m.id?ds(b,{isDeleted:!0}):b),f=fb(o,u);return{elements:u,appState:{...f,selectedLinearElement:null},captureUpdate:cs.IMMEDIATELY}}let p={startBindingElement:l?.includes(0)?null:s,endBindingElement:l?.includes(m.points.length-1)?null:c};return hb.deletePoints(m,r,l),{elements:e,appState:{...o,selectedLinearElement:{...o.selectedLinearElement,...p,selectedPointsIndices:l?.[0]>0?[l[0]-1]:[0]}},captureUpdate:cs.IMMEDIATELY}}let{elements:n,appState:i}=vC(e,o,r);return bC(n,n.filter(a=>a.isDeleted)),i=fb(i,n),{elements:n,appState:{...i,activeTool:fC(o,{type:"selection"}),multiElement:null,activeEmbeddable:null,selectedLinearElement:null},captureUpdate:Ee(Xm(e),o)?cs.IMMEDIATELY:cs.EVENTUALLY}},keyTest:(e,o,t)=>(e.key===Vm.BACKSPACE||e.key===Vm.DELETE)&&!e[Vm.CTRL_OR_CMD],PanelComponent:({elements:e,appState:o,updateData:t})=>TC(W,{type:"button",icon:Do,title:g("labels.delete"),"aria-label":g("labels.delete"),onClick:()=>t(null),visible:Ee(Xm(e),o)})});import{KEYS as Nn,CODES as Bn,getShortcutKey as Fn,isDarwin as ms}from"@excalidraw/common";import{moveOneLeft as IC,moveOneRight as CC,moveAllLeft as SC,moveAllRight as kC}from"@excalidraw/element";import{CaptureUpdateAction as ps}from"@excalidraw/element";import{jsx as us}from"react/jsx-runtime";var Zm=N({name:"sendBackward",label:"labels.sendBackward",keywords:["move down","zindex","layer"],icon:Cm,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:IC(e,o,r.scene),appState:o,captureUpdate:ps.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Nn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Bn.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>us("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendBackward")} \u2014 ${Fn("CtrlOrCmd+[")}`,children:Cm})}),$m=N({name:"bringForward",label:"labels.bringForward",keywords:["move up","zindex","layer"],icon:Im,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:CC(e,o,r.scene),appState:o,captureUpdate:ps.IMMEDIATELY}),keyPriority:40,keyTest:e=>e[Nn.CTRL_OR_CMD]&&!e.shiftKey&&e.code===Bn.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>us("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.bringForward")} \u2014 ${Fn("CtrlOrCmd+]")}`,children:Im})}),jm=N({name:"sendToBack",label:"labels.sendToBack",keywords:["move down","zindex","layer"],icon:km,trackEvent:{category:"element"},perform:(e,o)=>({elements:SC(e,o),appState:o,captureUpdate:ps.IMMEDIATELY}),keyTest:e=>ms?e[Nn.CTRL_OR_CMD]&&e.altKey&&e.code===Bn.BRACKET_LEFT:e[Nn.CTRL_OR_CMD]&&e.shiftKey&&e.code===Bn.BRACKET_LEFT,PanelComponent:({updateData:e,appState:o})=>us("button",{type:"button",className:"zIndexButton",onClick:()=>e(null),title:`${g("labels.sendToBack")} \u2014 ${ms?Fn("CtrlOrCmd+Alt+["):Fn("CtrlOrCmd+Shift+[")}`,children:km})}),qm=N({name:"bringToFront",label:"labels.bringToFront",keywords:["move up","zindex","layer"],icon:Sm,trackEvent:{category:"element"},perform:(e,o)=>({elements:kC(e,o),appState:o,captureUpdate:ps.IMMEDIATELY}),keyTest:e=>ms?e[Nn.CTRL_OR_CMD]&&e.altKey&&e.code===Bn.BRACKET_RIGHT:e[Nn.CTRL_OR_CMD]&&e.shiftKey&&e.code===Bn.BRACKET_RIGHT,PanelComponent:({updateData:e,appState:o})=>us("button",{type:"button",className:"zIndexButton",onClick:t=>e(null),title:`${g("labels.bringToFront")} \u2014 ${ms?Fn("CtrlOrCmd+Alt+]"):Fn("CtrlOrCmd+Shift+]")}`,children:Sm})});import{getNonDeletedElements as MC}from"@excalidraw/element";import{LinearElementEditor as LC}from"@excalidraw/element";import{isLinearElement as PC,isTextElement as AC}from"@excalidraw/element";import{arrayToMap as DC,KEYS as bb}from"@excalidraw/common";import{selectGroupsForSelectedElements as _C}from"@excalidraw/element";import{CaptureUpdateAction as RC}from"@excalidraw/element";var Jm=N({name:"selectAll",label:"labels.selectAll",icon:Q0,trackEvent:{category:"canvas"},viewMode:!1,perform:(e,o,t,r)=>{if(o.selectedLinearElement?.isEditing)return!1;let n=e.filter(i=>!i.isDeleted&&!(AC(i)&&i.containerId)&&!i.locked).reduce((i,a)=>(i[a.id]=!0,i),{});return{appState:{...o,..._C({editingGroupId:null,selectedElementIds:n},MC(e),o,r),selectedLinearElement:Object.keys(n).length===1&&PC(e[0])?new LC(e[0],DC(e)):null},captureUpdate:RC.IMMEDIATELY}},keyTest:e=>e[bb.CTRL_OR_CMD]&&e.key===bb.A});import{DEFAULT_GRID_SIZE as xb,KEYS as Eb,arrayToMap as yb,getShortcutKey as NC}from"@excalidraw/common";import{getNonDeletedElements as wb}from"@excalidraw/element";import{LinearElementEditor as BC}from"@excalidraw/element";import{getSelectedElements as FC,getSelectionStateForElements as OC}from"@excalidraw/element";import{syncMovedIndices as zC}from"@excalidraw/element";import{duplicateElements as HC}from"@excalidraw/element";import{CaptureUpdateAction as vb}from"@excalidraw/element";import{jsx as GC}from"react/jsx-runtime";var Qm=N({name:"duplicateSelection",label:"labels.duplicateSelection",icon:oa,trackEvent:{category:"element"},perform:(e,o,t,r)=>{if(o.selectedElementsAreBeingDragged)return!1;if(o.selectedLinearElement?.isEditing)try{let a=BC.duplicateSelectedPoints(o,r.scene);return{elements:e,appState:a,captureUpdate:vb.IMMEDIATELY}}catch{return!1}let{duplicatedElements:n,elementsWithDuplicates:i}=HC({type:"in-place",elements:e,idsOfElementsToDuplicate:yb(FC(e,o,{includeBoundTextElement:!0,includeElementsInFrames:!0})),appState:o,randomizeSeed:!0,overrides:({origElement:a,origIdToDuplicateId:l})=>{let s=a.frameId&&l.get(a.frameId);return{x:a.x+xb/2,y:a.y+xb/2,frameId:s??a.frameId}}});if(r.props.onDuplicate&&i){let a=r.props.onDuplicate(i,e);a&&(i=a)}return{elements:zC(i,yb(n)),appState:{...o,...OC(n,wb(i),o)},captureUpdate:vb.IMMEDIATELY}},keyTest:e=>e[Eb.CTRL_OR_CMD]&&e.key===Eb.D,PanelComponent:({elements:e,appState:o,updateData:t})=>GC(W,{type:"button",icon:oa,title:`${g("labels.duplicateSelection")} \u2014 ${NC("CtrlOrCmd+D")}`,"aria-label":g("labels.duplicateSelection"),onClick:()=>t(null),visible:Ee(wb(e),o)})});import{pointFrom as U4}from"@excalidraw/math";import{useEffect as wp,useMemo as Y4,useRef as vp,useState as W4}from"react";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE as V4,DEFAULT_ELEMENT_BACKGROUND_PICKS as X4,DEFAULT_ELEMENT_STROKE_COLOR_PALETTE as K4,DEFAULT_ELEMENT_STROKE_PICKS as Z4,ARROW_TYPE as Ro,DEFAULT_FONT_FAMILY as $4,DEFAULT_FONT_SIZE as j4,FONT_FAMILY as q4,ROUNDNESS as Ps,STROKE_WIDTH as Tp,VERTICAL_ALIGN as Ls,KEYS as Zn,randomInteger as J4,arrayToMap as Sp,getFontFamilyString as Q4,getShortcutKey as e6,getLineHeight as t6,isTransparent as o6,reduceToCommonValue as r6}from"@excalidraw/common";import{canBecomePolygon as n6,getNonDeletedElements as cx}from"@excalidraw/element";import{bindLinearElement as ix,calculateFixedPointForElbowArrowBinding as ax,updateBoundElements as i6}from"@excalidraw/element";import{LinearElementEditor as Ip}from"@excalidraw/element";import{newElementWith as Ve}from"@excalidraw/element";import{getBoundTextElement as nr,redrawTextBoundingBox as wa}from"@excalidraw/element";import{isArrowElement as As,isBoundToContainer as a6,isElbowArrow as dx,isLinearElement as Cp,isLineElement as lx,isTextElement as wt,isUsingAdaptiveRadius as l6}from"@excalidraw/element";import{hasStrokeColor as s6}from"@excalidraw/element";import{updateElbowArrowPoints as c6,CaptureUpdateAction as Xe,toggleLinePolygonState as d6}from"@excalidraw/element";import{isDevEnv as UC}from"@excalidraw/common";var YC=new Set(["command_palette","export"]),re=(e,o,t,r)=>{try{if(typeof window>"u"||T.VITE_WORKER_ID||T.VITE_APP_ENABLE_TRACKING!=="true"||!YC.has(e)||UC())return;T.PROD||console.info("trackEvent",{category:e,action:o,label:t,value:r}),window.sa_event&&window.sa_event(o,{category:e,label:t,value:r})}catch(n){console.error("error during analytics",n)}};import KC from"clsx";import WC from"clsx";import{forwardRef as VC}from"react";import{jsx as XC}from"react/jsx-runtime";var On=VC((e,o)=>{let{title:t,className:r,testId:n,active:i,standalone:a,icon:l,onClick:s}=e;return XC("button",{type:"button",ref:o,title:t,"data-testid":n,className:WC(r,{standalone:a,active:i}),onClick:s,style:e.style,children:l},t)});import{Fragment as $C,jsx as ep,jsxs as ZC}from"react/jsx-runtime";var Ot=e=>ep($C,{children:e.options.map(o=>e.type==="button"?ep(On,{icon:o.icon,title:o.text,testId:o.testId,active:o.active??e.value===o.value,onClick:t=>e.onClick(o.value,t)},o.text):ZC("label",{className:KC({active:e.value===o.value}),title:o.text,children:[ep("input",{type:"radio",name:e.group,onChange:()=>e.onChange(o.value),checked:e.value===o.value,"data-testid":o.testId}),o.icon]},o.text))});import*as ys from"@radix-ui/react-popover";import ZS from"clsx";import{useRef as $S}from"react";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as jS,COLOR_PALETTE as Gb,isTransparent as qS}from"@excalidraw/common";import{jsx as jC}from"react/jsx-runtime";var hs=()=>jC("div",{style:{width:1,height:"1rem",backgroundColor:"var(--default-border-color)",margin:"0 auto"}});import{useEffect as tS,useRef as oS}from"react";import{createPortal as rS}from"react-dom";import{EVENT as Jo,KEYS as nS,rgbToHex as iS}from"@excalidraw/common";import Tb from"react";var tp=Tb.createContext(null),ge=()=>Tb.useContext(tp);import{useState as qC,useLayoutEffect as Ib}from"react";import{THEME as JC}from"@excalidraw/common";var gs=e=>{let[o,t]=qC(null),r=ce(),{theme:n}=ge(),{container:i}=ze();return Ib(()=>{o&&(o.className="",o.classList.add("excalidraw",...e?.className?.split(/\s+/)||[]),o.classList.toggle("excalidraw--mobile",r.editor.isMobile),o.classList.toggle("theme--dark",n===JC.DARK))},[o,n,r.editor.isMobile,e?.className]),Ib(()=>{let a=e?.parentSelector?i?.querySelector(e.parentSelector):document.body;if(!a)return;let l=document.createElement("div");return a.appendChild(l),t(l),()=>{a.removeChild(l)}},[i,e?.parentSelector]),o};import{useEffect as QC}from"react";import{EVENT as fs}from"@excalidraw/common";function zn(e,o,t){QC(()=>{function r(n){let i=n;if(!e.current)return;let a=t?.(i,e.current);if(a===!0)return;if(a===!1)return o(i);e.current.contains(i.target)||!document.documentElement.contains(i.target)||i.target.closest("[data-radix-portal]")||i.target===document.documentElement&&document.body.style.pointerEvents==="none"||i.target.closest("[data-prevent-outside-click]")||o(i)}return document.addEventListener(fs.POINTER_DOWN,r),document.addEventListener(fs.TOUCH_START,r),()=>{document.removeEventListener(fs.POINTER_DOWN,r),document.removeEventListener(fs.TOUCH_START,r)}},[e,o,t])}import{useRef as eS}from"react";var qo=e=>{let o=eS(e);return Object.assign(o.current,e),o.current};import{jsx as aS}from"react/jsx-runtime";var Qo=he(null),Cb=({onCancel:e,onChange:o,onSelect:t,colorPickerType:r})=>{let n=gs({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),i=ge(),a=er(),l=Re(),s=$(a,i),c=qo({app:l,onCancel:e,onChange:o,onSelect:t,selectedElements:s}),{container:d}=ze();tS(()=>{let p=m.current;if(!p||!l.canvas||!n)return;let u=!1,f=l.canvas.getContext("2d"),b=({clientX:S,clientY:L})=>{let k=f.getImageData((S-i.offsetLeft)*window.devicePixelRatio,(L-i.offsetTop)*window.devicePixelRatio,1,1).data;return iS(k[0],k[1],k[2])},x=({clientX:S,clientY:L,altKey:k})=>{p.style.top=`${L+20}px`,p.style.left=`${S+20}px`;let A=b({clientX:S,clientY:L});u&&c.onChange(r,A,c.selectedElements,{altKey:k}),p.style.background=A},w=()=>{c.onCancel()},E=(S,L)=>{c.onSelect(S,L)},y=S=>{u=!0,S.stopImmediatePropagation()},v=S=>{u=!1,d?.focus(),S.stopImmediatePropagation(),S.preventDefault(),E(b(S),S)},C=S=>{S.key===nS.ESCAPE&&(S.preventDefault(),S.stopImmediatePropagation(),w())};return n.tabIndex=-1,n.focus(),x({clientX:c.app.lastViewportPosition.x,clientY:c.app.lastViewportPosition.y,altKey:!1}),n.addEventListener(Jo.KEYDOWN,C),n.addEventListener(Jo.POINTER_DOWN,y),n.addEventListener(Jo.POINTER_UP,v),window.addEventListener("pointermove",x,{passive:!0}),window.addEventListener(Jo.BLUR,w),()=>{u=!1,n.removeEventListener(Jo.KEYDOWN,C),n.removeEventListener(Jo.POINTER_DOWN,y),n.removeEventListener(Jo.POINTER_UP,v),window.removeEventListener("pointermove",x),window.removeEventListener(Jo.BLUR,w)}},[c,l.canvas,n,r,d,i.offsetLeft,i.offsetTop]);let m=oS(null);return zn(m,()=>{e()},p=>!!p.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")),n?rS(aS("div",{ref:m,className:"excalidraw-eye-dropper-preview"}),n):null};import*as Hn from"@radix-ui/react-popover";import dS from"clsx";import mS from"react";import{isInteractive as pS}from"@excalidraw/common";import lS from"react";import sS from"clsx";import{jsx as cS}from"react/jsx-runtime";var We=lS.forwardRef(({children:e,padding:o,className:t,style:r},n)=>cS("div",{className:sS("Island",t),style:{"--padding":o,...r},ref:n,children:e}));import{jsx as op,jsxs as uS}from"react/jsx-runtime";var bs=mS.forwardRef(({className:e,container:o,children:t,style:r,onClose:n,onKeyDown:i,onFocusOutside:a,onPointerLeave:l,onPointerDownOutside:s},c)=>{let d=ce();return op(Hn.Portal,{container:o,children:uS(Hn.Content,{ref:c,className:dS("focus-visible-none",e),"data-prevent-outside-click":!0,side:d.editor.isMobile&&!d.viewport.isLandscape?"bottom":"right",align:d.editor.isMobile&&!d.viewport.isLandscape?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:"var(--zIndex-popup)"},onPointerLeave:l,onKeyDown:i,onFocusOutside:a,onPointerDownOutside:s,onCloseAutoFocus:m=>{m.stopPropagation(),m.preventDefault(),o&&!pS(document.activeElement)&&o.focus(),n()},children:[op(We,{padding:3,style:r,children:t}),op(Hn.Arrow,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})});import gS from"clsx";import{useCallback as fS,useEffect as np,useRef as Mb,useState as bS}from"react";import{KEYS as ip,getShortcutKey as xS}from"@excalidraw/common";import{MAX_CUSTOM_COLORS_USED_IN_CANVAS as hS}from"@excalidraw/common";var tr=({palette:e,color:o})=>{if(!o)return null;for(let[t,r]of Object.entries(e))if(Array.isArray(r)){let n=r.indexOf(o);if(n>-1)return{colorName:t,shade:n}}else if(r===o)return{colorName:t,shade:null};return null},pa=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),rp=({color:e,palette:o})=>!Object.values(o).flat().includes(e),kb=(e,o,t)=>{let r={elementBackground:"backgroundColor",elementStroke:"strokeColor"},n=e.filter(a=>{if(a.isDeleted)return!1;let l=a[r[o]];return rp({color:l,palette:t})}),i=new Map;return n.forEach(a=>{let l=a[r[o]];i.has(l)?i.set(l,i.get(l)+1):i.set(l,1)}),[...i.entries()].sort((a,l)=>l[1]-a[1]).map(a=>a[0]).slice(0,hS)},zt=he(null),Sb=(e,o,t)=>(e*299+o*587+t*114)/1e3,Gn=(e,o=160)=>{if(!e)return!0;if(e==="transparent")return!1;if(!e.startsWith("#")){let i=document.createElement("div");if(i.style.color=e,i.style.color){i.style.position="absolute",i.style.visibility="hidden",i.style.width="0",i.style.height="0",document.body.appendChild(i);let a=getComputedStyle(i).color;document.body.removeChild(i);let l=a.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),s=parseInt(l[0]),c=parseInt(l[1]),d=parseInt(l[2]);return Sb(s,c,d)<o}return!0}let t=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16);return Sb(t,r,n)<o};import{Fragment as ES,jsx as xs,jsxs as Lb}from"react/jsx-runtime";var Pb=({color:e,onChange:o,label:t,colorPickerType:r,placeholder:n})=>{let i=ce(),[a,l]=bS(e),[s,c]=se(zt);np(()=>{l(e)},[e]);let d=fS(b=>{let x=b.toLowerCase(),w=Ab(x);w&&o(w),l(x)},[o]),m=Mb(null),p=Mb(null);np(()=>{m.current&&m.current.focus()},[s]);let[u,f]=se(Qo);return np(()=>()=>{f(null)},[f]),Lb("div",{className:"color-picker__input-label",children:[xs("div",{className:"color-picker__input-hash",children:"#"}),xs("input",{ref:s==="hex"?m:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":t,onChange:b=>{d(b.target.value)},value:(a||"").replace(/^#/,""),onBlur:()=>{l(e)},tabIndex:-1,onFocus:()=>c("hex"),onKeyDown:b=>{b.key!==ip.TAB&&(b.key===ip.ESCAPE&&p.current?.focus(),b.stopPropagation())},placeholder:n}),!i.editor.isMobile&&Lb(ES,{children:[xs("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),xs("div",{ref:p,className:gS("excalidraw-eye-dropper-trigger",{selected:u}),onClick:()=>f(b=>b?null:{keepOpenOnAlt:!1,onSelect:x=>o(x),colorPickerType:r}),title:`${g("labels.eyeDropper")} \u2014 ${ip.I.toLocaleUpperCase()} or ${xS("Alt")} `,children:Y0})]})]})};import cp,{useEffect as dp,useImperativeHandle as OS,useState as zS}from"react";import{EVENT as Fb}from"@excalidraw/common";import{DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX as HS,DEFAULT_ELEMENT_STROKE_COLOR_INDEX as GS,KEYS as US}from"@excalidraw/common";import vS from"clsx";import{useEffect as TS,useRef as IS}from"react";import{jsxs as wS}from"react/jsx-runtime";var yS=({color:e,keyLabel:o,isShade:t=!1})=>wS("div",{className:"color-picker__button__hotkey-label",style:{color:Gn(e)?"#fff":"#000"},children:[t&&"\u21E7",o]}),Un=yS;import{jsx as ap,jsxs as CS}from"react/jsx-runtime";var Db=({colors:e,color:o,onChange:t,label:r})=>{let[n,i]=se(zt),a=IS(null);return TS(()=>{a.current&&a.current.focus()},[o,n]),ap("div",{className:"color-picker-content--default",children:e.map((l,s)=>CS("button",{ref:o===l?a:void 0,tabIndex:-1,type:"button",className:vS("color-picker__button color-picker__button--large has-outline",{active:o===l,"is-transparent":l==="transparent"||!l}),onClick:()=>{t(l),i("custom")},title:l,"aria-label":r,style:{"--swatch-color":l},children:[ap("div",{className:"color-picker__button-outline"}),ap(Un,{color:l,keyLabel:s+1})]},s))})};import SS from"clsx";import{useEffect as kS,useRef as MS}from"react";import{jsx as lp,jsxs as PS}from"react/jsx-runtime";var LS=({palette:e,color:o,onChange:t,activeShade:r})=>{let n=tr({color:o,palette:e}),[i,a]=se(zt),l=MS(null);return kS(()=>{l.current&&i==="baseColors"&&l.current.focus()},[n?.colorName,i]),lp("div",{className:"color-picker-content--default",children:Object.entries(e).map(([s,c],d)=>{let m=(Array.isArray(c)?c[r]:c)||"transparent",p=pa[d],u=g(`colors.${s.replace(/\d+/,"")}`,null,"");return PS("button",{ref:n?.colorName===s?l:void 0,tabIndex:-1,type:"button",className:SS("color-picker__button color-picker__button--large has-outline",{active:n?.colorName===s,"is-transparent":m==="transparent"||!m}),onClick:()=>{t(m),a("baseColors")},title:`${u}${m.startsWith("#")?` ${m}`:""} \u2014 ${p}`,"aria-label":`${u} \u2014 ${p}`,style:m?{"--swatch-color":m}:void 0,"data-testid":`color-${s}`,children:[lp("div",{className:"color-picker__button-outline"}),lp(Un,{color:m,keyLabel:p})]},s)})})},_b=LS;import{jsx as DS}from"react/jsx-runtime";var AS=({children:e})=>DS("div",{className:"color-picker__heading",children:e}),Yn=AS;import _S from"clsx";import{useEffect as RS,useRef as NS}from"react";import{jsx as ua,jsxs as Rb}from"react/jsx-runtime";var Nb=({color:e,onChange:o,palette:t})=>{let r=tr({color:e||"transparent",palette:t}),[n,i]=se(zt),a=NS(null);if(RS(()=>{a.current&&n==="shades"&&a.current.focus()},[r,n]),r){let{colorName:l,shade:s}=r,c=t[l];if(Array.isArray(c))return ua("div",{className:"color-picker-content--default shades",children:c.map((d,m)=>Rb("button",{ref:m===s&&n==="shades"?a:void 0,tabIndex:-1,type:"button",className:_S("color-picker__button color-picker__button--large has-outline",{active:m===s}),"aria-label":"Shade",title:`${l} - ${m+1}`,style:d?{"--swatch-color":d}:void 0,onClick:()=>{o(d),i("shades")},children:[ua("div",{className:"color-picker__button-outline"}),ua(Un,{color:d,keyLabel:m+1,isShade:!0})]},m))})}return Rb("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[ua("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),ua("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:g("colorPicker.noShades")})]})};import{COLORS_PER_ROW as Wn,COLOR_PALETTE as BS,KEYS as ha}from"@excalidraw/common";var sp=(e,o,t)=>{let r=Math.ceil(t/Wn);switch(o=o??-1,e){case"ArrowLeft":{let n=o-1;return n<0?t-1:n}case"ArrowRight":return(o+1)%t;case"ArrowDown":{let n=o+Wn;return n>=t?o%Wn:n}case"ArrowUp":{let n=o-Wn,i=n<0?Wn*r+n:n;return i>=t?void 0:i}}},FS=({e,colorObj:o,onChange:t,palette:r,customColors:n,setActiveColorPickerSection:i,activeShade:a})=>{if(o?.shade!=null&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(e.code)&&e.shiftKey){let l=Number(e.code.slice(-1))-1;return t(r[o.colorName][l]),i("shades"),!0}if(["1","2","3","4","5"].includes(e.key)&&n[Number(e.key)-1])return t(n[Number(e.key)-1]),i("custom"),!0;if(pa.includes(e.key)){let l=pa.indexOf(e.key),s=Object.keys(r)[l],c=r[s],d=Array.isArray(c)?c[a]:c;return t(d),i("baseColors"),!0}return!1},Bb=({event:e,activeColorPickerSection:o,palette:t,color:r,onChange:n,customColors:i,setActiveColorPickerSection:a,updateData:l,activeShade:s,onEyeDropperToggle:c,onEscape:d})=>{if(e[ha.CTRL_OR_CMD])return!1;if(e.key===ha.ESCAPE)return d(e),!0;if(e.key===ha.ALT)return c(!0),!0;if(e.key===ha.I)return c(),!0;let m=tr({color:r,palette:t});if(e.key===ha.TAB){let p={custom:!!i.length,baseColors:!0,shades:m?.shade!=null,hex:!0},u=Object.entries(p).reduce((E,[y,v])=>(v&&E.push(y),E),[]),f=u.indexOf(o),b=e.shiftKey?-1:1,x=f+b>u.length-1?0:f+b<0?u.length-1:f+b,w=u[x];return w&&a(w),w==="custom"?n(i[0]):w==="baseColors"&&(Object.entries(t).find(([y,v])=>Array.isArray(v)?v.includes(r):v===r?y:null)||n(BS.black)),e.preventDefault(),e.stopPropagation(),!0}if(FS({e,colorObj:m,onChange:n,palette:t,customColors:i,setActiveColorPickerSection:a,activeShade:s}))return!0;if(o==="shades"&&m){let{shade:p}=m,u=sp(e.key,p,Wn);if(u!==void 0)return n(t[m.colorName][u]),!0}if(o==="baseColors"&&m){let{colorName:p}=m,u=Object.keys(t),f=u.indexOf(p),b=sp(e.key,f,u.length);if(b!==void 0){let x=u[b],w=t[x];return n(Array.isArray(w)?w[s]:w),!0}}if(o==="custom"){let p=r!=null?i.indexOf(r):0,u=sp(e.key,p,i.length);if(u!==void 0){let f=i[u];return n(f),!0}}return!1};import{jsx as Ur,jsxs as Es}from"react/jsx-runtime";var Ob=cp.forwardRef(({color:e,onChange:o,type:t,elements:r,palette:n,updateData:i,children:a,onEyeDropperToggle:l,onEscape:s},c)=>{let[d]=cp.useState(()=>t==="canvasBackground"?[]:kb(r,t,n)),[m,p]=se(zt),u=tr({color:e,palette:n});dp(()=>{if(!m){let w=!!e&&rp({color:e,palette:n}),E=w&&!d.includes(e);p(E?null:w?"custom":u?.shade!=null?"shades":"baseColors")}},[m,e,n,p,u,d]);let[f,b]=zS(u?.shade??(t==="elementBackground"?HS:GS));dp(()=>{u?.shade!=null&&b(u.shade);let w=E=>{E.key===US.ALT&&l(!1)};return document.addEventListener(Fb.KEYUP,w,{capture:!0}),()=>{document.removeEventListener(Fb.KEYUP,w,{capture:!0})}},[u,l]);let x=cp.useRef(null);return OS(c,()=>x.current),dp(()=>{x?.current?.focus()},[]),Ur("div",{role:"dialog","aria-modal":"true","aria-label":g("labels.colorPicker"),children:Es("div",{ref:x,onKeyDown:w=>{Bb({event:w,activeColorPickerSection:m,palette:n,color:e,onChange:o,onEyeDropperToggle:l,customColors:d,setActiveColorPickerSection:p,updateData:i,activeShade:f,onEscape:s})&&(w.preventDefault(),w.stopPropagation())},className:"color-picker-content properties-content",tabIndex:-1,children:[!!d.length&&Es("div",{children:[Ur(Yn,{children:g("colorPicker.mostUsedCustomColors")}),Ur(Db,{colors:d,color:e,label:g("colorPicker.mostUsedCustomColors"),onChange:o})]}),Es("div",{children:[Ur(Yn,{children:g("colorPicker.colors")}),Ur(_b,{color:e,palette:n,onChange:o,activeShade:f})]}),Es("div",{children:[Ur(Yn,{children:g("colorPicker.shades")}),Ur(Nb,{color:e,onChange:o,palette:n})]}),a]})})});import YS from"clsx";import{COLOR_OUTLINE_CONTRAST_THRESHOLD as WS,DEFAULT_CANVAS_BACKGROUND_PICKS as VS,DEFAULT_ELEMENT_BACKGROUND_PICKS as XS,DEFAULT_ELEMENT_STROKE_PICKS as KS}from"@excalidraw/common";import{jsx as mp}from"react/jsx-runtime";var zb=({onChange:e,type:o,activeColor:t,topPicks:r})=>{let n;return o==="elementStroke"&&(n=KS),o==="elementBackground"&&(n=XS),o==="canvasBackground"&&(n=VS),r&&(n=r),n?mp("div",{className:"color-picker__top-picks",children:n.map(i=>mp("button",{className:YS("color-picker__button",{active:i===t,"is-transparent":i==="transparent"||!i,"has-outline":!Gn(i,WS)}),style:{"--swatch-color":i},type:"button",title:i,onClick:()=>e(i),"data-testid":`color-top-pick-${i}`,children:mp("div",{className:"color-picker__button-outline"})},i))}):(console.error("Invalid type for TopPicks"),null)};import{jsx as Qt,jsxs as pp}from"react/jsx-runtime";var Hb=e=>{let o=new Option().style;return o.color=e,!!o.color},Ab=e=>qS(e)?e:Hb(`#${e}`)?`#${e}`:Hb(e)?e:null,JS=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=Gb,updateData:a})=>{let{container:l}=ze(),[,s]=se(zt),[c,d]=se(Qo),m=pp("div",{children:[Qt(Yn,{children:g("colorPicker.hexCode")}),Qt(Pb,{color:o||"",label:r,onChange:f=>{t(f)},colorPickerType:e,placeholder:g("colorPicker.color")})]}),p=$S(null),u=()=>{p.current?.focus()};return Qt(bs,{container:l,style:{maxWidth:"13rem"},onFocusOutside:f=>{u(),f.preventDefault()},onPointerDownOutside:f=>{c&&f.preventDefault()},onClose:()=>{a({openPopup:null}),s(null)},children:i?Qt(Ob,{ref:p,palette:i,color:o,onChange:f=>{t(f)},onEyeDropperToggle:f=>{d(b=>f?(b=b||{keepOpenOnAlt:!0,onSelect:t,colorPickerType:e},b.keepOpenOnAlt=!0,b):f===!1||b?null:{keepOpenOnAlt:!1,onSelect:t,colorPickerType:e})},onEscape:f=>{c?d(null):a({openPopup:null})},type:e,elements:n,updateData:a,children:m}):m})},QS=({label:e,color:o,type:t})=>Qt(ys.Trigger,{type:"button",className:ZS("color-picker__button active-color properties-trigger",{"is-transparent":!o||o==="transparent","has-outline":!o||!Gn(o,jS)}),"aria-label":e,style:o?{"--swatch-color":o}:void 0,title:t==="elementStroke"?g("labels.showStroke"):g("labels.showBackground"),children:Qt("div",{className:"color-picker__button-outline",children:!o&&K1})}),ga=({type:e,color:o,onChange:t,label:r,elements:n,palette:i=Gb,topPicks:a,updateData:l,appState:s})=>Qt("div",{children:pp("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[Qt(zb,{activeColor:o,onChange:t,type:e,topPicks:a}),Qt(hs,{}),pp(ys.Root,{open:s.openPopup===e,onOpenChange:c=>{l({openPopup:c?e:null})},children:[Qt(QS,{color:o,label:r,type:e}),s.openPopup===e&&Qt(JS,{type:e,color:o,onChange:t,label:r,elements:n,palette:i,updateData:l})]})]})});import*as qb from"@radix-ui/react-popover";import L4,{useCallback as P4,useMemo as A4}from"react";import{FONT_FAMILY as bp}from"@excalidraw/common";import E4,{useMemo as or,useState as y4,useRef as w4,useEffect as v4,useCallback as T4}from"react";import{arrayToList as I4,debounce as C4,FONT_FAMILY as Yr,getFontFamilyString as S4}from"@excalidraw/common";import e4 from"clsx";import t4 from"react";import{jsx as o4,jsxs as r4}from"react/jsx-runtime";var ws=t4.forwardRef(({className:e,placeholder:o,onChange:t},r)=>r4("div",{className:e4("QuickSearch__wrapper",e),children:[At,o4("input",{ref:r,className:"QuickSearch__input",type:"text",placeholder:o,onChange:n=>t(n.target.value.trim().toLowerCase())})]}));import n4 from"clsx";import{Children as i4}from"react";import{jsx as Ub}from"react/jsx-runtime";var vs=({className:e,placeholder:o,children:t})=>{let r=!i4.count(t);return Ub("div",{className:n4("ScrollableList__wrapper",e),role:"menu",children:r?Ub("div",{className:"empty",children:o}):t})};import{jsx as a4,jsxs as l4}from"react/jsx-runtime";var Yb=({children:e,className:o="",style:t,title:r})=>l4("div",{className:`dropdown-menu-group ${o}`,style:t,children:[r&&a4("p",{className:"dropdown-menu-group-title",children:r}),e]}),fa=Yb;Yb.displayName="DropdownMenuGroup";import{useEffect as f4,useRef as b4}from"react";import{THEME as x4}from"@excalidraw/common";import{jsx as s4}from"react/jsx-runtime";var ba=({children:e,...o})=>s4("span",{...o,style:{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",...o.style},children:e});import{Fragment as d4,jsx as Ts,jsxs as m4}from"react/jsx-runtime";var c4=({textStyle:e,icon:o,shortcut:t,children:r})=>{let n=ce();return m4(d4,{children:[o&&Ts("div",{className:"dropdown-menu-item__icon",children:o}),Ts("div",{style:e,className:"dropdown-menu-item__text",children:Ts(ba,{children:r})}),t&&!n.editor.isMobile&&Ts("div",{className:"dropdown-menu-item__shortcut",children:t})]})},Is=c4;import p4,{useContext as u4}from"react";import{EVENT as h4,composeEventHandlers as g4}from"@excalidraw/common";var up=p4.createContext({}),Cs=(e="",o=!1,t=!1)=>`dropdown-menu-item dropdown-menu-item-base ${e}
|
|
2
2
|
${o?"dropdown-menu-item--selected":""} ${t?"dropdown-menu-item--hovered":""}`.trim(),Ss=(e,o)=>{let t=u4(up);return g4(e,r=>{let n=new CustomEvent(h4.MENU_ITEM_SELECT,{bubbles:!0,cancelable:!0});o?.(n),n.defaultPrevented||t.onSelect?.(n)})};import{jsx as hp}from"react/jsx-runtime";var gp=({icon:e,value:o,order:t,children:r,shortcut:n,className:i,hovered:a,selected:l,textStyle:s,onSelect:c,onClick:d,...m})=>{let p=Ss(d,c),u=b4(null);return f4(()=>{a&&(t===0?u.current?.scrollIntoView({block:"end"}):u.current?.scrollIntoView({block:"nearest"}))},[a,t]),hp("button",{...m,ref:u,value:o,onClick:p,className:Cs(i,l,a),title:m.title??m["aria-label"],children:hp(Is,{textStyle:s,icon:e,shortcut:n,children:r})})};gp.displayName="DropdownMenuItem";var Vn={GREEN:"green",RED:"red",BLUE:"blue"},ks=({type:e=Vn.BLUE,children:o})=>{let{theme:t}=go(),r={display:"inline-flex",marginLeft:"auto",padding:"2px 4px",borderRadius:6,fontSize:9,fontFamily:"Cascadia, monospace",border:t===x4.LIGHT?"1.5px solid white":"none"};switch(e){case Vn.GREEN:Object.assign(r,{backgroundColor:"var(--background-color-badge)",color:"var(--color-badge)"});break;case Vn.RED:Object.assign(r,{backgroundColor:"pink",color:"darkred"});break;case Vn.BLUE:default:Object.assign(r,{background:"var(--color-promo)",color:"var(--color-surface-lowest)"})}return hp("div",{className:"DropDownMenuItemBadge",style:r,children:o})};ks.displayName="DropdownMenuItemBadge";gp.Badge=ks;var yt=gp;import{KEYS as Xn}from"@excalidraw/common";var Wb=({event:e,inputRef:o,hoveredFont:t,filteredFonts:r,onClose:n,onSelect:i,onHover:a})=>{if(!e[Xn.CTRL_OR_CMD]&&e.shiftKey&&e.key.toLowerCase()===Xn.F)return o.current?.focus(),!0;if(e.key===Xn.ESCAPE)return n(),!0;if(e.key===Xn.ENTER)return t?.value&&i(t.value),!0;if(e.key===Xn.ARROW_DOWN)return t?.next?a(t.next.value):r[0]?.value&&a(r[0].value),!0;if(e.key===Xn.ARROW_UP)return t?.prev?a(t.prev.value):r[r.length-1]?.value&&a(r[r.length-1].value),!0};import{jsx as xa,jsxs as Vb}from"react/jsx-runtime";var k4=e=>{switch(e){case Yr.Excalifont:case Yr.Virgil:return jo;case Yr.Nunito:case Yr.Helvetica:return aa;case Yr["Lilita One"]:return A0;case Yr["Comic Shanns"]:case Yr.Cascadia:return Jl;default:return aa}},Xb=E4.memo(({selectedFontFamily:e,hoveredFontFamily:o,onSelect:t,onHover:r,onLeave:n,onOpen:i,onClose:a})=>{let{container:l}=ze(),{fonts:s}=Re(),{showDeprecatedFonts:c}=fo(),[d,m]=y4(""),p=w4(null),u=or(()=>Array.from(Zo.registered.entries()).filter(([k,{metadata:A}])=>!A.private&&!A.fallback).map(([k,{metadata:A,fontFaces:P}])=>{let B={value:k,icon:k4(k),text:P[0]?.fontFace?.family??"Unknown"};return A.deprecated&&Object.assign(B,{deprecated:A.deprecated,badge:{type:Vn.RED,placeholder:g("fontList.badge.old")}}),B}).sort((k,A)=>k.text.toLowerCase()>A.text.toLowerCase()?1:-1),[]),f=or(()=>new Set(s.getSceneFamilies()),[e]),b=or(()=>u.filter(k=>f.has(k.value)),[u,f]),x=or(()=>u.filter(k=>!f.has(k.value)&&(c||!k.deprecated)),[u,f,c]),w=or(()=>I4([...b,...x].filter(k=>k.text?.toLowerCase().includes(d))),[b,x,d]),E=or(()=>{let k;return o?k=w.find(A=>A.value===o):e&&(k=w.find(A=>A.value===e)),!k&&d&&(w[0]?.value?r(w[0].value):n()),k},[o,e,d,w,r,n]),y=T4(k=>{Wb({event:k,inputRef:p,hoveredFont:E,filteredFonts:w,onSelect:t,onHover:r,onClose:a})&&(k.preventDefault(),k.stopPropagation())},[E,w,t,r,a]);v4(()=>(i(),()=>{a()}),[]);let v=or(()=>w.filter(k=>f.has(k.value)),[w,f]),C=or(()=>w.filter(k=>!f.has(k.value)),[w,f]),S=(k,A)=>Vb(yt,{icon:k.icon,value:k.value,order:A,textStyle:{fontFamily:S4({fontFamily:k.value})},hovered:k.value===E?.value,selected:k.value===e,tabIndex:k.value===e?0:-1,onClick:P=>{t(Number(P.currentTarget.value))},onMouseMove:()=>{E?.value!==k.value&&r(k.value)},children:[k.text,k.badge&&xa(ks,{type:k.badge.type,children:k.badge.placeholder})]},k.value),L=[];return v.length&&L.push(xa(fa,{title:g("fontList.sceneFonts"),children:v.map(S)},"group_1")),C.length&&L.push(xa(fa,{title:g("fontList.availableFonts"),children:C.map((k,A)=>S(k,A+v.length))},"group_2")),Vb(bs,{className:"properties-content",container:l,style:{width:"15rem"},onClose:a,onPointerLeave:n,onKeyDown:y,children:[xa(ws,{ref:p,placeholder:g("quickSearch.placeholder"),onChange:C4(m,20)}),xa(vs,{className:"dropdown-menu fonts manual-hover",placeholder:g("fontList.empty"),children:L.length?L:null})]})},(e,o)=>e.selectedFontFamily===o.selectedFontFamily&&e.hoveredFontFamily===o.hoveredFontFamily);import*as Kb from"@radix-ui/react-popover";import{useMemo as M4}from"react";import{jsx as fp}from"react/jsx-runtime";var Zb=({selectedFontFamily:e})=>{let o=M4(()=>!!(e&&!$b(e)),[e]);return fp(Kb.Trigger,{asChild:!0,children:fp("div",{children:fp(On,{standalone:!0,icon:Ln,title:g("labels.showFonts"),className:"properties-trigger",testId:"font-family-show-fonts",active:o,onClick:()=>{}})})})};import{jsx as Ea,jsxs as jb}from"react/jsx-runtime";var Jb=[{value:bp.Excalifont,icon:jo,text:g("labels.handDrawn"),testId:"font-family-hand-drawn"},{value:bp.Nunito,icon:aa,text:g("labels.normal"),testId:"font-family-normal"},{value:bp["Comic Shanns"],icon:Jl,text:g("labels.code"),testId:"font-family-code"}],D4=new Set(Jb.map(e=>e.value)),$b=e=>e?D4.has(e):!1,Qb=L4.memo(({isOpened:e,selectedFontFamily:o,hoveredFontFamily:t,onSelect:r,onHover:n,onLeave:i,onPopupChange:a})=>{let l=A4(()=>Jb,[]),s=P4(c=>{c&&r(c)},[r]);return jb("div",{role:"dialog","aria-modal":"true",className:"FontPicker__container",children:[Ea("div",{className:"buttonList",children:Ea(Ot,{type:"button",options:l,value:o,onClick:s})}),Ea(hs,{}),jb(qb.Root,{open:e,onOpenChange:a,children:[Ea(Zb,{selectedFontFamily:o}),e&&Ea(Xb,{selectedFontFamily:o,hoveredFontFamily:t,onSelect:s,onHover:n,onLeave:i,onOpen:()=>a(!0),onClose:()=>a(!1)})]})]})},(e,o)=>e.isOpened===o.isOpened&&e.selectedFontFamily===o.selectedFontFamily&&e.hoveredFontFamily===o.hoveredFontFamily);import*as Kn from"@radix-ui/react-popover";import B4 from"clsx";import Ms,{useEffect as F4}from"react";import{isArrowKey as O4,KEYS as _o}from"@excalidraw/common";import{jsx as _4}from"react/jsx-runtime";var rr=({icon:e})=>_4("span",{style:{width:"1em",margin:"0 0.5ex 0 0.5ex",display:"inline-block",lineHeight:0,verticalAlign:"middle",flex:"0 0 auto"},children:e});import{Fragment as N4,jsx as ex,jsxs as tx}from"react/jsx-runtime";var R4=({label:e,open:o,openTrigger:t,children:r,className:n,showCollapsedIcon:i=!0})=>tx(N4,{children:[tx("div",{style:{cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center"},className:n,onClick:t,children:[e,i&&ex(rr,{icon:o?db:is})]}),o&&ex("div",{style:{display:"flex",flexDirection:"column"},children:r})]}),ya=R4;import{jsx as Wr,jsxs as xp}from"react/jsx-runtime";var z4=he(!1);function H4({options:e,value:o,label:t,onChange:r,onClose:n,numberOfOptionsToAlwaysShow:i=e.length}){let a=ce(),l=u=>{let f=e.find(b=>b.keyBinding===u.key.toLowerCase());if(!(u.metaKey||u.altKey||u.ctrlKey)&&f)r(f.value),u.preventDefault();else if(u.key===_o.TAB){let b=e.findIndex(w=>w.value===o),x=u.shiftKey?(e.length+b-1)%e.length:(b+1)%e.length;r(e[x].value)}else if(O4(u.key)){let b=Po().rtl,x=e.findIndex(w=>w.value===o);if(x!==-1){let w=e.length,E=x;switch(u.key){case(b?_o.ARROW_LEFT:_o.ARROW_RIGHT):E=(x+1)%w;break;case(b?_o.ARROW_RIGHT:_o.ARROW_LEFT):E=(w+x-1)%w;break;case _o.ARROW_DOWN:{E=(x+(i??1))%w;break}case _o.ARROW_UP:{E=(w+x-(i??1))%w;break}}r(e[E].value)}u.preventDefault()}else(u.key===_o.ESCAPE||u.key===_o.ENTER)&&(u.preventDefault(),n());u.nativeEvent.stopImmediatePropagation(),u.stopPropagation()},[s,c]=se(z4),d=Ms.useMemo(()=>e.slice(0,i),[e,i]),m=Ms.useMemo(()=>e.slice(i),[e,i]);F4(()=>{d.some(u=>u.value===o)||c(!0)},[o,d,c]);let p=u=>Wr("div",{className:"picker-content",children:u.map((f,b)=>xp("button",{type:"button",className:B4("picker-option",{active:o===f.value}),onClick:x=>{r(f.value)},title:`${f.text} ${f.keyBinding&&`\u2014 ${f.keyBinding.toUpperCase()}`}`,"aria-label":f.text||"none","aria-keyshortcuts":f.keyBinding||void 0,ref:x=>{o===f.value&&setTimeout(()=>{x?.focus()},0)},children:[f.icon,f.keyBinding&&Wr("span",{className:"picker-keybinding",children:f.keyBinding})]},f.text))});return Wr(Kn.Content,{side:a.editor.isMobile&&!a.viewport.isLandscape?"top":"bottom",align:"start",sideOffset:12,style:{zIndex:"var(--zIndex-popup)"},onKeyDown:l,children:xp("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":t,children:[p(d),m.length>0&&Wr(ya,{label:g("labels.more_options"),open:s,openTrigger:()=>{c(u=>!u)},className:"picker-collapsible",children:p(m)})]})})}function Ep({value:e,label:o,options:t,onChange:r,group:n="",numberOfOptionsToAlwaysShow:i}){let[a,l]=Ms.useState(!1),s=Ms.useRef(null);return Wr("div",{children:xp(Kn.Root,{open:a,onOpenChange:c=>l(c),children:[Wr(Kn.Trigger,{name:n,type:"button","aria-label":o,onClick:()=>l(!a),ref:s,className:a?"active":"",children:t.find(c=>c.value===e)?.icon}),a&&Wr(H4,{options:t,value:e,label:o,onChange:r,onClose:()=>{l(!1)},numberOfOptionsToAlwaysShow:i})]})})}import ox,{useEffect as G4}from"react";import{jsx as yp,jsxs as rx}from"react/jsx-runtime";var nx=({updateData:e,app:o,testId:t})=>{let r=ox.useRef(null),n=ox.useRef(null),i=o.scene.getSelectedElements(o.state),a=!0,l=i.at(0),c=i.reduce((d,m)=>(d!=null&&d!==m.opacity&&(a=!1),d==null||d>m.opacity?m.opacity:d),l?.opacity??null)??o.state.currentItemOpacity;return G4(()=>{if(r.current&&n.current){let d=r.current,m=n.current,p=d.offsetWidth,u=15,f=c/100*(p-u)+u/2;m.style.left=`${f}px`,d.style.background=`linear-gradient(to right, var(--color-slider-track) 0%, var(--color-slider-track) ${c}%, var(--button-bg) ${c}%, var(--button-bg) 100%)`}},[c]),rx("label",{className:"control-label",children:[g("labels.opacity"),rx("div",{className:"range-wrapper",children:[yp("input",{style:{"--color-slider-track":a?void 0:"var(--button-bg)"},ref:r,type:"range",min:"0",max:"100",step:"10",onChange:d=>{e(+d.target.value)},value:c,className:"range-input","data-testid":t}),yp("div",{className:"value-bubble",ref:n,children:c!==0?c:null}),yp("div",{className:"zero-label",children:"0"})]})]})};import{Fragment as px,jsx as Q,jsxs as Tt}from"react/jsx-runtime";var mx=.1,pt=(e,o,t,r=!1)=>{let n=Sp($(e,o,{includeBoundTextElement:r}));return e.map(i=>n.get(i.id)||i.id===o.editingTextElement?.id?t(i):i)},vt=function(e,o,t,r,n){let i=o.state.editingTextElement,a=cx(e),l=null;if(i&&(l=t(i)),!l)if(Ee(a,o.state)){let c=o.scene.getSelectedElements(o.state),d=r===!0?c:c.filter(m=>r(m));l=r6(d,t)??(typeof n=="function"?n(!0):n)}else l=typeof n=="function"?n(!1):n;return l},m6=(e,o,t)=>a6(o)||!o.autoResize?o:t.mutateElement(o,{x:e.textAlign==="left"?e.x:e.x+(e.width-o.width)/(e.textAlign==="center"?2:1),y:e.y+(e.height-o.height)/2}),kp=(e,o,t,r,n)=>{let i=new Set,a=pt(e,o,l=>{if(wt(l)){let s=r(l);i.add(s);let c=Ve(l,{fontSize:s});return wa(c,t.scene.getContainerElement(l),t.scene),c=m6(l,c,t.scene),c}return l},!0);return $(e,o,{includeBoundTextElement:!0}).forEach(l=>{wt(l)&&i6(l,t.scene)}),{elements:a,appState:{...o,currentItemFontSize:i.size===1?[...i][0]:n??o.currentItemFontSize},captureUpdate:Xe.IMMEDIATELY}},p6=N({name:"changeStrokeColor",label:"labels.stroke",trackEvent:!1,perform:(e,o,t)=>({...t.currentItemStrokeColor&&{elements:pt(e,o,r=>s6(r.type)?Ve(r,{strokeColor:t.currentItemStrokeColor}):r,!0)},appState:{...o,...t},captureUpdate:t.currentItemStrokeColor?Xe.IMMEDIATELY:Xe.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Tt(px,{children:[Q("h3",{"aria-hidden":"true",children:g("labels.stroke")}),Q(ga,{topPicks:r.props.strokeColorTopPicks??Z4,palette:K4,type:"elementStroke",label:g("labels.stroke"),color:vt(e,r,n=>n.strokeColor,!0,n=>n?null:o.currentItemStrokeColor),onChange:n=>t({currentItemStrokeColor:n}),elements:e,appState:o,updateData:t})]})}),u6=N({name:"changeBackgroundColor",label:"labels.changeBackground",trackEvent:!1,perform:(e,o,t,r)=>{if(!t.currentItemBackgroundColor)return{appState:{...o,...t},captureUpdate:Xe.EVENTUALLY};let n,i=r.scene.getSelectedElements(o);if(!o6(t.currentItemBackgroundColor)&&i.every(l=>lx(l)&&n6(l.points))){let l=Sp(i);n=e.map(s=>l.has(s.id)&&lx(s)?Ve(s,{backgroundColor:t.currentItemBackgroundColor,...d6(s,!0)}):s)}else n=pt(e,o,l=>Ve(l,{backgroundColor:t.currentItemBackgroundColor}));return{elements:n,appState:{...o,...t},captureUpdate:Xe.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Tt(px,{children:[Q("h3",{"aria-hidden":"true",children:g("labels.background")}),Q(ga,{topPicks:r.props.backgroundColorTopPicks??X4,palette:V4,type:"elementBackground",label:g("labels.background"),color:vt(e,r,n=>n.backgroundColor,!0,n=>n?null:o.currentItemBackgroundColor),onChange:n=>t({currentItemBackgroundColor:n}),elements:e,appState:o,updateData:t})]})}),h6=N({name:"changeFillStyle",label:"labels.fill",trackEvent:!1,perform:(e,o,t,r)=>(re("element","changeFillStyle",`${t} (${r.device.editor.isMobile?"mobile":"desktop"})`),{elements:pt(e,o,n=>Ve(n,{fillStyle:t})),appState:{...o,currentItemFillStyle:t},captureUpdate:Xe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=$(e,o),i=n.length>0&&n.every(a=>a.fillStyle==="zigzag");return Tt("fieldset",{children:[Q("legend",{children:g("labels.fill")}),Q("div",{className:"buttonList",children:Q(Ot,{type:"button",options:[{value:"hachure",text:`${i?g("labels.zigzag"):g("labels.hachure")} (${e6("Alt-Click")})`,icon:i?o0:r0,active:i?!0:void 0,testId:"fill-hachure"},{value:"cross-hatch",text:g("labels.crossHatch"),icon:n0,testId:"fill-cross-hatch"},{value:"solid",text:g("labels.solid"),icon:i0,testId:"fill-solid"}],value:vt(e,r,a=>a.fillStyle,a=>a.hasOwnProperty("fillStyle"),a=>a?null:o.currentItemFillStyle),onClick:(a,l)=>{let s=l.altKey&&a==="hachure"&&n.every(c=>c.fillStyle==="hachure")?"zigzag":a;t(s)}})})]})}}),g6=N({name:"changeStrokeWidth",label:"labels.strokeWidth",trackEvent:!1,perform:(e,o,t)=>({elements:pt(e,o,r=>Ve(r,{strokeWidth:t})),appState:{...o,currentItemStrokeWidth:t},captureUpdate:Xe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Tt("fieldset",{children:[Q("legend",{children:g("labels.strokeWidth")}),Q("div",{className:"buttonList",children:Q(Ot,{group:"stroke-width",options:[{value:Tp.thin,text:g("labels.thin"),icon:Bm,testId:"strokeWidth-thin"},{value:Tp.bold,text:g("labels.bold"),icon:a0,testId:"strokeWidth-bold"},{value:Tp.extraBold,text:g("labels.extraBold"),icon:l0,testId:"strokeWidth-extraBold"}],value:vt(e,r,n=>n.strokeWidth,n=>n.hasOwnProperty("strokeWidth"),n=>n?null:o.currentItemStrokeWidth),onChange:n=>t(n)})})]})}),f6=N({name:"changeSloppiness",label:"labels.sloppiness",trackEvent:!1,perform:(e,o,t)=>({elements:pt(e,o,r=>Ve(r,{seed:J4(),roughness:t})),appState:{...o,currentItemRoughness:t},captureUpdate:Xe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Tt("fieldset",{children:[Q("legend",{children:g("labels.sloppiness")}),Q("div",{className:"buttonList",children:Q(Ot,{group:"sloppiness",options:[{value:0,text:g("labels.architect"),icon:d0},{value:1,text:g("labels.artist"),icon:m0},{value:2,text:g("labels.cartoonist"),icon:p0}],value:vt(e,r,n=>n.roughness,n=>n.hasOwnProperty("roughness"),n=>n?null:o.currentItemRoughness),onChange:n=>t(n)})})]})}),W$=N({name:"changeStrokeStyle",label:"labels.strokeStyle",trackEvent:!1,perform:(e,o,t)=>({elements:pt(e,o,r=>Ve(r,{strokeStyle:t})),appState:{...o,currentItemStrokeStyle:t},captureUpdate:Xe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Tt("fieldset",{children:[Q("legend",{children:g("labels.strokeStyle")}),Q("div",{className:"buttonList",children:Q(Ot,{group:"strokeStyle",options:[{value:"solid",text:g("labels.strokeStyle_solid"),icon:Bm},{value:"dashed",text:g("labels.strokeStyle_dashed"),icon:s0},{value:"dotted",text:g("labels.strokeStyle_dotted"),icon:c0}],value:vt(e,r,n=>n.strokeStyle,n=>n.hasOwnProperty("strokeStyle"),n=>n?null:o.currentItemStrokeStyle),onChange:n=>t(n)})})]})}),b6=N({name:"changeOpacity",label:"labels.opacity",trackEvent:!1,perform:(e,o,t)=>({elements:pt(e,o,r=>Ve(r,{opacity:t}),!0),appState:{...o,currentItemOpacity:t},captureUpdate:Xe.IMMEDIATELY}),PanelComponent:({app:e,updateData:o})=>Q(nx,{updateData:o,app:e,testId:"opacity"})}),x6=N({name:"changeFontSize",label:"labels.fontSize",trackEvent:!1,perform:(e,o,t,r)=>kp(e,o,r,()=>t,t),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Tt("fieldset",{children:[Q("legend",{children:g("labels.fontSize")}),Q("div",{className:"buttonList",children:Q(Ot,{group:"font-size",options:[{value:16,text:g("labels.small"),icon:k0,testId:"fontSize-small"},{value:20,text:g("labels.medium"),icon:M0,testId:"fontSize-medium"},{value:28,text:g("labels.large"),icon:L0,testId:"fontSize-large"},{value:36,text:g("labels.veryLarge"),icon:P0,testId:"fontSize-veryLarge"}],value:vt(e,r,n=>{if(wt(n))return n.fontSize;let i=nr(n,r.scene.getNonDeletedElementsMap());return i?i.fontSize:null},n=>wt(n)||nr(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:o.currentItemFontSize||j4),onChange:n=>t(n)})})]})}),Mp=N({name:"decreaseFontSize",label:"labels.decreaseFontSize",icon:Hr,trackEvent:!1,perform:(e,o,t,r)=>kp(e,o,r,n=>Math.round(1/(1+mx)*n.fontSize)),keyTest:e=>e[Zn.CTRL_OR_CMD]&&e.shiftKey&&(e.key===Zn.CHEVRON_LEFT||e.key===Zn.COMMA)}),Lp=N({name:"increaseFontSize",label:"labels.increaseFontSize",icon:Hr,trackEvent:!1,perform:(e,o,t,r)=>kp(e,o,r,n=>Math.round(n.fontSize*(1+mx))),keyTest:e=>e[Zn.CTRL_OR_CMD]&&e.shiftKey&&(e.key===Zn.CHEVRON_RIGHT||e.key===Zn.PERIOD)}),E6=N({name:"changeFontFamily",label:"labels.fontFamily",trackEvent:!1,perform:(e,o,t,r)=>{let{cachedElements:n,resetAll:i,resetContainers:a,...l}=t;if(i)return{elements:pt(e,o,b=>{let x=n?.get(b.id);return x?Ve(b,{...x}):b},!0),appState:{...o,...l},captureUpdate:Xe.NEVER};let{currentItemFontFamily:s,currentHoveredFontFamily:c}=t,d=Xe.EVENTUALLY,m,p=!1;if(s)m=s,d=Xe.IMMEDIATELY;else if(c){m=c,d=Xe.EVENTUALLY;let f=$(e,o,{includeBoundTextElement:!0}).filter(b=>wt(b));if(f.length>200)p=!0;else{let b=0,x=0;for(;b<f.length&&x<5e3;){let w=f[b];x+=w?.originalText.length||0,b++}x>5e3&&(p=!0)}}let u={appState:{...o,...l},captureUpdate:d};if(m&&!p){let f=new Map,b=new Set,x=!1,w=Array.from(Zo.loadedFontsCache.values()),E=Object.entries(q4).find(([C,S])=>S===m)?.[0];c&&E&&w.some(C=>C.startsWith(E))&&(x=!0),Object.assign(u,{elements:pt(e,o,C=>{if(wt(C)&&(C.fontFamily!==m||s)){let S=Ve(C,{fontFamily:m,lineHeight:t6(m)}),L=n?.get(C.containerId||"")||{},k=r.scene.getContainerElement(C);return a&&k&&L&&r.scene.mutateElement(k,{...L}),x||(b=new Set([...b,...Array.from(S.originalText)])),f.set(S,k),S}return C},!0)});let y=`10px ${Q4({fontFamily:m})}`,v=Array.from(b.values()).join();if(x||window.document.fonts.check(y,v))for(let[C,S]of f)wa(C,S,r.scene);else window.document.fonts.load(y,v).then(C=>{for(let[S,L]of f){let k=r.scene.getElement(S.id),A=L?r.scene.getElement(L.id):null;k&&wa(k,A,r.scene)}r.fonts.onLoaded(C)})}return u},PanelComponent:({elements:e,appState:o,app:t,updateData:r})=>{let n=vp(new Map),i=vp(null),[a,l]=W4({}),s=vp(!0),c=Y4(()=>{let d=(m,p)=>vt(m,t,u=>{if(wt(u))return u.fontFamily;let f=nr(u,p);return f?f.fontFamily:null},u=>wt(u)||nr(u,p)!==null,u=>u?null:o.currentItemFontFamily||$4);return a.openPopup==="fontFamily"&&o.openPopup==="fontFamily"?d(Array.from(n.current?.values()??[]),n.current):!a.openPopup&&o.openPopup!=="fontFamily"?d(e,t.scene.getNonDeletedElementsMap()):i.current},[a.openPopup,o,e,t]);return wp(()=>{i.current=c},[c]),wp(()=>{Object.keys(a).length&&(r(a),l({}))},[a]),wp(()=>(s.current=!1,()=>{s.current=!0}),[]),Tt("fieldset",{children:[Q("legend",{children:g("labels.fontFamily")}),Q(Qb,{isOpened:o.openPopup==="fontFamily",selectedFontFamily:c,hoveredFontFamily:o.currentHoveredFontFamily,onSelect:d=>{l({openPopup:null,currentHoveredFontFamily:null,currentItemFontFamily:d}),n.current.clear()},onHover:d=>{l({currentHoveredFontFamily:d,cachedElements:new Map(n.current),resetContainers:!0})},onLeave:()=>{l({currentHoveredFontFamily:null,cachedElements:new Map(n.current),resetAll:!0})},onPopupChange:d=>{if(d){n.current.clear();let{editingTextElement:m}=o;if(m?.type==="text"){let p=t.scene.getElement(m.id);n.current.set(m.id,Ve(p||m,{},!0))}else{let p=$(e,o,{includeBoundTextElement:!0});for(let u of p)n.current.set(u.id,Ve(u,{},!0))}l({openPopup:"fontFamily"})}else{let m={openPopup:null,currentHoveredFontFamily:null,cachedElements:new Map(n.current),resetAll:!0};s.current?r({...a,...m}):l(m),n.current.clear()}}})]})}}),y6=N({name:"changeTextAlign",label:"Change text alignment",trackEvent:!1,perform:(e,o,t,r)=>({elements:pt(e,o,n=>{if(wt(n)){let i=Ve(n,{textAlign:t});return wa(i,r.scene.getContainerElement(n),r.scene),i}return n},!0),appState:{...o,currentItemTextAlign:t},captureUpdate:Xe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=r.scene.getNonDeletedElementsMap();return Tt("fieldset",{children:[Q("legend",{children:g("labels.textAlign")}),Q("div",{className:"buttonList",children:Q(Ot,{group:"text-align",options:[{value:"left",text:g("labels.left"),icon:D0,testId:"align-left"},{value:"center",text:g("labels.center"),icon:_0,testId:"align-horizontal-center"},{value:"right",text:g("labels.right"),icon:R0,testId:"align-right"}],value:vt(e,r,i=>{if(wt(i))return i.textAlign;let a=nr(i,n);return a?a.textAlign:null},i=>wt(i)||nr(i,n)!==null,i=>i?null:o.currentItemTextAlign),onChange:i=>t(i)})})]})}}),w6=N({name:"changeVerticalAlign",label:"Change vertical alignment",trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:pt(e,o,n=>{if(wt(n)){let i=Ve(n,{verticalAlign:t});return wa(i,r.scene.getContainerElement(n),r.scene),i}return n},!0),appState:{...o},captureUpdate:Xe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Q("fieldset",{children:Q("div",{className:"buttonList",children:Q(Ot,{group:"text-align",options:[{value:Ls.TOP,text:g("labels.alignTop"),icon:Q(N0,{theme:o.theme}),testId:"align-top"},{value:Ls.MIDDLE,text:g("labels.centerVertically"),icon:Q(F0,{theme:o.theme}),testId:"align-middle"},{value:Ls.BOTTOM,text:g("labels.alignBottom"),icon:Q(B0,{theme:o.theme}),testId:"align-bottom"}],value:vt(e,r,n=>{if(wt(n)&&n.containerId)return n.verticalAlign;let i=nr(n,r.scene.getNonDeletedElementsMap());return i?i.verticalAlign:null},n=>wt(n)||nr(n,r.scene.getNonDeletedElementsMap())!==null,n=>n?null:Ls.MIDDLE),onChange:n=>t(n)})})})}),V$=N({name:"changeRoundness",label:"Change edge roundness",trackEvent:!1,perform:(e,o,t)=>({elements:pt(e,o,r=>dx(r)?r:Ve(r,{roundness:t==="round"?{type:l6(r.type)?Ps.ADAPTIVE_RADIUS:Ps.PROPORTIONAL_RADIUS}:null})),appState:{...o,currentItemRoundness:t},captureUpdate:Xe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r,renderAction:n})=>{let a=_l(cx(e),o).some(l=>l.roundness?.type===Ps.LEGACY);return Tt("fieldset",{children:[Q("legend",{children:g("labels.edges")}),Tt("div",{className:"buttonList",children:[Q(Ot,{group:"edges",options:[{value:"sharp",text:g("labels.sharp"),icon:u0},{value:"round",text:g("labels.round"),icon:h0}],value:vt(e,r,l=>a?null:l.roundness?"round":"sharp",l=>!As(l)&&l.hasOwnProperty("roundness"),l=>l?null:o.currentItemRoundness),onChange:l=>t(l)}),n("togglePolygon")]})]})}}),sx=e=>[{value:null,text:g("labels.arrowhead_none"),keyBinding:"q",icon:g0},{value:"arrow",text:g("labels.arrowhead_arrow"),keyBinding:"w",icon:Q(f0,{flip:e})},{value:"triangle",text:g("labels.arrowhead_triangle"),icon:Q(y0,{flip:e}),keyBinding:"e"},{value:"triangle_outline",text:g("labels.arrowhead_triangle_outline"),icon:Q(w0,{flip:e}),keyBinding:"r"},{value:"circle",text:g("labels.arrowhead_circle"),keyBinding:"a",icon:Q(b0,{flip:e})},{value:"circle_outline",text:g("labels.arrowhead_circle_outline"),keyBinding:"s",icon:Q(x0,{flip:e})},{value:"diamond",text:g("labels.arrowhead_diamond"),icon:Q(v0,{flip:e}),keyBinding:"d"},{value:"diamond_outline",text:g("labels.arrowhead_diamond_outline"),icon:Q(T0,{flip:e}),keyBinding:"f"},{value:"bar",text:g("labels.arrowhead_bar"),keyBinding:"z",icon:Q(E0,{flip:e})},{value:"crowfoot_one",text:g("labels.arrowhead_crowfoot_one"),icon:Q(C0,{flip:e}),keyBinding:"x"},{value:"crowfoot_many",text:g("labels.arrowhead_crowfoot_many"),icon:Q(I0,{flip:e}),keyBinding:"c"},{value:"crowfoot_one_or_many",text:g("labels.arrowhead_crowfoot_one_or_many"),icon:Q(S0,{flip:e}),keyBinding:"v"}],X$=N({name:"changeArrowhead",label:"Change arrowheads",trackEvent:!1,perform:(e,o,t)=>({elements:pt(e,o,r=>{if(Cp(r)){let{position:n,type:i}=t;if(n==="start")return Ve(r,{startArrowhead:i});if(n==="end")return Ve(r,{endArrowhead:i})}return r}),appState:{...o,[t.position==="start"?"currentItemStartArrowhead":"currentItemEndArrowhead"]:t.type},captureUpdate:Xe.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>{let n=Po().rtl;return Tt("fieldset",{children:[Q("legend",{children:g("labels.arrowheads")}),Tt("div",{className:"iconSelectList buttonList",children:[Q(Ep,{label:"arrowhead_start",options:sx(!n),value:vt(e,r,i=>Cp(i)&&gn(i.type)?i.startArrowhead:o.currentItemStartArrowhead,!0,o.currentItemStartArrowhead),onChange:i=>t({position:"start",type:i}),numberOfOptionsToAlwaysShow:4}),Q(Ep,{label:"arrowhead_end",group:"arrowheads",options:sx(!!n),value:vt(e,r,i=>Cp(i)&&gn(i.type)?i.endArrowhead:o.currentItemEndArrowhead,!0,o.currentItemEndArrowhead),onChange:i=>t({position:"end",type:i}),numberOfOptionsToAlwaysShow:4})]})]})}}),K$=N({name:"changeArrowType",label:"Change arrow types",trackEvent:!1,perform:(e,o,t,r)=>{let n=pt(e,o,l=>{if(!As(l))return l;let s=Ve(l,{roundness:t===Ro.round?{type:Ps.PROPORTIONAL_RADIUS}:null,elbowed:t===Ro.elbow,points:t===Ro.elbow||l.elbowed?[l.points[0],l.points[l.points.length-1]]:l.points});if(dx(s)){s.fixedSegments=null;let c=r.scene.getNonDeletedElementsMap();r.dismissLinearEditor();let d=Ip.getPointAtIndexGlobalCoordinates(s,0,c),m=Ip.getPointAtIndexGlobalCoordinates(s,-1,c),p=s.startBinding&&c.get(s.startBinding.elementId),u=s.endBinding&&c.get(s.endBinding.elementId),f=p&&s.startBinding?{...s.startBinding,...ax(s,p,"start",c)}:null,b=u&&s.endBinding?{...s.endBinding,...ax(s,u,"end",c)}:null;s={...s,startBinding:f,endBinding:b,...c6(s,c,{points:[d,m].map(x=>U4(x[0]-s.x,x[1]-s.y)),startBinding:f,endBinding:b,fixedSegments:null})}}else{let c=r.scene.getNonDeletedElementsMap();if(s.startBinding){let d=c.get(s.startBinding.elementId);d&&ix(s,d,"start",r.scene)}if(s.endBinding){let d=c.get(s.endBinding.elementId);d&&ix(s,d,"end",r.scene)}}return s}),i={...o,currentItemArrowType:t},a=o.selectedLinearElement?.elementId;if(a){let l=n.find(s=>s.id===a);l&&(i.selectedLinearElement=new Ip(l,Sp(e)))}return{elements:n,appState:i,captureUpdate:Xe.IMMEDIATELY}},PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Tt("fieldset",{children:[Q("legend",{children:g("labels.arrowtypes")}),Q("div",{className:"buttonList",children:Q(Ot,{group:"arrowtypes",options:[{value:Ro.sharp,text:g("labels.arrowtype_sharp"),icon:os,testId:"sharp-arrow"},{value:Ro.round,text:g("labels.arrowtype_round"),icon:ns,testId:"round-arrow"},{value:Ro.elbow,text:g("labels.arrowtype_elbowed"),icon:rs,testId:"elbow-arrow"}],value:vt(e,r,n=>As(n)?n.elbowed?Ro.elbow:n.roundness?Ro.round:Ro.sharp:null,n=>As(n),n=>n?null:o.currentItemArrowType),onChange:n=>t(n)})})]})});import{clamp as Rp,roundToStep as M6}from"@excalidraw/math";import{DEFAULT_CANVAS_BACKGROUND_PICKS as L6,CURSOR_TYPE as bx,MAX_ZOOM as xx,MIN_ZOOM as Ex,THEME as va,ZOOM_STEP as Np,getShortcutKey as yx,updateActiveTool as jn,CODES as xo,KEYS as Bo}from"@excalidraw/common";import{getNonDeletedElements as P6}from"@excalidraw/element";import{getCommonBounds as A6}from"@excalidraw/element";import{CaptureUpdateAction as Eo}from"@excalidraw/element";import{useEffect as v6}from"react";import{jsx as I6}from"react/jsx-runtime";var $n=()=>{let e=document.querySelector(".excalidraw-tooltip");if(e)return e;let o=document.createElement("div");return document.body.appendChild(o),o.classList.add("excalidraw-tooltip"),o},Pp=(e,o,t="bottom")=>{let r=e.getBoundingClientRect(),n=window.innerWidth,i=window.innerHeight,a=5,l=o.left+o.width/2-r.width/2;l<0?l=a:l+r.width>=n&&(l=n-r.width-a);let s;t==="bottom"?(s=o.top+o.height+a,s+r.height>=i&&(s=o.top-r.height-a)):(s=o.top-r.height-a,s<0&&(s=o.top+o.height+a)),Object.assign(e.style,{top:`${s}px`,left:`${l}px`})},T6=(e,o,t,r)=>{o.classList.add("excalidraw-tooltip--visible"),o.style.minWidth=r?"50ch":"10ch",o.style.maxWidth=r?"50ch":"15ch",o.textContent=t;let n=e.getBoundingClientRect();Pp(o,n)},it=({children:e,label:o,long:t=!1,style:r,disabled:n})=>(v6(()=>()=>$n().classList.remove("excalidraw-tooltip--visible"),[]),n?null:I6("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:i=>T6(i.currentTarget,$n(),o,t),onPointerLeave:()=>$n().classList.remove("excalidraw-tooltip--visible"),style:r,children:e}));import Ds from"open-color";import{CURSOR_TYPE as Ap,MIME_TYPES as Dp,THEME as hx}from"@excalidraw/common";var gx='<svg viewBox="0 0 24 24" stroke-width="1" width="28" height="28" xmlns="http://www.w3.org/2000/svg">',C6='<path d="M6.164 11.755a5.314 5.314 0 0 1-4.932-5.298 5.314 5.314 0 0 1 5.311-5.311 5.314 5.314 0 0 1 5.307 5.113l8.773 8.773a3.322 3.322 0 0 1 0 4.696l-.895.895a3.322 3.322 0 0 1-4.696 0l-8.868-8.868Z" style="fill:#fff"/>',fx='<path stroke="#1b1b1f" fill="#fff" d="m7.868 11.113 7.773 7.774a2.359 2.359 0 0 0 1.667.691 2.368 2.368 0 0 0 2.357-2.358c0-.625-.248-1.225-.69-1.667L11.201 7.78 9.558 9.469l-1.69 1.643v.001Zm10.273 3.606-3.333 3.333m-3.25-6.583 2 2m-7-7 3 3M3.664 3.625l1 1M2.529 6.922l1.407-.144m5.735-2.932-1.118.866M4.285 9.823l.758-1.194m1.863-6.207-.13 1.408"/>',S6=`data:${Dp.svg},${encodeURIComponent(`${gx}${fx}</svg>`)}`,k6=`data:${Dp.svg},${encodeURIComponent(`${gx}${C6}${fx}</svg>`)}`,Ht=e=>{e&&(e.style.cursor="")},xe=(e,o)=>{e&&(e.style.cursor=o)},bo,ux,_p=(e,o)=>{let r=()=>{let n=o===hx.DARK;bo=document.createElement("canvas"),bo.theme=o,bo.height=20,bo.width=20;let i=bo.getContext("2d");i.lineWidth=1,i.beginPath(),i.arc(bo.width/2,bo.height/2,5,0,2*Math.PI),i.fillStyle=n?Ds.black:Ds.white,i.fill(),i.strokeStyle=n?Ds.white:Ds.black,i.stroke(),ux=bo.toDataURL(Dp.svg)};(!bo||bo.theme!==o)&&r(),xe(e,`url(${ux}) ${20/2} ${20/2}, auto`)},Dt=(e,o)=>{if(e)if(o.activeTool.type==="selection")Ht(e);else if(qt(o))e.style.cursor=Ap.GRAB;else if(Et(o))_p(e,o.theme);else if(o.activeTool.type==="laser"){let t=o.theme===hx.LIGHT?S6:k6;e.style.cursor=`url(${t}), auto`}else["image","custom"].includes(o.activeTool.type)?o.activeTool.type!=="image"&&(e.style.cursor=Ap.AUTO):e.style.cursor=Ap.CROSSHAIR};var No=({viewportX:e,viewportY:o,nextZoom:t},r)=>{let n=e-r.offsetLeft,i=o-r.offsetTop,a=r.zoom.value,l=r.scrollX+(n-n/a),s=r.scrollY+(i-i/a),c=-(n-n/t),d=-(i-i/t);return{scrollX:l+c,scrollY:s+d,zoom:{value:t}}};import{jsx as Bs,jsxs as N6}from"react/jsx-runtime";var D6=N({name:"changeViewBackgroundColor",label:"labels.canvasBackground",trackEvent:!1,predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.changeViewBackgroundColor&&!o.viewModeEnabled,perform:(e,o,t)=>({appState:{...o,...t},captureUpdate:t.viewBackgroundColor?Eo.IMMEDIATELY:Eo.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t,appProps:r})=>Bs(ga,{palette:null,topPicks:L6,label:g("labels.canvasBackground"),type:"canvasBackground",color:o.viewBackgroundColor,onChange:n=>t({viewBackgroundColor:n}),"data-testid":"canvas-background-picker",elements:e,appState:o,updateData:t})}),_s=N({name:"zoomIn",label:"buttons.zoomIn",viewMode:!0,icon:ym,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>({appState:{...o,...No({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:uo(o.zoom.value+Np)},o),userToFollow:null},captureUpdate:Eo.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>Bs(W,{type:"button",className:"zoom-in-button zoom-button",icon:ym,title:`${g("buttons.zoomIn")} \u2014 ${yx("CtrlOrCmd++")}`,"aria-label":g("buttons.zoomIn"),disabled:o.zoom.value>=xx,onClick:()=>{e(null)}}),keyTest:e=>(e.code===xo.EQUAL||e.code===xo.NUM_ADD)&&(e[Bo.CTRL_OR_CMD]||e.shiftKey)}),Rs=N({name:"zoomOut",label:"buttons.zoomOut",icon:wm,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>({appState:{...o,...No({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:uo(o.zoom.value-Np)},o),userToFollow:null},captureUpdate:Eo.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>Bs(W,{type:"button",className:"zoom-out-button zoom-button",icon:wm,title:`${g("buttons.zoomOut")} \u2014 ${yx("CtrlOrCmd+-")}`,"aria-label":g("buttons.zoomOut"),disabled:o.zoom.value<=Ex,onClick:()=>{e(null)}}),keyTest:e=>(e.code===xo.MINUS||e.code===xo.NUM_SUBTRACT)&&(e[Bo.CTRL_OR_CMD]||e.shiftKey)}),Ns=N({name:"resetZoom",label:"buttons.resetZoom",icon:F1,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>({appState:{...o,...No({viewportX:o.width/2+o.offsetLeft,viewportY:o.height/2+o.offsetTop,nextZoom:uo(1)},o),userToFollow:null},captureUpdate:Eo.EVENTUALLY}),PanelComponent:({updateData:e,appState:o})=>Bs(it,{label:g("buttons.resetZoom"),style:{height:"100%"},children:N6(W,{type:"button",className:"reset-zoom-button zoom-button",title:g("buttons.resetZoom"),"aria-label":g("buttons.resetZoom"),onClick:()=>{e(null)},children:[(o.zoom.value*100).toFixed(0),"%"]})}),keyTest:e=>(e.code===xo.ZERO||e.code===xo.NUM_ZERO)&&(e[Bo.CTRL_OR_CMD]||e.shiftKey)}),_6=(e,o,t=1)=>{let[r,n,i,a]=e,l=i-r,s=o.width/l,c=a-n,d=o.height/c,p=Math.min(s,d)*Rp(t,.1,1);return Math.min(p,1)},wx=({bounds:e,appState:o,canvasOffsets:t,fitToViewport:r=!1,viewportZoomFactor:n=1,minZoom:i=-1/0,maxZoom:a=1/0})=>{n=Rp(n,Ex,xx);let[l,s,c,d]=e,m=(l+c)/2,p=(s+d)/2,u=t?.left??0,f=t?.top??0,b=t?.right??0,x=t?.bottom??0,w=o.width-u-b,E=o.height-f-x,y;if(r){let S=c-l,L=d-s;y=Math.min(w/S,E/L)*n}else y=_6(e,{width:w,height:E},n);let v=uo(Rp(M6(y,Np,"floor"),i,a)),C=$f({scenePoint:{x:m,y:p},viewportDimensions:{width:o.width,height:o.height},offsets:t,zoom:{value:v}});return{appState:{...o,scrollX:C.scrollX,scrollY:C.scrollY,zoom:{value:v}},captureUpdate:Eo.EVENTUALLY}},Ta=({canvasOffsets:e,targetElements:o,appState:t,fitToViewport:r,viewportZoomFactor:n,minZoom:i,maxZoom:a})=>{let l=A6(P6(o));return wx({canvasOffsets:e,bounds:l,appState:t,fitToViewport:r,viewportZoomFactor:n,minZoom:i,maxZoom:a})},Mj=N({name:"zoomToFitSelectionInViewport",label:"labels.zoomToFitViewport",icon:ts,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return Ta({targetElements:n.length?n:e,appState:{...o,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()})},keyTest:e=>e.code===xo.TWO&&e.shiftKey&&!e.altKey&&!e[Bo.CTRL_OR_CMD]}),Lj=N({name:"zoomToFitSelection",label:"helpDialog.zoomToSelection",icon:ts,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return Ta({targetElements:n.length?n:e,appState:{...o,userToFollow:null},fitToViewport:!0,canvasOffsets:r.getEditorUIOffsets()})},keyTest:e=>e.code===xo.THREE&&e.shiftKey&&!e.altKey&&!e[Bo.CTRL_OR_CMD]}),R6=N({name:"zoomToFit",label:"helpDialog.zoomToFit",icon:ts,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t,r)=>Ta({targetElements:e,appState:{...o,userToFollow:null},fitToViewport:!1,canvasOffsets:r.getEditorUIOffsets()}),keyTest:e=>e.code===xo.ONE&&e.shiftKey&&!e.altKey&&!e[Bo.CTRL_OR_CMD]}),Vr=N({name:"toggleTheme",label:(e,o)=>o.theme===va.DARK?"buttons.lightMode":"buttons.darkMode",keywords:["toggle","dark","light","mode","theme"],icon:e=>e.theme===va.LIGHT?ra:na,viewMode:!0,trackEvent:{category:"canvas"},perform:(e,o,t)=>({appState:{...o,theme:t||(o.theme===va.LIGHT?va.DARK:va.LIGHT)},captureUpdate:Eo.EVENTUALLY}),keyTest:e=>e.altKey&&e.shiftKey&&e.code===xo.D,predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.toggleTheme}),Pj=N({name:"toggleEraserTool",label:"toolBar.eraser",trackEvent:{category:"toolbar"},perform:(e,o)=>{let t;return Et(o)?t=jn(o,{...o.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):t=jn(o,{type:"eraser",lastActiveToolBeforeEraser:o.activeTool}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:t},captureUpdate:Eo.IMMEDIATELY}},keyTest:e=>e.key===Bo.E}),Aj=N({name:"toggleLassoTool",label:"toolBar.lasso",icon:ta,trackEvent:{category:"toolbar"},perform:(e,o,t,r)=>{let n;return o.activeTool.type!=="lasso"?(n=jn(o,{type:"lasso",fromSelection:!1}),xe(r.interactiveCanvas,bx.CROSSHAIR)):n=jn(o,{type:"selection"}),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:Eo.NEVER}}}),vx=N({name:"toggleHandTool",label:"toolBar.hand",trackEvent:{category:"toolbar"},icon:es,viewMode:!1,perform:(e,o,t,r)=>{let n;return qt(o)?n=jn(o,{...o.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):(n=jn(o,{type:"hand",lastActiveToolBeforeEraser:o.activeTool}),xe(r.interactiveCanvas,bx.GRAB)),{appState:{...o,selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:n},captureUpdate:Eo.IMMEDIATELY}},keyTest:e=>!e.altKey&&!e[Bo.CTRL_OR_CMD]&&e.key===Bo.H});import{updateActiveTool as Tx}from"@excalidraw/common";import{CaptureUpdateAction as B6}from"@excalidraw/element";var F6=N({name:"setEmbeddableAsActiveTool",trackEvent:{category:"toolbar"},target:"Tool",label:"toolBar.embeddable",perform:(e,o,t,r)=>{let n=Tx(o,{type:"embeddable"});return Dt(r.canvas,{...o,activeTool:n}),{elements:e,appState:{...o,activeTool:Tx(o,{type:"embeddable"})},captureUpdate:B6.EVENTUALLY}}});import{pointFrom as O6}from"@excalidraw/math";import{maybeBindLinearElement as z6,bindOrUnbindLinearElement as Ix,isBindingEnabled as H6}from"@excalidraw/element/binding";import{isValidPolygon as Cx,LinearElementEditor as Ia}from"@excalidraw/element";import{isBindingElement as Fs,isFreeDrawElement as Sx,isLinearElement as kx,isLineElement as Os}from"@excalidraw/element";import{KEYS as Bp,arrayToMap as Fp,tupleToCoors as G6,updateActiveTool as Mx}from"@excalidraw/common";import{isPathALoop as U6}from"@excalidraw/element";import{isInvisiblySmallElement as Op}from"@excalidraw/element";import{CaptureUpdateAction as zp}from"@excalidraw/element";import{jsx as Y6}from"react/jsx-runtime";var It=N({name:"finalize",label:"",trackEvent:!1,perform:(e,o,t,r)=>{let{interactiveCanvas:n,focusContainer:i,scene:a}=r,{event:l,sceneCoords:s}=t??{},c=a.getNonDeletedElementsMap();if(l&&o.selectedLinearElement){let u=Ia.handlePointerUp(l,o.selectedLinearElement,o,r.scene),{startBindingElement:f,endBindingElement:b}=u,x=r.scene.getElement(u.elementId);if(Fs(x)&&Ix(x,f,b,r.scene),u!==o.selectedLinearElement){let w=e;return x&&Op(x)&&(w=w.filter(E=>E.id!==x.id)),{elements:w,appState:{selectedLinearElement:{...u,selectedPointsIndices:null},suggestedBindings:[]},captureUpdate:zp.IMMEDIATELY}}}if(o.selectedLinearElement?.isEditing){let{elementId:u,startBindingElement:f,endBindingElement:b}=o.selectedLinearElement,x=Ia.getElement(u,c);if(x)return Fs(x)&&Ix(x,f,b,a),Os(x)&&!Cx(x.points)&&a.mutateElement(x,{polygon:!1}),{elements:x.points.length<2||Op(x)?e.filter(w=>w.id!==x.id):void 0,appState:{...o,cursorButton:"up",selectedLinearElement:new Ia(x,Fp(c),!1)},captureUpdate:zp.IMMEDIATELY}}let d=e;window.document.activeElement instanceof HTMLElement&&i();let m=null;if(o.multiElement)m=o.multiElement;else if(o.newElement?.type==="freedraw"||Fs(o.newElement))m=o.newElement;else if(Object.keys(o.selectedElementIds).length===1){let u=c.get(Object.keys(o.selectedElementIds)[0]);u&&(m=u)}if(m){if(o.multiElement&&m.type!=="freedraw"){let{points:u,lastCommittedPoint:f}=m;(!f||u[u.length-1]!==f)&&a.mutateElement(m,{points:m.points.slice(0,-1)})}if(m&&Op(m)&&(d=d.filter(u=>u.id!==m.id)),kx(m)||Sx(m)){let u=U6(m.points,o.zoom.value);if(u&&(Os(m)||Sx(m))){let f=m.points,b=f[0],x=f.map((w,E)=>E===f.length-1?O6(b[0],b[1]):w);Os(m)?a.mutateElement(m,{points:x,polygon:!0}):a.mutateElement(m,{points:x})}if(Os(m)&&!Cx(m.points)&&a.mutateElement(m,{polygon:!1}),Fs(m)&&!u&&m.points.length>1&&H6(o)){let f=s??G6(Ia.getPointAtIndexGlobalCoordinates(m,-1,Fp(e)));z6(m,o,f,a)}}}(!o.activeTool.locked&&o.activeTool.type!=="freedraw"||!m)&&Ht(n);let p;return o.activeTool.type==="eraser"?p=Mx(o,{...o.activeTool.lastActiveTool||{type:"selection"},lastActiveToolBeforeEraser:null}):p=Mx(o,{type:"selection"}),{elements:d,appState:{...o,cursorButton:"up",activeTool:(o.activeTool.locked||o.activeTool.type==="freedraw")&&m?o.activeTool:p,activeEmbeddable:null,newElement:null,selectionElement:null,multiElement:null,editingTextElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:m&&!o.activeTool.locked&&o.activeTool.type!=="freedraw"?{...o.selectedElementIds,[m.id]:!0}:o.selectedElementIds,selectedLinearElement:m&&kx(m)?new Ia(m,Fp(d)):o.selectedLinearElement},captureUpdate:zp.IMMEDIATELY}},keyTest:(e,o)=>e.key===Bp.ESCAPE&&(o.selectedLinearElement?.isEditing||!o.newElement&&o.multiElement===null)||(e.key===Bp.ESCAPE||e.key===Bp.ENTER)&&o.multiElement!==null,PanelComponent:({appState:e,updateData:o,data:t})=>Y6(W,{type:"button",icon:$1,title:g("buttons.done"),"aria-label":g("buttons.done"),onClick:o,visible:e.multiElement!=null,size:t?.size||"medium",style:{pointerEvents:"all"}})});import{KEYS as Vs,DEFAULT_EXPORT_PADDING as Lk,EXPORT_SCALES as Pk,THEME as Up}from"@excalidraw/common";import{getNonDeletedElements as Ak}from"@excalidraw/element";import{CaptureUpdateAction as ro}from"@excalidraw/element";import W6 from"clsx";import{jsx as Lx,jsxs as V6}from"react/jsx-runtime";var Ca=({children:e,checked:o,onChange:t,className:r})=>V6("div",{className:W6("Checkbox",r,{"is-checked":o}),onClick:n=>{t(!o,n),n.currentTarget.querySelector(".Checkbox-box").focus()},children:[Lx("button",{type:"button",className:"Checkbox-box",role:"checkbox","aria-checked":o,children:Y1}),Lx("div",{className:"Checkbox-label",children:e})]});import{THEME as Sa}from"@excalidraw/common";import{jsx as ka}from"react/jsx-runtime";var Ax=e=>{let o=e.title||(e.value===Sa.DARK?g("buttons.lightMode"):g("buttons.darkMode"));return ka(W,{type:"icon",icon:e.value===Sa.LIGHT?Px.MOON:Px.SUN,title:o,"aria-label":o,onClick:()=>e.onChange(e.value===Sa.DARK?Sa.LIGHT:Sa.DARK),"data-testid":"toggle-dark-mode"})},Px={SUN:ka("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:ka("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:ka("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:ka("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"})})};import{useState as X6}from"react";import{focusNearestParent as K6,KEYS as Z6}from"@excalidraw/common";import{jsx as Dx,jsxs as $6}from"react/jsx-runtime";var _x=e=>{let{id:o}=ze(),[t,r]=X6(e.value),n=a=>{e.ignoreFocus||K6(a.target);let l=a.target.value;l!==e.value&&e.onChange(l)},i=a=>{if(a.key===Z6.ENTER){if(a.preventDefault(),a.nativeEvent.isComposing||a.keyCode===229)return;a.currentTarget.blur()}};return $6("div",{className:"ProjectName",children:[Dx("label",{className:"ProjectName-label",htmlFor:"filename",children:`${e.label}:`}),Dx("input",{type:"text",className:"TextInput",onBlur:n,onKeyDown:i,id:`${o}-filename`,value:t,onChange:a=>r(a.target.value)})]})};import{DEFAULT_EXPORT_PADDING as yk,DEFAULT_FILENAME as wk,IMAGE_MIME_TYPES as Zx,isFirefox as vk,MIME_TYPES as Tk,cloneJSON as Ik,SVG_DOCUMENT_PREAMBLE as Ck}from"@excalidraw/common";import{getNonDeletedElements as Sk}from"@excalidraw/element";import{isFrameLikeElement as kk}from"@excalidraw/element";import{getElementsOverlappingFrame as Mk}from"@excalidraw/element";import{ALLOWED_PASTE_MIME_TYPES as ak,EXPORT_DATA_TYPES as Pa,MIME_TYPES as to,arrayToMap as lk,isMemberOf as sk,isPromiseLike as ck}from"@excalidraw/common";import{mutateElement as dk}from"@excalidraw/element";import{deepCopyElement as mk}from"@excalidraw/element";import{isFrameLikeElement as pk,isInitializedImageElement as uk}from"@excalidraw/element";import{getContainingFrame as Wx}from"@excalidraw/element";import{pointFrom as ir}from"@excalidraw/math";import{COLOR_PALETTE as Nx,DEFAULT_CHART_COLOR_INDEX as j6,getAllColorsSpecificShade as q6,DEFAULT_FONT_FAMILY as J6,DEFAULT_FONT_SIZE as Bx,VERTICAL_ALIGN as Q6,randomId as Fx,isDevEnv as Ox}from"@excalidraw/common";import{newTextElement as zs,newLinearElement as La,newElement as Gp}from"@excalidraw/element";var eo=32,we=12,ar=256,zx=50,Xr="NOT_SPREADSHEET",qn="VALID_SPREADSHEET",Ma=e=>{let o=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return o?parseFloat(`${(o[1]||o[2])+o[3]}`.replace(/,/g,"")):null},Hp=(e,o)=>e.slice(1).every(t=>Ma(t[o])!==null),Rx=e=>{let o=e[0].length;if(o>2)return{type:Xr,reason:"More than 2 columns"};if(o===1){if(!Hp(e,0))return{type:Xr,reason:"Value is not numeric"};let s=Ma(e[0][0])===null,c=(s?e.slice(1):e).map(d=>Ma(d[0]));return c.length<2?{type:Xr,reason:"Less than two rows"}:{type:qn,spreadsheet:{title:s?e[0][0]:null,labels:null,values:c}}}let t=Hp(e,0),r=Hp(e,1);if(!t&&!r)return{type:Xr,reason:"Value is not numeric"};let[n,i]=r?[0,1]:[1,0],a=Ma(e[0][i])===null,l=a?e.slice(1):e;return l.length<2?{type:Xr,reason:"Less than 2 rows"}:{type:qn,spreadsheet:{title:a?e[0][i]:null,labels:l.map(s=>s[n]),values:l.map(s=>Ma(s[i]))}}},ek=e=>{let o=[];for(let t=0;t<e[0].length;t++){let r=[];for(let n=0;n<e.length;n++)r.push(e[n][t]);o.push(r)}return o},Hx=e=>{let o=e.trim().split(`
|
|
3
3
|
`).map(i=>i.trim().split(" "));if(o.length&&o[0].length!==2&&(o=e.trim().split(`
|
|
4
4
|
`).map(i=>i.trim().split(","))),o.length===0)return{type:Xr,reason:"No values"};let t=o[0].length;if(!o.every(i=>i.length===t))return{type:Xr,reason:"All rows don't have same number of columns"};let n=Rx(o);if(n.type!==qn){let i=Rx(ek(o));if(i.type===qn)return i}return n},Hs=q6(j6),Gt={fillStyle:"hachure",fontFamily:J6,fontSize:Bx,opacity:100,roughness:1,strokeColor:Nx.black,roundness:null,strokeStyle:"solid",strokeWidth:1,verticalAlign:Q6.MIDDLE,locked:!1},Gx=e=>{let o=(eo+we)*e.values.length+we,t=ar+we*2;return{chartWidth:o,chartHeight:t}},tk=(e,o,t,r,n)=>e.labels?.map((i,a)=>zs({groupIds:[r],backgroundColor:n,...Gt,text:i.length>8?`${i.slice(0,5)}...`:i,x:o+a*(eo+we)+we*2,y:t+we/2,width:eo,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))||[],ok=(e,o,t,r,n)=>{let i=zs({groupIds:[r],backgroundColor:n,...Gt,x:o-we,y:t-we,text:"0",textAlign:"right"}),a=zs({groupIds:[r],backgroundColor:n,...Gt,x:o-we,y:t-ar-i.height/2,text:Math.max(...e.values).toLocaleString(),textAlign:"right"});return[i,a]},rk=(e,o,t,r,n)=>{let{chartWidth:i,chartHeight:a}=Gx(e),l=La({backgroundColor:n,groupIds:[r],...Gt,type:"line",x:o,y:t,width:i,points:[ir(0,0),ir(i,0)]}),s=La({backgroundColor:n,groupIds:[r],...Gt,type:"line",x:o,y:t,height:a,points:[ir(0,0),ir(0,-a)]}),c=La({backgroundColor:n,groupIds:[r],...Gt,type:"line",x:o,y:t-ar-we,strokeStyle:"dotted",width:i,opacity:zx,points:[ir(0,0),ir(i,0)]});return[l,s,c]},Ux=(e,o,t,r,n,i)=>{let{chartWidth:a,chartHeight:l}=Gx(e),s=e.title?zs({backgroundColor:n,groupIds:[r],...Gt,text:e.title,x:o+a/2,y:t-ar-we*2-Bx,roundness:null,textAlign:"center"}):null,c=i?Gp({backgroundColor:n,groupIds:[r],...Gt,type:"rectangle",x:o,y:t-l,width:a,height:l,strokeColor:Nx.black,fillStyle:"solid",opacity:6}):null;return[...c?[c]:[],...s?[s]:[],...tk(e,o,t,r,n),...ok(e,o,t,r,n),...rk(e,o,t,r,n)]},nk=(e,o,t)=>{let r=Math.max(...e.values),n=Fx(),i=Hs[Math.floor(Math.random()*Hs.length)];return[...e.values.map((l,s)=>{let c=l/r*ar;return Gp({backgroundColor:i,groupIds:[n],...Gt,type:"rectangle",x:o+s*(eo+we)+we,y:t-c-we,width:eo,height:c})}),...Ux(e,o,t,n,i,Ox())]},ik=(e,o,t)=>{let r=Math.max(...e.values),n=Fx(),i=Hs[Math.floor(Math.random()*Hs.length)],a=0,l=[];for(let b of e.values){let x=a*(eo+we),w=-(b/r)*ar;l.push([x,w]),a++}let s=Math.max(...l.map(b=>b[0])),c=Math.max(...l.map(b=>b[1])),d=Math.min(...l.map(b=>b[0])),m=Math.min(...l.map(b=>b[1])),p=La({backgroundColor:i,groupIds:[n],...Gt,type:"line",x:o+we+eo/2,y:t-we,height:c-m,width:s-d,strokeWidth:2,points:l}),u=e.values.map((b,x)=>{let w=x*(eo+we)+we/2,E=-(b/r)*ar+we/2;return Gp({backgroundColor:i,groupIds:[n],...Gt,fillStyle:"solid",strokeWidth:2,type:"ellipse",x:o+w+eo/2,y:t+E-we*2,width:we,height:we})}),f=e.values.map((b,x)=>{let w=x*(eo+we)+we/2,E=b/r*ar+we/2+we;return La({backgroundColor:i,groupIds:[n],...Gt,type:"line",x:o+w+eo/2+we/2,y:t-E,height:E,strokeStyle:"dotted",opacity:zx,points:[ir(0,0),ir(0,E)]})});return[...Ux(e,o,t,n,i,Ox()),p,...f,...u]},Yx=(e,o,t,r)=>e==="line"?ik(o,t,r):nk(o,t,r);var Wq="clipboard"in navigator&&"readText"in navigator.clipboard,Gs="clipboard"in navigator&&"writeText"in navigator.clipboard,lr="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,hk=e=>!!([Pa.excalidraw,Pa.excalidrawClipboard,Pa.excalidrawClipboardWithAPI].includes(e?.type)&&Array.isArray(e.elements)),Vx=({types:e,files:o})=>{!e&&!o&&console.warn("createPasteEvent: no types or files provided");let t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});if(e)for(let[r,n]of Object.entries(e)){if(typeof n!="string"){o=o||[],o.push(n);continue}try{if(t.clipboardData?.setData(r,n),t.clipboardData?.getData(r)!==n)throw new Error(`Failed to set "${r}" as clipboardData item`)}catch(i){throw new Error(i.message)}}if(o){let r=-1;for(let n of o){r++;try{if(t.clipboardData?.items.add(n),t.clipboardData?.files[r]!==n)throw new Error(`Failed to set file "${n.name}" as clipboardData item`)}catch(i){throw new Error(i.message)}}}return t},gk=({elements:e,files:o})=>{let t=lk(e),r=new Set(e.filter(l=>pk(l))),n=!1,i=e.reduce((l,s)=>(uk(s)&&(n=!0,o&&o[s.fileId]&&(l[s.fileId]=o[s.fileId])),l),{});n&&!o&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object.");let a={type:Pa.excalidrawClipboard,elements:e.map(l=>{if(Wx(l,t)&&!r.has(Wx(l,t))){let s=mk(l);return dk(s,t,{frameId:null}),s}return l}),files:o?i:void 0};return JSON.stringify(a)},Us=async(e,o,t)=>{await oo(gk({elements:e,files:o}),t)},fk=e=>{let o=Hx(e);return o.type===qn?{spreadsheet:o.spreadsheet}:null};function Xx(e){let o=[];for(let t of e.childNodes)if(t.nodeType===3){let r=t.textContent?.trim();r&&o.push({type:"text",value:r})}else if(t instanceof HTMLImageElement){let r=t.getAttribute("src");r&&r.startsWith("http")&&o.push({type:"imageUrl",value:r})}else o=o.concat(Xx(t));return o}var bk=e=>{let o=e.clipboardData?.getData(to.html);if(!o)return null;try{let t=new DOMParser().parseFromString(o,to.html),r=Xx(t.body);if(r.length)return{type:"mixedContent",value:r}}catch(t){console.error(`error in parseHTMLFromPaste: ${t.message}`)}return null},Kx=async()=>{let e={},o;try{o=await navigator.clipboard?.read()}catch(t){try{if(navigator.clipboard?.readText){console.warn(`navigator.clipboard.readText() failed (${t.message}). Failling back to navigator.clipboard.read()`);let r=await navigator.clipboard?.readText();if(r)return{[to.text]:r}}}catch(r){if(navigator.clipboard?.read)console.warn(`navigator.clipboard.readText() failed (${r.message}). Failling back to navigator.clipboard.read()`);else{if(r.name==="DataError")return console.warn(`navigator.clipboard.read() error, clipboard is probably empty: ${r.message}`),e;throw r}}throw t}for(let t of o)for(let r of t.types)if(sk(ak,r))try{if(r===to.text||r===to.html)e[r]=await(await t.getType(r)).text();else if(p1(r)){let n=await t.getType(r),i=E1(n,r,void 0);e[r]=i}else throw new dm(`Unsupported clipboard type: ${r}`)}catch(n){console.warn(n instanceof dm?n.message:`Cannot retrieve ${r} from clipboardItem: ${n.message}`)}return Object.keys(e).length===0&&console.warn("No clipboard data found from clipboard.read()."),e},xk=async(e,o=!1)=>{try{let t=!o&&e&&bk(e);return t?t.value.every(n=>n.type==="text")?{type:"text",value:e.clipboardData?.getData(to.text)||t.value.map(n=>n.value).join(`
|
|
5
|
-
`).trim()}:t:{type:"text",value:(e.clipboardData?.getData(to.text)||"").trim()}}catch{return{type:"text",value:""}}},Ys=async(e,o=!1)=>{let t=await xk(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let r=!o&&fk(t.value);if(r)return r}catch(r){console.error(r)}try{let r=JSON.parse(t.value),n=r.type===Pa.excalidrawClipboardWithAPI;if(hk(r))return{elements:r.elements,files:r.files,text:o?JSON.stringify(r.elements,null,2):void 0,programmaticAPI:n}}catch{}return{text:t.value}},Ws=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[to.png]:e})])}catch(o){if(ck(e))await navigator.clipboard.write([new window.ClipboardItem({[to.png]:await e})]);else throw o}},oo=async(e,o)=>{if(Gs)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(to.text,e||""),o.clipboardData?.getData(to.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!Ek(e))throw new Error("Error copying to clipboard.")},Ek=e=>{e||(e=" ");let o=document.documentElement.getAttribute("dir")==="rtl",t=document.createElement("textarea");t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[o?"right":"left"]="-9999px";let r=window.pageYOffset||document.documentElement.scrollTop;t.style.top=`${r}px`,t.style.fontSize="12pt",t.setAttribute("readonly",""),t.value=e,document.body.appendChild(t);let n=!1;try{t.select(),t.setSelectionRange(0,t.value.length),n=document.execCommand("copy")}catch(i){console.error(i)}return t.remove(),n};var Kr=(e,{selectedElementIds:o},t)=>{e=Sk(e);let r=t&&Ee(e,{selectedElementIds:o}),n=null,i=r?$(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return r&&(i.length===1&&kk(i[0])?(n=i[0],i=Mk(e,n)):i.length>1&&(i=$(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:Ik(i)}},Zr=async(e,o,t,r,{exportBackground:n,exportPadding:i=yk,viewBackgroundColor:a,name:l=t.name||wk,fileHandle:s=null,exportingFrame:c=null})=>{if(o.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let m=En(o,{exportBackground:n,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},r,{exportingFrame:c});if(e==="svg")return mm(m.then(p=>new Blob([Ck+p.outerHTML],{type:Tk.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[Zx.svg],fileHandle:s});if(e==="clipboard-svg"){let p=await m.then(u=>u.outerHTML);try{await oo(p)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let d=zl(o,t,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:c});if(e==="png"){let m=Lo(d);return t.exportEmbedScene&&(m=m.then(p=>import("./data/image-
|
|
5
|
+
`).trim()}:t:{type:"text",value:(e.clipboardData?.getData(to.text)||"").trim()}}catch{return{type:"text",value:""}}},Ys=async(e,o=!1)=>{let t=await xk(e,o);if(t.type==="mixedContent")return{mixedContent:t.value};try{let r=!o&&fk(t.value);if(r)return r}catch(r){console.error(r)}try{let r=JSON.parse(t.value),n=r.type===Pa.excalidrawClipboardWithAPI;if(hk(r))return{elements:r.elements,files:r.files,text:o?JSON.stringify(r.elements,null,2):void 0,programmaticAPI:n}}catch{}return{text:t.value}},Ws=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[to.png]:e})])}catch(o){if(ck(e))await navigator.clipboard.write([new window.ClipboardItem({[to.png]:await e})]);else throw o}},oo=async(e,o)=>{if(Gs)try{await navigator.clipboard.writeText(e||"");return}catch(t){console.error(t)}try{if(o){if(o.clipboardData?.setData(to.text,e||""),o.clipboardData?.getData(to.text)!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(t){console.error(t)}if(!Ek(e))throw new Error("Error copying to clipboard.")},Ek=e=>{e||(e=" ");let o=document.documentElement.getAttribute("dir")==="rtl",t=document.createElement("textarea");t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[o?"right":"left"]="-9999px";let r=window.pageYOffset||document.documentElement.scrollTop;t.style.top=`${r}px`,t.style.fontSize="12pt",t.setAttribute("readonly",""),t.value=e,document.body.appendChild(t);let n=!1;try{t.select(),t.setSelectionRange(0,t.value.length),n=document.execCommand("copy")}catch(i){console.error(i)}return t.remove(),n};var Kr=(e,{selectedElementIds:o},t)=>{e=Sk(e);let r=t&&Ee(e,{selectedElementIds:o}),n=null,i=r?$(e,{selectedElementIds:o},{includeBoundTextElement:!0}):e;return r&&(i.length===1&&kk(i[0])?(n=i[0],i=Mk(e,n)):i.length>1&&(i=$(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:n,exportedElements:Ik(i)}},Zr=async(e,o,t,r,{exportBackground:n,exportPadding:i=yk,viewBackgroundColor:a,name:l=t.name||wk,fileHandle:s=null,exportingFrame:c=null})=>{if(o.length===0)throw new Error(g("alerts.cannotExportEmptyCanvas"));if(e==="svg"||e==="clipboard-svg"){let m=En(o,{exportBackground:n,exportWithDarkMode:t.exportWithDarkMode,viewBackgroundColor:a,exportPadding:i,exportScale:t.exportScale,exportEmbedScene:t.exportEmbedScene&&e==="svg"},r,{exportingFrame:c});if(e==="svg")return mm(m.then(p=>new Blob([Ck+p.outerHTML],{type:Tk.svg})),{description:"Export to SVG",name:l,extension:t.exportEmbedScene?"excalidraw.svg":"svg",mimeTypes:[Zx.svg],fileHandle:s});if(e==="clipboard-svg"){let p=await m.then(u=>u.outerHTML);try{await oo(p)}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return}}let d=zl(o,t,r,{exportBackground:n,viewBackgroundColor:a,exportPadding:i,exportingFrame:c});if(e==="png"){let m=Lo(d);return t.exportEmbedScene&&(m=m.then(p=>import("./data/image-7MUHAX25.js").then(({encodePngMetadata:u})=>u({blob:p,metadata:ji(o,t,r,"local")})))),mm(m,{description:"Export to PNG",name:l,extension:t.exportEmbedScene?"excalidraw.png":"png",mimeTypes:[Zx.png],fileHandle:s})}else if(e==="clipboard")try{let m=Lo(d);await Ws(m)}catch(m){throw console.warn(m),m.name==="CANVAS_POSSIBLY_TOO_BIG"?new Error(g("canvasError.canvasTooBig")):vk&&m.name==="TypeError"?new Error(`${g("alerts.couldNotCopyToClipboard")}
|
|
6
6
|
|
|
7
7
|
${g("hints.firefox_clipboard_write")}`):new Error(g("alerts.couldNotCopyToClipboard"))}else throw new Error("Unsupported export type")};var $x=async(e,o,t,r)=>{let{exportBackground:n,viewBackgroundColor:i,fileHandle:a}=o,l=d1(a);if(!a||!m1(l))throw new Error("fileHandle should exist and should be of type svg or png when resaving");o={...o,exportEmbedScene:!0};let{exportedElements:s,exportingFrame:c}=Kr(e,o,!1);return await Zr(l,s,o,t,{exportBackground:n,viewBackgroundColor:i,name:r,fileHandle:a,exportingFrame:c}),{fileHandle:a}};import{Fragment as Dk,jsx as Fo,jsxs as _k}from"react/jsx-runtime";var Yp=N({name:"changeProjectName",label:"labels.fileTitle",trackEvent:!1,perform:(e,o,t)=>({appState:{...o,name:t},captureUpdate:ro.EVENTUALLY}),PanelComponent:({appState:e,updateData:o,appProps:t,data:r,app:n})=>Fo(_x,{label:g("labels.fileTitle"),value:n.getName(),onChange:i=>o(i),ignoreFocus:r?.ignoreFocus??!1})}),jx=N({name:"changeExportScale",label:"imageExportDialog.scale",trackEvent:{category:"export",action:"scale"},perform:(e,o,t)=>({appState:{...o,exportScale:t},captureUpdate:ro.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t})=>{let r=Ak(e),i=Ee(r,o)?$(r,o):r;return Fo(Dk,{children:Pk.map(a=>{let[l,s]=s1(i,Lk,a),c=`${g("imageExportDialog.label.scale")} ${a}x (${l}x${s})`;return Fo(W,{size:"small",type:"radio",icon:`${a}x`,name:"export-canvas-scale",title:c,"aria-label":c,id:"export-canvas-scale",checked:a===o.exportScale,onChange:()=>t(a)},a)})})}}),Wp=N({name:"changeExportBackground",label:"imageExportDialog.label.withBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:(e,o,t)=>({appState:{...o,exportBackground:t},captureUpdate:ro.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>Fo(Ca,{checked:e.exportBackground,onChange:t=>o(t),children:g("imageExportDialog.label.withBackground")})}),Xs=N({name:"changeExportEmbedScene",label:"imageExportDialog.tooltip.embedScene",trackEvent:{category:"export",action:"embedScene"},perform:(e,o,t)=>({appState:{...o,exportEmbedScene:t},captureUpdate:ro.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>_k(Ca,{checked:e.exportEmbedScene,onChange:t=>o(t),children:[g("imageExportDialog.label.embedScene"),Fo(it,{label:g("imageExportDialog.tooltip.embedScene"),long:!0,children:Fo("div",{className:"excalidraw-tooltip-icon",children:j1})})]})}),$r=N({name:"saveToActiveFile",label:"buttons.save",icon:zr,trackEvent:{category:"export"},predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.saveToActiveFile&&!!o.fileHandle&&!o.viewModeEnabled,perform:async(e,o,t,r)=>{let n=!!o.fileHandle;try{let{fileHandle:i}=Hl(o.fileHandle)?await $x(e,o,r.files,r.getName()):await Nl(e,o,r.files,r.getName());return{captureUpdate:ro.EVENTUALLY,appState:{...o,fileHandle:i,toast:n?{message:i?.name?g("toast.fileSavedToFilename").replace("{filename}",`"${i.name}"`):g("toast.fileSaved")}:null}}}catch(i){return i?.name!=="AbortError"?console.error(i):console.warn(i),{captureUpdate:ro.EVENTUALLY}}},keyTest:e=>!1}),Aa=N({name:"saveFileToDisk",label:"exportDialog.disk_title",icon:zr,viewMode:!0,trackEvent:{category:"export"},perform:async(e,o,t,r)=>{try{let{fileHandle:n}=await Nl(e,{...o,fileHandle:null},r.files,r.getName());return{captureUpdate:ro.EVENTUALLY,appState:{...o,openDialog:null,fileHandle:n,toast:{message:g("toast.fileSaved")}}}}catch(n){return n?.name!=="AbortError"?console.error(n):console.warn(n),{captureUpdate:ro.EVENTUALLY}}},keyTest:e=>e.key===Vs.S&&e.shiftKey&&e[Vs.CTRL_OR_CMD],PanelComponent:({updateData:e})=>Fo(W,{type:"button",icon:V1,title:g("buttons.saveAs"),"aria-label":g("buttons.saveAs"),showAriaLabel:ce().editor.isMobile,hidden:!xn,onClick:()=>e(null),"data-testid":"save-as-button"})}),Jn=N({name:"loadScene",label:"buttons.load",trackEvent:{category:"export"},predicate:(e,o,t,r)=>!!r.props.UIOptions.canvasActions.loadScene&&!o.viewModeEnabled,perform:async(e,o,t,r)=>{try{let{elements:n,appState:i,files:a}=await pm(o,e);return{elements:n,appState:i,files:a,captureUpdate:ro.IMMEDIATELY}}catch(n){return n?.name==="AbortError"?(console.warn(n),!1):{elements:e,appState:{...o,errorMessage:n.message},files:r.files,captureUpdate:ro.EVENTUALLY}}},keyTest:e=>e[Vs.CTRL_OR_CMD]&&e.key===Vs.O}),qx=N({name:"exportWithDarkMode",label:"imageExportDialog.label.darkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:(e,o,t)=>({appState:{...o,exportWithDarkMode:t},captureUpdate:ro.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>Fo("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:Fo(Ax,{value:e.exportWithDarkMode?Up.DARK:Up.LIGHT,onChange:t=>{o(t===Up.DARK)},title:g("imageExportDialog.label.darkMode")})})});import{DEFAULT_FONT_SIZE as Rk,DEFAULT_FONT_FAMILY as Nk,DEFAULT_TEXT_ALIGN as Bk,CODES as Jx,KEYS as Qx,getLineHeight as Fk}from"@excalidraw/common";import{newElementWith as Ks}from"@excalidraw/element";import{hasBoundTextElement as Ok,canApplyRoundnessTypeToElement as zk,getDefaultRoundnessTypeForElement as Hk,isFrameLikeElement as Gk,isArrowElement as Uk,isExcalidrawElement as Yk,isTextElement as Vp}from"@excalidraw/element";import{getBoundTextElement as Wk,redrawTextBoundingBox as Vk}from"@excalidraw/element";import{CaptureUpdateAction as Xp}from"@excalidraw/element";var eE="{}",Kp=N({name:"copyStyles",label:"labels.copyStyles",icon:zm,trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=[],i=e.find(a=>o.selectedElementIds[a.id]);if(n.push(i),i&&Ok(i)){let a=Wk(i,r.scene.getNonDeletedElementsMap());n.push(a)}return i&&(eE=JSON.stringify(n)),{appState:{...o,toast:{message:g("toast.copyStyles")}},captureUpdate:Xp.EVENTUALLY}},keyTest:e=>e[Qx.CTRL_OR_CMD]&&e.altKey&&e.code===Jx.C}),Zp=N({name:"pasteStyles",label:"labels.pasteStyles",icon:zm,trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=JSON.parse(eE),i=n[0],a=n[1];if(!Yk(i))return{elements:e,captureUpdate:Xp.EVENTUALLY};let l=$(e,o,{includeBoundTextElement:!0}),s=l.map(c=>c.id);return{elements:e.map(c=>{if(s.includes(c.id)){let d=i;if(Vp(c)&&c.containerId&&(d=a),!d)return c;let m=Ks(c,{backgroundColor:d?.backgroundColor,strokeWidth:d?.strokeWidth,strokeColor:d?.strokeColor,strokeStyle:d?.strokeStyle,fillStyle:d?.fillStyle,opacity:d?.opacity,roughness:d?.roughness,roundness:d.roundness?zk(d.roundness.type,c)?d.roundness:Hk(c):null});if(Vp(m)){let p=d.fontSize||Rk,u=d.fontFamily||Nk;m=Ks(m,{fontSize:p,fontFamily:u,textAlign:d.textAlign||Bk,lineHeight:d.lineHeight||Fk(u)});let f=null;m.containerId&&(f=l.find(b=>Vp(m)&&b.id===m.containerId)||null),Vk(m,f,r.scene)}return m.type==="arrow"&&Uk(d)&&(m=Ks(m,{startArrowhead:d.startArrowhead,endArrowhead:d.endArrowhead})),Gk(c)&&(m=Ks(m,{roundness:null,backgroundColor:"transparent"})),m}return c}),captureUpdate:Xp.IMMEDIATELY}},keyTest:e=>e[Qx.CTRL_OR_CMD]&&e.altKey&&e.code===Jx.V});import{KEYS as Xk}from"@excalidraw/common";import{getNonDeletedElements as Kk}from"@excalidraw/element";import{showSelectedShapeActions as Zk}from"@excalidraw/element";import{CaptureUpdateAction as $p}from"@excalidraw/element";import{jsx as tE}from"react/jsx-runtime";var $k=N({name:"toggleCanvasMenu",label:"buttons.menu",trackEvent:{category:"menu"},perform:(e,o)=>({appState:{...o,openMenu:o.openMenu==="canvas"?null:"canvas"},captureUpdate:$p.EVENTUALLY}),PanelComponent:({appState:e,updateData:o})=>tE(W,{type:"button",icon:Zl,"aria-label":g("buttons.menu"),onClick:o,selected:e.openMenu==="canvas"})}),jk=N({name:"toggleEditMenu",label:"buttons.edit",trackEvent:{category:"menu"},perform:(e,o)=>({appState:{...o,openMenu:o.openMenu==="shape"?null:"shape"},captureUpdate:$p.EVENTUALLY}),PanelComponent:({elements:e,appState:o,updateData:t})=>tE(W,{visible:Zk(o,Kk(e)),type:"button",icon:X1,"aria-label":g("buttons.edit"),onClick:t,selected:o.openMenu==="shape"})}),jr=N({name:"toggleShortcuts",label:"welcomeScreen.defaults.helpHint",icon:z1,viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:(e,o,t,{focusContainer:r})=>(o.openDialog?.name==="help"&&r(),{appState:{...o,openDialog:o.openDialog?.name==="help"?null:{name:"help"}},captureUpdate:$p.EVENTUALLY}),keyTest:e=>e.key===Xk.QUESTION_MARK});import{getNonDeletedElements as $s}from"@excalidraw/element";import{newElementWith as nE}from"@excalidraw/element";import{isBoundToContainer as qk}from"@excalidraw/element";import{frameAndChildrenSelectedTogether as Jk,getElementsInResizingFrame as Qk,getFrameLikeElements as eM,getRootElements as tM,groupByFrameLikes as oM,removeElementsFromFrame as rM,replaceAllElementsInFrame as nM}from"@excalidraw/element";import{KEYS as js,randomId as iM,arrayToMap as jp,getShortcutKey as iE}from"@excalidraw/common";import{getSelectedGroupIds as Zs,selectGroup as aM,selectGroupsForSelectedElements as lM,getElementsInGroup as oE,addToGroup as sM,removeFromSelectedGroups as cM,isElementInGroup as aE}from"@excalidraw/element";import{syncMovedIndices as dM}from"@excalidraw/element";import{CaptureUpdateAction as Da}from"@excalidraw/element";import{jsx as Qn}from"react/jsx-runtime";var mM=e=>{if(e.length>=2){let o=e[0].groupIds;for(let t of o)if(e.reduce((r,n)=>r&&aE(n,t),!0))return!0}return!1},rE=(e,o,t)=>{let r=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0});return r.length>=2&&!mM(r)&&!Jk(r)},qp=N({name:"group",label:"labels.group",icon:e=>Qn(Rm,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=tM(r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}));if(n.length<2)return{appState:o,elements:e,captureUpdate:Da.EVENTUALLY};let i=Zs(o);if(i.length===1){let x=i[0],w=new Set(oE(e,x).map(v=>v.id)),E=new Set(n.map(v=>v.id));if(new Set([...Array.from(w),...Array.from(E)]).size===w.size)return{appState:o,elements:e,captureUpdate:Da.EVENTUALLY}}let a=[...e];new Set(n.map(x=>x.frameId)).size>1&&oM(n).forEach((w,E)=>{rM(w,r.scene.getNonDeletedElementsMap())});let s=iM(),c=jp(n);a=a.map(x=>c.get(x.id)?nE(x,{groupIds:sM(x.groupIds,s,o.editingGroupId)}):x);let d=oE(a,s),m=d[d.length-1],p=a.lastIndexOf(m),u=a.slice(p+1),f=a.slice(0,p).filter(x=>!aE(x,s)),b=dM([...f,...d,...u],jp(d));return{appState:{...o,...aM(s,{...o,selectedGroupIds:{}},$s(a))},elements:b,captureUpdate:Da.IMMEDIATELY}},predicate:(e,o,t,r)=>rE(e,o,r),keyTest:e=>!e.shiftKey&&e[js.CTRL_OR_CMD]&&e.key===js.G,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>Qn(W,{hidden:!rE(e,o,r),type:"button",icon:Qn(Rm,{theme:o.theme}),onClick:()=>t(null),title:`${g("labels.group")} \u2014 ${iE("CtrlOrCmd+G")}`,"aria-label":g("labels.group"),visible:Ee($s(e),o)})}),Jp=N({name:"ungroup",label:"labels.ungroup",icon:e=>Qn(Nm,{theme:e.theme}),trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=Zs(o),i=jp(e);if(n.length===0)return{appState:o,elements:e,captureUpdate:Da.EVENTUALLY};let a=[...e],l=[];a=a.map(p=>{qk(p)&&l.push(p.id);let u=cM(p.groupIds,o.selectedGroupIds);return u.length===p.groupIds.length?p:nE(p,{groupIds:u})});let s=lM(o,$s(a),o,null),c=r.scene.getSelectedElements(o),d=new Set(c.filter(p=>p.frameId).map(p=>p.frameId));return eM(e).filter(p=>d.has(p.id)).forEach(p=>{p&&(a=nM(a,Qk(a,p,o,i),p,r))}),s.selectedElementIds=Object.entries(s.selectedElementIds).reduce((p,[u,f])=>(f&&!l.includes(u)&&(p[u]=!0),p),{}),{appState:{...o,...s},elements:a,captureUpdate:Da.IMMEDIATELY}},keyTest:e=>e.shiftKey&&e[js.CTRL_OR_CMD]&&e.key===js.G.toUpperCase(),predicate:(e,o)=>Zs(o).length>0,PanelComponent:({elements:e,appState:o,updateData:t})=>Qn(W,{type:"button",hidden:Zs(o).length===0,icon:Qn(Nm,{theme:o.theme}),onClick:()=>t(null),title:`${g("labels.ungroup")} \u2014 ${iE("CtrlOrCmd+Shift+G")}`,"aria-label":g("labels.ungroup"),visible:Ee($s(e),o)})});import xM from"clsx";import{CaptureUpdateAction as mE}from"@excalidraw/element";import{COLOR_CHARCOAL_BLACK as pM,COLOR_VOICE_CALL as uM,COLOR_WHITE as Js,THEME as hM,UserIdleState as lE}from"@excalidraw/common";var qs=(e,o,t,r,n,i,a)=>{e.beginPath(),e.moveTo(o+i,t),e.lineTo(o+r-i,t),e.quadraticCurveTo(o+r,t,o+r,t+i),e.lineTo(o+r,t+n-i),e.quadraticCurveTo(o+r,t+n,o+r-i,t+n),e.lineTo(o+i,t+n),e.quadraticCurveTo(o,t+n,o,t+n-i),e.lineTo(o,t+i),e.quadraticCurveTo(o,t,o+i,t),e.closePath(),e.fill(),a&&(e.strokeStyle=a),e.stroke()};function gM(e){let o=0;if(e.length===0)return o;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);o=(o<<5)-o+r}return o}var qr=(e,o)=>`hsl(${Math.abs(gM(o?.id||e))%37*10}, 100%, 83%)`,sE=e=>{let o=e?.trim()?.codePointAt(0);return(o?String.fromCodePoint(o):"?").toUpperCase()},cE=({context:e,renderConfig:o,appState:t,normalizedWidth:r,normalizedHeight:n})=>{for(let[i,a]of o.remotePointerViewportCoords){let{x:l,y:s}=a,c=t.collaborators.get(i);l-=t.offsetLeft,s-=t.offsetTop;let d=11,m=14,p=l<0||l>r-d||s<0||s>n-m;l=Math.max(l,0),l=Math.min(l,r-d),s=Math.max(s,0),s=Math.min(s,n-m);let u=qr(i,c);e.save(),e.strokeStyle=u,e.fillStyle=u;let f=o.remotePointerUserStates.get(i),b=p||f===lE.IDLE||f===lE.AWAY;b&&(e.globalAlpha=.3),o.remotePointerButton.get(i)==="down"&&(e.beginPath(),e.arc(l,s,15,0,2*Math.PI,!1),e.lineWidth=3,e.strokeStyle="#ffffff88",e.stroke(),e.closePath(),e.beginPath(),e.arc(l,s,15,0,2*Math.PI,!1),e.lineWidth=1,e.strokeStyle=u,e.stroke(),e.closePath());let x=t.theme===hM.DARK?"#2f6330":uM,w=c?.isSpeaking;w&&(e.fillStyle=x,e.strokeStyle=x,e.lineWidth=10,e.lineJoin="round",e.beginPath(),e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.stroke(),e.fill()),e.fillStyle=Js,e.strokeStyle=Js,e.lineWidth=6,e.lineJoin="round",e.beginPath(),e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.stroke(),e.fill(),e.fillStyle=u,e.strokeStyle=u,e.lineWidth=2,e.lineJoin="round",e.beginPath(),b?(e.moveTo(l-1,s-1),e.lineTo(l-1,s+15),e.lineTo(l+5,s+10),e.lineTo(l+12,s+9),e.closePath(),e.fill()):(e.moveTo(l,s),e.lineTo(l+0,s+14),e.lineTo(l+4,s+9),e.lineTo(l+11,s+8),e.closePath(),e.fill(),e.stroke());let E=o.remotePointerUsernames.get(i)||"";if(!p&&E){e.font="600 12px sans-serif";let y=(w?l+0:l)+d/2,v=(w?s+0:s)+m+2,C=5,S=3,L=e.measureText(E),k=L.actualBoundingBoxDescent+L.actualBoundingBoxAscent,A=Math.max(k,12),P=y-1,B=v-1,O=L.width+2+C*2+2,G=A+2+S*2+2;if(e.roundRect?(e.beginPath(),e.roundRect(P,B,O,G,8),e.fillStyle=u,e.fill(),e.strokeStyle=Js,e.stroke(),w&&(e.beginPath(),e.roundRect(P-2,B-2,O+4,G+4,8),e.strokeStyle=x,e.stroke())):qs(e,P,B,O,G,8,Js),e.fillStyle=pM,e.fillText(E,y+C+1,v+S+L.actualBoundingBoxAscent+Math.floor((A-k)/2)+2),w){e.fillStyle=x;let J=8,_=8,R=5;e.fillRect(P+O+_,B+(G/2-J/2),2,J),e.fillRect(P+O+_+R,B+(G/2-J*2/2),2,J*2),e.fillRect(P+O+_+R*2,B+(G/2-J/2),2,J)}}e.restore(),e.closePath()}};import fM from"clsx";import{useState as bM}from"react";import{jsx as dE}from"react/jsx-runtime";var Qp=({color:e,onClick:o,name:t,src:r,className:n})=>{let i=sE(t),[a,l]=bM(!1),s=!a&&r,c=s?void 0:{background:e};return dE("div",{className:fM("Avatar",n),style:c,onClick:o,children:s?dE("img",{className:"Avatar-img",src:r,alt:i,referrerPolicy:"no-referrer",onError:()=>l(!0)}):i})};import{jsx as yo,jsxs as Qs}from"react/jsx-runtime";var EM=N({name:"goToCollaborator",label:"Go to a collaborator",viewMode:!0,trackEvent:{category:"collab"},perform:(e,o,t)=>!t.socketId||o.userToFollow?.socketId===t.socketId||t.isCurrentUser?{appState:{...o,userToFollow:null},captureUpdate:mE.EVENTUALLY}:{appState:{...o,userToFollow:{socketId:t.socketId,username:t.username||""},openMenu:o.openMenu==="canvas"?null:o.openMenu},captureUpdate:mE.EVENTUALLY},PanelComponent:({updateData:e,data:o,appState:t})=>{let{socketId:r,collaborator:n,withName:i,isBeingFollowed:a}=o,l=qr(r,n),s=xM({"is-followed":a,"is-current-user":n.isCurrentUser===!0,"is-speaking":n.isSpeaking,"is-in-call":n.isInCall,"is-muted":n.isMuted}),c=n.isInCall?n.isSpeaking?Qs("div",{className:"UserList__collaborator-status-icon-speaking-indicator",title:g("userList.hint.isSpeaking"),children:[yo("div",{}),yo("div",{}),yo("div",{})]}):n.isMuted?yo("div",{className:"UserList__collaborator-status-icon-microphone-muted",title:g("userList.hint.micMuted"),children:J0}):yo("div",{title:g("userList.hint.inCall"),children:q0}):null;return i?Qs("div",{className:`dropdown-menu-item dropdown-menu-item-base UserList__collaborator ${s}`,style:{"--avatar-size":"1.5rem"},onClick:()=>e(n),children:[yo(Qp,{color:l,onClick:()=>{},name:n.username||"",src:n.avatarUrl,className:s}),yo("div",{className:"UserList__collaborator-name",children:n.username}),Qs("div",{className:"UserList__collaborator-status-icons","aria-hidden":!0,children:[a&&yo("div",{className:"UserList__collaborator-status-icon-is-followed",title:g("userList.hint.followStatus"),children:Gr}),c]})]}):Qs("div",{className:`UserList__collaborator UserList__collaborator--avatar-only ${s}`,children:[yo(Qp,{color:l,onClick:()=>{e(n)},name:n.username||"",src:n.avatarUrl,className:s}),c&&yo("div",{className:"UserList__collaborator-status-icon",children:c})]})}});import{LIBRARY_DISABLED_TYPES as yM,randomId as wM}from"@excalidraw/common";import{deepCopyElement as vM}from"@excalidraw/element";import{CaptureUpdateAction as eu}from"@excalidraw/element";var tu=N({name:"addToLibrary",trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});for(let i of yM)if(n.some(a=>a.type===i))return{captureUpdate:eu.EVENTUALLY,appState:{...o,errorMessage:g(`errors.libraryElementTypeError.${i}`)}};return r.library.getLatestLibrary().then(i=>r.library.setLibrary([{id:wM(),status:"unpublished",elements:n.map(vM),created:Date.now()},...i])).then(()=>({captureUpdate:eu.EVENTUALLY,appState:{...o,toast:{message:g("toast.addedToLibrary")}}})).catch(i=>({captureUpdate:eu.EVENTUALLY,appState:{...o,errorMessage:i.message}}))},label:"labels.addToLibrary"});import{getNonDeletedElements as ei}from"@excalidraw/element";import{isFrameLikeElement as TM}from"@excalidraw/element";import{updateFrameMembershipOfSelectedElements as IM}from"@excalidraw/element";import{KEYS as sr,arrayToMap as CM,getShortcutKey as ec}from"@excalidraw/common";import{alignElements as SM}from"@excalidraw/element";import{CaptureUpdateAction as ti}from"@excalidraw/element";import{getMaximumGroups as kM}from"@excalidraw/element/groups";import{getSelectedElementsByGroup as MM}from"@excalidraw/element";import{jsx as ri}from"react/jsx-runtime";var at=(e,o)=>{let t=o.scene.getSelectedElements(e);return kM(t,o.scene.getNonDeletedElementsMap()).length>1&&MM(t,o.scene.getNonDeletedElementsMap(),e).length>1&&!t.some(n=>TM(n))},oi=(e,o,t,r)=>{let n=t.scene.getSelectedElements(o),i=SM(n,r,t.scene,o),a=CM(i);return IM(e.map(l=>a.get(l.id)||l),o,t)},LM=N({name:"alignTop",label:"labels.alignTop",icon:Mm,trackEvent:{category:"element"},predicate:(e,o,t,r)=>at(o,r),perform:(e,o,t,r)=>({appState:o,elements:oi(e,o,r,{position:"start",axis:"y"}),captureUpdate:ti.IMMEDIATELY}),keyTest:e=>e[sr.CTRL_OR_CMD]&&e.shiftKey&&e.key===sr.ARROW_UP,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ri(W,{hidden:!at(o,r),type:"button",icon:Mm,onClick:()=>t(null),title:`${g("labels.alignTop")} \u2014 ${ec("CtrlOrCmd+Shift+Up")}`,"aria-label":g("labels.alignTop"),visible:Ee(ei(e),o)})}),PM=N({name:"alignBottom",label:"labels.alignBottom",icon:Lm,trackEvent:{category:"element"},predicate:(e,o,t,r)=>at(o,r),perform:(e,o,t,r)=>({appState:o,elements:oi(e,o,r,{position:"end",axis:"y"}),captureUpdate:ti.IMMEDIATELY}),keyTest:e=>e[sr.CTRL_OR_CMD]&&e.shiftKey&&e.key===sr.ARROW_DOWN,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ri(W,{hidden:!at(o,r),type:"button",icon:Lm,onClick:()=>t(null),title:`${g("labels.alignBottom")} \u2014 ${ec("CtrlOrCmd+Shift+Down")}`,"aria-label":g("labels.alignBottom"),visible:Ee(ei(e),o)})}),AM=N({name:"alignLeft",label:"labels.alignLeft",icon:Pm,trackEvent:{category:"element"},predicate:(e,o,t,r)=>at(o,r),perform:(e,o,t,r)=>({appState:o,elements:oi(e,o,r,{position:"start",axis:"x"}),captureUpdate:ti.IMMEDIATELY}),keyTest:e=>e[sr.CTRL_OR_CMD]&&e.shiftKey&&e.key===sr.ARROW_LEFT,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ri(W,{hidden:!at(o,r),type:"button",icon:Pm,onClick:()=>t(null),title:`${g("labels.alignLeft")} \u2014 ${ec("CtrlOrCmd+Shift+Left")}`,"aria-label":g("labels.alignLeft"),visible:Ee(ei(e),o)})}),DM=N({name:"alignRight",label:"labels.alignRight",icon:Am,trackEvent:{category:"element"},predicate:(e,o,t,r)=>at(o,r),perform:(e,o,t,r)=>({appState:o,elements:oi(e,o,r,{position:"end",axis:"x"}),captureUpdate:ti.IMMEDIATELY}),keyTest:e=>e[sr.CTRL_OR_CMD]&&e.shiftKey&&e.key===sr.ARROW_RIGHT,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ri(W,{hidden:!at(o,r),type:"button",icon:Am,onClick:()=>t(null),title:`${g("labels.alignRight")} \u2014 ${ec("CtrlOrCmd+Shift+Right")}`,"aria-label":g("labels.alignRight"),visible:Ee(ei(e),o)})}),_M=N({name:"alignVerticallyCentered",label:"labels.centerVertically",icon:Dm,trackEvent:{category:"element"},predicate:(e,o,t,r)=>at(o,r),perform:(e,o,t,r)=>({appState:o,elements:oi(e,o,r,{position:"center",axis:"y"}),captureUpdate:ti.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ri(W,{hidden:!at(o,r),type:"button",icon:Dm,onClick:()=>t(null),title:g("labels.centerVertically"),"aria-label":g("labels.centerVertically"),visible:Ee(ei(e),o)})}),RM=N({name:"alignHorizontallyCentered",label:"labels.centerHorizontally",icon:_m,trackEvent:{category:"element"},predicate:(e,o,t,r)=>at(o,r),perform:(e,o,t,r)=>({appState:o,elements:oi(e,o,r,{position:"center",axis:"x"}),captureUpdate:ti.IMMEDIATELY}),PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>ri(W,{hidden:!at(o,r),type:"button",icon:_m,onClick:()=>t(null),title:g("labels.centerHorizontally"),"aria-label":g("labels.centerHorizontally"),visible:Ee(ei(e),o)})});import{getNonDeletedElements as pE}from"@excalidraw/element";import{isFrameLikeElement as NM}from"@excalidraw/element";import{CODES as uE,KEYS as hE,arrayToMap as BM,getShortcutKey as gE}from"@excalidraw/common";import{updateFrameMembershipOfSelectedElements as FM}from"@excalidraw/element";import{distributeElements as OM}from"@excalidraw/element";import{CaptureUpdateAction as fE}from"@excalidraw/element";import{getSelectedElementsByGroup as zM}from"@excalidraw/element";import{jsx as EE}from"react/jsx-runtime";var bE=(e,o)=>{let t=o.scene.getSelectedElements(e);return zM(t,o.scene.getNonDeletedElementsMap(),e).length>2&&!t.some(r=>NM(r))},xE=(e,o,t,r)=>{let n=t.scene.getSelectedElements(o),i=OM(n,t.scene.getNonDeletedElementsMap(),r,o),a=BM(i);return FM(e.map(l=>a.get(l.id)||l),o,t)},HM=N({name:"distributeHorizontally",label:"labels.distributeHorizontally",trackEvent:{category:"element"},perform:(e,o,t,r)=>({appState:o,elements:xE(e,o,r,{space:"between",axis:"x"}),captureUpdate:fE.IMMEDIATELY}),keyTest:e=>!e[hE.CTRL_OR_CMD]&&e.altKey&&e.code===uE.H,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>EE(W,{hidden:!bE(o,r),type:"button",icon:e0,onClick:()=>t(null),title:`${g("labels.distributeHorizontally")} \u2014 ${gE("Alt+H")}`,"aria-label":g("labels.distributeHorizontally"),visible:Ee(pE(e),o)})}),GM=N({name:"distributeVertically",label:"labels.distributeVertically",trackEvent:{category:"element"},perform:(e,o,t,r)=>({appState:o,elements:xE(e,o,r,{space:"between",axis:"y"}),captureUpdate:fE.IMMEDIATELY}),keyTest:e=>!e[hE.CTRL_OR_CMD]&&e.altKey&&e.code===uE.V,PanelComponent:({elements:e,appState:o,updateData:t,app:r})=>EE(W,{hidden:!bE(o,r),type:"button",icon:t0,onClick:()=>t(null),title:`${g("labels.distributeVertically")} \u2014 ${gE("Alt+V")}`,"aria-label":g("labels.distributeVertically"),visible:Ee(pE(e),o)})});import{arrayToMap as yE,getShortcutKey as UM,KEYS as YM,matchKey as WM}from"@excalidraw/common";import{CaptureUpdateAction as VM}from"@excalidraw/element";import{updateFrameMembershipOfSelectedElements as XM}from"@excalidraw/element/frame";import{arrangeElements as KM}from"@excalidraw/element/arrange";import{jsx as qM}from"react/jsx-runtime";var ZM=(e,o,t)=>{let r=t.scene.getSelectedElements(o),n=yE(e),i=KM(t.scene,r,n,o.arrangeConfiguration.algorithm,o.arrangeConfiguration.gap),a=yE(i);return XM(e.map(l=>a.get(l.id)||l),o,t)},$M=at,jM=N({name:"arrangeElements",label:"labels.arrangeElements",keywords:["arrange","rearrange","spread"],icon:Gm,trackEvent:{category:"element"},viewMode:!1,predicate:(e,o,t,r)=>$M(o,r),perform:(e,o,t,r)=>({appState:o,elements:ZM(e,o,r),captureUpdate:VM.IMMEDIATELY}),keyTest:e=>e.shiftKey&&WM(e,YM.R),PanelComponent:({updateData:e})=>qM("button",{type:"button",className:"arrangeButton",onClick:()=>e(null),title:`${g("labels.arrangeElements")} \u2014 ${UM("Shift+R")}`,children:Gm})});import{getNonDeletedElements as JM}from"@excalidraw/element";import{bindOrUnbindLinearElements as QM,isBindingEnabled as eL}from"@excalidraw/element";import{getCommonBoundingBox as wE}from"@excalidraw/element";import{newElementWith as tL}from"@excalidraw/element";import{deepCopyElement as oL}from"@excalidraw/element";import{resizeMultipleElements as rL}from"@excalidraw/element";import{isArrowElement as nL,isElbowArrow as iL,isLinearElement as aL}from"@excalidraw/element";import{updateFrameMembershipOfSelectedElements as vE}from"@excalidraw/element";import{CODES as TE,KEYS as lL,arrayToMap as sL}from"@excalidraw/common";import{CaptureUpdateAction as IE}from"@excalidraw/element";var ou=N({name:"flipHorizontal",label:"labels.flipHorizontal",icon:ob,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:vE(CE(e,r.scene.getNonDeletedElementsMap(),o,"horizontal",r),o,r),appState:o,captureUpdate:IE.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===TE.H}),ru=N({name:"flipVertical",label:"labels.flipVertical",icon:tb,trackEvent:{category:"element"},perform:(e,o,t,r)=>({elements:vE(CE(e,r.scene.getNonDeletedElementsMap(),o,"vertical",r),o,r),appState:o,captureUpdate:IE.IMMEDIATELY}),keyTest:e=>e.shiftKey&&e.code===TE.V&&!e[lL.CTRL_OR_CMD]}),CE=(e,o,t,r,n)=>{let i=$(JM(e),t,{includeBoundTextElement:!0,includeElementsInFrames:!0}),a=cL(i,o,t,r,n),l=sL(a);return e.map(s=>l.get(s.id)||s)},cL=(e,o,t,r,n)=>{if(e.every(u=>nL(u)&&(u.startBinding||u.endBinding)))return e.map(u=>{let f=u;return tL(f,{startArrowhead:f.endArrowhead,endArrowhead:f.startArrowhead})});let{midX:i,midY:a}=wE(e);rL(e,o,"nw",n.scene,new Map(Array.from(o.values()).map(u=>[u.id,oL(u)])),{flipByX:r==="horizontal",flipByY:r==="vertical",shouldResizeFromCenter:!0,shouldMaintainAspectRatio:!0}),QM(e.filter(aL),eL(t),[],n.scene,t.zoom);let{elbowArrows:l,otherElements:s}=e.reduce((u,f)=>iL(f)?{...u,elbowArrows:u.elbowArrows.concat(f)}:{...u,otherElements:u.otherElements.concat(f)},{elbowArrows:[],otherElements:[]}),{midX:c,midY:d}=wE(e),[m,p]=[i-c,a-d];return s.forEach(u=>n.scene.mutateElement(u,{x:u.x+m,y:u.y+p})),l.forEach(u=>n.scene.mutateElement(u,{x:u.x+m,y:u.y+p})),e};import{isTextElement as dL}from"@excalidraw/element";import{getTextFromElements as mL}from"@excalidraw/element";import{CODES as pL,KEYS as SE,isFirefox as uL}from"@excalidraw/common";import{CaptureUpdateAction as _t}from"@excalidraw/element";var ni=N({name:"copy",label:"labels.copy",icon:oa,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});try{await Us(n,r.files,t)}catch(i){return{captureUpdate:_t.EVENTUALLY,appState:{...o,errorMessage:i.message}}}return{captureUpdate:_t.EVENTUALLY}},keyTest:void 0}),nu=N({name:"paste",label:"labels.paste",trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n;try{n=await Kx()}catch(i){return i.name==="AbortError"||i.name==="NotAllowedError"?!1:(console.error(`actionPaste ${i.name}: ${i.message}`),uL?{captureUpdate:_t.EVENTUALLY,appState:{...o,errorMessage:g("hints.firefox_clipboard_write")}}:{captureUpdate:_t.EVENTUALLY,appState:{...o,errorMessage:g("errors.asyncPasteFailedOnRead")}})}try{r.pasteFromClipboard(Vx({types:n}))}catch(i){return console.error(i),{captureUpdate:_t.EVENTUALLY,appState:{...o,errorMessage:g("errors.asyncPasteFailedOnParse")}}}return{captureUpdate:_t.EVENTUALLY}},keyTest:void 0}),tc=N({name:"cut",label:"labels.cut",icon:z0,trackEvent:{category:"element"},perform:(e,o,t,r)=>(ni.perform(e,o,t,r),ma.perform(e,o,null,r)),keyTest:e=>e[SE.CTRL_OR_CMD]&&e.key===SE.X}),oc=N({name:"copyAsSvg",label:"labels.copyAsSvg",icon:rb,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{if(!r.canvas)return{captureUpdate:_t.EVENTUALLY};let{exportedElements:n,exportingFrame:i}=Kr(e,o,!0);try{await Zr("clipboard-svg",n,o,r.files,{...o,exportingFrame:i,name:r.getName()});let a=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});return{appState:{toast:{message:g("toast.copyToClipboardAsSvg",{exportSelection:a.length?g("toast.selection"):g("toast.canvas"),exportColorScheme:o.exportWithDarkMode?g("buttons.darkMode"):g("buttons.lightMode")})}},captureUpdate:_t.EVENTUALLY}}catch(a){return console.error(a),{appState:{errorMessage:a.message},captureUpdate:_t.EVENTUALLY}}},predicate:e=>Gs&&e.length>0,keywords:["svg","clipboard","copy"]}),rc=N({name:"copyAsPng",label:"labels.copyAsPng",icon:nb,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{if(!r.canvas)return{captureUpdate:_t.EVENTUALLY};let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),{exportedElements:i,exportingFrame:a}=Kr(e,o,!0);try{return await Zr("clipboard",i,o,r.files,{...o,exportingFrame:a,name:r.getName()}),{appState:{...o,toast:{message:g("toast.copyToClipboardAsPng",{exportSelection:n.length?g("toast.selection"):g("toast.canvas"),exportColorScheme:o.exportWithDarkMode?g("buttons.darkMode"):g("buttons.lightMode")})}},captureUpdate:_t.EVENTUALLY}}catch(l){return console.error(l),{appState:{...o,errorMessage:l.message},captureUpdate:_t.EVENTUALLY}}},predicate:e=>lr&&e.length>0,keyTest:e=>e.code===pL.C&&e.altKey&&e.shiftKey,keywords:["png","clipboard","copy"]}),nc=N({name:"copyText",label:"labels.copyText",trackEvent:{category:"element"},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0});try{oo(mL(n))}catch{throw new Error(g("errors.copyToSystemClipboardFailed"))}return{captureUpdate:_t.EVENTUALLY}},predicate:(e,o,t,r)=>Gs&&r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0}).some(dL),keywords:["text","clipboard","copy"]});import{CODES as hL,KEYS as gL}from"@excalidraw/common";import{CaptureUpdateAction as fL}from"@excalidraw/element";var ic=N({name:"gridMode",icon:sb,keywords:["snap"],label:"labels.toggleGrid",viewMode:!0,trackEvent:{category:"canvas",predicate:e=>e.gridModeEnabled},perform(e,o){return{appState:{...o,gridModeEnabled:!this.checked(o),objectsSnapModeEnabled:!1},captureUpdate:fL.EVENTUALLY}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>t.gridModeEnabled===void 0,keyTest:e=>e[gL.CTRL_OR_CMD]&&e.code===hL.QUOTE});import{CODES as bL,KEYS as xL}from"@excalidraw/common";import{CaptureUpdateAction as EL}from"@excalidraw/element";var ii=N({name:"zenMode",label:"buttons.zenMode",icon:ab,viewMode:!0,trackEvent:{category:"canvas",predicate:e=>!e.zenModeEnabled},perform(e,o){return{appState:{...o,zenModeEnabled:!this.checked(o)},captureUpdate:EL.EVENTUALLY}},checked:e=>e.zenModeEnabled,predicate:(e,o,t)=>typeof t.zenModeEnabled>"u",keyTest:e=>!e[xL.CTRL_OR_CMD]&&e.altKey&&e.code===bL.Z});import{CODES as yL,KEYS as wL}from"@excalidraw/common";import{CaptureUpdateAction as vL}from"@excalidraw/element";var iu=N({name:"objectsSnapMode",label:"buttons.objectsSnapMode",icon:ib,viewMode:!1,trackEvent:{category:"canvas",predicate:e=>!e.objectsSnapModeEnabled},perform(e,o){return{appState:{...o,objectsSnapModeEnabled:!this.checked(o),gridModeEnabled:!1},captureUpdate:vL.EVENTUALLY}},checked:e=>e.objectsSnapModeEnabled,predicate:(e,o,t)=>typeof t.objectsSnapModeEnabled>"u",keyTest:e=>!e[wL.CTRL_OR_CMD]&&e.altKey&&e.code===yL.S});import{CODES as TL,KEYS as IL}from"@excalidraw/common";import{CaptureUpdateAction as CL}from"@excalidraw/element";var ai=N({name:"stats",label:"stats.fullTitle",icon:eb,viewMode:!0,trackEvent:{category:"menu"},keywords:["edit","attributes","customize"],perform(e,o){return{appState:{...o,stats:{...o.stats,open:!this.checked(o)}},captureUpdate:CL.EVENTUALLY}},checked:e=>e.stats.open,keyTest:e=>!e[IL.CTRL_OR_CMD]&&e.altKey&&e.code===TL.SLASH});import{BOUND_TEXT_PADDING as kE,ROUNDNESS as ME,TEXT_ALIGN as PE,VERTICAL_ALIGN as AE,arrayToMap as DE,getFontString as SL}from"@excalidraw/common";import{getOriginalContainerHeightFromCache as kL,resetOriginalContainerCache as ML,updateOriginalContainerCache as LL}from"@excalidraw/element";import{computeBoundTextPosition as PL,computeContainerDimensionForBoundText as LE,getBoundTextElement as _E,redrawTextBoundingBox as RE}from"@excalidraw/element";import{hasBoundTextElement as AL,isArrowElement as DL,isTextBindableContainer as au,isTextElement as _a,isUsingAdaptiveRadius as _L}from"@excalidraw/element";import{measureText as RL}from"@excalidraw/element";import{syncMovedIndices as NE}from"@excalidraw/element";import{newElement as NL}from"@excalidraw/element";import{CaptureUpdateAction as lu}from"@excalidraw/element";var su=N({name:"unbindText",label:"labels.unbindText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>r.scene.getSelectedElements(o).some(i=>AL(i)),perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=r.scene.getNonDeletedElementsMap();return n.forEach(a=>{let l=_E(a,i);if(l){let{width:s,height:c}=RL(l.originalText,SL(l),l.lineHeight),d=kL(a.id);ML(a.id);let{x:m,y:p}=PL(a,l,i);r.scene.mutateElement(l,{containerId:null,width:s,height:c,text:l.originalText,x:m,y:p}),r.scene.mutateElement(a,{boundElements:a.boundElements?.filter(u=>u.id!==l.id),height:d||a.height})}}),{elements:e,appState:o,captureUpdate:lu.IMMEDIATELY}}}),cu=N({name:"bindText",label:"labels.bindText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);if(n.length===2){let i=_a(n[0])||_a(n[1]),a;if(au(n[0])?a=n[0]:au(n[1])&&(a=n[1]),i&&a&&_E(a,r.scene.getNonDeletedElementsMap())===null)return!0}return!1},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i,a;_a(n[0])&&au(n[1])?(i=n[0],a=n[1]):(i=n[1],a=n[0]),r.scene.mutateElement(i,{containerId:a.id,verticalAlign:AE.MIDDLE,textAlign:PE.CENTER,autoResize:!0,angle:DL(a)?0:a?.angle??0}),r.scene.mutateElement(a,{boundElements:(a.boundElements||[]).concat({type:"text",id:i.id})});let l=a.height;return RE(i,a,r.scene),LL(a.id,l),{elements:BL(e,a,i),appState:{...o,selectedElementIds:{[a.id]:!0}},captureUpdate:lu.IMMEDIATELY}}}),BL=(e,o,t)=>{let r=e.slice(),n=r.findIndex(a=>a.id===t.id);r.splice(n,1);let i=r.findIndex(a=>a.id===o.id);return r.splice(i+1,0,t),NE(r,DE([o,t])),r},FL=(e,o,t)=>{let r=e.slice(),n=r.findIndex(a=>a.id===o.id);r.splice(n,1);let i=r.findIndex(a=>a.id===t.id);return r.splice(i,0,o),NE(r,DE([o,t])),r},BE=N({name:"wrapTextInContainer",label:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=n.some(a=>_a(a));return n.length>0&&i},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o),i=e.slice(),a={};for(let l of n)if(_a(l)){let s=NL({type:"rectangle",backgroundColor:o.currentItemBackgroundColor,boundElements:[...l.boundElements||[],{id:l.id,type:"text"}],angle:l.angle,fillStyle:o.currentItemFillStyle,strokeColor:o.currentItemStrokeColor,roughness:o.currentItemRoughness,strokeWidth:o.currentItemStrokeWidth,strokeStyle:o.currentItemStrokeStyle,roundness:o.currentItemRoundness==="round"?{type:_L("rectangle")?ME.ADAPTIVE_RADIUS:ME.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:l.x-kE,y:l.y-kE,width:LE(l.width,"rectangle"),height:LE(l.height,"rectangle"),groupIds:l.groupIds,frameId:l.frameId});if(l.boundElements?.length){let c=l.boundElements.filter(m=>m.type==="arrow").map(m=>m.id);i.filter(m=>c.includes(m.id)).forEach(m=>{let p=m.startBinding,u=m.endBinding;p?.elementId===l.id&&(p={...p,elementId:s.id}),u?.elementId===l.id&&(u={...u,elementId:s.id}),(p||u)&&r.scene.mutateElement(m,{startBinding:p,endBinding:u})})}r.scene.mutateElement(l,{containerId:s.id,verticalAlign:AE.MIDDLE,boundElements:null,textAlign:PE.CENTER,autoResize:!0}),RE(l,s,r.scene),i=FL([...i,s],s,l),a[s.id]=!0}return{elements:i,appState:{...o,selectedElementIds:a},captureUpdate:lu.IMMEDIATELY}}});import{isEmbeddableElement as eP}from"@excalidraw/element";import{KEYS as XE,getShortcutKey as tP}from"@excalidraw/common";import{CaptureUpdateAction as oP}from"@excalidraw/element";import{pointFrom as HE}from"@excalidraw/math";import OL from"clsx";import{useCallback as FE,useEffect as OE,useLayoutEffect as zL,useRef as HL,useState as GL}from"react";import{EVENT as du,HYPERLINK_TOOLTIP_DELAY as UL,KEYS as ac}from"@excalidraw/common";import{getElementAbsoluteCoords as gu}from"@excalidraw/element";import{hitElementBoundingBox as YL}from"@excalidraw/element";import{isElementLink as WL}from"@excalidraw/element";import{getEmbedLink as VL,embeddableURLValidator as XL}from"@excalidraw/element";import{sceneCoordsToViewportCoords as GE,viewportCoordsToSceneCoords as KL,wrapEvent as ZL,isLocalLink as $L,normalizeLink as mu}from"@excalidraw/common";import{isEmbeddableElement as pu}from"@excalidraw/element";import{jsx as li,jsxs as zE}from"react/jsx-runtime";var fu=380,jL=42,uu=5,UE=85,qL=500,hu=!1,lc=new Map,YE=({element:e,scene:o,setAppState:t,onLinkOpen:r,setToast:n,updateEmbedValidationStatus:i})=>{let a=o.getNonDeletedElementsMap(),l=go(),s=fo(),c=ce(),d=e.link||"",[m,p]=GL(d),u=HL(null),f=l.showHyperlinkPopup==="editor",b=FE(()=>{if(!u.current)return;let v=mu(u.current.value)||null;if(!e.link&&v&&re("hyperlink","create"),pu(e)){if(l.activeEmbeddable?.element===e&&t({activeEmbeddable:null}),!v){o.mutateElement(e,{link:null}),i(e,!1);return}if(!XL(v,s.validateEmbeddable))v&&n({message:g("toast.unableToEmbed"),closable:!0}),e.link&&lc.set(e.id,e.link),o.mutateElement(e,{link:v}),i(e,!1);else{let{width:C,height:S}=e,L=VL(v);L?.error instanceof URIError&&n({message:g("toast.unrecognizedLinkFormat"),closable:!0});let k=L?L.intrinsicSize.w/L.intrinsicSize.h:1,A=lc.get(e.id)!==e.link;o.mutateElement(e,{...A?{width:L?.type==="video"?C>S?C:S*k:C,height:L?.type==="video"&&C>S?C/k:S}:{},link:v}),i(e,!0),lc.has(e.id)&&lc.delete(e.id)}}else o.mutateElement(e,{link:v})},[e,o,n,s.validateEmbeddable,l.activeEmbeddable,t,i]);zL(()=>()=>{b()},[b]),OE(()=>{f&&u?.current&&!(c.viewport.isMobile||c.isTouchScreen)&&u.current.select()},[f,c.viewport.isMobile,c.isTouchScreen]),OE(()=>{let v=null,C=S=>{if(f)return;v&&clearTimeout(v),QL(e,a,l,HE(S.clientX,S.clientY))&&(v=window.setTimeout(()=>{t({showHyperlinkPopup:!1})},qL))};return window.addEventListener(du.POINTER_MOVE,C,!1),()=>{window.removeEventListener(du.POINTER_MOVE,C,!1),v&&clearTimeout(v)}},[l,e,f,t,a]);let x=FE(()=>{re("hyperlink","delete"),o.mutateElement(e,{link:null}),t({showHyperlinkPopup:!1})},[t,e,o]),w=()=>{re("hyperlink","edit","popup-ui"),t({showHyperlinkPopup:"editor"})},{x:E,y}=WE(e,l,a);return l.contextMenu||l.selectedElementsAreBeingDragged||l.resizingElement||l.isRotating||l.openMenu||l.viewModeEnabled?null:zE("div",{className:"excalidraw-hyperlinkContainer",style:{top:`${y}px`,left:`${E}px`,width:fu,padding:uu},children:[f?li("input",{className:OL("excalidraw-hyperlinkContainer-input"),placeholder:g("labels.link.hint"),ref:u,value:m,onChange:v=>p(v.target.value),autoFocus:!0,onKeyDown:v=>{v.stopPropagation(),v[ac.CTRL_OR_CMD]&&v.key===ac.K&&v.preventDefault(),(v.key===ac.ENTER||v.key===ac.ESCAPE)&&(b(),t({showHyperlinkPopup:"info"}))}}):e.link?li("a",{href:mu(e.link||""),className:"excalidraw-hyperlinkContainer-link",target:$L(e.link)?"_self":"_blank",onClick:v=>{if(e.link&&r){let C=ZL(du.EXCALIDRAW_LINK,v.nativeEvent);r({...e,link:mu(e.link)},C),C.defaultPrevented&&v.preventDefault()}},rel:"noopener noreferrer",children:e.link}):li("div",{className:"excalidraw-hyperlinkContainer-link",children:g("labels.link.empty")}),zE("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!f&&li(W,{type:"button",title:g("buttons.edit"),"aria-label":g("buttons.edit"),label:g("buttons.edit"),onClick:w,className:"excalidraw-hyperlinkContainer--edit",icon:jo}),li(W,{type:"button",title:g("labels.linkToElement"),"aria-label":g("labels.linkToElement"),label:g("labels.linkToElement"),onClick:()=>{t({openDialog:{name:"elementLinkSelector",sourceElementId:e.id}})},icon:as}),d&&!pu(e)&&li(W,{type:"button",title:g("buttons.remove"),"aria-label":g("buttons.remove"),label:g("buttons.remove"),onClick:x,className:"excalidraw-hyperlinkContainer--remove",icon:Do})]})]})},WE=(e,o,t)=>{let[r,n]=gu(e,t),{x:i,y:a}=GE({sceneX:r+e.width/2,sceneY:n},o),l=i-o.offsetLeft-fu/2,s=a-o.offsetTop-UE;return{x:l,y:s}},bu=(e,o)=>{let t=$(e,o);return pu(t[0])?"labels.link.editEmbed":t[0]?.link?"labels.link.edit":"labels.link.create"},Ra=null,VE=(e,o,t)=>{Ra&&clearTimeout(Ra),Ra=window.setTimeout(()=>JL(e,o,t),UL)},JL=(e,o,t)=>{if(!e.link)return;let r=$n();r.classList.add("excalidraw-tooltip--visible"),r.style.maxWidth="20rem",r.textContent=WL(e.link)?g("labels.link.goToElement"):e.link;let[n,i,a,l]=gu(e,t),[s,c,d,m]=e1([n,i,a,l],e.angle,o),p=GE({sceneX:s,sceneY:c},o);Pp(r,{left:p.x,top:p.y,width:d,height:m},"top"),re("hyperlink","tooltip","link-icon"),hu=!0},xu=()=>{Ra&&clearTimeout(Ra),hu&&(hu=!1,$n().classList.remove("excalidraw-tooltip--visible"))},QL=(e,o,t,[r,n])=>{let{x:i,y:a}=KL({clientX:r,clientY:n},t),l=15/t.zoom.value;if(YL(HE(i,a),e,o))return!1;let[s,c,d]=gu(e,o);if(i>=s&&i<=d&&a>=c-UE&&a<=c)return!1;let{x:m,y:p}=WE(e,t,o);return!(r>=m-l&&r<=m+fu+uu*2+l&&n>=p-l&&n<=p+l+uu*2+jL)};import{jsx as rP}from"react/jsx-runtime";var Na=N({name:"hyperlink",label:(e,o)=>bu(e,o),icon:ia,perform:(e,o)=>o.showHyperlinkPopup==="editor"?!1:{elements:e,appState:{...o,showHyperlinkPopup:"editor",openMenu:null},captureUpdate:oP.IMMEDIATELY},trackEvent:{category:"hyperlink",action:"click"},keyTest:e=>e[XE.CTRL_OR_CMD]&&e.key===XE.K,predicate:(e,o)=>$(e,o).length===1,PanelComponent:({elements:e,appState:o,updateData:t})=>{let r=$(e,o);return rP(W,{type:"button",icon:ia,"aria-label":g(bu(e,o)),title:`${eP(e[0])?g("labels.link.labelEmbed"):g("labels.link.label")} - ${tP("CtrlOrCmd+K")}`,onClick:()=>t(null),selected:r.length===1&&!!r[0].link})}});import{KEYS as KE,arrayToMap as yu,randomId as nP}from"@excalidraw/common";import{elementsAreInSameGroup as iP,newElementWith as ZE,selectGroupsFromGivenElements as $E}from"@excalidraw/element";import{CaptureUpdateAction as jE}from"@excalidraw/element";var Eu=e=>e.every(o=>!o.locked),Ba=N({name:"toggleElementLock",label:(e,o,t)=>{let r=t.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1});return Eu(r)?"labels.elementLock.lock":"labels.elementLock.unlock"},icon:(e,o)=>{let t=$(o,e);return Eu(t)?$o:Ao},trackEvent:{category:"element"},predicate:(e,o,t,r)=>{let n=r.scene.getSelectedElements(o);return n.length>0&&!n.some(i=>i.locked&&i.frameId)},perform:(e,o,t,r)=>{let n=r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});if(!n.length)return!1;let i=Eu(n),a=yu(n),l=n.length>1&&iP(n),c=n.length===1||l?null:nP(),d={...o.lockedMultiSelections};if(i)d={...o.lockedMultiSelections,...c?{[c]:!0}:{}};else if(l){let w=n[0].groupIds.at(-1);delete d[w]}let m=e.map(w=>{if(!a.has(w.id))return w;let E=w.groupIds;return i?c&&(E=[...E,c]):E=E.filter(y=>!o.lockedMultiSelections[y]),ZE(w,{locked:i,groupIds:E.length!==w.groupIds.length?E:w.groupIds})}),p=yu(m),u=i?{}:Object.fromEntries(n.map(w=>[w.id,!0])),f=n.map(w=>p.get(w.id)||w),b=i?{}:$E(f,o),x=i?c||(l?n[0].groupIds.at(-1):n[0].id):null;return{elements:m,appState:{...o,selectedElementIds:u,selectedGroupIds:b,selectedLinearElement:i?null:o.selectedLinearElement,lockedMultiSelections:d,activeLockedId:x},captureUpdate:jE.IMMEDIATELY}},keyTest:(e,o,t,r)=>e.key.toLocaleLowerCase()===KE.L&&e[KE.CTRL_OR_CMD]&&e.shiftKey&&r.scene.getSelectedElements({selectedElementIds:o.selectedElementIds,includeBoundTextElement:!1}).length>0}),qE=N({name:"unlockAllElements",trackEvent:{category:"canvas"},viewMode:!1,icon:Ao,predicate:(e,o)=>$(e,o).length===0&&e.some(r=>r.locked),perform:(e,o)=>{let t=e.filter(a=>a.locked),r=e.map(a=>{if(a.locked){let l=a.groupIds.filter(s=>!o.lockedMultiSelections[s]);return ZE(a,{locked:!1,groupIds:a.groupIds.length!==l.length?l:a.groupIds})}return a}),n=yu(r),i=t.map(a=>n.get(a.id)||a);return{elements:r,appState:{...o,selectedElementIds:Object.fromEntries(t.map(a=>[a.id,!0])),selectedGroupIds:$E(i,o),lockedMultiSelections:{},activeLockedId:null},captureUpdate:jE.IMMEDIATELY}},label:"labels.elementLock.unlockAll"});import{isElbowArrow as fD,isLinearElement as bD,isLineElement as Si}from"@excalidraw/element";import{arrayToMap as xD,invariant as xh}from"@excalidraw/common";import{toggleLinePolygonState as ED,CaptureUpdateAction as q2}from"@excalidraw/element";import T2 from"clsx";import m7 from"fuzzy";import{useEffect as _c,useRef as p7,useState as Dc}from"react";import{DEFAULT_SIDEBAR as w2,EVENT as Nc,KEYS as ao,capitalizeString as u7,getShortcutKey as h7,isWritableElement as g7}from"@excalidraw/common";import{CaptureUpdateAction as GP}from"@excalidraw/element";import{useEffect as za,useMemo as JE,useRef as Iu,useState as aP}from"react";import{getLinearElementSubType as di,updateElbowArrowPoints as lP}from"@excalidraw/element";import{pointFrom as cc,pointRotateRads as sP}from"@excalidraw/math";import{hasBoundTextElement as cP,isArrowBoundToElement as dP,isArrowElement as mP,isElbowArrow as pP,isLinearElement as Mu,isUsingAdaptiveRadius as uP}from"@excalidraw/element";import{getCommonBoundingBox as hP,getElementAbsoluteCoords as gP}from"@excalidraw/element";import{getBoundTextElement as ry,getBoundTextMaxHeight as fP,getBoundTextMaxWidth as bP,redrawTextBoundingBox as xP}from"@excalidraw/element";import{wrapText as EP}from"@excalidraw/element";import{assertNever as yP,CLASSES as wP,getFontString as wu,isProdEnv as vP,mapFind as TP,reduceToCommonValue as IP,updateActiveTool as QE}from"@excalidraw/common";import{measureText as ey}from"@excalidraw/element";import{LinearElementEditor as CP}from"@excalidraw/element";import{newArrowElement as vu,newElement as SP,newLinearElement as kP}from"@excalidraw/element";import{ShapeCache as MP}from"@excalidraw/element";import{updateBindings as LP}from"@excalidraw/element";import{jsx as ku}from"react/jsx-runtime";var PP=8,AP=10,Fa=["rectangle","diamond","ellipse"],Oa=["line","sharpArrow","curvedArrow","elbowArrow"],DP=new Set(Fa),_P=new Set(Oa),mi=e=>DP.has(e),mc=e=>e==="arrow"||_P.has(e),no=he(null),Ha=new Map,Ga=new Map,RP=({app:e})=>{let o=e.scene.getSelectedElements(e.state),t=Iu(null);return za(()=>{if(o.length===0){e.updateEditorAtom(no,null);return}let r=pi(o);r&&!t.current?t.current=r:(t.current&&!r||t.current&&r!==t.current)&&(e.updateEditorAtom(no,null),t.current=null)},[o,e]),za(()=>()=>{Ha.clear(),Ga.clear()},[]),ku(NP,{app:e,elements:o})},NP=({app:e,elements:o})=>{let t=pi(o),r=JE(()=>t==="generic"?iy(o):[],[t,o]),n=JE(()=>t==="linear"?Su(o):[],[t,o]),i=t==="generic"?r.every(m=>m.type===r[0].type):t==="linear"?n.every(m=>di(m)===di(n[0])):!1,[a,l]=aP({x:0,y:0}),s=Iu(""),c=Iu(null);za(()=>{let m=[...r,...n].sort((x,w)=>x.id.localeCompare(w.id)),p=`
|
|
8
8
|
${e.state.scrollX}${e.state.scrollY}${e.state.offsetTop}${e.state.offsetLeft}${e.state.zoom.value}${m.map(x=>x.id).join(",")}`;if(p===s.current)return;s.current=p;let u;if(m.length===1){let[x,,,w,E,y]=gP(m[0],e.scene.getNonDeletedElementsMap());u=sP(cc(x,w),cc(E,y),m[0].angle)}else{let{minX:x,maxY:w}=hP(m);u=cc(x,w)}let{x:f,y:b}=ly({sceneX:u[0],sceneY:u[1]},e.state);l({x:f,y:b})},[r,n,e.scene,e.state]),za(()=>{for(let m of n){let p=Cu(m.id,HP(m));Ga.has(p)||Ga.set(p,m)}},[n]),za(()=>{for(let m of r)if(!Ha.has(m.id)){let p=ry(m,e.scene.getNonDeletedElementsMap());p&&Ha.set(m.id,{fontSize:p.fontSize})}},[r,e.scene]);let d=t==="linear"?[["line",Mn],["sharpArrow",os],["curvedArrow",ns],["elbowArrow",rs]]:t==="generic"?[["rectangle",Cn],["diamond",Sn],["ellipse",kn]]:[];return ku("div",{ref:c,tabIndex:-1,style:{position:"absolute",top:`${a.y+(AP+8)*e.state.zoom.value-e.state.offsetTop}px`,left:`${a.x-e.state.offsetLeft-PP}px`,zIndex:2},className:wP.CONVERT_ELEMENT_TYPE_POPUP,children:d.map(([m,p])=>{let u=i&&(t==="generic"&&r[0].type===m||t==="linear"&&di(n[0])===m);return ku(W,{className:"Shape",type:"radio",icon:p,checked:u,name:"convertElementType-option",title:m,keyBindingLabel:"","aria-label":m,"data-testid":`toolbar-${m}`,onChange:()=>{e.state.activeTool.type!==m&&re("convertElementType",m,"ui"),Lu(e,{conversionType:t,nextType:m}),c.current?.focus()}},`${o[0].id}${o[0].version}_${m}`)})})},BP=(e,o,t)=>{let r=bP(e,o),n=fP(e,o),i=EP(o.text,wu(o),r),a=ey(i,wu(o),o.lineHeight),l=o.fontSize;for(;(a.width>r||a.height>n)&&l>0;){l-=1;let s={...o,fontSize:l};a=ey(o.text,wu(s),o.lineHeight)}pc(o,t.getNonDeletedElementsMap(),{fontSize:l,width:a.width,height:a.height}),xP(o,e,t)},Lu=(e,{conversionType:o,nextType:t,direction:r="right"})=>{if(!o)return!1;let n=e.scene.getSelectedElements(e.state),i=n.reduce((l,s)=>({...l,[s.id]:!0}),{}),a=r==="right"?1:-1;if(o==="generic"){let l=iy(n),c=l.every(d=>d.type===l[0].type)?Fa.indexOf(l[0].type):-1;if(t=t??Fa[(c+Fa.length+a)%Fa.length],t&&mi(t)){let d={};for(let p of l){let u=oy(p,t,e);d[u.id]=u}let m=[];for(let p of e.scene.getElementsIncludingDeleted())d[p.id]?m.push(d[p.id]):m.push(p);e.scene.replaceAllElements(m);for(let p of Object.values(d)){let u=ry(p,e.scene.getNonDeletedElementsMap());u&&(Ha.get(p.id)&&pc(u,e.scene.getNonDeletedElementsMap(),{fontSize:Ha.get(p.id)?.fontSize??u.fontSize}),BP(p,u,e.scene))}e.setState(p=>({selectedElementIds:i,activeTool:QE(p,{type:"selection"})}))}}if(o==="linear"){let l=Su(n);if(!t){let c=IP(l,di),d=c?Oa.indexOf(c):-1;t=Oa[(d+Oa.length+a)%Oa.length]}if(mc(t)){let c=[],d=e.scene.getElementsMapIncludingDeleted();for(let m of l){let p=Ga.get(Cu(m.id,t));if(p&&di(p)===t)d.set(p.id,p),c.push(p);else{let u=oy(m,t,e);d.set(u.id,u),c.push(u)}}e.scene.replaceAllElements(d);for(let m of c)if(Mu(m))if(pP(m)){let p=FP(m);if(p.length<2)continue;let u=[];for(let b=1;b<p.length-2;b++)u.push({start:p[b],end:p[b+1],index:b+1});let f=lP(m,e.scene.getNonDeletedElementsMap(),{points:p,fixedSegments:u});pc(m,e.scene.getNonDeletedElementsMap(),{...f,endArrowhead:"arrow"})}else{let p=TP(["line","sharpArrow","curvedArrow"],u=>Ga.get(Cu(m.id,u)));if(p){let u=p.points;e.scene.mutateElement(m,{points:u})}}}let s=Su(e.scene.getSelectedElements(e.state));e.setState(c=>({selectedElementIds:i,selectedLinearElement:s.length===1?new CP(s[0],e.scene.getNonDeletedElementsMap()):null,activeTool:QE(c,{type:"selection"})}))}return!0},pi=e=>{if(e.length===0)return null;let o=!1;for(let t of e){if(mi(t.type))return"generic";ny(t)&&(o=!0)}return o?"linear":null},ny=e=>Mu(e)&&(!mP(e)||!dP(e)&&!cP(e)),Cu=(e,o)=>`${e}:${o}`,iy=e=>e.filter(o=>mi(o.type)),Su=e=>e.filter(o=>ny(o)),sc=20,si=(e,o)=>e[0]===o[0],Tu=(e,o)=>e[1]===o[1],ty=(e,o)=>si(e,o)?Math.abs(e[1]-o[1]):Math.abs(e[0]-o[0]),FP=e=>{let o=[e.points[0]],t=OP(e.points);for(let i=1;i<t.length;++i){let a=o[o.length-1],l=[...t[i]];Math.abs(l[0]-a[0])<sc?l[0]=a[0]:Math.abs(l[1]-a[1])<sc&&(l[1]=a[1]),si(a,l)||Tu(a,l)||o.push(cc(a[0],l[1])),o.push(l)}let r=[o[0]];for(let i=1;i<o.length-1;++i)si(o[i-1],o[i])&&si(o[i],o[i+1])||Tu(o[i-1],o[i])&&Tu(o[i],o[i+1])||r.push(o[i]);r.push(o[o.length-1]);let n=[r[0]];for(let i=1;i<r.length-1;++i){let a=n[n.length-1],l=r[i],s=r[i+1],c=si(a,l),d=si(l,s);if(c!==d){let m=ty(a,l),p=ty(l,s);if(m<sc||p<sc){if(p<m)c?s[0]=a[0]:s[1]=a[1];else if(d)for(let u=n.length-1;u>=0&&n[u][0]===a[0];--u)n[u][0]=l[0];else for(let u=n.length-1;u>=0&&n[u][1]===a[1];--u)n[u][1]=l[1];continue}}n.push(l)}return n.push(r[r.length-1]),n},OP=e=>{if(e.length===0)return[];let o=[e[0]];for(let t=1;t<e.length;t++){let[r,n]=o[o.length-1],[i,a]=e[t];(r!==i||n!==a)&&o.push(e[t])}return o},oy=(e,o,t)=>{if(!zP(e.type,o)){if(!vP())throw Error(`Invalid conversion from ${e.type} to ${o}.`);return e}if(e.type===o)return e;if(MP.delete(e),mi(o)){let r=ci(SP({...e,type:o,roundness:o==="diamond"&&e.roundness?{type:uP(o)?dc.ADAPTIVE_RADIUS:dc.PROPORTIONAL_RADIUS}:e.roundness}));return LP(r,t.scene),r}if(mc(o))switch(o){case"line":return ci(kP({...e,type:"line"}));case"sharpArrow":return ci(vu({...e,type:"arrow",elbowed:!1,roundness:null,startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"curvedArrow":return ci(vu({...e,type:"arrow",elbowed:!1,roundness:{type:dc.PROPORTIONAL_RADIUS},startArrowhead:t.state.currentItemStartArrowhead,endArrowhead:t.state.currentItemEndArrowhead}));case"elbowArrow":return ci(vu({...e,type:"arrow",elbowed:!0,fixedSegments:null,roundness:null}))}return yP(o,`unhandled conversion type: ${o}`),e},zP=(e,o)=>!!(mi(e)&&mi(o)||mc(e)&&mc(o)),HP=e=>Mu(e)?di(e):e.type,ay=RP;var sy=N({name:"toggleShapeSwitch",label:"labels.shapeSwitch",icon:()=>null,viewMode:!0,trackEvent:{category:"shape_switch",action:"toggle"},keywords:["change","switch","swap"],perform(e,o,t,r){return Ke.set(no,{type:"panel"}),{captureUpdate:GP.NEVER}},checked:e=>e.gridModeEnabled,predicate:(e,o,t)=>pi(e)!==null});import{canCreateLinkFromElements as Pu,defaultGetElementLinkFromSelection as UP,getLinkIdAndTypeFromSelection as YP}from"@excalidraw/element";import{CaptureUpdateAction as Ua}from"@excalidraw/element";var uc=N({name:"copyElementLink",label:"labels.copyElementLink",icon:Dn,trackEvent:{category:"element"},perform:async(e,o,t,r)=>{let n=$(e,o);try{if(window.location){let i=YP(n,o);return i?(await oo(r.props.generateLinkForSelection?r.props.generateLinkForSelection(i.id,i.type):UP(i.id,i.type)),{appState:{toast:{message:g("toast.elementLinkCopied"),closable:!0}},captureUpdate:Ua.EVENTUALLY}):{appState:o,elements:e,app:r,captureUpdate:Ua.EVENTUALLY}}}catch(i){console.error(i)}return{appState:o,elements:e,app:r,captureUpdate:Ua.EVENTUALLY}},predicate:(e,o)=>Pu($(e,o))}),cy=N({name:"linkToElement",label:"labels.linkToElement",icon:as,perform:(e,o,t,r)=>{let n=$(e,o);return n.length!==1||!Pu(n)?{elements:e,appState:o,app:r,captureUpdate:Ua.EVENTUALLY}:{appState:{...o,openDialog:{name:"elementLinkSelector",sourceElementId:$(e,o)[0].id}},captureUpdate:Ua.IMMEDIATELY}},predicate:(e,o,t,r)=>{let n=$(e,o);return o.openDialog?.name!=="elementLinkSelector"&&n.length===1&&Pu(n)},trackEvent:!1});import{isDarwin as dy,getShortcutKey as oe}from"@excalidraw/common";var WP={toggleTheme:[oe("Shift+Alt+D")],saveScene:[oe("CtrlOrCmd+S")],loadScene:[oe("CtrlOrCmd+O")],imageExport:[oe("CtrlOrCmd+Shift+E")],commandPalette:[oe("CtrlOrCmd+/"),oe("CtrlOrCmd+Shift+P")],cut:[oe("CtrlOrCmd+X")],copy:[oe("CtrlOrCmd+C")],paste:[oe("CtrlOrCmd+V")],copyStyles:[oe("CtrlOrCmd+Alt+C")],pasteStyles:[oe("CtrlOrCmd+Alt+V")],selectAll:[oe("CtrlOrCmd+A")],deleteSelectedElements:[oe("Delete")],duplicateSelection:[oe("CtrlOrCmd+D"),oe(`Alt+${g("helpDialog.drag")}`)],sendBackward:[oe("CtrlOrCmd+[")],bringForward:[oe("CtrlOrCmd+]")],sendToBack:[dy?oe("CtrlOrCmd+Alt+["):oe("CtrlOrCmd+Shift+[")],bringToFront:[dy?oe("CtrlOrCmd+Alt+]"):oe("CtrlOrCmd+Shift+]")],copyAsPng:[oe("Shift+Alt+C")],group:[oe("CtrlOrCmd+G")],ungroup:[oe("CtrlOrCmd+Shift+G")],gridMode:[oe("CtrlOrCmd+'")],zenMode:[oe("Alt+Z")],objectsSnapMode:[oe("Alt+S")],stats:[oe("Alt+/")],addToLibrary:[],flipHorizontal:[oe("Shift+H")],flipVertical:[oe("Shift+V")],viewMode:[oe("Alt+R")],hyperlink:[oe("CtrlOrCmd+K")],toggleElementLock:[oe("CtrlOrCmd+Shift+L")],resetZoom:[oe("CtrlOrCmd+0")],zoomOut:[oe("CtrlOrCmd+-")],zoomIn:[oe("CtrlOrCmd++")],zoomToFitSelection:[oe("Shift+3")],zoomToFit:[oe("Shift+1")],zoomToFitSelectionInViewport:[oe("Shift+2")],toggleEraserTool:[oe("E")],toggleHandTool:[oe("H")],setFrameAsActiveTool:[oe("F")],saveFileToDisk:[oe("CtrlOrCmd+S")],saveToActiveFile:[oe("CtrlOrCmd+S")],toggleShortcuts:[oe("?")],searchMenu:[oe("CtrlOrCmd+F")],wrapSelectionInFrame:[],arrangeElements:[oe("Shift+R")]},Se=(e,o=0)=>{let t=WP[e];return t&&t.length>0?t[o]||t[0]:""};var VP="\\u0300-\\u036f",XP="\\ufe20-\\ufe2f",KP="\\u20d0-\\u20ff",ZP=VP+XP+KP,$P=`[${ZP}]`,jP=RegExp($P,"g"),qP=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,JP={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"E",\u00E6:"e",\u00DE:"T",\u00FE:"t",\u00DF:"s",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"I",\u0133:"i",\u0152:"E",\u0153:"e",\u0149:"n",\u017F:"s"},Au=e=>e.replace(qP,o=>JP[o]||o).replace(jP,"");import G8 from"clsx";import{useEffect as U8,useState as Y8}from"react";import{KEYS as W8,queryFocusableElements as c2}from"@excalidraw/common";import{useCallback as QP,useState as eA}from"react";var my=()=>{let[e,o]=eA(null),t=QP(r=>o(r),[]);return[e,t]};import{useState as r2,useCallback as Ku,useMemo as n2,useEffect as e2,memo as i2,useRef as P8}from"react";import{LIBRARY_DISABLED_TYPES as A8,randomId as D8,isShallowEqual as _8}from"@excalidraw/common";import{useEffect as gy,useRef as fy}from"react";import{URL_HASH_KEYS as Ru,URL_QUERY_KEYS as Nu,APP_NAME as by,EVENT as gc,DEFAULT_SIDEBAR as iA,LIBRARY_SIDEBAR_TAB as aA,arrayToMap as Bu,cloneJSON as lA,preventUnload as sA,promiseTry as xy,resolvablePromise as cA,toValidURL as dA,Queue as mA,Emitter as pA}from"@excalidraw/common";import{hashElementsVersion as uA,hashString as hA}from"@excalidraw/element";import{getCommonBoundingBox as _u}from"@excalidraw/element";import{MIME_TYPES as Jr}from"@excalidraw/common";var cr=({elements:e,appState:o,files:t,maxWidthOrHeight:r,getDimensions:n,exportPadding:i,exportingFrame:a})=>{let{elements:l,appState:s}=yn({elements:e,appState:o},null,null),{exportBackground:c,viewBackgroundColor:d}=s;return zl(l,{...s,offsetTop:0,offsetLeft:0,width:0,height:0},t||{},{exportBackground:c,exportPadding:i,viewBackgroundColor:d,exportingFrame:a},(m,p)=>{let u=document.createElement("canvas");if(r){typeof n=="function"&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");let b=Math.max(m,p),x=r<b?r/b:o?.exportScale??1;return u.width=m*x,u.height=p*x,{canvas:u,scale:x}}let f=n?.(m,p)||{width:m,height:p};return u.width=f.width,u.height=f.height,{canvas:u,scale:f.scale??1}})},py=async e=>{let{mimeType:o=Jr.png,quality:t}=e;o===Jr.png&&typeof t=="number"&&console.warn(`"quality" will be ignored for "${Jr.png}" mimeType`),o==="image/jpg"&&(o=Jr.jpg),o===Jr.jpg&&!e.appState?.exportBackground&&(console.warn(`Defaulting "exportBackground" to "true" for "${Jr.jpg}" mimeType`),e={...e,appState:{...e.appState,exportBackground:!0}});let r=await cr(e);return t=t||(/image\/jpe?g/.test(o)?.92:.8),new Promise((n,i)=>{r.toBlob(async a=>{if(!a)return i(new Error("couldn't export to blob"));a&&o===Jr.png&&e.appState?.exportEmbedScene&&(a=await c1({blob:a,metadata:ji(e.elements,e.appState,e.files||{},"local")})),n(a)},o,t)})},ui=async({elements:e,appState:o=bn(),files:t={},exportPadding:r,renderEmbeddables:n,exportingFrame:i,skipInliningFonts:a,reuseImages:l})=>{let{elements:s,appState:c}=yn({elements:e,appState:o},null,null),d={...c,exportPadding:r};return En(s,d,t,{exportingFrame:i,renderEmbeddables:n,skipInliningFonts:a,reuseImages:l})},tA=async e=>{if(e.type==="svg"){let o=await ui(e);await oo(o.outerHTML)}else if(e.type==="png")await Ws(py(e));else if(e.type==="json")await Us(e.elements,e.files);else throw new Error("Invalid export type")};import{useEffect as oA,useState as rA}from"react";import{COLOR_PALETTE as nA}from"@excalidraw/common";var Du=he(new Map),uy=async e=>await ui({elements:e,appState:{exportBackground:!1,viewBackgroundColor:nA.white},files:null,renderEmbeddables:!1,skipInliningFonts:!0}),hy=(e,o,t)=>{let[r,n]=rA();return oA(()=>{if(o)if(e){let i=t.get(e);i?n(i):(async()=>{let a=await uy(o);a.querySelector(".style-fonts")?.remove(),a&&(t.set(e,a),n(a))})()}else(async()=>{let i=await uy(o);n(i)})()},[e,o,t,n]),r},hc=()=>{let[e]=se(Du);return{clearLibraryCache:()=>e.clear(),deleteItemsFromLibraryCache:r=>{r.forEach(n=>e.delete(n))},svgCache:e}};var gA=["excalidraw.com","raw.githubusercontent.com/excalidraw/excalidraw-libraries"],yy=new pA,Qr=he({status:"loaded",isInitialized:!1,libraryItems:[]}),Ya=e=>lA(e),fA=(e,o)=>!e.find(t=>t.elements.length!==o.elements.length?!1:t.elements.every((r,n)=>r.id===o.elements[n].id&&r.versionNonce===o.elements[n].versionNonce)),wy=(e,o)=>{let t=[];for(let r of o)fA(e,r)&&t.push(r);return[...t,...e]},vy=(e,o)=>{let t=Bu(o),r={deletedItems:new Map,addedItems:new Map};for(let i of e)t.has(i.id)||r.deletedItems.set(i.id,i);let n=Bu(e);for(let i of o)n.has(i.id)||r.addedItems.set(i.id,i);return r},Fu=class{constructor(o){I(this,"currLibraryItems",[]);I(this,"prevLibraryItems",Ya(this.currLibraryItems));I(this,"app");I(this,"updateQueue",[]);I(this,"getLastUpdateTask",()=>this.updateQueue[this.updateQueue.length-1]);I(this,"notifyListeners",()=>{if(this.updateQueue.length>0)Ke.set(Qr,o=>({status:"loading",libraryItems:this.currLibraryItems,isInitialized:o.isInitialized}));else{Ke.set(Qr,{status:"loaded",libraryItems:this.currLibraryItems,isInitialized:!0});try{let o=this.prevLibraryItems;this.prevLibraryItems=Ya(this.currLibraryItems);let t=Ya(this.currLibraryItems);this.app.props.onLibraryChange?.(t),yy.trigger(vy(o,t),t)}catch(o){console.error(o)}}});I(this,"destroy",()=>{this.updateQueue=[],this.currLibraryItems=[],Ke.set(Du,new Map)});I(this,"resetLibrary",()=>this.setLibrary([]));I(this,"getLatestLibrary",()=>new Promise(async o=>{try{let t=await(this.getLastUpdateTask()||this.currLibraryItems);this.updateQueue.length>0?o(this.getLatestLibrary()):o(Ya(t))}catch{return o(this.currLibraryItems)}}));I(this,"updateLibrary",async({libraryItems:o,prompt:t=!1,merge:r=!1,openLibraryMenu:n=!1,defaultStatus:i="unpublished"})=>(n&&this.app.setState({openSidebar:{name:iA.name,tab:aA}}),this.setLibrary(()=>new Promise(async(a,l)=>{try{let s=await(typeof o=="function"&&!(o instanceof Blob)?o(this.currLibraryItems):o),c;s instanceof Blob?c=await fm(s,i):c=Qi(s,i),!t||window.confirm(g("alerts.confirmAddLibrary",{numShapes:c.length}))?(t&&this.app.focusContainer(),a(r?wy(this.currLibraryItems,c):c)):l(new fn)}catch(s){l(s)}}))));I(this,"setLibrary",o=>{let t=new Promise(async(r,n)=>{try{await this.getLastUpdateTask(),typeof o=="function"&&(o=o(this.currLibraryItems)),this.currLibraryItems=Ya(await o),r(this.currLibraryItems)}catch(i){n(i)}}).catch(r=>{if(r.name==="AbortError")return console.warn("Library update aborted by user"),this.currLibraryItems;throw r}).finally(()=>{this.updateQueue=this.updateQueue.filter(r=>r!==t),this.notifyListeners()});return this.updateQueue.push(t),this.notifyListeners(),t});this.app=o}},Ty=Fu,xc=e=>{let t=Math.ceil(Math.sqrt(e.length)),r=[],n=u=>e.slice(u*t,u*t+t).reduce((b,x)=>{let{height:w}=_u(x.elements);return Math.max(b,w)},0),i=u=>{let f=0,b=0,x=0;for(let w of e){if(f%t===0&&(b=0),b===u){let{width:E}=_u(w.elements);x=Math.max(x,E)}f++,b++}return x},a=0,l=0,s=0,c=0,d=0,m=0,p=0;for(let u of e){d&&d%t===0&&(l+=s+50,a=0,m=0,p++),m===0&&(s=n(p)),c=i(m);let{minX:f,minY:b,width:x,height:w}=_u(u.elements),E=(c-x)/2,y=(s-w)/2;r.push(...u.elements.map(v=>({...v,x:v.x+a+E-f,y:v.y+l+y-b}))),a+=c+50,d++,m++}return r},bA=(e,o=gA)=>{if(typeof o=="function"?o(e):o.some(t=>{let r=new URL(`https://${t.replace(/^https?:\/\//,"")}`),{hostname:n,pathname:i}=new URL(e);return new RegExp(`(^|\\.)${r.hostname}$`).test(n)&&new RegExp(`^${r.pathname.replace(/\/+$/,"")}(/+|$)`).test(i)}))return!0;throw new Error(`Invalid or disallowed library URL: "${e}"`)},Ou=()=>{let e=new URLSearchParams(window.location.hash.slice(1)).get(Ru.addLibrary)||new URLSearchParams(window.location.search).get(Nu.addLibrary),o=e?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return e?{libraryUrl:e,idToken:o}:null},dr=class dr{constructor(o){I(this,"adapter");this.adapter=o}static async getLibraryItems(o,t,r=!0){let n=()=>new Promise(async(i,a)=>{try{let l=await o.load({source:t});i(Qi(l?.libraryItems||[],"published"))}catch(l){a(l)}});return r?dr.queue.push(n):n()}getLibraryItems(o){return dr.getLibraryItems(this.adapter,o,!1)}};I(dr,"queue",new mA),I(dr,"run",async(o,t)=>{let r=new dr(o);return dr.queue.push(()=>t(r))});var hi=dr,Wa=0,fc=0,bc=e=>hA(e.map(o=>`${o.id}:${uA(o.elements)}`).sort().join()),Ey=async(e,o)=>{try{return fc++,await hi.run(e,async t=>{let r=Bu(await t.getLibraryItems("save"));for(let[l]of o.deletedItems)r.delete(l);let n=[];for(let[l,s]of o.addedItems)r.has(l)?r.set(l,s):n.push(s);let i=n.concat(Array.from(r.values())),a=bc(i);return a!==Wa&&await e.save({libraryItems:i}),Wa=a,i})}finally{fc--}},xA=e=>{let{excalidrawAPI:o}=e,t=fy(e);t.current=e;let r=fy(!1);gy(()=>{if(!o)return;r.current=!1;let n=async({libraryUrl:l,idToken:s})=>{let c=new Promise(async(m,p)=>{try{l=decodeURIComponent(l),l=dA(l),bA(l,t.current.validateLibraryUrl);let f=await(await fetch(l)).blob();m(f)}catch(u){p(u)}}),d=s!==o.id;await(d&&document.hidden?new Promise(m=>{window.addEventListener("focus",()=>m(),{once:!0})}):null);try{await o.updateLibrary({libraryItems:c,prompt:d,merge:!0,defaultStatus:"published",openLibraryMenu:!0})}catch(m){throw o.updateScene({appState:{errorMessage:m.message}}),m}finally{if(window.location.hash.includes(Ru.addLibrary)){let m=new URLSearchParams(window.location.hash.slice(1));m.delete(Ru.addLibrary),window.history.replaceState({},by,`#${m.toString()}`)}else if(window.location.search.includes(Nu.addLibrary)){let m=new URLSearchParams(window.location.search);m.delete(Nu.addLibrary),window.history.replaceState({},by,`?${m.toString()}`)}}},i=l=>{l.preventDefault();let s=Ou();s&&(l.stopImmediatePropagation(),window.history.replaceState({},"",l.oldURL),n(s))},a=Ou();if(a&&n(a),"getInitialLibraryItems"in t.current&&t.current.getInitialLibraryItems&&(console.warn("useHandleLibrar `opts.getInitialLibraryItems` is deprecated. Use `opts.adapter` instead."),Promise.resolve(t.current.getInitialLibraryItems()).then(l=>{o.updateLibrary({libraryItems:l,merge:!0})}).catch(l=>{console.error(`UseHandeLibrary getInitialLibraryItems failed: ${l?.message}`)})),"adapter"in t.current&&t.current.adapter){let l=t.current.adapter,s=t.current.migrationAdapter,c=cA();s?c.resolve(xy(s.load).then(async d=>{let m=null;try{if(!d)return hi.getLibraryItems(l,"load");m=Qi(d.libraryItems||[],"published");let p=await Ey(l,vy([],m));try{await s.clear()}catch(u){console.error(`couldn't delete legacy library data: ${u.message}`)}return p}catch(p){return console.error(`couldn't migrate legacy library data: ${p.message}`),m}}).catch(d=>(console.error(`error during library migration: ${d.message}`),hi.getLibraryItems(l,"load")))):c.resolve(xy(hi.getLibraryItems,l,"load")),o.updateLibrary({libraryItems:c.then(d=>{let m=d||[];return Wa=bc(m),m}),merge:!0}).finally(()=>{r.current=!0})}return window.addEventListener(gc.HASHCHANGE,i),()=>{window.removeEventListener(gc.HASHCHANGE,i)}},[o]),gy(()=>{let n=yy.on(async(a,l)=>{let s=r.current,c="adapter"in t.current&&t.current.adapter||null;try{c&&Wa!==bc(l)&&await Ey(c,a)}catch(d){console.error(`couldn't persist library update: ${d.message}`,a),s&&t.current.excalidrawAPI&&t.current.excalidrawAPI.updateScene({appState:{errorMessage:g("errors.saveLibraryError")}})}}),i=a=>{fc&&sA(a)};return window.addEventListener(gc.BEFORE_UNLOAD,i),()=>{window.removeEventListener(gc.BEFORE_UNLOAD,i),n(),Wa=0,fc=0}},[])};import vA from"clsx";import{VERSIONS as EA}from"@excalidraw/common";import{jsx as wA}from"react/jsx-runtime";var yA=({theme:e,id:o,libraryReturnUrl:t})=>{let r=t||window.location.origin+window.location.pathname;return wA("a",{className:"library-menu-browse-button",href:`${T.VITE_APP_LIBRARY_URL}?target=${window.name||"_blank"}&referrer=${r}&useHash=true&token=${o}&theme=${e}&version=${EA.excalidrawLibrary}`,target:"_excalidraw_libraries",children:g("labels.libraries")})},Iy=yA;import{jsx as TA,jsxs as IA}from"react/jsx-runtime";var Ec=({libraryReturnUrl:e,theme:o,id:t,style:r,children:n,className:i})=>IA("div",{className:vA("library-menu-control-buttons",i),style:r,children:[TA(Iy,{id:t,libraryReturnUrl:e,theme:o}),n]});import{useCallback as bi,useEffect as v8,useMemo as Jy,useRef as T8,useState as I8}from"react";import{MIME_TYPES as C8,arrayToMap as S8}from"@excalidraw/common";import{duplicateElements as k8}from"@excalidraw/element";import CA from"lodash.throttle";import{useEffect as SA}from"react";var kA=he(0),Cy=e=>{let[o,t]=se(kA);return SA(()=>{let{current:r}=e;if(!r)return;let n=CA(()=>{let{scrollTop:i}=r;t(i)},200);return r.addEventListener("scroll",n),()=>{n.cancel(),r.removeEventListener("scroll",n)}},[e,t]),o};import i8 from"clsx";import{useCallback as a8,useState as Uu}from"react";import{muteFSAbortError as l8}from"@excalidraw/common";import{flushSync as Sy}from"react-dom";import MA from"clsx";import{jsx as yc,jsxs as PA}from"react/jsx-runtime";var LA=({label:e,onClick:o,className:t,children:r,actionType:n,type:i="button",isLoading:a,...l})=>{let s=n?`Dialog__action-button--${n}`:"";return PA("button",{className:MA("Dialog__action-button",s,t),type:i,"aria-label":e,onClick:o,...l,children:[r&&yc("div",{style:a?{visibility:"hidden"}:{},children:r}),yc("div",{style:a?{visibility:"hidden"}:{},children:e}),a&&yc("div",{style:{position:"absolute",inset:0},children:yc(tt,{})})]})},Oo=LA;import{jsx as ky,jsxs as My}from"react/jsx-runtime";var AA=e=>{let{onConfirm:o,onCancel:t,children:r,confirmText:n=g("buttons.confirm"),cancelText:i=g("buttons.cancel"),className:a="",...l}=e,s=le(),c=wn(gi),{container:d}=ze();return My(Ne,{onCloseRequest:t,size:"small",...l,className:`confirm-dialog ${a}`,children:[r,My("div",{className:"confirm-dialog-buttons",children:[ky(Oo,{label:i,onClick:()=>{s({openMenu:null}),c(!1),Sy(()=>{t()}),d?.focus()}}),ky(Oo,{label:n,onClick:()=>{s({openMenu:null}),c(!1),Sy(()=>{o()}),d?.focus()},actionType:"danger"})]})]})},Ly=AA;import vc from"open-color";import{useCallback as OA,useEffect as Gu,useRef as Py,useState as zu}from"react";import{EDITOR_LS_KEYS as Hu,EXPORT_DATA_TYPES as zA,MIME_TYPES as Ay,VERSIONS as HA,chunk as GA,getExportSource as UA}from"@excalidraw/common";var Ut=class{static has(o){try{return!!window.localStorage.getItem(o)}catch(t){return console.warn(`localStorage.getItem error: ${t.message}`),!1}}static get(o){try{let t=window.localStorage.getItem(o);return t?JSON.parse(t):null}catch(t){return console.warn(`localStorage.getItem error: ${t.message}`),null}}};I(Ut,"set",(o,t)=>{try{return window.localStorage.setItem(o,JSON.stringify(t)),!0}catch(r){return console.warn(`localStorage.setItem error: ${r.message}`),!1}}),I(Ut,"delete",o=>{try{window.localStorage.removeItem(o)}catch(t){console.warn(`localStorage.removeItem error: ${t.message}`)}});import wc from"react";var DA=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,_A=/{{([\w-]+)}}/,RA=/<([\w-]+)>/,NA=/<\/([\w-]+)>/,BA=(e,o)=>{let t=[{name:"",children:[]}];return e.split(DA).filter(Boolean).forEach(r=>{let n=r.match(RA),i=r.match(NA),a=r.match(_A);if(n!==null){let l=n[1];o.hasOwnProperty(l)?t.push({name:l,children:[]}):console.warn(`Trans: missed to pass in prop ${l} for interpolating ${e}`)}else if(i!==null)if(i[1]===t[t.length-1].name){let s=t.pop(),c=wc.createElement(wc.Fragment,{},...s.children),d=o[s.name];typeof d=="function"&&t[t.length-1].children.push(d(c))}else console.warn(`Trans: unexpected end tag ${r} for interpolating ${e}`);else if(a!==null){let l=a[1];o.hasOwnProperty(l)?t[t.length-1].children.push(o[l]):console.warn(`Trans: key ${l} not in props for interpolating ${e}`)}else t[t.length-1].children.push(r)}),t.length!==1&&console.warn(`Trans: stack not empty for interpolating ${e}`),t[0].children},FA=({i18nKey:e,children:o,...t})=>{let{t:r}=Oe();return wc.createElement(wc.Fragment,{},...BA(r(e),t))},ut=FA;import{jsx as ie,jsxs as lt}from"react/jsx-runtime";var YA=async e=>{let r=Math.round(8),n=Math.max(Math.round(128/64),2),i=GA(e,6),a=document.createElement("canvas");a.width=i[0].length*128+(i[0].length+1)*(r*2)-r*2,a.height=i.length*128+(i.length+1)*(r*2)-r*2;let l=a.getContext("2d");l.fillStyle=vc.white,l.fillRect(0,0,a.width,a.height);for(let[s,c]of e.entries()){let d=await cr({elements:c.elements,files:null,maxWidthOrHeight:128}),{width:m,height:p}=d,u=Math.floor(s/6)*(128+r*2),f=s%6*(128+r*2);l.drawImage(d,f+(128-m)/2+r,u+(128-p)/2+r),l.lineWidth=n,l.strokeStyle=vc.gray[4],l.strokeRect(f+r/2,u+r/2,128+r,128+r)}return await Ul(new File([await Lo(a)],"preview",{type:Ay.png}),{outputType:Ay.jpg,maxWidthOrHeight:5e3})},WA=({libItem:e,appState:o,index:t,onChange:r,onRemove:n})=>{let i=Py(null),a=Py(null);return Gu(()=>{let l=i.current;l&&(async()=>{let s=await ui({elements:e.elements,appState:{...o,viewBackgroundColor:vc.white,exportBackground:!0},files:null,skipInliningFonts:!0});l.innerHTML=s.outerHTML})()},[e.elements,o]),lt("div",{className:"single-library-item",children:[e.status==="published"&&ie("span",{className:"single-library-item-status",children:g("labels.statusPublished")}),ie("div",{ref:i,className:"single-library-item__svg"}),ie(W,{"aria-label":g("buttons.remove"),type:"button",icon:Ft,className:"single-library-item--remove",onClick:n.bind(null,e.id),title:g("buttons.remove")}),lt("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[lt("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[lt("div",{style:{padding:"0.5em 0"},children:[ie("span",{style:{fontWeight:500,color:vc.gray[6]},children:g("publishDialog.itemName")}),ie("span",{"aria-hidden":"true",className:"required",children:"*"})]}),ie("input",{type:"text",ref:a,style:{width:"80%",padding:"0.2rem"},defaultValue:e.name,placeholder:"Item name",onChange:l=>{r(l.target.value,t)}})]}),ie("span",{className:"error",children:e.error})]})]})},VA=({onClose:e,libraryItems:o,appState:t,onSuccess:r,onError:n,updateItemsInStorage:i,onRemove:a})=>{let[l,s]=zu({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),[c,d]=zu(!1);Gu(()=>{let y=Ut.get(Hu.PUBLISH_LIBRARY);y&&s(y)},[]);let[m,p]=zu(o.slice());Gu(()=>{p(o.slice())},[o]);let u=y=>{s({...l,[y.target.name]:y.target.value})},f=async y=>{y.preventDefault(),d(!0);let v=[],C=!1;if(m.forEach(B=>{let O="";B.name||(O=g("publishDialog.errors.required"),C=!0),v.push({...B,error:O})}),C){p(v),d(!1);return}let S=await YA(m),L={type:zA.excalidrawLibrary,version:HA.excalidrawLibrary,source:UA(),libraryItems:m},k=JSON.stringify(L,null,2),A=new Blob([k],{type:"application/json"}),P=new FormData;P.append("excalidrawLib",A),P.append("previewImage",S),P.append("previewImageType",S.type),P.append("title",l.name),P.append("authorName",l.authorName),P.append("githubHandle",l.githubHandle),P.append("name",l.name),P.append("description",l.description),P.append("twitterHandle",l.twitterHandle),P.append("website",l.website),fetch(`${T.VITE_APP_LIBRARY_BACKEND}/submit`,{method:"post",body:P}).then(B=>B.ok?B.json().then(({url:O})=>{Ut.delete(Hu.PUBLISH_LIBRARY),r({url:O,authorName:l.authorName,items:m})}):B.json().catch(()=>{throw new Error(B.statusText||"something went wrong")}).then(O=>{throw new Error(O.message||B.statusText||"something went wrong")}),B=>{console.error(B),n(B),d(!1)}).catch(B=>{console.error(B),n(B),d(!1)})},b=()=>{let y=[];return m.forEach((v,C)=>{y.push(ie("div",{className:"single-library-item-wrapper",children:ie(WA,{libItem:v,appState:t,index:C,onChange:(S,L)=>{let k=m.slice();k[L].name=S,p(k)},onRemove:a})},C))}),ie("div",{className:"selected-library-items",children:y})},x=OA(()=>{i(m),Ut.set(Hu.PUBLISH_LIBRARY,l),e()},[m,e,i,l]),w=!!o.length,E=o.some(y=>y.status==="published");return ie(Ne,{onCloseRequest:x,title:g("publishDialog.title"),className:"publish-library",children:w?lt("form",{onSubmit:f,children:[ie("div",{className:"publish-library-note",children:ie(ut,{i18nKey:"publishDialog.noteDescription",link:y=>ie("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener",children:y})})}),ie("span",{className:"publish-library-note",children:ie(ut,{i18nKey:"publishDialog.noteGuidelines",link:y=>ie("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:y})})}),ie("div",{className:"publish-library-note",children:g("publishDialog.noteItems")}),E&&ie("span",{className:"publish-library-note publish-library-warning",children:g("publishDialog.republishWarning")}),b(),lt("div",{className:"publish-library__fields",children:[lt("label",{children:[lt("div",{children:[ie("span",{children:g("publishDialog.libraryName")}),ie("span",{"aria-hidden":"true",className:"required",children:"*"})]}),ie("input",{type:"text",name:"name",required:!0,value:l.name,onChange:u,placeholder:g("publishDialog.placeholder.libraryName")})]}),lt("label",{style:{alignItems:"flex-start"},children:[lt("div",{children:[ie("span",{children:g("publishDialog.libraryDesc")}),ie("span",{"aria-hidden":"true",className:"required",children:"*"})]}),ie("textarea",{name:"description",rows:4,required:!0,value:l.description,onChange:u,placeholder:g("publishDialog.placeholder.libraryDesc")})]}),lt("label",{children:[lt("div",{children:[ie("span",{children:g("publishDialog.authorName")}),ie("span",{"aria-hidden":"true",className:"required",children:"*"})]}),ie("input",{type:"text",name:"authorName",required:!0,value:l.authorName,onChange:u,placeholder:g("publishDialog.placeholder.authorName")})]}),lt("label",{children:[ie("span",{children:g("publishDialog.githubUsername")}),ie("input",{type:"text",name:"githubHandle",value:l.githubHandle,onChange:u,placeholder:g("publishDialog.placeholder.githubHandle")})]}),lt("label",{children:[ie("span",{children:g("publishDialog.twitterUsername")}),ie("input",{type:"text",name:"twitterHandle",value:l.twitterHandle,onChange:u,placeholder:g("publishDialog.placeholder.twitterHandle")})]}),lt("label",{children:[ie("span",{children:g("publishDialog.website")}),ie("input",{type:"text",name:"website",pattern:"https?://.+",title:g("publishDialog.errors.website"),value:l.website,onChange:u,placeholder:g("publishDialog.placeholder.website")})]}),ie("span",{className:"publish-library-note",children:ie(ut,{i18nKey:"publishDialog.noteLicense",link:y=>ie("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:y})})})]}),lt("div",{className:"publish-library__buttons",children:[ie(Oo,{label:g("buttons.cancel"),onClick:x,"data-testid":"cancel-clear-canvas-button"}),ie(Oo,{type:"submit",label:g("buttons.submit"),actionType:"primary",isLoading:c})]})]}):ie("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:g("publishDialog.atleastOneLibItem")})})},Dy=VA;import ZA from"clsx";import{useEffect as $A,useRef as jA}from"react";import{EVENT as By,KEYS as qA}from"@excalidraw/common";import{forwardRef as _y}from"react";import Ry from"clsx";import{jsx as Ny}from"react/jsx-runtime";var XA=_y(({children:e,gap:o,align:t,justifyContent:r,className:n,style:i},a)=>Ny("div",{className:Ry("Stack Stack_horizontal",n),style:{"--gap":o,alignItems:t,justifyContent:r,...i},ref:a,children:e})),KA=_y(({children:e,gap:o,align:t,justifyContent:r,className:n,style:i},a)=>Ny("div",{className:Ry("Stack Stack_vertical",n),style:{"--gap":o,justifyItems:t,justifyContent:r,...i},ref:a,children:e})),Ze={Row:XA,Col:KA};import{jsx as Tc}from"react/jsx-runtime";var Fy=({children:e,onClickOutside:o,className:t="",onSelect:r,style:n})=>{let i=ce(),a=jA(null),l=qo({onClickOutside:o});zn(a,()=>{l.onClickOutside?.()}),$A(()=>{let c=m=>{m.key===qA.ESCAPE&&(m.stopImmediatePropagation(),l.onClickOutside?.())},d={capture:!0};return document.addEventListener(By.KEYDOWN,c,d),()=>{document.removeEventListener(By.KEYDOWN,c,d)}},[l]);let s=ZA(`dropdown-menu ${t}`,{"dropdown-menu--mobile":i.editor.isMobile}).trim();return Tc(up.Provider,{value:{onSelect:r},children:Tc("div",{ref:a,className:s,style:n,"data-testid":"dropdown-menu",children:i.editor.isMobile?Tc(Ze.Col,{className:"dropdown-menu-container",children:e}):Tc(We,{className:"dropdown-menu-container",padding:2,style:{zIndex:2},children:e})})})};Fy.displayName="DropdownMenuContent";var Oy=Fy;import{jsx as QA}from"react/jsx-runtime";var JA=({children:e,className:o="",selected:t,...r})=>QA("div",{...r,className:`dropdown-menu-item-base dropdown-menu-item-custom ${o} ${t?"dropdown-menu-item--selected":""}`.trim(),children:e}),zy=JA;import{jsx as Hy}from"react/jsx-runtime";var Gy=({icon:e,shortcut:o,href:t,children:r,onSelect:n,className:i="",selected:a,rel:l="noopener",...s})=>{let c=Ss(s.onClick,n);return Hy("a",{...s,href:t,target:"_blank",rel:l||"noopener",className:Cs(i,a),title:s.title??s["aria-label"],onClick:c,children:Hy(Is,{icon:e,shortcut:o,children:r})})},fi=Gy;Gy.displayName="DropdownMenuItemLink";import{jsx as e8}from"react/jsx-runtime";var Uy=()=>e8("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",margin:".5rem 0"}}),Yy=Uy;Uy.displayName="DropdownMenuSeparator";import t8 from"clsx";import{jsx as o8}from"react/jsx-runtime";var Wy=({className:e="",children:o,onToggle:t,title:r,...n})=>{let i=ce(),a=t8(`dropdown-menu-button ${e}`,"zen-mode-transition",{"dropdown-menu-button--mobile":i.editor.isMobile}).trim();return o8("button",{"data-prevent-outside-click":!0,className:a,onClick:t,type:"button","data-testid":"dropdown-menu-button",title:r,...n,children:o})},Vy=Wy;Wy.displayName="DropdownMenuTrigger";import Ic from"react";var Xy=e=>{let o=Ic.Children.toArray(e).find(t=>Ic.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuTrigger");return o||null},Ky=e=>{let o=Ic.Children.toArray(e).find(t=>Ic.isValidElement(t)&&typeof t.type!="string"&&t?.type.displayName&&t.type.displayName==="DropdownMenuContent");return o||null};import{Fragment as r8,jsxs as n8}from"react/jsx-runtime";var zo=({children:e,open:o})=>{let t=Xy(e),r=Ky(e);return n8(r8,{children:[t,o&&r]})};zo.Trigger=Vy;zo.Content=Oy;zo.Item=yt;zo.ItemLink=fi;zo.ItemCustom=zy;zo.Group=fa;zo.Separator=Yy;var ye=zo;zo.displayName="DropdownMenu";import{jsx as Ct,jsxs as Cc}from"react/jsx-runtime";var s8=(e,o)=>e.filter(t=>o.includes(t.id)),c8=({setAppState:e,selectedItems:o,library:t,onRemoveFromLibrary:r,resetLibrary:n,onSelectItems:i,appState:a,className:l})=>{let[s]=se(Qr),[c,d]=se(gi),m=()=>{let P=o.length?g("alerts.removeItemsFromsLibrary",{count:o.length}):g("alerts.resetLibrary"),B=o.length?g("confirmDialog.removeItemsFromLib"):g("confirmDialog.resetLibrary");return Ct(Ly,{onConfirm:()=>{o.length?r():n(),u(!1)},onCancel:()=>{u(!1)},title:B,children:Ct("p",{children:P})})},[p,u]=Uu(!1),f=!!o.length,b=f?s.libraryItems.filter(P=>o.includes(P.id)):s.libraryItems,x=f?g("buttons.remove"):g("buttons.resetLibrary"),[w,E]=Uu(!1),[y,v]=Uu(null),C=a8(()=>Cc(Ne,{onCloseRequest:()=>v(null),title:g("publishSuccessDialog.title"),className:"publish-library-success",size:"small",children:[Ct("p",{children:Ct(ut,{i18nKey:"publishSuccessDialog.content",authorName:y.authorName,link:P=>Ct("a",{href:y?.url,target:"_blank",rel:"noopener noreferrer",children:P})})}),Ct(W,{type:"button",title:g("buttons.close"),"aria-label":g("buttons.close"),label:g("buttons.close"),onClick:()=>v(null),"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]}),[v,y]),S=(P,B)=>{E(!1),v({url:P.url,authorName:P.authorName});let O=B.slice();O.forEach(G=>{o.includes(G.id)&&(G.status="published")}),t.setLibrary(O)},L=async()=>{try{await t.updateLibrary({libraryItems:Rl({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0})}catch(P){if(P?.name==="AbortError"){console.warn(P);return}e({errorMessage:g("errors.importLibraryError")})}},k=async()=>{let P=f?b:await t.getLatestLibrary();Qf(P).catch(l8).catch(B=>{e({errorMessage:B.message})})},A=()=>Cc(ye,{open:c,children:[Ct(ye.Trigger,{onToggle:()=>d(!c),children:k1}),Cc(ye.Content,{onClickOutside:()=>d(!1),onSelect:()=>d(!1),className:"library-menu",children:[!f&&Ct(ye.Item,{onSelect:L,icon:An,"data-testid":"lib-dropdown--load",children:g("buttons.load")}),!!b.length&&Ct(ye.Item,{onSelect:k,icon:zr,"data-testid":"lib-dropdown--export",children:g("buttons.export")}),!!b.length&&Ct(ye.Item,{onSelect:()=>u(!0),icon:Do,children:x}),f&&Ct(ye.Item,{icon:O0,onSelect:()=>E(!0),"data-testid":"lib-dropdown--remove",children:g("buttons.publishLibrary")})]})]});return Cc("div",{className:i8("library-menu-dropdown-container",l),children:[A(),o.length>0&&Ct("div",{className:"library-actions-counter",children:o.length}),p&&m(),w&&Ct(Dy,{onClose:()=>E(!1),libraryItems:s8(s.libraryItems,o),appState:a,onSuccess:P=>S(P,s.libraryItems),onError:P=>window.alert(P),updateItemsInStorage:()=>t.setLibrary(s.libraryItems),onRemove:P=>i(o.filter(B=>B!==P))}),y&&C()]})},Yu=({selectedItems:e,onSelectItems:o,className:t})=>{let{library:r}=Re(),{clearLibraryCache:n,deleteItemsFromLibraryCache:i}=hc(),a=ge(),l=le(),[s]=se(Qr),c=async m=>{let p=m.filter(u=>!e.includes(u.id));r.setLibrary(p).catch(()=>{l({errorMessage:g("alerts.errorRemovingFromLibrary")})}),i(e),o([])};return Ct(c8,{appState:a,setAppState:l,selectedItems:e,onSelectItems:o,library:r,onRemoveFromLibrary:()=>c(s.libraryItems),resetLibrary:()=>{r.resetLibrary(),n()},className:t})};import{memo as x8,useEffect as E8,useState as y8}from"react";import d8,{useCallback as m8}from"react";function p8(){return[!1,m8(o=>o(),[])]}var Zy=d8.useTransition||p8;import $y from"clsx";import{memo as u8,useEffect as h8,useRef as g8,useState as f8}from"react";import{jsx as Sc,jsxs as b8}from"react/jsx-runtime";var jy=u8(({id:e,elements:o,isPending:t,onClick:r,selected:n,onToggle:i,onDrag:a,svgCache:l})=>{let s=g8(null),c=hy(e,o,l);h8(()=>{let f=s.current;if(f)return c&&(f.innerHTML=c.outerHTML),()=>{f.innerHTML=""}},[c]);let[d,m]=f8(!1),p=ce().editor.isMobile,u=t&&Sc("div",{className:"library-unit__adder",children:S1});return b8("div",{className:$y("library-unit",{"library-unit__active":o,"library-unit--hover":o&&d,"library-unit--selected":n,"library-unit--skeleton":!c}),onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:[Sc("div",{className:$y("library-unit__dragger",{"library-unit__pulse":!!t}),ref:s,draggable:!!o,onClick:o||t?f=>{e&&f.shiftKey?i(e,f):r(e)}:void 0,onDragStart:f=>{if(!e){f.preventDefault();return}m(!1),a(e,f)}}),u,e&&o&&(d||p||n)&&Sc(Ca,{checked:n,onChange:(f,b)=>i(e,b),className:"library-unit__checkbox"})]})}),qy=()=>Sc("div",{className:"library-unit library-unit--skeleton"});import{Fragment as w8,jsx as kc}from"react/jsx-runtime";var Wu=({children:e})=>kc("div",{className:"library-menu-items-container__grid",children:e}),Mc=x8(({items:e,onItemSelectToggle:o,onItemDrag:t,isItemSelected:r,onClick:n,svgCache:i,itemsRenderedPerBatch:a})=>{let[,l]=Zy(),[s,c]=y8(0);return E8(()=>{s<e.length&&l(()=>{c(s+a)})},[s,e.length,l,a]),kc(w8,{children:e.map((d,m)=>m<s?kc(jy,{elements:d?.elements,isPending:!d?.id&&!!d?.elements,onClick:n,svgCache:i,id:d?.id,selected:r(d.id),onToggle:o,onDrag:t},d?.id??m):kc(qy,{},m))})});import{Fragment as Qy,jsx as St,jsxs as xi}from"react/jsx-runtime";var M8=17,L8=64;function Vu({isLoading:e,libraryItems:o,onAddToLibrary:t,onInsertLibraryItems:r,pendingElements:n,theme:i,id:a,libraryReturnUrl:l,onSelectItems:s,selectedItems:c}){let d=T8(null),m=Cy(d);v8(()=>{m>0&&d.current?.scrollTo(0,m)},[]);let{svgCache:p}=hc(),u=Jy(()=>o.filter(P=>P.status!=="published"),[o]),f=Jy(()=>o.filter(P=>P.status==="published"),[o]),b=!o.length&&!n.length,x=!n.length&&!u.length&&!f.length,[w,E]=I8(null),y=bi((P,B)=>{let O=!c.includes(P),G=[...u,...f];if(O){if(B.shiftKey&&w){let J=G.findIndex(Z=>Z.id===w),_=G.findIndex(Z=>Z.id===P);if(J===-1||_===-1){s([...c,P]);return}let R=S8(c),X=G.reduce((Z,Y,ae)=>((ae>=J&&ae<=_||R.has(Y.id))&&Z.push(Y.id),Z),[]);s(X)}else s([...c,P]);E(P)}else E(null),s(c.filter(J=>J!==P))},[w,s,f,c,u]),v=bi(P=>{let B;return c.includes(P)?B=o.filter(O=>c.includes(O.id)):B=o.filter(O=>O.id===P),B.map(O=>({...O,elements:k8({type:"everything",elements:O.elements,randomizeSeed:!0}).duplicatedElements}))},[o,c]),C=bi((P,B)=>{B.dataTransfer.setData(C8.excalidrawlib,um(v(P)))},[v]),S=bi(P=>P?c.includes(P):!1,[c]),L=bi(()=>{t(n)},[n,t]),k=bi(P=>{P&&r(v(P))},[v,r]),A=p.size>=o.length?L8:M8;return xi("div",{className:"library-menu-items-container",style:n.length||u.length||f.length?{justifyContent:"flex-start"}:{borderBottom:0},children:[!x&&St(Yu,{selectedItems:c,onSelectItems:s,className:"library-menu-dropdown-container--in-heading"}),xi(Ze.Col,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:f.length>0?1:"0 1 auto",marginBottom:0},ref:d,children:[xi(Qy,{children:[!x&&St("div",{className:"library-menu-items-container__header",children:g("labels.personalLib")}),e&&St("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",transform:"translateY(50%)"},children:St(tt,{})}),!n.length&&!u.length?xi("div",{className:"library-menu-items__no-items",children:[St("div",{className:"library-menu-items__no-items__label",children:g("library.noItems")}),St("div",{className:"library-menu-items__no-items__hint",children:f.length>0?g("library.hint_emptyPrivateLibrary"):g("library.hint_emptyLibrary")})]}):xi(Wu,{children:[n.length>0&&St(Mc,{itemsRenderedPerBatch:A,items:[{id:null,elements:n}],onItemSelectToggle:y,onItemDrag:C,onClick:L,isItemSelected:S,svgCache:p}),St(Mc,{itemsRenderedPerBatch:A,items:u,onItemSelectToggle:y,onItemDrag:C,onClick:k,isItemSelected:S,svgCache:p})]})]}),xi(Qy,{children:[(f.length>0||n.length>0||u.length>0)&&St("div",{className:"library-menu-items-container__header library-menu-items-container__header--excal",children:g("labels.excalidrawLib")}),f.length>0?St(Wu,{children:St(Mc,{itemsRenderedPerBatch:A,items:f,onItemSelectToggle:y,onItemDrag:C,onClick:k,isItemSelected:S,svgCache:p})}):u.length>0?St("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:g("library.noItems")}):null]}),b&&St(Ec,{style:{padding:"16px 0",width:"100%"},id:a,libraryReturnUrl:l,theme:i,children:St(Yu,{selectedItems:c,onSelectItems:s})})]})]})}import{jsx as mr,jsxs as o2}from"react/jsx-runtime";var gi=he(!1),t2=({children:e})=>mr("div",{className:"layer-ui__library",children:e}),R8=i2(({onInsertLibraryItems:e,pendingElements:o,onAddToLibrary:t,setAppState:r,libraryReturnUrl:n,library:i,id:a,theme:l,selectedItems:s,onSelectItems:c})=>{let[d]=se(Qr),m=Ku(f=>{(async(x,w)=>{re("element","addToLibrary","ui");for(let y of A8)if(x.some(v=>v.type===y))return r({errorMessage:g(`errors.libraryElementTypeError.${y}`)});let E=[{status:"unpublished",elements:x,id:D8(),created:Date.now()},...w];t(),i.setLibrary(E).catch(()=>{r({errorMessage:g("alerts.errorAddingToLibrary")})})})(f,d.libraryItems)},[t,i,r,d.libraryItems]),p=n2(()=>d.libraryItems,[d]);if(d.status==="loading"&&!d.isInitialized)return mr(t2,{children:mr("div",{className:"layer-ui__library-message",children:o2("div",{children:[mr(tt,{size:"2em"}),mr("span",{children:g("labels.libraryLoadingMessage")})]})})});let u=d.libraryItems.length>0||o.length>0;return o2(t2,{children:[mr(Vu,{isLoading:d.status==="loading",libraryItems:p,onAddToLibrary:m,onInsertLibraryItems:e,pendingElements:o,id:a,libraryReturnUrl:n,theme:l,onSelectItems:c,selectedItems:s}),u&&mr(Ec,{className:"library-menu-control-buttons--at-bottom",style:{padding:"16px 12px 0 12px"},id:a,libraryReturnUrl:n,theme:l})]})}),Xu=(e,o)=>({elements:e,pending:$(e,{selectedElementIds:o},{includeBoundTextElement:!0,includeElementsInFrames:!0}),selectedElementIds:o}),N8=(e,o)=>{let t=er(),[r,n]=r2(()=>Xu(t,e.selectedElementIds)),i=P8(new Map);return e2(()=>{for(let a of r.pending)i.current.set(a.id,a.version)},[r.pending]),e2(()=>{o.state.cursorButton==="up"&&o.state.activeTool.type==="selection"&&n(a=>{if(!_8(a.selectedElementIds,e.selectedElementIds))return i.current.clear(),Xu(t,e.selectedElementIds);let l=o.scene.getNonDeletedElementsMap();for(let s of Object.keys(e.selectedElementIds)){let c=l.get(s)?.version;if(c&&c!==i.current.get(s))return Xu(t,e.selectedElementIds)}return a})},[o,o.state.cursorButton,o.state.activeTool.type,e.selectedElementIds,t]),r.pending},a2=i2(()=>{let e=Re(),{onInsertElements:o}=e,t=fo(),r=ge(),n=le(),[i,a]=r2([]),l=n2(()=>e.library,[e.library]),s=N8(r,e),c=Ku(m=>{o(xc(m))},[o]),d=Ku(()=>{n({selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null})},[n]);return mr(R8,{pendingElements:s,onInsertLibraryItems:c,onAddToLibrary:d,setAppState:n,libraryReturnUrl:t.libraryReturnUrl,library:l,id:e.id,theme:r.theme,selectedItems:i,onSelectItems:a})});import B8 from"clsx";import{useRef as F8}from"react";import{createPortal as O8}from"react-dom";import{KEYS as z8}from"@excalidraw/common";import{jsx as l2,jsxs as H8}from"react/jsx-runtime";var s2=e=>{let{closeOnClickOutside:o=!0}=e,t=gs({className:"excalidraw-modal-container"}),r=F8(document.body.classList.contains("excalidraw-animations-disabled"));if(!t)return null;let n=i=>{i.key===z8.ESCAPE&&(i.nativeEvent.stopImmediatePropagation(),i.stopPropagation(),e.onCloseRequest())};return O8(H8("div",{className:B8("Modal",e.className,{"animations-disabled":r.current}),role:"dialog","aria-modal":"true",onKeyDown:n,"aria-labelledby":e.labelledBy,"data-prevent-outside-click":!0,children:[l2("div",{className:"Modal__background",onClick:o?e.onCloseRequest:void 0}),l2("div",{className:"Modal__content",style:{"--max-width":`${e.maxWidth}px`},tabIndex:0,children:e.children})]}),t)};import{jsx as Lc,jsxs as d2}from"react/jsx-runtime";function V8(e){if(e&&typeof e=="number")return e;switch(e){case"small":return 550;case"wide":return 1024;case"regular":default:return 800}}var Ne=e=>{let[o,t]=my(),[r]=Y8(document.activeElement),{id:n}=ze(),i=ce().viewport.isMobile;U8(()=>{if(!o)return;let c=c2(o);setTimeout(()=>{c.length>0&&e.autofocus!==!1&&(c[1]||c[0]).focus()});let d=m=>{if(m.key===W8.TAB){let p=c2(o),{activeElement:u}=document,f=p.findIndex(b=>b===u);f===0&&m.shiftKey?(p[p.length-1].focus(),m.preventDefault()):f===p.length-1&&!m.shiftKey&&(p[0].focus(),m.preventDefault())}};return o.addEventListener("keydown",d),()=>o.removeEventListener("keydown",d)},[o,e.autofocus]);let a=le(),l=wn(gi),s=()=>{a({openMenu:null}),l(!1),r.focus(),e.onCloseRequest()};return Lc(s2,{className:G8("Dialog",e.className,{"Dialog--fullscreen":i}),labelledBy:"dialog-title",maxWidth:V8(e.size),onCloseRequest:s,closeOnClickOutside:e.closeOnClickOutside,children:d2(We,{ref:t,children:[e.title&&d2("h2",{id:`${n}-dialog-title`,className:"Dialog__title",children:[Lc("span",{className:"Dialog__titleContent",children:e.title}),e.titleButton]}),i&&Lc("button",{className:"Dialog__close",onClick:s,title:g("buttons.close"),"aria-label":g("buttons.close"),type:"button",children:Ft}),Lc("div",{className:"Dialog__content",children:e.children})]})})};import Zu from"clsx";import{forwardRef as $8,useRef as j8,useImperativeHandle as q8,useLayoutEffect as J8,useState as Q8}from"react";import X8 from"clsx";import{composeEventHandlers as K8}from"@excalidraw/common";import{jsx as Z8}from"react/jsx-runtime";var Rt=({type:e="button",onSelect:o,selected:t,children:r,className:n="",...i})=>Z8("button",{onClick:K8(i.onClick,a=>{o()}),type:e,className:X8("excalidraw-button",n,{selected:t}),...i,children:r});import{jsx as $u,jsxs as m2}from"react/jsx-runtime";var Ei=$8(({onChange:e,label:o,fullWidth:t,placeholder:r,readonly:n,selectOnRender:i,onKeyDown:a,isRedacted:l=!1,icon:s,className:c,...d},m)=>{let p=j8(null);q8(m,()=>p.current),J8(()=>{i&&(p.current?.focus(),p.current?.select())},[i]);let[u,f]=Q8(!1);return m2("div",{className:Zu("ExcTextField",c,{"ExcTextField--fullWidth":t,"ExcTextField--hasIcon":!!s}),onClick:()=>{p.current?.focus()},children:[s,o&&$u("div",{className:"ExcTextField__label",children:o}),m2("div",{className:Zu("ExcTextField__input",{"ExcTextField__input--readonly":n}),children:[$u("input",{className:Zu({"is-redacted":"value"in d&&d.value&&l&&!u}),readOnly:n,value:"value"in d?d.value:void 0,defaultValue:"defaultValue"in d?d.defaultValue:void 0,placeholder:r,ref:p,onChange:b=>e?.(b.target.value),onKeyDown:a}),l&&$u(Rt,{onSelect:()=>f(!u),style:{border:0,userSelect:"none"},children:u?K0:Gr})]})]})});import{KEYS as io}from"@excalidraw/common";var pr=[{icon:_1,value:"selection",key:io.V,fillable:!0,myocSimplifiedMode:!0},{icon:Cn,value:"rectangle",key:io.R,fillable:!0,myocSimplifiedMode:!1},{icon:Sn,value:"diamond",key:io.D,fillable:!0,myocSimplifiedMode:!1},{icon:kn,value:"ellipse",key:io.O,fillable:!0,myocSimplifiedMode:!1},{icon:Kl,value:"arrow",key:io.A,fillable:!0,myocSimplifiedMode:!1},{icon:Mn,value:"line",key:io.L,fillable:!0,myocSimplifiedMode:!1},{icon:jo,value:"freedraw",key:[io.P,io.X],fillable:!1,myocSimplifiedMode:!0},{icon:Ln,value:"text",key:io.T,fillable:!1,myocSimplifiedMode:!0},{icon:N1,value:"image",key:[io.I],fillable:!1,myocSimplifiedMode:!0},{icon:B1,value:"eraser",key:io.E,fillable:!1,myocSimplifiedMode:!0}],p2=e=>pr.find((t,r)=>t.key&&(typeof t.key=="string"?t.key===e:t.key.includes(e)))?.value||null;import ju from"clsx";import{useMemo as e7,useState as t7}from"react";import{CLASSES as o7,KEYS as u2,capitalizeString as yi,isTransparent as h2}from"@excalidraw/common";import{shouldAllowVerticalAlign as r7,suppportsHorizontalAlign as n7}from"@excalidraw/element";import{hasBoundTextElement as g2,isElbowArrow as i7,isImageElement as a7,isLinearElement as l7,isTextElement as s7}from"@excalidraw/element";import{hasStrokeColor as f2,toolIsArrow as b2}from"@excalidraw/element";import{Fragment as ur,jsx as Be,jsxs as $e}from"react/jsx-runtime";var qu=(e,o)=>{let t=o[0]?.type||null;for(let r of o)if(r.type!==t){t=null;break}return f2(e.activeTool.type)&&e.activeTool.type!=="image"&&t!=="image"&&t!=="frame"&&t!=="magicframe"||o.some(r=>f2(r.type))},Ju=(e,o)=>Ko(e.activeTool.type)||o.some(t=>Ko(t.type)),Pc=({appState:e,elementsMap:o,renderAction:t,app:r})=>{let n=_l(o,e),i=!1;n.length===2&&(g2(n[0])||g2(n[1]))&&(i=!0);let a=!!(e.editingTextElement||e.newElement),l=ce(),s=document.documentElement.getAttribute("dir")==="rtl",c=Ko(e.activeTool.type)&&!h2(e.currentItemBackgroundColor)||n.some(f=>Ko(f.type)&&!h2(f.backgroundColor)),d=n.length===1||i,m=!e.selectedLinearElement?.isEditing&&n.length===1&&l7(n[0])&&!i7(n[0]),p=!e.croppingElementId&&n.length===1&&a7(n[0]),u=!i&&at(e,r);return $e("div",{className:"selected-shape-actions",children:[Be("div",{children:qu(e,n)&&t("changeStrokeColor")}),Ju(e,n)&&Be("div",{children:t("changeBackgroundColor")}),c&&t("changeFillStyle"),(lm(e.activeTool.type)||n.some(f=>lm(f.type)))&&t("changeStrokeWidth"),(e.activeTool.type==="freedraw"||n.some(f=>f.type==="freedraw"))&&t("changeStrokeShape"),(sm(e.activeTool.type)||n.some(f=>sm(f.type)))&&$e(ur,{children:[t("changeStrokeStyle"),t("changeSloppiness")]}),(cm(e.activeTool.type)||n.some(f=>cm(f.type)))&&Be(ur,{children:t("changeRoundness")}),(b2(e.activeTool.type)||n.some(f=>b2(f.type)))&&Be(ur,{children:t("changeArrowType")}),(e.activeTool.type==="text"||n.some(s7))&&$e(ur,{children:[t("changeFontFamily"),t("changeFontSize"),(e.activeTool.type==="text"||n7(n,o))&&t("changeTextAlign")]}),r7(n,o)&&t("changeVerticalAlign"),(gn(e.activeTool.type)||n.some(f=>gn(f.type)))&&Be(ur,{children:t("changeArrowhead")}),t("changeOpacity"),$e("fieldset",{children:[Be("legend",{children:g("labels.layers")}),$e("div",{className:"buttonList",children:[t("sendToBack"),t("sendBackward"),t("bringForward"),t("bringToFront")]})]}),u&&!i&&$e("fieldset",{children:[Be("legend",{children:g("labels.align")}),$e("div",{className:"buttonList",children:[s?$e(ur,{children:[t("alignRight"),t("alignHorizontallyCentered"),t("alignLeft")]}):$e(ur,{children:[t("alignLeft"),t("alignHorizontallyCentered"),t("alignRight")]}),n.length>2&&t("distributeHorizontally"),Be("div",{style:{flexBasis:"100%",height:0}}),$e("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[t("alignTop"),t("alignVerticallyCentered"),t("alignBottom"),n.length>2&&t("distributeVertically"),Be("div",{style:{flexBasis:"100%",height:0}}),t("arrangeElements")]})]})]}),!a&&n.length>0&&$e("fieldset",{children:[Be("legend",{children:g("labels.actions")}),$e("div",{className:"buttonList",children:[!l.editor.isMobile&&t("duplicateSelection"),!l.editor.isMobile&&t("deleteSelectedElements"),t("group"),t("ungroup"),d&&t("hyperlink"),p&&t("cropEditor"),m&&t("toggleLinearEditor"),t("smartZoom")]})]})]})},Ac=({activeTool:e,appState:o,app:t,UIOptions:r})=>{let[n,i]=t7(!1),a=e.type==="frame",l=e.type==="laser",s=e.type==="lasso",c=e.type==="embeddable",d=pr.filter(p=>p.myocSimplifiedMode===!1),m=e7(()=>{switch(e.type){case"frame":return{icon:_n,highlight:!1};case"lasso":return{icon:ta,highlight:!0};case"embeddable":return{icon:O1,highlight:!0};case"laser":return t.props.isCollaborating?{icon:Om,highlight:!0}:{icon:la,highlight:!0};case"diamond":return{icon:Sn,highlight:!0};case"rectangle":return{icon:Cn,highlight:!0};case"ellipse":return{icon:kn,highlight:!0};case"arrow":return{icon:Kl,highlight:!0};case"line":return{icon:Mn,highlight:!0};default:return{icon:Om,highlight:!1}}},[e.type,t.props.isCollaborating]);return $e(ur,{children:[pr.filter(p=>!o.myocSimplifiedMode||p.myocSimplifiedMode).map(({value:p,icon:u,key:f,fillable:b},x)=>{if(r.tools?.[p]===!1)return null;let w=g(`toolBar.${p}`),E=f&&yi(typeof f=="string"?f:f[0]),y=`${E}`;return Be(W,{className:ju("Shape",{fillable:b}),type:"radio",icon:u,checked:e.type===p,name:"editor-current-shape",title:`${yi(w)} \u2014 ${y}`,keyBindingLabel:E,"aria-label":yi(w),"aria-keyshortcuts":y,"data-testid":`toolbar-${p}`,onPointerDown:({pointerType:v})=>{!o.penDetected&&v==="pen"&&t.togglePenMode(!0),p==="selection"&&(o.activeTool.type==="selection"?t.setActiveTool({type:"lasso"}):t.setActiveTool({type:"selection"}))},onChange:({pointerType:v})=>{o.activeTool.type!==p&&re("toolbar",p,"ui"),p==="image"?t.setActiveTool({type:p}):t.setActiveTool({type:p})}},p)}),$e(ye,{open:n,children:[Be(ye.Trigger,{className:ju("App-toolbar__extra-tools-trigger",{"App-toolbar__extra-tools-trigger--selected":m.highlight}),onToggle:()=>i(!n),title:g("toolBar.extraTools"),children:m.icon}),$e(ye.Content,{onClickOutside:()=>i(!1),onSelect:()=>i(!1),className:"App-toolbar__extra-tools-dropdown",children:[Be(ye.Item,{onSelect:()=>t.setActiveTool({type:"lasso"}),icon:ta,"data-testid":"toolbar-lasso",selected:s,children:g("toolBar.lasso")}),d.map(({value:p,icon:u,key:f,fillable:b})=>{let x=g(`toolBar.${p}`),w=f&&yi(typeof f=="string"?f:f[0]);return Be(ye.Item,{onSelect:()=>t.setActiveTool({type:p}),icon:u,"data-testid":`toolbar-${p}`,selected:e.type===p,shortcut:w??void 0,children:yi(x)},p)}),Be("div",{className:"App-toolbar__dropdown-divider"}),Be(ye.Item,{onSelect:()=>t.toggleLock(),icon:o.activeTool.locked?$o:Ao,"data-testid":"toolbar-lock",selected:o.activeTool.locked,shortcut:u2.Q,children:yi(g("toolBar.lock-short"))}),!o.myocSimplifiedMode&&Be(ye.Item,{onSelect:()=>t.setActiveTool({type:"laser"}),icon:la,"data-testid":"toolbar-laser",selected:l,shortcut:u2.K.toLocaleUpperCase(),children:g("toolBar.laser")})]})]})]})},x2=({renderAction:e,zoom:o})=>Be(Ze.Col,{gap:1,className:o7.ZOOM_ACTIONS,children:$e(Ze.Row,{align:"center",children:[e("zoomOut"),e("resetZoom"),e("zoomIn")]})}),E2=({renderAction:e,className:o})=>$e("div",{className:`undo-redo-buttons ${o}`,children:[Be("div",{className:"undo-button-container",children:Be(it,{label:g("buttons.undo"),children:e("undo")})}),Be("div",{className:"redo-button-container",children:$e(it,{label:g("buttons.redo"),children:[" ",e("redo")]})})]}),y2=({actionManager:e,showExitZenModeBtn:o})=>Be("button",{type:"button",className:ju("disable-zen-mode",{"disable-zen-mode--visible":o}),onClick:()=>e.executeAction(ii),children:g("buttons.exitZenMode")});import{useRef as c7}from"react";var Qu=e=>{let o=c7({userFn:e});return o.current.userFn=e,o.current.stableFn||(o.current.stableFn=(...t)=>o.current.userFn(...t)),o.current.stableFn};var eh={};Kf(eh,{toggleTheme:()=>d7});var d7={...Vr,category:"App",label:"Toggle theme",perform:({actionManager:e})=>{e.executeAction(Vr,"commandPalette")}};import{jsx as st,jsxs as wo}from"react/jsx-runtime";var f7=he(null),Me={app:"App",export:"Export",tools:"Tools",editor:"Editor",elements:"Elements",links:"Links"},b7=e=>{switch(e){case Me.app:return 1;case Me.export:return 2;case Me.editor:return 3;case Me.tools:return 4;case Me.elements:return 5;case Me.links:return 6;default:return 10}},Rc=({shortcut:e,className:o,children:t})=>{let r=e.replace("++","+$").split("+");return wo("div",{className:T2("shortcut",o),children:[r.map((n,i)=>st("div",{className:"shortcut-wrapper",children:st("div",{className:"shortcut-key",children:n==="$"?"+":n})},n)),st("div",{className:"shortcut-desc",children:t})]})},I2=e=>!e.altKey&&e[ao.CTRL_OR_CMD]&&(e.shiftKey&&e.key.toLowerCase()===ao.P||e.key===ao.SLASH),Hce=Object.assign(e=>{let o=ge(),t=le();return _c(()=>{let r=n=>{I2(n)&&(n.preventDefault(),n.stopPropagation(),t(i=>{let a=i.openDialog?.name==="commandPalette"?null:{name:"commandPalette"};return a&&re("command_palette","open","shortcut"),{openDialog:a}}))};return window.addEventListener(Nc.KEYDOWN,r,{capture:!0}),()=>window.removeEventListener(Nc.KEYDOWN,r,{capture:!0})},[t]),o.openDialog?.name!=="commandPalette"?null:st(x7,{...e})},{defaultItems:eh});function x7({customCommandPaletteItems:e}){let o=Re(),t=ge(),r=le(),n=fo(),i=ot(),[a,l]=se(f7),[s,c]=Dc(null),d=p7(null),m=qo({uiAppState:t,customCommandPaletteItems:e,appProps:n});_c(()=>{let{uiAppState:S,customCommandPaletteItems:L,appProps:k}=m,A=G=>{let J="";return G.label&&(typeof G.label=="function"?J=g(G.label(o.scene.getNonDeletedElements(),S,o)):J=g(G.label)),J},P=G=>typeof G.icon=="function"?G.icon(S,o.scene.getNonDeletedElements()):G.icon,B=[],O=(G,J,_)=>{let R={label:A(G),icon:P(G),category:J,shortcut:Se(G.name),keywords:G.keywords,predicate:G.predicate,viewMode:G.viewMode,perform:()=>{i.executeAction(G,"commandPalette")}};return _?_(R,G):R};if(S&&o.scene&&i){let G=[i.actions.group,i.actions.ungroup,i.actions.cut,i.actions.copy,i.actions.deleteSelectedElements,i.actions.wrapSelectionInFrame,i.actions.copyStyles,i.actions.pasteStyles,i.actions.bringToFront,i.actions.bringForward,i.actions.sendBackward,i.actions.sendToBack,i.actions.alignTop,i.actions.alignBottom,i.actions.alignLeft,i.actions.alignRight,i.actions.alignVerticallyCentered,i.actions.alignHorizontallyCentered,i.actions.arrangeElements,i.actions.duplicateSelection,i.actions.smartZoom,i.actions.flipHorizontal,i.actions.flipVertical,i.actions.zoomToFitSelection,i.actions.zoomToFitSelectionInViewport,i.actions.increaseFontSize,i.actions.decreaseFontSize,i.actions.toggleLinearEditor,i.actions.cropEditor,i.actions.togglePolygon,Na,uc,cy].map(Y=>O(Y,Me.elements,(ae,de)=>({...ae,predicate:de.predicate?de.predicate:(me,Ye,Pt,Fr)=>$(me,Ye).length>0}))),J=[i.actions.toggleHandTool,i.actions.setFrameAsActiveTool,i.actions.toggleLassoTool].map(Y=>O(Y,Me.tools)),_=[i.actions.undo,i.actions.redo,i.actions.zoomIn,i.actions.zoomOut,i.actions.resetZoom,i.actions.zoomToFit,i.actions.smartZoom,i.actions.zenMode,i.actions.viewMode,i.actions.gridMode,i.actions.objectsSnapMode,i.actions.toggleShortcuts,i.actions.selectAll,i.actions.toggleElementLock,i.actions.unlockAllElements,i.actions.stats].map(Y=>O(Y,Me.editor)),R=[i.actions.saveToActiveFile,i.actions.saveFileToDisk,i.actions.copyAsPng,i.actions.copyAsSvg].map(Y=>O(Y,Me.export));B=[...G,..._,{label:g("buttons.exportImage"),category:Me.export,icon:jl,shortcut:Se("imageExport"),keywords:["export","image","png","jpeg","svg","clipboard","picture"],perform:()=>{r({openDialog:{name:"imageExport"}})}},...R];let X=[{label:g("toolBar.library"),category:Me.app,icon:In,viewMode:!1,perform:()=>{S.openSidebar?r({openSidebar:null}):r({openSidebar:{name:w2.name,tab:w2.defaultTab}})}},{label:g("search.title"),category:Me.app,icon:At,viewMode:!0,perform:()=>{i.executeAction(Va)}},{label:g("labels.shapeSwitch"),category:Me.elements,icon:sa,perform:()=>{i.executeAction(sy)}},{label:g("labels.changeStroke"),keywords:["color","outline"],category:Me.elements,icon:$l,viewMode:!1,predicate:(Y,ae)=>{let de=$(Y,ae);return de.length>0&&qu(ae,de)},perform:()=>{r(Y=>({openMenu:Y.openMenu==="shape"?null:"shape",openPopup:"elementStroke"}))}},{label:g("labels.changeBackground"),keywords:["color","fill"],icon:$l,category:Me.elements,viewMode:!1,predicate:(Y,ae)=>{let de=$(Y,ae);return de.length>0&&Ju(ae,de)},perform:()=>{r(Y=>({openMenu:Y.openMenu==="shape"?null:"shape",openPopup:"elementBackground"}))}},{label:g("labels.canvasBackground"),keywords:["color"],icon:$l,category:Me.editor,viewMode:!1,perform:()=>{r(Y=>({openMenu:Y.openMenu==="canvas"?null:"canvas",openPopup:"canvasBackground"}))}},...pr.reduce((Y,ae)=>{let{value:de,icon:me,key:Ye}=ae;if(k.UIOptions.tools?.[de]===!1)return Y;let Fr=Ye&&u7(typeof Ye=="string"?Ye:Ye[0]),hn={label:g(`toolBar.${de}`),category:Me.tools,shortcut:Fr,icon:me,keywords:["toolbar"],viewMode:!1,perform:({event:nm})=>{de==="image"?o.setActiveTool({type:de}):o.setActiveTool({type:de})}};return Y.push(hn),Y},[]),...J,{label:g("toolBar.lock"),category:Me.tools,icon:S.activeTool.locked?$o:Ao,shortcut:ao.Q.toLocaleUpperCase(),viewMode:!1,perform:()=>{o.toggleLock()}},{label:`${g("labels.textToDiagram")}...`,category:Me.tools,icon:$0,viewMode:!1,predicate:k.aiEnabled,perform:()=>{r(Y=>({...Y,openDialog:{name:"ttd",tab:"text-to-diagram"}}))}},{label:`${g("toolBar.mermaidToExcalidraw")}...`,category:Me.tools,icon:W0,viewMode:!1,predicate:k.aiEnabled,perform:()=>{r(Y=>({...Y,openDialog:{name:"ttd",tab:"mermaid"}}))}}],Z=[...B,...X,...L||[]].map(Y=>({...Y,icon:Y.icon||sa,order:Y.order??b7(Y.category),haystack:`${Au(Y.label.toLocaleLowerCase())} ${Y.keywords?.join(" ")||""}`}));c(Z),l(Z.find(Y=>Y.label===a?.label)??null)}},[m,o,i,c,a?.label,l,r]);let[p,u]=Dc(""),[f,b]=Dc(null),[x,w]=Dc({}),E=S=>{r({openDialog:null},S),u("")},y=(S,L)=>{t.openDialog?.name==="commandPalette"&&(L.stopPropagation(),L.preventDefault(),document.body.classList.add("excalidraw-animations-disabled"),E(()=>{S.perform({actionManager:i,event:L}),l(S),requestAnimationFrame(()=>{document.body.classList.remove("excalidraw-animations-disabled")})}))},v=Qu(S=>S.viewMode===!1&&t.viewModeEnabled?!1:typeof S.predicate=="function"?S.predicate(o.scene.getNonDeletedElements(),t,n,o):S.predicate===void 0||S.predicate),C=Qu(S=>{let L=g7(S.target)||I2(S)||S.key===ao.ESCAPE;if(L&&S.key!==ao.ARROW_UP&&S.key!==ao.ARROW_DOWN&&S.key!==ao.ENTER)return;let k=Object.values(x).flat(),A=a&&!p&&v(a);if(S.key===ao.ARROW_UP){S.preventDefault();let P=k.findIndex(G=>G.label===f?.label);if(A){if(P===0){b(a);return}if(f===a){let G=k[k.length-1];G&&b(G);return}}let B;P===-1?B=k.length-1:B=P===0?k.length-1:(P-1)%k.length;let O=k[B];O&&b(O);return}if(S.key===ao.ARROW_DOWN){S.preventDefault();let P=k.findIndex(G=>G.label===f?.label);if(A){if(!f||P===k.length-1){b(a);return}if(f===a){let G=k[0];G&&b(G);return}}let B=(P+1)%k.length,O=k[B];O&&b(O);return}if(S.key===ao.ENTER&&f&&setTimeout(()=>{y(f,S)}),!L){if(S.stopPropagation(),/^[a-zA-Z0-9]$/.test(S.key)){d?.current?.focus();return}S.preventDefault()}});return _c(()=>(window.addEventListener(Nc.KEYDOWN,C,{capture:!0}),()=>window.removeEventListener(Nc.KEYDOWN,C,{capture:!0})),[C]),_c(()=>{if(!s)return;let S=P=>{let B={};for(let O of P)B[O.category]?B[O.category].push(O):B[O.category]=[O];return B},L=s.filter(v).sort((P,B)=>P.order-B.order),k=!p&&a&&v(a);if(!p){w(S(k?L.filter(P=>P.label!==a?.label):L)),b(k?a:L[0]||null);return}let A=Au(p.toLocaleLowerCase().replace(/[<>_| -]/g,""));L=m7.filter(A,L,{extract:P=>P.haystack}).sort((P,B)=>B.score-P.score).map(P=>P.original),w(S(L)),b(L[0]??null)},[p,s,v,a]),wo(Ne,{onCloseRequest:()=>E(),closeOnClickOutside:!0,title:!1,size:720,autofocus:!0,className:"command-palette-dialog",children:[st(Ei,{value:p,placeholder:g("commandPalette.search.placeholder"),onChange:S=>{u(S)},selectOnRender:!0,ref:d}),!o.device.viewport.isMobile&&wo("div",{className:"shortcuts-wrapper",children:[st(Rc,{shortcut:"\u2191\u2193",children:g("commandPalette.shortcuts.select")}),st(Rc,{shortcut:"\u21B5",children:g("commandPalette.shortcuts.confirm")}),st(Rc,{shortcut:h7("Esc"),children:g("commandPalette.shortcuts.close")})]}),wo("div",{className:"commands",children:[a&&!p&&wo("div",{className:"command-category",children:[wo("div",{className:"command-category-title",children:[g("commandPalette.recents"),st("div",{className:"icon",style:{marginLeft:"6px"},children:j0})]}),st(v2,{command:a,isSelected:a.label===f?.label,onClick:S=>y(a,S),disabled:!v(a),onMouseMove:()=>b(a),showShortcut:!o.device.viewport.isMobile,appState:t})]}),Object.keys(x).length>0?Object.keys(x).map((S,L)=>wo("div",{className:"command-category",children:[st("div",{className:"command-category-title",children:S}),x[S].map(k=>st(v2,{command:k,isSelected:k.label===f?.label,onClick:A=>y(k,A),onMouseMove:()=>b(k),showShortcut:!o.device.viewport.isMobile,appState:t},k.label))]},S)):s?wo("div",{className:"no-match",children:[st("div",{className:"icon",children:At})," ",g("commandPalette.search.noMatch")]}):null]})]})}var v2=({command:e,isSelected:o,disabled:t,onMouseMove:r,onClick:n,showShortcut:i,appState:a})=>{let l=()=>{};return wo("div",{className:T2("command-item",{"item-selected":o,"item-disabled":t}),ref:s=>{o&&!t&&s?.scrollIntoView?.({block:"nearest"})},onClick:t?l:n,onMouseMove:t?l:r,title:t?g("commandPalette.itemNotAvailable"):"",children:[wo("div",{className:"name",children:[e.icon&&st(rr,{icon:typeof e.icon=="function"?e.icon(a):e.icon}),st(ba,{children:e.label})]}),i&&e.shortcut&&st(Rc,{shortcut:e.shortcut})]})};import{getSizeFromPoints as L1e,randomInteger as hD,getUpdatedTimestamp as gD}from"@excalidraw/common";import{simplify as nD}from"points-on-curve";import{pointsOnBezierCurves as Vce}from"points-on-curve";import{invariant as Kce}from"@excalidraw/common";import{curve as $ce,lineSegment as jce,pointFrom as qce,pointDistance as Jce,pointFromArray as Qce,pointFromVector as ede,pointRotateRads as tde,polygon as ode,polygonFromPoints as rde,PRECISION as nde,segmentsIntersectAt as ide,vector as ade,vectorAdd as lde,vectorFromPoint as sde,vectorScale as cde}from"@excalidraw/math";import{getElementAbsoluteCoords as mde}from"@excalidraw/element";var th=e=>{if(!e)return[];for(let o of e.sets)if(o.type==="path")return o.ops;return e.sets[0].ops};import{pointFrom as iD,pointDistance as X2,pointRotateRads as u1e}from"@excalidraw/math";import{ROUGHNESS as aD,isTransparent as ja,assertNever as lD,COLOR_PALETTE as sD,LINE_POLYGON_POINT_MERGE_DISTANCE as g1e}from"@excalidraw/common";import{RoughGenerator as cD}from"roughjs/bin/generator";import Pfe from"roughjs/bin/rough";import{getStroke as q7}from"perfect-freehand";import{isRightAngleRads as _fe}from"@excalidraw/math";import{BOUND_TEXT_PADDING as Nfe,DEFAULT_REDUCED_GLOBAL_ALPHA as Bfe,ELEMENT_READY_TO_ERASE_OPACITY as Ffe,FRAME_STYLE as Ofe,MIME_TYPES as U2,THEME as zfe,distance as Hfe,getFontString as Gfe,isRTL as Ufe,getVerticalOffset as Yfe}from"@excalidraw/common";import Uhe from"roughjs/bin/rough";import{arrayToMap as Whe,invariant as R2,rescalePoints as Vhe,sizeOf as Xhe}from"@excalidraw/common";import{degreesToRadians as uh,lineSegment as Zhe,pointDistance as $he,pointFrom as rt,pointFromArray as N7,pointRotateRads as Ci}from"@excalidraw/math";import{pointsOnBezierCurves as Jhe}from"points-on-curve";import{pointCenter as ahe,pointFrom as lhe,pointRotateRads as she,pointsEqual as che,pointDistance as dhe,vectorFromPoint as mhe,curveLength as phe,curvePointAtLength as uhe}from"@excalidraw/math";import{DRAGGING_THRESHOLD as fhe,KEYS as bhe,shouldRotateWithDiscreteAngle as xhe,getGridPoint as Ehe,invariant as yhe,tupleToCoors as whe,viewportCoordsToSceneCoords as vhe}from"@excalidraw/common";import{deconstructLinearOrFreeDrawElement as Ihe,isPathALoop as Che}from"@excalidraw/element";import{KEYS as iue,arrayToMap as aue,isBindingFallthroughEnabled as lue,tupleToCoors as sue,invariant as cue,isDevEnv as due,isTestEnv as mue}from"@excalidraw/common";import{lineSegment as uue,pointFrom as hue,pointRotateRads as gue,vectorFromPoint as fue,pointDistanceSq as bue,clamp as xue,pointDistance as Eue,pointFromVector as yue,vectorScale as wue,vectorNormalize as vue,vectorCross as Tue,pointsEqual as Iue,lineSegmentIntersectionPoints as Cue,PRECISION as Sue}from"@excalidraw/math";import{isTransparent as Nme}from"@excalidraw/common";import{curveIntersectLineSegment as Fme,isPointWithinBounds as Ome,lineSegment as zme,lineSegmentIntersectionPoints as Hme,pointFrom as Gme,pointFromVector as Ume,pointRotateRads as Yme,pointsEqual as Wme,vectorFromPoint as Vme,vectorNormalize as Xme,vectorScale as Kme}from"@excalidraw/math";import{ellipse as $me,ellipseSegmentInterceptPoints as jme}from"@excalidraw/math/ellipse";import{DEFAULT_ADAPTIVE_RADIUS as E7,DEFAULT_PROPORTIONAL_RADIUS as oh,LINE_CONFIRM_THRESHOLD as y7,ROUNDNESS as rh}from"@excalidraw/common";import{curve as fde,curveCatmullRomCubicApproxPoints as bde,curveOffsetPoints as xde,lineSegment as Ede,pointDistance as w7,pointFrom as yde,pointFromArray as wde,rectangle as vde}from"@excalidraw/math";var Bc=(e,o=1)=>{if(e.length>=3){let[t,r]=[e[0],e[e.length-1]];return w7(t,r)<=y7/o}return!1},Xa=(e,o)=>{if(o.roundness?.type===rh.PROPORTIONAL_RADIUS||o.roundness?.type===rh.LEGACY)return e*oh;if(o.roundness?.type===rh.ADAPTIVE_RADIUS){let t=o.roundness?.value??E7,r=t/oh;return e<=r?e*oh:t}return 0};import{ROUNDNESS as Lde,assertNever as Pde}from"@excalidraw/common";import{pointsEqual as Dde}from"@excalidraw/math";var C2=e=>!!e&&e.type==="embeddable",S2=e=>!!e&&e.type==="iframe",ih=e=>!!e&&(e.type==="iframe"||e.type==="embeddable"),en=e=>e!=null&&e.type==="text";var Fc=e=>e!=null&&(e.type==="frame"||e.type==="magicframe");var hr=e=>e!=null&&v7(e.type);var wi=e=>e!=null&&e.type==="arrow",Ka=e=>wi(e)&&e.elbowed;var v7=e=>e==="arrow"||e==="line";var vi=e=>e!==null&&"containerId"in e&&e.containerId!==null&&en(e);import{ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO as lme,ARROW_LABEL_WIDTH_FRACTION as sme,BOUND_TEXT_PADDING as cme,DEFAULT_FONT_SIZE as dme,TEXT_ALIGN as mme,VERTICAL_ALIGN as pme,getFontString as ume,isProdEnv as hme,invariant as gme}from"@excalidraw/common";import{BOUND_TEXT_PADDING as Ode,DEFAULT_FONT_SIZE as zde,DEFAULT_FONT_FAMILY as Hde,getFontString as Gde,isTestEnv as Ude,normalizeEOL as Yde}from"@excalidraw/common";var Wde="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase();import{isDevEnv as qde,isTestEnv as Jde}from"@excalidraw/common";import{curvePointDistance as Ime,distanceToLineSegment as Cme,pointRotateRads as Sme}from"@excalidraw/math";import{ellipse as Mme,ellipseDistanceFromPoint as Lme}from"@excalidraw/math/ellipse";import{invariant as spe,isDevEnv as cpe,isTestEnv as dpe}from"@excalidraw/common";import{pointFrom as ppe,pointFromVector as upe,pointRotateRads as hpe,pointScaleFromOrigin as gpe,pointsEqual as fpe,triangleIncludesPoint as bpe,vectorCross as xpe,vectorFromPoint as k7,vectorScale as Epe}from"@excalidraw/math";var mh=[1,0],P2=[0,1],ph=[-1,0],A2=[0,-1],Oc=e=>{let[o,t]=e,r=Math.abs(o),n=Math.abs(t);return o>n?mh:o<=-n?ph:t>r?P2:A2},D2=(e,o)=>Oc(k7(e,o)),zc=(e,o)=>Hc(D2(e,o)),dh=(e,o)=>e[0]===o[0]&&e[1]===o[1],Hc=e=>dh(e,mh)||dh(e,ph);import{clamp as Cpe,pointDistance as Spe,pointFrom as kpe,pointScaleFromOrigin as Mpe,pointsEqual as Lpe,pointTranslate as Ppe,vector as Ape,vectorCross as Dpe,vectorFromPoint as _pe,vectorScale as Rpe}from"@excalidraw/math";import{BinaryHeap as Bpe,invariant as Fpe,isAnyTrue as Ope,tupleToCoors as zpe,getSizeFromPoints as Hpe,isDevEnv as Gpe,arrayToMap as Upe}from"@excalidraw/common";import{SHIFT_LOCKING_ANGLE as Gue,viewportCoordsToSceneCoords as Uue}from"@excalidraw/common";import{normalizeRadians as Wue,radiansBetweenAngles as Vue,radiansDifference as Xue}from"@excalidraw/math";import{pointsEqual as Zue}from"@excalidraw/math";var nh=e=>{let o=Math.floor(e.width/2)+1,t=0,r=e.width,n=Math.floor(e.height/2)+1,i=o,a=e.height;return[o,t,r,n,i,a,0,n]};var B7=e=>{switch(e){case"arrow":return 25;case"diamond":case"diamond_outline":return 12;case"crowfoot_many":case"crowfoot_one":case"crowfoot_one_or_many":return 20;default:return 15}},F7=e=>{switch(e){case"bar":return 90;case"arrow":return 20;default:return 25}},hh=(e,o,t,r)=>{if(o.length<1)return null;let n=th(o[0]);if(n.length<1)return null;let i=t==="start"?1:n.length-1,a=n[i].data;R2(a.length===6,"Op data length is not 6");let l=rt(a[4],a[5]),s=rt(a[2],a[3]),c=rt(a[0],a[1]),d=n[i-1],m=rt(0,0);if(d.op==="move"){let _=N7(d.data);R2(_!=null,"Op data is not a point"),m=_}else d.op==="bcurveTo"&&(m=rt(d.data[4],d.data[5]));let p=(_,R)=>Math.pow(1-_,3)*l[R]+3*_*Math.pow(1-_,2)*s[R]+3*Math.pow(_,2)*(1-_)*c[R]+m[R]*Math.pow(_,3),[u,f]=t==="start"?m:l,[b,x]=[p(.3,0),p(.3,1)],w=Math.hypot(u-b,f-x),E=(u-b)/w,y=(f-x)/w,v=B7(r),C=0;{let[_,R]=t==="end"?e.points[e.points.length-1]:e.points[0],[X,Z]=e.points.length>1?t==="end"?e.points[e.points.length-2]:e.points[1]:[0,0];C=Math.hypot(_-X,R-Z)}let L=Math.min(v,C*(r==="diamond"||r==="diamond_outline"?.25:.5)),k=u-E*L,A=f-y*L;if(r==="dot"||r==="circle"||r==="circle_outline"){let _=Math.hypot(A-f,k-u)+e.strokeWidth-2;return[u,f,_]}let P=F7(r);if(r==="crowfoot_many"||r==="crowfoot_one_or_many"){let[_,R]=Ci(rt(u,f),rt(k,A),uh(-P)),[X,Z]=Ci(rt(u,f),rt(k,A),uh(P));return[k,A,_,R,X,Z]}let[B,O]=Ci(rt(k,A),rt(u,f),-P*Math.PI/180),[G,J]=Ci(rt(k,A),rt(u,f),uh(P));if(r==="diamond"||r==="diamond_outline"){let _,R;if(t==="start"){let[X,Z]=e.points.length>1?e.points[1]:[0,0];[_,R]=Ci(rt(u+L*2,f),rt(u,f),Math.atan2(Z-f,X-u))}else{let[X,Z]=e.points.length>1?e.points[e.points.length-2]:[0,0];[_,R]=Ci(rt(u-L*2,f),rt(u,f),Math.atan2(f-Z,u-X))}return[u,f,B,O,_,R,G,J]}return[u,f,B,O,G,J]};import{pointFrom as pge,pointCenter as uge,pointRotateRads as hge,vectorFromPoint as gge,vectorNormalize as fge,vectorSubtract as bge,vectorAdd as xge,vectorScale as Ege,pointFromVector as yge,clamp as wge,isCloseTo as vge}from"@excalidraw/math";import{arrayToMap as sfe}from"@excalidraw/common";import{isPointWithinBounds as dfe,pointFrom as mfe}from"@excalidraw/math";import{vectorCross as kge,vectorFromPoint as Mge}from"@excalidraw/math";import{arrayToMap as O7}from"@excalidraw/common";import{getElementBounds as z7}from"@excalidraw/element";import{isArrowElement as H7,isExcalidrawElement as G7,isFreeDrawElement as U7,isLinearElement as Y7,isTextElement as W7}from"@excalidraw/element";import{rangeIncludesValue as Gc,pointFrom as Go,pointRotateRads as V7,rangeInclusive as Uc}from"@excalidraw/math";var X7=e=>e.type==="diamond"?[Go(e.width/2,0),Go(e.width,e.height/2),Go(e.width/2,e.height),Go(0,e.height/2)]:[Go(0,0),Go(0+e.width,0),Go(0+e.width,e.height),Go(0,e.height)],K7=e=>Y7(e)||U7(e)?e.points:X7(e),B2=e=>{let o=e.reduce((t,[r,n])=>(t.minY=Math.min(t.minY,n),t.minX=Math.min(t.minX,r),t.maxX=Math.max(t.maxX,r),t.maxY=Math.max(t.maxY,n),t),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,cx:0,cy:0});return o.cx=(o.maxX+o.minX)/2,o.cy=(o.maxY+o.minY)/2,o},F2=e=>{let o=K7(e),{cx:t,cy:r}=B2(o),n=Go(t,r),i=o.map(d=>V7(d,n,e.angle)),{minX:a,minY:l,maxX:s,maxY:c}=B2(i);return[a+e.x,l+e.y,s+e.x,c+e.y]},gh=(e,o,t=!1)=>{let r=F2(e),n=o[0]<=r[0]&&o[2]>=r[2]&&o[1]<=r[1]&&o[3]>=r[3];return t?n?!0:r[0]<=o[0]&&r[2]>=o[2]&&r[1]<=o[1]&&r[3]>=o[3]:n},O2=(e,o)=>{let t=F2(e);return(Gc(t[0],Uc(o[0],o[2]))||Gc(o[0],Uc(t[0],t[2])))&&(Gc(t[1],Uc(o[1],o[3]))||Gc(o[1],Uc(t[1],t[3])))},z2=({elements:e,bounds:o,type:t,errorMargin:r=0})=>{G7(o)&&(o=z7(o,O7(e)));let n=[o[0]-r,o[1]-r,o[2]+r,o[3]+r],i=new Set;for(let a of e){if(i.has(a.id))continue;if(t==="overlap"?O2(a,n):t==="inside"?gh(a,n):gh(a,n,!0)){if(i.add(a.id),a.boundElements)for(let s of a.boundElements)i.add(s.id);W7(a)&&a.containerId&&i.add(a.containerId),H7(a)&&(a.startBinding&&i.add(a.startBinding.elementId),a.endBinding&&i.add(a.endBinding?.elementId))}}return e.filter(a=>i.has(a.id))};import{arrayToMap as Wge,isShallowEqual as $7}from"@excalidraw/common";var Z7=function(){let e=null,o=null,t=null,r=(i,a,l,s)=>{if(t!==void 0&&a===o&&i===e&&l.editingGroupId===t?.editingGroupId)return t;let c={};for(let p of i){let u=p.groupIds;if(l.editingGroupId){let f=u.indexOf(l.editingGroupId);f>-1&&(u=u.slice(0,f))}if(u.length>0){let f=u[u.length-1];c[f]=!0}}let d={},m=a.reduce((p,u)=>{if(u.isDeleted)return p;let f=u.groupIds.find(b=>c[b]);return f&&(p[u.id]=!0,Array.isArray(d[f])?d[f].push(u.id):d[f]=[u.id]),p},{});for(let p of Object.keys(d))d[p].length<2&&c[p]&&(c[p]=!1);return o=a,e=i,t={editingGroupId:l.editingGroupId,selectedGroupIds:c,selectedElementIds:fh({...l.selectedElementIds,...m},s)},t},n=(i,a,l,s)=>{let c=s?s.scene.getSelectedElements({selectedElementIds:i.selectedElementIds,elements:a}):bh(a,i);return c.length?r(c,a,i,l):{selectedGroupIds:{},editingGroupId:null,selectedElementIds:fh(i.selectedElementIds,l)}};return n.clearCache=()=>{o=null,e=null,t=null},n}();var qge=function(){let e=null,o=null,t=null,r=(n,i)=>(t!=null&&n===e&&i.selectedElementIds===o||(t=n.some(a=>i.selectedElementIds[a.id]),e=n,o=i.selectedElementIds),t);return r.clearCache=()=>{e=null,o=null,t=null},r}(),bh=(e,o,t)=>{let r=new Set,n=[];for(let i of e.values()){if(o.selectedElementIds[i.id]){n.push(i),r.add(i.id);continue}if(t?.includeBoundTextElement&&vi(i)&&o.selectedElementIds[i?.containerId]){n.push(i),r.add(i.id);continue}}if(t?.includeElementsInFrames){let i=[];return n.forEach(a=>{Fc(a)&&H2(e,a.id).forEach(l=>!r.has(l.id)&&i.push(l)),i.push(a)}),i}return n};var fh=(e,o)=>$7(o.selectedElementIds,e)?o.selectedElementIds:e;var H2=(e,o)=>{let t=[];for(let r of e.values())r.frameId===o&&t.push(r);return t};var J7=typeof document<"u"?document.createElement("img"):{src:""};J7.src=`data:${U2.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 Q7=typeof document<"u"?document.createElement("img"):{src:""};Q7.src=`data:${U2.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 Y2=new WeakMap;var eD=new WeakMap([]);function W2(e){let o=tD(e),t=new Path2D(o);return eD.set(e,t),t}function tD(e){let o=e.simulatePressure?e.points:e.points.length?e.points.map(([r,n],i)=>[r,n,e.pressures[i]]):[[0,0,.5]],t={simulatePressure:e.simulatePressure,size:e.strokeWidth*4.25,thinning:.6,smoothing:.5,streamline:.5,easing:r=>Math.sin(r*Math.PI/2),last:!!e.lastCommittedPoint};return rD(q7(o,t))}function G2(e,o){return[(e[0]+o[0])/2,(e[1]+o[1])/2]}var oD=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g;function rD(e){if(!e.length)return"";let o=e.length-1;return e.reduce((t,r,n,i)=>(n===o?t.push(r,G2(r,i[0]),"L",i[0],"Z"):t.push(r,G2(r,i[n+1])),t),["M",e[0],"Q"]).join(" ").replace(oD,"$1")}var V2=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="line"||e==="diamond"||e==="image";var ct=class ct{};I(ct,"rg",new cD),I(ct,"cache",new WeakMap),I(ct,"get",o=>ct.cache.get(o)),I(ct,"set",(o,t)=>ct.cache.set(o,t)),I(ct,"delete",o=>ct.cache.delete(o)),I(ct,"destroy",()=>{ct.cache=new WeakMap}),I(ct,"generateElementShape",(o,t)=>{let r=t?.isExporting?void 0:ct.get(o);if(r!==void 0)return r;Y2.delete(o);let n=pD(o,ct.rg,t||{isExporting:!1,canvasBackgroundColor:sD.white,embedsValidationStatus:null});return ct.cache.set(o,n),n});var Ii=ct,dD=e=>[8,8+e],$2=e=>[1.5,6+e];function mD(e){let o=e.roughness,t=Math.max(e.width,e.height),r=Math.min(e.width,e.height);return r>=20&&t>=50||r>=15&&e.roundness&&V2(e.type)||hr(e)&&t>=50?o:Math.min(o/(t<10?3:2),2.5)}var Ho=(e,o=!1)=>{let t={seed:e.seed,strokeLineDash:e.strokeStyle==="dashed"?dD(e.strokeWidth):e.strokeStyle==="dotted"?$2(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:mD(e),stroke:e.strokeColor,preserveVertices:o||e.roughness<aD.cartoonist};switch(e.type){case"rectangle":case"iframe":case"embeddable":case"diamond":case"ellipse":return t.fillStyle=e.fillStyle,t.fill=ja(e.backgroundColor)?void 0:e.backgroundColor,e.type==="ellipse"&&(t.curveFitting=1),t;case"line":case"freedraw":return Bc(e.points)&&(t.fillStyle=e.fillStyle,t.fill=e.backgroundColor==="transparent"?void 0:e.backgroundColor),t;case"arrow":return t;default:throw new Error(`Unimplemented type ${e.type}`)}},K2=(e,o,t)=>ih(e)&&(o||C2(e)&&t?.get(e.id)!==!0)&&ja(e.backgroundColor)&&ja(e.strokeColor)?{...e,roughness:0,backgroundColor:"#d3d3d3",fillStyle:"solid"}:S2(e)?{...e,strokeColor:ja(e.strokeColor)?"#000000":e.strokeColor,backgroundColor:ja(e.backgroundColor)?"#f4f4f6":e.backgroundColor}:e,Z2=(e,o,t,r,n,i,a)=>{let l=hh(e,o,t,r);if(l===null)return[];let s=(c,d)=>{if(c===null)return[];let[,,m,p,u,f]=c;return[n.line(m,p,u,f,d)]};switch(r){case"dot":case"circle":case"circle_outline":{let[c,d,m]=l;return delete i.strokeLineDash,[n.circle(c,d,m,{...i,fill:r==="circle_outline"?a:e.strokeColor,fillStyle:"solid",stroke:e.strokeColor,roughness:Math.min(.5,i.roughness||0)})]}case"triangle":case"triangle_outline":{let[c,d,m,p,u,f]=l;return delete i.strokeLineDash,[n.polygon([[c,d],[m,p],[u,f],[c,d]],{...i,fill:r==="triangle_outline"?a:e.strokeColor,fillStyle:"solid",roughness:Math.min(1,i.roughness||0)})]}case"diamond":case"diamond_outline":{let[c,d,m,p,u,f,b,x]=l;return delete i.strokeLineDash,[n.polygon([[c,d],[m,p],[u,f],[b,x],[c,d]],{...i,fill:r==="diamond_outline"?a:e.strokeColor,fillStyle:"solid",roughness:Math.min(1,i.roughness||0)})]}case"crowfoot_one":return s(l,i);case"bar":case"arrow":case"crowfoot_many":case"crowfoot_one_or_many":default:{let[c,d,m,p,u,f]=l;if(e.strokeStyle==="dotted"){let b=$2(e.strokeWidth-1);i.strokeLineDash=[b[0],b[1]-1]}else delete i.strokeLineDash;return i.roughness=Math.min(1,i.roughness||0),[n.line(m,p,c,d,i),n.line(u,f,c,d,i),...r==="crowfoot_one_or_many"?s(hh(e,o,t,"crowfoot_one"),i):[]]}}};var pD=(e,o,{isExporting:t,canvasBackgroundColor:r,embedsValidationStatus:n})=>{switch(e.type){case"rectangle":case"iframe":case"embeddable":{let i;if(e.roundness){let a=e.width,l=e.height,s=Xa(Math.min(a,l),e);i=o.path(`M ${s} 0 L ${a-s} 0 Q ${a} 0, ${a} ${s} L ${a} ${l-s} Q ${a} ${l}, ${a-s} ${l} L ${s} ${l} Q 0 ${l}, 0 ${l-s} L 0 ${s} Q 0 0, ${s} 0`,Ho(K2(e,t,n),!0))}else i=o.rectangle(0,0,e.width,e.height,Ho(K2(e,t,n),!1));return i}case"diamond":{let i,[a,l,s,c,d,m,p,u]=nh(e);if(e.roundness){let f=Xa(Math.abs(a-p),e),b=Xa(Math.abs(c-l),e);i=o.path(`M ${a+f} ${l+b} L ${s-f} ${c-b}
|