hyperbook 0.33.3 → 0.34.1
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/assets/client.js +83 -0
- package/dist/assets/code.css +246 -0
- package/dist/assets/content.css +434 -0
- package/dist/assets/directive-alert/style.css +111 -0
- package/dist/assets/directive-archive/client.js +23 -0
- package/dist/assets/directive-archive/style.css +33 -0
- package/dist/assets/directive-audio/client.js +88 -0
- package/dist/assets/directive-audio/style.css +56 -0
- package/dist/assets/directive-audio/wavesurfer.min.js +1 -0
- package/dist/assets/directive-bookmarks/client.js +24 -0
- package/dist/assets/directive-bookmarks/style.css +55 -0
- package/dist/assets/directive-collapsible/style.css +66 -0
- package/dist/assets/directive-download/client.js +23 -0
- package/dist/assets/directive-download/style.css +33 -0
- package/dist/assets/directive-embed/style.css +24 -0
- package/dist/assets/directive-excalidraw/client.js +2 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/Assistant-Bold.woff2 +0 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/Assistant-Medium.woff2 +0 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/Assistant-Regular.woff2 +0 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/Assistant-SemiBold.woff2 +0 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/Cascadia.woff2 +0 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/Virgil.woff2 +0 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ar-SA-json-db7c644ccbeb85d54a47.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/az-AZ-json-08a6de50238dbb21926c.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/bg-BG-json-42fb0378311f3ade2627.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/bn-BD-json-9ad9e5ae95c4c66297b1.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ca-ES-json-a6b2c18f7e85cfd11599.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/cs-CZ-json-ea03835d73f9b921f7c4.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/da-DK-json-a94944ac6fa9756d2fac.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/de-DE-json-d82053ab52357510811b.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/el-GR-json-4cbc2dbda5a5df636ee1.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/es-ES-json-7afb66536ee40d852fa2.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/eu-ES-json-671a4afcfce7b0a7660b.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/fa-IR-json-76b039039b043cc4280c.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/fi-FI-json-64c8902f10425e1b2e81.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/fr-FR-json-d16a471290ba26a6c66a.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/gl-ES-json-d11c7966c3c2f95756e0.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/he-IL-json-a7bc2a673875b2e655e1.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/hi-IN-json-4947c9dace32cc3c6eef.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/hu-HU-json-0419027d32efac73d518.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/id-ID-json-6542dd92ab54a2c1c48e.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/it-IT-json-ab410570df07304cb0ca.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ja-JP-json-2cb067da0fb518e73564.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/kaa-json-4d0a4868835d0334a549.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/kab-KAB-json-0d400ba2836cc0752cd6.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/kk-KZ-json-2224f237cc93465f126f.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/km-KH-json-cbe8e2e8d26d30a3175c.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ko-KR-json-c2387972637d47f15765.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ku-TR-json-bafa8865ed7002bb249e.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/lt-LT-json-9b7e91a51b90ee551cad.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/lv-LV-json-f7f9363e42ee2e3a7c67.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/mr-IN-json-ad1359c30c334d05eee0.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/my-MM-json-3ba296b6fcf2a2197a7c.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/nb-NO-json-798d785698d467e76fcf.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/nl-NL-json-2cf913fe2f491c5d7075.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/nn-NO-json-aa607835ad9408789c5f.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/oc-FR-json-644a5eaa1311f70cb697.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/pa-IN-json-165c5c2760688033b2cc.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/pl-PL-json-35c1f168f53af24b657a.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/pt-BR-json-370215dc506c58ee3217.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/pt-PT-json-6f3d80656622a222b4e2.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ro-RO-json-3c32b962880e225d3416.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ru-RU-json-e1f4ed9d2d074f778304.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/si-LK-json-4921d4298abfa256fe6f.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/sk-SK-json-27b59d7e026675f929c4.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/sl-SI-json-efb839ef0456f5c72e6e.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/sv-SE-json-cfab3adbd37dd273c61e.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/ta-IN-json-2fa1854af68381c61913.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/th-TH-json-9a390d3cc7a7a6226b63.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/tr-TR-json-fc9b16e9dc2be2660439.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/uk-UA-json-82753e98dced302ac187.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/vi-VN-json-9c1c2a9fa9d6b5a58223.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/zh-CN-json-069c304b5011429be615.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/zh-HK-json-d9bf1e4e2d1f8650c680.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/locales/zh-TW-json-5a3fa7cacfa83c411d89.js +1 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/vendor-677e88ca78c86bddf13d.js +2 -0
- package/dist/assets/directive-excalidraw/excalidraw-assets/vendor-677e88ca78c86bddf13d.js.LICENSE.txt +32 -0
- package/dist/assets/directive-excalidraw/hyperbook-excalidraw.umd.js +186 -0
- package/dist/assets/directive-excalidraw/style.css +10 -0
- package/dist/assets/directive-mermaid/client.js +50 -0
- package/dist/assets/directive-mermaid/mermaid.min.js +2225 -0
- package/dist/assets/directive-mermaid/style.css +7 -0
- package/dist/assets/directive-onlineide/client.js +14 -0
- package/dist/assets/directive-onlineide/style.css +24 -0
- package/dist/assets/directive-pagelist/style.css +18 -0
- package/dist/assets/directive-protect/client.js +80 -0
- package/dist/assets/directive-protect/style.css +54 -0
- package/dist/assets/directive-qr/style.css +77 -0
- package/dist/assets/directive-scratchblock/client.js +30 -0
- package/dist/assets/directive-scratchblock/scratchblocks.min.js +6773 -0
- package/dist/assets/directive-scratchblock/style.css +0 -0
- package/dist/assets/directive-scratchblock/translations.js +4851 -0
- package/dist/assets/directive-slideshow/client.js +64 -0
- package/dist/assets/directive-slideshow/style.css +117 -0
- package/dist/assets/directive-sqlide/client.js +14 -0
- package/dist/assets/directive-sqlide/style.css +24 -0
- package/dist/assets/directive-struktog/style.css +571 -0
- package/dist/assets/directive-tabs/client.js +37 -0
- package/dist/assets/directive-tabs/style.css +66 -0
- package/dist/assets/directive-term/style.css +0 -0
- package/dist/assets/directive-tiles/style.css +92 -0
- package/dist/assets/directive-video/style.css +27 -0
- package/dist/assets/directive-youtube/style.css +16 -0
- package/dist/assets/math/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/assets/math/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/assets/math/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/assets/math/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/assets/math/katex.min.css +1105 -0
- package/dist/assets/normalize.css +349 -0
- package/dist/assets/shell.css +699 -0
- package/dist/assets/side-drawer.js +206 -0
- package/dist/index.js +28 -23
- package/package.json +9 -5
- package/LICENSE.md +0 -21
- package/dist/templates/default/.hyperbook/package.json +0 -50
- package/dist/templates/default/.hyperbook/src/index.css +0 -14
- package/dist/templates/default/.hyperbook/src/pages/[[...page]].js +0 -57
- package/dist/templates/default/.hyperbook/src/pages/_app.js +0 -135
- package/dist/templates/default/.hyperbook/src/pages/_document.js +0 -11
- package/dist/templates/default/.hyperbook/src/pages/api/save.js +0 -39
- package/dist/templates/default/.hyperbook/src/pages/glossary/[...term].js +0 -59
- package/dist/templates/default/.hyperbook/src/pages/glossary/index.js +0 -28
- package/dist/templates/default/.hyperbook/src/useScrollHash.js +0 -14
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
(function(Pi){typeof define=="function"&&define.amd?define(Pi):Pi()})(function(){"use strict";var E2=Pi=>{throw TypeError(Pi)};var Kf=(Pi,Ra,gr)=>Ra.has(Pi)?E2("Cannot add the same private member more than once"):Ra instanceof WeakSet?Ra.add(Pi):Ra.set(Pi,gr);function Pi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ra={exports:{}},gr={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Jl=Symbol.for("react.element"),jm=Symbol.for("react.portal"),Om=Symbol.for("react.fragment"),Cm=Symbol.for("react.strict_mode"),Im=Symbol.for("react.profiler"),Pm=Symbol.for("react.provider"),Mm=Symbol.for("react.context"),Tm=Symbol.for("react.forward_ref"),Dm=Symbol.for("react.suspense"),Am=Symbol.for("react.memo"),Lm=Symbol.for("react.lazy"),Vf=Symbol.iterator;function Zm(e){return e===null||typeof e!="object"?null:(e=Vf&&e[Vf]||e["@@iterator"],typeof e=="function"?e:null)}var Yf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Gf=Object.assign,Xf={};function sl(e,n,i){this.props=e,this.context=n,this.refs=Xf,this.updater=i||Yf}sl.prototype.isReactComponent={},sl.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")},sl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function $f(){}$f.prototype=sl.prototype;function Vu(e,n,i){this.props=e,this.context=n,this.refs=Xf,this.updater=i||Yf}var Yu=Vu.prototype=new $f;Yu.constructor=Vu,Gf(Yu,sl.prototype),Yu.isPureReactComponent=!0;var qf=Array.isArray,Qf=Object.prototype.hasOwnProperty,Gu={current:null},Jf={key:!0,ref:!0,__self:!0,__source:!0};function ep(e,n,i){var d,F={},J=null,Me=null;if(n!=null)for(d in n.ref!==void 0&&(Me=n.ref),n.key!==void 0&&(J=""+n.key),n)Qf.call(n,d)&&!Jf.hasOwnProperty(d)&&(F[d]=n[d]);var qe=arguments.length-2;if(qe===1)F.children=i;else if(1<qe){for(var tt=Array(qe),ct=0;ct<qe;ct++)tt[ct]=arguments[ct+2];F.children=tt}if(e&&e.defaultProps)for(d in qe=e.defaultProps,qe)F[d]===void 0&&(F[d]=qe[d]);return{$$typeof:Jl,type:e,key:J,ref:Me,props:F,_owner:Gu.current}}function Rm(e,n){return{$$typeof:Jl,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function Xu(e){return typeof e=="object"&&e!==null&&e.$$typeof===Jl}function zm(e){var n={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(i){return n[i]})}var tp=/\/+/g;function $u(e,n){return typeof e=="object"&&e!==null&&e.key!=null?zm(""+e.key):n.toString(36)}function ec(e,n,i,d,F){var J=typeof e;(J==="undefined"||J==="boolean")&&(e=null);var Me=!1;if(e===null)Me=!0;else switch(J){case"string":case"number":Me=!0;break;case"object":switch(e.$$typeof){case Jl:case jm:Me=!0}}if(Me)return Me=e,F=F(Me),e=d===""?"."+$u(Me,0):d,qf(F)?(i="",e!=null&&(i=e.replace(tp,"$&/")+"/"),ec(F,n,i,"",function(ct){return ct})):F!=null&&(Xu(F)&&(F=Rm(F,i+(!F.key||Me&&Me.key===F.key?"":(""+F.key).replace(tp,"$&/")+"/")+e)),n.push(F)),1;if(Me=0,d=d===""?".":d+":",qf(e))for(var qe=0;qe<e.length;qe++){J=e[qe];var tt=d+$u(J,qe);Me+=ec(J,n,i,tt,F)}else if(tt=Zm(e),typeof tt=="function")for(e=tt.call(e),qe=0;!(J=e.next()).done;)J=J.value,tt=d+$u(J,qe++),Me+=ec(J,n,i,tt,F);else if(J==="object")throw n=String(e),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.");return Me}function tc(e,n,i){if(e==null)return e;var d=[],F=0;return ec(e,d,"","",function(J){return n.call(i,J,F++)}),d}function Nm(e){if(e._status===-1){var n=e._result;n=n(),n.then(function(i){(e._status===0||e._status===-1)&&(e._status=1,e._result=i)},function(i){(e._status===0||e._status===-1)&&(e._status=2,e._result=i)}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var Zo={current:null},nc={transition:null},Bm={ReactCurrentDispatcher:Zo,ReactCurrentBatchConfig:nc,ReactCurrentOwner:Gu};function np(){throw Error("act(...) is not supported in production builds of React.")}gr.Children={map:tc,forEach:function(e,n,i){tc(e,function(){n.apply(this,arguments)},i)},count:function(e){var n=0;return tc(e,function(){n++}),n},toArray:function(e){return tc(e,function(n){return n})||[]},only:function(e){if(!Xu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},gr.Component=sl,gr.Fragment=Om,gr.Profiler=Im,gr.PureComponent=Vu,gr.StrictMode=Cm,gr.Suspense=Dm,gr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Bm,gr.act=np,gr.cloneElement=function(e,n,i){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var d=Gf({},e.props),F=e.key,J=e.ref,Me=e._owner;if(n!=null){if(n.ref!==void 0&&(J=n.ref,Me=Gu.current),n.key!==void 0&&(F=""+n.key),e.type&&e.type.defaultProps)var qe=e.type.defaultProps;for(tt in n)Qf.call(n,tt)&&!Jf.hasOwnProperty(tt)&&(d[tt]=n[tt]===void 0&&qe!==void 0?qe[tt]:n[tt])}var tt=arguments.length-2;if(tt===1)d.children=i;else if(1<tt){qe=Array(tt);for(var ct=0;ct<tt;ct++)qe[ct]=arguments[ct+2];d.children=qe}return{$$typeof:Jl,type:e.type,key:F,ref:J,props:d,_owner:Me}},gr.createContext=function(e){return e={$$typeof:Mm,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Pm,_context:e},e.Consumer=e},gr.createElement=ep,gr.createFactory=function(e){var n=ep.bind(null,e);return n.type=e,n},gr.createRef=function(){return{current:null}},gr.forwardRef=function(e){return{$$typeof:Tm,render:e}},gr.isValidElement=Xu,gr.lazy=function(e){return{$$typeof:Lm,_payload:{_status:-1,_result:e},_init:Nm}},gr.memo=function(e,n){return{$$typeof:Am,type:e,compare:n===void 0?null:n}},gr.startTransition=function(e){var n=nc.transition;nc.transition={};try{e()}finally{nc.transition=n}},gr.unstable_act=np,gr.useCallback=function(e,n){return Zo.current.useCallback(e,n)},gr.useContext=function(e){return Zo.current.useContext(e)},gr.useDebugValue=function(){},gr.useDeferredValue=function(e){return Zo.current.useDeferredValue(e)},gr.useEffect=function(e,n){return Zo.current.useEffect(e,n)},gr.useId=function(){return Zo.current.useId()},gr.useImperativeHandle=function(e,n,i){return Zo.current.useImperativeHandle(e,n,i)},gr.useInsertionEffect=function(e,n){return Zo.current.useInsertionEffect(e,n)},gr.useLayoutEffect=function(e,n){return Zo.current.useLayoutEffect(e,n)},gr.useMemo=function(e,n){return Zo.current.useMemo(e,n)},gr.useReducer=function(e,n,i){return Zo.current.useReducer(e,n,i)},gr.useRef=function(e){return Zo.current.useRef(e)},gr.useState=function(e){return Zo.current.useState(e)},gr.useSyncExternalStore=function(e,n,i){return Zo.current.useSyncExternalStore(e,n,i)},gr.useTransition=function(){return Zo.current.useTransition()},gr.version="18.3.1",Ra.exports=gr;var Mi=Ra.exports;const rp=Pi(Mi);var op={exports:{}},$o={},ip={exports:{}},ap={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* scheduler.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/(function(e){function n(D,ne){var S=D.length;D.push(ne);e:for(;0<S;){var z=S-1>>>1,A=D[z];if(0<F(A,ne))D[z]=ne,D[S]=A,S=z;else break e}}function i(D){return D.length===0?null:D[0]}function d(D){if(D.length===0)return null;var ne=D[0],S=D.pop();if(S!==ne){D[0]=S;e:for(var z=0,A=D.length,E=A>>>1;z<E;){var L=2*(z+1)-1,h=D[L],y=L+1,r=D[y];if(0>F(h,S))y<A&&0>F(r,h)?(D[z]=r,D[y]=S,z=y):(D[z]=h,D[L]=S,z=L);else if(y<A&&0>F(r,S))D[z]=r,D[y]=S,z=y;else break e}}return ne}function F(D,ne){var S=D.sortIndex-ne.sortIndex;return S!==0?S:D.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var J=performance;e.unstable_now=function(){return J.now()}}else{var Me=Date,qe=Me.now();e.unstable_now=function(){return Me.now()-qe}}var tt=[],ct=[],kt=1,At=null,fe=3,Q=!1,t=!1,T=!1,j=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(D){for(var ne=i(ct);ne!==null;){if(ne.callback===null)d(ct);else if(ne.startTime<=D)d(ct),ne.sortIndex=ne.expirationTime,n(tt,ne);else break;ne=i(ct)}}function k(D){if(T=!1,v(D),!t)if(i(tt)!==null)t=!0,xe(g);else{var ne=i(ct);ne!==null&&ce(k,ne.startTime-D)}}function g(D,ne){t=!1,T&&(T=!1,f(R),R=-1),Q=!0;var S=fe;try{for(v(ne),At=i(tt);At!==null&&(!(At.expirationTime>ne)||D&&!m());){var z=At.callback;if(typeof z=="function"){At.callback=null,fe=At.priorityLevel;var A=z(At.expirationTime<=ne);ne=e.unstable_now(),typeof A=="function"?At.callback=A:At===i(tt)&&d(tt),v(ne)}else d(tt);At=i(tt)}if(At!==null)var E=!0;else{var L=i(ct);L!==null&&ce(k,L.startTime-ne),E=!1}return E}finally{At=null,fe=S,Q=!1}}var a=!1,P=null,R=-1,K=5,U=-1;function m(){return!(e.unstable_now()-U<K)}function G(){if(P!==null){var D=e.unstable_now();U=D;var ne=!0;try{ne=P(!0,D)}finally{ne?he():(a=!1,P=null)}}else a=!1}var he;if(typeof l=="function")he=function(){l(G)};else if(typeof MessageChannel<"u"){var be=new MessageChannel,we=be.port2;be.port1.onmessage=G,he=function(){we.postMessage(null)}}else he=function(){j(G,0)};function xe(D){P=D,a||(a=!0,he())}function ce(D,ne){R=j(function(){D(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){t||Q||(t=!0,xe(g))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return fe},e.unstable_getFirstCallbackNode=function(){return i(tt)},e.unstable_next=function(D){switch(fe){case 1:case 2:case 3:var ne=3;break;default:ne=fe}var S=fe;fe=ne;try{return D()}finally{fe=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,ne){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var S=fe;fe=D;try{return ne()}finally{fe=S}},e.unstable_scheduleCallback=function(D,ne,S){var z=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?z+S:z):S=z,D){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=S+A,D={id:kt++,callback:ne,priorityLevel:D,startTime:S,expirationTime:A,sortIndex:-1},S>z?(D.sortIndex=S,n(ct,D),i(tt)===null&&D===i(ct)&&(T?(f(R),R=-1):T=!0,ce(k,S-z))):(D.sortIndex=A,n(tt,D),t||Q||(t=!0,xe(g))),D},e.unstable_shouldYield=m,e.unstable_wrapCallback=function(D){var ne=fe;return function(){var S=fe;fe=ne;try{return D.apply(this,arguments)}finally{fe=S}}}})(ap),ip.exports=ap;var Fm=ip.exports;/**
|
|
18
|
+
* @license React
|
|
19
|
+
* react-dom.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Hm=Mi,qo=Fm;function xn(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var lp=new Set,es={};function za(e,n){cl(e,n),cl(e+"Capture",n)}function cl(e,n){for(es[e]=n,e=0;e<n.length;e++)lp.add(n[e])}var Ui=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qu=Object.prototype.hasOwnProperty,Wm=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,sp={},cp={};function Um(e){return qu.call(cp,e)?!0:qu.call(sp,e)?!1:Wm.test(e)?cp[e]=!0:(sp[e]=!0,!1)}function Km(e,n,i,d){if(i!==null&&i.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return d?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Vm(e,n,i,d){if(n===null||typeof n>"u"||Km(e,n,i,d))return!0;if(d)return!1;if(i!==null)switch(i.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function Ro(e,n,i,d,F,J,Me){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=d,this.attributeNamespace=F,this.mustUseProperty=i,this.propertyName=e,this.type=n,this.sanitizeURL=J,this.removeEmptyString=Me}var Oo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oo[e]=new Ro(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];Oo[n]=new Ro(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oo[e]=new Ro(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oo[e]=new Ro(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Oo[e]=new Ro(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Oo[e]=new Ro(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Oo[e]=new Ro(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Oo[e]=new Ro(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Oo[e]=new Ro(e,5,!1,e.toLowerCase(),null,!1,!1)});var Qu=/[\-:]([a-z])/g;function Ju(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(Qu,Ju);Oo[n]=new Ro(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Qu,Ju);Oo[n]=new Ro(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Qu,Ju);Oo[n]=new Ro(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Oo[e]=new Ro(e,1,!1,e.toLowerCase(),null,!1,!1)}),Oo.xlinkHref=new Ro("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Oo[e]=new Ro(e,1,!1,e.toLowerCase(),null,!0,!0)});function ed(e,n,i,d){var F=Oo.hasOwnProperty(n)?Oo[n]:null;(F!==null?F.type!==0:d||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(Vm(n,i,F,d)&&(i=null),d||F===null?Um(n)&&(i===null?e.removeAttribute(n):e.setAttribute(n,""+i)):F.mustUseProperty?e[F.propertyName]=i===null?F.type===3?!1:"":i:(n=F.attributeName,d=F.attributeNamespace,i===null?e.removeAttribute(n):(F=F.type,i=F===3||F===4&&i===!0?"":""+i,d?e.setAttributeNS(d,n,i):e.setAttribute(n,i))))}var Ki=Hm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,rc=Symbol.for("react.element"),ul=Symbol.for("react.portal"),dl=Symbol.for("react.fragment"),td=Symbol.for("react.strict_mode"),nd=Symbol.for("react.profiler"),up=Symbol.for("react.provider"),dp=Symbol.for("react.context"),rd=Symbol.for("react.forward_ref"),od=Symbol.for("react.suspense"),id=Symbol.for("react.suspense_list"),ad=Symbol.for("react.memo"),la=Symbol.for("react.lazy"),fp=Symbol.for("react.offscreen"),pp=Symbol.iterator;function ts(e){return e===null||typeof e!="object"?null:(e=pp&&e[pp]||e["@@iterator"],typeof e=="function"?e:null)}var to=Object.assign,ld;function ns(e){if(ld===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);ld=n&&n[1]||""}return`
|
|
26
|
+
`+ld+e}var sd=!1;function cd(e,n){if(!e||sd)return"";sd=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(ct){var d=ct}Reflect.construct(e,[],n)}else{try{n.call()}catch(ct){d=ct}e.call(n.prototype)}else{try{throw Error()}catch(ct){d=ct}e()}}catch(ct){if(ct&&d&&typeof ct.stack=="string"){for(var F=ct.stack.split(`
|
|
27
|
+
`),J=d.stack.split(`
|
|
28
|
+
`),Me=F.length-1,qe=J.length-1;1<=Me&&0<=qe&&F[Me]!==J[qe];)qe--;for(;1<=Me&&0<=qe;Me--,qe--)if(F[Me]!==J[qe]){if(Me!==1||qe!==1)do if(Me--,qe--,0>qe||F[Me]!==J[qe]){var tt=`
|
|
29
|
+
`+F[Me].replace(" at new "," at ");return e.displayName&&tt.includes("<anonymous>")&&(tt=tt.replace("<anonymous>",e.displayName)),tt}while(1<=Me&&0<=qe);break}}}finally{sd=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?ns(e):""}function Ym(e){switch(e.tag){case 5:return ns(e.type);case 16:return ns("Lazy");case 13:return ns("Suspense");case 19:return ns("SuspenseList");case 0:case 2:case 15:return e=cd(e.type,!1),e;case 11:return e=cd(e.type.render,!1),e;case 1:return e=cd(e.type,!0),e;default:return""}}function ud(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case dl:return"Fragment";case ul:return"Portal";case nd:return"Profiler";case td:return"StrictMode";case od:return"Suspense";case id:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dp:return(e.displayName||"Context")+".Consumer";case up:return(e._context.displayName||"Context")+".Provider";case rd:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ad:return n=e.displayName||null,n!==null?n:ud(e.type)||"Memo";case la:n=e._payload,e=e._init;try{return ud(e(n))}catch{}}return null}function Gm(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ud(n);case 8:return n===td?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function sa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hp(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Xm(e){var n=hp(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),d=""+e[n];if(!e.hasOwnProperty(n)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var F=i.get,J=i.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return F.call(this)},set:function(Me){d=""+Me,J.call(this,Me)}}),Object.defineProperty(e,n,{enumerable:i.enumerable}),{getValue:function(){return d},setValue:function(Me){d=""+Me},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function oc(e){e._valueTracker||(e._valueTracker=Xm(e))}function mp(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),d="";return e&&(d=hp(e)?e.checked?"true":"false":e.value),e=d,e!==i?(n.setValue(e),!0):!1}function ic(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function dd(e,n){var i=n.checked;return to({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function gp(e,n){var i=n.defaultValue==null?"":n.defaultValue,d=n.checked!=null?n.checked:n.defaultChecked;i=sa(n.value!=null?n.value:i),e._wrapperState={initialChecked:d,initialValue:i,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function vp(e,n){n=n.checked,n!=null&&ed(e,"checked",n,!1)}function fd(e,n){vp(e,n);var i=sa(n.value),d=n.type;if(i!=null)d==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(d==="submit"||d==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?pd(e,n.type,i):n.hasOwnProperty("defaultValue")&&pd(e,n.type,sa(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function bp(e,n,i){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var d=n.type;if(!(d!=="submit"&&d!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,i||n===e.value||(e.value=n),e.defaultValue=n}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function pd(e,n,i){(n!=="number"||ic(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var rs=Array.isArray;function fl(e,n,i,d){if(e=e.options,n){n={};for(var F=0;F<i.length;F++)n["$"+i[F]]=!0;for(i=0;i<e.length;i++)F=n.hasOwnProperty("$"+e[i].value),e[i].selected!==F&&(e[i].selected=F),F&&d&&(e[i].defaultSelected=!0)}else{for(i=""+sa(i),n=null,F=0;F<e.length;F++){if(e[F].value===i){e[F].selected=!0,d&&(e[F].defaultSelected=!0);return}n!==null||e[F].disabled||(n=e[F])}n!==null&&(n.selected=!0)}}function hd(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(xn(91));return to({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function yp(e,n){var i=n.value;if(i==null){if(i=n.children,n=n.defaultValue,i!=null){if(n!=null)throw Error(xn(92));if(rs(i)){if(1<i.length)throw Error(xn(93));i=i[0]}n=i}n==null&&(n=""),i=n}e._wrapperState={initialValue:sa(i)}}function xp(e,n){var i=sa(n.value),d=sa(n.defaultValue);i!=null&&(i=""+i,i!==e.value&&(e.value=i),n.defaultValue==null&&e.defaultValue!==i&&(e.defaultValue=i)),d!=null&&(e.defaultValue=""+d)}function wp(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function kp(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function md(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?kp(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ac,Ep=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,i,d,F){MSApp.execUnsafeLocalFunction(function(){return e(n,i,d,F)})}:e}(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(ac=ac||document.createElement("div"),ac.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=ac.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function os(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var is={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},$m=["Webkit","ms","Moz","O"];Object.keys(is).forEach(function(e){$m.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),is[n]=is[e]})});function Sp(e,n,i){return n==null||typeof n=="boolean"||n===""?"":i||typeof n!="number"||n===0||is.hasOwnProperty(e)&&is[e]?(""+n).trim():n+"px"}function _p(e,n){e=e.style;for(var i in n)if(n.hasOwnProperty(i)){var d=i.indexOf("--")===0,F=Sp(i,n[i],d);i==="float"&&(i="cssFloat"),d?e.setProperty(i,F):e[i]=F}}var qm=to({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gd(e,n){if(n){if(qm[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(xn(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(xn(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(xn(61))}if(n.style!=null&&typeof n.style!="object")throw Error(xn(62))}}function vd(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bd=null;function yd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xd=null,pl=null,hl=null;function jp(e){if(e=Os(e)){if(typeof xd!="function")throw Error(xn(280));var n=e.stateNode;n&&(n=Ic(n),xd(e.stateNode,e.type,n))}}function Op(e){pl?hl?hl.push(e):hl=[e]:pl=e}function Cp(){if(pl){var e=pl,n=hl;if(hl=pl=null,jp(e),n)for(e=0;e<n.length;e++)jp(n[e])}}function Ip(e,n){return e(n)}function Pp(){}var wd=!1;function Mp(e,n,i){if(wd)return e(n,i);wd=!0;try{return Ip(e,n,i)}finally{wd=!1,(pl!==null||hl!==null)&&(Pp(),Cp())}}function as(e,n){var i=e.stateNode;if(i===null)return null;var d=Ic(i);if(d===null)return null;i=d[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(e=e.type,d=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!d;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(xn(231,n,typeof i));return i}var kd=!1;if(Ui)try{var ls={};Object.defineProperty(ls,"passive",{get:function(){kd=!0}}),window.addEventListener("test",ls,ls),window.removeEventListener("test",ls,ls)}catch{kd=!1}function Qm(e,n,i,d,F,J,Me,qe,tt){var ct=Array.prototype.slice.call(arguments,3);try{n.apply(i,ct)}catch(kt){this.onError(kt)}}var ss=!1,lc=null,sc=!1,Ed=null,Jm={onError:function(e){ss=!0,lc=e}};function eg(e,n,i,d,F,J,Me,qe,tt){ss=!1,lc=null,Qm.apply(Jm,arguments)}function tg(e,n,i,d,F,J,Me,qe,tt){if(eg.apply(this,arguments),ss){if(ss){var ct=lc;ss=!1,lc=null}else throw Error(xn(198));sc||(sc=!0,Ed=ct)}}function Na(e){var n=e,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,n.flags&4098&&(i=n.return),e=n.return;while(e)}return n.tag===3?i:null}function Tp(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function Dp(e){if(Na(e)!==e)throw Error(xn(188))}function ng(e){var n=e.alternate;if(!n){if(n=Na(e),n===null)throw Error(xn(188));return n!==e?null:e}for(var i=e,d=n;;){var F=i.return;if(F===null)break;var J=F.alternate;if(J===null){if(d=F.return,d!==null){i=d;continue}break}if(F.child===J.child){for(J=F.child;J;){if(J===i)return Dp(F),e;if(J===d)return Dp(F),n;J=J.sibling}throw Error(xn(188))}if(i.return!==d.return)i=F,d=J;else{for(var Me=!1,qe=F.child;qe;){if(qe===i){Me=!0,i=F,d=J;break}if(qe===d){Me=!0,d=F,i=J;break}qe=qe.sibling}if(!Me){for(qe=J.child;qe;){if(qe===i){Me=!0,i=J,d=F;break}if(qe===d){Me=!0,d=J,i=F;break}qe=qe.sibling}if(!Me)throw Error(xn(189))}}if(i.alternate!==d)throw Error(xn(190))}if(i.tag!==3)throw Error(xn(188));return i.stateNode.current===i?e:n}function Ap(e){return e=ng(e),e!==null?Lp(e):null}function Lp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=Lp(e);if(n!==null)return n;e=e.sibling}return null}var Zp=qo.unstable_scheduleCallback,Rp=qo.unstable_cancelCallback,rg=qo.unstable_shouldYield,og=qo.unstable_requestPaint,so=qo.unstable_now,ig=qo.unstable_getCurrentPriorityLevel,Sd=qo.unstable_ImmediatePriority,zp=qo.unstable_UserBlockingPriority,cc=qo.unstable_NormalPriority,ag=qo.unstable_LowPriority,Np=qo.unstable_IdlePriority,uc=null,Ti=null;function lg(e){if(Ti&&typeof Ti.onCommitFiberRoot=="function")try{Ti.onCommitFiberRoot(uc,e,void 0,(e.current.flags&128)===128)}catch{}}var bi=Math.clz32?Math.clz32:ug,sg=Math.log,cg=Math.LN2;function ug(e){return e>>>=0,e===0?32:31-(sg(e)/cg|0)|0}var dc=64,fc=4194304;function cs(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function pc(e,n){var i=e.pendingLanes;if(i===0)return 0;var d=0,F=e.suspendedLanes,J=e.pingedLanes,Me=i&268435455;if(Me!==0){var qe=Me&~F;qe!==0?d=cs(qe):(J&=Me,J!==0&&(d=cs(J)))}else Me=i&~F,Me!==0?d=cs(Me):J!==0&&(d=cs(J));if(d===0)return 0;if(n!==0&&n!==d&&!(n&F)&&(F=d&-d,J=n&-n,F>=J||F===16&&(J&4194240)!==0))return n;if(d&4&&(d|=i&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=d;0<n;)i=31-bi(n),F=1<<i,d|=e[i],n&=~F;return d}function dg(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fg(e,n){for(var i=e.suspendedLanes,d=e.pingedLanes,F=e.expirationTimes,J=e.pendingLanes;0<J;){var Me=31-bi(J),qe=1<<Me,tt=F[Me];tt===-1?(!(qe&i)||qe&d)&&(F[Me]=dg(qe,n)):tt<=n&&(e.expiredLanes|=qe),J&=~qe}}function _d(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Bp(){var e=dc;return dc<<=1,!(dc&4194240)&&(dc=64),e}function jd(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function us(e,n,i){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-bi(n),e[n]=i}function pg(e,n){var i=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var d=e.eventTimes;for(e=e.expirationTimes;0<i;){var F=31-bi(i),J=1<<F;n[F]=0,d[F]=-1,e[F]=-1,i&=~J}}function Od(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var d=31-bi(i),F=1<<d;F&n|e[d]&n&&(e[d]|=n),i&=~F}}var Zr=0;function Fp(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Hp,Cd,Wp,Up,Kp,Id=!1,hc=[],ca=null,ua=null,da=null,ds=new Map,fs=new Map,fa=[],hg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Vp(e,n){switch(e){case"focusin":case"focusout":ca=null;break;case"dragenter":case"dragleave":ua=null;break;case"mouseover":case"mouseout":da=null;break;case"pointerover":case"pointerout":ds.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":fs.delete(n.pointerId)}}function ps(e,n,i,d,F,J){return e===null||e.nativeEvent!==J?(e={blockedOn:n,domEventName:i,eventSystemFlags:d,nativeEvent:J,targetContainers:[F]},n!==null&&(n=Os(n),n!==null&&Cd(n)),e):(e.eventSystemFlags|=d,n=e.targetContainers,F!==null&&n.indexOf(F)===-1&&n.push(F),e)}function mg(e,n,i,d,F){switch(n){case"focusin":return ca=ps(ca,e,n,i,d,F),!0;case"dragenter":return ua=ps(ua,e,n,i,d,F),!0;case"mouseover":return da=ps(da,e,n,i,d,F),!0;case"pointerover":var J=F.pointerId;return ds.set(J,ps(ds.get(J)||null,e,n,i,d,F)),!0;case"gotpointercapture":return J=F.pointerId,fs.set(J,ps(fs.get(J)||null,e,n,i,d,F)),!0}return!1}function Yp(e){var n=Ba(e.target);if(n!==null){var i=Na(n);if(i!==null){if(n=i.tag,n===13){if(n=Tp(i),n!==null){e.blockedOn=n,Kp(e.priority,function(){Wp(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mc(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=Md(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(i===null){i=e.nativeEvent;var d=new i.constructor(i.type,i);bd=d,i.target.dispatchEvent(d),bd=null}else return n=Os(i),n!==null&&Cd(n),e.blockedOn=i,!1;n.shift()}return!0}function Gp(e,n,i){mc(e)&&i.delete(n)}function gg(){Id=!1,ca!==null&&mc(ca)&&(ca=null),ua!==null&&mc(ua)&&(ua=null),da!==null&&mc(da)&&(da=null),ds.forEach(Gp),fs.forEach(Gp)}function hs(e,n){e.blockedOn===n&&(e.blockedOn=null,Id||(Id=!0,qo.unstable_scheduleCallback(qo.unstable_NormalPriority,gg)))}function ms(e){function n(F){return hs(F,e)}if(0<hc.length){hs(hc[0],e);for(var i=1;i<hc.length;i++){var d=hc[i];d.blockedOn===e&&(d.blockedOn=null)}}for(ca!==null&&hs(ca,e),ua!==null&&hs(ua,e),da!==null&&hs(da,e),ds.forEach(n),fs.forEach(n),i=0;i<fa.length;i++)d=fa[i],d.blockedOn===e&&(d.blockedOn=null);for(;0<fa.length&&(i=fa[0],i.blockedOn===null);)Yp(i),i.blockedOn===null&&fa.shift()}var ml=Ki.ReactCurrentBatchConfig,gc=!0;function vg(e,n,i,d){var F=Zr,J=ml.transition;ml.transition=null;try{Zr=1,Pd(e,n,i,d)}finally{Zr=F,ml.transition=J}}function bg(e,n,i,d){var F=Zr,J=ml.transition;ml.transition=null;try{Zr=4,Pd(e,n,i,d)}finally{Zr=F,ml.transition=J}}function Pd(e,n,i,d){if(gc){var F=Md(e,n,i,d);if(F===null)Gd(e,n,d,vc,i),Vp(e,d);else if(mg(F,e,n,i,d))d.stopPropagation();else if(Vp(e,d),n&4&&-1<hg.indexOf(e)){for(;F!==null;){var J=Os(F);if(J!==null&&Hp(J),J=Md(e,n,i,d),J===null&&Gd(e,n,d,vc,i),J===F)break;F=J}F!==null&&d.stopPropagation()}else Gd(e,n,d,null,i)}}var vc=null;function Md(e,n,i,d){if(vc=null,e=yd(d),e=Ba(e),e!==null)if(n=Na(e),n===null)e=null;else if(i=n.tag,i===13){if(e=Tp(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return vc=e,null}function Xp(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ig()){case Sd:return 1;case zp:return 4;case cc:case ag:return 16;case Np:return 536870912;default:return 16}default:return 16}}var pa=null,Td=null,bc=null;function $p(){if(bc)return bc;var e,n=Td,i=n.length,d,F="value"in pa?pa.value:pa.textContent,J=F.length;for(e=0;e<i&&n[e]===F[e];e++);var Me=i-e;for(d=1;d<=Me&&n[i-d]===F[J-d];d++);return bc=F.slice(e,1<d?1-d:void 0)}function yc(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function xc(){return!0}function qp(){return!1}function Qo(e){function n(i,d,F,J,Me){this._reactName=i,this._targetInst=F,this.type=d,this.nativeEvent=J,this.target=Me,this.currentTarget=null;for(var qe in e)e.hasOwnProperty(qe)&&(i=e[qe],this[qe]=i?i(J):J[qe]);return this.isDefaultPrevented=(J.defaultPrevented!=null?J.defaultPrevented:J.returnValue===!1)?xc:qp,this.isPropagationStopped=qp,this}return to(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=xc)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=xc)},persist:function(){},isPersistent:xc}),n}var gl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dd=Qo(gl),gs=to({},gl,{view:0,detail:0}),yg=Qo(gs),Ad,Ld,vs,wc=to({},gs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rd,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==vs&&(vs&&e.type==="mousemove"?(Ad=e.screenX-vs.screenX,Ld=e.screenY-vs.screenY):Ld=Ad=0,vs=e),Ad)},movementY:function(e){return"movementY"in e?e.movementY:Ld}}),Qp=Qo(wc),xg=to({},wc,{dataTransfer:0}),wg=Qo(xg),kg=to({},gs,{relatedTarget:0}),Zd=Qo(kg),Eg=to({},gl,{animationName:0,elapsedTime:0,pseudoElement:0}),Sg=Qo(Eg),_g=to({},gl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jg=Qo(_g),Og=to({},gl,{data:0}),Jp=Qo(Og),Cg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ig={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Pg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mg(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Pg[e])?!!n[e]:!1}function Rd(){return Mg}var Tg=to({},gs,{key:function(e){if(e.key){var n=Cg[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=yc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ig[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rd,charCode:function(e){return e.type==="keypress"?yc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Dg=Qo(Tg),Ag=to({},wc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eh=Qo(Ag),Lg=to({},gs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rd}),Zg=Qo(Lg),Rg=to({},gl,{propertyName:0,elapsedTime:0,pseudoElement:0}),zg=Qo(Rg),Ng=to({},wc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Bg=Qo(Ng),Fg=[9,13,27,32],zd=Ui&&"CompositionEvent"in window,bs=null;Ui&&"documentMode"in document&&(bs=document.documentMode);var Hg=Ui&&"TextEvent"in window&&!bs,th=Ui&&(!zd||bs&&8<bs&&11>=bs),nh=" ",rh=!1;function oh(e,n){switch(e){case"keyup":return Fg.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ih(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vl=!1;function Wg(e,n){switch(e){case"compositionend":return ih(n);case"keypress":return n.which!==32?null:(rh=!0,nh);case"textInput":return e=n.data,e===nh&&rh?null:e;default:return null}}function Ug(e,n){if(vl)return e==="compositionend"||!zd&&oh(e,n)?(e=$p(),bc=Td=pa=null,vl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return th&&n.locale!=="ko"?null:n.data;default:return null}}var Kg={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ah(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Kg[e.type]:n==="textarea"}function lh(e,n,i,d){Op(d),n=jc(n,"onChange"),0<n.length&&(i=new Dd("onChange","change",null,i,d),e.push({event:i,listeners:n}))}var ys=null,xs=null;function Vg(e){_h(e,0)}function kc(e){var n=kl(e);if(mp(n))return e}function Yg(e,n){if(e==="change")return n}var sh=!1;if(Ui){var Nd;if(Ui){var Bd="oninput"in document;if(!Bd){var ch=document.createElement("div");ch.setAttribute("oninput","return;"),Bd=typeof ch.oninput=="function"}Nd=Bd}else Nd=!1;sh=Nd&&(!document.documentMode||9<document.documentMode)}function uh(){ys&&(ys.detachEvent("onpropertychange",dh),xs=ys=null)}function dh(e){if(e.propertyName==="value"&&kc(xs)){var n=[];lh(n,xs,e,yd(e)),Mp(Vg,n)}}function Gg(e,n,i){e==="focusin"?(uh(),ys=n,xs=i,ys.attachEvent("onpropertychange",dh)):e==="focusout"&&uh()}function Xg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return kc(xs)}function $g(e,n){if(e==="click")return kc(n)}function qg(e,n){if(e==="input"||e==="change")return kc(n)}function Qg(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var yi=typeof Object.is=="function"?Object.is:Qg;function ws(e,n){if(yi(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),d=Object.keys(n);if(i.length!==d.length)return!1;for(d=0;d<i.length;d++){var F=i[d];if(!qu.call(n,F)||!yi(e[F],n[F]))return!1}return!0}function fh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ph(e,n){var i=fh(e);e=0;for(var d;i;){if(i.nodeType===3){if(d=e+i.textContent.length,e<=n&&d>=n)return{node:i,offset:n-e};e=d}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=fh(i)}}function hh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?hh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function mh(){for(var e=window,n=ic();n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=ic(e.document)}return n}function Fd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Jg(e){var n=mh(),i=e.focusedElem,d=e.selectionRange;if(n!==i&&i&&i.ownerDocument&&hh(i.ownerDocument.documentElement,i)){if(d!==null&&Fd(i)){if(n=d.start,e=d.end,e===void 0&&(e=n),"selectionStart"in i)i.selectionStart=n,i.selectionEnd=Math.min(e,i.value.length);else if(e=(n=i.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var F=i.textContent.length,J=Math.min(d.start,F);d=d.end===void 0?J:Math.min(d.end,F),!e.extend&&J>d&&(F=d,d=J,J=F),F=ph(i,J);var Me=ph(i,d);F&&Me&&(e.rangeCount!==1||e.anchorNode!==F.node||e.anchorOffset!==F.offset||e.focusNode!==Me.node||e.focusOffset!==Me.offset)&&(n=n.createRange(),n.setStart(F.node,F.offset),e.removeAllRanges(),J>d?(e.addRange(n),e.extend(Me.node,Me.offset)):(n.setEnd(Me.node,Me.offset),e.addRange(n)))}}for(n=[],e=i;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<n.length;i++)e=n[i],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ev=Ui&&"documentMode"in document&&11>=document.documentMode,bl=null,Hd=null,ks=null,Wd=!1;function gh(e,n,i){var d=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Wd||bl==null||bl!==ic(d)||(d=bl,"selectionStart"in d&&Fd(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),ks&&ws(ks,d)||(ks=d,d=jc(Hd,"onSelect"),0<d.length&&(n=new Dd("onSelect","select",null,n,i),e.push({event:n,listeners:d}),n.target=bl)))}function Ec(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var yl={animationend:Ec("Animation","AnimationEnd"),animationiteration:Ec("Animation","AnimationIteration"),animationstart:Ec("Animation","AnimationStart"),transitionend:Ec("Transition","TransitionEnd")},Ud={},vh={};Ui&&(vh=document.createElement("div").style,"AnimationEvent"in window||(delete yl.animationend.animation,delete yl.animationiteration.animation,delete yl.animationstart.animation),"TransitionEvent"in window||delete yl.transitionend.transition);function Sc(e){if(Ud[e])return Ud[e];if(!yl[e])return e;var n=yl[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in vh)return Ud[e]=n[i];return e}var bh=Sc("animationend"),yh=Sc("animationiteration"),xh=Sc("animationstart"),wh=Sc("transitionend"),kh=new Map,Eh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ha(e,n){kh.set(e,n),za(n,[e])}for(var Kd=0;Kd<Eh.length;Kd++){var Vd=Eh[Kd],tv=Vd.toLowerCase(),nv=Vd[0].toUpperCase()+Vd.slice(1);ha(tv,"on"+nv)}ha(bh,"onAnimationEnd"),ha(yh,"onAnimationIteration"),ha(xh,"onAnimationStart"),ha("dblclick","onDoubleClick"),ha("focusin","onFocus"),ha("focusout","onBlur"),ha(wh,"onTransitionEnd"),cl("onMouseEnter",["mouseout","mouseover"]),cl("onMouseLeave",["mouseout","mouseover"]),cl("onPointerEnter",["pointerout","pointerover"]),cl("onPointerLeave",["pointerout","pointerover"]),za("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),za("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),za("onBeforeInput",["compositionend","keypress","textInput","paste"]),za("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),za("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),za("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Es="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),rv=new Set("cancel close invalid load scroll toggle".split(" ").concat(Es));function Sh(e,n,i){var d=e.type||"unknown-event";e.currentTarget=i,tg(d,n,void 0,e),e.currentTarget=null}function _h(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var d=e[i],F=d.event;d=d.listeners;e:{var J=void 0;if(n)for(var Me=d.length-1;0<=Me;Me--){var qe=d[Me],tt=qe.instance,ct=qe.currentTarget;if(qe=qe.listener,tt!==J&&F.isPropagationStopped())break e;Sh(F,qe,ct),J=tt}else for(Me=0;Me<d.length;Me++){if(qe=d[Me],tt=qe.instance,ct=qe.currentTarget,qe=qe.listener,tt!==J&&F.isPropagationStopped())break e;Sh(F,qe,ct),J=tt}}}if(sc)throw e=Ed,sc=!1,Ed=null,e}function Ur(e,n){var i=n[e0];i===void 0&&(i=n[e0]=new Set);var d=e+"__bubble";i.has(d)||(jh(n,e,2,!1),i.add(d))}function Yd(e,n,i){var d=0;n&&(d|=4),jh(i,e,d,n)}var _c="_reactListening"+Math.random().toString(36).slice(2);function Ss(e){if(!e[_c]){e[_c]=!0,lp.forEach(function(i){i!=="selectionchange"&&(rv.has(i)||Yd(i,!1,e),Yd(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[_c]||(n[_c]=!0,Yd("selectionchange",!1,n))}}function jh(e,n,i,d){switch(Xp(n)){case 1:var F=vg;break;case 4:F=bg;break;default:F=Pd}i=F.bind(null,n,i,e),F=void 0,!kd||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(F=!0),d?F!==void 0?e.addEventListener(n,i,{capture:!0,passive:F}):e.addEventListener(n,i,!0):F!==void 0?e.addEventListener(n,i,{passive:F}):e.addEventListener(n,i,!1)}function Gd(e,n,i,d,F){var J=d;if(!(n&1)&&!(n&2)&&d!==null)e:for(;;){if(d===null)return;var Me=d.tag;if(Me===3||Me===4){var qe=d.stateNode.containerInfo;if(qe===F||qe.nodeType===8&&qe.parentNode===F)break;if(Me===4)for(Me=d.return;Me!==null;){var tt=Me.tag;if((tt===3||tt===4)&&(tt=Me.stateNode.containerInfo,tt===F||tt.nodeType===8&&tt.parentNode===F))return;Me=Me.return}for(;qe!==null;){if(Me=Ba(qe),Me===null)return;if(tt=Me.tag,tt===5||tt===6){d=J=Me;continue e}qe=qe.parentNode}}d=d.return}Mp(function(){var ct=J,kt=yd(i),At=[];e:{var fe=kh.get(e);if(fe!==void 0){var Q=Dd,t=e;switch(e){case"keypress":if(yc(i)===0)break e;case"keydown":case"keyup":Q=Dg;break;case"focusin":t="focus",Q=Zd;break;case"focusout":t="blur",Q=Zd;break;case"beforeblur":case"afterblur":Q=Zd;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=Qp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=wg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=Zg;break;case bh:case yh:case xh:Q=Sg;break;case wh:Q=zg;break;case"scroll":Q=yg;break;case"wheel":Q=Bg;break;case"copy":case"cut":case"paste":Q=jg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=eh}var T=(n&4)!==0,j=!T&&e==="scroll",f=T?fe!==null?fe+"Capture":null:fe;T=[];for(var l=ct,v;l!==null;){v=l;var k=v.stateNode;if(v.tag===5&&k!==null&&(v=k,f!==null&&(k=as(l,f),k!=null&&T.push(_s(l,k,v)))),j)break;l=l.return}0<T.length&&(fe=new Q(fe,t,null,i,kt),At.push({event:fe,listeners:T}))}}if(!(n&7)){e:{if(fe=e==="mouseover"||e==="pointerover",Q=e==="mouseout"||e==="pointerout",fe&&i!==bd&&(t=i.relatedTarget||i.fromElement)&&(Ba(t)||t[Vi]))break e;if((Q||fe)&&(fe=kt.window===kt?kt:(fe=kt.ownerDocument)?fe.defaultView||fe.parentWindow:window,Q?(t=i.relatedTarget||i.toElement,Q=ct,t=t?Ba(t):null,t!==null&&(j=Na(t),t!==j||t.tag!==5&&t.tag!==6)&&(t=null)):(Q=null,t=ct),Q!==t)){if(T=Qp,k="onMouseLeave",f="onMouseEnter",l="mouse",(e==="pointerout"||e==="pointerover")&&(T=eh,k="onPointerLeave",f="onPointerEnter",l="pointer"),j=Q==null?fe:kl(Q),v=t==null?fe:kl(t),fe=new T(k,l+"leave",Q,i,kt),fe.target=j,fe.relatedTarget=v,k=null,Ba(kt)===ct&&(T=new T(f,l+"enter",t,i,kt),T.target=v,T.relatedTarget=j,k=T),j=k,Q&&t)t:{for(T=Q,f=t,l=0,v=T;v;v=xl(v))l++;for(v=0,k=f;k;k=xl(k))v++;for(;0<l-v;)T=xl(T),l--;for(;0<v-l;)f=xl(f),v--;for(;l--;){if(T===f||f!==null&&T===f.alternate)break t;T=xl(T),f=xl(f)}T=null}else T=null;Q!==null&&Oh(At,fe,Q,T,!1),t!==null&&j!==null&&Oh(At,j,t,T,!0)}}e:{if(fe=ct?kl(ct):window,Q=fe.nodeName&&fe.nodeName.toLowerCase(),Q==="select"||Q==="input"&&fe.type==="file")var g=Yg;else if(ah(fe))if(sh)g=qg;else{g=Xg;var a=Gg}else(Q=fe.nodeName)&&Q.toLowerCase()==="input"&&(fe.type==="checkbox"||fe.type==="radio")&&(g=$g);if(g&&(g=g(e,ct))){lh(At,g,i,kt);break e}a&&a(e,fe,ct),e==="focusout"&&(a=fe._wrapperState)&&a.controlled&&fe.type==="number"&&pd(fe,"number",fe.value)}switch(a=ct?kl(ct):window,e){case"focusin":(ah(a)||a.contentEditable==="true")&&(bl=a,Hd=ct,ks=null);break;case"focusout":ks=Hd=bl=null;break;case"mousedown":Wd=!0;break;case"contextmenu":case"mouseup":case"dragend":Wd=!1,gh(At,i,kt);break;case"selectionchange":if(ev)break;case"keydown":case"keyup":gh(At,i,kt)}var P;if(zd)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else vl?oh(e,i)&&(R="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(R="onCompositionStart");R&&(th&&i.locale!=="ko"&&(vl||R!=="onCompositionStart"?R==="onCompositionEnd"&&vl&&(P=$p()):(pa=kt,Td="value"in pa?pa.value:pa.textContent,vl=!0)),a=jc(ct,R),0<a.length&&(R=new Jp(R,e,null,i,kt),At.push({event:R,listeners:a}),P?R.data=P:(P=ih(i),P!==null&&(R.data=P)))),(P=Hg?Wg(e,i):Ug(e,i))&&(ct=jc(ct,"onBeforeInput"),0<ct.length&&(kt=new Jp("onBeforeInput","beforeinput",null,i,kt),At.push({event:kt,listeners:ct}),kt.data=P))}_h(At,n)})}function _s(e,n,i){return{instance:e,listener:n,currentTarget:i}}function jc(e,n){for(var i=n+"Capture",d=[];e!==null;){var F=e,J=F.stateNode;F.tag===5&&J!==null&&(F=J,J=as(e,i),J!=null&&d.unshift(_s(e,J,F)),J=as(e,n),J!=null&&d.push(_s(e,J,F))),e=e.return}return d}function xl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Oh(e,n,i,d,F){for(var J=n._reactName,Me=[];i!==null&&i!==d;){var qe=i,tt=qe.alternate,ct=qe.stateNode;if(tt!==null&&tt===d)break;qe.tag===5&&ct!==null&&(qe=ct,F?(tt=as(i,J),tt!=null&&Me.unshift(_s(i,tt,qe))):F||(tt=as(i,J),tt!=null&&Me.push(_s(i,tt,qe)))),i=i.return}Me.length!==0&&e.push({event:n,listeners:Me})}var ov=/\r\n?/g,iv=/\u0000|\uFFFD/g;function Ch(e){return(typeof e=="string"?e:""+e).replace(ov,`
|
|
30
|
+
`).replace(iv,"")}function Oc(e,n,i){if(n=Ch(n),Ch(e)!==n&&i)throw Error(xn(425))}function Cc(){}var Xd=null,$d=null;function qd(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Qd=typeof setTimeout=="function"?setTimeout:void 0,av=typeof clearTimeout=="function"?clearTimeout:void 0,Ih=typeof Promise=="function"?Promise:void 0,lv=typeof queueMicrotask=="function"?queueMicrotask:typeof Ih<"u"?function(e){return Ih.resolve(null).then(e).catch(sv)}:Qd;function sv(e){setTimeout(function(){throw e})}function Jd(e,n){var i=n,d=0;do{var F=i.nextSibling;if(e.removeChild(i),F&&F.nodeType===8)if(i=F.data,i==="/$"){if(d===0){e.removeChild(F),ms(n);return}d--}else i!=="$"&&i!=="$?"&&i!=="$!"||d++;i=F}while(i);ms(n)}function ma(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Ph(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"){if(n===0)return e;n--}else i==="/$"&&n++}e=e.previousSibling}return null}var wl=Math.random().toString(36).slice(2),Di="__reactFiber$"+wl,js="__reactProps$"+wl,Vi="__reactContainer$"+wl,e0="__reactEvents$"+wl,cv="__reactListeners$"+wl,uv="__reactHandles$"+wl;function Ba(e){var n=e[Di];if(n)return n;for(var i=e.parentNode;i;){if(n=i[Vi]||i[Di]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=Ph(e);e!==null;){if(i=e[Di])return i;e=Ph(e)}return n}e=i,i=e.parentNode}return null}function Os(e){return e=e[Di]||e[Vi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function kl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(xn(33))}function Ic(e){return e[js]||null}var t0=[],El=-1;function ga(e){return{current:e}}function Kr(e){0>El||(e.current=t0[El],t0[El]=null,El--)}function Br(e,n){El++,t0[El]=e.current,e.current=n}var va={},Mo=ga(va),Wo=ga(!1),Fa=va;function Sl(e,n){var i=e.type.contextTypes;if(!i)return va;var d=e.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===n)return d.__reactInternalMemoizedMaskedChildContext;var F={},J;for(J in i)F[J]=n[J];return d&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=F),F}function Uo(e){return e=e.childContextTypes,e!=null}function Pc(){Kr(Wo),Kr(Mo)}function Mh(e,n,i){if(Mo.current!==va)throw Error(xn(168));Br(Mo,n),Br(Wo,i)}function Th(e,n,i){var d=e.stateNode;if(n=n.childContextTypes,typeof d.getChildContext!="function")return i;d=d.getChildContext();for(var F in d)if(!(F in n))throw Error(xn(108,Gm(e)||"Unknown",F));return to({},i,d)}function Mc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||va,Fa=Mo.current,Br(Mo,e),Br(Wo,Wo.current),!0}function Dh(e,n,i){var d=e.stateNode;if(!d)throw Error(xn(169));i?(e=Th(e,n,Fa),d.__reactInternalMemoizedMergedChildContext=e,Kr(Wo),Kr(Mo),Br(Mo,e)):Kr(Wo),Br(Wo,i)}var Yi=null,Tc=!1,n0=!1;function Ah(e){Yi===null?Yi=[e]:Yi.push(e)}function dv(e){Tc=!0,Ah(e)}function ba(){if(!n0&&Yi!==null){n0=!0;var e=0,n=Zr;try{var i=Yi;for(Zr=1;e<i.length;e++){var d=i[e];do d=d(!0);while(d!==null)}Yi=null,Tc=!1}catch(F){throw Yi!==null&&(Yi=Yi.slice(e+1)),Zp(Sd,ba),F}finally{Zr=n,n0=!1}}return null}var _l=[],jl=0,Dc=null,Ac=0,si=[],ci=0,Ha=null,Gi=1,Xi="";function Wa(e,n){_l[jl++]=Ac,_l[jl++]=Dc,Dc=e,Ac=n}function Lh(e,n,i){si[ci++]=Gi,si[ci++]=Xi,si[ci++]=Ha,Ha=e;var d=Gi;e=Xi;var F=32-bi(d)-1;d&=~(1<<F),i+=1;var J=32-bi(n)+F;if(30<J){var Me=F-F%5;J=(d&(1<<Me)-1).toString(32),d>>=Me,F-=Me,Gi=1<<32-bi(n)+F|i<<F|d,Xi=J+e}else Gi=1<<J|i<<F|d,Xi=e}function r0(e){e.return!==null&&(Wa(e,1),Lh(e,1,0))}function o0(e){for(;e===Dc;)Dc=_l[--jl],_l[jl]=null,Ac=_l[--jl],_l[jl]=null;for(;e===Ha;)Ha=si[--ci],si[ci]=null,Xi=si[--ci],si[ci]=null,Gi=si[--ci],si[ci]=null}var Jo=null,ei=null,Xr=!1,xi=null;function Zh(e,n){var i=pi(5,null,null,0);i.elementType="DELETED",i.stateNode=n,i.return=e,n=e.deletions,n===null?(e.deletions=[i],e.flags|=16):n.push(i)}function Rh(e,n){switch(e.tag){case 5:var i=e.type;return n=n.nodeType!==1||i.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Jo=e,ei=ma(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Jo=e,ei=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(i=Ha!==null?{id:Gi,overflow:Xi}:null,e.memoizedState={dehydrated:n,treeContext:i,retryLane:1073741824},i=pi(18,null,null,0),i.stateNode=n,i.return=e,e.child=i,Jo=e,ei=null,!0):!1;default:return!1}}function i0(e){return(e.mode&1)!==0&&(e.flags&128)===0}function a0(e){if(Xr){var n=ei;if(n){var i=n;if(!Rh(e,n)){if(i0(e))throw Error(xn(418));n=ma(i.nextSibling);var d=Jo;n&&Rh(e,n)?Zh(d,i):(e.flags=e.flags&-4097|2,Xr=!1,Jo=e)}}else{if(i0(e))throw Error(xn(418));e.flags=e.flags&-4097|2,Xr=!1,Jo=e}}}function zh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Jo=e}function Lc(e){if(e!==Jo)return!1;if(!Xr)return zh(e),Xr=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!qd(e.type,e.memoizedProps)),n&&(n=ei)){if(i0(e))throw Nh(),Error(xn(418));for(;n;)Zh(e,n),n=ma(n.nextSibling)}if(zh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(xn(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"){if(n===0){ei=ma(e.nextSibling);break e}n--}else i!=="$"&&i!=="$!"&&i!=="$?"||n++}e=e.nextSibling}ei=null}}else ei=Jo?ma(e.stateNode.nextSibling):null;return!0}function Nh(){for(var e=ei;e;)e=ma(e.nextSibling)}function Ol(){ei=Jo=null,Xr=!1}function l0(e){xi===null?xi=[e]:xi.push(e)}var fv=Ki.ReactCurrentBatchConfig;function Cs(e,n,i){if(e=i.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(i._owner){if(i=i._owner,i){if(i.tag!==1)throw Error(xn(309));var d=i.stateNode}if(!d)throw Error(xn(147,e));var F=d,J=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===J?n.ref:(n=function(Me){var qe=F.refs;Me===null?delete qe[J]:qe[J]=Me},n._stringRef=J,n)}if(typeof e!="string")throw Error(xn(284));if(!i._owner)throw Error(xn(290,e))}return e}function Zc(e,n){throw e=Object.prototype.toString.call(n),Error(xn(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Bh(e){var n=e._init;return n(e._payload)}function Fh(e){function n(f,l){if(e){var v=f.deletions;v===null?(f.deletions=[l],f.flags|=16):v.push(l)}}function i(f,l){if(!e)return null;for(;l!==null;)n(f,l),l=l.sibling;return null}function d(f,l){for(f=new Map;l!==null;)l.key!==null?f.set(l.key,l):f.set(l.index,l),l=l.sibling;return f}function F(f,l){return f=ja(f,l),f.index=0,f.sibling=null,f}function J(f,l,v){return f.index=v,e?(v=f.alternate,v!==null?(v=v.index,v<l?(f.flags|=2,l):v):(f.flags|=2,l)):(f.flags|=1048576,l)}function Me(f){return e&&f.alternate===null&&(f.flags|=2),f}function qe(f,l,v,k){return l===null||l.tag!==6?(l=Q0(v,f.mode,k),l.return=f,l):(l=F(l,v),l.return=f,l)}function tt(f,l,v,k){var g=v.type;return g===dl?kt(f,l,v.props.children,k,v.key):l!==null&&(l.elementType===g||typeof g=="object"&&g!==null&&g.$$typeof===la&&Bh(g)===l.type)?(k=F(l,v.props),k.ref=Cs(f,l,v),k.return=f,k):(k=au(v.type,v.key,v.props,null,f.mode,k),k.ref=Cs(f,l,v),k.return=f,k)}function ct(f,l,v,k){return l===null||l.tag!==4||l.stateNode.containerInfo!==v.containerInfo||l.stateNode.implementation!==v.implementation?(l=J0(v,f.mode,k),l.return=f,l):(l=F(l,v.children||[]),l.return=f,l)}function kt(f,l,v,k,g){return l===null||l.tag!==7?(l=qa(v,f.mode,k,g),l.return=f,l):(l=F(l,v),l.return=f,l)}function At(f,l,v){if(typeof l=="string"&&l!==""||typeof l=="number")return l=Q0(""+l,f.mode,v),l.return=f,l;if(typeof l=="object"&&l!==null){switch(l.$$typeof){case rc:return v=au(l.type,l.key,l.props,null,f.mode,v),v.ref=Cs(f,null,l),v.return=f,v;case ul:return l=J0(l,f.mode,v),l.return=f,l;case la:var k=l._init;return At(f,k(l._payload),v)}if(rs(l)||ts(l))return l=qa(l,f.mode,v,null),l.return=f,l;Zc(f,l)}return null}function fe(f,l,v,k){var g=l!==null?l.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return g!==null?null:qe(f,l,""+v,k);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case rc:return v.key===g?tt(f,l,v,k):null;case ul:return v.key===g?ct(f,l,v,k):null;case la:return g=v._init,fe(f,l,g(v._payload),k)}if(rs(v)||ts(v))return g!==null?null:kt(f,l,v,k,null);Zc(f,v)}return null}function Q(f,l,v,k,g){if(typeof k=="string"&&k!==""||typeof k=="number")return f=f.get(v)||null,qe(l,f,""+k,g);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case rc:return f=f.get(k.key===null?v:k.key)||null,tt(l,f,k,g);case ul:return f=f.get(k.key===null?v:k.key)||null,ct(l,f,k,g);case la:var a=k._init;return Q(f,l,v,a(k._payload),g)}if(rs(k)||ts(k))return f=f.get(v)||null,kt(l,f,k,g,null);Zc(l,k)}return null}function t(f,l,v,k){for(var g=null,a=null,P=l,R=l=0,K=null;P!==null&&R<v.length;R++){P.index>R?(K=P,P=null):K=P.sibling;var U=fe(f,P,v[R],k);if(U===null){P===null&&(P=K);break}e&&P&&U.alternate===null&&n(f,P),l=J(U,l,R),a===null?g=U:a.sibling=U,a=U,P=K}if(R===v.length)return i(f,P),Xr&&Wa(f,R),g;if(P===null){for(;R<v.length;R++)P=At(f,v[R],k),P!==null&&(l=J(P,l,R),a===null?g=P:a.sibling=P,a=P);return Xr&&Wa(f,R),g}for(P=d(f,P);R<v.length;R++)K=Q(P,f,R,v[R],k),K!==null&&(e&&K.alternate!==null&&P.delete(K.key===null?R:K.key),l=J(K,l,R),a===null?g=K:a.sibling=K,a=K);return e&&P.forEach(function(m){return n(f,m)}),Xr&&Wa(f,R),g}function T(f,l,v,k){var g=ts(v);if(typeof g!="function")throw Error(xn(150));if(v=g.call(v),v==null)throw Error(xn(151));for(var a=g=null,P=l,R=l=0,K=null,U=v.next();P!==null&&!U.done;R++,U=v.next()){P.index>R?(K=P,P=null):K=P.sibling;var m=fe(f,P,U.value,k);if(m===null){P===null&&(P=K);break}e&&P&&m.alternate===null&&n(f,P),l=J(m,l,R),a===null?g=m:a.sibling=m,a=m,P=K}if(U.done)return i(f,P),Xr&&Wa(f,R),g;if(P===null){for(;!U.done;R++,U=v.next())U=At(f,U.value,k),U!==null&&(l=J(U,l,R),a===null?g=U:a.sibling=U,a=U);return Xr&&Wa(f,R),g}for(P=d(f,P);!U.done;R++,U=v.next())U=Q(P,f,R,U.value,k),U!==null&&(e&&U.alternate!==null&&P.delete(U.key===null?R:U.key),l=J(U,l,R),a===null?g=U:a.sibling=U,a=U);return e&&P.forEach(function(G){return n(f,G)}),Xr&&Wa(f,R),g}function j(f,l,v,k){if(typeof v=="object"&&v!==null&&v.type===dl&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case rc:e:{for(var g=v.key,a=l;a!==null;){if(a.key===g){if(g=v.type,g===dl){if(a.tag===7){i(f,a.sibling),l=F(a,v.props.children),l.return=f,f=l;break e}}else if(a.elementType===g||typeof g=="object"&&g!==null&&g.$$typeof===la&&Bh(g)===a.type){i(f,a.sibling),l=F(a,v.props),l.ref=Cs(f,a,v),l.return=f,f=l;break e}i(f,a);break}else n(f,a);a=a.sibling}v.type===dl?(l=qa(v.props.children,f.mode,k,v.key),l.return=f,f=l):(k=au(v.type,v.key,v.props,null,f.mode,k),k.ref=Cs(f,l,v),k.return=f,f=k)}return Me(f);case ul:e:{for(a=v.key;l!==null;){if(l.key===a)if(l.tag===4&&l.stateNode.containerInfo===v.containerInfo&&l.stateNode.implementation===v.implementation){i(f,l.sibling),l=F(l,v.children||[]),l.return=f,f=l;break e}else{i(f,l);break}else n(f,l);l=l.sibling}l=J0(v,f.mode,k),l.return=f,f=l}return Me(f);case la:return a=v._init,j(f,l,a(v._payload),k)}if(rs(v))return t(f,l,v,k);if(ts(v))return T(f,l,v,k);Zc(f,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,l!==null&&l.tag===6?(i(f,l.sibling),l=F(l,v),l.return=f,f=l):(i(f,l),l=Q0(v,f.mode,k),l.return=f,f=l),Me(f)):i(f,l)}return j}var Cl=Fh(!0),Hh=Fh(!1),Rc=ga(null),zc=null,Il=null,s0=null;function c0(){s0=Il=zc=null}function u0(e){var n=Rc.current;Kr(Rc),e._currentValue=n}function d0(e,n,i){for(;e!==null;){var d=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,d!==null&&(d.childLanes|=n)):d!==null&&(d.childLanes&n)!==n&&(d.childLanes|=n),e===i)break;e=e.return}}function Pl(e,n){zc=e,s0=Il=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(Ko=!0),e.firstContext=null)}function ui(e){var n=e._currentValue;if(s0!==e)if(e={context:e,memoizedValue:n,next:null},Il===null){if(zc===null)throw Error(xn(308));Il=e,zc.dependencies={lanes:0,firstContext:e}}else Il=Il.next=e;return n}var Ua=null;function f0(e){Ua===null?Ua=[e]:Ua.push(e)}function Wh(e,n,i,d){var F=n.interleaved;return F===null?(i.next=i,f0(n)):(i.next=F.next,F.next=i),n.interleaved=i,$i(e,d)}function $i(e,n){e.lanes|=n;var i=e.alternate;for(i!==null&&(i.lanes|=n),i=e,e=e.return;e!==null;)e.childLanes|=n,i=e.alternate,i!==null&&(i.childLanes|=n),i=e,e=e.return;return i.tag===3?i.stateNode:null}var ya=!1;function p0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Uh(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qi(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function xa(e,n,i){var d=e.updateQueue;if(d===null)return null;if(d=d.shared,jr&2){var F=d.pending;return F===null?n.next=n:(n.next=F.next,F.next=n),d.pending=n,$i(e,i)}return F=d.interleaved,F===null?(n.next=n,f0(d)):(n.next=F.next,F.next=n),d.interleaved=n,$i(e,i)}function Nc(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194240)!==0)){var d=n.lanes;d&=e.pendingLanes,i|=d,n.lanes=i,Od(e,i)}}function Kh(e,n){var i=e.updateQueue,d=e.alternate;if(d!==null&&(d=d.updateQueue,i===d)){var F=null,J=null;if(i=i.firstBaseUpdate,i!==null){do{var Me={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};J===null?F=J=Me:J=J.next=Me,i=i.next}while(i!==null);J===null?F=J=n:J=J.next=n}else F=J=n;i={baseState:d.baseState,firstBaseUpdate:F,lastBaseUpdate:J,shared:d.shared,effects:d.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}function Bc(e,n,i,d){var F=e.updateQueue;ya=!1;var J=F.firstBaseUpdate,Me=F.lastBaseUpdate,qe=F.shared.pending;if(qe!==null){F.shared.pending=null;var tt=qe,ct=tt.next;tt.next=null,Me===null?J=ct:Me.next=ct,Me=tt;var kt=e.alternate;kt!==null&&(kt=kt.updateQueue,qe=kt.lastBaseUpdate,qe!==Me&&(qe===null?kt.firstBaseUpdate=ct:qe.next=ct,kt.lastBaseUpdate=tt))}if(J!==null){var At=F.baseState;Me=0,kt=ct=tt=null,qe=J;do{var fe=qe.lane,Q=qe.eventTime;if((d&fe)===fe){kt!==null&&(kt=kt.next={eventTime:Q,lane:0,tag:qe.tag,payload:qe.payload,callback:qe.callback,next:null});e:{var t=e,T=qe;switch(fe=n,Q=i,T.tag){case 1:if(t=T.payload,typeof t=="function"){At=t.call(Q,At,fe);break e}At=t;break e;case 3:t.flags=t.flags&-65537|128;case 0:if(t=T.payload,fe=typeof t=="function"?t.call(Q,At,fe):t,fe==null)break e;At=to({},At,fe);break e;case 2:ya=!0}}qe.callback!==null&&qe.lane!==0&&(e.flags|=64,fe=F.effects,fe===null?F.effects=[qe]:fe.push(qe))}else Q={eventTime:Q,lane:fe,tag:qe.tag,payload:qe.payload,callback:qe.callback,next:null},kt===null?(ct=kt=Q,tt=At):kt=kt.next=Q,Me|=fe;if(qe=qe.next,qe===null){if(qe=F.shared.pending,qe===null)break;fe=qe,qe=fe.next,fe.next=null,F.lastBaseUpdate=fe,F.shared.pending=null}}while(!0);if(kt===null&&(tt=At),F.baseState=tt,F.firstBaseUpdate=ct,F.lastBaseUpdate=kt,n=F.shared.interleaved,n!==null){F=n;do Me|=F.lane,F=F.next;while(F!==n)}else J===null&&(F.shared.lanes=0);Ya|=Me,e.lanes=Me,e.memoizedState=At}}function Vh(e,n,i){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var d=e[n],F=d.callback;if(F!==null){if(d.callback=null,d=i,typeof F!="function")throw Error(xn(191,F));F.call(d)}}}var Is={},Ai=ga(Is),Ps=ga(Is),Ms=ga(Is);function Ka(e){if(e===Is)throw Error(xn(174));return e}function h0(e,n){switch(Br(Ms,n),Br(Ps,e),Br(Ai,Is),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:md(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=md(n,e)}Kr(Ai),Br(Ai,n)}function Ml(){Kr(Ai),Kr(Ps),Kr(Ms)}function Yh(e){Ka(Ms.current);var n=Ka(Ai.current),i=md(n,e.type);n!==i&&(Br(Ps,e),Br(Ai,i))}function m0(e){Ps.current===e&&(Kr(Ai),Kr(Ps))}var no=ga(0);function Fc(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||i.data==="$?"||i.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var g0=[];function v0(){for(var e=0;e<g0.length;e++)g0[e]._workInProgressVersionPrimary=null;g0.length=0}var Hc=Ki.ReactCurrentDispatcher,b0=Ki.ReactCurrentBatchConfig,Va=0,ro=null,ho=null,yo=null,Wc=!1,Ts=!1,Ds=0,pv=0;function To(){throw Error(xn(321))}function y0(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!yi(e[i],n[i]))return!1;return!0}function x0(e,n,i,d,F,J){if(Va=J,ro=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,Hc.current=e===null||e.memoizedState===null?vv:bv,e=i(d,F),Ts){J=0;do{if(Ts=!1,Ds=0,25<=J)throw Error(xn(301));J+=1,yo=ho=null,n.updateQueue=null,Hc.current=yv,e=i(d,F)}while(Ts)}if(Hc.current=Vc,n=ho!==null&&ho.next!==null,Va=0,yo=ho=ro=null,Wc=!1,n)throw Error(xn(300));return e}function w0(){var e=Ds!==0;return Ds=0,e}function Li(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yo===null?ro.memoizedState=yo=e:yo=yo.next=e,yo}function di(){if(ho===null){var e=ro.alternate;e=e!==null?e.memoizedState:null}else e=ho.next;var n=yo===null?ro.memoizedState:yo.next;if(n!==null)yo=n,ho=e;else{if(e===null)throw Error(xn(310));ho=e,e={memoizedState:ho.memoizedState,baseState:ho.baseState,baseQueue:ho.baseQueue,queue:ho.queue,next:null},yo===null?ro.memoizedState=yo=e:yo=yo.next=e}return yo}function As(e,n){return typeof n=="function"?n(e):n}function k0(e){var n=di(),i=n.queue;if(i===null)throw Error(xn(311));i.lastRenderedReducer=e;var d=ho,F=d.baseQueue,J=i.pending;if(J!==null){if(F!==null){var Me=F.next;F.next=J.next,J.next=Me}d.baseQueue=F=J,i.pending=null}if(F!==null){J=F.next,d=d.baseState;var qe=Me=null,tt=null,ct=J;do{var kt=ct.lane;if((Va&kt)===kt)tt!==null&&(tt=tt.next={lane:0,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null}),d=ct.hasEagerState?ct.eagerState:e(d,ct.action);else{var At={lane:kt,action:ct.action,hasEagerState:ct.hasEagerState,eagerState:ct.eagerState,next:null};tt===null?(qe=tt=At,Me=d):tt=tt.next=At,ro.lanes|=kt,Ya|=kt}ct=ct.next}while(ct!==null&&ct!==J);tt===null?Me=d:tt.next=qe,yi(d,n.memoizedState)||(Ko=!0),n.memoizedState=d,n.baseState=Me,n.baseQueue=tt,i.lastRenderedState=d}if(e=i.interleaved,e!==null){F=e;do J=F.lane,ro.lanes|=J,Ya|=J,F=F.next;while(F!==e)}else F===null&&(i.lanes=0);return[n.memoizedState,i.dispatch]}function E0(e){var n=di(),i=n.queue;if(i===null)throw Error(xn(311));i.lastRenderedReducer=e;var d=i.dispatch,F=i.pending,J=n.memoizedState;if(F!==null){i.pending=null;var Me=F=F.next;do J=e(J,Me.action),Me=Me.next;while(Me!==F);yi(J,n.memoizedState)||(Ko=!0),n.memoizedState=J,n.baseQueue===null&&(n.baseState=J),i.lastRenderedState=J}return[J,d]}function Gh(){}function Xh(e,n){var i=ro,d=di(),F=n(),J=!yi(d.memoizedState,F);if(J&&(d.memoizedState=F,Ko=!0),d=d.queue,S0(Qh.bind(null,i,d,e),[e]),d.getSnapshot!==n||J||yo!==null&&yo.memoizedState.tag&1){if(i.flags|=2048,Ls(9,qh.bind(null,i,d,F,n),void 0,null),xo===null)throw Error(xn(349));Va&30||$h(i,n,F)}return F}function $h(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=ro.updateQueue,n===null?(n={lastEffect:null,stores:null},ro.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function qh(e,n,i,d){n.value=i,n.getSnapshot=d,Jh(n)&&e1(e)}function Qh(e,n,i){return i(function(){Jh(n)&&e1(e)})}function Jh(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!yi(e,i)}catch{return!0}}function e1(e){var n=$i(e,1);n!==null&&Si(n,e,1,-1)}function t1(e){var n=Li();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:As,lastRenderedState:e},n.queue=e,e=e.dispatch=gv.bind(null,ro,e),[n.memoizedState,e]}function Ls(e,n,i,d){return e={tag:e,create:n,destroy:i,deps:d,next:null},n=ro.updateQueue,n===null?(n={lastEffect:null,stores:null},ro.updateQueue=n,n.lastEffect=e.next=e):(i=n.lastEffect,i===null?n.lastEffect=e.next=e:(d=i.next,i.next=e,e.next=d,n.lastEffect=e)),e}function n1(){return di().memoizedState}function Uc(e,n,i,d){var F=Li();ro.flags|=e,F.memoizedState=Ls(1|n,i,void 0,d===void 0?null:d)}function Kc(e,n,i,d){var F=di();d=d===void 0?null:d;var J=void 0;if(ho!==null){var Me=ho.memoizedState;if(J=Me.destroy,d!==null&&y0(d,Me.deps)){F.memoizedState=Ls(n,i,J,d);return}}ro.flags|=e,F.memoizedState=Ls(1|n,i,J,d)}function r1(e,n){return Uc(8390656,8,e,n)}function S0(e,n){return Kc(2048,8,e,n)}function o1(e,n){return Kc(4,2,e,n)}function i1(e,n){return Kc(4,4,e,n)}function a1(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function l1(e,n,i){return i=i!=null?i.concat([e]):null,Kc(4,4,a1.bind(null,n,e),i)}function _0(){}function s1(e,n){var i=di();n=n===void 0?null:n;var d=i.memoizedState;return d!==null&&n!==null&&y0(n,d[1])?d[0]:(i.memoizedState=[e,n],e)}function c1(e,n){var i=di();n=n===void 0?null:n;var d=i.memoizedState;return d!==null&&n!==null&&y0(n,d[1])?d[0]:(e=e(),i.memoizedState=[e,n],e)}function u1(e,n,i){return Va&21?(yi(i,n)||(i=Bp(),ro.lanes|=i,Ya|=i,e.baseState=!0),n):(e.baseState&&(e.baseState=!1,Ko=!0),e.memoizedState=i)}function hv(e,n){var i=Zr;Zr=i!==0&&4>i?i:4,e(!0);var d=b0.transition;b0.transition={};try{e(!1),n()}finally{Zr=i,b0.transition=d}}function d1(){return di().memoizedState}function mv(e,n,i){var d=Sa(e);if(i={lane:d,action:i,hasEagerState:!1,eagerState:null,next:null},f1(e))p1(n,i);else if(i=Wh(e,n,i,d),i!==null){var F=No();Si(i,e,d,F),h1(i,n,d)}}function gv(e,n,i){var d=Sa(e),F={lane:d,action:i,hasEagerState:!1,eagerState:null,next:null};if(f1(e))p1(n,F);else{var J=e.alternate;if(e.lanes===0&&(J===null||J.lanes===0)&&(J=n.lastRenderedReducer,J!==null))try{var Me=n.lastRenderedState,qe=J(Me,i);if(F.hasEagerState=!0,F.eagerState=qe,yi(qe,Me)){var tt=n.interleaved;tt===null?(F.next=F,f0(n)):(F.next=tt.next,tt.next=F),n.interleaved=F;return}}catch{}finally{}i=Wh(e,n,F,d),i!==null&&(F=No(),Si(i,e,d,F),h1(i,n,d))}}function f1(e){var n=e.alternate;return e===ro||n!==null&&n===ro}function p1(e,n){Ts=Wc=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function h1(e,n,i){if(i&4194240){var d=n.lanes;d&=e.pendingLanes,i|=d,n.lanes=i,Od(e,i)}}var Vc={readContext:ui,useCallback:To,useContext:To,useEffect:To,useImperativeHandle:To,useInsertionEffect:To,useLayoutEffect:To,useMemo:To,useReducer:To,useRef:To,useState:To,useDebugValue:To,useDeferredValue:To,useTransition:To,useMutableSource:To,useSyncExternalStore:To,useId:To,unstable_isNewReconciler:!1},vv={readContext:ui,useCallback:function(e,n){return Li().memoizedState=[e,n===void 0?null:n],e},useContext:ui,useEffect:r1,useImperativeHandle:function(e,n,i){return i=i!=null?i.concat([e]):null,Uc(4194308,4,a1.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Uc(4194308,4,e,n)},useInsertionEffect:function(e,n){return Uc(4,2,e,n)},useMemo:function(e,n){var i=Li();return n=n===void 0?null:n,e=e(),i.memoizedState=[e,n],e},useReducer:function(e,n,i){var d=Li();return n=i!==void 0?i(n):n,d.memoizedState=d.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},d.queue=e,e=e.dispatch=mv.bind(null,ro,e),[d.memoizedState,e]},useRef:function(e){var n=Li();return e={current:e},n.memoizedState=e},useState:t1,useDebugValue:_0,useDeferredValue:function(e){return Li().memoizedState=e},useTransition:function(){var e=t1(!1),n=e[0];return e=hv.bind(null,e[1]),Li().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,i){var d=ro,F=Li();if(Xr){if(i===void 0)throw Error(xn(407));i=i()}else{if(i=n(),xo===null)throw Error(xn(349));Va&30||$h(d,n,i)}F.memoizedState=i;var J={value:i,getSnapshot:n};return F.queue=J,r1(Qh.bind(null,d,J,e),[e]),d.flags|=2048,Ls(9,qh.bind(null,d,J,i,n),void 0,null),i},useId:function(){var e=Li(),n=xo.identifierPrefix;if(Xr){var i=Xi,d=Gi;i=(d&~(1<<32-bi(d)-1)).toString(32)+i,n=":"+n+"R"+i,i=Ds++,0<i&&(n+="H"+i.toString(32)),n+=":"}else i=pv++,n=":"+n+"r"+i.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},bv={readContext:ui,useCallback:s1,useContext:ui,useEffect:S0,useImperativeHandle:l1,useInsertionEffect:o1,useLayoutEffect:i1,useMemo:c1,useReducer:k0,useRef:n1,useState:function(){return k0(As)},useDebugValue:_0,useDeferredValue:function(e){var n=di();return u1(n,ho.memoizedState,e)},useTransition:function(){var e=k0(As)[0],n=di().memoizedState;return[e,n]},useMutableSource:Gh,useSyncExternalStore:Xh,useId:d1,unstable_isNewReconciler:!1},yv={readContext:ui,useCallback:s1,useContext:ui,useEffect:S0,useImperativeHandle:l1,useInsertionEffect:o1,useLayoutEffect:i1,useMemo:c1,useReducer:E0,useRef:n1,useState:function(){return E0(As)},useDebugValue:_0,useDeferredValue:function(e){var n=di();return ho===null?n.memoizedState=e:u1(n,ho.memoizedState,e)},useTransition:function(){var e=E0(As)[0],n=di().memoizedState;return[e,n]},useMutableSource:Gh,useSyncExternalStore:Xh,useId:d1,unstable_isNewReconciler:!1};function wi(e,n){if(e&&e.defaultProps){n=to({},n),e=e.defaultProps;for(var i in e)n[i]===void 0&&(n[i]=e[i]);return n}return n}function j0(e,n,i,d){n=e.memoizedState,i=i(d,n),i=i==null?n:to({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Yc={isMounted:function(e){return(e=e._reactInternals)?Na(e)===e:!1},enqueueSetState:function(e,n,i){e=e._reactInternals;var d=No(),F=Sa(e),J=qi(d,F);J.payload=n,i!=null&&(J.callback=i),n=xa(e,J,F),n!==null&&(Si(n,e,F,d),Nc(n,e,F))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var d=No(),F=Sa(e),J=qi(d,F);J.tag=1,J.payload=n,i!=null&&(J.callback=i),n=xa(e,J,F),n!==null&&(Si(n,e,F,d),Nc(n,e,F))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=No(),d=Sa(e),F=qi(i,d);F.tag=2,n!=null&&(F.callback=n),n=xa(e,F,d),n!==null&&(Si(n,e,d,i),Nc(n,e,d))}};function m1(e,n,i,d,F,J,Me){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(d,J,Me):n.prototype&&n.prototype.isPureReactComponent?!ws(i,d)||!ws(F,J):!0}function g1(e,n,i){var d=!1,F=va,J=n.contextType;return typeof J=="object"&&J!==null?J=ui(J):(F=Uo(n)?Fa:Mo.current,d=n.contextTypes,J=(d=d!=null)?Sl(e,F):va),n=new n(i,J),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Yc,e.stateNode=n,n._reactInternals=e,d&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=F,e.__reactInternalMemoizedMaskedChildContext=J),n}function v1(e,n,i,d){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,d),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,d),n.state!==e&&Yc.enqueueReplaceState(n,n.state,null)}function O0(e,n,i,d){var F=e.stateNode;F.props=i,F.state=e.memoizedState,F.refs={},p0(e);var J=n.contextType;typeof J=="object"&&J!==null?F.context=ui(J):(J=Uo(n)?Fa:Mo.current,F.context=Sl(e,J)),F.state=e.memoizedState,J=n.getDerivedStateFromProps,typeof J=="function"&&(j0(e,n,J,i),F.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof F.getSnapshotBeforeUpdate=="function"||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(n=F.state,typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount(),n!==F.state&&Yc.enqueueReplaceState(F,F.state,null),Bc(e,i,F,d),F.state=e.memoizedState),typeof F.componentDidMount=="function"&&(e.flags|=4194308)}function Tl(e,n){try{var i="",d=n;do i+=Ym(d),d=d.return;while(d);var F=i}catch(J){F=`
|
|
31
|
+
Error generating stack: `+J.message+`
|
|
32
|
+
`+J.stack}return{value:e,source:n,stack:F,digest:null}}function C0(e,n,i){return{value:e,source:null,stack:i??null,digest:n??null}}function I0(e,n){try{console.error(n.value)}catch(i){setTimeout(function(){throw i})}}var xv=typeof WeakMap=="function"?WeakMap:Map;function b1(e,n,i){i=qi(-1,i),i.tag=3,i.payload={element:null};var d=n.value;return i.callback=function(){eu||(eu=!0,U0=d),I0(e,n)},i}function y1(e,n,i){i=qi(-1,i),i.tag=3;var d=e.type.getDerivedStateFromError;if(typeof d=="function"){var F=n.value;i.payload=function(){return d(F)},i.callback=function(){I0(e,n)}}var J=e.stateNode;return J!==null&&typeof J.componentDidCatch=="function"&&(i.callback=function(){I0(e,n),typeof d!="function"&&(ka===null?ka=new Set([this]):ka.add(this));var Me=n.stack;this.componentDidCatch(n.value,{componentStack:Me!==null?Me:""})}),i}function x1(e,n,i){var d=e.pingCache;if(d===null){d=e.pingCache=new xv;var F=new Set;d.set(n,F)}else F=d.get(n),F===void 0&&(F=new Set,d.set(n,F));F.has(i)||(F.add(i),e=Av.bind(null,e,n,i),n.then(e,e))}function w1(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function k1(e,n,i,d,F){return e.mode&1?(e.flags|=65536,e.lanes=F,e):(e===n?e.flags|=65536:(e.flags|=128,i.flags|=131072,i.flags&=-52805,i.tag===1&&(i.alternate===null?i.tag=17:(n=qi(-1,1),n.tag=2,xa(i,n,1))),i.lanes|=1),e)}var wv=Ki.ReactCurrentOwner,Ko=!1;function zo(e,n,i,d){n.child=e===null?Hh(n,null,i,d):Cl(n,e.child,i,d)}function E1(e,n,i,d,F){i=i.render;var J=n.ref;return Pl(n,F),d=x0(e,n,i,d,J,F),i=w0(),e!==null&&!Ko?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~F,Qi(e,n,F)):(Xr&&i&&r0(n),n.flags|=1,zo(e,n,d,F),n.child)}function S1(e,n,i,d,F){if(e===null){var J=i.type;return typeof J=="function"&&!q0(J)&&J.defaultProps===void 0&&i.compare===null&&i.defaultProps===void 0?(n.tag=15,n.type=J,_1(e,n,J,d,F)):(e=au(i.type,null,d,n,n.mode,F),e.ref=n.ref,e.return=n,n.child=e)}if(J=e.child,!(e.lanes&F)){var Me=J.memoizedProps;if(i=i.compare,i=i!==null?i:ws,i(Me,d)&&e.ref===n.ref)return Qi(e,n,F)}return n.flags|=1,e=ja(J,d),e.ref=n.ref,e.return=n,n.child=e}function _1(e,n,i,d,F){if(e!==null){var J=e.memoizedProps;if(ws(J,d)&&e.ref===n.ref)if(Ko=!1,n.pendingProps=d=J,(e.lanes&F)!==0)e.flags&131072&&(Ko=!0);else return n.lanes=e.lanes,Qi(e,n,F)}return P0(e,n,i,d,F)}function j1(e,n,i){var d=n.pendingProps,F=d.children,J=e!==null?e.memoizedState:null;if(d.mode==="hidden")if(!(n.mode&1))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Br(Al,ti),ti|=i;else{if(!(i&1073741824))return e=J!==null?J.baseLanes|i:i,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Br(Al,ti),ti|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=J!==null?J.baseLanes:i,Br(Al,ti),ti|=d}else J!==null?(d=J.baseLanes|i,n.memoizedState=null):d=i,Br(Al,ti),ti|=d;return zo(e,n,F,i),n.child}function O1(e,n){var i=n.ref;(e===null&&i!==null||e!==null&&e.ref!==i)&&(n.flags|=512,n.flags|=2097152)}function P0(e,n,i,d,F){var J=Uo(i)?Fa:Mo.current;return J=Sl(n,J),Pl(n,F),i=x0(e,n,i,d,J,F),d=w0(),e!==null&&!Ko?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~F,Qi(e,n,F)):(Xr&&d&&r0(n),n.flags|=1,zo(e,n,i,F),n.child)}function C1(e,n,i,d,F){if(Uo(i)){var J=!0;Mc(n)}else J=!1;if(Pl(n,F),n.stateNode===null)Xc(e,n),g1(n,i,d),O0(n,i,d,F),d=!0;else if(e===null){var Me=n.stateNode,qe=n.memoizedProps;Me.props=qe;var tt=Me.context,ct=i.contextType;typeof ct=="object"&&ct!==null?ct=ui(ct):(ct=Uo(i)?Fa:Mo.current,ct=Sl(n,ct));var kt=i.getDerivedStateFromProps,At=typeof kt=="function"||typeof Me.getSnapshotBeforeUpdate=="function";At||typeof Me.UNSAFE_componentWillReceiveProps!="function"&&typeof Me.componentWillReceiveProps!="function"||(qe!==d||tt!==ct)&&v1(n,Me,d,ct),ya=!1;var fe=n.memoizedState;Me.state=fe,Bc(n,d,Me,F),tt=n.memoizedState,qe!==d||fe!==tt||Wo.current||ya?(typeof kt=="function"&&(j0(n,i,kt,d),tt=n.memoizedState),(qe=ya||m1(n,i,qe,d,fe,tt,ct))?(At||typeof Me.UNSAFE_componentWillMount!="function"&&typeof Me.componentWillMount!="function"||(typeof Me.componentWillMount=="function"&&Me.componentWillMount(),typeof Me.UNSAFE_componentWillMount=="function"&&Me.UNSAFE_componentWillMount()),typeof Me.componentDidMount=="function"&&(n.flags|=4194308)):(typeof Me.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=d,n.memoizedState=tt),Me.props=d,Me.state=tt,Me.context=ct,d=qe):(typeof Me.componentDidMount=="function"&&(n.flags|=4194308),d=!1)}else{Me=n.stateNode,Uh(e,n),qe=n.memoizedProps,ct=n.type===n.elementType?qe:wi(n.type,qe),Me.props=ct,At=n.pendingProps,fe=Me.context,tt=i.contextType,typeof tt=="object"&&tt!==null?tt=ui(tt):(tt=Uo(i)?Fa:Mo.current,tt=Sl(n,tt));var Q=i.getDerivedStateFromProps;(kt=typeof Q=="function"||typeof Me.getSnapshotBeforeUpdate=="function")||typeof Me.UNSAFE_componentWillReceiveProps!="function"&&typeof Me.componentWillReceiveProps!="function"||(qe!==At||fe!==tt)&&v1(n,Me,d,tt),ya=!1,fe=n.memoizedState,Me.state=fe,Bc(n,d,Me,F);var t=n.memoizedState;qe!==At||fe!==t||Wo.current||ya?(typeof Q=="function"&&(j0(n,i,Q,d),t=n.memoizedState),(ct=ya||m1(n,i,ct,d,fe,t,tt)||!1)?(kt||typeof Me.UNSAFE_componentWillUpdate!="function"&&typeof Me.componentWillUpdate!="function"||(typeof Me.componentWillUpdate=="function"&&Me.componentWillUpdate(d,t,tt),typeof Me.UNSAFE_componentWillUpdate=="function"&&Me.UNSAFE_componentWillUpdate(d,t,tt)),typeof Me.componentDidUpdate=="function"&&(n.flags|=4),typeof Me.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof Me.componentDidUpdate!="function"||qe===e.memoizedProps&&fe===e.memoizedState||(n.flags|=4),typeof Me.getSnapshotBeforeUpdate!="function"||qe===e.memoizedProps&&fe===e.memoizedState||(n.flags|=1024),n.memoizedProps=d,n.memoizedState=t),Me.props=d,Me.state=t,Me.context=tt,d=ct):(typeof Me.componentDidUpdate!="function"||qe===e.memoizedProps&&fe===e.memoizedState||(n.flags|=4),typeof Me.getSnapshotBeforeUpdate!="function"||qe===e.memoizedProps&&fe===e.memoizedState||(n.flags|=1024),d=!1)}return M0(e,n,i,d,J,F)}function M0(e,n,i,d,F,J){O1(e,n);var Me=(n.flags&128)!==0;if(!d&&!Me)return F&&Dh(n,i,!1),Qi(e,n,J);d=n.stateNode,wv.current=n;var qe=Me&&typeof i.getDerivedStateFromError!="function"?null:d.render();return n.flags|=1,e!==null&&Me?(n.child=Cl(n,e.child,null,J),n.child=Cl(n,null,qe,J)):zo(e,n,qe,J),n.memoizedState=d.state,F&&Dh(n,i,!0),n.child}function I1(e){var n=e.stateNode;n.pendingContext?Mh(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Mh(e,n.context,!1),h0(e,n.containerInfo)}function P1(e,n,i,d,F){return Ol(),l0(F),n.flags|=256,zo(e,n,i,d),n.child}var T0={dehydrated:null,treeContext:null,retryLane:0};function D0(e){return{baseLanes:e,cachePool:null,transitions:null}}function M1(e,n,i){var d=n.pendingProps,F=no.current,J=!1,Me=(n.flags&128)!==0,qe;if((qe=Me)||(qe=e!==null&&e.memoizedState===null?!1:(F&2)!==0),qe?(J=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(F|=1),Br(no,F&1),e===null)return a0(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(n.mode&1?e.data==="$!"?n.lanes=8:n.lanes=1073741824:n.lanes=1,null):(Me=d.children,e=d.fallback,J?(d=n.mode,J=n.child,Me={mode:"hidden",children:Me},!(d&1)&&J!==null?(J.childLanes=0,J.pendingProps=Me):J=lu(Me,d,0,null),e=qa(e,d,i,null),J.return=n,e.return=n,J.sibling=e,n.child=J,n.child.memoizedState=D0(i),n.memoizedState=T0,e):A0(n,Me));if(F=e.memoizedState,F!==null&&(qe=F.dehydrated,qe!==null))return kv(e,n,Me,d,qe,F,i);if(J){J=d.fallback,Me=n.mode,F=e.child,qe=F.sibling;var tt={mode:"hidden",children:d.children};return!(Me&1)&&n.child!==F?(d=n.child,d.childLanes=0,d.pendingProps=tt,n.deletions=null):(d=ja(F,tt),d.subtreeFlags=F.subtreeFlags&14680064),qe!==null?J=ja(qe,J):(J=qa(J,Me,i,null),J.flags|=2),J.return=n,d.return=n,d.sibling=J,n.child=d,d=J,J=n.child,Me=e.child.memoizedState,Me=Me===null?D0(i):{baseLanes:Me.baseLanes|i,cachePool:null,transitions:Me.transitions},J.memoizedState=Me,J.childLanes=e.childLanes&~i,n.memoizedState=T0,d}return J=e.child,e=J.sibling,d=ja(J,{mode:"visible",children:d.children}),!(n.mode&1)&&(d.lanes=i),d.return=n,d.sibling=null,e!==null&&(i=n.deletions,i===null?(n.deletions=[e],n.flags|=16):i.push(e)),n.child=d,n.memoizedState=null,d}function A0(e,n){return n=lu({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Gc(e,n,i,d){return d!==null&&l0(d),Cl(n,e.child,null,i),e=A0(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function kv(e,n,i,d,F,J,Me){if(i)return n.flags&256?(n.flags&=-257,d=C0(Error(xn(422))),Gc(e,n,Me,d)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(J=d.fallback,F=n.mode,d=lu({mode:"visible",children:d.children},F,0,null),J=qa(J,F,Me,null),J.flags|=2,d.return=n,J.return=n,d.sibling=J,n.child=d,n.mode&1&&Cl(n,e.child,null,Me),n.child.memoizedState=D0(Me),n.memoizedState=T0,J);if(!(n.mode&1))return Gc(e,n,Me,null);if(F.data==="$!"){if(d=F.nextSibling&&F.nextSibling.dataset,d)var qe=d.dgst;return d=qe,J=Error(xn(419)),d=C0(J,d,void 0),Gc(e,n,Me,d)}if(qe=(Me&e.childLanes)!==0,Ko||qe){if(d=xo,d!==null){switch(Me&-Me){case 4:F=2;break;case 16:F=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:F=32;break;case 536870912:F=268435456;break;default:F=0}F=F&(d.suspendedLanes|Me)?0:F,F!==0&&F!==J.retryLane&&(J.retryLane=F,$i(e,F),Si(d,e,F,-1))}return $0(),d=C0(Error(xn(421))),Gc(e,n,Me,d)}return F.data==="$?"?(n.flags|=128,n.child=e.child,n=Lv.bind(null,e),F._reactRetry=n,null):(e=J.treeContext,ei=ma(F.nextSibling),Jo=n,Xr=!0,xi=null,e!==null&&(si[ci++]=Gi,si[ci++]=Xi,si[ci++]=Ha,Gi=e.id,Xi=e.overflow,Ha=n),n=A0(n,d.children),n.flags|=4096,n)}function T1(e,n,i){e.lanes|=n;var d=e.alternate;d!==null&&(d.lanes|=n),d0(e.return,n,i)}function L0(e,n,i,d,F){var J=e.memoizedState;J===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:d,tail:i,tailMode:F}:(J.isBackwards=n,J.rendering=null,J.renderingStartTime=0,J.last=d,J.tail=i,J.tailMode=F)}function D1(e,n,i){var d=n.pendingProps,F=d.revealOrder,J=d.tail;if(zo(e,n,d.children,i),d=no.current,d&2)d=d&1|2,n.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&T1(e,i,n);else if(e.tag===19)T1(e,i,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}d&=1}if(Br(no,d),!(n.mode&1))n.memoizedState=null;else switch(F){case"forwards":for(i=n.child,F=null;i!==null;)e=i.alternate,e!==null&&Fc(e)===null&&(F=i),i=i.sibling;i=F,i===null?(F=n.child,n.child=null):(F=i.sibling,i.sibling=null),L0(n,!1,F,i,J);break;case"backwards":for(i=null,F=n.child,n.child=null;F!==null;){if(e=F.alternate,e!==null&&Fc(e)===null){n.child=F;break}e=F.sibling,F.sibling=i,i=F,F=e}L0(n,!0,i,null,J);break;case"together":L0(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Xc(e,n){!(n.mode&1)&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Qi(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),Ya|=n.lanes,!(i&n.childLanes))return null;if(e!==null&&n.child!==e.child)throw Error(xn(153));if(n.child!==null){for(e=n.child,i=ja(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=ja(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function Ev(e,n,i){switch(n.tag){case 3:I1(n),Ol();break;case 5:Yh(n);break;case 1:Uo(n.type)&&Mc(n);break;case 4:h0(n,n.stateNode.containerInfo);break;case 10:var d=n.type._context,F=n.memoizedProps.value;Br(Rc,d._currentValue),d._currentValue=F;break;case 13:if(d=n.memoizedState,d!==null)return d.dehydrated!==null?(Br(no,no.current&1),n.flags|=128,null):i&n.child.childLanes?M1(e,n,i):(Br(no,no.current&1),e=Qi(e,n,i),e!==null?e.sibling:null);Br(no,no.current&1);break;case 19:if(d=(i&n.childLanes)!==0,e.flags&128){if(d)return D1(e,n,i);n.flags|=128}if(F=n.memoizedState,F!==null&&(F.rendering=null,F.tail=null,F.lastEffect=null),Br(no,no.current),d)break;return null;case 22:case 23:return n.lanes=0,j1(e,n,i)}return Qi(e,n,i)}var A1,Z0,L1,Z1;A1=function(e,n){for(var i=n.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},Z0=function(){},L1=function(e,n,i,d){var F=e.memoizedProps;if(F!==d){e=n.stateNode,Ka(Ai.current);var J=null;switch(i){case"input":F=dd(e,F),d=dd(e,d),J=[];break;case"select":F=to({},F,{value:void 0}),d=to({},d,{value:void 0}),J=[];break;case"textarea":F=hd(e,F),d=hd(e,d),J=[];break;default:typeof F.onClick!="function"&&typeof d.onClick=="function"&&(e.onclick=Cc)}gd(i,d);var Me;i=null;for(ct in F)if(!d.hasOwnProperty(ct)&&F.hasOwnProperty(ct)&&F[ct]!=null)if(ct==="style"){var qe=F[ct];for(Me in qe)qe.hasOwnProperty(Me)&&(i||(i={}),i[Me]="")}else ct!=="dangerouslySetInnerHTML"&&ct!=="children"&&ct!=="suppressContentEditableWarning"&&ct!=="suppressHydrationWarning"&&ct!=="autoFocus"&&(es.hasOwnProperty(ct)?J||(J=[]):(J=J||[]).push(ct,null));for(ct in d){var tt=d[ct];if(qe=F!=null?F[ct]:void 0,d.hasOwnProperty(ct)&&tt!==qe&&(tt!=null||qe!=null))if(ct==="style")if(qe){for(Me in qe)!qe.hasOwnProperty(Me)||tt&&tt.hasOwnProperty(Me)||(i||(i={}),i[Me]="");for(Me in tt)tt.hasOwnProperty(Me)&&qe[Me]!==tt[Me]&&(i||(i={}),i[Me]=tt[Me])}else i||(J||(J=[]),J.push(ct,i)),i=tt;else ct==="dangerouslySetInnerHTML"?(tt=tt?tt.__html:void 0,qe=qe?qe.__html:void 0,tt!=null&&qe!==tt&&(J=J||[]).push(ct,tt)):ct==="children"?typeof tt!="string"&&typeof tt!="number"||(J=J||[]).push(ct,""+tt):ct!=="suppressContentEditableWarning"&&ct!=="suppressHydrationWarning"&&(es.hasOwnProperty(ct)?(tt!=null&&ct==="onScroll"&&Ur("scroll",e),J||qe===tt||(J=[])):(J=J||[]).push(ct,tt))}i&&(J=J||[]).push("style",i);var ct=J;(n.updateQueue=ct)&&(n.flags|=4)}},Z1=function(e,n,i,d){i!==d&&(n.flags|=4)};function Zs(e,n){if(!Xr)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var d=null;i!==null;)i.alternate!==null&&(d=i),i=i.sibling;d===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:d.sibling=null}}function Do(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,d=0;if(n)for(var F=e.child;F!==null;)i|=F.lanes|F.childLanes,d|=F.subtreeFlags&14680064,d|=F.flags&14680064,F.return=e,F=F.sibling;else for(F=e.child;F!==null;)i|=F.lanes|F.childLanes,d|=F.subtreeFlags,d|=F.flags,F.return=e,F=F.sibling;return e.subtreeFlags|=d,e.childLanes=i,n}function Sv(e,n,i){var d=n.pendingProps;switch(o0(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Do(n),null;case 1:return Uo(n.type)&&Pc(),Do(n),null;case 3:return d=n.stateNode,Ml(),Kr(Wo),Kr(Mo),v0(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(e===null||e.child===null)&&(Lc(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,xi!==null&&(Y0(xi),xi=null))),Z0(e,n),Do(n),null;case 5:m0(n);var F=Ka(Ms.current);if(i=n.type,e!==null&&n.stateNode!=null)L1(e,n,i,d,F),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!d){if(n.stateNode===null)throw Error(xn(166));return Do(n),null}if(e=Ka(Ai.current),Lc(n)){d=n.stateNode,i=n.type;var J=n.memoizedProps;switch(d[Di]=n,d[js]=J,e=(n.mode&1)!==0,i){case"dialog":Ur("cancel",d),Ur("close",d);break;case"iframe":case"object":case"embed":Ur("load",d);break;case"video":case"audio":for(F=0;F<Es.length;F++)Ur(Es[F],d);break;case"source":Ur("error",d);break;case"img":case"image":case"link":Ur("error",d),Ur("load",d);break;case"details":Ur("toggle",d);break;case"input":gp(d,J),Ur("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!J.multiple},Ur("invalid",d);break;case"textarea":yp(d,J),Ur("invalid",d)}gd(i,J),F=null;for(var Me in J)if(J.hasOwnProperty(Me)){var qe=J[Me];Me==="children"?typeof qe=="string"?d.textContent!==qe&&(J.suppressHydrationWarning!==!0&&Oc(d.textContent,qe,e),F=["children",qe]):typeof qe=="number"&&d.textContent!==""+qe&&(J.suppressHydrationWarning!==!0&&Oc(d.textContent,qe,e),F=["children",""+qe]):es.hasOwnProperty(Me)&&qe!=null&&Me==="onScroll"&&Ur("scroll",d)}switch(i){case"input":oc(d),bp(d,J,!0);break;case"textarea":oc(d),wp(d);break;case"select":case"option":break;default:typeof J.onClick=="function"&&(d.onclick=Cc)}d=F,n.updateQueue=d,d!==null&&(n.flags|=4)}else{Me=F.nodeType===9?F:F.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=kp(i)),e==="http://www.w3.org/1999/xhtml"?i==="script"?(e=Me.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof d.is=="string"?e=Me.createElement(i,{is:d.is}):(e=Me.createElement(i),i==="select"&&(Me=e,d.multiple?Me.multiple=!0:d.size&&(Me.size=d.size))):e=Me.createElementNS(e,i),e[Di]=n,e[js]=d,A1(e,n,!1,!1),n.stateNode=e;e:{switch(Me=vd(i,d),i){case"dialog":Ur("cancel",e),Ur("close",e),F=d;break;case"iframe":case"object":case"embed":Ur("load",e),F=d;break;case"video":case"audio":for(F=0;F<Es.length;F++)Ur(Es[F],e);F=d;break;case"source":Ur("error",e),F=d;break;case"img":case"image":case"link":Ur("error",e),Ur("load",e),F=d;break;case"details":Ur("toggle",e),F=d;break;case"input":gp(e,d),F=dd(e,d),Ur("invalid",e);break;case"option":F=d;break;case"select":e._wrapperState={wasMultiple:!!d.multiple},F=to({},d,{value:void 0}),Ur("invalid",e);break;case"textarea":yp(e,d),F=hd(e,d),Ur("invalid",e);break;default:F=d}gd(i,F),qe=F;for(J in qe)if(qe.hasOwnProperty(J)){var tt=qe[J];J==="style"?_p(e,tt):J==="dangerouslySetInnerHTML"?(tt=tt?tt.__html:void 0,tt!=null&&Ep(e,tt)):J==="children"?typeof tt=="string"?(i!=="textarea"||tt!=="")&&os(e,tt):typeof tt=="number"&&os(e,""+tt):J!=="suppressContentEditableWarning"&&J!=="suppressHydrationWarning"&&J!=="autoFocus"&&(es.hasOwnProperty(J)?tt!=null&&J==="onScroll"&&Ur("scroll",e):tt!=null&&ed(e,J,tt,Me))}switch(i){case"input":oc(e),bp(e,d,!1);break;case"textarea":oc(e),wp(e);break;case"option":d.value!=null&&e.setAttribute("value",""+sa(d.value));break;case"select":e.multiple=!!d.multiple,J=d.value,J!=null?fl(e,!!d.multiple,J,!1):d.defaultValue!=null&&fl(e,!!d.multiple,d.defaultValue,!0);break;default:typeof F.onClick=="function"&&(e.onclick=Cc)}switch(i){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return Do(n),null;case 6:if(e&&n.stateNode!=null)Z1(e,n,e.memoizedProps,d);else{if(typeof d!="string"&&n.stateNode===null)throw Error(xn(166));if(i=Ka(Ms.current),Ka(Ai.current),Lc(n)){if(d=n.stateNode,i=n.memoizedProps,d[Di]=n,(J=d.nodeValue!==i)&&(e=Jo,e!==null))switch(e.tag){case 3:Oc(d.nodeValue,i,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Oc(d.nodeValue,i,(e.mode&1)!==0)}J&&(n.flags|=4)}else d=(i.nodeType===9?i:i.ownerDocument).createTextNode(d),d[Di]=n,n.stateNode=d}return Do(n),null;case 13:if(Kr(no),d=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Xr&&ei!==null&&n.mode&1&&!(n.flags&128))Nh(),Ol(),n.flags|=98560,J=!1;else if(J=Lc(n),d!==null&&d.dehydrated!==null){if(e===null){if(!J)throw Error(xn(318));if(J=n.memoizedState,J=J!==null?J.dehydrated:null,!J)throw Error(xn(317));J[Di]=n}else Ol(),!(n.flags&128)&&(n.memoizedState=null),n.flags|=4;Do(n),J=!1}else xi!==null&&(Y0(xi),xi=null),J=!0;if(!J)return n.flags&65536?n:null}return n.flags&128?(n.lanes=i,n):(d=d!==null,d!==(e!==null&&e.memoizedState!==null)&&d&&(n.child.flags|=8192,n.mode&1&&(e===null||no.current&1?mo===0&&(mo=3):$0())),n.updateQueue!==null&&(n.flags|=4),Do(n),null);case 4:return Ml(),Z0(e,n),e===null&&Ss(n.stateNode.containerInfo),Do(n),null;case 10:return u0(n.type._context),Do(n),null;case 17:return Uo(n.type)&&Pc(),Do(n),null;case 19:if(Kr(no),J=n.memoizedState,J===null)return Do(n),null;if(d=(n.flags&128)!==0,Me=J.rendering,Me===null)if(d)Zs(J,!1);else{if(mo!==0||e!==null&&e.flags&128)for(e=n.child;e!==null;){if(Me=Fc(e),Me!==null){for(n.flags|=128,Zs(J,!1),d=Me.updateQueue,d!==null&&(n.updateQueue=d,n.flags|=4),n.subtreeFlags=0,d=i,i=n.child;i!==null;)J=i,e=d,J.flags&=14680066,Me=J.alternate,Me===null?(J.childLanes=0,J.lanes=e,J.child=null,J.subtreeFlags=0,J.memoizedProps=null,J.memoizedState=null,J.updateQueue=null,J.dependencies=null,J.stateNode=null):(J.childLanes=Me.childLanes,J.lanes=Me.lanes,J.child=Me.child,J.subtreeFlags=0,J.deletions=null,J.memoizedProps=Me.memoizedProps,J.memoizedState=Me.memoizedState,J.updateQueue=Me.updateQueue,J.type=Me.type,e=Me.dependencies,J.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),i=i.sibling;return Br(no,no.current&1|2),n.child}e=e.sibling}J.tail!==null&&so()>Ll&&(n.flags|=128,d=!0,Zs(J,!1),n.lanes=4194304)}else{if(!d)if(e=Fc(Me),e!==null){if(n.flags|=128,d=!0,i=e.updateQueue,i!==null&&(n.updateQueue=i,n.flags|=4),Zs(J,!0),J.tail===null&&J.tailMode==="hidden"&&!Me.alternate&&!Xr)return Do(n),null}else 2*so()-J.renderingStartTime>Ll&&i!==1073741824&&(n.flags|=128,d=!0,Zs(J,!1),n.lanes=4194304);J.isBackwards?(Me.sibling=n.child,n.child=Me):(i=J.last,i!==null?i.sibling=Me:n.child=Me,J.last=Me)}return J.tail!==null?(n=J.tail,J.rendering=n,J.tail=n.sibling,J.renderingStartTime=so(),n.sibling=null,i=no.current,Br(no,d?i&1|2:i&1),n):(Do(n),null);case 22:case 23:return X0(),d=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==d&&(n.flags|=8192),d&&n.mode&1?ti&1073741824&&(Do(n),n.subtreeFlags&6&&(n.flags|=8192)):Do(n),null;case 24:return null;case 25:return null}throw Error(xn(156,n.tag))}function _v(e,n){switch(o0(n),n.tag){case 1:return Uo(n.type)&&Pc(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Ml(),Kr(Wo),Kr(Mo),v0(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return m0(n),null;case 13:if(Kr(no),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(xn(340));Ol()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Kr(no),null;case 4:return Ml(),null;case 10:return u0(n.type._context),null;case 22:case 23:return X0(),null;case 24:return null;default:return null}}var $c=!1,Ao=!1,jv=typeof WeakSet=="function"?WeakSet:Set,Vn=null;function Dl(e,n){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(d){io(e,n,d)}else i.current=null}function R0(e,n,i){try{i()}catch(d){io(e,n,d)}}var R1=!1;function Ov(e,n){if(Xd=gc,e=mh(),Fd(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var d=i.getSelection&&i.getSelection();if(d&&d.rangeCount!==0){i=d.anchorNode;var F=d.anchorOffset,J=d.focusNode;d=d.focusOffset;try{i.nodeType,J.nodeType}catch{i=null;break e}var Me=0,qe=-1,tt=-1,ct=0,kt=0,At=e,fe=null;t:for(;;){for(var Q;At!==i||F!==0&&At.nodeType!==3||(qe=Me+F),At!==J||d!==0&&At.nodeType!==3||(tt=Me+d),At.nodeType===3&&(Me+=At.nodeValue.length),(Q=At.firstChild)!==null;)fe=At,At=Q;for(;;){if(At===e)break t;if(fe===i&&++ct===F&&(qe=Me),fe===J&&++kt===d&&(tt=Me),(Q=At.nextSibling)!==null)break;At=fe,fe=At.parentNode}At=Q}i=qe===-1||tt===-1?null:{start:qe,end:tt}}else i=null}i=i||{start:0,end:0}}else i=null;for($d={focusedElem:e,selectionRange:i},gc=!1,Vn=n;Vn!==null;)if(n=Vn,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Vn=e;else for(;Vn!==null;){n=Vn;try{var t=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(t!==null){var T=t.memoizedProps,j=t.memoizedState,f=n.stateNode,l=f.getSnapshotBeforeUpdate(n.elementType===n.type?T:wi(n.type,T),j);f.__reactInternalSnapshotBeforeUpdate=l}break;case 3:var v=n.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(xn(163))}}catch(k){io(n,n.return,k)}if(e=n.sibling,e!==null){e.return=n.return,Vn=e;break}Vn=n.return}return t=R1,R1=!1,t}function Rs(e,n,i){var d=n.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var F=d=d.next;do{if((F.tag&e)===e){var J=F.destroy;F.destroy=void 0,J!==void 0&&R0(n,i,J)}F=F.next}while(F!==d)}}function qc(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var d=i.create;i.destroy=d()}i=i.next}while(i!==n)}}function z0(e){var n=e.ref;if(n!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof n=="function"?n(e):n.current=e}}function z1(e){var n=e.alternate;n!==null&&(e.alternate=null,z1(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Di],delete n[js],delete n[e0],delete n[cv],delete n[uv])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function N1(e){return e.tag===5||e.tag===3||e.tag===4}function B1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||N1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function N0(e,n,i){var d=e.tag;if(d===5||d===6)e=e.stateNode,n?i.nodeType===8?i.parentNode.insertBefore(e,n):i.insertBefore(e,n):(i.nodeType===8?(n=i.parentNode,n.insertBefore(e,i)):(n=i,n.appendChild(e)),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=Cc));else if(d!==4&&(e=e.child,e!==null))for(N0(e,n,i),e=e.sibling;e!==null;)N0(e,n,i),e=e.sibling}function B0(e,n,i){var d=e.tag;if(d===5||d===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(d!==4&&(e=e.child,e!==null))for(B0(e,n,i),e=e.sibling;e!==null;)B0(e,n,i),e=e.sibling}var Co=null,ki=!1;function wa(e,n,i){for(i=i.child;i!==null;)F1(e,n,i),i=i.sibling}function F1(e,n,i){if(Ti&&typeof Ti.onCommitFiberUnmount=="function")try{Ti.onCommitFiberUnmount(uc,i)}catch{}switch(i.tag){case 5:Ao||Dl(i,n);case 6:var d=Co,F=ki;Co=null,wa(e,n,i),Co=d,ki=F,Co!==null&&(ki?(e=Co,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):Co.removeChild(i.stateNode));break;case 18:Co!==null&&(ki?(e=Co,i=i.stateNode,e.nodeType===8?Jd(e.parentNode,i):e.nodeType===1&&Jd(e,i),ms(e)):Jd(Co,i.stateNode));break;case 4:d=Co,F=ki,Co=i.stateNode.containerInfo,ki=!0,wa(e,n,i),Co=d,ki=F;break;case 0:case 11:case 14:case 15:if(!Ao&&(d=i.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){F=d=d.next;do{var J=F,Me=J.destroy;J=J.tag,Me!==void 0&&(J&2||J&4)&&R0(i,n,Me),F=F.next}while(F!==d)}wa(e,n,i);break;case 1:if(!Ao&&(Dl(i,n),d=i.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=i.memoizedProps,d.state=i.memoizedState,d.componentWillUnmount()}catch(qe){io(i,n,qe)}wa(e,n,i);break;case 21:wa(e,n,i);break;case 22:i.mode&1?(Ao=(d=Ao)||i.memoizedState!==null,wa(e,n,i),Ao=d):wa(e,n,i);break;default:wa(e,n,i)}}function H1(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new jv),n.forEach(function(d){var F=Zv.bind(null,e,d);i.has(d)||(i.add(d),d.then(F,F))})}}function Ei(e,n){var i=n.deletions;if(i!==null)for(var d=0;d<i.length;d++){var F=i[d];try{var J=e,Me=n,qe=Me;e:for(;qe!==null;){switch(qe.tag){case 5:Co=qe.stateNode,ki=!1;break e;case 3:Co=qe.stateNode.containerInfo,ki=!0;break e;case 4:Co=qe.stateNode.containerInfo,ki=!0;break e}qe=qe.return}if(Co===null)throw Error(xn(160));F1(J,Me,F),Co=null,ki=!1;var tt=F.alternate;tt!==null&&(tt.return=null),F.return=null}catch(ct){io(F,n,ct)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)W1(n,e),n=n.sibling}function W1(e,n){var i=e.alternate,d=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ei(n,e),Zi(e),d&4){try{Rs(3,e,e.return),qc(3,e)}catch(T){io(e,e.return,T)}try{Rs(5,e,e.return)}catch(T){io(e,e.return,T)}}break;case 1:Ei(n,e),Zi(e),d&512&&i!==null&&Dl(i,i.return);break;case 5:if(Ei(n,e),Zi(e),d&512&&i!==null&&Dl(i,i.return),e.flags&32){var F=e.stateNode;try{os(F,"")}catch(T){io(e,e.return,T)}}if(d&4&&(F=e.stateNode,F!=null)){var J=e.memoizedProps,Me=i!==null?i.memoizedProps:J,qe=e.type,tt=e.updateQueue;if(e.updateQueue=null,tt!==null)try{qe==="input"&&J.type==="radio"&&J.name!=null&&vp(F,J),vd(qe,Me);var ct=vd(qe,J);for(Me=0;Me<tt.length;Me+=2){var kt=tt[Me],At=tt[Me+1];kt==="style"?_p(F,At):kt==="dangerouslySetInnerHTML"?Ep(F,At):kt==="children"?os(F,At):ed(F,kt,At,ct)}switch(qe){case"input":fd(F,J);break;case"textarea":xp(F,J);break;case"select":var fe=F._wrapperState.wasMultiple;F._wrapperState.wasMultiple=!!J.multiple;var Q=J.value;Q!=null?fl(F,!!J.multiple,Q,!1):fe!==!!J.multiple&&(J.defaultValue!=null?fl(F,!!J.multiple,J.defaultValue,!0):fl(F,!!J.multiple,J.multiple?[]:"",!1))}F[js]=J}catch(T){io(e,e.return,T)}}break;case 6:if(Ei(n,e),Zi(e),d&4){if(e.stateNode===null)throw Error(xn(162));F=e.stateNode,J=e.memoizedProps;try{F.nodeValue=J}catch(T){io(e,e.return,T)}}break;case 3:if(Ei(n,e),Zi(e),d&4&&i!==null&&i.memoizedState.isDehydrated)try{ms(n.containerInfo)}catch(T){io(e,e.return,T)}break;case 4:Ei(n,e),Zi(e);break;case 13:Ei(n,e),Zi(e),F=e.child,F.flags&8192&&(J=F.memoizedState!==null,F.stateNode.isHidden=J,!J||F.alternate!==null&&F.alternate.memoizedState!==null||(W0=so())),d&4&&H1(e);break;case 22:if(kt=i!==null&&i.memoizedState!==null,e.mode&1?(Ao=(ct=Ao)||kt,Ei(n,e),Ao=ct):Ei(n,e),Zi(e),d&8192){if(ct=e.memoizedState!==null,(e.stateNode.isHidden=ct)&&!kt&&e.mode&1)for(Vn=e,kt=e.child;kt!==null;){for(At=Vn=kt;Vn!==null;){switch(fe=Vn,Q=fe.child,fe.tag){case 0:case 11:case 14:case 15:Rs(4,fe,fe.return);break;case 1:Dl(fe,fe.return);var t=fe.stateNode;if(typeof t.componentWillUnmount=="function"){d=fe,i=fe.return;try{n=d,t.props=n.memoizedProps,t.state=n.memoizedState,t.componentWillUnmount()}catch(T){io(d,i,T)}}break;case 5:Dl(fe,fe.return);break;case 22:if(fe.memoizedState!==null){V1(At);continue}}Q!==null?(Q.return=fe,Vn=Q):V1(At)}kt=kt.sibling}e:for(kt=null,At=e;;){if(At.tag===5){if(kt===null){kt=At;try{F=At.stateNode,ct?(J=F.style,typeof J.setProperty=="function"?J.setProperty("display","none","important"):J.display="none"):(qe=At.stateNode,tt=At.memoizedProps.style,Me=tt!=null&&tt.hasOwnProperty("display")?tt.display:null,qe.style.display=Sp("display",Me))}catch(T){io(e,e.return,T)}}}else if(At.tag===6){if(kt===null)try{At.stateNode.nodeValue=ct?"":At.memoizedProps}catch(T){io(e,e.return,T)}}else if((At.tag!==22&&At.tag!==23||At.memoizedState===null||At===e)&&At.child!==null){At.child.return=At,At=At.child;continue}if(At===e)break e;for(;At.sibling===null;){if(At.return===null||At.return===e)break e;kt===At&&(kt=null),At=At.return}kt===At&&(kt=null),At.sibling.return=At.return,At=At.sibling}}break;case 19:Ei(n,e),Zi(e),d&4&&H1(e);break;case 21:break;default:Ei(n,e),Zi(e)}}function Zi(e){var n=e.flags;if(n&2){try{e:{for(var i=e.return;i!==null;){if(N1(i)){var d=i;break e}i=i.return}throw Error(xn(160))}switch(d.tag){case 5:var F=d.stateNode;d.flags&32&&(os(F,""),d.flags&=-33);var J=B1(e);B0(e,J,F);break;case 3:case 4:var Me=d.stateNode.containerInfo,qe=B1(e);N0(e,qe,Me);break;default:throw Error(xn(161))}}catch(tt){io(e,e.return,tt)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Cv(e,n,i){Vn=e,U1(e)}function U1(e,n,i){for(var d=(e.mode&1)!==0;Vn!==null;){var F=Vn,J=F.child;if(F.tag===22&&d){var Me=F.memoizedState!==null||$c;if(!Me){var qe=F.alternate,tt=qe!==null&&qe.memoizedState!==null||Ao;qe=$c;var ct=Ao;if($c=Me,(Ao=tt)&&!ct)for(Vn=F;Vn!==null;)Me=Vn,tt=Me.child,Me.tag===22&&Me.memoizedState!==null?Y1(F):tt!==null?(tt.return=Me,Vn=tt):Y1(F);for(;J!==null;)Vn=J,U1(J),J=J.sibling;Vn=F,$c=qe,Ao=ct}K1(e)}else F.subtreeFlags&8772&&J!==null?(J.return=F,Vn=J):K1(e)}}function K1(e){for(;Vn!==null;){var n=Vn;if(n.flags&8772){var i=n.alternate;try{if(n.flags&8772)switch(n.tag){case 0:case 11:case 15:Ao||qc(5,n);break;case 1:var d=n.stateNode;if(n.flags&4&&!Ao)if(i===null)d.componentDidMount();else{var F=n.elementType===n.type?i.memoizedProps:wi(n.type,i.memoizedProps);d.componentDidUpdate(F,i.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var J=n.updateQueue;J!==null&&Vh(n,J,d);break;case 3:var Me=n.updateQueue;if(Me!==null){if(i=null,n.child!==null)switch(n.child.tag){case 5:i=n.child.stateNode;break;case 1:i=n.child.stateNode}Vh(n,Me,i)}break;case 5:var qe=n.stateNode;if(i===null&&n.flags&4){i=qe;var tt=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":tt.autoFocus&&i.focus();break;case"img":tt.src&&(i.src=tt.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var ct=n.alternate;if(ct!==null){var kt=ct.memoizedState;if(kt!==null){var At=kt.dehydrated;At!==null&&ms(At)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(xn(163))}Ao||n.flags&512&&z0(n)}catch(fe){io(n,n.return,fe)}}if(n===e){Vn=null;break}if(i=n.sibling,i!==null){i.return=n.return,Vn=i;break}Vn=n.return}}function V1(e){for(;Vn!==null;){var n=Vn;if(n===e){Vn=null;break}var i=n.sibling;if(i!==null){i.return=n.return,Vn=i;break}Vn=n.return}}function Y1(e){for(;Vn!==null;){var n=Vn;try{switch(n.tag){case 0:case 11:case 15:var i=n.return;try{qc(4,n)}catch(tt){io(n,i,tt)}break;case 1:var d=n.stateNode;if(typeof d.componentDidMount=="function"){var F=n.return;try{d.componentDidMount()}catch(tt){io(n,F,tt)}}var J=n.return;try{z0(n)}catch(tt){io(n,J,tt)}break;case 5:var Me=n.return;try{z0(n)}catch(tt){io(n,Me,tt)}}}catch(tt){io(n,n.return,tt)}if(n===e){Vn=null;break}var qe=n.sibling;if(qe!==null){qe.return=n.return,Vn=qe;break}Vn=n.return}}var Iv=Math.ceil,Qc=Ki.ReactCurrentDispatcher,F0=Ki.ReactCurrentOwner,fi=Ki.ReactCurrentBatchConfig,jr=0,xo=null,fo=null,Io=0,ti=0,Al=ga(0),mo=0,zs=null,Ya=0,Jc=0,H0=0,Ns=null,Vo=null,W0=0,Ll=1/0,Ji=null,eu=!1,U0=null,ka=null,tu=!1,Ea=null,nu=0,Bs=0,K0=null,ru=-1,ou=0;function No(){return jr&6?so():ru!==-1?ru:ru=so()}function Sa(e){return e.mode&1?jr&2&&Io!==0?Io&-Io:fv.transition!==null?(ou===0&&(ou=Bp()),ou):(e=Zr,e!==0||(e=window.event,e=e===void 0?16:Xp(e.type)),e):1}function Si(e,n,i,d){if(50<Bs)throw Bs=0,K0=null,Error(xn(185));us(e,i,d),(!(jr&2)||e!==xo)&&(e===xo&&(!(jr&2)&&(Jc|=i),mo===4&&_a(e,Io)),Yo(e,d),i===1&&jr===0&&!(n.mode&1)&&(Ll=so()+500,Tc&&ba()))}function Yo(e,n){var i=e.callbackNode;fg(e,n);var d=pc(e,e===xo?Io:0);if(d===0)i!==null&&Rp(i),e.callbackNode=null,e.callbackPriority=0;else if(n=d&-d,e.callbackPriority!==n){if(i!=null&&Rp(i),n===1)e.tag===0?dv(X1.bind(null,e)):Ah(X1.bind(null,e)),lv(function(){!(jr&6)&&ba()}),i=null;else{switch(Fp(d)){case 1:i=Sd;break;case 4:i=zp;break;case 16:i=cc;break;case 536870912:i=Np;break;default:i=cc}i=rm(i,G1.bind(null,e))}e.callbackPriority=n,e.callbackNode=i}}function G1(e,n){if(ru=-1,ou=0,jr&6)throw Error(xn(327));var i=e.callbackNode;if(Zl()&&e.callbackNode!==i)return null;var d=pc(e,e===xo?Io:0);if(d===0)return null;if(d&30||d&e.expiredLanes||n)n=iu(e,d);else{n=d;var F=jr;jr|=2;var J=q1();(xo!==e||Io!==n)&&(Ji=null,Ll=so()+500,Xa(e,n));do try{Tv();break}catch(qe){$1(e,qe)}while(!0);c0(),Qc.current=J,jr=F,fo!==null?n=0:(xo=null,Io=0,n=mo)}if(n!==0){if(n===2&&(F=_d(e),F!==0&&(d=F,n=V0(e,F))),n===1)throw i=zs,Xa(e,0),_a(e,d),Yo(e,so()),i;if(n===6)_a(e,d);else{if(F=e.current.alternate,!(d&30)&&!Pv(F)&&(n=iu(e,d),n===2&&(J=_d(e),J!==0&&(d=J,n=V0(e,J))),n===1))throw i=zs,Xa(e,0),_a(e,d),Yo(e,so()),i;switch(e.finishedWork=F,e.finishedLanes=d,n){case 0:case 1:throw Error(xn(345));case 2:$a(e,Vo,Ji);break;case 3:if(_a(e,d),(d&130023424)===d&&(n=W0+500-so(),10<n)){if(pc(e,0)!==0)break;if(F=e.suspendedLanes,(F&d)!==d){No(),e.pingedLanes|=e.suspendedLanes&F;break}e.timeoutHandle=Qd($a.bind(null,e,Vo,Ji),n);break}$a(e,Vo,Ji);break;case 4:if(_a(e,d),(d&4194240)===d)break;for(n=e.eventTimes,F=-1;0<d;){var Me=31-bi(d);J=1<<Me,Me=n[Me],Me>F&&(F=Me),d&=~J}if(d=F,d=so()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*Iv(d/1960))-d,10<d){e.timeoutHandle=Qd($a.bind(null,e,Vo,Ji),d);break}$a(e,Vo,Ji);break;case 5:$a(e,Vo,Ji);break;default:throw Error(xn(329))}}}return Yo(e,so()),e.callbackNode===i?G1.bind(null,e):null}function V0(e,n){var i=Ns;return e.current.memoizedState.isDehydrated&&(Xa(e,n).flags|=256),e=iu(e,n),e!==2&&(n=Vo,Vo=i,n!==null&&Y0(n)),e}function Y0(e){Vo===null?Vo=e:Vo.push.apply(Vo,e)}function Pv(e){for(var n=e;;){if(n.flags&16384){var i=n.updateQueue;if(i!==null&&(i=i.stores,i!==null))for(var d=0;d<i.length;d++){var F=i[d],J=F.getSnapshot;F=F.value;try{if(!yi(J(),F))return!1}catch{return!1}}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function _a(e,n){for(n&=~H0,n&=~Jc,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var i=31-bi(n),d=1<<i;e[i]=-1,n&=~d}}function X1(e){if(jr&6)throw Error(xn(327));Zl();var n=pc(e,0);if(!(n&1))return Yo(e,so()),null;var i=iu(e,n);if(e.tag!==0&&i===2){var d=_d(e);d!==0&&(n=d,i=V0(e,d))}if(i===1)throw i=zs,Xa(e,0),_a(e,n),Yo(e,so()),i;if(i===6)throw Error(xn(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,$a(e,Vo,Ji),Yo(e,so()),null}function G0(e,n){var i=jr;jr|=1;try{return e(n)}finally{jr=i,jr===0&&(Ll=so()+500,Tc&&ba())}}function Ga(e){Ea!==null&&Ea.tag===0&&!(jr&6)&&Zl();var n=jr;jr|=1;var i=fi.transition,d=Zr;try{if(fi.transition=null,Zr=1,e)return e()}finally{Zr=d,fi.transition=i,jr=n,!(jr&6)&&ba()}}function X0(){ti=Al.current,Kr(Al)}function Xa(e,n){e.finishedWork=null,e.finishedLanes=0;var i=e.timeoutHandle;if(i!==-1&&(e.timeoutHandle=-1,av(i)),fo!==null)for(i=fo.return;i!==null;){var d=i;switch(o0(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&Pc();break;case 3:Ml(),Kr(Wo),Kr(Mo),v0();break;case 5:m0(d);break;case 4:Ml();break;case 13:Kr(no);break;case 19:Kr(no);break;case 10:u0(d.type._context);break;case 22:case 23:X0()}i=i.return}if(xo=e,fo=e=ja(e.current,null),Io=ti=n,mo=0,zs=null,H0=Jc=Ya=0,Vo=Ns=null,Ua!==null){for(n=0;n<Ua.length;n++)if(i=Ua[n],d=i.interleaved,d!==null){i.interleaved=null;var F=d.next,J=i.pending;if(J!==null){var Me=J.next;J.next=F,d.next=Me}i.pending=d}Ua=null}return e}function $1(e,n){do{var i=fo;try{if(c0(),Hc.current=Vc,Wc){for(var d=ro.memoizedState;d!==null;){var F=d.queue;F!==null&&(F.pending=null),d=d.next}Wc=!1}if(Va=0,yo=ho=ro=null,Ts=!1,Ds=0,F0.current=null,i===null||i.return===null){mo=1,zs=n,fo=null;break}e:{var J=e,Me=i.return,qe=i,tt=n;if(n=Io,qe.flags|=32768,tt!==null&&typeof tt=="object"&&typeof tt.then=="function"){var ct=tt,kt=qe,At=kt.tag;if(!(kt.mode&1)&&(At===0||At===11||At===15)){var fe=kt.alternate;fe?(kt.updateQueue=fe.updateQueue,kt.memoizedState=fe.memoizedState,kt.lanes=fe.lanes):(kt.updateQueue=null,kt.memoizedState=null)}var Q=w1(Me);if(Q!==null){Q.flags&=-257,k1(Q,Me,qe,J,n),Q.mode&1&&x1(J,ct,n),n=Q,tt=ct;var t=n.updateQueue;if(t===null){var T=new Set;T.add(tt),n.updateQueue=T}else t.add(tt);break e}else{if(!(n&1)){x1(J,ct,n),$0();break e}tt=Error(xn(426))}}else if(Xr&&qe.mode&1){var j=w1(Me);if(j!==null){!(j.flags&65536)&&(j.flags|=256),k1(j,Me,qe,J,n),l0(Tl(tt,qe));break e}}J=tt=Tl(tt,qe),mo!==4&&(mo=2),Ns===null?Ns=[J]:Ns.push(J),J=Me;do{switch(J.tag){case 3:J.flags|=65536,n&=-n,J.lanes|=n;var f=b1(J,tt,n);Kh(J,f);break e;case 1:qe=tt;var l=J.type,v=J.stateNode;if(!(J.flags&128)&&(typeof l.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(ka===null||!ka.has(v)))){J.flags|=65536,n&=-n,J.lanes|=n;var k=y1(J,qe,n);Kh(J,k);break e}}J=J.return}while(J!==null)}J1(i)}catch(g){n=g,fo===i&&i!==null&&(fo=i=i.return);continue}break}while(!0)}function q1(){var e=Qc.current;return Qc.current=Vc,e===null?Vc:e}function $0(){(mo===0||mo===3||mo===2)&&(mo=4),xo===null||!(Ya&268435455)&&!(Jc&268435455)||_a(xo,Io)}function iu(e,n){var i=jr;jr|=2;var d=q1();(xo!==e||Io!==n)&&(Ji=null,Xa(e,n));do try{Mv();break}catch(F){$1(e,F)}while(!0);if(c0(),jr=i,Qc.current=d,fo!==null)throw Error(xn(261));return xo=null,Io=0,mo}function Mv(){for(;fo!==null;)Q1(fo)}function Tv(){for(;fo!==null&&!rg();)Q1(fo)}function Q1(e){var n=nm(e.alternate,e,ti);e.memoizedProps=e.pendingProps,n===null?J1(e):fo=n,F0.current=null}function J1(e){var n=e;do{var i=n.alternate;if(e=n.return,n.flags&32768){if(i=_v(i,n),i!==null){i.flags&=32767,fo=i;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{mo=6,fo=null;return}}else if(i=Sv(i,n,ti),i!==null){fo=i;return}if(n=n.sibling,n!==null){fo=n;return}fo=n=e}while(n!==null);mo===0&&(mo=5)}function $a(e,n,i){var d=Zr,F=fi.transition;try{fi.transition=null,Zr=1,Dv(e,n,i,d)}finally{fi.transition=F,Zr=d}return null}function Dv(e,n,i,d){do Zl();while(Ea!==null);if(jr&6)throw Error(xn(327));i=e.finishedWork;var F=e.finishedLanes;if(i===null)return null;if(e.finishedWork=null,e.finishedLanes=0,i===e.current)throw Error(xn(177));e.callbackNode=null,e.callbackPriority=0;var J=i.lanes|i.childLanes;if(pg(e,J),e===xo&&(fo=xo=null,Io=0),!(i.subtreeFlags&2064)&&!(i.flags&2064)||tu||(tu=!0,rm(cc,function(){return Zl(),null})),J=(i.flags&15990)!==0,i.subtreeFlags&15990||J){J=fi.transition,fi.transition=null;var Me=Zr;Zr=1;var qe=jr;jr|=4,F0.current=null,Ov(e,i),W1(i,e),Jg($d),gc=!!Xd,$d=Xd=null,e.current=i,Cv(i),og(),jr=qe,Zr=Me,fi.transition=J}else e.current=i;if(tu&&(tu=!1,Ea=e,nu=F),J=e.pendingLanes,J===0&&(ka=null),lg(i.stateNode),Yo(e,so()),n!==null)for(d=e.onRecoverableError,i=0;i<n.length;i++)F=n[i],d(F.value,{componentStack:F.stack,digest:F.digest});if(eu)throw eu=!1,e=U0,U0=null,e;return nu&1&&e.tag!==0&&Zl(),J=e.pendingLanes,J&1?e===K0?Bs++:(Bs=0,K0=e):Bs=0,ba(),null}function Zl(){if(Ea!==null){var e=Fp(nu),n=fi.transition,i=Zr;try{if(fi.transition=null,Zr=16>e?16:e,Ea===null)var d=!1;else{if(e=Ea,Ea=null,nu=0,jr&6)throw Error(xn(331));var F=jr;for(jr|=4,Vn=e.current;Vn!==null;){var J=Vn,Me=J.child;if(Vn.flags&16){var qe=J.deletions;if(qe!==null){for(var tt=0;tt<qe.length;tt++){var ct=qe[tt];for(Vn=ct;Vn!==null;){var kt=Vn;switch(kt.tag){case 0:case 11:case 15:Rs(8,kt,J)}var At=kt.child;if(At!==null)At.return=kt,Vn=At;else for(;Vn!==null;){kt=Vn;var fe=kt.sibling,Q=kt.return;if(z1(kt),kt===ct){Vn=null;break}if(fe!==null){fe.return=Q,Vn=fe;break}Vn=Q}}}var t=J.alternate;if(t!==null){var T=t.child;if(T!==null){t.child=null;do{var j=T.sibling;T.sibling=null,T=j}while(T!==null)}}Vn=J}}if(J.subtreeFlags&2064&&Me!==null)Me.return=J,Vn=Me;else e:for(;Vn!==null;){if(J=Vn,J.flags&2048)switch(J.tag){case 0:case 11:case 15:Rs(9,J,J.return)}var f=J.sibling;if(f!==null){f.return=J.return,Vn=f;break e}Vn=J.return}}var l=e.current;for(Vn=l;Vn!==null;){Me=Vn;var v=Me.child;if(Me.subtreeFlags&2064&&v!==null)v.return=Me,Vn=v;else e:for(Me=l;Vn!==null;){if(qe=Vn,qe.flags&2048)try{switch(qe.tag){case 0:case 11:case 15:qc(9,qe)}}catch(g){io(qe,qe.return,g)}if(qe===Me){Vn=null;break e}var k=qe.sibling;if(k!==null){k.return=qe.return,Vn=k;break e}Vn=qe.return}}if(jr=F,ba(),Ti&&typeof Ti.onPostCommitFiberRoot=="function")try{Ti.onPostCommitFiberRoot(uc,e)}catch{}d=!0}return d}finally{Zr=i,fi.transition=n}}return!1}function em(e,n,i){n=Tl(i,n),n=b1(e,n,1),e=xa(e,n,1),n=No(),e!==null&&(us(e,1,n),Yo(e,n))}function io(e,n,i){if(e.tag===3)em(e,e,i);else for(;n!==null;){if(n.tag===3){em(n,e,i);break}else if(n.tag===1){var d=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ka===null||!ka.has(d))){e=Tl(i,e),e=y1(n,e,1),n=xa(n,e,1),e=No(),n!==null&&(us(n,1,e),Yo(n,e));break}}n=n.return}}function Av(e,n,i){var d=e.pingCache;d!==null&&d.delete(n),n=No(),e.pingedLanes|=e.suspendedLanes&i,xo===e&&(Io&i)===i&&(mo===4||mo===3&&(Io&130023424)===Io&&500>so()-W0?Xa(e,0):H0|=i),Yo(e,n)}function tm(e,n){n===0&&(e.mode&1?(n=fc,fc<<=1,!(fc&130023424)&&(fc=4194304)):n=1);var i=No();e=$i(e,n),e!==null&&(us(e,n,i),Yo(e,i))}function Lv(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),tm(e,i)}function Zv(e,n){var i=0;switch(e.tag){case 13:var d=e.stateNode,F=e.memoizedState;F!==null&&(i=F.retryLane);break;case 19:d=e.stateNode;break;default:throw Error(xn(314))}d!==null&&d.delete(n),tm(e,i)}var nm;nm=function(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps||Wo.current)Ko=!0;else{if(!(e.lanes&i)&&!(n.flags&128))return Ko=!1,Ev(e,n,i);Ko=!!(e.flags&131072)}else Ko=!1,Xr&&n.flags&1048576&&Lh(n,Ac,n.index);switch(n.lanes=0,n.tag){case 2:var d=n.type;Xc(e,n),e=n.pendingProps;var F=Sl(n,Mo.current);Pl(n,i),F=x0(null,n,d,e,F,i);var J=w0();return n.flags|=1,typeof F=="object"&&F!==null&&typeof F.render=="function"&&F.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,Uo(d)?(J=!0,Mc(n)):J=!1,n.memoizedState=F.state!==null&&F.state!==void 0?F.state:null,p0(n),F.updater=Yc,n.stateNode=F,F._reactInternals=n,O0(n,d,e,i),n=M0(null,n,d,!0,J,i)):(n.tag=0,Xr&&J&&r0(n),zo(null,n,F,i),n=n.child),n;case 16:d=n.elementType;e:{switch(Xc(e,n),e=n.pendingProps,F=d._init,d=F(d._payload),n.type=d,F=n.tag=zv(d),e=wi(d,e),F){case 0:n=P0(null,n,d,e,i);break e;case 1:n=C1(null,n,d,e,i);break e;case 11:n=E1(null,n,d,e,i);break e;case 14:n=S1(null,n,d,wi(d.type,e),i);break e}throw Error(xn(306,d,""))}return n;case 0:return d=n.type,F=n.pendingProps,F=n.elementType===d?F:wi(d,F),P0(e,n,d,F,i);case 1:return d=n.type,F=n.pendingProps,F=n.elementType===d?F:wi(d,F),C1(e,n,d,F,i);case 3:e:{if(I1(n),e===null)throw Error(xn(387));d=n.pendingProps,J=n.memoizedState,F=J.element,Uh(e,n),Bc(n,d,null,i);var Me=n.memoizedState;if(d=Me.element,J.isDehydrated)if(J={element:d,isDehydrated:!1,cache:Me.cache,pendingSuspenseBoundaries:Me.pendingSuspenseBoundaries,transitions:Me.transitions},n.updateQueue.baseState=J,n.memoizedState=J,n.flags&256){F=Tl(Error(xn(423)),n),n=P1(e,n,d,i,F);break e}else if(d!==F){F=Tl(Error(xn(424)),n),n=P1(e,n,d,i,F);break e}else for(ei=ma(n.stateNode.containerInfo.firstChild),Jo=n,Xr=!0,xi=null,i=Hh(n,null,d,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Ol(),d===F){n=Qi(e,n,i);break e}zo(e,n,d,i)}n=n.child}return n;case 5:return Yh(n),e===null&&a0(n),d=n.type,F=n.pendingProps,J=e!==null?e.memoizedProps:null,Me=F.children,qd(d,F)?Me=null:J!==null&&qd(d,J)&&(n.flags|=32),O1(e,n),zo(e,n,Me,i),n.child;case 6:return e===null&&a0(n),null;case 13:return M1(e,n,i);case 4:return h0(n,n.stateNode.containerInfo),d=n.pendingProps,e===null?n.child=Cl(n,null,d,i):zo(e,n,d,i),n.child;case 11:return d=n.type,F=n.pendingProps,F=n.elementType===d?F:wi(d,F),E1(e,n,d,F,i);case 7:return zo(e,n,n.pendingProps,i),n.child;case 8:return zo(e,n,n.pendingProps.children,i),n.child;case 12:return zo(e,n,n.pendingProps.children,i),n.child;case 10:e:{if(d=n.type._context,F=n.pendingProps,J=n.memoizedProps,Me=F.value,Br(Rc,d._currentValue),d._currentValue=Me,J!==null)if(yi(J.value,Me)){if(J.children===F.children&&!Wo.current){n=Qi(e,n,i);break e}}else for(J=n.child,J!==null&&(J.return=n);J!==null;){var qe=J.dependencies;if(qe!==null){Me=J.child;for(var tt=qe.firstContext;tt!==null;){if(tt.context===d){if(J.tag===1){tt=qi(-1,i&-i),tt.tag=2;var ct=J.updateQueue;if(ct!==null){ct=ct.shared;var kt=ct.pending;kt===null?tt.next=tt:(tt.next=kt.next,kt.next=tt),ct.pending=tt}}J.lanes|=i,tt=J.alternate,tt!==null&&(tt.lanes|=i),d0(J.return,i,n),qe.lanes|=i;break}tt=tt.next}}else if(J.tag===10)Me=J.type===n.type?null:J.child;else if(J.tag===18){if(Me=J.return,Me===null)throw Error(xn(341));Me.lanes|=i,qe=Me.alternate,qe!==null&&(qe.lanes|=i),d0(Me,i,n),Me=J.sibling}else Me=J.child;if(Me!==null)Me.return=J;else for(Me=J;Me!==null;){if(Me===n){Me=null;break}if(J=Me.sibling,J!==null){J.return=Me.return,Me=J;break}Me=Me.return}J=Me}zo(e,n,F.children,i),n=n.child}return n;case 9:return F=n.type,d=n.pendingProps.children,Pl(n,i),F=ui(F),d=d(F),n.flags|=1,zo(e,n,d,i),n.child;case 14:return d=n.type,F=wi(d,n.pendingProps),F=wi(d.type,F),S1(e,n,d,F,i);case 15:return _1(e,n,n.type,n.pendingProps,i);case 17:return d=n.type,F=n.pendingProps,F=n.elementType===d?F:wi(d,F),Xc(e,n),n.tag=1,Uo(d)?(e=!0,Mc(n)):e=!1,Pl(n,i),g1(n,d,F),O0(n,d,F,i),M0(null,n,d,!0,e,i);case 19:return D1(e,n,i);case 22:return j1(e,n,i)}throw Error(xn(156,n.tag))};function rm(e,n){return Zp(e,n)}function Rv(e,n,i,d){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pi(e,n,i,d){return new Rv(e,n,i,d)}function q0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zv(e){if(typeof e=="function")return q0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===rd)return 11;if(e===ad)return 14}return 2}function ja(e,n){var i=e.alternate;return i===null?(i=pi(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function au(e,n,i,d,F,J){var Me=2;if(d=e,typeof e=="function")q0(e)&&(Me=1);else if(typeof e=="string")Me=5;else e:switch(e){case dl:return qa(i.children,F,J,n);case td:Me=8,F|=8;break;case nd:return e=pi(12,i,n,F|2),e.elementType=nd,e.lanes=J,e;case od:return e=pi(13,i,n,F),e.elementType=od,e.lanes=J,e;case id:return e=pi(19,i,n,F),e.elementType=id,e.lanes=J,e;case fp:return lu(i,F,J,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case up:Me=10;break e;case dp:Me=9;break e;case rd:Me=11;break e;case ad:Me=14;break e;case la:Me=16,d=null;break e}throw Error(xn(130,e==null?e:typeof e,""))}return n=pi(Me,i,n,F),n.elementType=e,n.type=d,n.lanes=J,n}function qa(e,n,i,d){return e=pi(7,e,d,n),e.lanes=i,e}function lu(e,n,i,d){return e=pi(22,e,d,n),e.elementType=fp,e.lanes=i,e.stateNode={isHidden:!1},e}function Q0(e,n,i){return e=pi(6,e,null,n),e.lanes=i,e}function J0(e,n,i){return n=pi(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Nv(e,n,i,d,F){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jd(0),this.expirationTimes=jd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jd(0),this.identifierPrefix=d,this.onRecoverableError=F,this.mutableSourceEagerHydrationData=null}function ef(e,n,i,d,F,J,Me,qe,tt){return e=new Nv(e,n,i,qe,tt),n===1?(n=1,J===!0&&(n|=8)):n=0,J=pi(3,null,null,n),e.current=J,J.stateNode=e,J.memoizedState={element:d,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},p0(J),e}function Bv(e,n,i){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ul,key:d==null?null:""+d,children:e,containerInfo:n,implementation:i}}function om(e){if(!e)return va;e=e._reactInternals;e:{if(Na(e)!==e||e.tag!==1)throw Error(xn(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(Uo(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(xn(171))}if(e.tag===1){var i=e.type;if(Uo(i))return Th(e,i,n)}return n}function im(e,n,i,d,F,J,Me,qe,tt){return e=ef(i,d,!0,e,F,J,Me,qe,tt),e.context=om(null),i=e.current,d=No(),F=Sa(i),J=qi(d,F),J.callback=n??null,xa(i,J,F),e.current.lanes=F,us(e,F,d),Yo(e,d),e}function su(e,n,i,d){var F=n.current,J=No(),Me=Sa(F);return i=om(i),n.context===null?n.context=i:n.pendingContext=i,n=qi(J,Me),n.payload={element:e},d=d===void 0?null:d,d!==null&&(n.callback=d),e=xa(F,n,Me),e!==null&&(Si(e,F,Me,J),Nc(e,F,Me)),Me}function cu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function am(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function tf(e,n){am(e,n),(e=e.alternate)&&am(e,n)}function Fv(){return null}var lm=typeof reportError=="function"?reportError:function(e){console.error(e)};function nf(e){this._internalRoot=e}uu.prototype.render=nf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(xn(409));su(e,n,null,null)},uu.prototype.unmount=nf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Ga(function(){su(null,e,null,null)}),n[Vi]=null}};function uu(e){this._internalRoot=e}uu.prototype.unstable_scheduleHydration=function(e){if(e){var n=Up();e={blockedOn:null,target:e,priority:n};for(var i=0;i<fa.length&&n!==0&&n<fa[i].priority;i++);fa.splice(i,0,e),i===0&&Yp(e)}};function rf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function du(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function sm(){}function Hv(e,n,i,d,F){if(F){if(typeof d=="function"){var J=d;d=function(){var ct=cu(Me);J.call(ct)}}var Me=im(n,d,e,0,null,!1,!1,"",sm);return e._reactRootContainer=Me,e[Vi]=Me.current,Ss(e.nodeType===8?e.parentNode:e),Ga(),Me}for(;F=e.lastChild;)e.removeChild(F);if(typeof d=="function"){var qe=d;d=function(){var ct=cu(tt);qe.call(ct)}}var tt=ef(e,0,!1,null,null,!1,!1,"",sm);return e._reactRootContainer=tt,e[Vi]=tt.current,Ss(e.nodeType===8?e.parentNode:e),Ga(function(){su(n,tt,i,d)}),tt}function fu(e,n,i,d,F){var J=i._reactRootContainer;if(J){var Me=J;if(typeof F=="function"){var qe=F;F=function(){var tt=cu(Me);qe.call(tt)}}su(n,Me,e,F)}else Me=Hv(i,n,e,F,d);return cu(Me)}Hp=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var i=cs(n.pendingLanes);i!==0&&(Od(n,i|1),Yo(n,so()),!(jr&6)&&(Ll=so()+500,ba()))}break;case 13:Ga(function(){var d=$i(e,1);if(d!==null){var F=No();Si(d,e,1,F)}}),tf(e,1)}},Cd=function(e){if(e.tag===13){var n=$i(e,134217728);if(n!==null){var i=No();Si(n,e,134217728,i)}tf(e,134217728)}},Wp=function(e){if(e.tag===13){var n=Sa(e),i=$i(e,n);if(i!==null){var d=No();Si(i,e,n,d)}tf(e,n)}},Up=function(){return Zr},Kp=function(e,n){var i=Zr;try{return Zr=e,n()}finally{Zr=i}},xd=function(e,n,i){switch(n){case"input":if(fd(e,i),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<i.length;n++){var d=i[n];if(d!==e&&d.form===e.form){var F=Ic(d);if(!F)throw Error(xn(90));mp(d),fd(d,F)}}}break;case"textarea":xp(e,i);break;case"select":n=i.value,n!=null&&fl(e,!!i.multiple,n,!1)}},Ip=G0,Pp=Ga;var Wv={usingClientEntryPoint:!1,Events:[Os,kl,Ic,Op,Cp,G0]},Fs={findFiberByHostInstance:Ba,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Uv={bundleType:Fs.bundleType,version:Fs.version,rendererPackageName:Fs.rendererPackageName,rendererConfig:Fs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ki.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ap(e),e===null?null:e.stateNode},findFiberByHostInstance:Fs.findFiberByHostInstance||Fv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pu.isDisabled&&pu.supportsFiber)try{uc=pu.inject(Uv),Ti=pu}catch{}}$o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Wv,$o.createPortal=function(e,n){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rf(n))throw Error(xn(200));return Bv(e,n,null,i)},$o.createRoot=function(e,n){if(!rf(e))throw Error(xn(299));var i=!1,d="",F=lm;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(d=n.identifierPrefix),n.onRecoverableError!==void 0&&(F=n.onRecoverableError)),n=ef(e,1,!1,null,null,i,!1,d,F),e[Vi]=n.current,Ss(e.nodeType===8?e.parentNode:e),new nf(n)},$o.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(xn(188)):(e=Object.keys(e).join(","),Error(xn(268,e)));return e=Ap(n),e=e===null?null:e.stateNode,e},$o.flushSync=function(e){return Ga(e)},$o.hydrate=function(e,n,i){if(!du(n))throw Error(xn(200));return fu(null,e,n,!0,i)},$o.hydrateRoot=function(e,n,i){if(!rf(e))throw Error(xn(405));var d=i!=null&&i.hydratedSources||null,F=!1,J="",Me=lm;if(i!=null&&(i.unstable_strictMode===!0&&(F=!0),i.identifierPrefix!==void 0&&(J=i.identifierPrefix),i.onRecoverableError!==void 0&&(Me=i.onRecoverableError)),n=im(n,null,e,1,i??null,F,!1,J,Me),e[Vi]=n.current,Ss(e),d)for(e=0;e<d.length;e++)i=d[e],F=i._getVersion,F=F(i._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[i,F]:n.mutableSourceEagerHydrationData.push(i,F);return new uu(n)},$o.render=function(e,n,i){if(!du(n))throw Error(xn(200));return fu(null,e,n,!1,i)},$o.unmountComponentAtNode=function(e){if(!du(e))throw Error(xn(40));return e._reactRootContainer?(Ga(function(){fu(null,null,e,!1,function(){e._reactRootContainer=null,e[Vi]=null})}),!0):!1},$o.unstable_batchedUpdates=G0,$o.unstable_renderSubtreeIntoContainer=function(e,n,i,d){if(!du(i))throw Error(xn(200));if(e==null||e._reactInternals===void 0)throw Error(xn(38));return fu(e,n,i,!1,d)},$o.version="18.3.1-next-f1338f8080-20240426";function cm(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cm)}catch(e){console.error(e)}}cm(),op.exports=$o;var um=op.exports,dm,fm=um;dm=fm.createRoot,fm.hydrateRoot;var Kv=Object.defineProperty,Vv=(e,n,i)=>n in e?Kv(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i,hu=(e,n,i)=>(Vv(e,typeof n!="symbol"?n+"":n,i),i);const Yv={stringify:e=>e,parse:e=>e},Gv={stringify:e=>`${e}`,parse:e=>parseFloat(e)},Xv={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},$v={stringify:e=>e.name,parse:(e,n,i)=>{const d=(()=>{if(typeof window<"u"&&e in window)return window[e];if(typeof global<"u"&&e in global)return global[e]})();return typeof d=="function"?d.bind(i):void 0}},qv={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)},of={string:Yv,number:Gv,boolean:Xv,function:$v,json:qv};function Qv(e){return e.replace(/([a-z0-9])([A-Z])/g,(n,i,d)=>`${i}-${d.toLowerCase()}`)}const mu=Symbol.for("r2wc.render"),gu=Symbol.for("r2wc.connected"),Qa=Symbol.for("r2wc.context"),Oa=Symbol.for("r2wc.props");function Jv(e,n,i){var d,F,J;n.props||(n.props=e.propTypes?Object.keys(e.propTypes):[]);const Me=Array.isArray(n.props)?n.props.slice():Object.keys(n.props),qe={},tt={},ct={};for(const At of Me){qe[At]=Array.isArray(n.props)?"string":n.props[At];const fe=Qv(At);tt[At]=fe,ct[fe]=At}class kt extends HTMLElement{constructor(){super(),hu(this,d,!0),hu(this,F),hu(this,J,{}),hu(this,"container"),n.shadow?this.container=this.attachShadow({mode:n.shadow}):this.container=this,this[Oa].container=this.container;for(const fe of Me){const Q=tt[fe],t=this.getAttribute(Q),T=qe[fe],j=T?of[T]:null;j!=null&&j.parse&&t&&(this[Oa][fe]=j.parse(t,Q,this))}}static get observedAttributes(){return Object.keys(ct)}connectedCallback(){this[gu]=!0,this[mu]()}disconnectedCallback(){this[gu]=!1,this[Qa]&&i.unmount(this[Qa]),delete this[Qa]}attributeChangedCallback(fe,Q,t){const T=ct[fe],j=qe[T],f=j?of[j]:null;T in qe&&f!=null&&f.parse&&t&&(this[Oa][T]=f.parse(t,fe,this),this[mu]())}[(d=gu,F=Qa,J=Oa,mu)](){this[gu]&&(this[Qa]?i.update(this[Qa],this[Oa]):this[Qa]=i.mount(this.container,e,this[Oa]))}}for(const At of Me){const fe=tt[At],Q=qe[At];Object.defineProperty(kt.prototype,At,{enumerable:!0,configurable:!0,get(){return this[Oa][At]},set(t){this[Oa][At]=t;const T=Q?of[Q]:null;if(T!=null&&T.stringify){const j=T.stringify(t,fe,this);this.getAttribute(fe)!==j&&this.setAttribute(fe,j)}else this[mu]()}})}return kt}function e2(e,n,i){const d=dm(e),F=rp.createElement(n,i);return d.render(F),{root:d,ReactComponent:n}}function t2({root:e,ReactComponent:n},i){const d=rp.createElement(n,i);e.render(d)}function n2({root:e}){e.unmount()}function r2(e,n={}){return Jv(e,n,{mount:e2,update:t2,unmount:n2})}var Rl=function(){return Rl=Object.assign||function(n){for(var i,d=1,F=arguments.length;d<F;d++){i=arguments[d];for(var J in i)Object.prototype.hasOwnProperty.call(i,J)&&(n[J]=i[J])}return n},Rl.apply(this,arguments)};function o2(e,n,i,d){function F(J){return J instanceof i?J:new i(function(Me){Me(J)})}return new(i||(i=Promise))(function(J,Me){function qe(kt){try{ct(d.next(kt))}catch(At){Me(At)}}function tt(kt){try{ct(d.throw(kt))}catch(At){Me(At)}}function ct(kt){kt.done?J(kt.value):F(kt.value).then(qe,tt)}ct((d=d.apply(e,n||[])).next())})}function i2(e,n){var i={label:0,sent:function(){if(J[0]&1)throw J[1];return J[1]},trys:[],ops:[]},d,F,J,Me;return Me={next:qe(0),throw:qe(1),return:qe(2)},typeof Symbol=="function"&&(Me[Symbol.iterator]=function(){return this}),Me;function qe(ct){return function(kt){return tt([ct,kt])}}function tt(ct){if(d)throw new TypeError("Generator is already executing.");for(;Me&&(Me=0,ct[0]&&(i=0)),i;)try{if(d=1,F&&(J=ct[0]&2?F.return:ct[0]?F.throw||((J=F.return)&&J.call(F),0):F.next)&&!(J=J.call(F,ct[1])).done)return J;switch(F=0,J&&(ct=[ct[0]&2,J.value]),ct[0]){case 0:case 1:J=ct;break;case 4:return i.label++,{value:ct[1],done:!1};case 5:i.label++,F=ct[1],ct=[0];continue;case 7:ct=i.ops.pop(),i.trys.pop();continue;default:if(J=i.trys,!(J=J.length>0&&J[J.length-1])&&(ct[0]===6||ct[0]===2)){i=0;continue}if(ct[0]===3&&(!J||ct[1]>J[0]&&ct[1]<J[3])){i.label=ct[1];break}if(ct[0]===6&&i.label<J[1]){i.label=J[1],J=ct;break}if(J&&i.label<J[2]){i.label=J[2],i.ops.push(ct);break}J[2]&&i.ops.pop(),i.trys.pop();continue}ct=n.call(e,i)}catch(kt){ct=[6,kt],F=0}finally{d=J=0}if(ct[0]&5)throw ct[1];return{value:ct[0]?ct[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var pm={exports:{}},vu={};/**
|
|
33
|
+
* @license React
|
|
34
|
+
* react-jsx-runtime.production.min.js
|
|
35
|
+
*
|
|
36
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
37
|
+
*
|
|
38
|
+
* This source code is licensed under the MIT license found in the
|
|
39
|
+
* LICENSE file in the root directory of this source tree.
|
|
40
|
+
*/var a2=Mi,l2=Symbol.for("react.element"),s2=Symbol.for("react.fragment"),c2=Object.prototype.hasOwnProperty,u2=a2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d2={key:!0,ref:!0,__self:!0,__source:!0};function hm(e,n,i){var d,F={},J=null,Me=null;i!==void 0&&(J=""+i),n.key!==void 0&&(J=""+n.key),n.ref!==void 0&&(Me=n.ref);for(d in n)c2.call(n,d)&&!d2.hasOwnProperty(d)&&(F[d]=n[d]);if(e&&e.defaultProps)for(d in n=e.defaultProps,n)F[d]===void 0&&(F[d]=n[d]);return{$$typeof:l2,type:e,key:J,ref:Me,props:F,_owner:u2.current}}vu.Fragment=s2,vu.jsx=hm,vu.jsxs=hm,pm.exports=vu;var f2=pm.exports,mm={exports:{}},gm={exports:{}};/*! For license information please see excalidraw.production.min.js.LICENSE.txt */(function(e,n){(function(i,d){e.exports=d(Mi,um)})(self,function(i,d){return function(){var F,J,Me,qe,tt={5779:function(fe,Q){Q.N=void 0;var t=/^([^\w]*)(javascript|data|vbscript)/im,T=/&#(\w+)(^\w|;)?/g,j=/&(newline|tab);/gi,f=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,l=/^.+(:|:)/gim,v=[".","/"];Q.N=function(k){var g,a=(g=k||"",g.replace(T,function(K,U){return String.fromCharCode(U)})).replace(j,"").replace(f,"").trim();if(!a)return"about:blank";if(function(K){return v.indexOf(K[0])>-1}(a))return a;var P=a.match(l);if(!P)return a;var R=P[0];return t.test(R)?"about:blank":a}},7217:function(fe,Q,t){function T(j,f,{checkForDefaultPrevented:l=!0}={}){return function(v){if(j==null||j(v),l===!1||!v.defaultPrevented)return f==null?void 0:f(v)}}t.d(Q,{M:function(){return T}})},9335:function(fe,Q,t){t.d(Q,{F:function(){return j},e:function(){return f}});var T=t(9787);function j(...l){return v=>l.forEach(k=>function(g,a){typeof g=="function"?g(a):g!=null&&(g.current=a)}(k,v))}function f(...l){return(0,T.useCallback)(j(...l),l)}},1267:function(fe,Q,t){t.d(Q,{b:function(){return j}});var T=t(9787);function j(l,v=[]){let k=[];const g=()=>{const a=k.map(P=>(0,T.createContext)(P));return function(P){const R=(P==null?void 0:P[l])||a;return(0,T.useMemo)(()=>({[`__scope${l}`]:{...P,[l]:R}}),[P,R])}};return g.scopeName=l,[function(a,P){const R=(0,T.createContext)(P),K=k.length;function U(m){const{scope:G,children:he,...be}=m,we=(G==null?void 0:G[l][K])||R,xe=(0,T.useMemo)(()=>be,Object.values(be));return(0,T.createElement)(we.Provider,{value:xe},he)}return k=[...k,P],U.displayName=a+"Provider",[U,function(m,G){const he=(G==null?void 0:G[l][K])||R,be=(0,T.useContext)(he);if(be)return be;if(P!==void 0)return P;throw new Error(`\`${m}\` must be used within \`${a}\``)}]},f(g,...v)]}function f(...l){const v=l[0];if(l.length===1)return v;const k=()=>{const g=l.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(a){const P=g.reduce((R,{useScope:K,scopeName:U})=>({...R,...K(a)[`__scope${U}`]}),{});return(0,T.useMemo)(()=>({[`__scope${v.scopeName}`]:P}),[P])}};return k.scopeName=v.scopeName,k}},5622:function(fe,Q,t){t.d(Q,{M:function(){return v}});var T=t(9787),j=t(3348);const f=T.useId||(()=>{});let l=0;function v(k){const[g,a]=T.useState(f());return(0,j.b)(()=>{k||a(P=>P??String(l++))},[k]),k||(g?`radix-${g}`:"")}},1483:function(fe,Q,t){t.d(Q,{z:function(){return v}});var T=t(9787),j=t(5156),f=t(9335),l=t(3348);const v=g=>{const{present:a,children:P}=g,R=function(m){const[G,he]=(0,T.useState)(),be=(0,T.useRef)({}),we=(0,T.useRef)(m),xe=(0,T.useRef)("none"),ce=m?"mounted":"unmounted",[D,ne]=function(S,z){return(0,T.useReducer)((A,E)=>{const L=z[A][E];return L??A},S)}(ce,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return(0,T.useEffect)(()=>{const S=k(be.current);xe.current=D==="mounted"?S:"none"},[D]),(0,l.b)(()=>{const S=be.current,z=we.current;if(z!==m){const A=xe.current,E=k(S);m?ne("MOUNT"):E==="none"||(S==null?void 0:S.display)==="none"?ne("UNMOUNT"):ne(z&&A!==E?"ANIMATION_OUT":"UNMOUNT"),we.current=m}},[m,ne]),(0,l.b)(()=>{if(G){const S=A=>{const E=k(be.current).includes(A.animationName);A.target===G&&E&&(0,j.flushSync)(()=>ne("ANIMATION_END"))},z=A=>{A.target===G&&(xe.current=k(be.current))};return G.addEventListener("animationstart",z),G.addEventListener("animationcancel",S),G.addEventListener("animationend",S),()=>{G.removeEventListener("animationstart",z),G.removeEventListener("animationcancel",S),G.removeEventListener("animationend",S)}}ne("ANIMATION_END")},[G,ne]),{isPresent:["mounted","unmountSuspended"].includes(D),ref:(0,T.useCallback)(S=>{S&&(be.current=getComputedStyle(S)),he(S)},[])}}(a),K=typeof P=="function"?P({present:R.isPresent}):T.Children.only(P),U=(0,f.e)(R.ref,K.ref);return typeof P=="function"||R.isPresent?(0,T.cloneElement)(K,{ref:U}):null};function k(g){return(g==null?void 0:g.animationName)||"none"}v.displayName="Presence"},3119:function(fe,Q,t){t.d(Q,{WV:function(){return v},jH:function(){return k}});var T=t(11),j=t(9787),f=t(5156),l=t(4801);const v=["a","button","div","h2","h3","img","label","li","nav","ol","p","span","svg","ul"].reduce((g,a)=>{const P=(0,j.forwardRef)((R,K)=>{const{asChild:U,...m}=R,G=U?l.g7:a;return(0,j.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,j.createElement)(G,(0,T.Z)({},m,{ref:K}))});return P.displayName=`Primitive.${a}`,{...g,[a]:P}},{});function k(g,a){g&&(0,f.flushSync)(()=>g.dispatchEvent(a))}},4801:function(fe,Q,t){t.d(Q,{g7:function(){return l}});var T=t(11),j=t(9787),f=t(9335);const l=(0,j.forwardRef)((P,R)=>{const{children:K,...U}=P,m=j.Children.toArray(K),G=m.find(g);if(G){const he=G.props.children,be=m.map(we=>we===G?j.Children.count(he)>1?j.Children.only(null):(0,j.isValidElement)(he)?he.props.children:null:we);return(0,j.createElement)(v,(0,T.Z)({},U,{ref:R}),(0,j.isValidElement)(he)?(0,j.cloneElement)(he,void 0,be):null)}return(0,j.createElement)(v,(0,T.Z)({},U,{ref:R}),K)});l.displayName="Slot";const v=(0,j.forwardRef)((P,R)=>{const{children:K,...U}=P;return(0,j.isValidElement)(K)?(0,j.cloneElement)(K,{...a(U,K.props),ref:(0,f.F)(R,K.ref)}):j.Children.count(K)>1?j.Children.only(null):null});v.displayName="SlotClone";const k=({children:P})=>(0,j.createElement)(j.Fragment,null,P);function g(P){return(0,j.isValidElement)(P)&&P.type===k}function a(P,R){const K={...R};for(const U in R){const m=P[U],G=R[U];/^on[A-Z]/.test(U)?m&&G?K[U]=(...he)=>{G(...he),m(...he)}:m&&(K[U]=m):U==="style"?K[U]={...m,...G}:U==="className"&&(K[U]=[m,G].filter(Boolean).join(" "))}return{...P,...K}}},3060:function(fe,Q,t){t.d(Q,{W:function(){return j}});var T=t(9787);function j(f){const l=(0,T.useRef)(f);return(0,T.useEffect)(()=>{l.current=f}),(0,T.useMemo)(()=>(...v)=>{var k;return(k=l.current)===null||k===void 0?void 0:k.call(l,...v)},[])}},2673:function(fe,Q,t){t.d(Q,{T:function(){return f}});var T=t(9787),j=t(3060);function f({prop:l,defaultProp:v,onChange:k=()=>{}}){const[g,a]=function({defaultProp:U,onChange:m}){const G=(0,T.useState)(U),[he]=G,be=(0,T.useRef)(he),we=(0,j.W)(m);return(0,T.useEffect)(()=>{be.current!==he&&(we(he),be.current=he)},[he,be,we]),G}({defaultProp:v,onChange:k}),P=l!==void 0,R=P?l:g,K=(0,j.W)(k);return[R,(0,T.useCallback)(U=>{if(P){const m=U,G=typeof U=="function"?m(l):U;G!==l&&K(G)}else a(U)},[P,l,a,K])]}},3348:function(fe,Q,t){t.d(Q,{b:function(){return j}});var T=t(9787);const j=globalThis!=null&&globalThis.document?T.useLayoutEffect:()=>{}},45:function(fe,Q,t){function T(f){var l,v,k="";if(typeof f=="string"||typeof f=="number")k+=f;else if(typeof f=="object")if(Array.isArray(f))for(l=0;l<f.length;l++)f[l]&&(v=T(f[l]))&&(k&&(k+=" "),k+=v);else for(l in f)f[l]&&(k&&(k+=" "),k+=l);return k}function j(){for(var f,l,v=0,k="";v<arguments.length;)(f=arguments[v++])&&(l=T(f))&&(k&&(k+=" "),k+=l);return k}t.d(Q,{Z:function(){return j}})},6233:function(fe,Q){var t;t=function(T){T.version="0.3.0";var j=function(){for(var v=0,k=new Array(256),g=0;g!=256;++g)v=1&(v=1&(v=1&(v=1&(v=1&(v=1&(v=1&(v=1&(v=g)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1)?-306674912^v>>>1:v>>>1,k[g]=v;return typeof Int32Array<"u"?new Int32Array(k):k}(),f=typeof Buffer<"u";function l(v){for(var k=-1,g=0,a=v.length-7;g<a;)k=(k=(k=(k=(k=(k=(k=(k=k>>>8^j[255&(k^v[g++])])>>>8^j[255&(k^v[g++])])>>>8^j[255&(k^v[g++])])>>>8^j[255&(k^v[g++])])>>>8^j[255&(k^v[g++])])>>>8^j[255&(k^v[g++])])>>>8^j[255&(k^v[g++])])>>>8^j[255&(k^v[g++])];for(;g<a+7;)k=k>>>8^j[255&(k^v[g++])];return-1^k}T.table=j,T.bstr=function(v){if(v.length>32768&&f)return l(new Buffer(v));for(var k=-1,g=v.length-1,a=0;a<g;)k=j[255&(k^v.charCodeAt(a++))]^k>>>8,k=j[255&(k^v.charCodeAt(a++))]^k>>>8;return a===g&&(k=k>>>8^j[255&(k^v.charCodeAt(a))]),-1^k},T.buf=function(v){if(v.length>1e4)return l(v);for(var k=-1,g=0,a=v.length-3;g<a;)k=(k=(k=(k=k>>>8^j[255&(k^v[g++])])>>>8^j[255&(k^v[g++])])>>>8^j[255&(k^v[g++])])>>>8^j[255&(k^v[g++])];for(;g<a+3;)k=k>>>8^j[255&(k^v[g++])];return-1^k},T.str=function(v){for(var k,g,a=-1,P=0,R=v.length;P<R;)(k=v.charCodeAt(P++))<128?a=a>>>8^j[255&(a^k)]:k<2048?a=(a=a>>>8^j[255&(a^(192|k>>6&31))])>>>8^j[255&(a^(128|63&k))]:k>=55296&&k<57344?(k=64+(1023&k),g=1023&v.charCodeAt(P++),a=(a=(a=(a=a>>>8^j[255&(a^(240|k>>8&7))])>>>8^j[255&(a^(128|k>>2&63))])>>>8^j[255&(a^(128|g>>6&15|3&k))])>>>8^j[255&(a^(128|63&g))]):a=(a=(a=a>>>8^j[255&(a^(224|k>>12&15))])>>>8^j[255&(a^(128|k>>6&63))])>>>8^j[255&(a^(128|63&k))];return-1^a}},t(typeof DO_NOT_EXPORT_CRC>"u"?Q:{})},200:function(fe,Q,t){var T="Expected a function",j=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,v=/^0o[0-7]+$/i,k=parseInt,g=typeof t.g=="object"&&t.g&&t.g.Object===Object&&t.g,a=typeof self=="object"&&self&&self.Object===Object&&self,P=g||a||Function("return this")(),R=Object.prototype.toString,K=Math.max,U=Math.min,m=function(){return P.Date.now()};function G(we,xe,ce){var D,ne,S,z,A,E,L=0,h=!1,y=!1,r=!0;if(typeof we!="function")throw new TypeError(T);function M(I){var C=D,_=ne;return D=ne=void 0,L=I,z=we.apply(_,C)}function p(I){return L=I,A=setTimeout(w,xe),h?M(I):z}function c(I){var C=I-E;return E===void 0||C>=xe||C<0||y&&I-L>=S}function w(){var I=m();if(c(I))return O(I);A=setTimeout(w,function(C){var _=xe-(C-E);return y?U(_,S-(C-L)):_}(I))}function O(I){return A=void 0,r&&D?M(I):(D=ne=void 0,z)}function $(){var I=m(),C=c(I);if(D=arguments,ne=this,E=I,C){if(A===void 0)return p(E);if(y)return A=setTimeout(w,xe),M(E)}return A===void 0&&(A=setTimeout(w,xe)),z}return xe=be(xe)||0,he(ce)&&(h=!!ce.leading,S=(y="maxWait"in ce)?K(be(ce.maxWait)||0,xe):S,r="trailing"in ce?!!ce.trailing:r),$.cancel=function(){A!==void 0&&clearTimeout(A),L=0,D=E=ne=A=void 0},$.flush=function(){return A===void 0?z:O(m())},$}function he(we){var xe=typeof we;return!!we&&(xe=="object"||xe=="function")}function be(we){if(typeof we=="number")return we;if(function(D){return typeof D=="symbol"||function(ne){return!!ne&&typeof ne=="object"}(D)&&R.call(D)=="[object Symbol]"}(we))return NaN;if(he(we)){var xe=typeof we.valueOf=="function"?we.valueOf():we;we=he(xe)?xe+"":xe}if(typeof we!="string")return we===0?we:+we;we=we.replace(j,"");var ce=l.test(we);return ce||v.test(we)?k(we.slice(2),ce?2:8):f.test(we)?NaN:+we}fe.exports=function(we,xe,ce){var D=!0,ne=!0;if(typeof we!="function")throw new TypeError(T);return he(ce)&&(D="leading"in ce?!!ce.leading:D,ne="trailing"in ce?!!ce.trailing:ne),G(we,xe,{leading:D,maxWait:xe,trailing:ne})}},2744:function(fe,Q,t){var T={};(0,t(9187).assign)(T,t(4395),t(578),t(2684)),fe.exports=T},4395:function(fe,Q,t){var T=t(6193),j=t(9187),f=t(8592),l=t(5604),v=t(249),k=Object.prototype.toString;function g(P){if(!(this instanceof g))return new g(P);this.options=j.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},P||{});var R=this.options;R.raw&&R.windowBits>0?R.windowBits=-R.windowBits:R.gzip&&R.windowBits>0&&R.windowBits<16&&(R.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new v,this.strm.avail_out=0;var K=T.deflateInit2(this.strm,R.level,R.method,R.windowBits,R.memLevel,R.strategy);if(K!==0)throw new Error(l[K]);if(R.header&&T.deflateSetHeader(this.strm,R.header),R.dictionary){var U;if(U=typeof R.dictionary=="string"?f.string2buf(R.dictionary):k.call(R.dictionary)==="[object ArrayBuffer]"?new Uint8Array(R.dictionary):R.dictionary,(K=T.deflateSetDictionary(this.strm,U))!==0)throw new Error(l[K]);this._dict_set=!0}}function a(P,R){var K=new g(R);if(K.push(P,!0),K.err)throw K.msg||l[K.err];return K.result}g.prototype.push=function(P,R){var K,U,m=this.strm,G=this.options.chunkSize;if(this.ended)return!1;U=R===~~R?R:R===!0?4:0,typeof P=="string"?m.input=f.string2buf(P):k.call(P)==="[object ArrayBuffer]"?m.input=new Uint8Array(P):m.input=P,m.next_in=0,m.avail_in=m.input.length;do{if(m.avail_out===0&&(m.output=new j.Buf8(G),m.next_out=0,m.avail_out=G),(K=T.deflate(m,U))!==1&&K!==0)return this.onEnd(K),this.ended=!0,!1;m.avail_out!==0&&(m.avail_in!==0||U!==4&&U!==2)||(this.options.to==="string"?this.onData(f.buf2binstring(j.shrinkBuf(m.output,m.next_out))):this.onData(j.shrinkBuf(m.output,m.next_out)))}while((m.avail_in>0||m.avail_out===0)&&K!==1);return U===4?(K=T.deflateEnd(this.strm),this.onEnd(K),this.ended=!0,K===0):U!==2||(this.onEnd(0),m.avail_out=0,!0)},g.prototype.onData=function(P){this.chunks.push(P)},g.prototype.onEnd=function(P){P===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=j.flattenChunks(this.chunks)),this.chunks=[],this.err=P,this.msg=this.strm.msg},Q.Deflate=g,Q.deflate=a,Q.deflateRaw=function(P,R){return(R=R||{}).raw=!0,a(P,R)},Q.gzip=function(P,R){return(R=R||{}).gzip=!0,a(P,R)}},578:function(fe,Q,t){var T=t(7823),j=t(9187),f=t(8592),l=t(2684),v=t(5604),k=t(249),g=t(9968),a=Object.prototype.toString;function P(K){if(!(this instanceof P))return new P(K);this.options=j.assign({chunkSize:16384,windowBits:0,to:""},K||{});var U=this.options;U.raw&&U.windowBits>=0&&U.windowBits<16&&(U.windowBits=-U.windowBits,U.windowBits===0&&(U.windowBits=-15)),!(U.windowBits>=0&&U.windowBits<16)||K&&K.windowBits||(U.windowBits+=32),U.windowBits>15&&U.windowBits<48&&!(15&U.windowBits)&&(U.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var m=T.inflateInit2(this.strm,U.windowBits);if(m!==l.Z_OK)throw new Error(v[m]);if(this.header=new g,T.inflateGetHeader(this.strm,this.header),U.dictionary&&(typeof U.dictionary=="string"?U.dictionary=f.string2buf(U.dictionary):a.call(U.dictionary)==="[object ArrayBuffer]"&&(U.dictionary=new Uint8Array(U.dictionary)),U.raw&&(m=T.inflateSetDictionary(this.strm,U.dictionary))!==l.Z_OK))throw new Error(v[m])}function R(K,U){var m=new P(U);if(m.push(K,!0),m.err)throw m.msg||v[m.err];return m.result}P.prototype.push=function(K,U){var m,G,he,be,we,xe=this.strm,ce=this.options.chunkSize,D=this.options.dictionary,ne=!1;if(this.ended)return!1;G=U===~~U?U:U===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof K=="string"?xe.input=f.binstring2buf(K):a.call(K)==="[object ArrayBuffer]"?xe.input=new Uint8Array(K):xe.input=K,xe.next_in=0,xe.avail_in=xe.input.length;do{if(xe.avail_out===0&&(xe.output=new j.Buf8(ce),xe.next_out=0,xe.avail_out=ce),(m=T.inflate(xe,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&D&&(m=T.inflateSetDictionary(this.strm,D)),m===l.Z_BUF_ERROR&&ne===!0&&(m=l.Z_OK,ne=!1),m!==l.Z_STREAM_END&&m!==l.Z_OK)return this.onEnd(m),this.ended=!0,!1;xe.next_out&&(xe.avail_out!==0&&m!==l.Z_STREAM_END&&(xe.avail_in!==0||G!==l.Z_FINISH&&G!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(he=f.utf8border(xe.output,xe.next_out),be=xe.next_out-he,we=f.buf2string(xe.output,he),xe.next_out=be,xe.avail_out=ce-be,be&&j.arraySet(xe.output,xe.output,he,be,0),this.onData(we)):this.onData(j.shrinkBuf(xe.output,xe.next_out)))),xe.avail_in===0&&xe.avail_out===0&&(ne=!0)}while((xe.avail_in>0||xe.avail_out===0)&&m!==l.Z_STREAM_END);return m===l.Z_STREAM_END&&(G=l.Z_FINISH),G===l.Z_FINISH?(m=T.inflateEnd(this.strm),this.onEnd(m),this.ended=!0,m===l.Z_OK):G!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),xe.avail_out=0,!0)},P.prototype.onData=function(K){this.chunks.push(K)},P.prototype.onEnd=function(K){K===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=j.flattenChunks(this.chunks)),this.chunks=[],this.err=K,this.msg=this.strm.msg},Q.Inflate=P,Q.inflate=R,Q.inflateRaw=function(K,U){return(U=U||{}).raw=!0,R(K,U)},Q.ungzip=R},9187:function(fe,Q){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function T(l,v){return Object.prototype.hasOwnProperty.call(l,v)}Q.assign=function(l){for(var v=Array.prototype.slice.call(arguments,1);v.length;){var k=v.shift();if(k){if(typeof k!="object")throw new TypeError(k+"must be non-object");for(var g in k)T(k,g)&&(l[g]=k[g])}}return l},Q.shrinkBuf=function(l,v){return l.length===v?l:l.subarray?l.subarray(0,v):(l.length=v,l)};var j={arraySet:function(l,v,k,g,a){if(v.subarray&&l.subarray)l.set(v.subarray(k,k+g),a);else for(var P=0;P<g;P++)l[a+P]=v[k+P]},flattenChunks:function(l){var v,k,g,a,P,R;for(g=0,v=0,k=l.length;v<k;v++)g+=l[v].length;for(R=new Uint8Array(g),a=0,v=0,k=l.length;v<k;v++)P=l[v],R.set(P,a),a+=P.length;return R}},f={arraySet:function(l,v,k,g,a){for(var P=0;P<g;P++)l[a+P]=v[k+P]},flattenChunks:function(l){return[].concat.apply([],l)}};Q.setTyped=function(l){l?(Q.Buf8=Uint8Array,Q.Buf16=Uint16Array,Q.Buf32=Int32Array,Q.assign(Q,j)):(Q.Buf8=Array,Q.Buf16=Array,Q.Buf32=Array,Q.assign(Q,f))},Q.setTyped(t)},8592:function(fe,Q,t){var T=t(9187),j=!0,f=!0;try{String.fromCharCode.apply(null,[0])}catch{j=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{f=!1}for(var l=new T.Buf8(256),v=0;v<256;v++)l[v]=v>=252?6:v>=248?5:v>=240?4:v>=224?3:v>=192?2:1;function k(g,a){if(a<65534&&(g.subarray&&f||!g.subarray&&j))return String.fromCharCode.apply(null,T.shrinkBuf(g,a));for(var P="",R=0;R<a;R++)P+=String.fromCharCode(g[R]);return P}l[254]=l[254]=1,Q.string2buf=function(g){var a,P,R,K,U,m=g.length,G=0;for(K=0;K<m;K++)(64512&(P=g.charCodeAt(K)))==55296&&K+1<m&&(64512&(R=g.charCodeAt(K+1)))==56320&&(P=65536+(P-55296<<10)+(R-56320),K++),G+=P<128?1:P<2048?2:P<65536?3:4;for(a=new T.Buf8(G),U=0,K=0;U<G;K++)(64512&(P=g.charCodeAt(K)))==55296&&K+1<m&&(64512&(R=g.charCodeAt(K+1)))==56320&&(P=65536+(P-55296<<10)+(R-56320),K++),P<128?a[U++]=P:P<2048?(a[U++]=192|P>>>6,a[U++]=128|63&P):P<65536?(a[U++]=224|P>>>12,a[U++]=128|P>>>6&63,a[U++]=128|63&P):(a[U++]=240|P>>>18,a[U++]=128|P>>>12&63,a[U++]=128|P>>>6&63,a[U++]=128|63&P);return a},Q.buf2binstring=function(g){return k(g,g.length)},Q.binstring2buf=function(g){for(var a=new T.Buf8(g.length),P=0,R=a.length;P<R;P++)a[P]=g.charCodeAt(P);return a},Q.buf2string=function(g,a){var P,R,K,U,m=a||g.length,G=new Array(2*m);for(R=0,P=0;P<m;)if((K=g[P++])<128)G[R++]=K;else if((U=l[K])>4)G[R++]=65533,P+=U-1;else{for(K&=U===2?31:U===3?15:7;U>1&&P<m;)K=K<<6|63&g[P++],U--;U>1?G[R++]=65533:K<65536?G[R++]=K:(K-=65536,G[R++]=55296|K>>10&1023,G[R++]=56320|1023&K)}return k(G,R)},Q.utf8border=function(g,a){var P;for((a=a||g.length)>g.length&&(a=g.length),P=a-1;P>=0&&(192&g[P])==128;)P--;return P<0||P===0?a:P+l[g[P]]>a?P:a}},3693:function(fe){fe.exports=function(Q,t,T,j){for(var f=65535&Q|0,l=Q>>>16&65535|0,v=0;T!==0;){T-=v=T>2e3?2e3:T;do l=l+(f=f+t[j++]|0)|0;while(--v);f%=65521,l%=65521}return f|l<<16|0}},2684:function(fe){fe.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},8464:function(fe){var Q=function(){for(var t,T=[],j=0;j<256;j++){t=j;for(var f=0;f<8;f++)t=1&t?3988292384^t>>>1:t>>>1;T[j]=t}return T}();fe.exports=function(t,T,j,f){var l=Q,v=f+j;t^=-1;for(var k=f;k<v;k++)t=t>>>8^l[255&(t^T[k])];return-1^t}},6193:function(fe,Q,t){var T,j=t(9187),f=t(8676),l=t(3693),v=t(8464),k=t(5604),g=-2,a=258,P=262,R=103,K=113,U=666;function m(r,M){return r.msg=k[M],M}function G(r){return(r<<1)-(r>4?9:0)}function he(r){for(var M=r.length;--M>=0;)r[M]=0}function be(r){var M=r.state,p=M.pending;p>r.avail_out&&(p=r.avail_out),p!==0&&(j.arraySet(r.output,M.pending_buf,M.pending_out,p,r.next_out),r.next_out+=p,M.pending_out+=p,r.total_out+=p,r.avail_out-=p,M.pending-=p,M.pending===0&&(M.pending_out=0))}function we(r,M){f._tr_flush_block(r,r.block_start>=0?r.block_start:-1,r.strstart-r.block_start,M),r.block_start=r.strstart,be(r.strm)}function xe(r,M){r.pending_buf[r.pending++]=M}function ce(r,M){r.pending_buf[r.pending++]=M>>>8&255,r.pending_buf[r.pending++]=255&M}function D(r,M){var p,c,w=r.max_chain_length,O=r.strstart,$=r.prev_length,I=r.nice_match,C=r.strstart>r.w_size-P?r.strstart-(r.w_size-P):0,_=r.window,N=r.w_mask,q=r.prev,pe=r.strstart+a,te=_[O+$-1],ve=_[O+$];r.prev_length>=r.good_match&&(w>>=2),I>r.lookahead&&(I=r.lookahead);do if(_[(p=M)+$]===ve&&_[p+$-1]===te&&_[p]===_[O]&&_[++p]===_[O+1]){O+=2,p++;do;while(_[++O]===_[++p]&&_[++O]===_[++p]&&_[++O]===_[++p]&&_[++O]===_[++p]&&_[++O]===_[++p]&&_[++O]===_[++p]&&_[++O]===_[++p]&&_[++O]===_[++p]&&O<pe);if(c=a-(pe-O),O=pe-a,c>$){if(r.match_start=M,$=c,c>=I)break;te=_[O+$-1],ve=_[O+$]}}while((M=q[M&N])>C&&--w!=0);return $<=r.lookahead?$:r.lookahead}function ne(r){var M,p,c,w,O,$,I,C,_,N,q=r.w_size;do{if(w=r.window_size-r.lookahead-r.strstart,r.strstart>=q+(q-P)){j.arraySet(r.window,r.window,q,q,0),r.match_start-=q,r.strstart-=q,r.block_start-=q,M=p=r.hash_size;do c=r.head[--M],r.head[M]=c>=q?c-q:0;while(--p);M=p=q;do c=r.prev[--M],r.prev[M]=c>=q?c-q:0;while(--p);w+=q}if(r.strm.avail_in===0)break;if($=r.strm,I=r.window,C=r.strstart+r.lookahead,_=w,N=void 0,(N=$.avail_in)>_&&(N=_),p=N===0?0:($.avail_in-=N,j.arraySet(I,$.input,$.next_in,N,C),$.state.wrap===1?$.adler=l($.adler,I,N,C):$.state.wrap===2&&($.adler=v($.adler,I,N,C)),$.next_in+=N,$.total_in+=N,N),r.lookahead+=p,r.lookahead+r.insert>=3)for(O=r.strstart-r.insert,r.ins_h=r.window[O],r.ins_h=(r.ins_h<<r.hash_shift^r.window[O+1])&r.hash_mask;r.insert&&(r.ins_h=(r.ins_h<<r.hash_shift^r.window[O+3-1])&r.hash_mask,r.prev[O&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=O,O++,r.insert--,!(r.lookahead+r.insert<3)););}while(r.lookahead<P&&r.strm.avail_in!==0)}function S(r,M){for(var p,c;;){if(r.lookahead<P){if(ne(r),r.lookahead<P&&M===0)return 1;if(r.lookahead===0)break}if(p=0,r.lookahead>=3&&(r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+3-1])&r.hash_mask,p=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart),p!==0&&r.strstart-p<=r.w_size-P&&(r.match_length=D(r,p)),r.match_length>=3)if(c=f._tr_tally(r,r.strstart-r.match_start,r.match_length-3),r.lookahead-=r.match_length,r.match_length<=r.max_lazy_match&&r.lookahead>=3){r.match_length--;do r.strstart++,r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+3-1])&r.hash_mask,p=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart;while(--r.match_length!=0);r.strstart++}else r.strstart+=r.match_length,r.match_length=0,r.ins_h=r.window[r.strstart],r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+1])&r.hash_mask;else c=f._tr_tally(r,0,r.window[r.strstart]),r.lookahead--,r.strstart++;if(c&&(we(r,!1),r.strm.avail_out===0))return 1}return r.insert=r.strstart<2?r.strstart:2,M===4?(we(r,!0),r.strm.avail_out===0?3:4):r.last_lit&&(we(r,!1),r.strm.avail_out===0)?1:2}function z(r,M){for(var p,c,w;;){if(r.lookahead<P){if(ne(r),r.lookahead<P&&M===0)return 1;if(r.lookahead===0)break}if(p=0,r.lookahead>=3&&(r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+3-1])&r.hash_mask,p=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart),r.prev_length=r.match_length,r.prev_match=r.match_start,r.match_length=2,p!==0&&r.prev_length<r.max_lazy_match&&r.strstart-p<=r.w_size-P&&(r.match_length=D(r,p),r.match_length<=5&&(r.strategy===1||r.match_length===3&&r.strstart-r.match_start>4096)&&(r.match_length=2)),r.prev_length>=3&&r.match_length<=r.prev_length){w=r.strstart+r.lookahead-3,c=f._tr_tally(r,r.strstart-1-r.prev_match,r.prev_length-3),r.lookahead-=r.prev_length-1,r.prev_length-=2;do++r.strstart<=w&&(r.ins_h=(r.ins_h<<r.hash_shift^r.window[r.strstart+3-1])&r.hash_mask,p=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart);while(--r.prev_length!=0);if(r.match_available=0,r.match_length=2,r.strstart++,c&&(we(r,!1),r.strm.avail_out===0))return 1}else if(r.match_available){if((c=f._tr_tally(r,0,r.window[r.strstart-1]))&&we(r,!1),r.strstart++,r.lookahead--,r.strm.avail_out===0)return 1}else r.match_available=1,r.strstart++,r.lookahead--}return r.match_available&&(c=f._tr_tally(r,0,r.window[r.strstart-1]),r.match_available=0),r.insert=r.strstart<2?r.strstart:2,M===4?(we(r,!0),r.strm.avail_out===0?3:4):r.last_lit&&(we(r,!1),r.strm.avail_out===0)?1:2}function A(r,M,p,c,w){this.good_length=r,this.max_lazy=M,this.nice_length=p,this.max_chain=c,this.func=w}function E(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new j.Buf16(1146),this.dyn_dtree=new j.Buf16(122),this.bl_tree=new j.Buf16(78),he(this.dyn_ltree),he(this.dyn_dtree),he(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new j.Buf16(16),this.heap=new j.Buf16(573),he(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new j.Buf16(573),he(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function L(r){var M;return r&&r.state?(r.total_in=r.total_out=0,r.data_type=2,(M=r.state).pending=0,M.pending_out=0,M.wrap<0&&(M.wrap=-M.wrap),M.status=M.wrap?42:K,r.adler=M.wrap===2?0:1,M.last_flush=0,f._tr_init(M),0):m(r,g)}function h(r){var M,p=L(r);return p===0&&((M=r.state).window_size=2*M.w_size,he(M.head),M.max_lazy_match=T[M.level].max_lazy,M.good_match=T[M.level].good_length,M.nice_match=T[M.level].nice_length,M.max_chain_length=T[M.level].max_chain,M.strstart=0,M.block_start=0,M.lookahead=0,M.insert=0,M.match_length=M.prev_length=2,M.match_available=0,M.ins_h=0),p}function y(r,M,p,c,w,O){if(!r)return g;var $=1;if(M===-1&&(M=6),c<0?($=0,c=-c):c>15&&($=2,c-=16),w<1||w>9||p!==8||c<8||c>15||M<0||M>9||O<0||O>4)return m(r,g);c===8&&(c=9);var I=new E;return r.state=I,I.strm=r,I.wrap=$,I.gzhead=null,I.w_bits=c,I.w_size=1<<I.w_bits,I.w_mask=I.w_size-1,I.hash_bits=w+7,I.hash_size=1<<I.hash_bits,I.hash_mask=I.hash_size-1,I.hash_shift=~~((I.hash_bits+3-1)/3),I.window=new j.Buf8(2*I.w_size),I.head=new j.Buf16(I.hash_size),I.prev=new j.Buf16(I.w_size),I.lit_bufsize=1<<w+6,I.pending_buf_size=4*I.lit_bufsize,I.pending_buf=new j.Buf8(I.pending_buf_size),I.d_buf=1*I.lit_bufsize,I.l_buf=3*I.lit_bufsize,I.level=M,I.strategy=O,I.method=p,h(r)}T=[new A(0,0,0,0,function(r,M){var p=65535;for(p>r.pending_buf_size-5&&(p=r.pending_buf_size-5);;){if(r.lookahead<=1){if(ne(r),r.lookahead===0&&M===0)return 1;if(r.lookahead===0)break}r.strstart+=r.lookahead,r.lookahead=0;var c=r.block_start+p;if((r.strstart===0||r.strstart>=c)&&(r.lookahead=r.strstart-c,r.strstart=c,we(r,!1),r.strm.avail_out===0)||r.strstart-r.block_start>=r.w_size-P&&(we(r,!1),r.strm.avail_out===0))return 1}return r.insert=0,M===4?(we(r,!0),r.strm.avail_out===0?3:4):(r.strstart>r.block_start&&(we(r,!1),r.strm.avail_out),1)}),new A(4,4,8,4,S),new A(4,5,16,8,S),new A(4,6,32,32,S),new A(4,4,16,16,z),new A(8,16,32,32,z),new A(8,16,128,128,z),new A(8,32,128,256,z),new A(32,128,258,1024,z),new A(32,258,258,4096,z)],Q.deflateInit=function(r,M){return y(r,M,8,15,8,0)},Q.deflateInit2=y,Q.deflateReset=h,Q.deflateResetKeep=L,Q.deflateSetHeader=function(r,M){return r&&r.state?r.state.wrap!==2?g:(r.state.gzhead=M,0):g},Q.deflate=function(r,M){var p,c,w,O;if(!r||!r.state||M>5||M<0)return r?m(r,g):g;if(c=r.state,!r.output||!r.input&&r.avail_in!==0||c.status===U&&M!==4)return m(r,r.avail_out===0?-5:g);if(c.strm=r,p=c.last_flush,c.last_flush=M,c.status===42)if(c.wrap===2)r.adler=0,xe(c,31),xe(c,139),xe(c,8),c.gzhead?(xe(c,(c.gzhead.text?1:0)+(c.gzhead.hcrc?2:0)+(c.gzhead.extra?4:0)+(c.gzhead.name?8:0)+(c.gzhead.comment?16:0)),xe(c,255&c.gzhead.time),xe(c,c.gzhead.time>>8&255),xe(c,c.gzhead.time>>16&255),xe(c,c.gzhead.time>>24&255),xe(c,c.level===9?2:c.strategy>=2||c.level<2?4:0),xe(c,255&c.gzhead.os),c.gzhead.extra&&c.gzhead.extra.length&&(xe(c,255&c.gzhead.extra.length),xe(c,c.gzhead.extra.length>>8&255)),c.gzhead.hcrc&&(r.adler=v(r.adler,c.pending_buf,c.pending,0)),c.gzindex=0,c.status=69):(xe(c,0),xe(c,0),xe(c,0),xe(c,0),xe(c,0),xe(c,c.level===9?2:c.strategy>=2||c.level<2?4:0),xe(c,3),c.status=K);else{var $=8+(c.w_bits-8<<4)<<8;$|=(c.strategy>=2||c.level<2?0:c.level<6?1:c.level===6?2:3)<<6,c.strstart!==0&&($|=32),$+=31-$%31,c.status=K,ce(c,$),c.strstart!==0&&(ce(c,r.adler>>>16),ce(c,65535&r.adler)),r.adler=1}if(c.status===69)if(c.gzhead.extra){for(w=c.pending;c.gzindex<(65535&c.gzhead.extra.length)&&(c.pending!==c.pending_buf_size||(c.gzhead.hcrc&&c.pending>w&&(r.adler=v(r.adler,c.pending_buf,c.pending-w,w)),be(r),w=c.pending,c.pending!==c.pending_buf_size));)xe(c,255&c.gzhead.extra[c.gzindex]),c.gzindex++;c.gzhead.hcrc&&c.pending>w&&(r.adler=v(r.adler,c.pending_buf,c.pending-w,w)),c.gzindex===c.gzhead.extra.length&&(c.gzindex=0,c.status=73)}else c.status=73;if(c.status===73)if(c.gzhead.name){w=c.pending;do{if(c.pending===c.pending_buf_size&&(c.gzhead.hcrc&&c.pending>w&&(r.adler=v(r.adler,c.pending_buf,c.pending-w,w)),be(r),w=c.pending,c.pending===c.pending_buf_size)){O=1;break}O=c.gzindex<c.gzhead.name.length?255&c.gzhead.name.charCodeAt(c.gzindex++):0,xe(c,O)}while(O!==0);c.gzhead.hcrc&&c.pending>w&&(r.adler=v(r.adler,c.pending_buf,c.pending-w,w)),O===0&&(c.gzindex=0,c.status=91)}else c.status=91;if(c.status===91)if(c.gzhead.comment){w=c.pending;do{if(c.pending===c.pending_buf_size&&(c.gzhead.hcrc&&c.pending>w&&(r.adler=v(r.adler,c.pending_buf,c.pending-w,w)),be(r),w=c.pending,c.pending===c.pending_buf_size)){O=1;break}O=c.gzindex<c.gzhead.comment.length?255&c.gzhead.comment.charCodeAt(c.gzindex++):0,xe(c,O)}while(O!==0);c.gzhead.hcrc&&c.pending>w&&(r.adler=v(r.adler,c.pending_buf,c.pending-w,w)),O===0&&(c.status=R)}else c.status=R;if(c.status===R&&(c.gzhead.hcrc?(c.pending+2>c.pending_buf_size&&be(r),c.pending+2<=c.pending_buf_size&&(xe(c,255&r.adler),xe(c,r.adler>>8&255),r.adler=0,c.status=K)):c.status=K),c.pending!==0){if(be(r),r.avail_out===0)return c.last_flush=-1,0}else if(r.avail_in===0&&G(M)<=G(p)&&M!==4)return m(r,-5);if(c.status===U&&r.avail_in!==0)return m(r,-5);if(r.avail_in!==0||c.lookahead!==0||M!==0&&c.status!==U){var I=c.strategy===2?function(C,_){for(var N;;){if(C.lookahead===0&&(ne(C),C.lookahead===0)){if(_===0)return 1;break}if(C.match_length=0,N=f._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++,N&&(we(C,!1),C.strm.avail_out===0))return 1}return C.insert=0,_===4?(we(C,!0),C.strm.avail_out===0?3:4):C.last_lit&&(we(C,!1),C.strm.avail_out===0)?1:2}(c,M):c.strategy===3?function(C,_){for(var N,q,pe,te,ve=C.window;;){if(C.lookahead<=a){if(ne(C),C.lookahead<=a&&_===0)return 1;if(C.lookahead===0)break}if(C.match_length=0,C.lookahead>=3&&C.strstart>0&&(q=ve[pe=C.strstart-1])===ve[++pe]&&q===ve[++pe]&&q===ve[++pe]){te=C.strstart+a;do;while(q===ve[++pe]&&q===ve[++pe]&&q===ve[++pe]&&q===ve[++pe]&&q===ve[++pe]&&q===ve[++pe]&&q===ve[++pe]&&q===ve[++pe]&&pe<te);C.match_length=a-(te-pe),C.match_length>C.lookahead&&(C.match_length=C.lookahead)}if(C.match_length>=3?(N=f._tr_tally(C,1,C.match_length-3),C.lookahead-=C.match_length,C.strstart+=C.match_length,C.match_length=0):(N=f._tr_tally(C,0,C.window[C.strstart]),C.lookahead--,C.strstart++),N&&(we(C,!1),C.strm.avail_out===0))return 1}return C.insert=0,_===4?(we(C,!0),C.strm.avail_out===0?3:4):C.last_lit&&(we(C,!1),C.strm.avail_out===0)?1:2}(c,M):T[c.level].func(c,M);if(I!==3&&I!==4||(c.status=U),I===1||I===3)return r.avail_out===0&&(c.last_flush=-1),0;if(I===2&&(M===1?f._tr_align(c):M!==5&&(f._tr_stored_block(c,0,0,!1),M===3&&(he(c.head),c.lookahead===0&&(c.strstart=0,c.block_start=0,c.insert=0))),be(r),r.avail_out===0))return c.last_flush=-1,0}return M!==4?0:c.wrap<=0?1:(c.wrap===2?(xe(c,255&r.adler),xe(c,r.adler>>8&255),xe(c,r.adler>>16&255),xe(c,r.adler>>24&255),xe(c,255&r.total_in),xe(c,r.total_in>>8&255),xe(c,r.total_in>>16&255),xe(c,r.total_in>>24&255)):(ce(c,r.adler>>>16),ce(c,65535&r.adler)),be(r),c.wrap>0&&(c.wrap=-c.wrap),c.pending!==0?0:1)},Q.deflateEnd=function(r){var M;return r&&r.state?(M=r.state.status)!==42&&M!==69&&M!==73&&M!==91&&M!==R&&M!==K&&M!==U?m(r,g):(r.state=null,M===K?m(r,-3):0):g},Q.deflateSetDictionary=function(r,M){var p,c,w,O,$,I,C,_,N=M.length;if(!r||!r.state||(O=(p=r.state).wrap)===2||O===1&&p.status!==42||p.lookahead)return g;for(O===1&&(r.adler=l(r.adler,M,N,0)),p.wrap=0,N>=p.w_size&&(O===0&&(he(p.head),p.strstart=0,p.block_start=0,p.insert=0),_=new j.Buf8(p.w_size),j.arraySet(_,M,N-p.w_size,p.w_size,0),M=_,N=p.w_size),$=r.avail_in,I=r.next_in,C=r.input,r.avail_in=N,r.next_in=0,r.input=M,ne(p);p.lookahead>=3;){c=p.strstart,w=p.lookahead-2;do p.ins_h=(p.ins_h<<p.hash_shift^p.window[c+3-1])&p.hash_mask,p.prev[c&p.w_mask]=p.head[p.ins_h],p.head[p.ins_h]=c,c++;while(--w);p.strstart=c,p.lookahead=2,ne(p)}return p.strstart+=p.lookahead,p.block_start=p.strstart,p.insert=p.lookahead,p.lookahead=0,p.match_length=p.prev_length=2,p.match_available=0,r.next_in=I,r.input=C,r.avail_in=$,p.wrap=O,0},Q.deflateInfo="pako deflate (from Nodeca project)"},9968:function(fe){fe.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},9365:function(fe){fe.exports=function(Q,t){var T,j,f,l,v,k,g,a,P,R,K,U,m,G,he,be,we,xe,ce,D,ne,S,z,A,E;T=Q.state,j=Q.next_in,A=Q.input,f=j+(Q.avail_in-5),l=Q.next_out,E=Q.output,v=l-(t-Q.avail_out),k=l+(Q.avail_out-257),g=T.dmax,a=T.wsize,P=T.whave,R=T.wnext,K=T.window,U=T.hold,m=T.bits,G=T.lencode,he=T.distcode,be=(1<<T.lenbits)-1,we=(1<<T.distbits)-1;e:do{m<15&&(U+=A[j++]<<m,m+=8,U+=A[j++]<<m,m+=8),xe=G[U&be];t:for(;;){if(U>>>=ce=xe>>>24,m-=ce,(ce=xe>>>16&255)===0)E[l++]=65535&xe;else{if(!(16&ce)){if(!(64&ce)){xe=G[(65535&xe)+(U&(1<<ce)-1)];continue t}if(32&ce){T.mode=12;break e}Q.msg="invalid literal/length code",T.mode=30;break e}D=65535&xe,(ce&=15)&&(m<ce&&(U+=A[j++]<<m,m+=8),D+=U&(1<<ce)-1,U>>>=ce,m-=ce),m<15&&(U+=A[j++]<<m,m+=8,U+=A[j++]<<m,m+=8),xe=he[U&we];n:for(;;){if(U>>>=ce=xe>>>24,m-=ce,!(16&(ce=xe>>>16&255))){if(!(64&ce)){xe=he[(65535&xe)+(U&(1<<ce)-1)];continue n}Q.msg="invalid distance code",T.mode=30;break e}if(ne=65535&xe,m<(ce&=15)&&(U+=A[j++]<<m,(m+=8)<ce&&(U+=A[j++]<<m,m+=8)),(ne+=U&(1<<ce)-1)>g){Q.msg="invalid distance too far back",T.mode=30;break e}if(U>>>=ce,m-=ce,ne>(ce=l-v)){if((ce=ne-ce)>P&&T.sane){Q.msg="invalid distance too far back",T.mode=30;break e}if(S=0,z=K,R===0){if(S+=a-ce,ce<D){D-=ce;do E[l++]=K[S++];while(--ce);S=l-ne,z=E}}else if(R<ce){if(S+=a+R-ce,(ce-=R)<D){D-=ce;do E[l++]=K[S++];while(--ce);if(S=0,R<D){D-=ce=R;do E[l++]=K[S++];while(--ce);S=l-ne,z=E}}}else if(S+=R-ce,ce<D){D-=ce;do E[l++]=K[S++];while(--ce);S=l-ne,z=E}for(;D>2;)E[l++]=z[S++],E[l++]=z[S++],E[l++]=z[S++],D-=3;D&&(E[l++]=z[S++],D>1&&(E[l++]=z[S++]))}else{S=l-ne;do E[l++]=E[S++],E[l++]=E[S++],E[l++]=E[S++],D-=3;while(D>2);D&&(E[l++]=E[S++],D>1&&(E[l++]=E[S++]))}break}}break}}while(j<f&&l<k);j-=D=m>>3,U&=(1<<(m-=D<<3))-1,Q.next_in=j,Q.next_out=l,Q.avail_in=j<f?f-j+5:5-(j-f),Q.avail_out=l<k?k-l+257:257-(l-k),T.hold=U,T.bits=m}},7823:function(fe,Q,t){var T=t(9187),j=t(3693),f=t(8464),l=t(9365),v=t(6446),k=-2,g=12,a=30;function P(D){return(D>>>24&255)+(D>>>8&65280)+((65280&D)<<8)+((255&D)<<24)}function R(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new T.Buf16(320),this.work=new T.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function K(D){var ne;return D&&D.state?(ne=D.state,D.total_in=D.total_out=ne.total=0,D.msg="",ne.wrap&&(D.adler=1&ne.wrap),ne.mode=1,ne.last=0,ne.havedict=0,ne.dmax=32768,ne.head=null,ne.hold=0,ne.bits=0,ne.lencode=ne.lendyn=new T.Buf32(852),ne.distcode=ne.distdyn=new T.Buf32(592),ne.sane=1,ne.back=-1,0):k}function U(D){var ne;return D&&D.state?((ne=D.state).wsize=0,ne.whave=0,ne.wnext=0,K(D)):k}function m(D,ne){var S,z;return D&&D.state?(z=D.state,ne<0?(S=0,ne=-ne):(S=1+(ne>>4),ne<48&&(ne&=15)),ne&&(ne<8||ne>15)?k:(z.window!==null&&z.wbits!==ne&&(z.window=null),z.wrap=S,z.wbits=ne,U(D))):k}function G(D,ne){var S,z;return D?(z=new R,D.state=z,z.window=null,(S=m(D,ne))!==0&&(D.state=null),S):k}var he,be,we=!0;function xe(D){if(we){var ne;for(he=new T.Buf32(512),be=new T.Buf32(32),ne=0;ne<144;)D.lens[ne++]=8;for(;ne<256;)D.lens[ne++]=9;for(;ne<280;)D.lens[ne++]=7;for(;ne<288;)D.lens[ne++]=8;for(v(1,D.lens,0,288,he,0,D.work,{bits:9}),ne=0;ne<32;)D.lens[ne++]=5;v(2,D.lens,0,32,be,0,D.work,{bits:5}),we=!1}D.lencode=he,D.lenbits=9,D.distcode=be,D.distbits=5}function ce(D,ne,S,z){var A,E=D.state;return E.window===null&&(E.wsize=1<<E.wbits,E.wnext=0,E.whave=0,E.window=new T.Buf8(E.wsize)),z>=E.wsize?(T.arraySet(E.window,ne,S-E.wsize,E.wsize,0),E.wnext=0,E.whave=E.wsize):((A=E.wsize-E.wnext)>z&&(A=z),T.arraySet(E.window,ne,S-z,A,E.wnext),(z-=A)?(T.arraySet(E.window,ne,S-z,z,0),E.wnext=z,E.whave=E.wsize):(E.wnext+=A,E.wnext===E.wsize&&(E.wnext=0),E.whave<E.wsize&&(E.whave+=A))),0}Q.inflateReset=U,Q.inflateReset2=m,Q.inflateResetKeep=K,Q.inflateInit=function(D){return G(D,15)},Q.inflateInit2=G,Q.inflate=function(D,ne){var S,z,A,E,L,h,y,r,M,p,c,w,O,$,I,C,_,N,q,pe,te,ve,ae,H,le=0,ke=new T.Buf8(4),Le=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!D||!D.state||!D.output||!D.input&&D.avail_in!==0)return k;(S=D.state).mode===g&&(S.mode=13),L=D.next_out,A=D.output,y=D.avail_out,E=D.next_in,z=D.input,h=D.avail_in,r=S.hold,M=S.bits,p=h,c=y,ve=0;e:for(;;)switch(S.mode){case 1:if(S.wrap===0){S.mode=13;break}for(;M<16;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}if(2&S.wrap&&r===35615){S.check=0,ke[0]=255&r,ke[1]=r>>>8&255,S.check=f(S.check,ke,2,0),r=0,M=0,S.mode=2;break}if(S.flags=0,S.head&&(S.head.done=!1),!(1&S.wrap)||(((255&r)<<8)+(r>>8))%31){D.msg="incorrect header check",S.mode=a;break}if((15&r)!=8){D.msg="unknown compression method",S.mode=a;break}if(M-=4,te=8+(15&(r>>>=4)),S.wbits===0)S.wbits=te;else if(te>S.wbits){D.msg="invalid window size",S.mode=a;break}S.dmax=1<<te,D.adler=S.check=1,S.mode=512&r?10:g,r=0,M=0;break;case 2:for(;M<16;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}if(S.flags=r,(255&S.flags)!=8){D.msg="unknown compression method",S.mode=a;break}if(57344&S.flags){D.msg="unknown header flags set",S.mode=a;break}S.head&&(S.head.text=r>>8&1),512&S.flags&&(ke[0]=255&r,ke[1]=r>>>8&255,S.check=f(S.check,ke,2,0)),r=0,M=0,S.mode=3;case 3:for(;M<32;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}S.head&&(S.head.time=r),512&S.flags&&(ke[0]=255&r,ke[1]=r>>>8&255,ke[2]=r>>>16&255,ke[3]=r>>>24&255,S.check=f(S.check,ke,4,0)),r=0,M=0,S.mode=4;case 4:for(;M<16;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}S.head&&(S.head.xflags=255&r,S.head.os=r>>8),512&S.flags&&(ke[0]=255&r,ke[1]=r>>>8&255,S.check=f(S.check,ke,2,0)),r=0,M=0,S.mode=5;case 5:if(1024&S.flags){for(;M<16;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}S.length=r,S.head&&(S.head.extra_len=r),512&S.flags&&(ke[0]=255&r,ke[1]=r>>>8&255,S.check=f(S.check,ke,2,0)),r=0,M=0}else S.head&&(S.head.extra=null);S.mode=6;case 6:if(1024&S.flags&&((w=S.length)>h&&(w=h),w&&(S.head&&(te=S.head.extra_len-S.length,S.head.extra||(S.head.extra=new Array(S.head.extra_len)),T.arraySet(S.head.extra,z,E,w,te)),512&S.flags&&(S.check=f(S.check,z,w,E)),h-=w,E+=w,S.length-=w),S.length))break e;S.length=0,S.mode=7;case 7:if(2048&S.flags){if(h===0)break e;w=0;do te=z[E+w++],S.head&&te&&S.length<65536&&(S.head.name+=String.fromCharCode(te));while(te&&w<h);if(512&S.flags&&(S.check=f(S.check,z,w,E)),h-=w,E+=w,te)break e}else S.head&&(S.head.name=null);S.length=0,S.mode=8;case 8:if(4096&S.flags){if(h===0)break e;w=0;do te=z[E+w++],S.head&&te&&S.length<65536&&(S.head.comment+=String.fromCharCode(te));while(te&&w<h);if(512&S.flags&&(S.check=f(S.check,z,w,E)),h-=w,E+=w,te)break e}else S.head&&(S.head.comment=null);S.mode=9;case 9:if(512&S.flags){for(;M<16;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}if(r!==(65535&S.check)){D.msg="header crc mismatch",S.mode=a;break}r=0,M=0}S.head&&(S.head.hcrc=S.flags>>9&1,S.head.done=!0),D.adler=S.check=0,S.mode=g;break;case 10:for(;M<32;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}D.adler=S.check=P(r),r=0,M=0,S.mode=11;case 11:if(S.havedict===0)return D.next_out=L,D.avail_out=y,D.next_in=E,D.avail_in=h,S.hold=r,S.bits=M,2;D.adler=S.check=1,S.mode=g;case g:if(ne===5||ne===6)break e;case 13:if(S.last){r>>>=7&M,M-=7&M,S.mode=27;break}for(;M<3;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}switch(S.last=1&r,M-=1,3&(r>>>=1)){case 0:S.mode=14;break;case 1:if(xe(S),S.mode=20,ne===6){r>>>=2,M-=2;break e}break;case 2:S.mode=17;break;case 3:D.msg="invalid block type",S.mode=a}r>>>=2,M-=2;break;case 14:for(r>>>=7&M,M-=7&M;M<32;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}if((65535&r)!=(r>>>16^65535)){D.msg="invalid stored block lengths",S.mode=a;break}if(S.length=65535&r,r=0,M=0,S.mode=15,ne===6)break e;case 15:S.mode=16;case 16:if(w=S.length){if(w>h&&(w=h),w>y&&(w=y),w===0)break e;T.arraySet(A,z,E,w,L),h-=w,E+=w,y-=w,L+=w,S.length-=w;break}S.mode=g;break;case 17:for(;M<14;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}if(S.nlen=257+(31&r),r>>>=5,M-=5,S.ndist=1+(31&r),r>>>=5,M-=5,S.ncode=4+(15&r),r>>>=4,M-=4,S.nlen>286||S.ndist>30){D.msg="too many length or distance symbols",S.mode=a;break}S.have=0,S.mode=18;case 18:for(;S.have<S.ncode;){for(;M<3;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}S.lens[Le[S.have++]]=7&r,r>>>=3,M-=3}for(;S.have<19;)S.lens[Le[S.have++]]=0;if(S.lencode=S.lendyn,S.lenbits=7,ae={bits:S.lenbits},ve=v(0,S.lens,0,19,S.lencode,0,S.work,ae),S.lenbits=ae.bits,ve){D.msg="invalid code lengths set",S.mode=a;break}S.have=0,S.mode=19;case 19:for(;S.have<S.nlen+S.ndist;){for(;C=(le=S.lencode[r&(1<<S.lenbits)-1])>>>16&255,_=65535&le,!((I=le>>>24)<=M);){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}if(_<16)r>>>=I,M-=I,S.lens[S.have++]=_;else{if(_===16){for(H=I+2;M<H;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}if(r>>>=I,M-=I,S.have===0){D.msg="invalid bit length repeat",S.mode=a;break}te=S.lens[S.have-1],w=3+(3&r),r>>>=2,M-=2}else if(_===17){for(H=I+3;M<H;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}M-=I,te=0,w=3+(7&(r>>>=I)),r>>>=3,M-=3}else{for(H=I+7;M<H;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}M-=I,te=0,w=11+(127&(r>>>=I)),r>>>=7,M-=7}if(S.have+w>S.nlen+S.ndist){D.msg="invalid bit length repeat",S.mode=a;break}for(;w--;)S.lens[S.have++]=te}}if(S.mode===a)break;if(S.lens[256]===0){D.msg="invalid code -- missing end-of-block",S.mode=a;break}if(S.lenbits=9,ae={bits:S.lenbits},ve=v(1,S.lens,0,S.nlen,S.lencode,0,S.work,ae),S.lenbits=ae.bits,ve){D.msg="invalid literal/lengths set",S.mode=a;break}if(S.distbits=6,S.distcode=S.distdyn,ae={bits:S.distbits},ve=v(2,S.lens,S.nlen,S.ndist,S.distcode,0,S.work,ae),S.distbits=ae.bits,ve){D.msg="invalid distances set",S.mode=a;break}if(S.mode=20,ne===6)break e;case 20:S.mode=21;case 21:if(h>=6&&y>=258){D.next_out=L,D.avail_out=y,D.next_in=E,D.avail_in=h,S.hold=r,S.bits=M,l(D,c),L=D.next_out,A=D.output,y=D.avail_out,E=D.next_in,z=D.input,h=D.avail_in,r=S.hold,M=S.bits,S.mode===g&&(S.back=-1);break}for(S.back=0;C=(le=S.lencode[r&(1<<S.lenbits)-1])>>>16&255,_=65535&le,!((I=le>>>24)<=M);){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}if(C&&!(240&C)){for(N=I,q=C,pe=_;C=(le=S.lencode[pe+((r&(1<<N+q)-1)>>N)])>>>16&255,_=65535&le,!(N+(I=le>>>24)<=M);){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}r>>>=N,M-=N,S.back+=N}if(r>>>=I,M-=I,S.back+=I,S.length=_,C===0){S.mode=26;break}if(32&C){S.back=-1,S.mode=g;break}if(64&C){D.msg="invalid literal/length code",S.mode=a;break}S.extra=15&C,S.mode=22;case 22:if(S.extra){for(H=S.extra;M<H;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}S.length+=r&(1<<S.extra)-1,r>>>=S.extra,M-=S.extra,S.back+=S.extra}S.was=S.length,S.mode=23;case 23:for(;C=(le=S.distcode[r&(1<<S.distbits)-1])>>>16&255,_=65535&le,!((I=le>>>24)<=M);){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}if(!(240&C)){for(N=I,q=C,pe=_;C=(le=S.distcode[pe+((r&(1<<N+q)-1)>>N)])>>>16&255,_=65535&le,!(N+(I=le>>>24)<=M);){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}r>>>=N,M-=N,S.back+=N}if(r>>>=I,M-=I,S.back+=I,64&C){D.msg="invalid distance code",S.mode=a;break}S.offset=_,S.extra=15&C,S.mode=24;case 24:if(S.extra){for(H=S.extra;M<H;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}S.offset+=r&(1<<S.extra)-1,r>>>=S.extra,M-=S.extra,S.back+=S.extra}if(S.offset>S.dmax){D.msg="invalid distance too far back",S.mode=a;break}S.mode=25;case 25:if(y===0)break e;if(w=c-y,S.offset>w){if((w=S.offset-w)>S.whave&&S.sane){D.msg="invalid distance too far back",S.mode=a;break}w>S.wnext?(w-=S.wnext,O=S.wsize-w):O=S.wnext-w,w>S.length&&(w=S.length),$=S.window}else $=A,O=L-S.offset,w=S.length;w>y&&(w=y),y-=w,S.length-=w;do A[L++]=$[O++];while(--w);S.length===0&&(S.mode=21);break;case 26:if(y===0)break e;A[L++]=S.length,y--,S.mode=21;break;case 27:if(S.wrap){for(;M<32;){if(h===0)break e;h--,r|=z[E++]<<M,M+=8}if(c-=y,D.total_out+=c,S.total+=c,c&&(D.adler=S.check=S.flags?f(S.check,A,c,L-c):j(S.check,A,c,L-c)),c=y,(S.flags?r:P(r))!==S.check){D.msg="incorrect data check",S.mode=a;break}r=0,M=0}S.mode=28;case 28:if(S.wrap&&S.flags){for(;M<32;){if(h===0)break e;h--,r+=z[E++]<<M,M+=8}if(r!==(4294967295&S.total)){D.msg="incorrect length check",S.mode=a;break}r=0,M=0}S.mode=29;case 29:ve=1;break e;case a:ve=-3;break e;case 31:return-4;default:return k}return D.next_out=L,D.avail_out=y,D.next_in=E,D.avail_in=h,S.hold=r,S.bits=M,(S.wsize||c!==D.avail_out&&S.mode<a&&(S.mode<27||ne!==4))&&ce(D,D.output,D.next_out,c-D.avail_out)?(S.mode=31,-4):(p-=D.avail_in,c-=D.avail_out,D.total_in+=p,D.total_out+=c,S.total+=c,S.wrap&&c&&(D.adler=S.check=S.flags?f(S.check,A,c,D.next_out-c):j(S.check,A,c,D.next_out-c)),D.data_type=S.bits+(S.last?64:0)+(S.mode===g?128:0)+(S.mode===20||S.mode===15?256:0),(p===0&&c===0||ne===4)&&ve===0&&(ve=-5),ve)},Q.inflateEnd=function(D){if(!D||!D.state)return k;var ne=D.state;return ne.window&&(ne.window=null),D.state=null,0},Q.inflateGetHeader=function(D,ne){var S;return D&&D.state&&2&(S=D.state).wrap?(S.head=ne,ne.done=!1,0):k},Q.inflateSetDictionary=function(D,ne){var S,z=ne.length;return D&&D.state?(S=D.state).wrap!==0&&S.mode!==11?k:S.mode===11&&j(1,ne,z,0)!==S.check?-3:ce(D,ne,z,z)?(S.mode=31,-4):(S.havedict=1,0):k},Q.inflateInfo="pako inflate (from Nodeca project)"},6446:function(fe,Q,t){var T=t(9187),j=15,f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],v=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],k=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];fe.exports=function(g,a,P,R,K,U,m,G){var he,be,we,xe,ce,D,ne,S,z,A=G.bits,E=0,L=0,h=0,y=0,r=0,M=0,p=0,c=0,w=0,O=0,$=null,I=0,C=new T.Buf16(16),_=new T.Buf16(16),N=null,q=0;for(E=0;E<=j;E++)C[E]=0;for(L=0;L<R;L++)C[a[P+L]]++;for(r=A,y=j;y>=1&&C[y]===0;y--);if(r>y&&(r=y),y===0)return K[U++]=20971520,K[U++]=20971520,G.bits=1,0;for(h=1;h<y&&C[h]===0;h++);for(r<h&&(r=h),c=1,E=1;E<=j;E++)if(c<<=1,(c-=C[E])<0)return-1;if(c>0&&(g===0||y!==1))return-1;for(_[1]=0,E=1;E<j;E++)_[E+1]=_[E]+C[E];for(L=0;L<R;L++)a[P+L]!==0&&(m[_[a[P+L]]++]=L);if(g===0?($=N=m,D=19):g===1?($=f,I-=257,N=l,q-=257,D=256):($=v,N=k,D=-1),O=0,L=0,E=h,ce=U,M=r,p=0,we=-1,xe=(w=1<<r)-1,g===1&&w>852||g===2&&w>592)return 1;for(;;){ne=E-p,m[L]<D?(S=0,z=m[L]):m[L]>D?(S=N[q+m[L]],z=$[I+m[L]]):(S=96,z=0),he=1<<E-p,h=be=1<<M;do K[ce+(O>>p)+(be-=he)]=ne<<24|S<<16|z|0;while(be!==0);for(he=1<<E-1;O&he;)he>>=1;if(he!==0?(O&=he-1,O+=he):O=0,L++,--C[E]==0){if(E===y)break;E=a[P+m[L]]}if(E>r&&(O&xe)!==we){for(p===0&&(p=r),ce+=h,c=1<<(M=E-p);M+p<y&&!((c-=C[M+p])<=0);)M++,c<<=1;if(w+=1<<M,g===1&&w>852||g===2&&w>592)return 1;K[we=O&xe]=r<<24|M<<16|ce-U|0}}return O!==0&&(K[ce+O]=E-p<<24|4194304|0),G.bits=r,0}},5604:function(fe){fe.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},8676:function(fe,Q,t){var T=t(9187);function j(_){for(var N=_.length;--N>=0;)_[N]=0}var f=256,l=286,v=30,k=15,g=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],P=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],R=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],K=new Array(576);j(K);var U=new Array(60);j(U);var m=new Array(512);j(m);var G=new Array(256);j(G);var he=new Array(29);j(he);var be,we,xe,ce=new Array(v);function D(_,N,q,pe,te){this.static_tree=_,this.extra_bits=N,this.extra_base=q,this.elems=pe,this.max_length=te,this.has_stree=_&&_.length}function ne(_,N){this.dyn_tree=_,this.max_code=0,this.stat_desc=N}function S(_){return _<256?m[_]:m[256+(_>>>7)]}function z(_,N){_.pending_buf[_.pending++]=255&N,_.pending_buf[_.pending++]=N>>>8&255}function A(_,N,q){_.bi_valid>16-q?(_.bi_buf|=N<<_.bi_valid&65535,z(_,_.bi_buf),_.bi_buf=N>>16-_.bi_valid,_.bi_valid+=q-16):(_.bi_buf|=N<<_.bi_valid&65535,_.bi_valid+=q)}function E(_,N,q){A(_,q[2*N],q[2*N+1])}function L(_,N){var q=0;do q|=1&_,_>>>=1,q<<=1;while(--N>0);return q>>>1}function h(_,N,q){var pe,te,ve=new Array(16),ae=0;for(pe=1;pe<=k;pe++)ve[pe]=ae=ae+q[pe-1]<<1;for(te=0;te<=N;te++){var H=_[2*te+1];H!==0&&(_[2*te]=L(ve[H]++,H))}}function y(_){var N;for(N=0;N<l;N++)_.dyn_ltree[2*N]=0;for(N=0;N<v;N++)_.dyn_dtree[2*N]=0;for(N=0;N<19;N++)_.bl_tree[2*N]=0;_.dyn_ltree[512]=1,_.opt_len=_.static_len=0,_.last_lit=_.matches=0}function r(_){_.bi_valid>8?z(_,_.bi_buf):_.bi_valid>0&&(_.pending_buf[_.pending++]=_.bi_buf),_.bi_buf=0,_.bi_valid=0}function M(_,N,q,pe){var te=2*N,ve=2*q;return _[te]<_[ve]||_[te]===_[ve]&&pe[N]<=pe[q]}function p(_,N,q){for(var pe=_.heap[q],te=q<<1;te<=_.heap_len&&(te<_.heap_len&&M(N,_.heap[te+1],_.heap[te],_.depth)&&te++,!M(N,pe,_.heap[te],_.depth));)_.heap[q]=_.heap[te],q=te,te<<=1;_.heap[q]=pe}function c(_,N,q){var pe,te,ve,ae,H=0;if(_.last_lit!==0)do pe=_.pending_buf[_.d_buf+2*H]<<8|_.pending_buf[_.d_buf+2*H+1],te=_.pending_buf[_.l_buf+H],H++,pe===0?E(_,te,N):(E(_,(ve=G[te])+f+1,N),(ae=g[ve])!==0&&A(_,te-=he[ve],ae),E(_,ve=S(--pe),q),(ae=a[ve])!==0&&A(_,pe-=ce[ve],ae));while(H<_.last_lit);E(_,256,N)}function w(_,N){var q,pe,te,ve=N.dyn_tree,ae=N.stat_desc.static_tree,H=N.stat_desc.has_stree,le=N.stat_desc.elems,ke=-1;for(_.heap_len=0,_.heap_max=573,q=0;q<le;q++)ve[2*q]!==0?(_.heap[++_.heap_len]=ke=q,_.depth[q]=0):ve[2*q+1]=0;for(;_.heap_len<2;)ve[2*(te=_.heap[++_.heap_len]=ke<2?++ke:0)]=1,_.depth[te]=0,_.opt_len--,H&&(_.static_len-=ae[2*te+1]);for(N.max_code=ke,q=_.heap_len>>1;q>=1;q--)p(_,ve,q);te=le;do q=_.heap[1],_.heap[1]=_.heap[_.heap_len--],p(_,ve,1),pe=_.heap[1],_.heap[--_.heap_max]=q,_.heap[--_.heap_max]=pe,ve[2*te]=ve[2*q]+ve[2*pe],_.depth[te]=(_.depth[q]>=_.depth[pe]?_.depth[q]:_.depth[pe])+1,ve[2*q+1]=ve[2*pe+1]=te,_.heap[1]=te++,p(_,ve,1);while(_.heap_len>=2);_.heap[--_.heap_max]=_.heap[1],function(Le,Ge){var Ne,Ce,Oe,De,Ae,ie,Ie=Ge.dyn_tree,oe=Ge.max_code,s=Ge.stat_desc.static_tree,u=Ge.stat_desc.has_stree,x=Ge.stat_desc.extra_bits,V=Ge.stat_desc.extra_base,W=Ge.stat_desc.max_length,re=0;for(De=0;De<=k;De++)Le.bl_count[De]=0;for(Ie[2*Le.heap[Le.heap_max]+1]=0,Ne=Le.heap_max+1;Ne<573;Ne++)(De=Ie[2*Ie[2*(Ce=Le.heap[Ne])+1]+1]+1)>W&&(De=W,re++),Ie[2*Ce+1]=De,Ce>oe||(Le.bl_count[De]++,Ae=0,Ce>=V&&(Ae=x[Ce-V]),ie=Ie[2*Ce],Le.opt_len+=ie*(De+Ae),u&&(Le.static_len+=ie*(s[2*Ce+1]+Ae)));if(re!==0){do{for(De=W-1;Le.bl_count[De]===0;)De--;Le.bl_count[De]--,Le.bl_count[De+1]+=2,Le.bl_count[W]--,re-=2}while(re>0);for(De=W;De!==0;De--)for(Ce=Le.bl_count[De];Ce!==0;)(Oe=Le.heap[--Ne])>oe||(Ie[2*Oe+1]!==De&&(Le.opt_len+=(De-Ie[2*Oe+1])*Ie[2*Oe],Ie[2*Oe+1]=De),Ce--)}}(_,N),h(ve,ke,_.bl_count)}function O(_,N,q){var pe,te,ve=-1,ae=N[1],H=0,le=7,ke=4;for(ae===0&&(le=138,ke=3),N[2*(q+1)+1]=65535,pe=0;pe<=q;pe++)te=ae,ae=N[2*(pe+1)+1],++H<le&&te===ae||(H<ke?_.bl_tree[2*te]+=H:te!==0?(te!==ve&&_.bl_tree[2*te]++,_.bl_tree[32]++):H<=10?_.bl_tree[34]++:_.bl_tree[36]++,H=0,ve=te,ae===0?(le=138,ke=3):te===ae?(le=6,ke=3):(le=7,ke=4))}function $(_,N,q){var pe,te,ve=-1,ae=N[1],H=0,le=7,ke=4;for(ae===0&&(le=138,ke=3),pe=0;pe<=q;pe++)if(te=ae,ae=N[2*(pe+1)+1],!(++H<le&&te===ae)){if(H<ke)do E(_,te,_.bl_tree);while(--H!=0);else te!==0?(te!==ve&&(E(_,te,_.bl_tree),H--),E(_,16,_.bl_tree),A(_,H-3,2)):H<=10?(E(_,17,_.bl_tree),A(_,H-3,3)):(E(_,18,_.bl_tree),A(_,H-11,7));H=0,ve=te,ae===0?(le=138,ke=3):te===ae?(le=6,ke=3):(le=7,ke=4)}}j(ce);var I=!1;function C(_,N,q,pe){A(_,0+(pe?1:0),3),function(te,ve,ae,H){r(te),z(te,ae),z(te,~ae),T.arraySet(te.pending_buf,te.window,ve,ae,te.pending),te.pending+=ae}(_,N,q)}Q._tr_init=function(_){I||(function(){var N,q,pe,te,ve,ae=new Array(16);for(pe=0,te=0;te<28;te++)for(he[te]=pe,N=0;N<1<<g[te];N++)G[pe++]=te;for(G[pe-1]=te,ve=0,te=0;te<16;te++)for(ce[te]=ve,N=0;N<1<<a[te];N++)m[ve++]=te;for(ve>>=7;te<v;te++)for(ce[te]=ve<<7,N=0;N<1<<a[te]-7;N++)m[256+ve++]=te;for(q=0;q<=k;q++)ae[q]=0;for(N=0;N<=143;)K[2*N+1]=8,N++,ae[8]++;for(;N<=255;)K[2*N+1]=9,N++,ae[9]++;for(;N<=279;)K[2*N+1]=7,N++,ae[7]++;for(;N<=287;)K[2*N+1]=8,N++,ae[8]++;for(h(K,287,ae),N=0;N<v;N++)U[2*N+1]=5,U[2*N]=L(N,5);be=new D(K,g,257,l,k),we=new D(U,a,0,v,k),xe=new D(new Array(0),P,0,19,7)}(),I=!0),_.l_desc=new ne(_.dyn_ltree,be),_.d_desc=new ne(_.dyn_dtree,we),_.bl_desc=new ne(_.bl_tree,xe),_.bi_buf=0,_.bi_valid=0,y(_)},Q._tr_stored_block=C,Q._tr_flush_block=function(_,N,q,pe){var te,ve,ae=0;_.level>0?(_.strm.data_type===2&&(_.strm.data_type=function(H){var le,ke=4093624447;for(le=0;le<=31;le++,ke>>>=1)if(1&ke&&H.dyn_ltree[2*le]!==0)return 0;if(H.dyn_ltree[18]!==0||H.dyn_ltree[20]!==0||H.dyn_ltree[26]!==0)return 1;for(le=32;le<f;le++)if(H.dyn_ltree[2*le]!==0)return 1;return 0}(_)),w(_,_.l_desc),w(_,_.d_desc),ae=function(H){var le;for(O(H,H.dyn_ltree,H.l_desc.max_code),O(H,H.dyn_dtree,H.d_desc.max_code),w(H,H.bl_desc),le=18;le>=3&&H.bl_tree[2*R[le]+1]===0;le--);return H.opt_len+=3*(le+1)+5+5+4,le}(_),te=_.opt_len+3+7>>>3,(ve=_.static_len+3+7>>>3)<=te&&(te=ve)):te=ve=q+5,q+4<=te&&N!==-1?C(_,N,q,pe):_.strategy===4||ve===te?(A(_,2+(pe?1:0),3),c(_,K,U)):(A(_,4+(pe?1:0),3),function(H,le,ke,Le){var Ge;for(A(H,le-257,5),A(H,ke-1,5),A(H,Le-4,4),Ge=0;Ge<Le;Ge++)A(H,H.bl_tree[2*R[Ge]+1],3);$(H,H.dyn_ltree,le-1),$(H,H.dyn_dtree,ke-1)}(_,_.l_desc.max_code+1,_.d_desc.max_code+1,ae+1),c(_,_.dyn_ltree,_.dyn_dtree)),y(_),pe&&r(_)},Q._tr_tally=function(_,N,q){return _.pending_buf[_.d_buf+2*_.last_lit]=N>>>8&255,_.pending_buf[_.d_buf+2*_.last_lit+1]=255&N,_.pending_buf[_.l_buf+_.last_lit]=255&q,_.last_lit++,N===0?_.dyn_ltree[2*q]++:(_.matches++,N--,_.dyn_ltree[2*(G[q]+f+1)]++,_.dyn_dtree[2*S(N)]++),_.last_lit===_.lit_bufsize-1},Q._tr_align=function(_){A(_,2,3),E(_,256,K),function(N){N.bi_valid===16?(z(N,N.bi_buf),N.bi_buf=0,N.bi_valid=0):N.bi_valid>=8&&(N.pending_buf[N.pending++]=255&N.bi_buf,N.bi_buf>>=8,N.bi_valid-=8)}(_)}},249:function(fe){fe.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},9066:function(fe){fe.exports=function(Q){Q.data&&Q.name&&(Q=Q.data);for(var t=!0,T="",j="",f=0;f<Q.length;f++){var l=Q[f];if(t)l?j+=String.fromCharCode(l):t=!1;else{if(!l)throw new Error("Invalid NULL character found. 0x00 character is not permitted in tEXt content");T+=String.fromCharCode(l)}}return{keyword:j,text:T}}},9686:function(fe){fe.exports=function(Q,t){if(Q=String(Q),t=String(t),!/^[\x00-\xFF]+$/.test(Q)||!/^[\x00-\xFF]+$/.test(t))throw new Error("Only Latin-1 characters are permitted in PNG tEXt chunks. You might want to consider base64 encoding and/or zEXt compression");if(Q.length>=80)throw new Error('Keyword "'+Q+'" is longer than the 79-character limit imposed by the PNG specification');for(var T,j=Q.length+t.length+1,f=new Uint8Array(j),l=0,v=0;v<Q.length;v++){if(!(T=Q.charCodeAt(v)))throw new Error("0x00 character is not permitted in tEXt keywords");f[l++]=T}f[l++]=0;for(var k=0;k<t.length;k++){if(!(T=t.charCodeAt(k)))throw new Error("0x00 character is not permitted in tEXt content");f[l++]=T}return{name:"tEXt",data:f}}},1194:function(fe,Q,t){Q.encode=t(9686),Q.decode=t(9066)},3434:function(fe,Q,t){var T=t(5714),j=t(6233);fe.exports=function(k){var g,a=8,P=a;for(g=0;g<k.length;g++)a+=k[g].data.length,a+=12;var R=new Uint8Array(a);for(R[0]=137,R[1]=80,R[2]=78,R[3]=71,R[4]=13,R[5]=10,R[6]=26,R[7]=10,g=0;g<k.length;g++){var K=k[g],U=K.name,m=K.data,G=m.length,he=[U.charCodeAt(0),U.charCodeAt(1),U.charCodeAt(2),U.charCodeAt(3)];v[0]=G,R[P++]=f[3],R[P++]=f[2],R[P++]=f[1],R[P++]=f[0],R[P++]=he[0],R[P++]=he[1],R[P++]=he[2],R[P++]=he[3];for(var be=0;be<G;)R[P++]=m[be++];var we=he.concat(T(m)),xe=j.buf(we);l[0]=xe,R[P++]=f[3],R[P++]=f[2],R[P++]=f[1],R[P++]=f[0]}return R};var f=new Uint8Array(4),l=new Int32Array(f.buffer),v=new Uint32Array(f.buffer)},2983:function(fe,Q,t){var T=t(6233);fe.exports=function(v){if(v[0]!==137)throw new Error("Invalid .png file header");if(v[1]!==80)throw new Error("Invalid .png file header");if(v[2]!==78)throw new Error("Invalid .png file header");if(v[3]!==71)throw new Error("Invalid .png file header");if(v[4]!==13)throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(v[5]!==10)throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(v[6]!==26)throw new Error("Invalid .png file header");if(v[7]!==10)throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");for(var k=!1,g=[],a=8;a<v.length;){j[3]=v[a++],j[2]=v[a++],j[1]=v[a++],j[0]=v[a++];var P=l[0]+4,R=new Uint8Array(P);R[0]=v[a++],R[1]=v[a++],R[2]=v[a++],R[3]=v[a++];var K=String.fromCharCode(R[0])+String.fromCharCode(R[1])+String.fromCharCode(R[2])+String.fromCharCode(R[3]);if(!g.length&&K!=="IHDR")throw new Error("IHDR header missing");if(K==="IEND"){k=!0,g.push({name:K,data:new Uint8Array(0)});break}for(var U=4;U<P;U++)R[U]=v[a++];j[3]=v[a++],j[2]=v[a++],j[1]=v[a++],j[0]=v[a++];var m=f[0];if(T.buf(R)!==m)throw new Error("CRC values for "+K+" header do not match, PNG file is likely corrupted");var G=new Uint8Array(R.buffer.slice(4));g.push({name:K,data:G})}if(!k)throw new Error(".png file ended prematurely: no IEND header was found");return g};var j=new Uint8Array(4),f=new Int32Array(j.buffer),l=new Uint32Array(j.buffer)},1493:function(fe,Q,t){function T(a,P){return Math.pow(a[0]-P[0],2)+Math.pow(a[1]-P[1],2)}function j(a,P,R){const K=T(P,R);if(K===0)return T(a,P);let U=((a[0]-P[0])*(R[0]-P[0])+(a[1]-P[1])*(R[1]-P[1]))/K;return U=Math.max(0,Math.min(1,U)),T(a,f(P,R,U))}function f(a,P,R){return[a[0]+(P[0]-a[0])*R,a[1]+(P[1]-a[1])*R]}function l(a,P,R,K){const U=K||[];if(function(he,be){const we=he[be+0],xe=he[be+1],ce=he[be+2],D=he[be+3];let ne=3*xe[0]-2*we[0]-D[0];ne*=ne;let S=3*xe[1]-2*we[1]-D[1];S*=S;let z=3*ce[0]-2*D[0]-we[0];z*=z;let A=3*ce[1]-2*D[1]-we[1];return A*=A,ne<z&&(ne=z),S<A&&(S=A),ne+S}(a,P)<R){const he=a[P+0];U.length?(m=U[U.length-1],G=he,Math.sqrt(T(m,G))>1&&U.push(he)):U.push(he),U.push(a[P+3])}else{const be=a[P+0],we=a[P+1],xe=a[P+2],ce=a[P+3],D=f(be,we,.5),ne=f(we,xe,.5),S=f(xe,ce,.5),z=f(D,ne,.5),A=f(ne,S,.5),E=f(z,A,.5);l([be,D,z,E],0,R,U),l([E,A,S,ce],0,R,U)}var m,G;return U}function v(a,P){return k(a,0,a.length,P)}function k(a,P,R,K,U){const m=U||[],G=a[P],he=a[R-1];let be=0,we=1;for(let xe=P+1;xe<R-1;++xe){const ce=j(a[xe],G,he);ce>be&&(be=ce,we=xe)}return Math.sqrt(be)>K?(k(a,P,we+1,K,m),k(a,we,R,K,m)):(m.length||m.push(G),m.push(he)),m}function g(a,P=.15,R){const K=[],U=(a.length-1)/3;for(let m=0;m<U;m++)l(a,3*m,P,K);return R&&R>0?k(K,0,K.length,R):K}t.d(Q,{og:function(){return v},sU:function(){return g}})},6094:function(fe,Q,t){var T=t(9787),j=Symbol.for("react.element"),f=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,v=T.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,k={key:!0,ref:!0,__self:!0,__source:!0};function g(a,P,R){var K,U={},m=null,G=null;for(K in R!==void 0&&(m=""+R),P.key!==void 0&&(m=""+P.key),P.ref!==void 0&&(G=P.ref),P)l.call(P,K)&&!k.hasOwnProperty(K)&&(U[K]=P[K]);if(a&&a.defaultProps)for(K in P=a.defaultProps)U[K]===void 0&&(U[K]=P[K]);return{$$typeof:j,type:a,key:m,ref:G,props:U,_owner:v.current}}Q.Fragment=f,Q.jsx=g,Q.jsxs=g},4512:function(fe,Q,t){fe.exports=t(6094)},8128:function(fe,Q,t){function T(oe,s,u){if(oe&&oe.length){const[x,V]=s,W=Math.PI/180*u,re=Math.cos(W),ee=Math.sin(W);for(const se of oe){const[Ee,_e]=se;se[0]=(Ee-x)*re-(_e-V)*ee+x,se[1]=(Ee-x)*ee+(_e-V)*re+V}}}function j(oe,s){return oe[0]===s[0]&&oe[1]===s[1]}function f(oe,s,u,x=1){const V=u,W=Math.max(s,.1),re=oe[0]&&oe[0][0]&&typeof oe[0][0]=="number"?[oe]:oe,ee=[0,0];if(V)for(const Ee of re)T(Ee,ee,V);const se=function(Ee,_e,Ue){const We=[];for(const ge of Ee){const Se=[...ge];j(Se[0],Se[Se.length-1])||Se.push([Se[0][0],Se[0][1]]),Se.length>2&&We.push(Se)}const Ye=[];_e=Math.max(_e,.1);const Ze=[];for(const ge of We)for(let Se=0;Se<ge.length-1;Se++){const Be=ge[Se],Xe=ge[Se+1];if(Be[1]!==Xe[1]){const lt=Math.min(Be[1],Xe[1]);Ze.push({ymin:lt,ymax:Math.max(Be[1],Xe[1]),x:lt===Be[1]?Be[0]:Xe[0],islope:(Xe[0]-Be[0])/(Xe[1]-Be[1])})}}if(Ze.sort((ge,Se)=>ge.ymin<Se.ymin?-1:ge.ymin>Se.ymin?1:ge.x<Se.x?-1:ge.x>Se.x?1:ge.ymax===Se.ymax?0:(ge.ymax-Se.ymax)/Math.abs(ge.ymax-Se.ymax)),!Ze.length)return Ye;let Je=[],nt=Ze[0].ymin,dt=0;for(;Je.length||Ze.length;){if(Ze.length){let ge=-1;for(let Se=0;Se<Ze.length&&!(Ze[Se].ymin>nt);Se++)ge=Se;Ze.splice(0,ge+1).forEach(Se=>{Je.push({s:nt,edge:Se})})}if(Je=Je.filter(ge=>!(ge.edge.ymax<=nt)),Je.sort((ge,Se)=>ge.edge.x===Se.edge.x?0:(ge.edge.x-Se.edge.x)/Math.abs(ge.edge.x-Se.edge.x)),(Ue!==1||dt%_e==0)&&Je.length>1)for(let ge=0;ge<Je.length;ge+=2){const Se=ge+1;if(Se>=Je.length)break;const Be=Je[ge].edge,Xe=Je[Se].edge;Ye.push([[Math.round(Be.x),nt],[Math.round(Xe.x),nt]])}nt+=Ue,Je.forEach(ge=>{ge.edge.x=ge.edge.x+Ue*ge.edge.islope}),dt++}return Ye}(re,W,x);if(V){for(const Ee of re)T(Ee,ee,-V);(function(Ee,_e,Ue){const We=[];Ee.forEach(Ye=>We.push(...Ye)),T(We,_e,Ue)})(se,ee,-V)}return se}function l(oe,s){var u;const x=s.hachureAngle+90;let V=s.hachureGap;V<0&&(V=4*s.strokeWidth),V=Math.max(V,.1);let W=1;return s.roughness>=1&&(((u=s.randomizer)===null||u===void 0?void 0:u.next())||Math.random())>.7&&(W=V),f(oe,V,x,W||1)}t.d(Q,{V:function(){return Ie}});class v{constructor(s){this.helper=s}fillPolygons(s,u){return this._fillPolygons(s,u)}_fillPolygons(s,u){const x=l(s,u);return{type:"fillSketch",ops:this.renderLines(x,u)}}renderLines(s,u){const x=[];for(const V of s)x.push(...this.helper.doubleLineOps(V[0][0],V[0][1],V[1][0],V[1][1],u));return x}}function k(oe){const s=oe[0],u=oe[1];return Math.sqrt(Math.pow(s[0]-u[0],2)+Math.pow(s[1]-u[1],2))}class g extends v{fillPolygons(s,u){let x=u.hachureGap;x<0&&(x=4*u.strokeWidth),x=Math.max(x,.1);const V=l(s,Object.assign({},u,{hachureGap:x})),W=Math.PI/180*u.hachureAngle,re=[],ee=.5*x*Math.cos(W),se=.5*x*Math.sin(W);for(const[Ee,_e]of V)k([Ee,_e])&&re.push([[Ee[0]-ee,Ee[1]+se],[..._e]],[[Ee[0]+ee,Ee[1]-se],[..._e]]);return{type:"fillSketch",ops:this.renderLines(re,u)}}}class a extends v{fillPolygons(s,u){const x=this._fillPolygons(s,u),V=Object.assign({},u,{hachureAngle:u.hachureAngle+90}),W=this._fillPolygons(s,V);return x.ops=x.ops.concat(W.ops),x}}class P{constructor(s){this.helper=s}fillPolygons(s,u){const x=l(s,u=Object.assign({},u,{hachureAngle:0}));return this.dotsOnLines(x,u)}dotsOnLines(s,u){const x=[];let V=u.hachureGap;V<0&&(V=4*u.strokeWidth),V=Math.max(V,.1);let W=u.fillWeight;W<0&&(W=u.strokeWidth/2);const re=V/4;for(const ee of s){const se=k(ee),Ee=se/V,_e=Math.ceil(Ee)-1,Ue=se-_e*V,We=(ee[0][0]+ee[1][0])/2-V/4,Ye=Math.min(ee[0][1],ee[1][1]);for(let Ze=0;Ze<_e;Ze++){const Je=Ye+Ue+Ze*V,nt=We-re+2*Math.random()*re,dt=Je-re+2*Math.random()*re,ge=this.helper.ellipse(nt,dt,W,W,u);x.push(...ge.ops)}}return{type:"fillSketch",ops:x}}}class R{constructor(s){this.helper=s}fillPolygons(s,u){const x=l(s,u);return{type:"fillSketch",ops:this.dashedLine(x,u)}}dashedLine(s,u){const x=u.dashOffset<0?u.hachureGap<0?4*u.strokeWidth:u.hachureGap:u.dashOffset,V=u.dashGap<0?u.hachureGap<0?4*u.strokeWidth:u.hachureGap:u.dashGap,W=[];return s.forEach(re=>{const ee=k(re),se=Math.floor(ee/(x+V)),Ee=(ee+V-se*(x+V))/2;let _e=re[0],Ue=re[1];_e[0]>Ue[0]&&(_e=re[1],Ue=re[0]);const We=Math.atan((Ue[1]-_e[1])/(Ue[0]-_e[0]));for(let Ye=0;Ye<se;Ye++){const Ze=Ye*(x+V),Je=Ze+x,nt=[_e[0]+Ze*Math.cos(We)+Ee*Math.cos(We),_e[1]+Ze*Math.sin(We)+Ee*Math.sin(We)],dt=[_e[0]+Je*Math.cos(We)+Ee*Math.cos(We),_e[1]+Je*Math.sin(We)+Ee*Math.sin(We)];W.push(...this.helper.doubleLineOps(nt[0],nt[1],dt[0],dt[1],u))}}),W}}class K{constructor(s){this.helper=s}fillPolygons(s,u){const x=u.hachureGap<0?4*u.strokeWidth:u.hachureGap,V=u.zigzagOffset<0?x:u.zigzagOffset,W=l(s,u=Object.assign({},u,{hachureGap:x+V}));return{type:"fillSketch",ops:this.zigzagLines(W,V,u)}}zigzagLines(s,u,x){const V=[];return s.forEach(W=>{const re=k(W),ee=Math.round(re/(2*u));let se=W[0],Ee=W[1];se[0]>Ee[0]&&(se=W[1],Ee=W[0]);const _e=Math.atan((Ee[1]-se[1])/(Ee[0]-se[0]));for(let Ue=0;Ue<ee;Ue++){const We=2*Ue*u,Ye=2*(Ue+1)*u,Ze=Math.sqrt(2*Math.pow(u,2)),Je=[se[0]+We*Math.cos(_e),se[1]+We*Math.sin(_e)],nt=[se[0]+Ye*Math.cos(_e),se[1]+Ye*Math.sin(_e)],dt=[Je[0]+Ze*Math.cos(_e+Math.PI/4),Je[1]+Ze*Math.sin(_e+Math.PI/4)];V.push(...this.helper.doubleLineOps(Je[0],Je[1],dt[0],dt[1],x),...this.helper.doubleLineOps(dt[0],dt[1],nt[0],nt[1],x))}}),V}}const U={};var m=t(8152);const G={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function he(oe,s){return oe.type===s}function be(oe){const s=[],u=function(re){const ee=new Array;for(;re!=="";)if(re.match(/^([ \t\r\n,]+)/))re=re.substr(RegExp.$1.length);else if(re.match(/^([aAcChHlLmMqQsStTvVzZ])/))ee[ee.length]={type:0,text:RegExp.$1},re=re.substr(RegExp.$1.length);else{if(!re.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];ee[ee.length]={type:1,text:`${parseFloat(RegExp.$1)}`},re=re.substr(RegExp.$1.length)}return ee[ee.length]={type:2,text:""},ee}(oe);let x="BOD",V=0,W=u[V];for(;!he(W,2);){let re=0;const ee=[];if(x==="BOD"){if(W.text!=="M"&&W.text!=="m")return be("M0,0"+oe);V++,re=G[W.text],x=W.text}else he(W,1)?re=G[x]:(V++,re=G[W.text],x=W.text);if(!(V+re<u.length))throw new Error("Path data ended short");for(let se=V;se<V+re;se++){const Ee=u[se];if(!he(Ee,1))throw new Error("Param not a number: "+x+","+Ee.text);ee[ee.length]=+Ee.text}if(typeof G[x]!="number")throw new Error("Bad segment: "+x);{const se={key:x,data:ee};s.push(se),V+=re,W=u[V],x==="M"&&(x="L"),x==="m"&&(x="l")}}return s}function we(oe){let s=0,u=0,x=0,V=0;const W=[];for(const{key:re,data:ee}of oe)switch(re){case"M":W.push({key:"M",data:[...ee]}),[s,u]=ee,[x,V]=ee;break;case"m":s+=ee[0],u+=ee[1],W.push({key:"M",data:[s,u]}),x=s,V=u;break;case"L":W.push({key:"L",data:[...ee]}),[s,u]=ee;break;case"l":s+=ee[0],u+=ee[1],W.push({key:"L",data:[s,u]});break;case"C":W.push({key:"C",data:[...ee]}),s=ee[4],u=ee[5];break;case"c":{const se=ee.map((Ee,_e)=>_e%2?Ee+u:Ee+s);W.push({key:"C",data:se}),s=se[4],u=se[5];break}case"Q":W.push({key:"Q",data:[...ee]}),s=ee[2],u=ee[3];break;case"q":{const se=ee.map((Ee,_e)=>_e%2?Ee+u:Ee+s);W.push({key:"Q",data:se}),s=se[2],u=se[3];break}case"A":W.push({key:"A",data:[...ee]}),s=ee[5],u=ee[6];break;case"a":s+=ee[5],u+=ee[6],W.push({key:"A",data:[ee[0],ee[1],ee[2],ee[3],ee[4],s,u]});break;case"H":W.push({key:"H",data:[...ee]}),s=ee[0];break;case"h":s+=ee[0],W.push({key:"H",data:[s]});break;case"V":W.push({key:"V",data:[...ee]}),u=ee[0];break;case"v":u+=ee[0],W.push({key:"V",data:[u]});break;case"S":W.push({key:"S",data:[...ee]}),s=ee[2],u=ee[3];break;case"s":{const se=ee.map((Ee,_e)=>_e%2?Ee+u:Ee+s);W.push({key:"S",data:se}),s=se[2],u=se[3];break}case"T":W.push({key:"T",data:[...ee]}),s=ee[0],u=ee[1];break;case"t":s+=ee[0],u+=ee[1],W.push({key:"T",data:[s,u]});break;case"Z":case"z":W.push({key:"Z",data:[]}),s=x,u=V}return W}function xe(oe){const s=[];let u="",x=0,V=0,W=0,re=0,ee=0,se=0;for(const{key:Ee,data:_e}of oe){switch(Ee){case"M":s.push({key:"M",data:[..._e]}),[x,V]=_e,[W,re]=_e;break;case"C":s.push({key:"C",data:[..._e]}),x=_e[4],V=_e[5],ee=_e[2],se=_e[3];break;case"L":s.push({key:"L",data:[..._e]}),[x,V]=_e;break;case"H":x=_e[0],s.push({key:"L",data:[x,V]});break;case"V":V=_e[0],s.push({key:"L",data:[x,V]});break;case"S":{let Ue=0,We=0;u==="C"||u==="S"?(Ue=x+(x-ee),We=V+(V-se)):(Ue=x,We=V),s.push({key:"C",data:[Ue,We,..._e]}),ee=_e[0],se=_e[1],x=_e[2],V=_e[3];break}case"T":{const[Ue,We]=_e;let Ye=0,Ze=0;u==="Q"||u==="T"?(Ye=x+(x-ee),Ze=V+(V-se)):(Ye=x,Ze=V);const Je=x+2*(Ye-x)/3,nt=V+2*(Ze-V)/3,dt=Ue+2*(Ye-Ue)/3,ge=We+2*(Ze-We)/3;s.push({key:"C",data:[Je,nt,dt,ge,Ue,We]}),ee=Ye,se=Ze,x=Ue,V=We;break}case"Q":{const[Ue,We,Ye,Ze]=_e,Je=x+2*(Ue-x)/3,nt=V+2*(We-V)/3,dt=Ye+2*(Ue-Ye)/3,ge=Ze+2*(We-Ze)/3;s.push({key:"C",data:[Je,nt,dt,ge,Ye,Ze]}),ee=Ue,se=We,x=Ye,V=Ze;break}case"A":{const Ue=Math.abs(_e[0]),We=Math.abs(_e[1]),Ye=_e[2],Ze=_e[3],Je=_e[4],nt=_e[5],dt=_e[6];Ue===0||We===0?(s.push({key:"C",data:[x,V,nt,dt,nt,dt]}),x=nt,V=dt):(x!==nt||V!==dt)&&(D(x,V,nt,dt,Ue,We,Ye,Ze,Je).forEach(function(ge){s.push({key:"C",data:ge})}),x=nt,V=dt);break}case"Z":s.push({key:"Z",data:[]}),x=W,V=re}u=Ee}return s}function ce(oe,s,u){return[oe*Math.cos(u)-s*Math.sin(u),oe*Math.sin(u)+s*Math.cos(u)]}function D(oe,s,u,x,V,W,re,ee,se,Ee){const _e=(Ue=re,Math.PI*Ue/180);var Ue;let We=[],Ye=0,Ze=0,Je=0,nt=0;if(Ee)[Ye,Ze,Je,nt]=Ee;else{[oe,s]=ce(oe,s,-_e),[u,x]=ce(u,x,-_e);const Zt=(oe-u)/2,Pt=(s-x)/2;let en=Zt*Zt/(V*V)+Pt*Pt/(W*W);en>1&&(en=Math.sqrt(en),V*=en,W*=en);const tn=V*V,ot=W*W,It=tn*ot-tn*Pt*Pt-ot*Zt*Zt,mt=tn*Pt*Pt+ot*Zt*Zt,jt=(ee===se?-1:1)*Math.sqrt(Math.abs(It/mt));Je=jt*V*Pt/W+(oe+u)/2,nt=jt*-W*Zt/V+(s+x)/2,Ye=Math.asin(parseFloat(((s-nt)/W).toFixed(9))),Ze=Math.asin(parseFloat(((x-nt)/W).toFixed(9))),oe<Je&&(Ye=Math.PI-Ye),u<Je&&(Ze=Math.PI-Ze),Ye<0&&(Ye=2*Math.PI+Ye),Ze<0&&(Ze=2*Math.PI+Ze),se&&Ye>Ze&&(Ye-=2*Math.PI),!se&&Ze>Ye&&(Ze-=2*Math.PI)}let dt=Ze-Ye;if(Math.abs(dt)>120*Math.PI/180){const Zt=Ze,Pt=u,en=x;Ze=se&&Ze>Ye?Ye+120*Math.PI/180*1:Ye+120*Math.PI/180*-1,We=D(u=Je+V*Math.cos(Ze),x=nt+W*Math.sin(Ze),Pt,en,V,W,re,0,se,[Ze,Zt,Je,nt])}dt=Ze-Ye;const ge=Math.cos(Ye),Se=Math.sin(Ye),Be=Math.cos(Ze),Xe=Math.sin(Ze),lt=Math.tan(dt/4),it=4/3*V*lt,yt=4/3*W*lt,_t=[oe,s],ut=[oe+it*Se,s-yt*ge],Tt=[u+it*Xe,x-yt*Be],Yt=[u,x];if(ut[0]=2*_t[0]-ut[0],ut[1]=2*_t[1]-ut[1],Ee)return[ut,Tt,Yt].concat(We);{We=[ut,Tt,Yt].concat(We);const Zt=[];for(let Pt=0;Pt<We.length;Pt+=3){const en=ce(We[Pt][0],We[Pt][1],_e),tn=ce(We[Pt+1][0],We[Pt+1][1],_e),ot=ce(We[Pt+2][0],We[Pt+2][1],_e);Zt.push([en[0],en[1],tn[0],tn[1],ot[0],ot[1]])}return Zt}}const ne={randOffset:function(oe,s){return O(oe,s)},randOffsetWithRange:function(oe,s,u){return w(oe,s,u)},ellipse:function(oe,s,u,x,V){const W=L(u,x,V);return h(oe,s,V,W).opset},doubleLineOps:function(oe,s,u,x,V){return $(oe,s,u,x,V,!0)}};function S(oe,s,u,x,V){return{type:"path",ops:$(oe,s,u,x,V)}}function z(oe,s,u){const x=(oe||[]).length;if(x>2){const V=[];for(let W=0;W<x-1;W++)V.push(...$(oe[W][0],oe[W][1],oe[W+1][0],oe[W+1][1],u));return s&&V.push(...$(oe[x-1][0],oe[x-1][1],oe[0][0],oe[0][1],u)),{type:"path",ops:V}}return x===2?S(oe[0][0],oe[0][1],oe[1][0],oe[1][1],u):{type:"path",ops:[]}}function A(oe,s,u,x,V){return function(W,re){return z(W,!0,re)}([[oe,s],[oe+u,s],[oe+u,s+x],[oe,s+x]],V)}function E(oe,s){let u=C(oe,1*(1+.2*s.roughness),s);if(!s.disableMultiStroke){const x=C(oe,1.5*(1+.22*s.roughness),function(V){const W=Object.assign({},V);return W.randomizer=void 0,V.seed&&(W.seed=V.seed+1),W}(s));u=u.concat(x)}return{type:"path",ops:u}}function L(oe,s,u){const x=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(oe/2,2)+Math.pow(s/2,2))/2)),V=Math.ceil(Math.max(u.curveStepCount,u.curveStepCount/Math.sqrt(200)*x)),W=2*Math.PI/V;let re=Math.abs(oe/2),ee=Math.abs(s/2);const se=1-u.curveFitting;return re+=O(re*se,u),ee+=O(ee*se,u),{increment:W,rx:re,ry:ee}}function h(oe,s,u,x){const[V,W]=N(x.increment,oe,s,x.rx,x.ry,1,x.increment*w(.1,w(.4,1,u),u),u);let re=_(V,null,u);if(!u.disableMultiStroke&&u.roughness!==0){const[ee]=N(x.increment,oe,s,x.rx,x.ry,1.5,0,u),se=_(ee,null,u);re=re.concat(se)}return{estimatedPoints:W,opset:{type:"path",ops:re}}}function y(oe,s,u,x,V,W,re,ee,se){const Ee=oe,_e=s;let Ue=Math.abs(u/2),We=Math.abs(x/2);Ue+=O(.01*Ue,se),We+=O(.01*We,se);let Ye=V,Ze=W;for(;Ye<0;)Ye+=2*Math.PI,Ze+=2*Math.PI;Ze-Ye>2*Math.PI&&(Ye=0,Ze=2*Math.PI);const Je=2*Math.PI/se.curveStepCount,nt=Math.min(Je/2,(Ze-Ye)/2),dt=q(nt,Ee,_e,Ue,We,Ye,Ze,1,se);if(!se.disableMultiStroke){const ge=q(nt,Ee,_e,Ue,We,Ye,Ze,1.5,se);dt.push(...ge)}return re&&(ee?dt.push(...$(Ee,_e,Ee+Ue*Math.cos(Ye),_e+We*Math.sin(Ye),se),...$(Ee,_e,Ee+Ue*Math.cos(Ze),_e+We*Math.sin(Ze),se)):dt.push({op:"lineTo",data:[Ee,_e]},{op:"lineTo",data:[Ee+Ue*Math.cos(Ye),_e+We*Math.sin(Ye)]})),{type:"path",ops:dt}}function r(oe,s){const u=xe(we(be(oe))),x=[];let V=[0,0],W=[0,0];for(const{key:re,data:ee}of u)switch(re){case"M":W=[ee[0],ee[1]],V=[ee[0],ee[1]];break;case"L":x.push(...$(W[0],W[1],ee[0],ee[1],s)),W=[ee[0],ee[1]];break;case"C":{const[se,Ee,_e,Ue,We,Ye]=ee;x.push(...pe(se,Ee,_e,Ue,We,Ye,W,s)),W=[We,Ye];break}case"Z":x.push(...$(W[0],W[1],V[0],V[1],s)),W=[V[0],V[1]]}return{type:"path",ops:x}}function M(oe,s){const u=[];for(const x of oe)if(x.length){const V=s.maxRandomnessOffset||0,W=x.length;if(W>2){u.push({op:"move",data:[x[0][0]+O(V,s),x[0][1]+O(V,s)]});for(let re=1;re<W;re++)u.push({op:"lineTo",data:[x[re][0]+O(V,s),x[re][1]+O(V,s)]})}}return{type:"fillPath",ops:u}}function p(oe,s){return function(u,x){let V=u.fillStyle||"hachure";if(!U[V])switch(V){case"zigzag":U[V]||(U[V]=new g(x));break;case"cross-hatch":U[V]||(U[V]=new a(x));break;case"dots":U[V]||(U[V]=new P(x));break;case"dashed":U[V]||(U[V]=new R(x));break;case"zigzag-line":U[V]||(U[V]=new K(x));break;default:V="hachure",U[V]||(U[V]=new v(x))}return U[V]}(s,ne).fillPolygons(oe,s)}function c(oe){return oe.randomizer||(oe.randomizer=new m.k(oe.seed||0)),oe.randomizer.next()}function w(oe,s,u,x=1){return u.roughness*x*(c(u)*(s-oe)+oe)}function O(oe,s,u=1){return w(-oe,oe,s,u)}function $(oe,s,u,x,V,W=!1){const re=W?V.disableMultiStrokeFill:V.disableMultiStroke,ee=I(oe,s,u,x,V,!0,!1);if(re)return ee;const se=I(oe,s,u,x,V,!0,!0);return ee.concat(se)}function I(oe,s,u,x,V,W,re){const ee=Math.pow(oe-u,2)+Math.pow(s-x,2),se=Math.sqrt(ee);let Ee=1;Ee=se<200?1:se>500?.4:-.0016668*se+1.233334;let _e=V.maxRandomnessOffset||0;_e*_e*100>ee&&(_e=se/10);const Ue=_e/2,We=.2+.2*c(V);let Ye=V.bowing*V.maxRandomnessOffset*(x-s)/200,Ze=V.bowing*V.maxRandomnessOffset*(oe-u)/200;Ye=O(Ye,V,Ee),Ze=O(Ze,V,Ee);const Je=[],nt=()=>O(Ue,V,Ee),dt=()=>O(_e,V,Ee),ge=V.preserveVertices;return re?Je.push({op:"move",data:[oe+(ge?0:nt()),s+(ge?0:nt())]}):Je.push({op:"move",data:[oe+(ge?0:O(_e,V,Ee)),s+(ge?0:O(_e,V,Ee))]}),re?Je.push({op:"bcurveTo",data:[Ye+oe+(u-oe)*We+nt(),Ze+s+(x-s)*We+nt(),Ye+oe+2*(u-oe)*We+nt(),Ze+s+2*(x-s)*We+nt(),u+(ge?0:nt()),x+(ge?0:nt())]}):Je.push({op:"bcurveTo",data:[Ye+oe+(u-oe)*We+dt(),Ze+s+(x-s)*We+dt(),Ye+oe+2*(u-oe)*We+dt(),Ze+s+2*(x-s)*We+dt(),u+(ge?0:dt()),x+(ge?0:dt())]}),Je}function C(oe,s,u){const x=[];x.push([oe[0][0]+O(s,u),oe[0][1]+O(s,u)]),x.push([oe[0][0]+O(s,u),oe[0][1]+O(s,u)]);for(let V=1;V<oe.length;V++)x.push([oe[V][0]+O(s,u),oe[V][1]+O(s,u)]),V===oe.length-1&&x.push([oe[V][0]+O(s,u),oe[V][1]+O(s,u)]);return _(x,null,u)}function _(oe,s,u){const x=oe.length,V=[];if(x>3){const W=[],re=1-u.curveTightness;V.push({op:"move",data:[oe[1][0],oe[1][1]]});for(let ee=1;ee+2<x;ee++){const se=oe[ee];W[0]=[se[0],se[1]],W[1]=[se[0]+(re*oe[ee+1][0]-re*oe[ee-1][0])/6,se[1]+(re*oe[ee+1][1]-re*oe[ee-1][1])/6],W[2]=[oe[ee+1][0]+(re*oe[ee][0]-re*oe[ee+2][0])/6,oe[ee+1][1]+(re*oe[ee][1]-re*oe[ee+2][1])/6],W[3]=[oe[ee+1][0],oe[ee+1][1]],V.push({op:"bcurveTo",data:[W[1][0],W[1][1],W[2][0],W[2][1],W[3][0],W[3][1]]})}}else x===3?(V.push({op:"move",data:[oe[1][0],oe[1][1]]}),V.push({op:"bcurveTo",data:[oe[1][0],oe[1][1],oe[2][0],oe[2][1],oe[2][0],oe[2][1]]})):x===2&&V.push(...$(oe[0][0],oe[0][1],oe[1][0],oe[1][1],u));return V}function N(oe,s,u,x,V,W,re,ee){const se=[],Ee=[];if(ee.roughness===0){oe/=4,Ee.push([s+x*Math.cos(-oe),u+V*Math.sin(-oe)]);for(let _e=0;_e<=2*Math.PI;_e+=oe){const Ue=[s+x*Math.cos(_e),u+V*Math.sin(_e)];se.push(Ue),Ee.push(Ue)}Ee.push([s+x*Math.cos(0),u+V*Math.sin(0)]),Ee.push([s+x*Math.cos(oe),u+V*Math.sin(oe)])}else{const _e=O(.5,ee)-Math.PI/2;Ee.push([O(W,ee)+s+.9*x*Math.cos(_e-oe),O(W,ee)+u+.9*V*Math.sin(_e-oe)]);const Ue=2*Math.PI+_e-.01;for(let We=_e;We<Ue;We+=oe){const Ye=[O(W,ee)+s+x*Math.cos(We),O(W,ee)+u+V*Math.sin(We)];se.push(Ye),Ee.push(Ye)}Ee.push([O(W,ee)+s+x*Math.cos(_e+2*Math.PI+.5*re),O(W,ee)+u+V*Math.sin(_e+2*Math.PI+.5*re)]),Ee.push([O(W,ee)+s+.98*x*Math.cos(_e+re),O(W,ee)+u+.98*V*Math.sin(_e+re)]),Ee.push([O(W,ee)+s+.9*x*Math.cos(_e+.5*re),O(W,ee)+u+.9*V*Math.sin(_e+.5*re)])}return[Ee,se]}function q(oe,s,u,x,V,W,re,ee,se){const Ee=W+O(.1,se),_e=[];_e.push([O(ee,se)+s+.9*x*Math.cos(Ee-oe),O(ee,se)+u+.9*V*Math.sin(Ee-oe)]);for(let Ue=Ee;Ue<=re;Ue+=oe)_e.push([O(ee,se)+s+x*Math.cos(Ue),O(ee,se)+u+V*Math.sin(Ue)]);return _e.push([s+x*Math.cos(re),u+V*Math.sin(re)]),_e.push([s+x*Math.cos(re),u+V*Math.sin(re)]),_(_e,null,se)}function pe(oe,s,u,x,V,W,re,ee){const se=[],Ee=[ee.maxRandomnessOffset||1,(ee.maxRandomnessOffset||1)+.3];let _e=[0,0];const Ue=ee.disableMultiStroke?1:2,We=ee.preserveVertices;for(let Ye=0;Ye<Ue;Ye++)Ye===0?se.push({op:"move",data:[re[0],re[1]]}):se.push({op:"move",data:[re[0]+(We?0:O(Ee[0],ee)),re[1]+(We?0:O(Ee[0],ee))]}),_e=We?[V,W]:[V+O(Ee[Ye],ee),W+O(Ee[Ye],ee)],se.push({op:"bcurveTo",data:[oe+O(Ee[Ye],ee),s+O(Ee[Ye],ee),u+O(Ee[Ye],ee),x+O(Ee[Ye],ee),_e[0],_e[1]]});return se}function te(oe){return[...oe]}function ve(oe,s){return Math.pow(oe[0]-s[0],2)+Math.pow(oe[1]-s[1],2)}function ae(oe,s,u){const x=ve(s,u);if(x===0)return ve(oe,s);let V=((oe[0]-s[0])*(u[0]-s[0])+(oe[1]-s[1])*(u[1]-s[1]))/x;return V=Math.max(0,Math.min(1,V)),ve(oe,H(s,u,V))}function H(oe,s,u){return[oe[0]+(s[0]-oe[0])*u,oe[1]+(s[1]-oe[1])*u]}function le(oe,s,u,x){const V=x||[];if(function(ee,se){const Ee=ee[se+0],_e=ee[se+1],Ue=ee[se+2],We=ee[se+3];let Ye=3*_e[0]-2*Ee[0]-We[0];Ye*=Ye;let Ze=3*_e[1]-2*Ee[1]-We[1];Ze*=Ze;let Je=3*Ue[0]-2*We[0]-Ee[0];Je*=Je;let nt=3*Ue[1]-2*We[1]-Ee[1];return nt*=nt,Ye<Je&&(Ye=Je),Ze<nt&&(Ze=nt),Ye+Ze}(oe,s)<u){const ee=oe[s+0];V.length?(W=V[V.length-1],re=ee,Math.sqrt(ve(W,re))>1&&V.push(ee)):V.push(ee),V.push(oe[s+3])}else{const se=oe[s+0],Ee=oe[s+1],_e=oe[s+2],Ue=oe[s+3],We=H(se,Ee,.5),Ye=H(Ee,_e,.5),Ze=H(_e,Ue,.5),Je=H(We,Ye,.5),nt=H(Ye,Ze,.5),dt=H(Je,nt,.5);le([se,We,Je,dt],0,u,V),le([dt,nt,Ze,Ue],0,u,V)}var W,re;return V}function ke(oe,s,u,x,V){const W=V||[],re=oe[s],ee=oe[u-1];let se=0,Ee=1;for(let _e=s+1;_e<u-1;++_e){const Ue=ae(oe[_e],re,ee);Ue>se&&(se=Ue,Ee=_e)}return Math.sqrt(se)>x?(ke(oe,s,Ee+1,x,W),ke(oe,Ee,u,x,W)):(W.length||W.push(re),W.push(ee)),W}function Le(oe,s){return Math.pow(oe[0]-s[0],2)+Math.pow(oe[1]-s[1],2)}function Ge(oe,s,u){const x=Le(s,u);if(x===0)return Le(oe,s);let V=((oe[0]-s[0])*(u[0]-s[0])+(oe[1]-s[1])*(u[1]-s[1]))/x;return V=Math.max(0,Math.min(1,V)),Le(oe,Ne(s,u,V))}function Ne(oe,s,u){return[oe[0]+(s[0]-oe[0])*u,oe[1]+(s[1]-oe[1])*u]}function Ce(oe,s,u,x){const V=x||[];if(function(ee,se){const Ee=ee[se+0],_e=ee[se+1],Ue=ee[se+2],We=ee[se+3];let Ye=3*_e[0]-2*Ee[0]-We[0];Ye*=Ye;let Ze=3*_e[1]-2*Ee[1]-We[1];Ze*=Ze;let Je=3*Ue[0]-2*We[0]-Ee[0];Je*=Je;let nt=3*Ue[1]-2*We[1]-Ee[1];return nt*=nt,Ye<Je&&(Ye=Je),Ze<nt&&(Ze=nt),Ye+Ze}(oe,s)<u){const ee=oe[s+0];V.length?(W=V[V.length-1],re=ee,Math.sqrt(Le(W,re))>1&&V.push(ee)):V.push(ee),V.push(oe[s+3])}else{const se=oe[s+0],Ee=oe[s+1],_e=oe[s+2],Ue=oe[s+3],We=Ne(se,Ee,.5),Ye=Ne(Ee,_e,.5),Ze=Ne(_e,Ue,.5),Je=Ne(We,Ye,.5),nt=Ne(Ye,Ze,.5),dt=Ne(Je,nt,.5);Ce([se,We,Je,dt],0,u,V),Ce([dt,nt,Ze,Ue],0,u,V)}var W,re;return V}function Oe(oe,s){return De(oe,0,oe.length,s)}function De(oe,s,u,x,V){const W=V||[],re=oe[s],ee=oe[u-1];let se=0,Ee=1;for(let _e=s+1;_e<u-1;++_e){const Ue=Ge(oe[_e],re,ee);Ue>se&&(se=Ue,Ee=_e)}return Math.sqrt(se)>x?(De(oe,s,Ee+1,x,W),De(oe,Ee,u,x,W)):(W.length||W.push(re),W.push(ee)),W}function Ae(oe,s,u){const x=xe(we(be(oe))),V=[];let W=[],re=[0,0],ee=[];const se=()=>{ee.length>=4&&W.push(...function(Ue,We=.15,Ye){const Ze=[],Je=(Ue.length-1)/3;for(let nt=0;nt<Je;nt++)Ce(Ue,3*nt,We,Ze);return Ye&&Ye>0?De(Ze,0,Ze.length,Ye):Ze}(ee,s)),ee=[]},Ee=()=>{se(),W.length&&(V.push(W),W=[])};for(const{key:Ue,data:We}of x)switch(Ue){case"M":Ee(),re=[We[0],We[1]],W.push(re);break;case"L":se(),W.push([We[0],We[1]]);break;case"C":if(!ee.length){const Ye=W.length?W[W.length-1]:re;ee.push([Ye[0],Ye[1]])}ee.push([We[0],We[1]]),ee.push([We[2],We[3]]),ee.push([We[4],We[5]]);break;case"Z":se(),W.push([re[0],re[1]])}if(Ee(),!u)return V;const _e=[];for(const Ue of V){const We=Oe(Ue,u);We.length&&_e.push(We)}return _e}const ie="none";class Ie{constructor(s){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=s||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return(0,m.W)()}_o(s){return s?Object.assign({},this.defaultOptions,s):this.defaultOptions}_d(s,u,x){return{shape:s,sets:u||[],options:x||this.defaultOptions}}line(s,u,x,V,W){const re=this._o(W);return this._d("line",[S(s,u,x,V,re)],re)}rectangle(s,u,x,V,W){const re=this._o(W),ee=[],se=A(s,u,x,V,re);if(re.fill){const Ee=[[s,u],[s+x,u],[s+x,u+V],[s,u+V]];re.fillStyle==="solid"?ee.push(M([Ee],re)):ee.push(p([Ee],re))}return re.stroke!==ie&&ee.push(se),this._d("rectangle",ee,re)}ellipse(s,u,x,V,W){const re=this._o(W),ee=[],se=L(x,V,re),Ee=h(s,u,re,se);if(re.fill)if(re.fillStyle==="solid"){const _e=h(s,u,re,se).opset;_e.type="fillPath",ee.push(_e)}else ee.push(p([Ee.estimatedPoints],re));return re.stroke!==ie&&ee.push(Ee.opset),this._d("ellipse",ee,re)}circle(s,u,x,V){const W=this.ellipse(s,u,x,x,V);return W.shape="circle",W}linearPath(s,u){const x=this._o(u);return this._d("linearPath",[z(s,!1,x)],x)}arc(s,u,x,V,W,re,ee=!1,se){const Ee=this._o(se),_e=[],Ue=y(s,u,x,V,W,re,ee,!0,Ee);if(ee&&Ee.fill)if(Ee.fillStyle==="solid"){const We=Object.assign({},Ee);We.disableMultiStroke=!0;const Ye=y(s,u,x,V,W,re,!0,!1,We);Ye.type="fillPath",_e.push(Ye)}else _e.push(function(We,Ye,Ze,Je,nt,dt,ge){const Se=We,Be=Ye;let Xe=Math.abs(Ze/2),lt=Math.abs(Je/2);Xe+=O(.01*Xe,ge),lt+=O(.01*lt,ge);let it=nt,yt=dt;for(;it<0;)it+=2*Math.PI,yt+=2*Math.PI;yt-it>2*Math.PI&&(it=0,yt=2*Math.PI);const _t=(yt-it)/ge.curveStepCount,ut=[];for(let Tt=it;Tt<=yt;Tt+=_t)ut.push([Se+Xe*Math.cos(Tt),Be+lt*Math.sin(Tt)]);return ut.push([Se+Xe*Math.cos(yt),Be+lt*Math.sin(yt)]),ut.push([Se,Be]),p([ut],ge)}(s,u,x,V,W,re,Ee));return Ee.stroke!==ie&&_e.push(Ue),this._d("arc",_e,Ee)}curve(s,u){const x=this._o(u),V=[],W=E(s,x);if(x.fill&&x.fill!==ie&&s.length>=3)if(x.fillStyle==="solid"){const re=E(s,Object.assign(Object.assign({},x),{disableMultiStroke:!0,roughness:x.roughness?x.roughness+x.fillShapeRoughnessGain:0}));V.push({type:"fillPath",ops:this._mergedShape(re.ops)})}else{const re=function(se,Ee=0){const _e=se.length;if(_e<3)throw new Error("A curve must have at least three points.");const Ue=[];if(_e===3)Ue.push(te(se[0]),te(se[1]),te(se[2]),te(se[2]));else{const We=[];We.push(se[0],se[0]);for(let Je=1;Je<se.length;Je++)We.push(se[Je]),Je===se.length-1&&We.push(se[Je]);const Ye=[],Ze=1-Ee;Ue.push(te(We[0]));for(let Je=1;Je+2<We.length;Je++){const nt=We[Je];Ye[0]=[nt[0],nt[1]],Ye[1]=[nt[0]+(Ze*We[Je+1][0]-Ze*We[Je-1][0])/6,nt[1]+(Ze*We[Je+1][1]-Ze*We[Je-1][1])/6],Ye[2]=[We[Je+1][0]+(Ze*We[Je][0]-Ze*We[Je+2][0])/6,We[Je+1][1]+(Ze*We[Je][1]-Ze*We[Je+2][1])/6],Ye[3]=[We[Je+1][0],We[Je+1][1]],Ue.push(Ye[1],Ye[2],Ye[3])}}return Ue}(s),ee=function(se,Ee=.15,_e){const Ue=[],We=(se.length-1)/3;for(let Ye=0;Ye<We;Ye++)le(se,3*Ye,Ee,Ue);return _e&&_e>0?ke(Ue,0,Ue.length,_e):Ue}(re,10,(1+x.roughness)/2);V.push(p([ee],x))}return x.stroke!==ie&&V.push(W),this._d("curve",V,x)}polygon(s,u){const x=this._o(u),V=[],W=z(s,!0,x);return x.fill&&(x.fillStyle==="solid"?V.push(M([s],x)):V.push(p([s],x))),x.stroke!==ie&&V.push(W),this._d("polygon",V,x)}path(s,u){const x=this._o(u),V=[];if(!s)return this._d("path",V,x);s=(s||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const W=x.fill&&x.fill!=="transparent"&&x.fill!==ie,re=x.stroke!==ie,ee=!!(x.simplification&&x.simplification<1),se=Ae(s,1,ee?4-4*(x.simplification||1):(1+x.roughness)/2),Ee=r(s,x);if(W)if(x.fillStyle==="solid")if(se.length===1){const _e=r(s,Object.assign(Object.assign({},x),{disableMultiStroke:!0,roughness:x.roughness?x.roughness+x.fillShapeRoughnessGain:0}));V.push({type:"fillPath",ops:this._mergedShape(_e.ops)})}else V.push(M(se,x));else V.push(p(se,x));return re&&(ee?se.forEach(_e=>{V.push(z(_e,!1,x))}):V.push(Ee)),this._d("path",V,x)}opsToPath(s,u){let x="";for(const V of s.ops){const W=typeof u=="number"&&u>=0?V.data.map(re=>+re.toFixed(u)):V.data;switch(V.op){case"move":x+=`M${W[0]} ${W[1]} `;break;case"bcurveTo":x+=`C${W[0]} ${W[1]}, ${W[2]} ${W[3]}, ${W[4]} ${W[5]} `;break;case"lineTo":x+=`L${W[0]} ${W[1]} `}}return x.trim()}toPaths(s){const u=s.sets||[],x=s.options||this.defaultOptions,V=[];for(const W of u){let re=null;switch(W.type){case"path":re={d:this.opsToPath(W),stroke:x.stroke,strokeWidth:x.strokeWidth,fill:ie};break;case"fillPath":re={d:this.opsToPath(W),stroke:ie,strokeWidth:0,fill:x.fill||ie};break;case"fillSketch":re=this.fillSketch(W,x)}re&&V.push(re)}return V}fillSketch(s,u){let x=u.fillWeight;return x<0&&(x=u.strokeWidth/2),{d:this.opsToPath(s),stroke:u.fill||ie,strokeWidth:x,fill:ie}}_mergedShape(s){return s.filter((u,x)=>x===0||u.op!=="move")}}},8152:function(fe,Q,t){function T(){return Math.floor(Math.random()*2147483648)}t.d(Q,{W:function(){return T},k:function(){return j}});class j{constructor(l){this.seed=l}next(){return this.seed?(2147483647&(this.seed=Math.imul(48271,this.seed)))/2147483648:Math.random()}}},9845:function(fe,Q,t){t.d(Q,{Z:function(){return v}});var T=t(8128);class j{constructor(g,a){this.canvas=g,this.ctx=this.canvas.getContext("2d"),this.gen=new T.V(a)}draw(g){const a=g.sets||[],P=g.options||this.getDefaultOptions(),R=this.ctx,K=g.options.fixedDecimalPlaceDigits;for(const U of a)switch(U.type){case"path":R.save(),R.strokeStyle=P.stroke==="none"?"transparent":P.stroke,R.lineWidth=P.strokeWidth,P.strokeLineDash&&R.setLineDash(P.strokeLineDash),P.strokeLineDashOffset&&(R.lineDashOffset=P.strokeLineDashOffset),this._drawToContext(R,U,K),R.restore();break;case"fillPath":{R.save(),R.fillStyle=P.fill||"";const m=g.shape==="curve"||g.shape==="polygon"||g.shape==="path"?"evenodd":"nonzero";this._drawToContext(R,U,K,m),R.restore();break}case"fillSketch":this.fillSketch(R,U,P)}}fillSketch(g,a,P){let R=P.fillWeight;R<0&&(R=P.strokeWidth/2),g.save(),P.fillLineDash&&g.setLineDash(P.fillLineDash),P.fillLineDashOffset&&(g.lineDashOffset=P.fillLineDashOffset),g.strokeStyle=P.fill||"",g.lineWidth=R,this._drawToContext(g,a,P.fixedDecimalPlaceDigits),g.restore()}_drawToContext(g,a,P,R="nonzero"){g.beginPath();for(const K of a.ops){const U=typeof P=="number"&&P>=0?K.data.map(m=>+m.toFixed(P)):K.data;switch(K.op){case"move":g.moveTo(U[0],U[1]);break;case"bcurveTo":g.bezierCurveTo(U[0],U[1],U[2],U[3],U[4],U[5]);break;case"lineTo":g.lineTo(U[0],U[1])}}a.type==="fillPath"?g.fill(R):g.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(g,a,P,R,K){const U=this.gen.line(g,a,P,R,K);return this.draw(U),U}rectangle(g,a,P,R,K){const U=this.gen.rectangle(g,a,P,R,K);return this.draw(U),U}ellipse(g,a,P,R,K){const U=this.gen.ellipse(g,a,P,R,K);return this.draw(U),U}circle(g,a,P,R){const K=this.gen.circle(g,a,P,R);return this.draw(K),K}linearPath(g,a){const P=this.gen.linearPath(g,a);return this.draw(P),P}polygon(g,a){const P=this.gen.polygon(g,a);return this.draw(P),P}arc(g,a,P,R,K,U,m=!1,G){const he=this.gen.arc(g,a,P,R,K,U,m,G);return this.draw(he),he}curve(g,a){const P=this.gen.curve(g,a);return this.draw(P),P}path(g,a){const P=this.gen.path(g,a);return this.draw(P),P}}const f="http://www.w3.org/2000/svg";class l{constructor(g,a){this.svg=g,this.gen=new T.V(a)}draw(g){const a=g.sets||[],P=g.options||this.getDefaultOptions(),R=this.svg.ownerDocument||window.document,K=R.createElementNS(f,"g"),U=g.options.fixedDecimalPlaceDigits;for(const m of a){let G=null;switch(m.type){case"path":G=R.createElementNS(f,"path"),G.setAttribute("d",this.opsToPath(m,U)),G.setAttribute("stroke",P.stroke),G.setAttribute("stroke-width",P.strokeWidth+""),G.setAttribute("fill","none"),P.strokeLineDash&&G.setAttribute("stroke-dasharray",P.strokeLineDash.join(" ").trim()),P.strokeLineDashOffset&&G.setAttribute("stroke-dashoffset",`${P.strokeLineDashOffset}`);break;case"fillPath":G=R.createElementNS(f,"path"),G.setAttribute("d",this.opsToPath(m,U)),G.setAttribute("stroke","none"),G.setAttribute("stroke-width","0"),G.setAttribute("fill",P.fill||""),g.shape!=="curve"&&g.shape!=="polygon"||G.setAttribute("fill-rule","evenodd");break;case"fillSketch":G=this.fillSketch(R,m,P)}G&&K.appendChild(G)}return K}fillSketch(g,a,P){let R=P.fillWeight;R<0&&(R=P.strokeWidth/2);const K=g.createElementNS(f,"path");return K.setAttribute("d",this.opsToPath(a,P.fixedDecimalPlaceDigits)),K.setAttribute("stroke",P.fill||""),K.setAttribute("stroke-width",R+""),K.setAttribute("fill","none"),P.fillLineDash&&K.setAttribute("stroke-dasharray",P.fillLineDash.join(" ").trim()),P.fillLineDashOffset&&K.setAttribute("stroke-dashoffset",`${P.fillLineDashOffset}`),K}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(g,a){return this.gen.opsToPath(g,a)}line(g,a,P,R,K){const U=this.gen.line(g,a,P,R,K);return this.draw(U)}rectangle(g,a,P,R,K){const U=this.gen.rectangle(g,a,P,R,K);return this.draw(U)}ellipse(g,a,P,R,K){const U=this.gen.ellipse(g,a,P,R,K);return this.draw(U)}circle(g,a,P,R){const K=this.gen.circle(g,a,P,R);return this.draw(K)}linearPath(g,a){const P=this.gen.linearPath(g,a);return this.draw(P)}polygon(g,a){const P=this.gen.polygon(g,a);return this.draw(P)}arc(g,a,P,R,K,U,m=!1,G){const he=this.gen.arc(g,a,P,R,K,U,m,G);return this.draw(he)}curve(g,a){const P=this.gen.curve(g,a);return this.draw(P)}path(g,a){const P=this.gen.path(g,a);return this.draw(P)}}var v={canvas:(k,g)=>new j(k,g),svg:(k,g)=>new l(k,g),generator:k=>new T.V(k),newSeed:()=>T.V.newSeed()}},5714:function(fe){fe.exports=function(Q,t,T){var j=[],f=Q.length;if(f===0)return j;var l=t<0?Math.max(0,t+f):t||0;for(T!==void 0&&(f=T<0?T+f:T);f-- >l;)j[f-l]=Q[f];return j}},2173:function(fe,Q,t){var T=t(9787),j=typeof Object.is=="function"?Object.is:function(P,R){return P===R&&(P!==0||1/P==1/R)||P!=P&&R!=R},f=T.useState,l=T.useEffect,v=T.useLayoutEffect,k=T.useDebugValue;function g(P){var R=P.getSnapshot;P=P.value;try{var K=R();return!j(P,K)}catch{return!0}}var a=typeof window>"u"||window.document===void 0||window.document.createElement===void 0?function(P,R){return R()}:function(P,R){var K=R(),U=f({inst:{value:K,getSnapshot:R}}),m=U[0].inst,G=U[1];return v(function(){m.value=K,m.getSnapshot=R,g(m)&&G({inst:m})},[P,K,R]),l(function(){return g(m)&&G({inst:m}),P(function(){g(m)&&G({inst:m})})},[P]),k(K),K};Q.useSyncExternalStore=T.useSyncExternalStore!==void 0?T.useSyncExternalStore:a},5917:function(fe,Q,t){var T=t(9787),j=t(1374),f=typeof Object.is=="function"?Object.is:function(P,R){return P===R&&(P!==0||1/P==1/R)||P!=P&&R!=R},l=j.useSyncExternalStore,v=T.useRef,k=T.useEffect,g=T.useMemo,a=T.useDebugValue;Q.useSyncExternalStoreWithSelector=function(P,R,K,U,m){var G=v(null);if(G.current===null){var he={hasValue:!1,value:null};G.current=he}else he=G.current;G=g(function(){function we(S){if(!D){if(D=!0,xe=S,S=U(S),m!==void 0&&he.hasValue){var z=he.value;if(m(z,S))return ce=z}return ce=S}if(z=ce,f(xe,S))return z;var A=U(S);return m!==void 0&&m(z,A)?z:(xe=S,ce=A)}var xe,ce,D=!1,ne=K===void 0?null:K;return[function(){return we(R())},ne===null?void 0:function(){return we(ne())}]},[R,K,U,m]);var be=l(P,G[0],G[1]);return k(function(){he.hasValue=!0,he.value=be},[be]),a(be),be}},1374:function(fe,Q,t){fe.exports=t(2173)},5668:function(fe,Q,t){fe.exports=t(5917)},940:function(fe,Q,t){var T={"./ar-SA.json":[7822,2091],"./az-AZ.json":[9753,4568],"./bg-BG.json":[1203,1628],"./bn-BD.json":[8525,7429],"./ca-ES.json":[510,5130],"./cs-CZ.json":[7605,6265],"./da-DK.json":[2392,1790],"./de-DE.json":[2853,3082],"./el-GR.json":[9876,1513],"./en.json":[1463],"./es-ES.json":[2264,8759],"./eu-ES.json":[5658,8081],"./fa-IR.json":[3747,5330],"./fi-FI.json":[9490,3512],"./fr-FR.json":[7830,3682],"./gl-ES.json":[5199,2943],"./he-IL.json":[1994,2312],"./hi-IN.json":[4646,9828],"./hu-HU.json":[6373,7368],"./id-ID.json":[3247,3808],"./it-IT.json":[3257,6239],"./ja-JP.json":[198,1204],"./kaa.json":[7941,663],"./kab-KAB.json":[228,9551],"./kk-KZ.json":[8972,22],"./km-KH.json":[5845,6566],"./ko-KR.json":[7596,6844],"./ku-TR.json":[2508,3031],"./lt-LT.json":[3755,8340],"./lv-LV.json":[2327,6768],"./mr-IN.json":[5297,3397],"./my-MM.json":[7704,1477],"./nb-NO.json":[1167,2359],"./nl-NL.json":[290,3024],"./nn-NO.json":[4481,3885],"./oc-FR.json":[2284,1690],"./pa-IN.json":[6773,3162],"./percentages.json":[4451],"./pl-PL.json":[3661,3674],"./pt-BR.json":[8881,3721],"./pt-PT.json":[125,5395],"./ro-RO.json":[2013,5089],"./ru-RU.json":[2253,8124],"./si-LK.json":[5497,1302],"./sk-SK.json":[4570,8750],"./sl-SI.json":[1984,6071],"./sv-SE.json":[976,8534],"./ta-IN.json":[3952,2404],"./th-TH.json":[2596,537],"./tr-TR.json":[7315,4977],"./uk-UA.json":[3458,7759],"./vi-VN.json":[456,4e3],"./zh-CN.json":[1037,4680],"./zh-HK.json":[5334,7920],"./zh-TW.json":[931,3421]};function j(f){if(!t.o(T,f))return Promise.resolve().then(function(){var k=new Error("Cannot find module '"+f+"'");throw k.code="MODULE_NOT_FOUND",k});var l=T[f],v=l[0];return Promise.all(l.slice(1).map(t.e)).then(function(){return t.t(v,19)})}j.keys=function(){return Object.keys(T)},j.id=940,fe.exports=j},9713:function(fe){fe.exports=function(Q,t,T){return t in Q?Object.defineProperty(Q,t,{value:T,enumerable:!0,configurable:!0,writable:!0}):Q[t]=T,Q}},6479:function(fe,Q,t){var T=t(7316);fe.exports=function(j,f){if(j==null)return{};var l,v,k=T(j,f);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(j);for(v=0;v<g.length;v++)l=g[v],f.indexOf(l)>=0||Object.prototype.propertyIsEnumerable.call(j,l)&&(k[l]=j[l])}return k}},7316:function(fe){fe.exports=function(Q,t){if(Q==null)return{};var T,j,f={},l=Object.keys(Q);for(j=0;j<l.length;j++)T=l[j],t.indexOf(T)>=0||(f[T]=Q[T]);return f}},4295:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f),v=t(1667),k=t.n(v),g=new URL(t(3940),t.b),a=new URL(t(3147),t.b),P=new URL(t(8303),t.b),R=new URL(t(1273),t.b),K=new URL(t(9577),t.b),U=new URL(t(9729),t.b),m=l()(j()),G=k()(g),he=k()(a),be=k()(P),we=k()(R),xe=k()(K),ce=k()(U);m.push([fe.id,'@font-face{font-family:"Virgil";src:url('+G+');font-display:swap}@font-face{font-family:"Cascadia";src:url('+he+');font-display:swap}@font-face{font-family:"Assistant";src:url('+be+');font-display:swap;font-weight:400}@font-face{font-family:"Assistant";src:url('+we+');font-display:swap;font-weight:500}@font-face{font-family:"Assistant";src:url('+xe+');font-display:swap;font-weight:600}@font-face{font-family:"Assistant";src:url('+ce+");font-display:swap;font-weight:700}",""]),Q.Z=m},6086:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".zoom-actions,.undo-redo-buttons{background-color:var(--island-bg-color);border-radius:var(--border-radius-lg);box-shadow:0 0 0 1px var(--color-surface-lowest)}.zoom-button,.undo-redo-buttons button{border-radius:0 !important;background-color:var(--color-surface-low) !important;font-size:.875rem !important;width:var(--lg-button-size);height:var(--lg-button-size)}.zoom-button svg,.undo-redo-buttons button svg{width:var(--lg-icon-size) !important;height:var(--lg-icon-size) !important}.zoom-button .ToolIcon__icon,.undo-redo-buttons button .ToolIcon__icon{width:100%;height:100%}.reset-zoom-button{border-left:0 !important;border-right:0 !important;padding:0 .625rem !important;width:3.75rem !important;justify-content:center;color:var(--text-primary-color)}.zoom-out-button{border-top-left-radius:var(--border-radius-lg) !important;border-bottom-left-radius:var(--border-radius-lg) !important}:root[dir=rtl] .zoom-out-button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.zoom-out-button .ToolIcon__icon{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.zoom-in-button{border-top-right-radius:var(--border-radius-lg) !important;border-bottom-right-radius:var(--border-radius-lg) !important}:root[dir=rtl] .zoom-in-button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.zoom-in-button .ToolIcon__icon{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.undo-redo-buttons .undo-button-container button{border-top-left-radius:var(--border-radius-lg) !important;border-bottom-left-radius:var(--border-radius-lg) !important;border-right:0 !important}:root[dir=rtl] .undo-redo-buttons .undo-button-container button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.undo-redo-buttons .undo-button-container button .ToolIcon__icon{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}.undo-redo-buttons .redo-button-container button{border-top-right-radius:var(--border-radius-lg) !important;border-bottom-right-radius:var(--border-radius-lg) !important}:root[dir=rtl] .undo-redo-buttons .redo-button-container button{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.undo-redo-buttons .redo-button-container button .ToolIcon__icon{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}",""]),Q.Z=l},3729:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Avatar{width:1.25rem;height:1.25rem;position:relative;border-radius:100%;outline-offset:2px;display:flex;justify-content:center;align-items:center;cursor:pointer;font-size:.75rem;font-weight:800;line-height:1}.excalidraw .Avatar-img{width:100%;height:100%;border-radius:100%}.excalidraw .Avatar::before{content:"";position:absolute;top:-3px;right:-3px;bottom:-3px;left:-3px;border:1px solid var(--avatar-border-color);border-radius:100%}',""]),Q.Z=l},3137:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f),v=t(1667),k=t.n(v),g=new URL(t(7984),t.b),a=new URL(t(1639),t.b),P=l()(j()),R=k()(g),K=k()(a);P.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: var(--color-gray-20);--dropdown-icon: url("+R+");--focus-highlight-color: #a5d8ff;--icon-fill-color: var(--color-on-surface);--icon-green-fill-color: #2b8a3e;--default-bg-color: #ffffff;--input-bg-color: #ffffff;--input-border-color: #ced4da;--input-hover-bg-color: #f1f3f5;--input-label-color: #495057;--island-bg-color: #ffffff;--keybinding-color: var(--color-gray-40);--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: var(--island-bg-color);--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--select-highlight-color: #339af0;--shadow-island: 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17), 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08), 0px 7px 14px 0px rgba(0, 0, 0, 0.05);--button-hover-bg: var(--color-surface-high);--button-active-bg: var(--color-surface-high);--button-active-border: var(--color-brand-active);--default-border-color: var(--color-surface-high);--default-button-size: 2rem;--default-icon-size: 1rem;--lg-button-size: 2.25rem;--lg-icon-size: 1rem;--editor-container-padding: 1rem;--scrollbar-thumb: var(--button-gray-2);--scrollbar-thumb-hover: var(--button-gray-3);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-20);--sidebar-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--sidebar-border-color: var(--color-surface-high);--sidebar-bg-color: var(--island-bg-color);--library-dropdown-shadow: 0px 15px 6px rgba(0, 0, 0, 0.01), 0px 8px 5px rgba(0, 0, 0, 0.05), 0px 4px 4px rgba(0, 0, 0, 0.09), 0px 1px 2px rgba(0, 0, 0, 0.1), 0px 0px 0px rgba(0, 0, 0, 0.1);--space-factor: 0.25rem;--text-primary-color: var(--color-on-surface);--color-selection: #6965db;--color-icon-white: #ffffff;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e3e2fe;--color-primary-light-darker: #d7d5ff;--color-gray-10: #f5f5f5;--color-gray-20: #ebebeb;--color-gray-30: #d6d6d6;--color-gray-40: #b8b8b8;--color-gray-50: #999999;--color-gray-60: #7a7a7a;--color-gray-70: #5c5c5c;--color-gray-80: #3d3d3d;--color-gray-85: #242424;--color-gray-90: #1e1e1e;--color-gray-100: #121212;--color-warning: #fceeca;--color-warning-dark: #f5c354;--color-warning-darker: #f3ab2c;--color-warning-darkest: #ec8b14;--color-text-warning: var(--text-primary-color);--color-danger: #db6965;--color-danger-dark: #db6965;--color-danger-darker: #d65550;--color-danger-darkest: #d1413c;--color-danger-text: black;--color-danger-background: #fff0f0;--color-danger-icon-background: #ffdad6;--color-danger-color: #700000;--color-danger-icon-color: #700000;--color-warning-background: var(--color-warning);--color-warning-icon-background: var(--color-warning-dark);--color-warning-color: var(--text-primary-color);--color-warning-icon-color: var(--text-primary-color);--color-muted: var(--color-gray-30);--color-muted-darker: var(--color-gray-60);--color-muted-darkest: var(--color-gray-100);--color-muted-background: var(--color-gray-80);--color-muted-background-darker: var(--color-gray-100);--color-promo: #e70078;--color-success: #268029;--color-success-lighter: #cafccc;--color-logo-icon: var(--color-primary);--color-logo-text: #190064;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem;--color-surface-high: hsl(244, 100%, 97%);--color-surface-mid: hsl(240 25% 96%);--color-surface-low: hsl(240 25% 94%);--color-surface-lowest: #ffffff;--color-on-surface: #1b1b1f;--color-brand-hover: #5753d0;--color-on-primary-container: #030064;--color-surface-primary-container: #e0dfff;--color-brand-active: #4440bf;--color-border-outline: #767680;--color-border-outline-variant: #c5c5d0;--color-surface-primary-container: #e0dfff}@media screen and (min-device-width: 1921px){.excalidraw{--lg-button-size: 2.5rem;--lg-icon-size: 1.25rem;--default-button-size: 2.25rem;--default-icon-size: 1.25rem}}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: var(--color-gray-80);--dropdown-icon: url("+K+");--focus-highlight-color: #228be6;--icon-green-fill-color: #69db7c;--default-bg-color: #121212;--input-bg-color: #121212;--input-border-color: #2e2e2e;--input-hover-bg-color: #181818;--input-label-color: #e9ecef;--island-bg-color: #232329;--keybinding-color: var(--color-gray-60);--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--shadow-island: 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17), 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08), 0px 7px 14px 0px rgba(0, 0, 0, 0.05);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-85);--scrollbar-thumb: #343a40;--scrollbar-thumb-hover: #495057;--color-selection: #3530c4;--color-icon-white: var(--color-gray-90);--color-primary: #a8a5ff;--color-primary-darker: #b2aeff;--color-primary-darkest: #beb9ff;--color-primary-light: #4f4d6f;--color-primary-light-darker: #43415e;--color-text-warning: var(--color-gray-80);--color-danger: #ffa8a5;--color-danger-dark: #672120;--color-danger-darker: #8f2625;--color-danger-darkest: #ac2b29;--color-danger-text: #fbcbcc;--color-danger-background: #fbcbcc;--color-danger-icon-background: #672120;--color-danger-color: #261919;--color-danger-icon-color: #fbcbcc;--color-warning-background: var(--color-warning);--color-warning-icon-background: var(--color-warning-dark);--color-warning-color: var(--color-gray-80);--color-warning-icon-color: var(--color-gray-80);--color-muted: var(--color-gray-80);--color-muted-darker: var(--color-gray-60);--color-muted-darkest: var(--color-gray-20);--color-muted-background: var(--color-gray-40);--color-muted-background-darker: var(--color-gray-20);--color-promo: #d297ff;--color-logo-text: #e2dfff;--color-surface-high: hsl(245, 10%, 21%);--color-surface-low: hsl(240, 8%, 15%);--color-surface-mid: hsl(240 6% 10%);--color-surface-lowest: hsl(0, 0%, 7%);--color-on-surface: #e3e3e8;--color-brand-hover: #bbb8ff;--color-on-primary-container: #e0dfff;--color-surface-primary-container: #403e6a;--color-brand-active: #d0ccff;--color-border-outline: #8e8d9c;--color-border-outline-variant: #46464f;--color-surface-primary-container: #403e6a}.excalidraw .excalidraw-button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface))}.excalidraw .excalidraw-button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .excalidraw-button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .excalidraw-button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .excalidraw-button.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .excalidraw-button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .excalidraw-button.active svg{color:var(--button-color, var(--color-on-primary-container))}",""]),Q.Z=P},4241:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Card{display:flex;flex-direction:column;align-items:center;max-width:290px;margin:1em;text-align:center}.excalidraw .Card .Card-icon{font-size:2.6em;display:flex;flex:0 0 auto;padding:1.4rem;border-radius:50%;background:var(--card-color);color:#fff}.excalidraw .Card .Card-icon svg{width:2.8rem;height:2.8rem}.excalidraw .Card .Card-details{font-size:.96em;min-height:90px;padding:0 1em;margin-bottom:auto}.excalidraw .Card .Card-button.ToolIcon_type_button{height:2.5rem;margin-top:1em;margin-bottom:.3em;background-color:var(--card-color)}.excalidraw .Card .Card-button.ToolIcon_type_button:hover{background-color:var(--card-color-darker)}.excalidraw .Card .Card-button.ToolIcon_type_button:active{background-color:var(--card-color-darkest)}.excalidraw .Card .Card-button.ToolIcon_type_button .ToolIcon__label{color:#fff}.excalidraw .Card .Card-button.ToolIcon_type_button .Spinner{--spinner-color: #fff}",""]),Q.Z=l},6029:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Checkbox{margin:4px .3em;display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus){box-shadow:0 0 0 2px #4dabf7}.excalidraw .Checkbox:hover:not(.is-checked) .Checkbox-box:not(:focus) svg{display:block;opacity:.3}.excalidraw .Checkbox:active .Checkbox-box{box-shadow:0 0 2px 1px inset #1c7ed6 !important}.excalidraw .Checkbox:hover .Checkbox-box{background-color:rgba(208,235,255,.2)}.excalidraw .Checkbox.is-checked .Checkbox-box{background-color:#d0ebff}.excalidraw .Checkbox.is-checked .Checkbox-box svg{display:block}.excalidraw .Checkbox.is-checked:hover .Checkbox-box{background-color:#a5d8ff}.excalidraw .Checkbox .Checkbox-box{width:22px;height:22px;padding:0;flex:0 0 auto;margin:0 1em;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #1c7ed6;background-color:rgba(0,0,0,0);border-radius:4px;color:#1c7ed6;border:0}.excalidraw .Checkbox .Checkbox-box:focus{box-shadow:0 0 0 3px #1c7ed6}.excalidraw .Checkbox .Checkbox-box svg{display:none;width:16px;height:16px;stroke-width:3px}.excalidraw .Checkbox .Checkbox-label{display:flex;align-items:center}.excalidraw .Checkbox .excalidraw-tooltip-icon{width:1em;height:1em}",""]),Q.Z=l},4269:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f),v=t(1667),k=t.n(v),g=new URL(t(9669),t.b),a=l()(j()),P=k()(g);a.push([fe.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .focus-visible-none:focus-visible{outline:none !important}.excalidraw .color-picker__heading{padding:0 .5rem;font-size:.75rem;text-align:left}.excalidraw .color-picker-container{display:grid;grid-template-columns:1fr 20px 1.625rem;padding:.25rem 0px;align-items:center}.excalidraw--mobile.excalidraw .color-picker-container{max-width:175px}.excalidraw .color-picker__top-picks{display:flex;justify-content:space-between}.excalidraw .color-picker__button{--radius: 0.25rem;padding:0;margin:0;width:1.35rem;height:1.35rem;border:1px solid var(--color-gray-30);border-radius:var(--radius);-webkit-filter:var(--theme-filter);filter:var(--theme-filter);background-color:var(--swatch-color);background-position:left center;position:relative;font-family:inherit;box-sizing:border-box}.excalidraw .color-picker__button:hover::after{content:"";position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;box-shadow:0 0 0 1px var(--color-gray-30);border-radius:calc(var(--radius) + 1px);-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker__button.active .color-picker__button-outline{position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;box-shadow:0 0 0 1px var(--color-primary-darkest);z-index:1;border-radius:calc(var(--radius) + 1px);-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker__button:focus-visible{outline:none}.excalidraw .color-picker__button:focus-visible::after{content:"";position:absolute;top:-4px;right:-4px;bottom:-4px;left:-4px;border:3px solid var(--focus-highlight-color);border-radius:calc(var(--radius) + 1px)}.excalidraw .color-picker__button:focus-visible.active .color-picker__button-outline{display:none}.excalidraw .color-picker__button--large{--radius: 0.5rem;width:1.875rem;height:1.875rem}.excalidraw .color-picker__button.is-transparent{background-image:url('+P+")}.excalidraw .color-picker__button--no-focus-visible{border:0}.excalidraw .color-picker__button--no-focus-visible::after{display:none}.excalidraw .color-picker__button--no-focus-visible:focus-visible{outline:none !important}.excalidraw .color-picker__button.active-color{border-radius:calc(var(--radius) + 1px);width:1.625rem;height:1.625rem}.excalidraw .color-picker__button__hotkey-label{position:absolute;right:4px;bottom:4px;-webkit-filter:none;filter:none;font-size:11px}.excalidraw .color-picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 0 1px 4px;border-radius:4px;position:absolute}:root[dir=ltr] .excalidraw .color-picker{left:-5.5px}:root[dir=rtl] .excalidraw .color-picker{right:-5.5px}.excalidraw .color-picker-control-container{display:grid;grid-template-columns:auto 1fr;align-items:center;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .color-picker-control-container+.popover{position:static}.excalidraw .color-picker-popover-container{margin-top:-0.25rem}:root[dir=ltr] .excalidraw .color-picker-popover-container{margin-left:.5rem}:root[dir=rtl] .excalidraw .color-picker-popover-container{margin-left:-3rem}.excalidraw .color-picker-triangle{width:0;height:0;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color);position:absolute;top:10px}:root[dir=ltr] .excalidraw .color-picker-triangle{-webkit-transform:rotate(270deg);transform:rotate(270deg);left:-14px}:root[dir=rtl] .excalidraw .color-picker-triangle{-webkit-transform:rotate(90deg);transform:rotate(90deg);right:-14px}.excalidraw .color-picker-triangle-shadow{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1)}:root[dir=ltr] .excalidraw .color-picker-triangle-shadow{left:-14px}:root[dir=rtl] .excalidraw .color-picker-triangle-shadow{right:-16px}.excalidraw .color-picker-content{display:flex;flex-direction:column;gap:.75rem;outline:none}.excalidraw .color-picker-content--default{padding:.5rem;display:grid;grid-template-columns:repeat(5, 1.875rem);grid-gap:.25rem;border-radius:4px}.excalidraw .color-picker-content--default:focus{outline:none;box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .color-picker-content--canvas{display:flex;flex-direction:column;padding:.25rem}.excalidraw .color-picker-content--canvas-title{color:#868e96;font-size:12px;padding:0 .25rem}.excalidraw .color-picker-content--canvas-colors{padding:.5rem 0}.excalidraw .color-picker-content--canvas-colors .color-picker-swatch{margin:0 .25rem}.excalidraw .color-picker-content .color-input-container{grid-column:1/span 5}.excalidraw .color-picker-swatch{position:relative;height:1.875rem;width:1.875rem;cursor:pointer;border-radius:4px;margin:0;box-sizing:border-box;border:1px solid #ddd;background-color:currentColor !important;-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .color-picker-swatch:focus{box-shadow:0 0 4px 1px currentColor;border-color:var(--select-highlight-color)}.excalidraw .color-picker-transparent{border-radius:4px;box-shadow:rgba(0,0,0,.1) 0 0 0 1px inset;position:absolute;top:0;right:0;bottom:0;left:0}.excalidraw .color-picker-transparent,.excalidraw .color-picker-label-swatch{background:url("+P+') left center}.excalidraw .color-picker-hash{height:var(--default-button-size);flex-shrink:0;padding:.5rem .5rem .5rem .75rem;border:1px solid var(--default-border-color);border-right:0;box-sizing:border-box;color:var(--input-label-color);display:flex;align-items:center;justify-content:center;position:relative}:root[dir=ltr] .excalidraw .color-picker-hash{border-radius:var(--border-radius-lg) 0 0 var(--border-radius-lg)}:root[dir=rtl] .excalidraw .color-picker-hash{border-radius:0 var(--border-radius-lg) var(--border-radius-lg) 0;border-right:1px solid var(--default-border-color);border-left:0}.excalidraw .color-input-container{display:flex}.excalidraw .color-input-container:focus-within{box-shadow:0 0 0 1px var(--color-primary-darkest);border-radius:var(--border-radius-lg)}.excalidraw .color-picker__input-label{display:grid;grid-template-columns:auto 1fr auto auto;gap:8px;align-items:center;border:1px solid var(--default-border-color);border-radius:8px;padding:0 12px;margin:8px;box-sizing:border-box}.excalidraw .color-picker__input-label:focus-within{box-shadow:0 0 0 1px var(--color-primary-darkest);border-radius:var(--border-radius-lg)}.excalidraw .color-picker__input-hash{padding:0 .25rem}.excalidraw .color-picker-input{box-sizing:border-box;width:100%;margin:0;font-size:.875rem;font-family:inherit;background-color:rgba(0,0,0,0);color:var(--text-primary-color);border:0;outline:none;height:var(--default-button-size);border:1px solid var(--default-border-color);border-left:0;letter-spacing:.4px;padding:.5rem;padding-left:.25rem;-webkit-appearance:none;appearance:none}:root[dir=ltr] .excalidraw .color-picker-input{border-radius:0 var(--border-radius-lg) var(--border-radius-lg) 0}:root[dir=rtl] .excalidraw .color-picker-input{border-radius:var(--border-radius-lg) 0 0 var(--border-radius-lg);border-left:1px solid var(--default-border-color);border-right:0}.excalidraw .color-picker-input:focus-visible{box-shadow:none}.excalidraw .color-picker-label-swatch-container{border:1px solid var(--default-border-color);border-radius:var(--border-radius-lg);width:var(--default-button-size);height:var(--default-button-size);box-sizing:border-box;overflow:hidden}.excalidraw .color-picker-label-swatch{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface));background-color:var(--swatch-color) !important;overflow:hidden;position:relative;-webkit-filter:var(--theme-filter);filter:var(--theme-filter);border:0 !important}.excalidraw .color-picker-label-swatch svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .color-picker-label-swatch:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .color-picker-label-swatch:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .color-picker-label-swatch.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .color-picker-label-swatch.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .color-picker-label-swatch.active svg{color:var(--button-color, var(--color-on-primary-container))}.excalidraw .color-picker-label-swatch:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:var(--swatch-color)}.excalidraw .color-picker-keybinding{position:absolute;bottom:2px;font-size:.7em}:root[dir=ltr] .excalidraw .color-picker-keybinding{right:2px}:root[dir=rtl] .excalidraw .color-picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .color-picker-keybinding{display:none}.excalidraw .color-picker-type-canvasBackground .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementBackground .color-picker-keybinding{color:#fff}.excalidraw .color-picker-swatch[aria-label=transparent] .color-picker-keybinding{color:#aaa}.excalidraw .color-picker-type-elementStroke .color-picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .color-picker-type-elementBackground .color-picker-keybinding{color:#000}.excalidraw.theme--dark .color-picker-swatch[aria-label=transparent] .color-picker-keybinding{color:#000}',""]),Q.Z=a},9393:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .confirm-dialog-buttons{display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;justify-content:flex-end}",""]),Q.Z=l},6578:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .context-menu{position:relative;border-radius:4px;box-shadow:0 3px 10px rgba(0,0,0,.2);padding:0;list-style:none;-webkit-user-select:none;user-select:none;margin:-0.25rem 0 0 .125rem;padding:.5rem 0;background-color:var(--popup-secondary-bg-color);border:1px solid var(--button-gray-3);cursor:default}.excalidraw .context-menu button{color:var(--popup-text-color)}.excalidraw .context-menu-item{position:relative;width:100%;min-width:9.5rem;margin:0;padding:.25rem 1rem .25rem 1.25rem;text-align:start;border-radius:0;background-color:rgba(0,0,0,0);border:none;white-space:nowrap;font-family:inherit;display:grid;grid-template-columns:1fr .2fr;align-items:center}.excalidraw .context-menu-item.checkmark::before{position:absolute;left:6px;margin-bottom:1px;content:"✓"}.excalidraw .context-menu-item.dangerous .context-menu-item__label{color:#f03e3e}.excalidraw .context-menu-item .context-menu-item__label{justify-self:start;-webkit-margin-end:20px;margin-inline-end:20px}.excalidraw .context-menu-item .context-menu-item__shortcut{justify-self:end;opacity:.6;font-family:inherit;font-size:.7rem}.excalidraw .context-menu-item:hover{color:var(--popup-bg-color);background-color:var(--select-highlight-color)}.excalidraw .context-menu-item:hover.dangerous{background-color:#fa5252}.excalidraw .context-menu-item:hover.dangerous .context-menu-item__label{color:var(--popup-bg-color)}.excalidraw .context-menu-item:focus{z-index:1}.excalidraw--mobile.excalidraw .context-menu-item{display:block}.excalidraw--mobile.excalidraw .context-menu-item .context-menu-item__label{-webkit-margin-end:0;margin-inline-end:0}.excalidraw--mobile.excalidraw .context-menu-item .context-menu-item__shortcut{display:none}.excalidraw .context-menu-item-separator{border:none;border-top:1px solid #adb5bd}',""]),Q.Z=l},9482:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Dialog{-webkit-user-select:text;user-select:text;cursor:auto}.excalidraw .Dialog__title{margin:0;text-align:left;font-size:1.25rem;border-bottom:1px solid var(--dialog-border-color);padding:0 0 .75rem;margin-bottom:1.5rem}.excalidraw .Dialog__close{color:var(--color-gray-40);margin:0;position:absolute;top:.75rem;right:.5rem;border:0;background-color:rgba(0,0,0,0);line-height:0;cursor:pointer}.excalidraw .Dialog__close:hover{color:var(--color-gray-60)}.excalidraw .Dialog__close:active{color:var(--color-gray-40)}.excalidraw .Dialog__close svg{width:1.5rem;height:1.5rem}.excalidraw .Dialog--fullscreen .Dialog__close{top:1.25rem;right:1.25rem}",""]),Q.Z=l},6148:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".excalidraw .Dialog__action-button{position:relative;display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;align-items:center;padding:.5rem 1.5rem;border:1px solid var(--default-border-color);background-color:rgba(0,0,0,0);height:3rem;border-radius:var(--border-radius-lg);letter-spacing:.4px;color:inherit;font-family:inherit;font-size:.875rem;font-weight:600;-webkit-user-select:none;user-select:none}.excalidraw .Dialog__action-button svg{display:block;width:1rem;height:1rem}.excalidraw .Dialog__action-button--danger{background-color:var(--color-danger);border-color:var(--color-danger);color:#fff}.excalidraw .Dialog__action-button--primary{background-color:var(--color-primary);border-color:var(--color-primary);color:#fff}.excalidraw.theme--dark .Dialog__action-button--danger{color:var(--color-gray-100)}.excalidraw.theme--dark .Dialog__action-button--primary{color:var(--color-gray-100)}",""]),Q.Z=l},5744:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".excalidraw .ExcalidrawLogo{--logo-icon--xs: 2rem;--logo-text--xs: 1.5rem;--logo-icon--small: 2.5rem;--logo-text--small: 1.75rem;--logo-icon--normal: 3rem;--logo-text--normal: 2.2rem;--logo-icon--large: 90px;--logo-text--large: 65px;display:flex;align-items:center}.excalidraw .ExcalidrawLogo svg{flex:0 0 auto}.excalidraw .ExcalidrawLogo .ExcalidrawLogo-icon{width:auto;color:var(--color-logo-icon)}.excalidraw .ExcalidrawLogo .ExcalidrawLogo-text{margin-left:.75rem;width:auto;color:var(--color-logo-text)}.excalidraw .ExcalidrawLogo.is-xs .ExcalidrawLogo-icon{height:var(--logo-icon--xs)}.excalidraw .ExcalidrawLogo.is-xs .ExcalidrawLogo-text{height:var(--logo-text--xs)}.excalidraw .ExcalidrawLogo.is-small .ExcalidrawLogo-icon{height:var(--logo-icon--small)}.excalidraw .ExcalidrawLogo.is-small .ExcalidrawLogo-text{height:var(--logo-text--small)}.excalidraw .ExcalidrawLogo.is-normal .ExcalidrawLogo-icon{height:var(--logo-icon--normal)}.excalidraw .ExcalidrawLogo.is-normal .ExcalidrawLogo-text{height:var(--logo-text--normal)}.excalidraw .ExcalidrawLogo.is-large .ExcalidrawLogo-icon{height:var(--logo-icon--large)}.excalidraw .ExcalidrawLogo.is-large .ExcalidrawLogo-text{height:var(--logo-text--large)}",""]),Q.Z=l},7955:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f),v=t(1667),k=t.n(v),g=new URL(t(9669),t.b),a=l()(j()),P=k()(g);a.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ExportDialog__preview{--preview-padding: calc(var(--space-factor) * 4);background:url("+P+") left center;text-align:center;padding:var(--preview-padding);margin-bottom:calc(var(--space-factor)*3);display:flex;justify-content:center;align-items:center}.excalidraw .ExportDialog__preview canvas{max-width:calc(100% - var(--preview-padding)*2);max-height:25rem}.excalidraw.theme--dark .ExportDialog__preview canvas{-webkit-filter:none;filter:none}.excalidraw .ExportDialog__actions{width:100%;display:flex;grid-gap:calc(var(--space-factor)*2);align-items:top;justify-content:space-between}.excalidraw--mobile.excalidraw .ExportDialog{display:flex;flex-direction:column}.excalidraw--mobile.excalidraw .ExportDialog__actions{flex-direction:column;align-items:center}.excalidraw--mobile.excalidraw .ExportDialog__actions>*{margin-bottom:calc(var(--space-factor)*3)}.excalidraw--mobile.excalidraw .ExportDialog__preview canvas{max-height:30vh}.excalidraw--mobile.excalidraw .ExportDialog__dialog,.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{height:100%;box-sizing:border-box}.excalidraw--mobile.excalidraw .ExportDialog__dialog .Island{overflow-y:auto}.excalidraw .ExportDialog--json .ExportDialog-cards{display:grid;grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));justify-items:center;row-gap:2em}@media(max-width: 460px){.excalidraw .ExportDialog--json .ExportDialog-cards{grid-template-columns:repeat(auto-fit, minmax(240px, 1fr))}.excalidraw .ExportDialog--json .ExportDialog-cards .Card-details{min-height:40px}}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:1em auto;align-items:flex-start;flex-direction:column}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName .TextInput{width:auto}.excalidraw .ExportDialog--json .ExportDialog-cards .ProjectName-label{margin:.625em 0;font-weight:bold}.excalidraw button.ExportDialog-imageExportButton{border:0;width:5rem;height:5rem;margin:0 .2em;padding:0;display:flex;align-items:center;justify-content:center;border-radius:1rem;background-color:var(--button-color);box-shadow:0 3px 5px -1px rgba(0,0,0,.28),0 6px 10px 0 rgba(0,0,0,.14);font-family:Cascadia;font-size:1.8em;color:#fff}.excalidraw button.ExportDialog-imageExportButton:hover{background-color:var(--button-color-darker)}.excalidraw button.ExportDialog-imageExportButton:active{background-color:var(--button-color-darkest);box-shadow:none}.excalidraw button.ExportDialog-imageExportButton svg{width:.9em}",""]),Q.Z=a},7522:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".excalidraw .excalidraw-eye-dropper-container,.excalidraw .excalidraw-eye-dropper-backdrop{position:absolute;width:100%;height:100%;z-index:var(--zIndex-eyeDropperBackdrop);touch-action:none}.excalidraw .excalidraw-eye-dropper-container{pointer-events:none}.excalidraw .excalidraw-eye-dropper-backdrop{pointer-events:all}.excalidraw .excalidraw-eye-dropper-preview{pointer-events:none;width:3rem;height:3rem;position:fixed;z-index:var(--zIndex-eyeDropperPreview);border-radius:1rem;border:1px solid var(--default-border-color);-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .excalidraw-eye-dropper-trigger{width:1.25rem;height:1.25rem;cursor:pointer;padding:4px;margin-right:-4px;margin-left:-2px;border-radius:.5rem;color:var(--icon-fill-color)}.excalidraw .excalidraw-eye-dropper-trigger:hover{background:var(--button-hover-bg)}.excalidraw .excalidraw-eye-dropper-trigger.selected{color:var(--color-primary);background:var(--color-primary-light)}",""]),Q.Z=l},8960:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ExcButton{--text-color: transparent;--border-color: transparent;--back-color: transparent;color:var(--text-color);background-color:var(--back-color);border-color:var(--border-color);display:flex;justify-content:center;align-items:center;flex-shrink:0;flex-wrap:nowrap;border-radius:.5rem;border-width:1px;border-style:solid;font-family:"Assistant";-webkit-user-select:none;user-select:none;transition:all 150ms ease-out}.excalidraw .ExcButton--color-primary.ExcButton--variant-filled{--text-color: var(--color-surface-lowest);--back-color: var(--color-primary)}.excalidraw .ExcButton--color-primary.ExcButton--variant-filled:hover{--back-color: var(--color-brand-hover)}.excalidraw .ExcButton--color-primary.ExcButton--variant-filled:active{--back-color: var(--color-brand-active)}.excalidraw .ExcButton--color-primary.ExcButton--variant-outlined,.excalidraw .ExcButton--color-primary.ExcButton--variant-icon{--text-color: var(--color-primary);--border-color: var(--color-border-outline);--back-color: transparent}.excalidraw .ExcButton--color-primary.ExcButton--variant-outlined:hover,.excalidraw .ExcButton--color-primary.ExcButton--variant-icon:hover{--text-color: var(--color-brand-hover);--border-color: var(--color-brand-hover)}.excalidraw .ExcButton--color-primary.ExcButton--variant-outlined:active,.excalidraw .ExcButton--color-primary.ExcButton--variant-icon:active{--text-color: var(--color-brand-active);--border-color: var(--color-brand-active)}.excalidraw .ExcButton--color-danger.ExcButton--variant-filled{--text-color: var(--color-danger-text);--back-color: var(--color-danger-dark)}.excalidraw .ExcButton--color-danger.ExcButton--variant-filled:hover{--back-color: var(--color-danger-darker)}.excalidraw .ExcButton--color-danger.ExcButton--variant-filled:active{--back-color: var(--color-danger-darkest)}.excalidraw .ExcButton--color-danger.ExcButton--variant-outlined,.excalidraw .ExcButton--color-danger.ExcButton--variant-icon{--text-color: var(--color-danger);--border-color: var(--color-danger);--back-color: transparent}.excalidraw .ExcButton--color-danger.ExcButton--variant-outlined:hover,.excalidraw .ExcButton--color-danger.ExcButton--variant-icon:hover{--text-color: var(--color-danger-darkest);--border-color: var(--color-danger-darkest)}.excalidraw .ExcButton--color-danger.ExcButton--variant-outlined:active,.excalidraw .ExcButton--color-danger.ExcButton--variant-icon:active{--text-color: var(--color-danger-darker);--border-color: var(--color-danger-darker)}.excalidraw .ExcButton--color-muted.ExcButton--variant-filled{--text-color: var(--island-bg-color);--back-color: var(--color-gray-50)}.excalidraw .ExcButton--color-muted.ExcButton--variant-filled:hover{--back-color: var(--color-gray-60)}.excalidraw .ExcButton--color-muted.ExcButton--variant-filled:active{--back-color: var(--color-gray-80)}.excalidraw .ExcButton--color-muted.ExcButton--variant-outlined,.excalidraw .ExcButton--color-muted.ExcButton--variant-icon{--text-color: var(--color-muted-background);--border-color: var(--color-muted);--back-color: var(--island-bg-color)}.excalidraw .ExcButton--color-muted.ExcButton--variant-outlined:hover,.excalidraw .ExcButton--color-muted.ExcButton--variant-icon:hover{--text-color: var(--color-muted-background-darker);--border-color: var(--color-muted-darker)}.excalidraw .ExcButton--color-muted.ExcButton--variant-outlined:active,.excalidraw .ExcButton--color-muted.ExcButton--variant-icon:active{--text-color: var(--color-muted-background-darker);--border-color: var(--color-muted-darkest)}.excalidraw .ExcButton--color-warning.ExcButton--variant-filled{--text-color: black;--back-color: var(--color-warning-dark)}.excalidraw .ExcButton--color-warning.ExcButton--variant-filled:hover{--back-color: var(--color-warning-darker)}.excalidraw .ExcButton--color-warning.ExcButton--variant-filled:active{--back-color: var(--color-warning-darkest)}.excalidraw .ExcButton--color-warning.ExcButton--variant-outlined,.excalidraw .ExcButton--color-warning.ExcButton--variant-icon{--text-color: var(--color-warning-dark);--border-color: var(--color-warning-dark);--back-color: var(--input-bg-color)}.excalidraw .ExcButton--color-warning.ExcButton--variant-outlined:hover,.excalidraw .ExcButton--color-warning.ExcButton--variant-icon:hover{--text-color: var(--color-warning-darker);--border-color: var(--color-warning-darker)}.excalidraw .ExcButton--color-warning.ExcButton--variant-outlined:active,.excalidraw .ExcButton--color-warning.ExcButton--variant-icon:active{--text-color: var(--color-warning-darkest);--border-color: var(--color-warning-darkest)}.excalidraw .ExcButton--size-large{font-weight:600;font-size:.875rem;min-height:3rem;padding:.5rem 1.5rem;gap:.75rem;letter-spacing:.4px}.excalidraw .ExcButton--size-medium{font-weight:600;font-size:.75rem;min-height:2.5rem;padding:.5rem 1rem;gap:.5rem;letter-spacing:normal}.excalidraw .ExcButton--variant-icon{padding:.5rem .75rem;width:3rem}.excalidraw .ExcButton--fullWidth{width:100%}.excalidraw .ExcButton__icon{width:1.25rem;height:1.25rem}',""]),Q.Z=l},3195:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .FixedSideContainer{position:absolute;pointer-events:none}.excalidraw .FixedSideContainer>*{pointer-events:var(--ui-pointerEvents)}.excalidraw .FixedSideContainer_side_top{left:var(--editor-container-padding);top:var(--editor-container-padding);right:var(--editor-container-padding);bottom:var(--editor-container-padding);z-index:2}.excalidraw .FixedSideContainer_side_top.zen-mode{right:42px}",""]),Q.Z=l},2978:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HelpDialog .Modal__content{max-width:960px}.excalidraw .HelpDialog h3{margin:1.5rem 0;font-weight:bold;font-size:1.125rem}.excalidraw .HelpDialog__header{display:flex;flex-wrap:wrap;gap:.75rem}.excalidraw .HelpDialog__btn{--background: var(--color-surface-mid);display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;align-items:center;background-color:var(--background);padding:.625rem 1rem;border:1px solid var(--background);border-radius:var(--border-radius-lg);color:var(--text-primary-color);font-weight:600;font-size:.75rem;letter-spacing:.4px}.excalidraw.theme--dark.excalidraw .HelpDialog__btn{--background: var(--color-surface-high)}.excalidraw.theme--dark.excalidraw .HelpDialog__btn:hover{--background: #363541}.excalidraw .HelpDialog__btn:hover{--background: var(--color-surface-high);text-decoration:none}.excalidraw .HelpDialog__btn:active{border-color:var(--color-primary)}.excalidraw .HelpDialog__link-icon{line-height:0}.excalidraw .HelpDialog__link-icon svg{width:1rem;height:1rem}.excalidraw .HelpDialog__islands-container{display:grid;grid-column-gap:1.5rem;grid-row-gap:2rem}@media screen and (min-width: 1024px){.excalidraw .HelpDialog__islands-container{grid-template-columns:1fr 1fr}}@media screen and (min-width: 1024px){.excalidraw .HelpDialog__island--tools{grid-area:1/1/2/2}.excalidraw .HelpDialog__island--view{grid-area:2/1/3/2}.excalidraw .HelpDialog__island--editor{grid-area:1/2/3/3}}.excalidraw .HelpDialog__island h4{font-size:1rem;font-weight:bold;margin:0;margin-bottom:.625rem}.excalidraw .HelpDialog__island-content{border:1px solid var(--dialog-border-color);border-radius:var(--border-radius-lg)}.excalidraw .HelpDialog__shortcut{border-bottom:1px solid var(--dialog-border-color);padding:.375rem .75rem;display:flex;justify-content:space-between;align-items:center;font-size:.875rem;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .HelpDialog__shortcut:last-child{border-bottom:none}.excalidraw .HelpDialog__key-container{display:flex;align-items:center;-webkit-column-gap:.25rem;column-gap:.25rem;flex-shrink:0}.excalidraw .HelpDialog__key{display:flex;box-sizing:border-box;font-size:.625rem;background-color:var(--color-primary-light);border-radius:var(--border-radius-md);padding:.5rem;word-break:keep-all;align-items:center;font-family:inherit;line-height:1}",""]),Q.Z=l},1587:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .HintViewer{pointer-events:none;box-sizing:border-box;position:absolute;display:flex;justify-content:center;left:0;top:100%;max-width:100%;width:100%;margin-top:.5rem;text-align:center;color:var(--color-gray-40);font-size:.75rem}.excalidraw--mobile.excalidraw .HintViewer{position:static;padding-right:2rem}.excalidraw .HintViewer>span{padding:.25rem}.excalidraw.theme--dark .HintViewer{color:var(--color-gray-60)}",""]),Q.Z=l},9478:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .picker-container{display:inline-block;box-sizing:border-box;margin-right:.25rem}.excalidraw .picker{background:var(--popup-bg-color);border:0 solid rgba(255,255,255,.25);box-shadow:rgba(0,0,0,.25) 2px 2px 4px 2px;border-radius:4px;position:absolute}.excalidraw .picker-container button,.excalidraw .picker button{position:relative;display:flex;align-items:center;justify-content:center}.excalidraw .picker-container button:focus-visible,.excalidraw .picker button:focus-visible{outline:rgba(0,0,0,0);background-color:var(--button-gray-2)}.excalidraw .picker-container button:focus-visible svg,.excalidraw .picker button:focus-visible svg{opacity:1}.excalidraw .picker-container button:hover,.excalidraw .picker button:hover{background-color:var(--button-gray-2)}.excalidraw .picker-container button:active,.excalidraw .picker button:active{background-color:var(--button-gray-3)}.excalidraw .picker-container button:disabled,.excalidraw .picker button:disabled{cursor:not-allowed}.excalidraw .picker-container button svg,.excalidraw .picker button svg{margin:0;width:36px;height:18px;pointer-events:none}.excalidraw .picker button{padding:.25rem .28rem .35rem .25rem}.excalidraw .picker-triangle{width:0;height:0;position:relative;top:-10px;z-index:10}:root[dir=ltr] .excalidraw .picker-triangle{left:12px}:root[dir=rtl] .excalidraw .picker-triangle{right:12px}.excalidraw .picker-triangle:before{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,.1);top:-1px}.excalidraw .picker-triangle:after{content:"";position:absolute;border-style:solid;border-width:0 9px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) var(--popup-bg-color)}.excalidraw .picker-content{padding:.5rem;display:grid;grid-template-columns:repeat(3, auto);grid-gap:.5rem;border-radius:4px}:root[dir=rtl] .excalidraw .picker-content{padding:.4rem}.excalidraw .picker-keybinding{position:absolute;bottom:2px;font-size:.7em;color:var(--keybinding-color)}:root[dir=ltr] .excalidraw .picker-keybinding{right:2px}:root[dir=rtl] .excalidraw .picker-keybinding{left:2px}.excalidraw--mobile.excalidraw .picker-keybinding{display:none}.excalidraw .picker-type-canvasBackground .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementBackground .picker-keybinding{color:#fff}.excalidraw .picker-swatch[aria-label=transparent] .picker-keybinding{color:#aaa}.excalidraw .picker-type-elementStroke .picker-keybinding{color:#d4d4d4}.excalidraw.theme--dark .picker-type-elementBackground .picker-keybinding{color:#000}.excalidraw.theme--dark .picker-swatch[aria-label=transparent] .picker-keybinding{color:#000}',""]),Q.Z=l},9706:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f),v=t(1667),k=t.n(v),g=new URL(t(9669),t.b),a=l()(j()),P=k()(g);a.push([fe.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--ImageExportModal-preview-border: #d6d6d6}.excalidraw.theme--dark{--ImageExportModal-preview-border: #5c5c5c}.excalidraw .ImageExportModal{display:flex;flex-direction:row;justify-content:space-between}.excalidraw .ImageExportModal h3{font-family:"Assistant";font-style:normal;font-weight:700;font-size:1.313rem;line-height:130%;padding:0;margin:0}.excalidraw--mobile.excalidraw .ImageExportModal h3{display:none}.excalidraw .ImageExportModal>h3{display:none}.excalidraw--mobile.excalidraw .ImageExportModal>h3{display:block}.excalidraw--mobile.excalidraw .ImageExportModal{flex-direction:column;height:calc(100vh - 5rem)}.excalidraw .ImageExportModal__preview{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;height:360px;width:55%;margin-right:1.5rem}.excalidraw--mobile.excalidraw .ImageExportModal__preview{max-width:unset;margin-right:unset;width:100%;height:unset;flex-grow:1}.excalidraw .ImageExportModal__preview__filename>input{margin-top:1rem}.excalidraw .ImageExportModal__preview__canvas{box-sizing:border-box;width:100%;height:100%;display:flex;flex-grow:1;justify-content:center;align-items:center;background:url('+P+') left center;border:1px solid var(--ImageExportModal-preview-border);border-radius:12px;overflow:hidden;padding:1rem}.excalidraw .ImageExportModal__preview__canvas>canvas{max-width:calc(100% - 2rem);max-height:calc(100% - 2rem);-webkit-filter:none !important;filter:none !important}.excalidraw--mobile.excalidraw .ImageExportModal__preview__canvas>canvas{max-height:100%}.excalidraw--mobile.excalidraw .ImageExportModal__preview__canvas{margin-top:24px;max-width:unset}.excalidraw .ImageExportModal__settings{display:flex;flex-direction:column;flex-wrap:wrap;gap:18px}.excalidraw--mobile.excalidraw .ImageExportModal__settings{margin-left:unset;margin-top:1rem;flex-direction:row;gap:6px 34px;align-content:flex-start}.excalidraw .ImageExportModal__settings__setting{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.excalidraw--mobile.excalidraw .ImageExportModal__settings__setting{flex-direction:column;align-items:start;justify-content:unset;height:52px}.excalidraw .ImageExportModal__settings__setting__label{display:flex;flex-direction:row;align-items:center;font-family:"Assistant";font-weight:600;font-size:1rem;line-height:150%}.excalidraw .ImageExportModal__settings__setting__label svg{width:20px;height:20px;margin-left:10px}.excalidraw .ImageExportModal__settings__setting__content{display:flex;height:100%;align-items:center}.excalidraw .ImageExportModal__settings__buttons{flex-grow:1;flex-wrap:wrap;display:flex;flex-direction:row;gap:11px;align-items:flex-end;align-content:flex-end}.excalidraw--mobile.excalidraw .ImageExportModal__settings__buttons{padding-top:32px;flex-basis:100%;justify-content:center}',""]),Q.Z=a},7369:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".excalidraw .Island{--padding: 0;box-sizing:border-box;background-color:var(--island-bg-color);box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);padding:calc(var(--padding)*var(--space-factor));position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .Island.zen-mode{box-shadow:none}",""]),Q.Z=l},7930:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".excalidraw .LaserToolOverlay{pointer-events:none;width:100vw;height:100vh;position:fixed;top:0;left:0;z-index:2}.excalidraw .LaserToolOverlay .LaserToolOverlayCanvas{image-rendering:auto;overflow:visible;position:absolute;top:0;left:0}",""]),Q.Z=l},1434:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .layer-ui__wrapper.animate{transition:width .1s ease-in-out}.excalidraw .layer-ui__wrapper{position:absolute;width:100%;height:100%;pointer-events:none;z-index:var(--zIndex-layerUI)}.excalidraw .layer-ui__wrapper__top-right{display:flex;gap:.75rem}.excalidraw .layer-ui__wrapper__footer{width:100%}.excalidraw .layer-ui__wrapper__footer-right{z-index:100;display:flex}.excalidraw .layer-ui__wrapper .zen-mode-transition{transition:-webkit-transform .5s ease-in-out;transition:transform .5s ease-in-out;transition:transform .5s ease-in-out, -webkit-transform .5s ease-in-out}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}:root[dir=ltr] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-left{-webkit-transform:translate(999px, 0);transform:translate(999px, 0)}:root[dir=rtl] .excalidraw .layer-ui__wrapper .zen-mode-transition.transition-right{-webkit-transform:translate(-999px, 0);transform:translate(-999px, 0)}.excalidraw .layer-ui__wrapper .zen-mode-transition.layer-ui__wrapper__footer-left--transition-bottom{-webkit-transform:translate(0, 92px);transform:translate(0, 92px)}.excalidraw .layer-ui__wrapper .disable-zen-mode{padding:10px;position:absolute;bottom:0;opacity:0;visibility:hidden;transition:visibility 0s linear 0s,opacity .5s;font-family:var(--ui-font);font-size:.75rem;font-weight:500;line-height:1;border-radius:var(--border-radius-lg);border:1px solid var(--default-border-color);background-color:var(--island-bg-color);color:var(--text-primary-color)}[dir=ltr] .excalidraw .layer-ui__wrapper .disable-zen-mode{right:1rem}[dir=rtl] .excalidraw .layer-ui__wrapper .disable-zen-mode{left:1rem}.excalidraw .layer-ui__wrapper .disable-zen-mode:hover{background-color:var(--button-hover-bg)}.excalidraw .layer-ui__wrapper .disable-zen-mode:active{border-color:var(--color-primary)}.excalidraw .layer-ui__wrapper .disable-zen-mode--visible{opacity:1;visibility:visible;transition:visibility 0s linear 300ms,opacity .5s;transition-delay:.8s;pointer-events:var(--ui-pointerEvents)}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-left>*,.excalidraw .layer-ui__wrapper .footer-center>*,.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right>*{pointer-events:var(--ui-pointerEvents)}.excalidraw .layer-ui__wrapper .layer-ui__wrapper__footer-right{margin-top:auto;margin-bottom:auto}",""]),Q.Z=l},8923:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,'.excalidraw .layer-ui__library{display:flex;flex-direction:column;flex:1 1 auto}.excalidraw .library-actions-counter{background-color:var(--color-primary);color:var(--color-primary-light);font-weight:bold;display:flex;align-items:center;justify-content:center;border-radius:50%;width:1rem;height:1rem;position:absolute;bottom:-0.25rem;right:-0.25rem;font-size:.625rem;pointer-events:none}.excalidraw .layer-ui__library-message{padding:2rem;min-width:200px;display:flex;flex-direction:column;align-items:center;flex-grow:1;justify-content:center}.excalidraw .layer-ui__library-message span{font-size:.8em}.excalidraw .publish-library-success .Dialog__content{display:flex;flex-direction:column}.excalidraw .publish-library-success-close.ToolIcon_type_button{background-color:#228be6;align-self:flex-end}.excalidraw .publish-library-success-close.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library-success-close.ToolIcon_type_button .ToolIcon__icon{width:auto;font-size:1rem;color:#fff;padding:0 .5rem}.excalidraw .library-menu-control-buttons{display:flex;align-items:center;justify-content:center;gap:.625rem;position:relative}.excalidraw .library-menu-control-buttons--at-bottom::before{content:"";width:calc(100% - 1.5rem);height:1px;position:absolute;top:-1px;background:var(--sidebar-border-color)}.excalidraw .library-menu-browse-button{flex:1;height:var(--lg-button-size);display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative;border-radius:var(--border-radius-lg);background-color:var(--color-primary);color:#fff;text-align:center;white-space:nowrap;text-decoration:none !important;font-weight:600;font-size:.75rem}.excalidraw .library-menu-browse-button:hover{background-color:var(--color-brand-hover)}.excalidraw .library-menu-browse-button:active{background-color:var(--color-brand-active)}.excalidraw.theme--dark .library-menu-browse-button{color:var(--color-gray-100)}.excalidraw.excalidraw--mobile .library-menu-browse-button{height:var(--default-button-size)}.excalidraw .layer-ui__library .dropdown-menu{width:auto;top:initial;right:0;left:initial;bottom:100%;margin-bottom:.625rem}.excalidraw .layer-ui__library .dropdown-menu .dropdown-menu-container{width:196px;box-shadow:var(--library-dropdown-shadow);border-radius:var(--border-radius-lg);padding:.25rem .5rem}.excalidraw .layer-ui__library .library-menu-dropdown-container{position:relative}.excalidraw .layer-ui__library .library-menu-dropdown-container--in-heading{padding:0;position:absolute;top:1rem;right:.75rem;z-index:1}.excalidraw .layer-ui__library .library-menu-dropdown-container--in-heading .dropdown-menu{top:100%}',""]),Q.Z=l},6440:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".excalidraw{--container-padding-y: 1.5rem;--container-padding-x: 0.75rem}.excalidraw .library-menu-items__no-items{text-align:center;color:var(--color-gray-70);line-height:1.5;font-size:.875rem;width:100%}.excalidraw .library-menu-items__no-items__label{color:var(--color-primary);font-weight:bold;font-size:1.125rem;margin-bottom:.75rem}.excalidraw.theme--dark .library-menu-items__no-items{color:var(--color-gray-40)}.excalidraw .library-menu-items-container{width:100%;display:flex;flex-grow:1;flex-shrink:1;flex-basis:0;overflow-y:auto;flex-direction:column;height:100%;justify-content:center;margin:0;position:relative}.excalidraw .library-menu-items-container>div{padding-left:.75rem;padding-right:.75rem}.excalidraw .library-menu-items-container__row{display:grid;grid-template-columns:repeat(4, 1fr);gap:1rem}.excalidraw .library-menu-items-container__items{row-gap:.5rem;padding:var(--container-padding-y) 0;flex:1;overflow-y:auto;overflow-x:hidden;margin-bottom:1rem}.excalidraw .library-menu-items-container__header{color:var(--color-primary);font-size:1.125rem;font-weight:bold;margin-bottom:.75rem;width:100%;padding-right:4rem;box-sizing:border-box}.excalidraw .library-menu-items-container__header--excal{margin-top:2rem}.excalidraw .library-menu-items-container__grid{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;grid-gap:1rem}.excalidraw .library-menu-items-container .separator{width:100%;display:flex;align-items:center;font-weight:500;font-size:.9rem;margin:.6em .2em;color:var(--text-primary-color)}.excalidraw .library-menu-items-private-library-container{min-height:3.75rem;width:100%}",""]),Q.Z=l},5644:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .library-unit{align-items:center;border:1px solid rgba(0,0,0,0);display:flex;justify-content:center;position:relative;width:55px;height:55px;box-sizing:border-box;border-radius:var(--border-radius-lg)}.excalidraw .library-unit svg{pointer-events:none}.excalidraw .library-unit--hover{border-color:var(--color-primary)}.excalidraw .library-unit--selected{border-color:var(--color-primary);border-width:1px}.excalidraw .library-unit--skeleton{opacity:.5;background:linear-gradient(-45deg, var(--color-gray-10), var(--color-gray-20), var(--color-gray-10));background-size:200% 200%;-webkit-animation:library-unit__skeleton-opacity-animation .2s linear;animation:library-unit__skeleton-opacity-animation .2s linear}.excalidraw.theme--dark .library-unit--skeleton{background-image:linear-gradient(-45deg, var(--color-gray-100), var(--color-gray-80), var(--color-gray-100))}.excalidraw .library-unit__dragger{display:flex;align-items:center;justify-content:center;height:100%;width:100%}.excalidraw .library-unit__dragger>svg{-webkit-filter:var(--theme-filter);filter:var(--theme-filter);flex-grow:1;max-height:100%;max-width:100%}.excalidraw .library-unit__checkbox-container,.excalidraw .library-unit__checkbox-container:hover,.excalidraw .library-unit__checkbox-container:active{align-items:center;background:none;border:none;color:var(--icon-fill-color);display:flex;justify-content:center;margin:0;padding:.5rem;position:absolute;left:2rem;bottom:2rem;cursor:pointer}.excalidraw .library-unit__checkbox-container input,.excalidraw .library-unit__checkbox-container:hover input,.excalidraw .library-unit__checkbox-container:active input{cursor:pointer}.excalidraw .library-unit__checkbox{position:absolute;top:.125rem;right:.125rem;margin:0}.excalidraw .library-unit__checkbox .Checkbox-box{margin:0;width:1rem;height:1rem;border-radius:4px;background-color:var(--color-primary-light);border:1px solid var(--color-primary);box-shadow:none !important;padding:2px}.excalidraw .library-unit__checkbox.Checkbox:hover .Checkbox-box{background-color:var(--color-primary-light)}.excalidraw .library-unit__checkbox.is-checked .Checkbox-box{background-color:var(--color-primary) !important}.excalidraw .library-unit__checkbox.is-checked .Checkbox-box svg{color:var(--color-primary-light)}.excalidraw .library-unit__removeFromLibrary>svg{height:16px;width:16px}.excalidraw .library-unit__adder{-webkit-transform:scale(1);transform:scale(1);-webkit-animation:library-unit__adder-animation 1s ease-in infinite;animation:library-unit__adder-animation 1s ease-in infinite;position:absolute;width:1.5rem;height:1.5rem;background-color:var(--color-primary);border-radius:var(--border-radius-md);display:flex;justify-content:center;align-items:center;pointer-events:none}.excalidraw .library-unit__adder svg{color:var(--color-primary-light);width:1rem;height:1rem}.excalidraw .library-unit:active .library-unit__adder{-webkit-animation:none;animation:none;-webkit-transform:scale(0.8);transform:scale(0.8)}.excalidraw .library-unit__active{cursor:pointer}@-webkit-keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}@keyframes library-unit__adder-animation{0%{-webkit-transform:scale(0.85);transform:scale(0.85)}50%{-webkit-transform:scale(1);transform:scale(1)}100%{-webkit-transform:scale(0.85);transform:scale(0.85)}}@-webkit-keyframes library-unit__skeleton-opacity-animation{0%{opacity:0}75%{opacity:0}100%{opacity:.5}}@keyframes library-unit__skeleton-opacity-animation{0%{opacity:0}75%{opacity:0}100%{opacity:.5}}",""]),Q.Z=l},5830:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f),v=t(1667),k=t.n(v),g=new URL(t(9669),t.b),a=l()(j()),P=k()(g);a.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .dialog-mermaid-title{margin-bottom:5px;margin-top:2px}.excalidraw .dialog-mermaid-desc{font-size:15px;font-style:italic;font-weight:500}.excalidraw .dialog-mermaid .Modal__content .Island{box-shadow:none}.excalidraw:not(.excalidraw--mobile).excalidraw .dialog-mermaid{padding:1.25rem}.excalidraw:not(.excalidraw--mobile).excalidraw .dialog-mermaid .Modal__content{height:100%;max-height:750px}@media screen and (max-width: 860px){.excalidraw:not(.excalidraw--mobile).excalidraw .dialog-mermaid .Modal__content{height:auto;max-height:100%}}.excalidraw:not(.excalidraw--mobile).excalidraw .dialog-mermaid .Modal__content .Island{height:100%;display:flex;flex-direction:column;flex:1 1 auto}.excalidraw:not(.excalidraw--mobile).excalidraw .dialog-mermaid .Modal__content .Island .Dialog__content{display:flex;flex:1 1 auto}.excalidraw .dialog-mermaid-body{width:100%;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr auto;height:100%;-webkit-column-gap:4rem;column-gap:4rem}@media screen and (max-width: 860px){.excalidraw .dialog-mermaid-body{flex-direction:column;display:flex;gap:1rem}}.excalidraw .dialog-mermaid-panels{display:grid;width:100%;grid-template-columns:1fr 1fr;justify-content:space-between;gap:4rem;grid-row:1;grid-column:1/3}@media screen and (max-width: 860px){.excalidraw .dialog-mermaid-panels{flex-direction:column;display:flex;gap:1rem}}.excalidraw .dialog-mermaid-panels label{font-size:14px;font-style:normal;font-weight:600;margin-bottom:4px;margin-left:4px}@media screen and (max-width: 860px){.excalidraw .dialog-mermaid-panels label{margin-top:4px}}.excalidraw .dialog-mermaid-panels-text{display:flex;flex-direction:column}.excalidraw .dialog-mermaid-panels-text textarea{width:20rem;height:100%;resize:none;border-radius:var(--border-radius-lg);border:1px solid var(--dialog-border-color);white-space:pre-wrap;padding:.85rem;box-sizing:border-box;width:100%;font-family:monospace}@media screen and (max-width: 860px){.excalidraw .dialog-mermaid-panels-text textarea{width:auto;height:10rem}}.excalidraw .dialog-mermaid-panels-preview-wrapper{display:flex;align-items:center;justify-content:center;padding:.85rem;box-sizing:border-box;width:100%;height:200px;flex-grow:1;position:relative;background:url("+P+') left center;border-radius:var(--border-radius-lg);border:1px solid var(--dialog-border-color)}@media screen and (max-width: 860px){.excalidraw .dialog-mermaid-panels-preview-wrapper{height:400px;width:auto}}.excalidraw .dialog-mermaid-panels-preview-wrapper canvas{max-width:100%;max-height:100%}.excalidraw .dialog-mermaid-panels-preview-canvas-container{display:flex;width:100%;height:100%;align-items:center;justify-content:center;flex-grow:1}.excalidraw .dialog-mermaid-panels-preview{display:flex;flex-direction:column}.excalidraw .dialog-mermaid-panels .mermaid-error{color:red;font-weight:800;font-size:30px;word-break:break-word;overflow:auto;max-height:100%;height:100%;width:100%;text-align:center;position:absolute;z-index:10}.excalidraw .dialog-mermaid-panels .mermaid-error p{font-weight:500;font-family:Cascadia;text-align:left;white-space:pre-wrap;font-size:.875rem;padding:0 10px}.excalidraw .dialog-mermaid-buttons{grid-column:2}.excalidraw .dialog-mermaid-buttons .dialog-mermaid-insert.excalidraw-button{font-family:"Assistant";font-weight:600;height:2.5rem;margin-top:1em;margin-bottom:.3em;width:7.5rem;font-size:12px;color:#fff;background-color:var(--color-primary)}.excalidraw .dialog-mermaid-buttons .dialog-mermaid-insert.excalidraw-button:hover{background-color:var(--color-primary-darker)}.excalidraw .dialog-mermaid-buttons .dialog-mermaid-insert.excalidraw-button:active{background-color:var(--color-primary-darkest)}@media screen and (max-width: 860px){.excalidraw .dialog-mermaid-buttons .dialog-mermaid-insert.excalidraw-button{width:100%}}.excalidraw.theme--dark.excalidraw .dialog-mermaid-buttons .dialog-mermaid-insert.excalidraw-button{color:var(--color-gray-100)}.excalidraw .dialog-mermaid-buttons .dialog-mermaid-insert span{padding-left:.5rem;display:flex}',""]),Q.Z=a},6843:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw.excalidraw-modal-container{position:absolute;z-index:var(--zIndex-modal)}.excalidraw .Modal{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;overflow:auto;padding:calc(var(--space-factor)*10)}.excalidraw .Modal .Island{padding:2.5rem !important}.excalidraw .Modal__background{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1;background-color:rgba(18,18,18,.2);-webkit-animation:Modal__background__fade-in .125s linear forwards;animation:Modal__background__fade-in .125s linear forwards}.excalidraw .Modal__content{position:relative;z-index:2;width:100%;max-width:var(--max-width);max-height:100%;opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-animation:Modal__content_fade-in .1s ease-out .05s forwards;animation:Modal__content_fade-in .1s ease-out .05s forwards;position:relative;overflow-y:auto;background:var(--island-bg-color);border:1px solid var(--dialog-border-color);box-shadow:var(--modal-shadow);border-radius:6px;box-sizing:border-box}.excalidraw .Modal__content:focus{outline:none}@-webkit-keyframes Modal__background__fade-in{from{opacity:0}to{opacity:1}}@keyframes Modal__background__fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:scale(0.9);transform:scale(0.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes Modal__content_fade-in{from{opacity:0;-webkit-transform:scale(0.9);transform:scale(0.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.excalidraw .Modal__close{color:var(--icon-fill-color);margin:0;padding:.375rem;position:absolute;top:1rem;right:1rem;border:0;background-color:rgba(0,0,0,0);line-height:0;cursor:pointer}.excalidraw .Modal__close svg{width:1.5rem;height:1.5rem}.excalidraw .Dialog--fullscreen .Modal{padding:0}.excalidraw .Dialog--fullscreen .Modal__content{position:absolute;top:0;left:0;right:0;bottom:0;max-width:100%;border:0;border-radius:0}",""]),Q.Z=l},9439:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .OverwriteConfirm{display:flex;flex-direction:column;align-items:center;gap:.75rem;isolation:isolate}.excalidraw .OverwriteConfirm h3{margin:0;font-weight:700;font-size:1.3125rem;line-height:130%;align-self:flex-start;color:var(--text-primary-color)}.excalidraw .OverwriteConfirm__Description{box-sizing:border-box;display:flex;flex-direction:row;align-items:center;width:100%;gap:1rem;padding:2.5rem;background:var(--color-danger-background);border-radius:.5rem;font-family:"Assistant";font-style:normal;font-weight:400;font-size:1rem;line-height:150%;color:var(--color-danger-color)}.excalidraw--mobile.excalidraw .OverwriteConfirm__Description{flex-direction:column;text-align:center}.excalidraw .OverwriteConfirm__Description__spacer{flex-grow:1}.excalidraw .OverwriteConfirm__Description__icon{box-sizing:border-box;display:flex;align-items:center;justify-content:center;border-radius:2.5rem;background:var(--color-danger-icon-background);width:3.5rem;height:3.5rem;padding:.75rem}.excalidraw .OverwriteConfirm__Description__icon svg{color:var(--color-danger-icon-color);width:1.5rem;height:1.5rem}.excalidraw .OverwriteConfirm__Description.OverwriteConfirm__Description--color-warning{background:var(--color-warning-background);color:var(--color-warning-color)}.excalidraw .OverwriteConfirm__Description.OverwriteConfirm__Description--color-warning .OverwriteConfirm__Description__icon{background:var(--color-warning-icon-background);flex:0 0 auto}.excalidraw .OverwriteConfirm__Description.OverwriteConfirm__Description--color-warning .OverwriteConfirm__Description__icon svg{color:var(--color-warning-icon-color)}.excalidraw .OverwriteConfirm__Actions{display:flex;flex-direction:row;align-items:stretch;justify-items:stretch;justify-content:center;gap:1.5rem}.excalidraw--mobile.excalidraw .OverwriteConfirm__Actions{flex-direction:column}.excalidraw .OverwriteConfirm__Actions__Action{display:flex;flex-direction:column;align-items:center;padding:1.5rem;gap:.75rem;flex-basis:50%;flex-grow:0}.excalidraw .OverwriteConfirm__Actions__Action__content{height:100%;font-size:.875rem;text-align:center}.excalidraw .OverwriteConfirm__Actions__Action h4{font-weight:700;font-size:1.125rem;line-height:130%;margin:0;color:var(--text-primary-color)}',""]),Q.Z=l},8461:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw--mobile.excalidraw .PasteChartDialog .Island{display:flex;flex-direction:column}.excalidraw .PasteChartDialog .container{display:flex;align-items:center;justify-content:space-around;flex-wrap:wrap}.excalidraw--mobile.excalidraw .PasteChartDialog .container{flex-direction:column;justify-content:center}.excalidraw .PasteChartDialog .ChartPreview{margin:8px;text-align:center;width:192px;height:128px;border-radius:2px;padding:1px;border:1px solid #ced4da;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0)}.excalidraw .PasteChartDialog .ChartPreview div{display:inline-block}.excalidraw .PasteChartDialog .ChartPreview svg{max-height:120px;max-width:186px}.excalidraw .PasteChartDialog .ChartPreview:hover{padding:0;border:2px solid #339af0}",""]),Q.Z=l},9935:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".excalidraw .popover{position:absolute;z-index:10;padding:5px 0 5px;outline:none}",""]),Q.Z=l},532:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".ProjectName{margin:auto;display:flex;align-items:center}.ProjectName .TextInput{height:calc(1rem - 3px);width:200px;overflow:hidden;text-align:center;margin-left:8px;text-overflow:ellipsis}.ProjectName .TextInput--readonly{background:none;border:none;width:auto;max-width:200px;padding-left:2px}.ProjectName .TextInput--readonly:hover{background:none}",""]),Q.Z=l},7589:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .publish-library__fields{display:flex;flex-direction:column}.excalidraw .publish-library__fields label{padding:1em 0;display:flex;justify-content:space-between;align-items:center}.excalidraw .publish-library__fields label span{font-weight:500;font-size:1rem;color:#868e96}.excalidraw .publish-library__fields label input,.excalidraw .publish-library__fields label textarea{width:70%;padding:.6em;font-family:var(--ui-font)}.excalidraw .publish-library__fields label .required{color:#e03131;margin:.2rem}.excalidraw .publish-library__buttons{display:flex;padding:.2rem 0;justify-content:flex-end;gap:.5rem}.excalidraw .publish-library__buttons .ToolIcon__icon{min-width:2.5rem;width:auto;font-size:1rem}.excalidraw .publish-library__buttons .ToolIcon_type_button{margin-left:1rem;padding:0 .5rem}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button{background-color:#228be6}.excalidraw .publish-library__buttons--confirm.ToolIcon_type_button:hover{background-color:#1971c2}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button{background-color:#adb5bd}.excalidraw .publish-library__buttons--cancel.ToolIcon_type_button:hover{background-color:#868e96}.excalidraw .publish-library__buttons .ToolIcon__icon{color:#fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner{--spinner-color: #fff}.excalidraw .publish-library__buttons .ToolIcon__icon .Spinner svg{padding:.5rem}.excalidraw .publish-library .selected-library-items{display:flex;flex-wrap:wrap}.excalidraw .publish-library .selected-library-items .single-library-item-wrapper{width:9rem}.excalidraw .publish-library-warning{color:#fa5252}.excalidraw .publish-library-note{padding:1em 0;font-style:italic;font-size:14px;display:block}.excalidraw .single-library-item{position:relative}.excalidraw .single-library-item-status{position:absolute;top:.3rem;left:.3rem;font-size:.7rem;color:#f03e3e;background:rgba(255,255,255,.9);padding:.1rem .2rem;border-radius:.2rem}.excalidraw .single-library-item__svg{background-color:#fff;padding:.3rem;width:7.5rem;height:7.5rem;border:1px solid var(--button-gray-2)}.excalidraw .single-library-item__svg svg{width:100%;height:100%}.excalidraw .single-library-item .ToolIcon__icon{background-color:#fff;width:auto;height:auto;margin:0 .5rem}.excalidraw .single-library-item .ToolIcon,.excalidraw .single-library-item .ToolIcon_type_button:hover{background-color:#fff}.excalidraw .single-library-item .required,.excalidraw .single-library-item .error{color:#e03131;font-weight:bold;font-size:1rem;margin:.2rem}.excalidraw .single-library-item .error{font-weight:500;margin:0;padding:.3em 0}.excalidraw .single-library-item--remove{position:absolute;top:.2rem;right:1rem}.excalidraw .single-library-item--remove .ToolIcon__icon{margin:0}.excalidraw .single-library-item--remove .ToolIcon__icon{background-color:#fa5252}.excalidraw .single-library-item--remove .ToolIcon__icon:hover{background-color:#f03e3e}.excalidraw .single-library-item--remove .ToolIcon__icon:active{background-color:#e03131}.excalidraw .single-library-item--remove svg{color:#fff;padding:.26rem;border-radius:.3em;width:1rem;height:1rem}",""]),Q.Z=l},6217:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--RadioGroup-background: var(--island-bg-color);--RadioGroup-border: var(--color-surface-high);--RadioGroup-choice-color-off: var(--color-primary);--RadioGroup-choice-color-off-hover: var(--color-brand-hover);--RadioGroup-choice-background-off: var(--island-bg-color);--RadioGroup-choice-background-off-active: var(--color-surface-high);--RadioGroup-choice-color-on: var(--color-surface-lowest);--RadioGroup-choice-background-on: var(--color-primary);--RadioGroup-choice-background-on-hover: var(--color-brand-hover);--RadioGroup-choice-background-on-active: var(--color-brand-active)}.excalidraw .RadioGroup{box-sizing:border-box;display:flex;flex-direction:row;align-items:flex-start;padding:3px;border-radius:10px;background:var(--RadioGroup-background);border:1px solid var(--RadioGroup-border)}.excalidraw .RadioGroup__choice{position:relative;display:flex;align-items:center;justify-content:center;width:32px;height:24px;color:var(--RadioGroup-choice-color-off);background:var(--RadioGroup-choice-background-off);border-radius:8px;font-family:"Assistant";font-style:normal;font-weight:600;font-size:.75rem;line-height:100%;-webkit-user-select:none;user-select:none;letter-spacing:.4px;transition:all 75ms ease-out}.excalidraw .RadioGroup__choice:hover{color:var(--RadioGroup-choice-color-off-hover)}.excalidraw .RadioGroup__choice:active{background:var(--RadioGroup-choice-background-off-active)}.excalidraw .RadioGroup__choice.active{color:var(--RadioGroup-choice-color-on);background:var(--RadioGroup-choice-background-on)}.excalidraw .RadioGroup__choice.active:hover{background:var(--RadioGroup-choice-background-on-hover)}.excalidraw .RadioGroup__choice.active:active{background:var(--RadioGroup-choice-background-on-active)}.excalidraw .RadioGroup__choice input{z-index:1;position:absolute;width:100%;height:100%;margin:0;padding:0;border-radius:8px;-webkit-appearance:none;appearance:none;cursor:pointer}',""]),Q.Z=l},8208:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .sidebar{display:flex;flex-direction:column;position:absolute;top:0;bottom:0;right:0;z-index:5;margin:0;padding:0;box-sizing:border-box;background-color:var(--sidebar-bg-color);box-shadow:var(--sidebar-shadow);pointer-events:var(--ui-pointerEvents);overflow:hidden;border-radius:0;width:calc(302px - var(--space-factor) * 2);border-left:1px solid var(--sidebar-border-color)}:root[dir=rtl] .excalidraw .sidebar{left:0;right:auto}.excalidraw .sidebar--docked{box-shadow:none}:root[dir=rtl] .excalidraw .sidebar{border-right:1px solid var(--sidebar-border-color);border-left:0}.excalidraw .sidebar__header{box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;width:100%;padding:1rem .75rem;position:relative}.excalidraw .sidebar__header::after{content:"";width:calc(100% - 1.5rem);height:1px;background:var(--sidebar-border-color);position:absolute;bottom:-1px}.excalidraw .sidebar__header__buttons{gap:0;display:flex;align-items:center;margin-left:auto}.excalidraw .sidebar__header__buttons button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface));--button-bg: transparent;border:0 !important;width:var(--lg-button-size);height:var(--lg-button-size);padding:0}.excalidraw .sidebar__header__buttons button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .sidebar__header__buttons button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .sidebar__header__buttons button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .sidebar__header__buttons button.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .sidebar__header__buttons button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .sidebar__header__buttons button.active svg{color:var(--button-color, var(--color-on-primary-container))}.excalidraw .sidebar__header__buttons button svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .sidebar__header__buttons button:hover{background:var(--button-hover-bg, var(--island-bg-color))}.excalidraw .sidebar__header__buttons .sidebar__dock.selected svg{stroke:var(--color-primary);fill:var(--color-primary)}.excalidraw .sidebar-tabs-root{display:flex;flex-direction:column;flex:1 1 auto;padding:1rem 0}.excalidraw .sidebar-tabs-root [role=tabpanel]{flex:1;outline:none;flex:1 1 auto;display:flex;flex-direction:column;outline:none}.excalidraw .sidebar-tabs-root [role=tabpanel][data-state=inactive]{display:none !important}.excalidraw .sidebar-tabs-root [role=tablist]{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit, minmax(0, 1fr))}.excalidraw .sidebar-tabs-root>.sidebar__header{padding-top:0;padding-bottom:1rem}.excalidraw .sidebar-tab-trigger{--button-width: auto;--button-bg: transparent;--button-hover-bg: transparent;--button-active-bg: var(--color-primary);--button-hover-color: var(--color-primary);--button-hover-border: var(--color-primary)}.excalidraw .sidebar-tab-trigger[data-state=active]{--button-bg: var(--color-primary);--button-hover-bg: var(--color-primary-darker);--button-hover-color: var(--color-icon-white);--button-border: var(--color-primary);color:var(--color-icon-white)}.excalidraw .default-sidebar{display:flex;flex-direction:column}.excalidraw .default-sidebar .sidebar-triggers{display:flex;gap:0;padding:2px;margin-top:-3px;margin-bottom:-3px;border:1px solid var(--sidebar-border-color);background:var(--default-bg-color);border-radius:.625rem}.excalidraw .default-sidebar .sidebar-triggers .sidebar-tab-trigger{height:var(--lg-button-size);width:var(--lg-button-size);border:none}',""]),Q.Z=l},7051:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .sidebar-trigger{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface));border:none;box-shadow:0 0 0 1px var(--color-surface-lowest);background-color:var(--color-surface-low);width:auto;height:var(--lg-button-size);display:flex;align-items:center;gap:.5rem;line-height:0;font-size:.75rem;letter-spacing:.4px}.excalidraw .sidebar-trigger svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .sidebar-trigger:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .sidebar-trigger:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .sidebar-trigger.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .sidebar-trigger.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .sidebar-trigger.active svg{color:var(--button-color, var(--color-on-primary-container))}.excalidraw .sidebar-trigger:active{box-shadow:0 0 0 1px var(--color-brand-active)}.excalidraw .sidebar-trigger svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .default-sidebar-trigger .sidebar-trigger__label{display:block}.excalidraw.excalidraw--mobile .default-sidebar-trigger .sidebar-trigger__label{display:none}",""]),Q.Z=l},5892:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".excalidraw .Spinner{display:flex;align-items:center;justify-content:center;height:100%;margin-left:auto;margin-right:auto;--spinner-color: var(--icon-fill-color)}.excalidraw .Spinner svg{-webkit-animation:rotate 1.6s linear infinite;animation:rotate 1.6s linear infinite;-webkit-animation-delay:var(--spinner-delay);animation-delay:var(--spinner-delay);-webkit-transform-origin:center center;transform-origin:center center}.excalidraw .Spinner circle{stroke:var(--spinner-color);-webkit-animation:dash 1.6s linear 0s infinite;animation:dash 1.6s linear 0s infinite;stroke-linecap:round}@-webkit-keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}@keyframes dash{0%{stroke-dasharray:1,300;stroke-dashoffset:0}50%{stroke-dasharray:150,300;stroke-dashoffset:-200}100%{stroke-dasharray:1,300;stroke-dashoffset:-280}}",""]),Q.Z=l},3874:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".excalidraw .Stack{--gap: 0;display:grid;gap:calc(var(--space-factor)*var(--gap))}.excalidraw .Stack_vertical{grid-template-columns:auto;grid-auto-flow:row;grid-auto-rows:-webkit-min-content;grid-auto-rows:min-content}.excalidraw .Stack_horizontal{grid-template-rows:auto;grid-auto-flow:column;grid-auto-columns:-webkit-min-content;grid-auto-columns:min-content}",""]),Q.Z=l},2681:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Stats{position:absolute;top:64px;right:12px;font-size:12px;z-index:10;pointer-events:var(--ui-pointerEvents)}.excalidraw .Stats h3{margin:0 24px 8px 0;white-space:nowrap}.excalidraw .Stats .close{float:right;height:16px;width:16px;cursor:pointer}.excalidraw .Stats .close svg{width:100%;height:100%}.excalidraw .Stats table{width:100%}.excalidraw .Stats table th{border-bottom:1px solid var(--input-border-color);padding:4px}.excalidraw .Stats table tr td:nth-child(2){min-width:24px;text-align:right}:root[dir=rtl] .excalidraw .Stats{left:12px;right:initial}:root[dir=rtl] .excalidraw .Stats h3{margin:0 0 8px 24px}:root[dir=rtl] .excalidraw .Stats .close{float:left}",""]),Q.Z=l},7802:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--Switch-disabled-color: var(--color-border-outline);--Switch-disabled-toggled-background: var(--color-border-outline-variant);--Switch-disabled-border: var(--color-border-outline-variant);--Switch-track-background: var(--island-bg-color);--Switch-thumb-background: var(--color-on-surface);--Switch-hover-background: var(--color-brand-hover);--Switch-active-background: var(--color-brand-active)}.excalidraw .Switch{position:relative;box-sizing:border-box;width:40px;height:20px;border-radius:12px;transition-property:background,border;transition-duration:150ms;transition-timing-function:ease-out;background:var(--Switch-track-background);border:1px solid var(--Switch-disabled-color)}.excalidraw .Switch:hover{background:var(--Switch-track-background);border:1px solid var(--Switch-hover-background)}.excalidraw .Switch:active{border:1px solid var(--Switch-active-background)}.excalidraw .Switch.toggled{background:var(--color-primary);border:1px solid var(--color-primary)}.excalidraw .Switch.toggled:hover{background:var(--color-primary-darker);border:1px solid var(--color-primary-darker)}.excalidraw .Switch.disabled{background:var(--Switch-track-background);border:1px solid var(--Switch-disabled-border)}.excalidraw .Switch.disabled.toggled{background:var(--Switch-disabled-toggled-background);border:1px solid var(--Switch-disabled-toggled-background)}.excalidraw .Switch:before{content:"";box-sizing:border-box;display:block;pointer-events:none;position:absolute;border-radius:100%;transition:all 150ms ease-out;width:10px;height:10px;top:4px;left:4px;background:var(--Switch-thumb-background)}.excalidraw .Switch:active:before{width:12px}.excalidraw .Switch.toggled:before{width:14px;height:14px;left:22px;top:2px;background:var(--Switch-track-background)}.excalidraw .Switch.toggled:active:before{width:16px;left:20px}.excalidraw .Switch.disabled:before{background:var(--Switch-disabled-color)}.excalidraw .Switch.disabled.toggled:before{background:var(--Switch-disabled-color)}.excalidraw .Switch input{width:100%;height:100%;margin:0;border-radius:12px;-webkit-appearance:none;appearance:none;cursor:pointer}.excalidraw .Switch input:disabled{cursor:unset}',""]),Q.Z=l},6759:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .TextInput{display:inline-block}",""]),Q.Z=l},9650:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .Toast{-webkit-animation:fade-in .5s;animation:fade-in .5s;background-color:var(--button-gray-1);border-radius:4px;bottom:10px;box-sizing:border-box;cursor:default;left:50%;margin-left:-150px;padding:4px 0;position:absolute;text-align:center;width:300px;z-index:999999}.excalidraw .Toast .Toast__message{padding:0 1.6rem;color:var(--popup-text-color);white-space:pre-wrap}.excalidraw .Toast .close{position:absolute;top:0;right:0;padding:.4rem}.excalidraw .Toast .close .ToolIcon__icon{width:1.2rem;height:1.2rem}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes fade-in{from{opacity:0}to{opacity:1}}",""]),Q.Z=l},2044:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .ToolIcon{border-radius:var(--border-radius-lg);display:inline-flex;align-items:center;position:relative;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;user-select:none}.excalidraw .ToolIcon__hidden{display:none !important}.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon{--icon-fill-color: var(--color-on-primary-container)}.excalidraw .ToolIcon.fillable .ToolIcon_type_radio:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon.fillable .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg{fill:var(--icon-fill-color)}.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon,.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon{background:var(--color-surface-primary-container);--keybinding-color: var(--color-on-primary-container)}.excalidraw .ToolIcon .ToolIcon_type_radio:checked+.ToolIcon__icon svg,.excalidraw .ToolIcon .ToolIcon_type_checkbox:checked+.ToolIcon__icon svg{color:var(--color-on-primary-container)}.excalidraw .ToolIcon .ToolIcon__keybinding{bottom:4px;right:4px}.excalidraw .ToolIcon .ToolIcon__icon:hover{background:var(--button-hover-bg)}.excalidraw .ToolIcon .ToolIcon__icon:active{background:var(--button-hover-bg);border:1px solid var(--button-active-border)}.excalidraw .ToolIcon .ToolIcon__icon:active svg{color:var(--color-on-primary-container)}.excalidraw .ToolIcon--plain{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon--plain .ToolIcon__icon{width:2rem;height:2rem}.excalidraw .ToolIcon_type_radio,.excalidraw .ToolIcon_type_checkbox{position:absolute;opacity:0;pointer-events:none}.excalidraw .ToolIcon__icon{box-sizing:border-box;width:var(--default-button-size);height:var(--default-button-size);color:var(--icon-fill-color);display:flex;justify-content:center;align-items:center;border-radius:var(--border-radius-lg)}.excalidraw .ToolIcon__icon+.ToolIcon__label{-webkit-margin-start:0;margin-inline-start:0}.excalidraw .ToolIcon__icon svg{position:relative;width:var(--default-icon-size);height:var(--default-icon-size);color:var(--icon-fill-color)}.excalidraw .ToolIcon__label{display:flex;align-items:center;color:var(--icon-fill-color);font-family:var(--ui-font);margin:0 .8em;text-overflow:ellipsis}.excalidraw .ToolIcon__label .Spinner{margin-left:.6em}.excalidraw .ToolIcon_size_small .ToolIcon__icon{width:2rem;height:2rem;font-size:.8em}.excalidraw .ToolIcon_type_button,.excalidraw .Modal .ToolIcon_type_button,.excalidraw .ToolIcon_type_button{padding:0;border:none;margin:0;font-size:inherit;background-color:initial}.excalidraw .ToolIcon_type_button:focus-visible,.excalidraw .Modal .ToolIcon_type_button:focus-visible,.excalidraw .ToolIcon_type_button:focus-visible{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .ToolIcon_type_button.ToolIcon--selected,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected,.excalidraw .ToolIcon_type_button.ToolIcon--selected{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .Modal .ToolIcon_type_button.ToolIcon--selected:active,.excalidraw .ToolIcon_type_button.ToolIcon--selected:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_button:active,.excalidraw .Modal .ToolIcon_type_button:active,.excalidraw .ToolIcon_type_button:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon_type_button--show,.excalidraw .Modal .ToolIcon_type_button--show,.excalidraw .ToolIcon_type_button--show{visibility:visible}.excalidraw .ToolIcon_type_button--hide,.excalidraw .Modal .ToolIcon_type_button--hide,.excalidraw .ToolIcon_type_button--hide{display:none !important}.excalidraw .ToolIcon_type_floating{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:hover{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating:active{background-color:rgba(0,0,0,0)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon{background-color:var(--button-gray-1);width:2rem;height:2rem}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:hover{background-color:var(--button-gray-2)}.excalidraw .ToolIcon_type_floating .ToolIcon__icon:active{background-color:var(--button-gray-3)}.excalidraw .ToolIcon__keybinding{position:absolute;bottom:2px;right:3px;font-size:.625rem;color:var(--keybinding-color);font-family:var(--ui-font);-webkit-user-select:none;user-select:none}:root[dir=ltr] .excalidraw .unlocked-icon{left:2px}:root[dir=rtl] .excalidraw .unlocked-icon{right:2px}.excalidraw .App-toolbar-container .ToolIcon__icon{width:var(--lg-button-size);height:var(--lg-button-size)}@media screen and (max-width: 450px){.excalidraw .App-toolbar-container .ToolIcon__icon{width:1.8rem;height:1.8rem}}@media screen and (max-width: 379px){.excalidraw .App-toolbar-container .ToolIcon__icon{width:1.5rem;height:1.5rem}}.excalidraw .App-toolbar-container .ToolIcon__icon svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .App-toolbar-container .ToolIcon__LaserPointer .ToolIcon__icon{width:var(--default-button-size);height:var(--default-button-size)}",""]),Q.Z=l},9144:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .App-toolbar.zen-mode .ToolIcon__keybinding,.excalidraw .App-toolbar.zen-mode .HintViewer{display:none}.excalidraw .App-toolbar__divider{width:1px;height:1.5rem;align-self:center;background-color:var(--default-border-color);margin:0 .25rem}.excalidraw--mobile.excalidraw .App-toolbar__divider{margin:0}.excalidraw .App-toolbar__extra-tools-trigger{box-shadow:none;border:0;background-color:rgba(0,0,0,0)}.excalidraw .App-toolbar__extra-tools-trigger:active{background-color:var(--button-hover-bg);box-shadow:0 0 0 1px var(--button-active-border, var(--color-primary-darkest)) inset}.excalidraw .App-toolbar__extra-tools-trigger--selected,.excalidraw .App-toolbar__extra-tools-trigger--selected:hover{background:var(--color-primary-light);color:var(--color-primary)}.excalidraw .App-toolbar__extra-tools-dropdown{margin-top:.375rem;right:0;min-width:11.875rem;z-index:1}",""]),Q.Z=l},6626:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-tooltip{--ui-font: Assistant, system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;font-family:var(--ui-font);position:fixed;z-index:var(--zIndex-popup);padding:8px;border-radius:6px;box-sizing:border-box;pointer-events:none;word-wrap:break-word;background:#000;line-height:1.5;text-align:center;font-size:13px;font-weight:500;color:#fff;display:none}.excalidraw-tooltip.excalidraw-tooltip--visible{display:block}.excalidraw-tooltip-wrapper{display:flex}.excalidraw-tooltip-icon{width:.9em;height:.9em;margin-left:5px;margin-top:1px;display:flex}.excalidraw--mobile.excalidraw-tooltip-icon{display:none}",""]),Q.Z=l},6359:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".excalidraw .UserList{pointer-events:none;padding:var(--space-factor) var(--space-factor) var(--space-factor) var(--space-factor);display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:.625rem;max-height:140px;max-width:290px;overflow:hidden}.excalidraw .UserList:empty{display:none}.excalidraw .UserList>*{pointer-events:var(--ui-pointerEvents)}.excalidraw .UserList_mobile{padding:0;justify-content:normal;margin:.5rem 0}",""]),Q.Z=l},7399:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .dropdown-menu{position:absolute;top:100%;margin-top:.25rem}.excalidraw .dropdown-menu--mobile{left:0;width:100%;row-gap:.75rem}.excalidraw .dropdown-menu--mobile .dropdown-menu-container{padding:8px 8px;box-sizing:border-box;box-shadow:var(--shadow-island);border-radius:var(--border-radius-lg);position:relative;transition:box-shadow .5s ease-in-out}.excalidraw .dropdown-menu--mobile .dropdown-menu-container.zen-mode{box-shadow:none}.excalidraw .dropdown-menu .dropdown-menu-container{background-color:var(--island-bg-color);max-height:calc(100vh - 150px);overflow-y:auto;--gap: 2}.excalidraw .dropdown-menu .dropdown-menu-item-base{display:flex;padding:0 .625rem;-webkit-column-gap:.625rem;column-gap:.625rem;font-size:.875rem;color:var(--color-on-surface);width:100%;box-sizing:border-box;font-weight:normal;font-family:inherit}.excalidraw .dropdown-menu .dropdown-menu-item{background-color:rgba(0,0,0,0);border:1px solid rgba(0,0,0,0);align-items:center;height:2rem;cursor:pointer;border-radius:var(--border-radius-md)}@media screen and (min-width: 1921px){.excalidraw .dropdown-menu .dropdown-menu-item{height:2.25rem}}.excalidraw .dropdown-menu .dropdown-menu-item--selected{background:var(--color-primary-light);--icon-fill-color: var(--color-primary-darker)}.excalidraw .dropdown-menu .dropdown-menu-item__text{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.excalidraw .dropdown-menu .dropdown-menu-item__shortcut{-webkit-margin-start:auto;margin-inline-start:auto;opacity:.5}.excalidraw .dropdown-menu .dropdown-menu-item:hover{background-color:var(--button-hover-bg);text-decoration:none}.excalidraw .dropdown-menu .dropdown-menu-item:active{background-color:var(--button-hover-bg);border-color:var(--color-brand-active)}.excalidraw .dropdown-menu .dropdown-menu-item svg{width:1rem;height:1rem;display:block}.excalidraw .dropdown-menu .dropdown-menu-item-custom{margin-top:.5rem}.excalidraw .dropdown-menu .dropdown-menu-group-title{font-size:14px;text-align:left;margin:10px 0;font-weight:500}.excalidraw .dropdown-menu-button{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface));width:var(--lg-button-size);height:var(--lg-button-size);--background: var(--color-surface-mid);background-color:var(--background)}.excalidraw .dropdown-menu-button svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .dropdown-menu-button:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .dropdown-menu-button:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .dropdown-menu-button.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .dropdown-menu-button.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .dropdown-menu-button.active svg{color:var(--button-color, var(--color-on-primary-container))}.excalidraw.theme--dark.excalidraw .dropdown-menu-button{--background: var(--color-surface-high)}.excalidraw.theme--dark.excalidraw .dropdown-menu-button:hover{--background: #363541}.excalidraw .dropdown-menu-button:hover{--background: var(--color-surface-high);background-color:var(--background);text-decoration:none}.excalidraw .dropdown-menu-button:active{border-color:var(--color-primary)}.excalidraw .dropdown-menu-button svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .dropdown-menu-button--mobile{border:none;margin:0;padding:0;width:var(--default-button-size);height:var(--default-button-size)}",""]),Q.Z=l},8793:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".footer-center{pointer-events:none;display:flex;width:100%;justify-content:flex-start;-webkit-margin-end:.6rem;margin-inline-end:.6rem}.footer-center>*{pointer-events:var(--ui-pointerEvents)}",""]),Q.Z=l},3397:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,':export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw .collab-button{--button-bg: var(--color-primary);--button-color: white;--button-border: var(--color-primary);--button-width: var(--lg-button-size);--button-height: var(--lg-button-size);--button-hover-bg: var(--color-primary-darker);--button-hover-border: var(--color-primary-darker);--button-active-bg: var(--color-primary-darker);box-shadow:0 0 0 1px var(--color-surface-lowest);flex-shrink:0}.excalidraw .collab-button.active.active{background-color:#0fb884;border-color:#0fb884}.excalidraw .collab-button.active.active svg{color:#fff}.excalidraw .collab-button.active.active:hover,.excalidraw .collab-button.active.active:active{background-color:#0fb884;border-color:#0fb884}.excalidraw.theme--dark .collab-button{color:var(--color-gray-90)}.excalidraw .CollabButton.is-collaborating{background-color:var(--button-special-active-bg-color)}.excalidraw .CollabButton.is-collaborating .ToolIcon__icon svg,.excalidraw .CollabButton.is-collaborating .ToolIcon__label{color:var(--icon-green-fill-color)}.excalidraw .CollabButton-collaborators{min-width:1em;min-height:1em;line-height:1;position:absolute;bottom:-5px;padding:3px;border-radius:50%;background-color:#b2f2bb;color:#2b8a3e;font-size:.6rem;font-family:"Cascadia"}:root[dir=ltr] .excalidraw .CollabButton-collaborators{right:-5px}:root[dir=rtl] .excalidraw .CollabButton-collaborators{left:-5px}',""]),Q.Z=l},4343:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".excalidraw .ActiveFile .ActiveFile__fileName{display:flex;align-items:center}.excalidraw .ActiveFile .ActiveFile__fileName span{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:9.3em}.excalidraw .ActiveFile .ActiveFile__fileName svg{width:1.15em;-webkit-margin-end:.3em;margin-inline-end:.3em;-webkit-transform:scaleY(0.9);transform:scaleY(0.9)}",""]),Q.Z=l},1569:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,'.excalidraw .virgil{font-family:"Virgil"}.excalidraw .welcome-screen-decor{pointer-events:none;color:var(--color-gray-40)}.excalidraw .welcome-screen-decor a{--color: var(--color-primary);color:var(--color);text-decoration:none;margin-bottom:-6px}.excalidraw.theme--dark .welcome-screen-decor{color:var(--color-gray-60)}@media(max-height: 599px){.excalidraw .welcome-screen-decor-hint{display:none !important}}@media(max-width: 1024px),(max-width: 800px){.excalidraw .welcome-screen-decor-hint .welcome-screen-decor--help,.excalidraw .welcome-screen-decor-hint .welcome-screen-decor--menu{display:none}}.excalidraw .welcome-screen-decor-hint--help{display:flex;position:absolute;right:0;bottom:100%}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--help{left:0;right:auto}.excalidraw .welcome-screen-decor-hint--help svg{margin-top:.5rem;width:85px;height:71px;-webkit-transform:scaleX(-1) rotate(80deg);transform:scaleX(-1) rotate(80deg)}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--help svg{-webkit-transform:rotate(80deg);transform:rotate(80deg)}.excalidraw .welcome-screen-decor-hint--toolbar{position:absolute;top:100%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);margin-top:2.5rem;display:flex;align-items:baseline}.excalidraw .welcome-screen-decor-hint--toolbar .welcome-screen-decor-hint__label{width:120px;position:relative;top:-0.5rem}.excalidraw .welcome-screen-decor-hint--toolbar svg{width:38px;height:78px}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--toolbar svg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .welcome-screen-decor-hint--menu{position:absolute;width:320px;font-size:1rem;top:100%;margin-top:.25rem;-webkit-margin-start:.6rem;margin-inline-start:.6rem;display:flex;align-items:flex-end;gap:.5rem}.excalidraw .welcome-screen-decor-hint--menu svg{width:41px;height:94px}:root[dir=rtl] .excalidraw .welcome-screen-decor-hint--menu svg{-webkit-transform:scaleX(-1);transform:scaleX(-1)}@media(max-width: 860px){.excalidraw .welcome-screen-decor-hint--menu .welcome-screen-decor-hint__label{max-width:160px}}.excalidraw .welcome-screen-center{display:flex;flex-direction:column;gap:2rem;justify-content:center;align-items:center;position:absolute;pointer-events:none;left:1rem;top:1rem;right:1rem;bottom:1rem}.excalidraw .welcome-screen-center__logo{display:flex;align-items:center;-webkit-column-gap:.75rem;column-gap:.75rem;font-size:2.25rem}.excalidraw .welcome-screen-center__heading{font-size:1.125rem;text-align:center}.excalidraw .welcome-screen-menu{display:flex;flex-direction:column;gap:2px;justify-content:center;align-items:center}.excalidraw .welcome-screen-menu-item{box-sizing:border-box;pointer-events:var(--ui-pointerEvents);color:var(--color-gray-50);font-size:.875rem;width:100%;min-width:300px;max-width:400px;display:grid;align-items:center;justify-content:space-between;background:none;border:1px solid rgba(0,0,0,0);padding:.75rem;border-radius:var(--border-radius-md);grid-template-columns:calc(var(--default-icon-size) + .5rem) 1fr 3rem}.excalidraw .welcome-screen-menu-item__text{display:flex;align-items:center;margin-right:auto;text-align:left;-webkit-column-gap:.5rem;column-gap:.5rem}.excalidraw .welcome-screen-menu-item__icon{width:var(--default-icon-size);height:var(--default-icon-size)}.excalidraw .welcome-screen-menu-item__shortcut{margin-left:auto;color:var(--color-gray-40);font-size:.75rem}.excalidraw .welcome-screen-menu-item:hover{text-decoration:none;background:var(--button-hover-bg)}.excalidraw .welcome-screen-menu-item:hover .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw .welcome-screen-menu-item:hover .welcome-screen-menu-item__text{color:var(--color-gray-100)}.excalidraw .welcome-screen-menu-item:active{background:var(--button-hover-bg);border-color:var(--color-brand-active)}.excalidraw .welcome-screen-menu-item:active .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw .welcome-screen-menu-item:active .welcome-screen-menu-item__text{color:var(--color-gray-100)}.excalidraw .welcome-screen-menu-item:active--promo{color:var(--color-promo) !important}.excalidraw .welcome-screen-menu-item:active--promo:hover .welcome-screen-menu-item__text{color:var(--color-promo) !important}.excalidraw.theme--dark .welcome-screen-menu-item{color:var(--color-gray-60)}.excalidraw.theme--dark .welcome-screen-menu-item__shortcut{color:var(--color-gray-60)}.excalidraw.theme--dark .welcome-screen-menu-item:hover{background-color:var(--color-surface-low)}.excalidraw.theme--dark .welcome-screen-menu-item:hover .welcome-screen-menu-item__shortcut{color:var(--color-gray-50)}.excalidraw.theme--dark .welcome-screen-menu-item:hover .welcome-screen-menu-item__text{color:var(--color-gray-10)}.excalidraw.theme--dark .welcome-screen-menu-item:active .welcome-screen-menu-item__text{color:var(--color-gray-10)}@media(max-height: 599px){.excalidraw .welcome-screen-center{margin-top:4rem}}@media(min-height: 600px)and (max-height: 900px){.excalidraw .welcome-screen-center{margin-top:8rem}}@media(max-height: 500px),(max-width: 320px){.excalidraw .welcome-screen-center{display:none}}',""]),Q.Z=l},9915:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,".visually-hidden{position:absolute !important;height:1px;width:1px;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);white-space:nowrap;-webkit-user-select:none;user-select:none}.LoadingMessage{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999;display:flex;flex-direction:column;align-items:center;justify-content:center;pointer-events:none}.LoadingMessage .Spinner{font-size:2.8em}.LoadingMessage .LoadingMessage-text{margin-top:1em;font-size:.8em}.LoadingMessage--dark{background-color:#121212;color:#ced4da}",""]),Q.Z=l},9310:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f),v=t(1667),k=t.n(v),g=new URL(t(7984),t.b),a=new URL(t(1639),t.b),P=l()(j()),R=k()(g),K=k()(a);P.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}:export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw{--theme-filter: none;--button-destructive-bg-color: #ffe3e3;--button-destructive-color: #c92a2a;--button-gray-1: #e9ecef;--button-gray-2: #ced4da;--button-gray-3: #adb5bd;--button-special-active-bg-color: #ebfbee;--dialog-border-color: var(--color-gray-20);--dropdown-icon: url("+R+");--focus-highlight-color: #a5d8ff;--icon-fill-color: var(--color-on-surface);--icon-green-fill-color: #2b8a3e;--default-bg-color: #ffffff;--input-bg-color: #ffffff;--input-border-color: #ced4da;--input-hover-bg-color: #f1f3f5;--input-label-color: #495057;--island-bg-color: #ffffff;--keybinding-color: var(--color-gray-40);--link-color: #1c7ed6;--overlay-bg-color: rgba(255, 255, 255, 0.88);--popup-bg-color: var(--island-bg-color);--popup-secondary-bg-color: #f1f3f5;--popup-text-color: #000000;--popup-text-inverted-color: #ffffff;--select-highlight-color: #339af0;--shadow-island: 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17), 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08), 0px 7px 14px 0px rgba(0, 0, 0, 0.05);--button-hover-bg: var(--color-surface-high);--button-active-bg: var(--color-surface-high);--button-active-border: var(--color-brand-active);--default-border-color: var(--color-surface-high);--default-button-size: 2rem;--default-icon-size: 1rem;--lg-button-size: 2.25rem;--lg-icon-size: 1rem;--editor-container-padding: 1rem;--scrollbar-thumb: var(--button-gray-2);--scrollbar-thumb-hover: var(--button-gray-3);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-20);--sidebar-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--sidebar-border-color: var(--color-surface-high);--sidebar-bg-color: var(--island-bg-color);--library-dropdown-shadow: 0px 15px 6px rgba(0, 0, 0, 0.01), 0px 8px 5px rgba(0, 0, 0, 0.05), 0px 4px 4px rgba(0, 0, 0, 0.09), 0px 1px 2px rgba(0, 0, 0, 0.1), 0px 0px 0px rgba(0, 0, 0, 0.1);--space-factor: 0.25rem;--text-primary-color: var(--color-on-surface);--color-selection: #6965db;--color-icon-white: #ffffff;--color-primary: #6965db;--color-primary-darker: #5b57d1;--color-primary-darkest: #4a47b1;--color-primary-light: #e3e2fe;--color-primary-light-darker: #d7d5ff;--color-gray-10: #f5f5f5;--color-gray-20: #ebebeb;--color-gray-30: #d6d6d6;--color-gray-40: #b8b8b8;--color-gray-50: #999999;--color-gray-60: #7a7a7a;--color-gray-70: #5c5c5c;--color-gray-80: #3d3d3d;--color-gray-85: #242424;--color-gray-90: #1e1e1e;--color-gray-100: #121212;--color-warning: #fceeca;--color-warning-dark: #f5c354;--color-warning-darker: #f3ab2c;--color-warning-darkest: #ec8b14;--color-text-warning: var(--text-primary-color);--color-danger: #db6965;--color-danger-dark: #db6965;--color-danger-darker: #d65550;--color-danger-darkest: #d1413c;--color-danger-text: black;--color-danger-background: #fff0f0;--color-danger-icon-background: #ffdad6;--color-danger-color: #700000;--color-danger-icon-color: #700000;--color-warning-background: var(--color-warning);--color-warning-icon-background: var(--color-warning-dark);--color-warning-color: var(--text-primary-color);--color-warning-icon-color: var(--text-primary-color);--color-muted: var(--color-gray-30);--color-muted-darker: var(--color-gray-60);--color-muted-darkest: var(--color-gray-100);--color-muted-background: var(--color-gray-80);--color-muted-background-darker: var(--color-gray-100);--color-promo: #e70078;--color-success: #268029;--color-success-lighter: #cafccc;--color-logo-icon: var(--color-primary);--color-logo-text: #190064;--border-radius-md: 0.375rem;--border-radius-lg: 0.5rem;--color-surface-high: hsl(244, 100%, 97%);--color-surface-mid: hsl(240 25% 96%);--color-surface-low: hsl(240 25% 94%);--color-surface-lowest: #ffffff;--color-on-surface: #1b1b1f;--color-brand-hover: #5753d0;--color-on-primary-container: #030064;--color-surface-primary-container: #e0dfff;--color-brand-active: #4440bf;--color-border-outline: #767680;--color-border-outline-variant: #c5c5d0;--color-surface-primary-container: #e0dfff}@media screen and (min-device-width: 1921px){.excalidraw{--lg-button-size: 2.5rem;--lg-icon-size: 1.25rem;--default-button-size: 2.25rem;--default-icon-size: 1.25rem}}.excalidraw.theme--dark.theme--dark-background-none{background:none}.excalidraw.theme--dark{--theme-filter: invert(93%) hue-rotate(180deg);--button-destructive-bg-color: #5a0000;--button-destructive-color: #ffa8a8;--button-gray-1: #363636;--button-gray-2: #272727;--button-gray-3: #222;--button-special-active-bg-color: #204624;--dialog-border-color: var(--color-gray-80);--dropdown-icon: url("+K+');--focus-highlight-color: #228be6;--icon-green-fill-color: #69db7c;--default-bg-color: #121212;--input-bg-color: #121212;--input-border-color: #2e2e2e;--input-hover-bg-color: #181818;--input-label-color: #e9ecef;--island-bg-color: #232329;--keybinding-color: var(--color-gray-60);--link-color: #4dabf7;--overlay-bg-color: rgba(52, 58, 64, 0.12);--popup-secondary-bg-color: #222;--popup-text-color: #ced4da;--popup-text-inverted-color: #2c2c2c;--select-highlight-color: #4dabf7;--shadow-island: 0px 0px 0.9310142993927002px 0px rgba(0, 0, 0, 0.17), 0px 0px 3.1270833015441895px 0px rgba(0, 0, 0, 0.08), 0px 7px 14px 0px rgba(0, 0, 0, 0.05);--modal-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 41.7776px 33.4221px rgba(0, 0, 0, 0.0503198), 0px 22.3363px 17.869px rgba(0, 0, 0, 0.0417275), 0px 12.5216px 10.0172px rgba(0, 0, 0, 0.035), 0px 6.6501px 5.32008px rgba(0, 0, 0, 0.0282725), 0px 2.76726px 2.21381px rgba(0, 0, 0, 0.0196802);--avatar-border-color: var(--color-gray-85);--scrollbar-thumb: #343a40;--scrollbar-thumb-hover: #495057;--color-selection: #3530c4;--color-icon-white: var(--color-gray-90);--color-primary: #a8a5ff;--color-primary-darker: #b2aeff;--color-primary-darkest: #beb9ff;--color-primary-light: #4f4d6f;--color-primary-light-darker: #43415e;--color-text-warning: var(--color-gray-80);--color-danger: #ffa8a5;--color-danger-dark: #672120;--color-danger-darker: #8f2625;--color-danger-darkest: #ac2b29;--color-danger-text: #fbcbcc;--color-danger-background: #fbcbcc;--color-danger-icon-background: #672120;--color-danger-color: #261919;--color-danger-icon-color: #fbcbcc;--color-warning-background: var(--color-warning);--color-warning-icon-background: var(--color-warning-dark);--color-warning-color: var(--color-gray-80);--color-warning-icon-color: var(--color-gray-80);--color-muted: var(--color-gray-80);--color-muted-darker: var(--color-gray-60);--color-muted-darkest: var(--color-gray-20);--color-muted-background: var(--color-gray-40);--color-muted-background-darker: var(--color-gray-20);--color-promo: #d297ff;--color-logo-text: #e2dfff;--color-surface-high: hsl(245, 10%, 21%);--color-surface-low: hsl(240, 8%, 15%);--color-surface-mid: hsl(240 6% 10%);--color-surface-lowest: hsl(0, 0%, 7%);--color-on-surface: #e3e3e8;--color-brand-hover: #bbb8ff;--color-on-primary-container: #e0dfff;--color-surface-primary-container: #403e6a;--color-brand-active: #d0ccff;--color-border-outline: #8e8d9c;--color-border-outline-variant: #46464f;--color-surface-primary-container: #403e6a}:root{--zIndex-canvas: 1;--zIndex-interactiveCanvas: 2;--zIndex-wysiwyg: 3;--zIndex-layerUI: 4;--zIndex-eyeDropperBackdrop: 5;--zIndex-eyeDropperPreview: 6;--zIndex-modal: 1000;--zIndex-popup: 1001;--zIndex-toast: 999999;--sab: env(safe-area-inset-bottom);--sal: env(safe-area-inset-left);--sar: env(safe-area-inset-right);--sat: env(safe-area-inset-top)}.excalidraw{--ui-font: Assistant, system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;font-family:var(--ui-font);position:relative;overflow:hidden;color:var(--text-primary-color);display:flex;top:0;bottom:0;left:0;right:0;height:100%;width:100%;-webkit-user-select:none;user-select:none}.excalidraw button{cursor:pointer}.excalidraw:focus{outline:none}.excalidraw a{font-weight:500;text-decoration:none;color:var(--link-color)}.excalidraw a:hover{text-decoration:underline}.excalidraw canvas{touch-action:none;image-rendering:pixelated;image-rendering:-moz-crisp-edges;z-index:var(--zIndex-canvas)}.excalidraw canvas.interactive{z-index:var(--zIndex-interactiveCanvas)}.excalidraw__canvas-wrapper,.excalidraw__canvas.static{pointer-events:none}.excalidraw__canvas{position:absolute}.excalidraw__embeddable{width:100%;height:100%;border:0}.excalidraw__embeddable-container{position:absolute;z-index:2;-webkit-transform-origin:top left;transform-origin:top left;pointer-events:none}.excalidraw.theme--dark canvas{-webkit-filter:var(--theme-filter);filter:var(--theme-filter)}.excalidraw .FixedSideContainer{padding-top:var(--sat, 0);padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0)}.excalidraw .panelRow{display:flex;justify-content:space-between}.excalidraw .panelColumn{display:flex;flex-direction:column;row-gap:.75rem}.excalidraw .panelColumn h3,.excalidraw .panelColumn legend,.excalidraw .panelColumn .control-label{margin:0;margin-bottom:.25rem;font-size:.75rem;color:var(--text-primary-color);font-weight:normal;display:block}.excalidraw .panelColumn .control-label input{display:block;width:100%}.excalidraw .panelColumn legend{padding:0}.excalidraw .panelColumn .iconSelectList{flex-wrap:wrap;position:relative}.excalidraw .panelColumn .buttonList{flex-wrap:wrap;display:flex;-webkit-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem}.excalidraw .panelColumn .buttonList label{font-size:.75rem}.excalidraw .panelColumn .buttonList input[type=radio],.excalidraw .panelColumn .buttonList input[type=button]{opacity:0;position:absolute;pointer-events:none}.excalidraw .panelColumn .buttonList .iconRow{margin-top:8px}.excalidraw .panelColumn fieldset{margin:0;padding:0;border:none}.excalidraw .divider{width:1px;background-color:#e9ecef;margin:1px}.excalidraw .welcome-screen-menu-item:focus-visible,.excalidraw .dropdown-menu-item:focus-visible,.excalidraw button:focus-visible,.excalidraw .buttonList label:focus-within,.excalidraw input:focus-visible{outline:rgba(0,0,0,0);box-shadow:0 0 0 1px var(--color-brand-hover)}.excalidraw .buttonList .ToolIcon__icon{all:unset !important;display:flex !important}.excalidraw .buttonList button{background-color:rgba(0,0,0,0)}.excalidraw .buttonList label,.excalidraw .buttonList button,.excalidraw .buttonList .zIndexButton{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface));padding:0}.excalidraw .buttonList label svg,.excalidraw .buttonList button svg,.excalidraw .buttonList .zIndexButton svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .buttonList label:hover,.excalidraw .buttonList button:hover,.excalidraw .buttonList .zIndexButton:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .buttonList label:active,.excalidraw .buttonList button:active,.excalidraw .buttonList .zIndexButton:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .buttonList label.active,.excalidraw .buttonList button.active,.excalidraw .buttonList .zIndexButton.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .buttonList label.active:hover,.excalidraw .buttonList button.active:hover,.excalidraw .buttonList .zIndexButton.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .buttonList label.active svg,.excalidraw .buttonList button.active svg,.excalidraw .buttonList .zIndexButton.active svg{color:var(--button-color, var(--color-on-primary-container))}.excalidraw .buttonList label svg,.excalidraw .buttonList button svg,.excalidraw .buttonList .zIndexButton svg{width:var(--default-icon-size);height:var(--default-icon-size)}.excalidraw .App-top-bar{z-index:var(--zIndex-layerUI);display:flex;flex-direction:column;align-items:center}.excalidraw .App-bottom-bar{position:absolute;top:0;bottom:0;left:0;right:0;--bar-padding: calc(4 * var(--space-factor));padding-top:max(var(--bar-padding), var(--sat,0));padding-right:var(--sar, 0);padding-bottom:var(--sab, 0);padding-left:var(--sal, 0);z-index:4;display:flex;align-items:flex-end;pointer-events:none}.excalidraw .App-bottom-bar>.Island{width:100%;max-width:100%;min-width:100%;box-sizing:border-box;max-height:100%;display:flex;flex-direction:column;pointer-events:var(--ui-pointerEvents)}.excalidraw .App-bottom-bar>.Island .panelColumn{padding:8px 8px 0 8px}.excalidraw .App-toolbar{width:100%}.excalidraw .App-toolbar .eraser.ToolIcon:hover{--icon-fill-color: #fff;--keybinding-color: #fff}.excalidraw .App-toolbar .eraser.active{background-color:var(--color-primary)}.excalidraw .App-toolbar-content{display:flex;align-items:center;justify-content:space-between;padding:8px}.excalidraw .App-toolbar-content .dropdown-menu--mobile{bottom:55px;top:auto}.excalidraw .App-mobile-menu{width:100%;overflow-x:visible;overflow-y:auto;box-sizing:border-box;margin-bottom:var(--bar-padding)}.excalidraw .App-menu{display:grid;color:var(--icon-fill-color)}.excalidraw .shapes-section{display:flex;justify-content:center;pointer-events:none !important}.excalidraw .shapes-section>*{pointer-events:var(--ui-pointerEvents)}.excalidraw .App-menu_top{grid-template-columns:1fr 2fr 1fr;grid-gap:2rem;align-items:flex-start;cursor:default;pointer-events:none !important}.excalidraw .App-menu_top>*{pointer-events:var(--ui-pointerEvents)}@media(min-width: 1536px){.excalidraw .App-menu_top{grid-template-columns:1fr 1fr 1fr;grid-gap:3rem}}.excalidraw .App-menu_top>*:first-child{justify-self:flex-start}.excalidraw .App-menu_top>*:last-child{justify-self:flex-end}.excalidraw .App-menu_bottom{position:absolute;bottom:1rem;display:flex;justify-content:space-between;align-items:flex-start;cursor:default;pointer-events:none !important;box-sizing:border-box;padding:0 1rem}.excalidraw .App-menu_bottom--transition-left section{width:185px}.excalidraw .App-menu_bottom section{display:flex}.excalidraw .App-menu_bottom>*:first-child{justify-self:flex-start}.excalidraw .App-menu_bottom>*:last-child{justify-self:flex-end}.excalidraw .App-menu_left{grid-template-rows:1fr auto 1fr;height:100%}.excalidraw .App-menu_right{grid-template-rows:1fr;height:100%}.excalidraw .App-menu__left{overflow-y:auto;padding:.75rem;width:202px;box-sizing:border-box;position:absolute}.excalidraw .dropdown-select{height:1.5rem;padding:0;-webkit-padding-start:.5rem;padding-inline-start:.5rem;-webkit-padding-end:1.5rem;padding-inline-end:1.5rem;color:var(--icon-fill-color);background-color:var(--button-gray-1);border-radius:var(--space-factor);border:1px solid var(--button-gray-2);font-size:.8rem;font-family:inherit;outline:none;-webkit-appearance:none;appearance:none;background-image:var(--dropdown-icon);background-repeat:no-repeat;background-position:right .7rem top 50%,0 0;background-size:.65em auto,100%}:root[dir=rtl] .excalidraw .dropdown-select{background-position:left .7rem top 50%,0 0}.excalidraw .dropdown-select:focus{box-shadow:0 0 0 2px var(--focus-highlight-color)}.excalidraw .dropdown-select:hover{background-color:var(--button-gray-2)}.excalidraw .dropdown-select:active{background-color:var(--button-gray-2)}.excalidraw .dropdown-select__language{height:2rem;background-color:var(--island-bg-color);border-color:var(--default-border-color) !important;cursor:pointer}.excalidraw .dropdown-select__language:hover{background-color:var(--island-bg-color)}.excalidraw .scroll-back-to-content{border-radius:var(--border-radius-lg);background-color:var(--island-bg-color);color:var(--icon-fill-color);border:1px solid var(--default-border-color);padding:10px 20px;position:absolute;left:50%;bottom:30px;-webkit-transform:translateX(-50%);transform:translateX(-50%);pointer-events:var(--ui-pointerEvents);font-family:inherit}.excalidraw .scroll-back-to-content:hover{background-color:var(--button-hover-bg)}.excalidraw .scroll-back-to-content:active{border:1px solid var(--button-active-border)}.excalidraw .help-icon{display:flex;justify-content:center;align-items:center;padding:.625rem;width:var(--button-width, var(--default-button-size));height:var(--button-height, var(--default-button-size));box-sizing:border-box;border-width:1px;border-style:solid;border-color:var(--button-border, var(--default-border-color));border-radius:var(--border-radius-lg);cursor:pointer;background-color:var(--button-bg, var(--island-bg-color));color:var(--button-color, var(--color-on-surface));border:none;box-shadow:0 0 0 1px var(--color-surface-lowest);background-color:var(--color-surface-low);width:var(--lg-button-size);height:var(--lg-button-size)}.excalidraw .help-icon svg{width:var(--button-width, var(--lg-icon-size));height:var(--button-height, var(--lg-icon-size))}.excalidraw .help-icon:hover{background-color:var(--button-hover-bg, var(--island-bg-color));border-color:var(--button-hover-border, var(--button-border, var(--default-border-color)));color:var(--button-hover-color, var(--button-color, var(--text-primary-color, inherit)))}.excalidraw .help-icon:active{background-color:var(--button-active-bg, var(--island-bg-color));border-color:var(--button-active-border, var(--color-primary-darkest))}.excalidraw .help-icon.active{background-color:var(--button-selected-bg, var(--color-surface-primary-container));border-color:var(--button-selected-border, var(--color-surface-primary-container))}.excalidraw .help-icon.active:hover{background-color:var(--button-selected-hover-bg, var(--color-surface-primary-container))}.excalidraw .help-icon.active svg{color:var(--button-color, var(--color-on-primary-container))}.excalidraw .help-icon:active{box-shadow:0 0 0 1px var(--color-brand-active)}.excalidraw .help-icon svg{width:var(--lg-icon-size);height:var(--lg-icon-size)}.excalidraw .reset-zoom-button{font-family:var(--ui-font)}.excalidraw .finalize-button{display:grid;grid-auto-flow:column;gap:.4em;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw .undo-redo-buttons,.excalidraw .eraser-buttons{display:grid;grid-auto-flow:column;margin-top:auto;margin-bottom:auto;-webkit-margin-start:.6em;margin-inline-start:.6em}.excalidraw--mobile.excalidraw aside{display:none}.excalidraw--mobile.excalidraw .scroll-back-to-content{bottom:calc(80px + var(--sab, 0));z-index:-1}:root[dir=rtl] .excalidraw .rtl-mirror{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.excalidraw .zen-mode-visibility{visibility:visible;opacity:1;height:auto;width:auto;transition:opacity .5s}.excalidraw .zen-mode-visibility.zen-mode-visibility--hidden{visibility:hidden;opacity:0;height:0;width:0;transition:opacity .5s}.excalidraw .disable-pointerEvents{pointer-events:none !important}.excalidraw.excalidraw--view-mode .App-menu{display:flex;justify-content:space-between}.excalidraw input[type=text],.excalidraw textarea:not(.excalidraw-wysiwyg){color:var(--text-primary-color);border:1.5px solid var(--input-border-color);padding:.75rem;white-space:nowrap;border-radius:var(--space-factor);background-color:var(--input-bg-color)}.excalidraw input[type=text]:not(:focus):hover,.excalidraw textarea:not(.excalidraw-wysiwyg):not(:focus):hover{border-color:var(--color-brand-hover)}.excalidraw input[type=text]:focus,.excalidraw textarea:not(.excalidraw-wysiwyg):focus{outline:none;border-color:var(--color-brand-hover)}@media print{.excalidraw .App-bottom-bar,.excalidraw .FixedSideContainer,.excalidraw .layer-ui__wrapper{display:none}}.excalidraw ::-webkit-scrollbar{width:3px;height:3px}.excalidraw select::-webkit-scrollbar{width:10px}.excalidraw ::-webkit-scrollbar-thumb{background:var(--scrollbar-thumb);border-radius:10px}.excalidraw ::-webkit-scrollbar-thumb:hover{background:var(--scrollbar-thumb-hover)}.excalidraw ::-webkit-scrollbar-thumb:active{background:var(--scrollbar-thumb)}.excalidraw .mobile-misc-tools-container{position:absolute;top:calc(5rem - var(--editor-container-padding));right:calc(var(--editor-container-padding)*-1);display:flex;flex-direction:column;border:1px solid var(--sidebar-border-color);border-top-left-radius:var(--border-radius-lg);border-bottom-left-radius:var(--border-radius-lg);border-right:0;overflow:hidden;background-color:var(--island-bg-color)}.excalidraw .mobile-misc-tools-container .ToolIcon__icon{width:2rem;height:2rem;border-radius:0}.excalidraw .mobile-misc-tools-container .default-sidebar-trigger{border:0}.excalidraw .App-toolbar--mobile{overflow:visible;max-width:98vw}.excalidraw .App-toolbar--mobile .ToolIcon__keybinding{display:none}.excalidraw .UserList-Wrapper{margin:0;padding:0;border:none;text-align:left}.excalidraw .UserList-Wrapper legend{display:block;font-size:.75rem;font-weight:400;margin:0 0 .25rem;padding:0}.excalidraw .main-menu-trigger{border:none;box-shadow:0 0 0 1px var(--color-surface-lowest);background-color:var(--color-surface-low)}.excalidraw .main-menu-trigger:active{box-shadow:0 0 0 1px var(--color-brand-active)}.excalidraw .App-menu__left{--button-border: transparent;--button-bg: var(--color-surface-mid)}.excalidraw.theme--dark.excalidraw .App-menu__left{--button-hover-bg: #363541;--button-bg: var(--color-surface-high)}.ErrorSplash.excalidraw{min-height:100vh;padding:20px 0;overflow:auto;display:flex;align-items:center;justify-content:center;-webkit-user-select:text;user-select:text}.ErrorSplash.excalidraw .ErrorSplash-messageContainer{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;background-color:#ffe3e3;border:3px solid #c92a2a}.ErrorSplash.excalidraw .ErrorSplash-paragraph{margin:15px 0;max-width:600px}.ErrorSplash.excalidraw .ErrorSplash-paragraph.align-center{text-align:center}.ErrorSplash.excalidraw .bigger,.ErrorSplash.excalidraw .bigger button{font-size:1.1em}.ErrorSplash.excalidraw .smaller,.ErrorSplash.excalidraw .smaller button{font-size:.9em}.ErrorSplash.excalidraw .ErrorSplash-details{display:flex;flex-direction:column;align-items:flex-start}.ErrorSplash.excalidraw .ErrorSplash-details textarea{width:100%;margin:10px 0;font-family:"Cascadia";font-size:.8em}.excalidraw__embeddable-container .excalidraw__embeddable-container__inner{overflow:hidden;display:flex;align-items:center;justify-content:center;border-radius:var(--embeddable-radius)}.excalidraw__embeddable-container .excalidraw__embeddable__outer{width:100%;height:100%}.excalidraw__embeddable-container .excalidraw__embeddable__outer>*{border-radius:var(--embeddable-radius)}.excalidraw__embeddable-container .excalidraw__embeddable-hint{position:absolute;z-index:1;background:rgba(0,0,0,.5);padding:1rem 1.6rem;border-radius:12px;color:#fff;font-weight:bold;letter-spacing:.6px;font-family:"Assistant"}',""]),Q.Z=P},6464:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,"",""]),l.locals={themeFilter:"invert(93%) hue-rotate(180deg)",rightSidebarWidth:"302px"},Q.Z=l},5260:function(fe,Q,t){var T=t(8081),j=t.n(T),f=t(3645),l=t.n(f)()(j());l.push([fe.id,":export{themeFilter:invert(93%) hue-rotate(180deg);rightSidebarWidth:302px}.excalidraw-hyperlinkContainer{display:flex;align-items:center;justify-content:space-between;position:absolute;box-shadow:0px 2px 4px 0 rgba(0,0,0,.3);z-index:100;background:var(--island-bg-color);border-radius:var(--border-radius-md);box-sizing:border-box;min-height:42px}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer button{z-index:100}.excalidraw-hyperlinkContainer-input,.excalidraw-hyperlinkContainer-link{height:24px;padding:0 8px;line-height:24px;font-size:.9rem;font-weight:500;font-family:var(--ui-font)}.excalidraw-hyperlinkContainer-input{width:18rem;border:none;background-color:rgba(0,0,0,0);color:var(--text-primary-color);outline:none;border:none;box-shadow:none !important}.excalidraw-hyperlinkContainer-link{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:15rem}.excalidraw-hyperlinkContainer button{color:#228be6;background-color:rgba(0,0,0,0) !important;font-weight:500}.excalidraw-hyperlinkContainer button.excalidraw-hyperlinkContainer--remove{color:#c92a2a}.excalidraw-hyperlinkContainer--remove .ToolIcon__icon svg{color:#fa5252}.excalidraw-hyperlinkContainer .ToolIcon__icon{width:2rem;height:2rem}.excalidraw-hyperlinkContainer__buttons{flex:0 0 auto}",""]),Q.Z=l},3645:function(fe){fe.exports=function(Q){var t=[];return t.toString=function(){return this.map(function(T){var j="",f=T[5]!==void 0;return T[4]&&(j+="@supports (".concat(T[4],") {")),T[2]&&(j+="@media ".concat(T[2]," {")),f&&(j+="@layer".concat(T[5].length>0?" ".concat(T[5]):""," {")),j+=Q(T),f&&(j+="}"),T[2]&&(j+="}"),T[4]&&(j+="}"),j}).join("")},t.i=function(T,j,f,l,v){typeof T=="string"&&(T=[[null,T,void 0]]);var k={};if(f)for(var g=0;g<this.length;g++){var a=this[g][0];a!=null&&(k[a]=!0)}for(var P=0;P<T.length;P++){var R=[].concat(T[P]);f&&k[R[0]]||(v!==void 0&&(R[5]===void 0||(R[1]="@layer".concat(R[5].length>0?" ".concat(R[5]):""," {").concat(R[1],"}")),R[5]=v),j&&(R[2]&&(R[1]="@media ".concat(R[2]," {").concat(R[1],"}")),R[2]=j),l&&(R[4]?(R[1]="@supports (".concat(R[4],") {").concat(R[1],"}"),R[4]=l):R[4]="".concat(l)),t.push(R))}},t}},1667:function(fe){fe.exports=function(Q,t){return t||(t={}),Q&&(Q=String(Q.__esModule?Q.default:Q),/^['"].*['"]$/.test(Q)&&(Q=Q.slice(1,-1)),t.hash&&(Q+=t.hash),/["'() \t\n]|(%20)/.test(Q)||t.needQuotes?'"'.concat(Q.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):Q)}},8081:function(fe){fe.exports=function(Q){return Q[1]}},7392:function(fe,Q,t){t.d(Q,{JQ:function(){return xe},vD:function(){return be},y7:function(){return he}});var T=t(1930),j=t(7169),f=t(9937),l=t(7651),v=t(583),k=t(4761),g=t(3474),a=t(4183),P=t(9827),R=t(2767);function K(ce,D){var ne=typeof Symbol<"u"&&ce[Symbol.iterator]||ce["@@iterator"];if(!ne){if(Array.isArray(ce)||(ne=function(h,y){if(h){if(typeof h=="string")return U(h,y);var r=Object.prototype.toString.call(h).slice(8,-1);if(r==="Object"&&h.constructor&&(r=h.constructor.name),r==="Map"||r==="Set")return Array.from(h);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return U(h,y)}}(ce))||D){ne&&(ce=ne);var S=0,z=function(){};return{s:z,n:function(){return S>=ce.length?{done:!0}:{done:!1,value:ce[S++]}},e:function(h){throw h},f:z}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
41
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var A,E=!0,L=!1;return{s:function(){ne=ne.call(ce)},n:function(){var h=ne.next();return E=h.done,h},e:function(h){L=!0,A=h},f:function(){try{E||ne.return==null||ne.return()}finally{if(L)throw A}}}}function U(ce,D){(D==null||D>ce.length)&&(D=ce.length);for(var ne=0,S=new Array(D);ne<D;ne++)S[ne]=ce[ne];return S}function m(ce,D){var ne=Object.keys(ce);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(ce);D&&(S=S.filter(function(z){return Object.getOwnPropertyDescriptor(ce,z).enumerable})),ne.push.apply(ne,S)}return ne}function G(ce){for(var D=1;D<arguments.length;D++){var ne=arguments[D]!=null?arguments[D]:{};D%2?m(Object(ne),!0).forEach(function(S){(0,j.Z)(ce,S,ne[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ce,Object.getOwnPropertyDescriptors(ne)):m(Object(ne)).forEach(function(S){Object.defineProperty(ce,S,Object.getOwnPropertyDescriptor(ne,S))})}return ce}var he=(0,R.z)({name:"unbindText",contextItemLabel:"labels.unbindText",trackEvent:{category:"element"},predicate:function(ce,D,ne,S){return S.scene.getSelectedElements(D).some(function(z){return(0,a.Xo)(z)})},perform:function(ce,D,ne,S){return S.scene.getSelectedElements(D).forEach(function(z){var A=(0,k.WJ)(z);if(A){var E,L=(0,k.X1)(A.originalText,(0,P.mO)(A),A.lineHeight),h=L.width,y=L.height,r=L.baseline,M=(0,g.eR)(z.id);(0,g.kT)(z.id);var p=(0,k.FE)(z,A),c=p.x,w=p.y;(0,v.DR)(A,{containerId:null,width:h,height:y,baseline:r,text:A.originalText,x:c,y:w}),(0,v.DR)(z,{boundElements:(E=z.boundElements)===null||E===void 0?void 0:E.filter(function(O){return O.id!==A.id}),height:M||z.height})}}),{elements:ce,appState:D,commitToHistory:!0}}}),be=(0,R.z)({name:"bindText",contextItemLabel:"labels.bindText",trackEvent:{category:"element"},predicate:function(ce,D,ne,S){var z=S.scene.getSelectedElements(D);if(z.length===2){var A,E=(0,l.iB)(z[0])||(0,l.iB)(z[1]);if((0,a.mG)(z[0])?A=z[0]:(0,a.mG)(z[1])&&(A=z[1]),E&&A&&(0,k.WJ)(A)===null)return!0}return!1},perform:function(ce,D,ne,S){var z,A,E=S.scene.getSelectedElements(D);(0,l.iB)(E[0])&&(0,a.mG)(E[1])?(z=E[0],A=E[1]):(z=E[1],A=E[0]),(0,v.DR)(z,{containerId:A.id,verticalAlign:f.oX.MIDDLE,textAlign:f.I8.CENTER}),(0,v.DR)(A,{boundElements:(A.boundElements||[]).concat({type:"text",id:z.id})});var L=A.height;return(0,k.oN)(z,A),(0,g.h_)(A.id,L),{elements:we(ce,A,z),appState:G(G({},D),{},{selectedElementIds:(0,j.Z)({},A.id,!0)}),commitToHistory:!0}}}),we=function(ce,D,ne){var S=ce.slice(),z=S.findIndex(function(E){return E.id===ne.id});S.splice(z,1);var A=S.findIndex(function(E){return E.id===D.id});return S.splice(A+1,0,ne),S},xe=(0,R.z)({name:"wrapTextInContainer",contextItemLabel:"labels.createContainerFromText",trackEvent:{category:"element"},predicate:function(ce,D,ne,S){var z=S.scene.getSelectedElements(D),A=z.every(function(E){return(0,l.iB)(E)});return z.length>0&&A},perform:function(ce,D,ne,S){var z,A=S.scene.getSelectedElements(D),E=ce.slice(),L={},h=K(A);try{var y=function(){var r=z.value;if((0,l.iB)(r)){var M,p=(0,l.Up)({type:"rectangle",backgroundColor:D.currentItemBackgroundColor,boundElements:[].concat((0,T.Z)(r.boundElements||[]),[{id:r.id,type:"text"}]),angle:r.angle,fillStyle:D.currentItemFillStyle,strokeColor:D.currentItemStrokeColor,roughness:D.currentItemRoughness,strokeWidth:D.currentItemStrokeWidth,strokeStyle:D.currentItemStrokeStyle,roundness:D.currentItemRoundness==="round"?{type:(0,a.QI)("rectangle")?f.a6.ADAPTIVE_RADIUS:f.a6.PROPORTIONAL_RADIUS}:null,opacity:100,locked:!1,x:r.x-f.gK,y:r.y-f.gK,width:(0,k.NS)(r.width,"rectangle"),height:(0,k.NS)(r.height,"rectangle"),groupIds:r.groupIds,frameId:r.frameId});if((M=r.boundElements)!==null&&M!==void 0&&M.length){var c=r.boundElements.filter(function(w){return w.type==="arrow"}).map(function(w){return w.id});E.filter(function(w){return c.includes(w.id)}).forEach(function(w){var O,$,I=w.startBinding,C=w.endBinding;((O=I)===null||O===void 0?void 0:O.elementId)===r.id&&(I=G(G({},I),{},{elementId:p.id})),(($=C)===null||$===void 0?void 0:$.elementId)===r.id&&(C=G(G({},C),{},{elementId:p.id})),(I||C)&&(0,v.DR)(w,{startBinding:I,endBinding:C},!1)})}(0,v.DR)(r,{containerId:p.id,verticalAlign:f.oX.MIDDLE,boundElements:null,textAlign:f.I8.CENTER},!1),(0,k.oN)(r,p),E=function(w,O,$){var I=w.slice(),C=I.findIndex(function(N){return N.id===O.id});I.splice(C,1);var _=I.findIndex(function(N){return N.id===$.id});return I.splice(_,0,O),I}([].concat((0,T.Z)(E),[p]),p,r),L[p.id]=!0}};for(h.s();!(z=h.n()).done;)y()}catch(r){h.e(r)}finally{h.f()}return{elements:E,appState:G(G({},D),{},{selectedElementIds:L}),commitToHistory:!0}}})},6006:function(fe,Q,t){t.d(Q,{CZ:function(){return E},JB:function(){return L},Lo:function(){return A},Zp:function(){return h},eF:function(){return y},mo:function(){return z}});var T=t(2577),j=t(7169),f=t(193),l=t(8935),v=t(1512),k=t(9937),g=t(7651),a=t(8227),P=t(5491),R=t(4105),K=t(2382),U=t(4116),m=t(9827),G=t(2767),he=t(8925),be=t(583),we=t(6853),xe=t(9240),ce=t(7652),D=t(4512);function ne(r,M){var p=Object.keys(r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);M&&(c=c.filter(function(w){return Object.getOwnPropertyDescriptor(r,w).enumerable})),p.push.apply(p,c)}return p}function S(r){for(var M=1;M<arguments.length;M++){var p=arguments[M]!=null?arguments[M]:{};M%2?ne(Object(p),!0).forEach(function(c){(0,j.Z)(r,c,p[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(p)):ne(Object(p)).forEach(function(c){Object.defineProperty(r,c,Object.getOwnPropertyDescriptor(p,c))})}return r}(0,G.z)({name:"changeViewBackgroundColor",trackEvent:!1,predicate:function(r,M,p,c){return!!c.props.UIOptions.canvasActions.changeViewBackgroundColor&&!M.viewModeEnabled},perform:function(r,M,p){return{appState:S(S({},M),p),commitToHistory:!!p.viewBackgroundColor}},PanelComponent:function(r){var M=r.elements,p=r.appState,c=r.updateData;return r.appProps,(0,D.jsx)(f.z,{palette:null,topPicks:xe.ay,label:(0,a.t)("labels.canvasBackground"),type:"canvasBackground",color:p.viewBackgroundColor,onChange:function(w){return c({viewBackgroundColor:w})},"data-testid":"canvas-background-picker",elements:M,appState:p,updateData:c})}});var z=(0,G.z)({name:"clearCanvas",trackEvent:{category:"canvas"},predicate:function(r,M,p,c){return!!c.props.UIOptions.canvasActions.clearCanvas&&!M.viewModeEnabled},perform:function(r,M,p,c){return c.imageCache.clear(),{elements:r.map(function(w){return(0,be.BE)(w,{isDeleted:!0})}),appState:S(S({},(0,we.im)()),{},{files:{},theme:M.theme,penMode:M.penMode,penDetected:M.penDetected,exportBackground:M.exportBackground,exportEmbedScene:M.exportEmbedScene,gridSize:M.gridSize,showStats:M.showStats,pasteDialog:M.pasteDialog,activeTool:M.activeTool.type==="image"?S(S({},M.activeTool),{},{type:"selection"}):M.activeTool}),commitToHistory:!0}}}),A=(0,G.z)({name:"zoomIn",viewMode:!0,trackEvent:{category:"canvas"},perform:function(r,M,p,c){return{appState:S(S({},M),(0,U.E)({viewportX:M.width/2+M.offsetLeft,viewportY:M.height/2+M.offsetTop,nextZoom:(0,R.j)(M.zoom.value+k.V4)},M)),commitToHistory:!1}},PanelComponent:function(r){var M=r.updateData;return(0,D.jsx)(v.V,{type:"button",className:"zoom-in-button zoom-button",icon:l.Sd,title:"".concat((0,a.t)("buttons.zoomIn")," — ").concat((0,m.uY)("CtrlOrCmd++")),"aria-label":(0,a.t)("buttons.zoomIn"),onClick:function(){M(null)}})},keyTest:function(r){return(r.code===P.aU.EQUAL||r.code===P.aU.NUM_ADD)&&(r[P.tW.CTRL_OR_CMD]||r.shiftKey)}}),E=(0,G.z)({name:"zoomOut",viewMode:!0,trackEvent:{category:"canvas"},perform:function(r,M,p,c){return{appState:S(S({},M),(0,U.E)({viewportX:M.width/2+M.offsetLeft,viewportY:M.height/2+M.offsetTop,nextZoom:(0,R.j)(M.zoom.value-k.V4)},M)),commitToHistory:!1}},PanelComponent:function(r){var M=r.updateData;return(0,D.jsx)(v.V,{type:"button",className:"zoom-out-button zoom-button",icon:l.xL,title:"".concat((0,a.t)("buttons.zoomOut")," — ").concat((0,m.uY)("CtrlOrCmd+-")),"aria-label":(0,a.t)("buttons.zoomOut"),onClick:function(){M(null)}})},keyTest:function(r){return(r.code===P.aU.MINUS||r.code===P.aU.NUM_SUBTRACT)&&(r[P.tW.CTRL_OR_CMD]||r.shiftKey)}}),L=((0,G.z)({name:"resetZoom",viewMode:!0,trackEvent:{category:"canvas"},perform:function(r,M,p,c){return{appState:S(S({},M),(0,U.E)({viewportX:M.width/2+M.offsetLeft,viewportY:M.height/2+M.offsetTop,nextZoom:(0,R.j)(1)},M)),commitToHistory:!1}},PanelComponent:function(r){var M=r.updateData,p=r.appState;return(0,D.jsx)(he.u,{label:(0,a.t)("buttons.resetZoom"),style:{height:"100%"},children:(0,D.jsxs)(v.V,{type:"button",className:"reset-zoom-button zoom-button",title:(0,a.t)("buttons.resetZoom"),"aria-label":(0,a.t)("buttons.resetZoom"),onClick:function(){M(null)},children:[(100*p.zoom.value).toFixed(0),"%"]})})},keyTest:function(r){return(r.code===P.aU.ZERO||r.code===P.aU.NUM_ZERO)&&(r[P.tW.CTRL_OR_CMD]||r.shiftKey)}}),function(r){var M,p,c,w=r.targetElements,O=r.appState,$=r.fitToViewport,I=$!==void 0&&$,C=r.viewportZoomFactor,_=C===void 0?.7:C,N=(0,g.KP)((0,g.Lm)(w)),q=(0,T.Z)(N,4),pe=q[0],te=q[1],ve=q[2],ae=q[3],H=(pe+ve)/2,le=(te+ae)/2;if(I){var ke=ve-pe,Le=ae-te;M=Math.min(O.width/ke,O.height/Le)*Math.min(1,Math.max(_,.1)),M=Math.min(Math.max(M,.1),30),p=O.width/2*(1/M)-H,c=O.height/2*(1/M)-le}else{M=function(Ne,Ce){var Oe=(0,T.Z)(Ne,4),De=Oe[0],Ae=Oe[1],ie=Oe[2],Ie=Oe[3],oe=ie-De,s=Ce.width/oe,u=Ie-Ae,x=Ce.height/u,V=Math.min(s,x),W=Math.floor(V/k.V4)*k.V4;return Math.min(Math.max(W,k.Zj),1)}(N,{width:O.width,height:O.height});var Ge=(0,K.s)({scenePoint:{x:H,y:le},viewportDimensions:{width:O.width,height:O.height},zoom:{value:M}});p=Ge.scrollX,c=Ge.scrollY}return{appState:S(S({},O),{},{scrollX:p,scrollY:c,zoom:{value:M}}),commitToHistory:!1}}),h=((0,G.z)({name:"zoomToFitSelectionInViewport",trackEvent:{category:"canvas"},perform:function(r,M,p,c){var w=c.scene.getSelectedElements(M);return L({targetElements:w.length?w:r,appState:M,fitToViewport:!1})},keyTest:function(r){return r.code===P.aU.TWO&&r.shiftKey&&!r.altKey&&!r[P.tW.CTRL_OR_CMD]}}),(0,G.z)({name:"zoomToFitSelection",trackEvent:{category:"canvas"},perform:function(r,M,p,c){var w=c.scene.getSelectedElements(M);return L({targetElements:w.length?w:r,appState:M,fitToViewport:!0})},keyTest:function(r){return r.code===P.aU.THREE&&r.shiftKey&&!r.altKey&&!r[P.tW.CTRL_OR_CMD]}}),(0,G.z)({name:"zoomToFit",viewMode:!0,trackEvent:{category:"canvas"},perform:function(r,M){return L({targetElements:r,appState:M,fitToViewport:!1})},keyTest:function(r){return r.code===P.aU.ONE&&r.shiftKey&&!r.altKey&&!r[P.tW.CTRL_OR_CMD]}}),(0,G.z)({name:"toggleTheme",viewMode:!0,trackEvent:{category:"canvas"},perform:function(r,M,p){return{appState:S(S({},M),{},{theme:p||(M.theme===k.C6.LIGHT?k.C6.DARK:k.C6.LIGHT)}),commitToHistory:!1}},keyTest:function(r){return r.altKey&&r.shiftKey&&r.code===P.aU.D},predicate:function(r,M,p,c){return!!c.props.UIOptions.canvasActions.toggleTheme}})),y=((0,G.z)({name:"toggleEraserTool",trackEvent:{category:"toolbar"},perform:function(r,M){var p;return p=(0,we.EN)(M)?(0,m.Om)(M,S(S({},M.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,m.Om)(M,{type:"eraser",lastActiveToolBeforeEraser:M.activeTool}),{appState:S(S({},M),{},{selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:p}),commitToHistory:!0}},keyTest:function(r){return r.key===P.tW.E}}),(0,G.z)({name:"toggleHandTool",trackEvent:{category:"toolbar"},perform:function(r,M,p,c){var w;return(0,we.l$)(M)?w=(0,m.Om)(M,S(S({},M.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(w=(0,m.Om)(M,{type:"hand",lastActiveToolBeforeEraser:M.activeTool}),(0,ce.KJ)(c.interactiveCanvas,k.oc.GRAB)),{appState:S(S({},M),{},{selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null,activeTool:w}),commitToHistory:!0}},keyTest:function(r){return!r.altKey&&!r[P.tW.CTRL_OR_CMD]&&r.key===P.tW.H}}))},5047:function(fe,Q,t){t.d(Q,{FA:function(){return S},ZM:function(){return ne},jK:function(){return z},uN:function(){return ce},yQ:function(){return D},zp:function(){return A}});var T=t(7169),j=t(8950),f=t(2975),l=t.n(f),v=t(5491),k=t(2767),g=t(4694),a=t(2448),P=t(2435),R=t(7651),K=t(8227),U=t(9937);function m(E,L){var h=Object.keys(E);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(E);L&&(y=y.filter(function(r){return Object.getOwnPropertyDescriptor(E,r).enumerable})),h.push.apply(h,y)}return h}function G(E){for(var L=1;L<arguments.length;L++){var h=arguments[L]!=null?arguments[L]:{};L%2?m(Object(h),!0).forEach(function(y){(0,T.Z)(E,y,h[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(h)):m(Object(h)).forEach(function(y){Object.defineProperty(E,y,Object.getOwnPropertyDescriptor(h,y))})}return E}var he,be,we,xe,ce=(0,k.z)({name:"copy",trackEvent:{category:"element"},perform:(he=(0,j.Z)(l().mark(function E(L,h,y,r){var M;return l().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return M=r.scene.getSelectedElements({selectedElementIds:h.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),p.prev=1,p.next=4,(0,g.vQ)(M,r.files,y);case 4:p.next=9;break;case 6:return p.prev=6,p.t0=p.catch(1),p.abrupt("return",{commitToHistory:!1,appState:G(G({},h),{},{errorMessage:p.t0.message})});case 9:return p.abrupt("return",{commitToHistory:!1});case 10:case"end":return p.stop()}},E,null,[[1,6]])})),function(E,L,h,y){return he.apply(this,arguments)}),contextItemLabel:"labels.copy",keyTest:void 0}),D=(0,k.z)({name:"paste",trackEvent:{category:"element"},perform:(be=(0,j.Z)(l().mark(function E(L,h,y,r){var M;return l().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.prev=0,p.next=3,(0,g.Se)();case 3:M=p.sent,p.next=14;break;case 6:if(p.prev=6,p.t0=p.catch(0),p.t0.name!=="AbortError"&&p.t0.name!=="NotAllowedError"){p.next=10;break}return p.abrupt("return",!1);case 10:if(console.error("actionPaste ".concat(p.t0.name,": ").concat(p.t0.message)),!U.vU){p.next=13;break}return p.abrupt("return",{commitToHistory:!1,appState:G(G({},h),{},{errorMessage:(0,K.t)("hints.firefox_clipboard_write")})});case 13:return p.abrupt("return",{commitToHistory:!1,appState:G(G({},h),{},{errorMessage:(0,K.t)("errors.asyncPasteFailedOnRead")})});case 14:p.prev=14,r.pasteFromClipboard((0,g.OO)({types:M})),p.next=22;break;case 18:return p.prev=18,p.t1=p.catch(14),console.error(p.t1),p.abrupt("return",{commitToHistory:!1,appState:G(G({},h),{},{errorMessage:(0,K.t)("errors.asyncPasteFailedOnParse")})});case 22:return p.abrupt("return",{commitToHistory:!1});case 23:case"end":return p.stop()}},E,null,[[0,6],[14,18]])})),function(E,L,h,y){return be.apply(this,arguments)}),contextItemLabel:"labels.paste",keyTest:void 0}),ne=(0,k.z)({name:"cut",trackEvent:{category:"element"},perform:function(E,L,h,y){return ce.perform(E,L,h,y),a.X.perform(E,L)},contextItemLabel:"labels.cut",keyTest:function(E){return E[v.tW.CTRL_OR_CMD]&&E.key===v.tW.X}}),S=(0,k.z)({name:"copyAsSvg",trackEvent:{category:"element"},perform:(we=(0,j.Z)(l().mark(function E(L,h,y,r){var M,p,c;return l().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(r.canvas){w.next=2;break}return w.abrupt("return",{commitToHistory:!1});case 2:return M=(0,P.HD)(L,h,!0),p=M.exportedElements,c=M.exportingFrame,w.prev=3,w.next=6,(0,P.p1)("clipboard-svg",p,h,r.files,G(G({},h),{},{exportingFrame:c}));case 6:return w.abrupt("return",{commitToHistory:!1});case 9:return w.prev=9,w.t0=w.catch(3),console.error(w.t0),w.abrupt("return",{appState:G(G({},h),{},{errorMessage:w.t0.message}),commitToHistory:!1});case 13:case"end":return w.stop()}},E,null,[[3,9]])})),function(E,L,h,y){return we.apply(this,arguments)}),predicate:function(E){return g.wx&&E.length>0},contextItemLabel:"labels.copyAsSvg"}),z=(0,k.z)({name:"copyAsPng",trackEvent:{category:"element"},perform:(xe=(0,j.Z)(l().mark(function E(L,h,y,r){var M,p,c,w;return l().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if(r.canvas){O.next=2;break}return O.abrupt("return",{commitToHistory:!1});case 2:return M=r.scene.getSelectedElements({selectedElementIds:h.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),p=(0,P.HD)(L,h,!0),c=p.exportedElements,w=p.exportingFrame,O.prev=4,O.next=7,(0,P.p1)("clipboard",c,h,r.files,G(G({},h),{},{exportingFrame:w}));case 7:return O.abrupt("return",{appState:G(G({},h),{},{toast:{message:(0,K.t)("toast.copyToClipboardAsPng",{exportSelection:M.length?(0,K.t)("toast.selection"):(0,K.t)("toast.canvas"),exportColorScheme:h.exportWithDarkMode?(0,K.t)("buttons.darkMode"):(0,K.t)("buttons.lightMode")})}}),commitToHistory:!1});case 10:return O.prev=10,O.t0=O.catch(4),console.error(O.t0),O.abrupt("return",{appState:G(G({},h),{},{errorMessage:O.t0.message}),commitToHistory:!1});case 14:case"end":return O.stop()}},E,null,[[4,10]])})),function(E,L,h,y){return xe.apply(this,arguments)}),predicate:function(E){return g.vt&&E.length>0},contextItemLabel:"labels.copyAsPng",keyTest:function(E){return E.code===v.aU.C&&E.altKey&&E.shiftKey}}),A=(0,k.z)({name:"copyText",trackEvent:{category:"element"},perform:function(E,L,h,y){var r=y.scene.getSelectedElements({selectedElementIds:L.selectedElementIds,includeBoundTextElement:!0}).reduce(function(M,p){return(0,R.iB)(p)&&M.push(p.text),M},[]).join(`
|
|
42
|
+
|
|
43
|
+
`);return(0,g.dd)(r),{commitToHistory:!1}},predicate:function(E,L,h,y){return g.wx&&y.scene.getSelectedElements({selectedElementIds:L.selectedElementIds,includeBoundTextElement:!0}).some(R.iB)},contextItemLabel:"labels.copyText"})},2448:function(fe,Q,t){t.d(Q,{X:function(){return ce}});var T=t(7169),j=t(4105),f=t(5491),l=t(1512),v=t(8227),k=t(2767),g=t(7651),a=t(583),P=t(9215),R=t(7422),K=t(9645),U=t(4183),m=t(9827),G=t(8935),he=t(4512);function be(D,ne){var S=Object.keys(D);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(D);ne&&(z=z.filter(function(A){return Object.getOwnPropertyDescriptor(D,A).enumerable})),S.push.apply(S,z)}return S}function we(D){for(var ne=1;ne<arguments.length;ne++){var S=arguments[ne]!=null?arguments[ne]:{};ne%2?be(Object(S),!0).forEach(function(z){(0,T.Z)(D,z,S[z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(S)):be(Object(S)).forEach(function(z){Object.defineProperty(D,z,Object.getOwnPropertyDescriptor(S,z))})}return D}var xe=function(D,ne){if(D.editingGroupId){var S=(0,P.Fb)((0,g.Lm)(ne),D.editingGroupId);if(S.length)return we(we({},D),{},{selectedElementIds:(0,T.Z)({},S[0].id,!0)})}return D},ce=(0,k.z)({name:"deleteSelectedElements",trackEvent:{category:"element",action:"delete"},perform:function(D,ne){if(ne.editingLinearElement){var S=ne.editingLinearElement,z=S.elementId,A=S.selectedPointsIndices,E=S.startBindingElement,L=S.endBindingElement,h=R._.getElement(z);if(!h||A==null)return!1;if(h.points.length<2){var y=D.map(function(w){return w.id===h.id?(0,a.BE)(w,{isDeleted:!0}):w});return{elements:y,appState:we(we({},xe(ne,y)),{},{editingLinearElement:null}),commitToHistory:!1}}var r={startBindingElement:A!=null&&A.includes(0)?null:E,endBindingElement:A!=null&&A.includes(h.points.length-1)?null:L};return R._.deletePoints(h,A),{elements:D,appState:we(we({},ne),{},{editingLinearElement:we(we(we({},ne.editingLinearElement),r),{},{selectedPointsIndices:(A==null?void 0:A[0])>0?[A[0]-1]:[0]})}),commitToHistory:!0}}var M=function(w,O){var $=new Set((0,j.eD)(w.filter(function(I){return I.type==="frame"}),O).map(function(I){return I.id}));return{elements:w.map(function(I){return O.selectedElementIds[I.id]||I.frameId&&$.has(I.frameId)||(0,U.Xh)(I)&&O.selectedElementIds[I.containerId]?(0,a.BE)(I,{isDeleted:!0}):I}),appState:we(we({},O),{},{selectedElementIds:{},selectedGroupIds:{}})}}(D,ne),p=M.elements,c=M.appState;return(0,K.$q)(p,D.filter(function(w){var O=w.id;return ne.selectedElementIds[O]})),{elements:p,appState:we(we({},c=xe(c,p)),{},{activeTool:(0,m.Om)(ne,{type:"selection"}),multiElement:null,activeEmbeddable:null}),commitToHistory:(0,j.N)((0,g.Lm)(D),ne)}},contextItemLabel:"labels.delete",keyTest:function(D,ne,S){return(D.key===f.tW.BACKSPACE||D.key===f.tW.DELETE)&&!D[f.tW.CTRL_OR_CMD]},PanelComponent:function(D){var ne=D.elements,S=D.appState,z=D.updateData;return(0,he.jsx)(l.V,{type:"button",icon:G.XH,title:(0,v.t)("labels.delete"),"aria-label":(0,v.t)("labels.delete"),onClick:function(){return z(null)},visible:(0,j.N)((0,g.Lm)(ne),S)})}})},9672:function(fe,Q,t){t.d(Q,{$:function(){return P},U:function(){return R}});var T=t(7169),j=t(583),f=t(5491),l=t(9827),v=t(2767);function k(K,U){var m=Object.keys(K);if(Object.getOwnPropertySymbols){var G=Object.getOwnPropertySymbols(K);U&&(G=G.filter(function(he){return Object.getOwnPropertyDescriptor(K,he).enumerable})),m.push.apply(m,G)}return m}function g(K){for(var U=1;U<arguments.length;U++){var m=arguments[U]!=null?arguments[U]:{};U%2?k(Object(m),!0).forEach(function(G){(0,T.Z)(K,G,m[G])}):Object.getOwnPropertyDescriptors?Object.defineProperties(K,Object.getOwnPropertyDescriptors(m)):k(Object(m)).forEach(function(G){Object.defineProperty(K,G,Object.getOwnPropertyDescriptor(m,G))})}return K}var a=function(K){return K.every(function(U){return!U.locked})},P=(0,v.z)({name:"toggleElementLock",trackEvent:{category:"element"},predicate:function(K,U,m,G){return!G.scene.getSelectedElements(U).some(function(he){return he.locked&&he.frameId})},perform:function(K,U,m,G){var he=G.scene.getSelectedElements({selectedElementIds:U.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});if(!he.length)return!1;var be=a(he),we=(0,l.xn)(he);return{elements:K.map(function(xe){return we.has(xe.id)?(0,j.BE)(xe,{locked:be}):xe}),appState:g(g({},U),{},{selectedLinearElement:be?null:U.selectedLinearElement}),commitToHistory:!0}},contextItemLabel:function(K,U,m){var G=m.scene.getSelectedElements({selectedElementIds:U.selectedElementIds,includeBoundTextElement:!1});return G.length===1&&G[0].type!=="frame"?G[0].locked?"labels.elementLock.unlock":"labels.elementLock.lock":a(G)?"labels.elementLock.lockAll":"labels.elementLock.unlockAll"},keyTest:function(K,U,m,G){return K.key.toLocaleLowerCase()===f.tW.L&&K[f.tW.CTRL_OR_CMD]&&K.shiftKey&&G.scene.getSelectedElements({selectedElementIds:U.selectedElementIds,includeBoundTextElement:!1}).length>0}}),R=(0,v.z)({name:"unlockAllElements",trackEvent:{category:"canvas"},viewMode:!1,predicate:function(K){return K.some(function(U){return U.locked})},perform:function(K,U){var m=K.filter(function(G){return G.locked});return{elements:K.map(function(G){return G.locked?(0,j.BE)(G,{locked:!1}):G}),appState:g(g({},U),{},{selectedElementIds:Object.fromEntries(m.map(function(G){return[G.id,!0]}))}),commitToHistory:!0}},contextItemLabel:"labels.elementLock.unlockAll"})},4406:function(fe,Q,t){t.d(Q,{XA:function(){return De},Du:function(){return Ae},sK:function(){return Oe},zX:function(){return Ce},bJ:function(){return s},_d:function(){return oe},mM:function(){return Ie},ns:function(){return ie}});var T=t(8950),j=t(2577),f=t(7169),l=t(2975),v=t.n(l),k=t(8935),g=t(3379),a=t.n(g),P=t(7795),R=t.n(P),K=t(569),U=t.n(K),m=t(3565),G=t.n(m),he=t(9216),be=t.n(he),we=t(4589),xe=t.n(we),ce=t(6759),D={};D.styleTagTransform=xe(),D.setAttributes=G(),D.insert=U().bind(null,"head"),D.domAPI=R(),D.insertStyleElement=be(),a()(ce.Z,D),ce.Z&&ce.Z.locals&&ce.Z.locals;var ne=t(9787),S=t(9827),z=t(532),A={};A.styleTagTransform=xe(),A.setAttributes=G(),A.insert=U().bind(null,"head"),A.domAPI=R(),A.insertStyleElement=be(),a()(z.Z,A),z.Z&&z.Z.locals&&z.Z.locals;var E=t(8242),L=t(5491),h=t(4512),y=function(u){var x=(0,E.J0)().id,V=(0,ne.useState)(u.value),W=(0,j.Z)(V,2),re=W[0],ee=W[1];return(0,h.jsxs)("div",{className:"ProjectName",children:[(0,h.jsx)("label",{className:"ProjectName-label",htmlFor:"filename",children:"".concat(u.label).concat(u.isNameEditable?"":":")}),u.isNameEditable?(0,h.jsx)("input",{type:"text",className:"TextInput",onBlur:function(se){u.ignoreFocus||(0,S.qz)(se.target);var Ee=se.target.value;Ee!==u.value&&u.onChange(Ee)},onKeyDown:function(se){if(se.key===L.tW.ENTER){if(se.preventDefault(),se.nativeEvent.isComposing||se.keyCode===229)return;se.currentTarget.blur()}},id:"".concat(x,"-filename"),value:re,onChange:function(se){return ee(se.target.value)}}):(0,h.jsx)("span",{className:"TextInput TextInput--readonly",id:"".concat(x,"-filename"),children:u.value})]})},r=t(1512),M=t(8925),p=(t(3041),t(8227)),c=t(9937),w=function(u){var x=u.title||(u.value==="dark"?(0,p.t)("buttons.lightMode"):(0,p.t)("buttons.darkMode"));return(0,h.jsx)(r.V,{type:"icon",icon:u.value===c.C6.LIGHT?O.MOON:O.SUN,title:x,"aria-label":x,onClick:function(){return u.onChange(u.value===c.C6.DARK?c.C6.LIGHT:c.C6.DARK)},"data-testid":"toggle-dark-mode"})},O={SUN:(0,h.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,h.jsx)("path",{fill:"currentColor",d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"})}),MOON:(0,h.jsx)("svg",{width:"512",height:"512",className:"rtl-mirror",viewBox:"0 0 512 512",children:(0,h.jsx)("path",{fill:"currentColor",d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"})})},$=t(2435),I=t(5796);function C(u,x){var V=Object.keys(u);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(u);x&&(W=W.filter(function(re){return Object.getOwnPropertyDescriptor(u,re).enumerable})),V.push.apply(V,W)}return V}function _(u){for(var x=1;x<arguments.length;x++){var V=arguments[x]!=null?arguments[x]:{};x%2?C(Object(V),!0).forEach(function(W){(0,f.Z)(u,W,V[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(V)):C(Object(V)).forEach(function(W){Object.defineProperty(u,W,Object.getOwnPropertyDescriptor(V,W))})}return u}var N=function(){var u=(0,T.Z)(v().mark(function x(V,W,re){var ee,se,Ee,_e,Ue,We,Ye,Ze,Je;return v().wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:if(se=(ee=W).exportBackground,Ee=ee.viewBackgroundColor,_e=ee.name,Ue=ee.fileHandle,We=(0,I.Qk)(Ue),Ue&&(0,I.DQ)(We)){nt.next=4;break}throw new Error("fileHandle should exist and should be of type svg or png when resaving");case 4:return W=_(_({},W),{},{exportEmbedScene:!0}),Ye=(0,$.HD)(V,W,!1),Ze=Ye.exportedElements,Je=Ye.exportingFrame,nt.next=8,(0,$.p1)(We,Ze,W,re,{exportBackground:se,viewBackgroundColor:Ee,name:_e,fileHandle:Ue,exportingFrame:Je});case 8:return nt.abrupt("return",{fileHandle:Ue});case 9:case"end":return nt.stop()}},x)}));return function(x,V,W){return u.apply(this,arguments)}}(),q=t(2767),pe=t(6238),te=t(3668),ve=t(4105),ae=t(7651),H=t(6548);function le(u,x){var V=Object.keys(u);if(Object.getOwnPropertySymbols){var W=Object.getOwnPropertySymbols(u);x&&(W=W.filter(function(re){return Object.getOwnPropertyDescriptor(u,re).enumerable})),V.push.apply(V,W)}return V}function ke(u){for(var x=1;x<arguments.length;x++){var V=arguments[x]!=null?arguments[x]:{};x%2?le(Object(V),!0).forEach(function(W){(0,f.Z)(u,W,V[W])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(V)):le(Object(V)).forEach(function(W){Object.defineProperty(u,W,Object.getOwnPropertyDescriptor(V,W))})}return u}var Le,Ge,Ne,Ce=(0,q.z)({name:"changeProjectName",trackEvent:!1,perform:function(u,x,V){return{appState:ke(ke({},x),{},{name:V}),commitToHistory:!1}},PanelComponent:function(u){var x,V=u.appState,W=u.updateData,re=u.appProps,ee=u.data;return(0,h.jsx)(y,{label:(0,p.t)("labels.fileTitle"),value:V.name||"Unnamed",onChange:function(se){return W(se)},isNameEditable:re.name===void 0&&!V.viewModeEnabled,ignoreFocus:(x=ee==null?void 0:ee.ignoreFocus)!==null&&x!==void 0&&x})}}),Oe=(0,q.z)({name:"changeExportScale",trackEvent:{category:"export",action:"scale"},perform:function(u,x,V){return{appState:ke(ke({},x),{},{exportScale:V}),commitToHistory:!1}},PanelComponent:function(u){var x=u.elements,V=u.appState,W=u.updateData,re=(0,ae.Lm)(x),ee=(0,ve.N)(re,V)?(0,ve.eD)(re,V):re;return(0,h.jsx)(h.Fragment,{children:c.ZB.map(function(se){var Ee=(0,te.Cg)(ee,c.qy,se),_e=(0,j.Z)(Ee,2),Ue=_e[0],We=_e[1],Ye="".concat((0,p.t)("imageExportDialog.label.scale")," ").concat(se,"x (").concat(Ue,"x").concat(We,")");return(0,h.jsx)(r.V,{size:"small",type:"radio",icon:"".concat(se,"x"),name:"export-canvas-scale",title:Ye,"aria-label":Ye,id:"export-canvas-scale",checked:se===V.exportScale,onChange:function(){return W(se)}},se)})})}}),De=(0,q.z)({name:"changeExportBackground",trackEvent:{category:"export",action:"toggleBackground"},perform:function(u,x,V){return{appState:ke(ke({},x),{},{exportBackground:V}),commitToHistory:!1}},PanelComponent:function(u){var x=u.appState,V=u.updateData;return(0,h.jsx)(pe.o,{checked:x.exportBackground,onChange:function(W){return V(W)},children:(0,p.t)("imageExportDialog.label.withBackground")})}}),Ae=(0,q.z)({name:"changeExportEmbedScene",trackEvent:{category:"export",action:"embedScene"},perform:function(u,x,V){return{appState:ke(ke({},x),{},{exportEmbedScene:V}),commitToHistory:!1}},PanelComponent:function(u){var x=u.appState,V=u.updateData;return(0,h.jsxs)(pe.o,{checked:x.exportEmbedScene,onChange:function(W){return V(W)},children:[(0,p.t)("imageExportDialog.label.embedScene"),(0,h.jsx)(M.u,{label:(0,p.t)("imageExportDialog.tooltip.embedScene"),long:!0,children:(0,h.jsx)("div",{className:"excalidraw-tooltip-icon",children:k.Vl})})]})}}),ie=(0,q.z)({name:"saveToActiveFile",trackEvent:{category:"export"},predicate:function(u,x,V,W){return!!W.props.UIOptions.canvasActions.saveToActiveFile&&!!x.fileHandle&&!x.viewModeEnabled},perform:(Le=(0,T.Z)(v().mark(function u(x,V,W,re){var ee,se,Ee;return v().wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(ee=!!V.fileHandle,_e.prev=1,!(0,I.g8)(V.fileHandle)){_e.next=8;break}return _e.next=5,N(x,V,re.files);case 5:_e.t0=_e.sent,_e.next=11;break;case 8:return _e.next=10,(0,$.Um)(x,V,re.files);case 10:_e.t0=_e.sent;case 11:return se=_e.t0,Ee=se.fileHandle,_e.abrupt("return",{commitToHistory:!1,appState:ke(ke({},V),{},{fileHandle:Ee,toast:ee?{message:Ee!=null&&Ee.name?(0,p.t)("toast.fileSavedToFilename").replace("{filename}",'"'.concat(Ee.name,'"')):(0,p.t)("toast.fileSaved")}:null})});case 16:return _e.prev=16,_e.t1=_e.catch(1),(_e.t1===null||_e.t1===void 0?void 0:_e.t1.name)!=="AbortError"?console.error(_e.t1):console.warn(_e.t1),_e.abrupt("return",{commitToHistory:!1});case 20:case"end":return _e.stop()}},u,null,[[1,16]])})),function(u,x,V,W){return Le.apply(this,arguments)}),keyTest:function(u){return u.key===L.tW.S&&u[L.tW.CTRL_OR_CMD]&&!u.shiftKey}}),Ie=(0,q.z)({name:"saveFileToDisk",viewMode:!0,trackEvent:{category:"export"},perform:(Ge=(0,T.Z)(v().mark(function u(x,V,W,re){var ee,se;return v().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Ee.prev=0,Ee.next=3,(0,$.Um)(x,ke(ke({},V),{},{fileHandle:null}),re.files);case 3:return ee=Ee.sent,se=ee.fileHandle,Ee.abrupt("return",{commitToHistory:!1,appState:ke(ke({},V),{},{openDialog:null,fileHandle:se,toast:{message:(0,p.t)("toast.fileSaved")}})});case 8:return Ee.prev=8,Ee.t0=Ee.catch(0),(Ee.t0===null||Ee.t0===void 0?void 0:Ee.t0.name)!=="AbortError"?console.error(Ee.t0):console.warn(Ee.t0),Ee.abrupt("return",{commitToHistory:!1});case 12:case"end":return Ee.stop()}},u,null,[[0,8]])})),function(u,x,V,W){return Ge.apply(this,arguments)}),keyTest:function(u){return u.key===L.tW.S&&u.shiftKey&&u[L.tW.CTRL_OR_CMD]},PanelComponent:function(u){var x=u.updateData;return(0,h.jsx)(r.V,{type:"button",icon:k.po,title:(0,p.t)("buttons.saveAs"),"aria-label":(0,p.t)("buttons.saveAs"),showAriaLabel:(0,E.Fy)().editor.isMobile,hidden:!H.kr,onClick:function(){return x(null)},"data-testid":"save-as-button"})}}),oe=(0,q.z)({name:"loadScene",trackEvent:{category:"export"},predicate:function(u,x,V,W){return!!W.props.UIOptions.canvasActions.loadScene&&!x.viewModeEnabled},perform:(Ne=(0,T.Z)(v().mark(function u(x,V,W,re){var ee,se,Ee,_e;return v().wrap(function(Ue){for(;;)switch(Ue.prev=Ue.next){case 0:return Ue.prev=0,Ue.next=3,(0,$.n8)(V,x);case 3:return ee=Ue.sent,se=ee.elements,Ee=ee.appState,_e=ee.files,Ue.abrupt("return",{elements:se,appState:Ee,files:_e,commitToHistory:!0});case 10:if(Ue.prev=10,Ue.t0=Ue.catch(0),(Ue.t0===null||Ue.t0===void 0?void 0:Ue.t0.name)!=="AbortError"){Ue.next=15;break}return console.warn(Ue.t0),Ue.abrupt("return",!1);case 15:return Ue.abrupt("return",{elements:x,appState:ke(ke({},V),{},{errorMessage:Ue.t0.message}),files:re.files,commitToHistory:!1});case 16:case"end":return Ue.stop()}},u,null,[[0,10]])})),function(u,x,V,W){return Ne.apply(this,arguments)}),keyTest:function(u){return u[L.tW.CTRL_OR_CMD]&&u.key===L.tW.O}}),s=(0,q.z)({name:"exportWithDarkMode",trackEvent:{category:"export",action:"toggleTheme"},perform:function(u,x,V){return{appState:ke(ke({},x),{},{exportWithDarkMode:V}),commitToHistory:!1}},PanelComponent:function(u){var x=u.appState,V=u.updateData;return(0,h.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"-45px",marginBottom:"10px"},children:(0,h.jsx)(w,{value:x.exportWithDarkMode?c.C6.DARK:c.C6.LIGHT,onChange:function(W){V(W===c.C6.DARK)},title:(0,p.t)("imageExportDialog.label.darkMode")})})}})},3361:function(fe,Q,t){t.d(Q,{Tu:function(){return Ge},Zq:function(){return Ne}});var T=t(1930),j=t(7169),f=t(9240),l=t(3646),v=t(45),k=t(4512),g=function(Ce){return(0,k.jsx)("div",{className:"buttonList buttonListIcon",children:Ce.options.map(function(Oe){var De;return Ce.type==="button"?(0,k.jsx)("button",{onClick:function(Ae){return Ce.onClick(Oe.value,Ae)},className:(0,v.Z)({active:(De=Oe.active)!==null&&De!==void 0?De:Ce.value===Oe.value}),"data-testid":Oe.testId,title:Oe.text,children:Oe.icon},Oe.text):(0,k.jsxs)("label",{className:(0,v.Z)({active:Ce.value===Oe.value}),title:Oe.text,children:[(0,k.jsx)("input",{type:"radio",name:Ce.group,onChange:function(){return Ce.onChange(Oe.value)},checked:Ce.value===Oe.value,"data-testid":Oe.testId}),Oe.icon]},Oe.text)})})},a=t(193),P=t(2577),R=t(9787),K=t.n(R),U=t(3204),m=t(3379),G=t.n(m),he=t(7795),be=t.n(he),we=t(569),xe=t.n(we),ce=t(3565),D=t.n(ce),ne=t(9216),S=t.n(ne),z=t(4589),A=t.n(z),E=t(9478),L={};L.styleTagTransform=A(),L.setAttributes=D(),L.insert=xe().bind(null,"head"),L.domAPI=be(),L.insertStyleElement=S(),G()(E.Z,L),E.Z&&E.Z.locals&&E.Z.locals;var h=t(5491),y=t(8227);function r(Ce,Oe){var De=Object.keys(Ce);if(Object.getOwnPropertySymbols){var Ae=Object.getOwnPropertySymbols(Ce);Oe&&(Ae=Ae.filter(function(ie){return Object.getOwnPropertyDescriptor(Ce,ie).enumerable})),De.push.apply(De,Ae)}return De}function M(Ce){for(var Oe=1;Oe<arguments.length;Oe++){var De=arguments[Oe]!=null?arguments[Oe]:{};Oe%2?r(Object(De),!0).forEach(function(Ae){(0,j.Z)(Ce,Ae,De[Ae])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ce,Object.getOwnPropertyDescriptors(De)):r(Object(De)).forEach(function(Ae){Object.defineProperty(Ce,Ae,Object.getOwnPropertyDescriptor(De,Ae))})}return Ce}function p(Ce){var Oe=Ce.options,De=Ce.value,Ae=Ce.label,ie=Ce.onChange,Ie=Ce.onClose,oe=K().useRef(),s=K().useRef(),u=K().useRef(null);return K().useEffect(function(){s.current?s.current.focus():u.current&&u.current.focus()},[]),(0,k.jsx)("div",{className:"picker",role:"dialog","aria-modal":"true","aria-label":Ae,onKeyDown:function(x){var V=Oe.find(function(Ue){return Ue.keyBinding===x.key.toLowerCase()});if(x.metaKey||x.altKey||x.ctrlKey||!V)if(x.key===h.tW.TAB)setTimeout(function(){s.current!==document.activeElement&&Ie()},0);else if((0,h.Wl)(x.key)){var W=document.activeElement,re=(0,y.G3)().rtl,ee=Array.prototype.indexOf.call(u.current.children,W);if(ee!==-1){var se=Oe.length,Ee=ee;switch(x.key){case(re?h.tW.ARROW_LEFT:h.tW.ARROW_RIGHT):case h.tW.ARROW_DOWN:Ee=(ee+1)%se;break;case(re?h.tW.ARROW_RIGHT:h.tW.ARROW_LEFT):case h.tW.ARROW_UP:Ee=(se+ee-1)%se}u.current.children[Ee].focus()}x.preventDefault()}else x.key!==h.tW.ESCAPE&&x.key!==h.tW.ENTER||(x.preventDefault(),Ie());else{var _e=Oe.indexOf(V);u.current.children[_e].focus(),x.preventDefault()}x.nativeEvent.stopImmediatePropagation(),x.stopPropagation()},children:(0,k.jsx)("div",{className:"picker-content",ref:u,children:Oe.map(function(x,V){return(0,k.jsxs)("button",{className:(0,v.Z)("picker-option",{active:De===x.value}),onClick:function(W){W.currentTarget.focus(),ie(x.value)},title:"".concat(x.text," — ").concat(x.keyBinding.toUpperCase()),"aria-label":x.text||"none","aria-keyshortcuts":x.keyBinding,ref:function(W){W&&V===0&&(oe.current=W),W&&x.value===De&&(s.current=W)},onFocus:function(){ie(x.value)},children:[x.icon,(0,k.jsx)("span",{className:"picker-keybinding",children:x.keyBinding})]},x.text)})})})}function c(Ce){var Oe,De=Ce.value,Ae=Ce.label,ie=Ce.options,Ie=Ce.onChange,oe=Ce.group,s=oe===void 0?"":oe,u=K().useState(!1),x=(0,P.Z)(u,2),V=x[0],W=x[1],re=K().useRef(null),ee=(0,y.G3)().rtl;return(0,k.jsxs)("div",{children:[(0,k.jsx)("button",{name:s,className:V?"active":"","aria-label":Ae,onClick:function(){return W(!V)},ref:re,children:(Oe=ie.find(function(se){return se.value===De}))===null||Oe===void 0?void 0:Oe.icon}),(0,k.jsx)(K().Suspense,{fallback:"",children:V?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(U.J,M(M({onCloseRequest:function(se){return se.target!==re.current&&W(!1)}},ee?{right:5.5}:{left:-5.5}),{},{children:(0,k.jsx)(p,{options:ie,value:De,label:Ae,onChange:Ie,onClose:function(){var se;W(!1),(se=re.current)===null||se===void 0||se.focus()}})})),(0,k.jsx)("div",{className:"picker-triangle"})]}):null})]})}var w=t(8935),O=t(9937),$=t(7651),I=t(583),C=t(4761),_=t(4183),N=t(4643),q=t(4105),pe=t(1648),te=t(9827),ve=t(2767);function ae(Ce,Oe){var De=Object.keys(Ce);if(Object.getOwnPropertySymbols){var Ae=Object.getOwnPropertySymbols(Ce);Oe&&(Ae=Ae.filter(function(ie){return Object.getOwnPropertyDescriptor(Ce,ie).enumerable})),De.push.apply(De,Ae)}return De}function H(Ce){for(var Oe=1;Oe<arguments.length;Oe++){var De=arguments[Oe]!=null?arguments[Oe]:{};Oe%2?ae(Object(De),!0).forEach(function(Ae){(0,j.Z)(Ce,Ae,De[Ae])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ce,Object.getOwnPropertyDescriptors(De)):ae(Object(De)).forEach(function(Ae){Object.defineProperty(Ce,Ae,Object.getOwnPropertyDescriptor(De,Ae))})}return Ce}var le=function(Ce,Oe,De){var Ae=arguments.length>3&&arguments[3]!==void 0&&arguments[3],ie=(0,te.xn)((0,q.eD)(Ce,Oe,{includeBoundTextElement:Ae}));return Ce.map(function(Ie){var oe;return ie.get(Ie.id)||Ie.id===((oe=Oe.editingElement)===null||oe===void 0?void 0:oe.id)?De(Ie):Ie})},ke=function(Ce,Oe,De,Ae,ie){var Ie,oe=Oe.editingElement,s=(0,$.Lm)(Ce),u=null;return oe&&(u=De(oe)),u||(u=(0,q.N)(s,Oe)?(Ie=(0,q.PR)(Ae===!0?s:s.filter(function(x){return Ae(x)}),Oe,De))!==null&&Ie!==void 0?Ie:typeof ie=="function"?ie(!0):ie:typeof ie=="function"?ie(!1):ie),u},Le=function(Ce,Oe,De,Ae){var ie=new Set;return{elements:le(Ce,Oe,function(Ie){if((0,$.iB)(Ie)){var oe=De(Ie);ie.add(oe);var s=(0,I.BE)(Ie,{fontSize:oe});return(0,$.oN)(s,(0,C.tl)(Ie)),u=Ie,x=s,s=(0,_.Xh)(x)?x:(0,I.DR)(x,{x:u.textAlign==="left"?u.x:u.x+(u.width-x.width)/(u.textAlign==="center"?2:1),y:u.y+(u.height-x.height)/2},!1)}var u,x;return Ie},!0),appState:H(H({},Oe),{},{currentItemFontSize:ie.size===1?(0,T.Z)(ie)[0]:Ae??Oe.currentItemFontSize}),commitToHistory:!0}},Ge=((0,ve.z)({name:"changeStrokeColor",trackEvent:!1,perform:function(Ce,Oe,De){return H(H({},De.currentItemStrokeColor&&{elements:le(Ce,Oe,function(Ae){return(0,pe.PD)(Ae.type)?(0,I.BE)(Ae,{strokeColor:De.currentItemStrokeColor}):Ae},!0)}),{},{appState:H(H({},Oe),De),commitToHistory:!!De.currentItemStrokeColor})},PanelComponent:function(Ce){var Oe=Ce.elements,De=Ce.appState,Ae=Ce.updateData;return Ce.appProps,(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("h3",{"aria-hidden":"true",children:(0,y.t)("labels.stroke")}),(0,k.jsx)(a.z,{topPicks:f.fY,palette:f.Wk,type:"elementStroke",label:(0,y.t)("labels.stroke"),color:ke(Oe,De,function(ie){return ie.strokeColor},!0,De.currentItemStrokeColor),onChange:function(ie){return Ae({currentItemStrokeColor:ie})},elements:Oe,appState:De,updateData:Ae})]})}}),(0,ve.z)({name:"changeBackgroundColor",trackEvent:!1,perform:function(Ce,Oe,De){return H(H({},De.currentItemBackgroundColor&&{elements:le(Ce,Oe,function(Ae){return(0,I.BE)(Ae,{backgroundColor:De.currentItemBackgroundColor})})}),{},{appState:H(H({},Oe),De),commitToHistory:!!De.currentItemBackgroundColor})},PanelComponent:function(Ce){var Oe=Ce.elements,De=Ce.appState,Ae=Ce.updateData;return Ce.appProps,(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("h3",{"aria-hidden":"true",children:(0,y.t)("labels.background")}),(0,k.jsx)(a.z,{topPicks:f.eq,palette:f.SF,type:"elementBackground",label:(0,y.t)("labels.background"),color:ke(Oe,De,function(ie){return ie.backgroundColor},!0,De.currentItemBackgroundColor),onChange:function(ie){return Ae({currentItemBackgroundColor:ie})},elements:Oe,appState:De,updateData:Ae})]})}}),(0,ve.z)({name:"changeFillStyle",trackEvent:!1,perform:function(Ce,Oe,De,Ae){return(0,l.L)("element","changeFillStyle","".concat(De," (").concat(Ae.device.editor.isMobile?"mobile":"desktop",")")),{elements:le(Ce,Oe,function(ie){return(0,I.BE)(ie,{fillStyle:De})}),appState:H(H({},Oe),{},{currentItemFillStyle:De}),commitToHistory:!0}},PanelComponent:function(Ce){var Oe=Ce.elements,De=Ce.appState,Ae=Ce.updateData,ie=(0,q.eD)(Oe,De),Ie=ie.length>0&&ie.every(function(oe){return oe.fillStyle==="zigzag"});return(0,k.jsxs)("fieldset",{children:[(0,k.jsx)("legend",{children:(0,y.t)("labels.fill")}),(0,k.jsx)(g,{type:"button",options:[{value:"hachure",text:"".concat(Ie?(0,y.t)("labels.zigzag"):(0,y.t)("labels.hachure")," (").concat((0,te.uY)("Alt-Click"),")"),icon:Ie?w.lF:w.a0,active:!!Ie||void 0,testId:"fill-hachure"},{value:"cross-hatch",text:(0,y.t)("labels.crossHatch"),icon:w.np,testId:"fill-cross-hatch"},{value:"solid",text:(0,y.t)("labels.solid"),icon:w.X7,testId:"fill-solid"}],value:ke(Oe,De,function(oe){return oe.fillStyle},function(oe){return oe.hasOwnProperty("fillStyle")},function(oe){return oe?null:De.currentItemFillStyle}),onClick:function(oe,s){var u=s.altKey&&oe==="hachure"&&ie.every(function(x){return x.fillStyle==="hachure"})?"zigzag":oe;Ae(u)}})]})}}),(0,ve.z)({name:"changeStrokeWidth",trackEvent:!1,perform:function(Ce,Oe,De){return{elements:le(Ce,Oe,function(Ae){return(0,I.BE)(Ae,{strokeWidth:De})}),appState:H(H({},Oe),{},{currentItemStrokeWidth:De}),commitToHistory:!0}},PanelComponent:function(Ce){var Oe=Ce.elements,De=Ce.appState,Ae=Ce.updateData;return(0,k.jsxs)("fieldset",{children:[(0,k.jsx)("legend",{children:(0,y.t)("labels.strokeWidth")}),(0,k.jsx)(g,{group:"stroke-width",options:[{value:O.dg.thin,text:(0,y.t)("labels.thin"),icon:w.ZA,testId:"strokeWidth-thin"},{value:O.dg.bold,text:(0,y.t)("labels.bold"),icon:w.Wl,testId:"strokeWidth-bold"},{value:O.dg.extraBold,text:(0,y.t)("labels.extraBold"),icon:w.m9,testId:"strokeWidth-extraBold"}],value:ke(Oe,De,function(ie){return ie.strokeWidth},function(ie){return ie.hasOwnProperty("strokeWidth")},function(ie){return ie?null:De.currentItemStrokeWidth}),onChange:function(ie){return Ae(ie)}})]})}}),(0,ve.z)({name:"changeSloppiness",trackEvent:!1,perform:function(Ce,Oe,De){return{elements:le(Ce,Oe,function(Ae){return(0,I.BE)(Ae,{seed:(0,N.LU)(),roughness:De})}),appState:H(H({},Oe),{},{currentItemRoughness:De}),commitToHistory:!0}},PanelComponent:function(Ce){var Oe=Ce.elements,De=Ce.appState,Ae=Ce.updateData;return(0,k.jsxs)("fieldset",{children:[(0,k.jsx)("legend",{children:(0,y.t)("labels.sloppiness")}),(0,k.jsx)(g,{group:"sloppiness",options:[{value:0,text:(0,y.t)("labels.architect"),icon:w.bf},{value:1,text:(0,y.t)("labels.artist"),icon:w.kM},{value:2,text:(0,y.t)("labels.cartoonist"),icon:w.W2}],value:ke(Oe,De,function(ie){return ie.roughness},function(ie){return ie.hasOwnProperty("roughness")},function(ie){return ie?null:De.currentItemRoughness}),onChange:function(ie){return Ae(ie)}})]})}}),(0,ve.z)({name:"changeStrokeStyle",trackEvent:!1,perform:function(Ce,Oe,De){return{elements:le(Ce,Oe,function(Ae){return(0,I.BE)(Ae,{strokeStyle:De})}),appState:H(H({},Oe),{},{currentItemStrokeStyle:De}),commitToHistory:!0}},PanelComponent:function(Ce){var Oe=Ce.elements,De=Ce.appState,Ae=Ce.updateData;return(0,k.jsxs)("fieldset",{children:[(0,k.jsx)("legend",{children:(0,y.t)("labels.strokeStyle")}),(0,k.jsx)(g,{group:"strokeStyle",options:[{value:"solid",text:(0,y.t)("labels.strokeStyle_solid"),icon:w.ZA},{value:"dashed",text:(0,y.t)("labels.strokeStyle_dashed"),icon:w.a5},{value:"dotted",text:(0,y.t)("labels.strokeStyle_dotted"),icon:w.aT}],value:ke(Oe,De,function(ie){return ie.strokeStyle},function(ie){return ie.hasOwnProperty("strokeStyle")},function(ie){return ie?null:De.currentItemStrokeStyle}),onChange:function(ie){return Ae(ie)}})]})}}),(0,ve.z)({name:"changeOpacity",trackEvent:!1,perform:function(Ce,Oe,De){return{elements:le(Ce,Oe,function(Ae){return(0,I.BE)(Ae,{opacity:De})},!0),appState:H(H({},Oe),{},{currentItemOpacity:De}),commitToHistory:!0}},PanelComponent:function(Ce){var Oe,De=Ce.elements,Ae=Ce.appState,ie=Ce.updateData;return(0,k.jsxs)("label",{className:"control-label",children:[(0,y.t)("labels.opacity"),(0,k.jsx)("input",{type:"range",min:"0",max:"100",step:"10",onChange:function(Ie){return ie(+Ie.target.value)},value:(Oe=ke(De,Ae,function(Ie){return Ie.opacity},!0,Ae.currentItemOpacity))!==null&&Oe!==void 0?Oe:void 0})]})}}),(0,ve.z)({name:"changeFontSize",trackEvent:!1,perform:function(Ce,Oe,De){return Le(Ce,Oe,function(){return De},De)},PanelComponent:function(Ce){var Oe=Ce.elements,De=Ce.appState,Ae=Ce.updateData;return(0,k.jsxs)("fieldset",{children:[(0,k.jsx)("legend",{children:(0,y.t)("labels.fontSize")}),(0,k.jsx)(g,{group:"font-size",options:[{value:16,text:(0,y.t)("labels.small"),icon:w.q0,testId:"fontSize-small"},{value:20,text:(0,y.t)("labels.medium"),icon:w.nq,testId:"fontSize-medium"},{value:28,text:(0,y.t)("labels.large"),icon:w.tW,testId:"fontSize-large"},{value:36,text:(0,y.t)("labels.veryLarge"),icon:w.OA,testId:"fontSize-veryLarge"}],value:ke(Oe,De,function(ie){if((0,$.iB)(ie))return ie.fontSize;var Ie=(0,C.WJ)(ie);return Ie?Ie.fontSize:null},function(ie){return(0,$.iB)(ie)||(0,C.WJ)(ie)!==null},function(ie){return ie?null:De.currentItemFontSize||O.n5}),onChange:function(ie){return Ae(ie)}})]})}}),(0,ve.z)({name:"decreaseFontSize",trackEvent:!1,perform:function(Ce,Oe,De){return Le(Ce,Oe,function(Ae){return Math.round(1/1.1*Ae.fontSize)})},keyTest:function(Ce){return Ce[h.tW.CTRL_OR_CMD]&&Ce.shiftKey&&(Ce.key===h.tW.CHEVRON_LEFT||Ce.key===h.tW.COMMA)}})),Ne=(0,ve.z)({name:"increaseFontSize",trackEvent:!1,perform:function(Ce,Oe,De){return Le(Ce,Oe,function(Ae){return Math.round(1.1*Ae.fontSize)})},keyTest:function(Ce){return Ce[h.tW.CTRL_OR_CMD]&&Ce.shiftKey&&(Ce.key===h.tW.CHEVRON_RIGHT||Ce.key===h.tW.PERIOD)}});(0,ve.z)({name:"changeFontFamily",trackEvent:!1,perform:function(Ce,Oe,De){return{elements:le(Ce,Oe,function(Ae){if((0,$.iB)(Ae)){var ie=(0,I.BE)(Ae,{fontFamily:De,lineHeight:(0,C.PT)(De)});return(0,$.oN)(ie,(0,C.tl)(Ae)),ie}return Ae},!0),appState:H(H({},Oe),{},{currentItemFontFamily:De}),commitToHistory:!0}},PanelComponent:function(Ce){var Oe=Ce.elements,De=Ce.appState,Ae=Ce.updateData,ie=[{value:O.ut.Virgil,text:(0,y.t)("labels.handDrawn"),icon:w.Pm,testId:"font-family-virgil"},{value:O.ut.Helvetica,text:(0,y.t)("labels.normal"),icon:w.vo,testId:"font-family-normal"},{value:O.ut.Cascadia,text:(0,y.t)("labels.code"),icon:w.z6,testId:"font-family-code"}];return(0,k.jsxs)("fieldset",{children:[(0,k.jsx)("legend",{children:(0,y.t)("labels.fontFamily")}),(0,k.jsx)(g,{group:"font-family",options:ie,value:ke(Oe,De,function(Ie){if((0,$.iB)(Ie))return Ie.fontFamily;var oe=(0,C.WJ)(Ie);return oe?oe.fontFamily:null},function(Ie){return(0,$.iB)(Ie)||(0,C.WJ)(Ie)!==null},function(Ie){return Ie?null:De.currentItemFontFamily||O.rk}),onChange:function(Ie){return Ae(Ie)}})]})}}),(0,ve.z)({name:"changeTextAlign",trackEvent:!1,perform:function(Ce,Oe,De){return{elements:le(Ce,Oe,function(Ae){if((0,$.iB)(Ae)){var ie=(0,I.BE)(Ae,{textAlign:De});return(0,$.oN)(ie,(0,C.tl)(Ae)),ie}return Ae},!0),appState:H(H({},Oe),{},{currentItemTextAlign:De}),commitToHistory:!0}},PanelComponent:function(Ce){var Oe=Ce.elements,De=Ce.appState,Ae=Ce.updateData;return(0,k.jsxs)("fieldset",{children:[(0,k.jsx)("legend",{children:(0,y.t)("labels.textAlign")}),(0,k.jsx)(g,{group:"text-align",options:[{value:"left",text:(0,y.t)("labels.left"),icon:w.rr,testId:"align-left"},{value:"center",text:(0,y.t)("labels.center"),icon:w.o3,testId:"align-horizontal-center"},{value:"right",text:(0,y.t)("labels.right"),icon:w.oT,testId:"align-right"}],value:ke(Oe,De,function(ie){if((0,$.iB)(ie))return ie.textAlign;var Ie=(0,C.WJ)(ie);return Ie?Ie.textAlign:null},function(ie){return(0,$.iB)(ie)||(0,C.WJ)(ie)!==null},function(ie){return ie?null:De.currentItemTextAlign}),onChange:function(ie){return Ae(ie)}})]})}}),(0,ve.z)({name:"changeVerticalAlign",trackEvent:{category:"element"},perform:function(Ce,Oe,De){return{elements:le(Ce,Oe,function(Ae){if((0,$.iB)(Ae)){var ie=(0,I.BE)(Ae,{verticalAlign:De});return(0,$.oN)(ie,(0,C.tl)(Ae)),ie}return Ae},!0),appState:H({},Oe),commitToHistory:!0}},PanelComponent:function(Ce){var Oe=Ce.elements,De=Ce.appState,Ae=Ce.updateData;return(0,k.jsx)("fieldset",{children:(0,k.jsx)(g,{group:"text-align",options:[{value:O.oX.TOP,text:(0,y.t)("labels.alignTop"),icon:(0,k.jsx)(w.EO,{theme:De.theme}),testId:"align-top"},{value:O.oX.MIDDLE,text:(0,y.t)("labels.centerVertically"),icon:(0,k.jsx)(w.P7,{theme:De.theme}),testId:"align-middle"},{value:O.oX.BOTTOM,text:(0,y.t)("labels.alignBottom"),icon:(0,k.jsx)(w.aA,{theme:De.theme}),testId:"align-bottom"}],value:ke(Oe,De,function(ie){if((0,$.iB)(ie)&&ie.containerId)return ie.verticalAlign;var Ie=(0,C.WJ)(ie);return Ie?Ie.verticalAlign:null},function(ie){return(0,$.iB)(ie)||(0,C.WJ)(ie)!==null},function(ie){return ie?null:O.oX.MIDDLE}),onChange:function(ie){return Ae(ie)}})})}}),(0,ve.z)({name:"changeRoundness",trackEvent:!1,perform:function(Ce,Oe,De){return{elements:le(Ce,Oe,function(Ae){return(0,I.BE)(Ae,{roundness:De==="round"?{type:(0,_.QI)(Ae.type)?O.a6.ADAPTIVE_RADIUS:O.a6.PROPORTIONAL_RADIUS}:null})}),appState:H(H({},Oe),{},{currentItemRoundness:De}),commitToHistory:!0}},PanelComponent:function(Ce){var Oe=Ce.elements,De=Ce.appState,Ae=Ce.updateData,ie=(0,q.Zs)((0,$.Lm)(Oe),De).some(function(Ie){var oe;return((oe=Ie.roundness)===null||oe===void 0?void 0:oe.type)===O.a6.LEGACY});return(0,k.jsxs)("fieldset",{children:[(0,k.jsx)("legend",{children:(0,y.t)("labels.edges")}),(0,k.jsx)(g,{group:"edges",options:[{value:"sharp",text:(0,y.t)("labels.sharp"),icon:w.wr},{value:"round",text:(0,y.t)("labels.round"),icon:w.DS}],value:ke(Oe,De,function(Ie){return ie?null:Ie.roundness?"round":"sharp"},function(Ie){return Ie.hasOwnProperty("roundness")},function(Ie){return Ie?null:De.currentItemRoundness}),onChange:function(Ie){return Ae(Ie)}})]})}}),(0,ve.z)({name:"changeArrowhead",trackEvent:!1,perform:function(Ce,Oe,De){return{elements:le(Ce,Oe,function(Ae){if((0,_.bt)(Ae)){var ie=De.position,Ie=De.type;if(ie==="start")return(0,I.BE)(Ae,{startArrowhead:Ie});if(ie==="end")return(0,I.BE)(Ae,{endArrowhead:Ie})}return Ae}),appState:H(H({},Oe),{},(0,j.Z)({},De.position==="start"?"currentItemStartArrowhead":"currentItemEndArrowhead",De.type)),commitToHistory:!0}},PanelComponent:function(Ce){var Oe=Ce.elements,De=Ce.appState,Ae=Ce.updateData,ie=(0,y.G3)().rtl;return(0,k.jsxs)("fieldset",{children:[(0,k.jsx)("legend",{children:(0,y.t)("labels.arrowheads")}),(0,k.jsxs)("div",{className:"iconSelectList buttonList",children:[(0,k.jsx)(c,{label:"arrowhead_start",options:[{value:null,text:(0,y.t)("labels.arrowhead_none"),icon:w.fr,keyBinding:"q"},{value:"arrow",text:(0,y.t)("labels.arrowhead_arrow"),icon:(0,k.jsx)(w.il,{flip:!ie}),keyBinding:"w"},{value:"bar",text:(0,y.t)("labels.arrowhead_bar"),icon:(0,k.jsx)(w.m,{flip:!ie}),keyBinding:"e"},{value:"dot",text:(0,y.t)("labels.arrowhead_dot"),icon:(0,k.jsx)(w.tn,{flip:!ie}),keyBinding:"r"},{value:"triangle",text:(0,y.t)("labels.arrowhead_triangle"),icon:(0,k.jsx)(w.j8,{flip:!ie}),keyBinding:"t"}],value:ke(Oe,De,function(Ie){return(0,_.bt)(Ie)&&(0,q.Un)(Ie.type)?Ie.startArrowhead:De.currentItemStartArrowhead},!0,De.currentItemStartArrowhead),onChange:function(Ie){return Ae({position:"start",type:Ie})}}),(0,k.jsx)(c,{label:"arrowhead_end",group:"arrowheads",options:[{value:null,text:(0,y.t)("labels.arrowhead_none"),keyBinding:"q",icon:w.fr},{value:"arrow",text:(0,y.t)("labels.arrowhead_arrow"),keyBinding:"w",icon:(0,k.jsx)(w.il,{flip:ie})},{value:"bar",text:(0,y.t)("labels.arrowhead_bar"),keyBinding:"e",icon:(0,k.jsx)(w.m,{flip:ie})},{value:"dot",text:(0,y.t)("labels.arrowhead_dot"),keyBinding:"r",icon:(0,k.jsx)(w.tn,{flip:ie})},{value:"triangle",text:(0,y.t)("labels.arrowhead_triangle"),icon:(0,k.jsx)(w.j8,{flip:ie}),keyBinding:"t"}],value:ke(Oe,De,function(Ie){return(0,_.bt)(Ie)&&(0,q.Un)(Ie.type)?Ie.endArrowhead:De.currentItemEndArrowhead},!0,De.currentItemEndArrowhead),onChange:function(Ie){return Ae({position:"end",type:Ie})}})]})]})}})},7080:function(fe,Q,t){t.d(Q,{u:function(){return k}});var T=t(7169),j=t(2767),f=t(5491);function l(g,a){var P=Object.keys(g);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(g);a&&(R=R.filter(function(K){return Object.getOwnPropertyDescriptor(g,K).enumerable})),P.push.apply(P,R)}return P}function v(g){for(var a=1;a<arguments.length;a++){var P=arguments[a]!=null?arguments[a]:{};a%2?l(Object(P),!0).forEach(function(R){(0,T.Z)(g,R,P[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(P)):l(Object(P)).forEach(function(R){Object.defineProperty(g,R,Object.getOwnPropertyDescriptor(P,R))})}return g}var k=(0,j.z)({name:"stats",viewMode:!0,trackEvent:{category:"menu"},perform:function(g,a){return{appState:v(v({},a),{},{showStats:!this.checked(a)}),commitToHistory:!1}},checked:function(g){return g.showStats},contextItemLabel:"stats.title",keyTest:function(g){return!g[f.tW.CTRL_OR_CMD]&&g.altKey&&g.code===f.aU.SLASH}})},5463:function(fe,Q,t){t.d(Q,{FL:function(){return zt},vD:function(){return $r.vD},yA:function(){return p},BZ:function(){return w},mo:function(){return ie.mo},uN:function(){return Cn.uN},jK:function(){return Cn.jK},FA:function(){return Cn.FA},pw:function(){return se},ZM:function(){return Cn.ZM},X9:function(){return T.X},xF:function(){return De},pL:function(){return x},jl:function(){return yn},kt:function(){return fn},EQ:function(){return Be},nz:function(){return ao.nz},_d:function(){return V._d},W3:function(){return Ee},mM:function(){return V.mM},ns:function(){return V.ns},Yy:function(){return q},V:function(){return M},zi:function(){return c},jY:function(){return We},$h:function(){return lo.$},Pb:function(){return wn},Qs:function(){return wo},pm:function(){return xr},u0:function(){return Nr.u},Zp:function(){return ie.Zp},JN:function(){return nr},y7:function(){return $r.y7},s:function(){return Xe},zp:function(){return Cn.zp}});var T=t(2448),j=t(2577),f=t(1930),l=t(583),v=t(4183),k=t(9215),g=t(4105),a=t(457),P=t(9827);function R(de,Pe){var ze=typeof Symbol<"u"&&de[Symbol.iterator]||de["@@iterator"];if(!ze){if(Array.isArray(de)||(ze=function(Ot,sn){if(Ot){if(typeof Ot=="string")return K(Ot,sn);var un=Object.prototype.toString.call(Ot).slice(8,-1);if(un==="Object"&&Ot.constructor&&(un=Ot.constructor.name),un==="Map"||un==="Set")return Array.from(Ot);if(un==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(un))return K(Ot,sn)}}(de))||Pe){ze&&(de=ze);var Ke=0,St=function(){};return{s:St,n:function(){return Ke>=de.length?{done:!0}:{done:!1,value:de[Ke++]}},e:function(Ot){throw Ot},f:St}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
44
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var nn,$t=!0,cn=!1;return{s:function(){ze=ze.call(de)},n:function(){var Ot=ze.next();return $t=Ot.done,Ot},e:function(Ot){cn=!0,nn=Ot},f:function(){try{$t||ze.return==null||ze.return()}finally{if(cn)throw nn}}}}function K(de,Pe){(Pe==null||Pe>de.length)&&(Pe=de.length);for(var ze=0,Ke=new Array(Pe);ze<Pe;ze++)Ke[ze]=de[ze];return Ke}var U=function(de,Pe){return de.frameId===Pe||de.id===Pe},m=function(de,Pe,ze){for(var Ke=[],St=[],nn=null,$t=-1,cn=(0,P.xn)(ze||(0,g.eD)(de,Pe,{includeBoundTextElement:!0,includeElementsInFrames:!0}));++$t<de.length;){var Ot=de[$t];cn.get(Ot.id)?(St.length&&(Ke=Ke.concat(St),St=[]),Ke.push($t),nn=$t+1):Ot.isDeleted&&nn===$t?(nn=$t+1,St.push($t)):St=[]}return Ke},G=function(de,Pe,ze){if("containerId"in de&&de.containerId){if(ze!=="left")return Pe.indexOf(de);var Ke=a.Z.getScene(de).getElement(de.containerId);if(Ke)return Pe.indexOf(Ke)}else{var St,nn,$t=(St=de.boundElements)===null||St===void 0||(nn=St.find(function(Ot){return Ot.type!=="arrow"}))===null||nn===void 0?void 0:nn.id;if($t){if(ze==="left")return Pe.indexOf(de);var cn=a.Z.getScene(de).getElement($t);if(cn)return Pe.indexOf(cn)}}},he=function(de,Pe,ze,Ke,St){var nn,$t,cn,Ot,sn,un=Pe[ze],Rn=function(vr){return!vr.isDeleted&&(St?vr.frameId===St:!de.editingGroupId||vr.groupIds.includes(de.editingGroupId))},Fn=Ke==="left"?(0,P.qr)(Pe,function(vr){return Rn(vr)},Math.max(0,ze-1)):(0,P.cx)(Pe,function(vr){return Rn(vr)},ze+1),Hn=Pe[Fn];if(!Hn)return-1;if(de.editingGroupId){var rr;if((un==null?void 0:un.groupIds.join(""))===(Hn==null?void 0:Hn.groupIds.join("")))return(rr=G(Hn,Pe,Ke))!==null&&rr!==void 0?rr:Fn;if(Hn==null||!Hn.groupIds.includes(de.editingGroupId))return-1}if(!St&&(Hn.frameId||Hn.type==="frame")){var er=(nn=Pe,$t=Hn.frameId||Hn.id,cn=-1,Ot=-1,nn.forEach(function(vr,oo){U(vr,$t)&&(cn===-1&&(cn=oo),Ot=oo)}),cn===-1?[]:nn.slice(cn,Ot+1));return Ke==="left"?Pe.indexOf(er[0]):Pe.indexOf(er[er.length-1])}if(!Hn.groupIds.length)return(sn=G(Hn,Pe,Ke))!==null&&sn!==void 0?sn:Fn;var zn=de.editingGroupId?Hn.groupIds[Hn.groupIds.indexOf(de.editingGroupId)-1]:Hn.groupIds[Hn.groupIds.length-1],ur=(0,k.Fb)(Pe,zn);return ur.length?Ke==="left"?Pe.indexOf(ur[0]):Pe.indexOf(ur[ur.length-1]):Fn},be=function(de,Pe){return Pe.reduce(function(ze,Ke){var St=de[Ke];return ze[St.id]=St,ze},{})},we=function(de,Pe,ze){var Ke=m(de,Pe),St=be(de,Ke),nn=function(cn){var Ot=0;return cn.reduce(function(sn,un,Rn){return Rn>0&&cn[Rn-1]!==un-1&&(Ot=++Ot),(sn[Ot]||(sn[Ot]=[])).push(un),sn},[])}(Ke);ze==="right"&&(nn=nn.reverse());var $t=new Set(Ke.filter(function(cn){return de[cn].type==="frame"}).map(function(cn){return de[cn].id}));return nn.forEach(function(cn,Ot){var sn,un=cn[0],Rn=cn[cn.length-1],Fn=ze==="left"?un:Rn,Hn=cn.some(function(oo){var po=de[oo];return po.frameId&&$t.has(po.frameId)})?null:(sn=de[Fn])===null||sn===void 0?void 0:sn.frameId,rr=he(Pe,de,Fn,ze,Hn);if(rr!==-1&&Fn!==rr){var er=ze==="left"?de.slice(0,rr):de.slice(0,un),zn=de.slice(un,Rn+1),ur=ze==="left"?de.slice(rr,un):de.slice(Rn+1,rr+1),vr=ze==="left"?de.slice(Rn+1):de.slice(rr+1);de=ze==="left"?[].concat((0,f.Z)(er),(0,f.Z)(zn),(0,f.Z)(ur),(0,f.Z)(vr)):[].concat((0,f.Z)(er),(0,f.Z)(ur),(0,f.Z)(zn),(0,f.Z)(vr))}}),de.map(function(cn){return St[cn.id]?(0,l.ZP)(cn):cn})},xe=function(de,Pe,ze,Ke,St){var nn,$t,cn=m(de,Pe,St),Ot=be(de,cn),sn=[];if(ze==="left"){if(Ke)nn=(0,P.cx)(de,function(zn){return U(zn,Ke)});else if(Pe.editingGroupId){var un=(0,k.Fb)(de,Pe.editingGroupId);if(!un.length)return de;nn=de.indexOf(un[0])}else nn=0;$t=cn[cn.length-1]}else{if(Ke)$t=(0,P.qr)(de,function(zn){return U(zn,Ke)});else if(Pe.editingGroupId){var Rn=(0,k.Fb)(de,Pe.editingGroupId);if(!Rn.length)return de;$t=de.indexOf(Rn[Rn.length-1])}else $t=de.length-1;nn=cn[0]}nn===-1&&(nn=0);for(var Fn=nn;Fn<$t+1;Fn++)cn.includes(Fn)||sn.push(de[Fn]);var Hn=Object.values(Ot).map(function(zn){return(0,l.ZP)(zn)}),rr=de.slice(0,nn),er=de.slice($t+1);return ze==="left"?[].concat((0,f.Z)(rr),(0,f.Z)(Hn),sn,(0,f.Z)(er)):[].concat((0,f.Z)(rr),sn,(0,f.Z)(Hn),(0,f.Z)(er))};function ce(de,Pe,ze,Ke){var St,nn=(0,P.xn)((0,g.eD)(de,Pe,{includeBoundTextElement:!0,includeElementsInFrames:!0})),$t={regularElements:[],frameChildren:new Map},cn=new Set,Ot=R(de);try{for(Ot.s();!(St=Ot.n()).done;){var sn=St.value;nn.has(sn.id)&&(0,v.He)(sn)&&cn.add(sn.id)}}catch(vr){Ot.e(vr)}finally{Ot.f()}var un,Rn=R(de);try{for(Rn.s();!(un=Rn.n()).done;){var Fn=un.value;if(nn.has(Fn.id))if((0,v.He)(Fn)||Fn.frameId&&cn.has(Fn.frameId))$t.regularElements.push(Fn);else if(Fn.frameId){var Hn=$t.frameChildren.get(Fn.frameId)||[];Hn.push(Fn),$t.frameChildren.set(Fn.frameId,Hn)}else $t.regularElements.push(Fn)}}catch(vr){Rn.e(vr)}finally{Rn.f()}for(var rr=de,er=0,zn=Array.from($t.frameChildren.entries());er<zn.length;er++){var ur=(0,j.Z)(zn[er],2);rr=Ke(de,Pe,ze,ur[0],ur[1])}return Ke(rr,Pe,ze,null,$t.regularElements)}var D=function(de,Pe){return we(de,Pe,"left")},ne=function(de,Pe){return we(de,Pe,"right")},S=function(de,Pe){return ce(de,Pe,"left",xe)},z=function(de,Pe){return ce(de,Pe,"right",xe)},A=t(5491),E=t(8227),L=t(2767),h=t(8935),y=t(9937),r=t(4512),M=(0,L.z)({name:"sendBackward",trackEvent:{category:"element"},perform:function(de,Pe){return{elements:D(de,Pe),appState:Pe,commitToHistory:!0}},contextItemLabel:"labels.sendBackward",keyPriority:40,keyTest:function(de){return de[A.tW.CTRL_OR_CMD]&&!de.shiftKey&&de.code===A.aU.BRACKET_LEFT},PanelComponent:function(de){var Pe=de.updateData;return de.appState,(0,r.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return Pe(null)},title:"".concat((0,E.t)("labels.sendBackward")," — ").concat((0,P.uY)("CtrlOrCmd+[")),children:h.Gc})}}),p=(0,L.z)({name:"bringForward",trackEvent:{category:"element"},perform:function(de,Pe){return{elements:ne(de,Pe),appState:Pe,commitToHistory:!0}},contextItemLabel:"labels.bringForward",keyPriority:40,keyTest:function(de){return de[A.tW.CTRL_OR_CMD]&&!de.shiftKey&&de.code===A.aU.BRACKET_RIGHT},PanelComponent:function(de){var Pe=de.updateData;return de.appState,(0,r.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return Pe(null)},title:"".concat((0,E.t)("labels.bringForward")," — ").concat((0,P.uY)("CtrlOrCmd+]")),children:h.t5})}}),c=(0,L.z)({name:"sendToBack",trackEvent:{category:"element"},perform:function(de,Pe){return{elements:S(de,Pe),appState:Pe,commitToHistory:!0}},contextItemLabel:"labels.sendToBack",keyTest:function(de){return y.Um?de[A.tW.CTRL_OR_CMD]&&de.altKey&&de.code===A.aU.BRACKET_LEFT:de[A.tW.CTRL_OR_CMD]&&de.shiftKey&&de.code===A.aU.BRACKET_LEFT},PanelComponent:function(de){var Pe=de.updateData;return de.appState,(0,r.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(){return Pe(null)},title:"".concat((0,E.t)("labels.sendToBack")," — ").concat(y.Um?(0,P.uY)("CtrlOrCmd+Alt+["):(0,P.uY)("CtrlOrCmd+Shift+[")),children:h.pw})}}),w=(0,L.z)({name:"bringToFront",trackEvent:{category:"element"},perform:function(de,Pe){return{elements:z(de,Pe),appState:Pe,commitToHistory:!0}},contextItemLabel:"labels.bringToFront",keyTest:function(de){return y.Um?de[A.tW.CTRL_OR_CMD]&&de.altKey&&de.code===A.aU.BRACKET_RIGHT:de[A.tW.CTRL_OR_CMD]&&de.shiftKey&&de.code===A.aU.BRACKET_RIGHT},PanelComponent:function(de){var Pe=de.updateData;return de.appState,(0,r.jsx)("button",{type:"button",className:"zIndexButton",onClick:function(ze){return Pe(null)},title:"".concat((0,E.t)("labels.bringToFront")," — ").concat(y.Um?(0,P.uY)("CtrlOrCmd+Alt+]"):(0,P.uY)("CtrlOrCmd+Shift+]")),children:h.IN})}}),O=t(7169),$=t(7651),I=t(7422),C=t(6264);function _(de,Pe){var ze=Object.keys(de);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(de);Pe&&(Ke=Ke.filter(function(St){return Object.getOwnPropertyDescriptor(de,St).enumerable})),ze.push.apply(ze,Ke)}return ze}function N(de){for(var Pe=1;Pe<arguments.length;Pe++){var ze=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?_(Object(ze),!0).forEach(function(Ke){(0,O.Z)(de,Ke,ze[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(ze)):_(Object(ze)).forEach(function(Ke){Object.defineProperty(de,Ke,Object.getOwnPropertyDescriptor(ze,Ke))})}return de}var q=(0,L.z)({name:"selectAll",trackEvent:{category:"canvas"},perform:function(de,Pe,ze,Ke){if(Pe.editingLinearElement)return!1;var St=(0,C.aI)(de.filter(function(nn){return!(nn.isDeleted||(0,$.iB)(nn)&&nn.containerId||nn.locked)})).reduce(function(nn,$t){return nn[$t.id]=!0,nn},{});return{appState:N(N(N({},Pe),(0,k.bO)({editingGroupId:null,selectedElementIds:St},(0,$.Lm)(de),Pe,Ke)),{},{selectedLinearElement:Object.keys(St).length===1&&(0,v.bt)(de[0])?new I._(de[0],Ke.scene):null}),commitToHistory:!0}},contextItemLabel:"labels.selectAll",keyTest:function(de){return de[A.tW.CTRL_OR_CMD]&&de.key===A.tW.A}}),pe=t(1512),te=t(9645),ve=t(4761);function ae(de,Pe){var ze=typeof Symbol<"u"&&de[Symbol.iterator]||de["@@iterator"];if(!ze){if(Array.isArray(de)||(ze=function(Ot,sn){if(Ot){if(typeof Ot=="string")return H(Ot,sn);var un=Object.prototype.toString.call(Ot).slice(8,-1);if(un==="Object"&&Ot.constructor&&(un=Ot.constructor.name),un==="Map"||un==="Set")return Array.from(Ot);if(un==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(un))return H(Ot,sn)}}(de))||Pe){ze&&(de=ze);var Ke=0,St=function(){};return{s:St,n:function(){return Ke>=de.length?{done:!0}:{done:!1,value:de[Ke++]}},e:function(Ot){throw Ot},f:St}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
45
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var nn,$t=!0,cn=!1;return{s:function(){ze=ze.call(de)},n:function(){var Ot=ze.next();return $t=Ot.done,Ot},e:function(Ot){cn=!0,nn=Ot},f:function(){try{$t||ze.return==null||ze.return()}finally{if(cn)throw nn}}}}function H(de,Pe){(Pe==null||Pe>de.length)&&(Pe=de.length);for(var ze=0,Ke=new Array(Pe);ze<Pe;ze++)Ke[ze]=de[ze];return Ke}var le=function(de){var Pe=de.slice(),ze=new Set,Ke=function nn($t){var cn,Ot,sn,un=(cn=$t[0])===null||cn===void 0||(Ot=cn.groupIds)===null||Ot===void 0?void 0:Ot.join(""),Rn=[$t[0]],Fn=[],Hn=ae($t.slice(1));try{for(Hn.s();!(sn=Hn.n()).done;){var rr,er=sn.value;((rr=er.groupIds)===null||rr===void 0?void 0:rr.join(""))===un?Rn.push(er):Fn.push(er)}}catch(zn){Hn.e(zn)}finally{Hn.f()}return Fn.length?[].concat(Rn,(0,f.Z)(nn(Fn))):Rn},St=new Map;return Pe.forEach(function(nn,$t){var cn;if(!St.has(nn.id))if((cn=nn.groupIds)!==null&&cn!==void 0&&cn.length){var Ot,sn=nn.groupIds[nn.groupIds.length-1],un=Pe.slice($t).filter(function(Hn){var rr,er=Hn==null||(rr=Hn.groupIds)===null||rr===void 0?void 0:rr.some(function(zn){return zn===sn});return er&&St.set(Hn.id,!0),er}),Rn=ae(Ke(un));try{for(Rn.s();!(Ot=Rn.n()).done;){var Fn=Ot.value;ze.add(Fn)}}catch(Hn){Rn.e(Hn)}finally{Rn.f()}}else ze.add(nn)}),ze.size!==de.length?(console.error("normalizeGroupElementOrder: lost some elements... bailing!"),de):(0,f.Z)(ze)},ke=function(de){var Pe=function(ze){var Ke=(0,P.I4)(ze),St=ze.slice(),nn=new Set;return St.forEach(function($t,cn){var Ot;if($t)if((Ot=$t.boundElements)!==null&&Ot!==void 0&&Ot.length)nn.add($t),St[cn]=null,$t.boundElements.forEach(function(Rn){var Fn=Ke.get(Rn.id);Fn&&Rn.type==="text"&&(nn.add(Fn[0]),St[Fn[1]]=null)});else if($t.type==="text"&&$t.containerId){var sn,un=Ke.get($t.containerId);un!=null&&(sn=un[0].boundElements)!==null&&sn!==void 0&&sn.find(function(Rn){return Rn.id===$t.id})||(nn.add($t),St[cn]=null)}else nn.add($t),St[cn]=null}),nn.size!==ze.length?(console.error("normalizeBoundElementsOrder: lost some elements... bailing!"),ze):(0,f.Z)(nn)}(le(de));return Pe},Le=t(4682);function Ge(de,Pe){var ze=typeof Symbol<"u"&&de[Symbol.iterator]||de["@@iterator"];if(!ze){if(Array.isArray(de)||(ze=function(Ot,sn){if(Ot){if(typeof Ot=="string")return Ne(Ot,sn);var un=Object.prototype.toString.call(Ot).slice(8,-1);if(un==="Object"&&Ot.constructor&&(un=Ot.constructor.name),un==="Map"||un==="Set")return Array.from(Ot);if(un==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(un))return Ne(Ot,sn)}}(de))||Pe){ze&&(de=ze);var Ke=0,St=function(){};return{s:St,n:function(){return Ke>=de.length?{done:!0}:{done:!1,value:de[Ke++]}},e:function(Ot){throw Ot},f:St}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
46
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var nn,$t=!0,cn=!1;return{s:function(){ze=ze.call(de)},n:function(){var Ot=ze.next();return $t=Ot.done,Ot},e:function(Ot){cn=!0,nn=Ot},f:function(){try{$t||ze.return==null||ze.return()}finally{if(cn)throw nn}}}}function Ne(de,Pe){(Pe==null||Pe>de.length)&&(Pe=de.length);for(var ze=0,Ke=new Array(Pe);ze<Pe;ze++)Ke[ze]=de[ze];return Ke}function Ce(de,Pe){var ze=Object.keys(de);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(de);Pe&&(Ke=Ke.filter(function(St){return Object.getOwnPropertyDescriptor(de,St).enumerable})),ze.push.apply(ze,Ke)}return ze}function Oe(de){for(var Pe=1;Pe<arguments.length;Pe++){var ze=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?Ce(Object(ze),!0).forEach(function(Ke){(0,O.Z)(de,Ke,ze[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(ze)):Ce(Object(ze)).forEach(function(Ke){Object.defineProperty(de,Ke,Object.getOwnPropertyDescriptor(ze,Ke))})}return de}var De=(0,L.z)({name:"duplicateSelection",trackEvent:{category:"element"},perform:function(de,Pe){if(Pe.editingLinearElement){var ze=I._.duplicateSelectedPoints(Pe);return!!ze&&{elements:de,appState:ze.appState,commitToHistory:!0}}return Oe(Oe({},Ae(de,Pe)),{},{commitToHistory:!0})},contextItemLabel:"labels.duplicateSelection",keyTest:function(de){return de[A.tW.CTRL_OR_CMD]&&de.key===A.tW.D},PanelComponent:function(de){var Pe=de.elements,ze=de.appState,Ke=de.updateData;return(0,r.jsx)(pe.V,{type:"button",icon:h.NA,title:"".concat((0,E.t)("labels.duplicateSelection")," — ").concat((0,P.uY)("CtrlOrCmd+D")),"aria-label":(0,E.t)("labels.duplicateSelection"),onClick:function(){return Ke(null)},visible:(0,g.N)((0,$.Lm)(Pe),ze)})}}),Ae=function(de,Pe){for(var ze=ke(de),Ke=new Map,St=[],nn=[],$t=new Map,cn=function(br){var Pr=(0,$.Sy)(Pe.editingGroupId,Ke,br,{x:br.x+y.k/2,y:br.y+y.k/2});return $t.set(br.id,Pr.id),nn.push(br),St.push(Pr),Pr},Ot=(0,P.xn)((0,C.eD)(ze,Pe,{includeBoundTextElement:!0,includeElementsInFrames:!0})),sn=new Map,un=function(br){var Pr,Vr=Ge(br);try{for(Vr.s();!(Pr=Vr.n()).done;){var ko=Pr.value;sn.set(ko.id,!0)}}catch(Bo){Vr.e(Bo)}finally{Vr.f()}return br},Rn=[],Fn=-1;++Fn<ze.length;){var Hn=ze[Fn];if(!sn.get(Hn.id)){var rr=(0,ve.WJ)(Hn),er=(0,v.He)(Hn);if(Ot.get(Hn.id)){if(Hn.groupIds.length||rr||er){var zn=(0,k.yO)(Pe,Hn);if(zn){var ur=(0,k.Fb)(ze,zn).flatMap(function(br){return(0,v.He)(br)?[].concat((0,f.Z)((0,Le.zD)(de,br.id)),[br]):[br]});Rn.push.apply(Rn,(0,f.Z)(un([].concat((0,f.Z)(ur),(0,f.Z)(ur.map(function(br){return cn(br)}))))));continue}if(rr){Rn.push.apply(Rn,(0,f.Z)(un([Hn,rr,cn(Hn),cn(rr)])));continue}if(er){var vr=(0,Le.zD)(ze,Hn.id);Rn.push.apply(Rn,(0,f.Z)(un([].concat((0,f.Z)(vr),[Hn],(0,f.Z)(vr.map(function(br){return cn(br)})),[cn(Hn)]))));continue}}Hn.frameId&&Ot.has(Hn.frameId)||Rn.push.apply(Rn,(0,f.Z)(un([Hn,cn(Hn)])))}else Rn.push.apply(Rn,(0,f.Z)(un([Hn])))}}var oo=[],po=new Map;for(Fn=Rn.length;--Fn>=0;){var Lo=Rn[Fn];po.get(Lo.id)||(po.set(Lo.id,!0),oo.push(Lo))}var hi=oo.reverse();(0,ve.P7)(Rn,nn,$t),(0,te.ek)(Rn,nn,$t),(0,Le.xr)(hi,nn,$t);var An=(0,C.aI)(St);return{elements:hi,appState:Oe(Oe({},Pe),(0,k.bO)({editingGroupId:Pe.editingGroupId,selectedElementIds:An.reduce(function(br,Pr){return(0,v.Xh)(Pr)||(br[Pr.id]=!0),br},{})},(0,$.Lm)(hi),Pe,null))}},ie=(t(3361),t(6006)),Ie=t(2361),oe=t(7652);function s(de,Pe){var ze=Object.keys(de);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(de);Pe&&(Ke=Ke.filter(function(St){return Object.getOwnPropertyDescriptor(de,St).enumerable})),ze.push.apply(ze,Ke)}return ze}function u(de){for(var Pe=1;Pe<arguments.length;Pe++){var ze=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?s(Object(ze),!0).forEach(function(Ke){(0,O.Z)(de,Ke,ze[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(ze)):s(Object(ze)).forEach(function(Ke){Object.defineProperty(de,Ke,Object.getOwnPropertyDescriptor(ze,Ke))})}return de}var x=(0,L.z)({name:"finalize",trackEvent:!1,perform:function(de,Pe,ze,Ke){var St,nn=Ke.interactiveCanvas,$t=Ke.focusContainer,cn=Ke.scene;if(Pe.editingLinearElement){var Ot=Pe.editingLinearElement,sn=Ot.elementId,un=Ot.startBindingElement,Rn=Ot.endBindingElement,Fn=I._.getElement(sn);if(Fn)return(0,v.Mn)(Fn)&&(0,te.HG)(Fn,un,Rn),{elements:Fn.points.length<2||(0,$.QD)(Fn)?de.filter(function(Vr){return Vr.id!==Fn.id}):void 0,appState:u(u({},Pe),{},{cursorButton:"up",editingLinearElement:null}),commitToHistory:!0}}var Hn=de,rr=Pe.pendingImageElementId&&cn.getElement(Pe.pendingImageElementId);rr&&(0,l.DR)(rr,{isDeleted:!0},!1),window.document.activeElement instanceof HTMLElement&&$t();var er,zn=Pe.multiElement?Pe.multiElement:((St=Pe.editingElement)===null||St===void 0?void 0:St.type)==="freedraw"?Pe.editingElement:null;if(zn){if(zn.type!=="freedraw"&&Pe.lastPointerDownWith!=="touch"){var ur=zn.points,vr=zn.lastCommittedPoint;vr&&ur[ur.length-1]===vr||(0,l.DR)(zn,{points:zn.points.slice(0,-1)})}(0,$.QD)(zn)&&(Hn=Hn.filter(function(Vr){return Vr.id!==zn.id}));var oo=(0,Ie.g6)(zn.points,Pe.zoom.value);if((zn.type==="line"||zn.type==="freedraw")&&oo){var po=zn.points,Lo=po[0];(0,l.DR)(zn,{points:po.map(function(Vr,ko){return ko===po.length-1?[Lo[0],Lo[1]]:Vr})})}if((0,v.Mn)(zn)&&!oo&&zn.points.length>1){var hi=I._.getPointAtIndexGlobalCoordinates(zn,-1),An=(0,j.Z)(hi,2),br=An[0],Pr=An[1];(0,te.R)(zn,Pe,a.Z.getScene(zn),{x:br,y:Pr})}}return(Pe.activeTool.locked||Pe.activeTool.type==="freedraw")&&zn||(0,oe.z8)(nn),er=Pe.activeTool.type==="eraser"?(0,P.Om)(Pe,u(u({},Pe.activeTool.lastActiveTool||{type:"selection"}),{},{lastActiveToolBeforeEraser:null})):(0,P.Om)(Pe,{type:"selection"}),{elements:Hn,appState:u(u({},Pe),{},{cursorButton:"up",activeTool:(Pe.activeTool.locked||Pe.activeTool.type==="freedraw")&&zn?Pe.activeTool:er,activeEmbeddable:null,draggingElement:null,multiElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:zn&&!Pe.activeTool.locked&&Pe.activeTool.type!=="freedraw"?u(u({},Pe.selectedElementIds),{},(0,O.Z)({},zn.id,!0)):Pe.selectedElementIds,selectedLinearElement:zn&&(0,v.bt)(zn)?new I._(zn,cn):Pe.selectedLinearElement,pendingImageElementId:null}),commitToHistory:Pe.activeTool.type==="freedraw"}},keyTest:function(de,Pe){return de.key===A.tW.ESCAPE&&(Pe.editingLinearElement!==null||!Pe.draggingElement&&Pe.multiElement===null)||(de.key===A.tW.ESCAPE||de.key===A.tW.ENTER)&&Pe.multiElement!==null},PanelComponent:function(de){var Pe=de.appState,ze=de.updateData,Ke=de.data;return(0,r.jsx)(pe.V,{type:"button",icon:h.$c,title:(0,E.t)("buttons.done"),"aria-label":(0,E.t)("buttons.done"),onClick:ze,visible:Pe.multiElement!=null,size:(Ke==null?void 0:Ke.size)||"medium"})}}),V=t(4406);function W(de,Pe){var ze=Object.keys(de);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(de);Pe&&(Ke=Ke.filter(function(St){return Object.getOwnPropertyDescriptor(de,St).enumerable})),ze.push.apply(ze,Ke)}return ze}function re(de){for(var Pe=1;Pe<arguments.length;Pe++){var ze=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?W(Object(ze),!0).forEach(function(Ke){(0,O.Z)(de,Ke,ze[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(ze)):W(Object(ze)).forEach(function(Ke){Object.defineProperty(de,Ke,Object.getOwnPropertyDescriptor(ze,Ke))})}return de}var ee="{}",se=(0,L.z)({name:"copyStyles",trackEvent:{category:"element"},perform:function(de,Pe){var ze=[],Ke=de.find(function(nn){return Pe.selectedElementIds[nn.id]});if(ze.push(Ke),Ke&&(0,v.Xo)(Ke)){var St=(0,ve.WJ)(Ke);ze.push(St)}return Ke&&(ee=JSON.stringify(ze)),{appState:re(re({},Pe),{},{toast:{message:(0,E.t)("toast.copyStyles")}}),commitToHistory:!1}},contextItemLabel:"labels.copyStyles",keyTest:function(de){return de[A.tW.CTRL_OR_CMD]&&de.altKey&&de.code===A.aU.C}}),Ee=(0,L.z)({name:"pasteStyles",trackEvent:{category:"element"},perform:function(de,Pe){var ze=JSON.parse(ee),Ke=ze[0],St=ze[1];if(!(0,$.r2)(Ke))return{elements:de,commitToHistory:!1};var nn=(0,g.eD)(de,Pe,{includeBoundTextElement:!0}),$t=nn.map(function(cn){return cn.id});return{elements:de.map(function(cn){if($t.includes(cn.id)){var Ot,sn,un,Rn,Fn,Hn,rr,er=Ke;if((0,$.iB)(cn)&&cn.containerId&&(er=St),!er)return cn;var zn=(0,l.BE)(cn,{backgroundColor:(Ot=er)===null||Ot===void 0?void 0:Ot.backgroundColor,strokeWidth:(sn=er)===null||sn===void 0?void 0:sn.strokeWidth,strokeColor:(un=er)===null||un===void 0?void 0:un.strokeColor,strokeStyle:(Rn=er)===null||Rn===void 0?void 0:Rn.strokeStyle,fillStyle:(Fn=er)===null||Fn===void 0?void 0:Fn.fillStyle,opacity:(Hn=er)===null||Hn===void 0?void 0:Hn.opacity,roughness:(rr=er)===null||rr===void 0?void 0:rr.roughness,roundness:er.roundness?(0,v.eK)(er.roundness.type,cn)?er.roundness:(0,v.UQ)(cn):null});if((0,$.iB)(zn)){var ur=er.fontSize||y.n5,vr=er.fontFamily||y.rk,oo=null;(zn=(0,l.BE)(zn,{fontSize:ur,fontFamily:vr,textAlign:er.textAlign||y.Hg,lineHeight:er.lineHeight||(0,ve.PT)(vr)})).containerId&&(oo=nn.find(function(po){return(0,$.iB)(zn)&&po.id===zn.containerId})||null),(0,$.oN)(zn,oo)}return zn.type==="arrow"&&(0,v.Yv)(er)&&(zn=(0,l.BE)(zn,{startArrowhead:er.startArrowhead,endArrowhead:er.endArrowhead})),(0,v.He)(cn)&&(zn=(0,l.BE)(zn,{roundness:null,backgroundColor:"transparent"})),zn}return cn}),commitToHistory:!0}},contextItemLabel:"labels.pasteStyles",keyTest:function(de){return de[A.tW.CTRL_OR_CMD]&&de.altKey&&de.code===A.aU.V}});function _e(de,Pe){var ze=Object.keys(de);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(de);Pe&&(Ke=Ke.filter(function(St){return Object.getOwnPropertyDescriptor(de,St).enumerable})),ze.push.apply(ze,Ke)}return ze}function Ue(de){for(var Pe=1;Pe<arguments.length;Pe++){var ze=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?_e(Object(ze),!0).forEach(function(Ke){(0,O.Z)(de,Ke,ze[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(ze)):_e(Object(ze)).forEach(function(Ke){Object.defineProperty(de,Ke,Object.getOwnPropertyDescriptor(ze,Ke))})}return de}(0,L.z)({name:"toggleCanvasMenu",trackEvent:{category:"menu"},perform:function(de,Pe){return{appState:Ue(Ue({},Pe),{},{openMenu:Pe.openMenu==="canvas"?null:"canvas"}),commitToHistory:!1}},PanelComponent:function(de){var Pe=de.appState,ze=de.updateData;return(0,r.jsx)(pe.V,{type:"button",icon:h.RY,"aria-label":(0,E.t)("buttons.menu"),onClick:ze,selected:Pe.openMenu==="canvas"})}}),(0,L.z)({name:"toggleEditMenu",trackEvent:{category:"menu"},perform:function(de,Pe){return{appState:Ue(Ue({},Pe),{},{openMenu:Pe.openMenu==="shape"?null:"shape"}),commitToHistory:!1}},PanelComponent:function(de){var Pe=de.elements,ze=de.appState,Ke=de.updateData;return(0,r.jsx)(pe.V,{visible:(0,$.RT)(ze,(0,$.Lm)(Pe)),type:"button",icon:h.DG,"aria-label":(0,E.t)("buttons.edit"),onClick:Ke,selected:ze.openMenu==="shape"})}});var We=(0,L.z)({name:"toggleShortcuts",viewMode:!0,trackEvent:{category:"menu",action:"toggleHelpDialog"},perform:function(de,Pe,ze,Ke){var St=Ke.focusContainer;return Pe.openDialog==="help"&&St(),{appState:Ue(Ue({},Pe),{},{openDialog:Pe.openDialog==="help"?null:"help"}),commitToHistory:!1}},keyTest:function(de){return de.key===A.tW.QUESTION_MARK}}),Ye=t(6655),Ze=t(4643);function Je(de,Pe){var ze=Object.keys(de);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(de);Pe&&(Ke=Ke.filter(function(St){return Object.getOwnPropertyDescriptor(de,St).enumerable})),ze.push.apply(ze,Ke)}return ze}function nt(de){for(var Pe=1;Pe<arguments.length;Pe++){var ze=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?Je(Object(ze),!0).forEach(function(Ke){(0,O.Z)(de,Ke,ze[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(ze)):Je(Object(ze)).forEach(function(Ke){Object.defineProperty(de,Ke,Object.getOwnPropertyDescriptor(ze,Ke))})}return de}function dt(de,Pe){var ze=typeof Symbol<"u"&&de[Symbol.iterator]||de["@@iterator"];if(!ze){if(Array.isArray(de)||(ze=function(Ot,sn){if(Ot){if(typeof Ot=="string")return ge(Ot,sn);var un=Object.prototype.toString.call(Ot).slice(8,-1);if(un==="Object"&&Ot.constructor&&(un=Ot.constructor.name),un==="Map"||un==="Set")return Array.from(Ot);if(un==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(un))return ge(Ot,sn)}}(de))||Pe){ze&&(de=ze);var Ke=0,St=function(){};return{s:St,n:function(){return Ke>=de.length?{done:!0}:{done:!1,value:de[Ke++]}},e:function(Ot){throw Ot},f:St}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
47
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var nn,$t=!0,cn=!1;return{s:function(){ze=ze.call(de)},n:function(){var Ot=ze.next();return $t=Ot.done,Ot},e:function(Ot){cn=!0,nn=Ot},f:function(){try{$t||ze.return==null||ze.return()}finally{if(cn)throw nn}}}}function ge(de,Pe){(Pe==null||Pe>de.length)&&(Pe=de.length);for(var ze=0,Ke=new Array(Pe);ze<Pe;ze++)Ke[ze]=de[ze];return Ke}var Se=function(de,Pe,ze){var Ke=ze.scene.getSelectedElements({selectedElementIds:Pe.selectedElementIds,includeBoundTextElement:!0});return Ke.length>=2&&!function(St){if(St.length>=2){var nn,$t=dt(St[0].groupIds);try{var cn=function(){var sn=nn.value;if(St.reduce(function(un,Rn){return un&&(0,k.Nd)(Rn,sn)},!0))return{v:!0}};for($t.s();!(nn=$t.n()).done;){var Ot=cn();if((0,Ye.Z)(Ot)==="object")return Ot.v}}catch(sn){$t.e(sn)}finally{$t.f()}}return!1}(Ke)},Be=(0,L.z)({name:"group",trackEvent:{category:"element"},perform:function(de,Pe,ze,Ke){var St=Ke.scene.getSelectedElements({selectedElementIds:Pe.selectedElementIds,includeBoundTextElement:!0});if(St.length<2)return{appState:Pe,elements:de,commitToHistory:!1};var nn=(0,k.iJ)(Pe);if(nn.length===1){var $t=nn[0],cn=new Set((0,k.Fb)(de,$t).map(function(ur){return ur.id})),Ot=new Set(St.map(function(ur){return ur.id}));if(new Set([].concat((0,f.Z)(Array.from(cn)),(0,f.Z)(Array.from(Ot)))).size===cn.size)return{appState:Pe,elements:de,commitToHistory:!1}}var sn=(0,f.Z)(de);new Set(St.map(function(ur){return ur.frameId})).size>1&&(0,Le.SH)(St).forEach(function(ur,vr){sn=(0,Le.lz)(sn,ur,Pe)});var un=(0,Ze.kb)(),Rn=(0,P.xn)(St);sn=sn.map(function(ur){return Rn.get(ur.id)?(0,l.BE)(ur,{groupIds:(0,k.S_)(ur.groupIds,un,Pe.editingGroupId)}):ur});var Fn=(0,k.Fb)(sn,un),Hn=Fn[Fn.length-1],rr=sn.lastIndexOf(Hn),er=sn.slice(rr+1),zn=sn.slice(0,rr).filter(function(ur){return!(0,k.Nd)(ur,un)});return sn=[].concat((0,f.Z)(zn),(0,f.Z)(Fn),(0,f.Z)(er)),{appState:nt(nt({},Pe),(0,k.F$)(un,nt(nt({},Pe),{},{selectedGroupIds:{}}),(0,$.Lm)(sn))),elements:sn,commitToHistory:!0}},contextItemLabel:"labels.group",predicate:function(de,Pe,ze,Ke){return Se(0,Pe,Ke)},keyTest:function(de){return!de.shiftKey&&de[A.tW.CTRL_OR_CMD]&&de.key===A.tW.G},PanelComponent:function(de){var Pe=de.elements,ze=de.appState,Ke=de.updateData,St=de.app;return(0,r.jsx)(pe.V,{hidden:!Se(0,ze,St),type:"button",icon:(0,r.jsx)(h.BF,{theme:ze.theme}),onClick:function(){return Ke(null)},title:"".concat((0,E.t)("labels.group")," — ").concat((0,P.uY)("CtrlOrCmd+G")),"aria-label":(0,E.t)("labels.group"),visible:(0,g.N)((0,$.Lm)(Pe),ze)})}}),Xe=(0,L.z)({name:"ungroup",trackEvent:{category:"element"},perform:function(de,Pe,ze,Ke){if((0,k.iJ)(Pe).length===0)return{appState:Pe,elements:de,commitToHistory:!1};var St=(0,f.Z)(de),nn=[];St=St.map(function(sn){(0,v.Xh)(sn)&&nn.push(sn.id);var un=(0,k.h6)(sn.groupIds,Pe.selectedGroupIds);return un.length===sn.groupIds.length?sn:(0,l.BE)(sn,{groupIds:un})});var $t=(0,k.bO)(Pe,(0,$.Lm)(St),Pe,null),cn=Ke.scene.getSelectedElements(Pe),Ot=new Set(cn.filter(function(sn){return sn.frameId}).map(function(sn){return sn.frameId}));return(0,Le.wO)(de).filter(function(sn){return Ot.has(sn.id)}).forEach(function(sn){sn&&(St=(0,Le.pr)(St,(0,Le.ni)(St,sn,Pe),sn,Pe))}),$t.selectedElementIds=Object.entries($t.selectedElementIds).reduce(function(sn,un){var Rn=(0,j.Z)(un,2),Fn=Rn[0];return Rn[1]&&!nn.includes(Fn)&&(sn[Fn]=!0),sn},{}),{appState:nt(nt({},Pe),$t),elements:St,commitToHistory:!0}},keyTest:function(de){return de.shiftKey&&de[A.tW.CTRL_OR_CMD]&&de.key===A.tW.G.toUpperCase()},contextItemLabel:"labels.ungroup",predicate:function(de,Pe){return(0,k.iJ)(Pe).length>0},PanelComponent:function(de){var Pe=de.elements,ze=de.appState,Ke=de.updateData;return(0,r.jsx)(pe.V,{type:"button",hidden:(0,k.iJ)(ze).length===0,icon:(0,r.jsx)(h.RJ,{theme:ze.theme}),onClick:function(){return Ke(null)},title:"".concat((0,E.t)("labels.ungroup")," — ").concat((0,P.uY)("CtrlOrCmd+Shift+G")),"aria-label":(0,E.t)("labels.ungroup"),visible:(0,g.N)((0,$.Lm)(Pe),ze)})}}),lt=t(957),it=t(3379),yt=t.n(it),_t=t(7795),ut=t.n(_t),Tt=t(569),Yt=t.n(Tt),Zt=t(3565),Pt=t.n(Zt),en=t(9216),tn=t.n(en),ot=t(4589),It=t.n(ot),mt=t(3729),jt={};jt.styleTagTransform=It(),jt.setAttributes=Pt(),jt.insert=Yt().bind(null,"head"),jt.domAPI=ut(),jt.insertStyleElement=tn(),yt()(mt.Z,jt),mt.Z&&mt.Z.locals&&mt.Z.locals;var xt=t(9787),Nt=function(de){var Pe=de.color,ze=de.onClick,Ke=de.name,St=de.src,nn=(0,lt.l)(Ke),$t=(0,xt.useState)(!1),cn=(0,j.Z)($t,2),Ot=cn[0],sn=cn[1],un=!Ot&&St,Rn=un?void 0:{background:Pe};return(0,r.jsx)("div",{className:"Avatar",style:Rn,onClick:ze,children:un?(0,r.jsx)("img",{className:"Avatar-img",src:St,alt:nn,referrerPolicy:"no-referrer",onError:function(){return sn(!0)}}):nn})},Ut=t(2382);function rn(de,Pe){var ze=Object.keys(de);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(de);Pe&&(Ke=Ke.filter(function(St){return Object.getOwnPropertyDescriptor(de,St).enumerable})),ze.push.apply(ze,Ke)}return ze}function Ft(de){for(var Pe=1;Pe<arguments.length;Pe++){var ze=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?rn(Object(ze),!0).forEach(function(Ke){(0,O.Z)(de,Ke,ze[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(ze)):rn(Object(ze)).forEach(function(Ke){Object.defineProperty(de,Ke,Object.getOwnPropertyDescriptor(ze,Ke))})}return de}(0,L.z)({name:"goToCollaborator",viewMode:!0,trackEvent:{category:"collab"},perform:function(de,Pe,ze){var Ke=ze;return Ke?{appState:Ft(Ft(Ft({},Pe),(0,Ut.s)({scenePoint:Ke,viewportDimensions:{width:Pe.width,height:Pe.height},zoom:Pe.zoom})),{},{openMenu:Pe.openMenu==="canvas"?null:Pe.openMenu}),commitToHistory:!1}:{appState:Pe,commitToHistory:!1}},PanelComponent:function(de){var Pe=de.updateData,ze=de.data,Ke=(0,j.Z)(ze,2),St=Ke[0],nn=Ke[1],$t=(0,lt.G)(St);return(0,r.jsx)(Nt,{color:$t,onClick:function(){return Pe(nn.pointer)},name:nn.username||"",src:nn.avatarUrl})}});var Sn=t(5742);function mn(de,Pe){var ze=Object.keys(de);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(de);Pe&&(Ke=Ke.filter(function(St){return Object.getOwnPropertyDescriptor(de,St).enumerable})),ze.push.apply(ze,Ke)}return ze}function Yn(de){for(var Pe=1;Pe<arguments.length;Pe++){var ze=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?mn(Object(ze),!0).forEach(function(Ke){(0,O.Z)(de,Ke,ze[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(ze)):mn(Object(ze)).forEach(function(Ke){Object.defineProperty(de,Ke,Object.getOwnPropertyDescriptor(ze,Ke))})}return de}function ht(de,Pe){var ze=typeof Symbol<"u"&&de[Symbol.iterator]||de["@@iterator"];if(!ze){if(Array.isArray(de)||(ze=function(Ot,sn){if(Ot){if(typeof Ot=="string")return Xt(Ot,sn);var un=Object.prototype.toString.call(Ot).slice(8,-1);if(un==="Object"&&Ot.constructor&&(un=Ot.constructor.name),un==="Map"||un==="Set")return Array.from(Ot);if(un==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(un))return Xt(Ot,sn)}}(de))||Pe){ze&&(de=ze);var Ke=0,St=function(){};return{s:St,n:function(){return Ke>=de.length?{done:!0}:{done:!1,value:de[Ke++]}},e:function(Ot){throw Ot},f:St}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
48
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var nn,$t=!0,cn=!1;return{s:function(){ze=ze.call(de)},n:function(){var Ot=ze.next();return $t=Ot.done,Ot},e:function(Ot){cn=!0,nn=Ot},f:function(){try{$t||ze.return==null||ze.return()}finally{if(cn)throw nn}}}}function Xt(de,Pe){(Pe==null||Pe>de.length)&&(Pe=de.length);for(var ze=0,Ke=new Array(Pe);ze<Pe;ze++)Ke[ze]=de[ze];return Ke}var zt=(0,L.z)({name:"addToLibrary",trackEvent:{category:"element"},perform:function(de,Pe,ze,Ke){var St,nn=Ke.scene.getSelectedElements({selectedElementIds:Pe.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}),$t=ht(y.PR);try{var cn=function(){var sn=St.value;if(nn.some(function(un){return un.type===sn}))return{v:{commitToHistory:!1,appState:Yn(Yn({},Pe),{},{errorMessage:(0,E.t)("errors.libraryElementTypeError.".concat(sn))})}}};for($t.s();!(St=$t.n()).done;){var Ot=cn();if((0,Ye.Z)(Ot)==="object")return Ot.v}}catch(sn){$t.e(sn)}finally{$t.f()}return Ke.library.getLatestLibrary().then(function(sn){return Ke.library.setLibrary([{id:(0,Ze.kb)(),status:"unpublished",elements:nn.map(Sn.OL),created:Date.now()}].concat((0,f.Z)(sn)))}).then(function(){return{commitToHistory:!1,appState:Yn(Yn({},Pe),{},{toast:{message:(0,E.t)("toast.addedToLibrary")}})}}).catch(function(sn){return{commitToHistory:!1,appState:Yn(Yn({},Pe),{},{errorMessage:sn.message})}})},contextItemLabel:"labels.addToLibrary"}),Vt=t(4949);function Tn(de,Pe){var ze=Object.keys(de);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(de);Pe&&(Ke=Ke.filter(function(St){return Object.getOwnPropertyDescriptor(de,St).enumerable})),ze.push.apply(ze,Ke)}return ze}function Dn(de){for(var Pe=1;Pe<arguments.length;Pe++){var ze=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?Tn(Object(ze),!0).forEach(function(Ke){(0,O.Z)(de,Ke,ze[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(ze)):Tn(Object(ze)).forEach(function(Ke){Object.defineProperty(de,Ke,Object.getOwnPropertyDescriptor(ze,Ke))})}return de}var Nn=function(de,Pe,ze){var Ke=ze.axis,St=ze.position,nn=(0,Vt.v2)(de),$t=Ke==="x"?["minX","maxX"]:["minY","maxY"],cn=(0,j.Z)($t,2),Ot=cn[0],sn=cn[1],un={x:0,y:0};return Dn(Dn({},un),{},St==="start"?(0,O.Z)({},Ke,Pe[Ot]-nn[Ot]):St==="end"?(0,O.Z)({},Ke,Pe[sn]-nn[sn]):(0,O.Z)({},Ke,(Pe[Ot]+Pe[sn])/2-(nn[Ot]+nn[sn])/2))},Xn=function(de,Pe,ze,Ke){var St=Ke.scene.getSelectedElements(Pe);return St.length>1&&!St.some(function(nn){return nn.type==="frame"})},jn=function(de,Pe,ze,Ke){var St=function($t,cn){var Ot=(0,k.AI)($t),sn=(0,Vt.v2)($t);return Ot.flatMap(function(un){var Rn=Nn(un,sn,cn);return un.map(function(Fn){return(0,l.BE)(Fn,{x:Fn.x+Rn.x,y:Fn.y+Rn.y})})})}(ze.scene.getSelectedElements(Pe),Ke),nn=(0,P.xn)(St);return(0,Le.Tq)(de.map(function($t){return nn.get($t.id)||$t}),Pe,ze)};(0,L.z)({name:"alignTop",trackEvent:{category:"element"},predicate:Xn,perform:function(de,Pe,ze,Ke){return{appState:Pe,elements:jn(de,Pe,Ke,{position:"start",axis:"y"}),commitToHistory:!0}},keyTest:function(de){return de[A.tW.CTRL_OR_CMD]&&de.shiftKey&&de.key===A.tW.ARROW_UP},PanelComponent:function(de){var Pe=de.elements,ze=de.appState,Ke=de.updateData,St=de.app;return(0,r.jsx)(pe.V,{hidden:!Xn(0,ze,0,St),type:"button",icon:h.Ct,onClick:function(){return Ke(null)},title:"".concat((0,E.t)("labels.alignTop")," — ").concat((0,P.uY)("CtrlOrCmd+Shift+Up")),"aria-label":(0,E.t)("labels.alignTop"),visible:(0,g.N)((0,$.Lm)(Pe),ze)})}}),(0,L.z)({name:"alignBottom",trackEvent:{category:"element"},predicate:Xn,perform:function(de,Pe,ze,Ke){return{appState:Pe,elements:jn(de,Pe,Ke,{position:"end",axis:"y"}),commitToHistory:!0}},keyTest:function(de){return de[A.tW.CTRL_OR_CMD]&&de.shiftKey&&de.key===A.tW.ARROW_DOWN},PanelComponent:function(de){var Pe=de.elements,ze=de.appState,Ke=de.updateData,St=de.app;return(0,r.jsx)(pe.V,{hidden:!Xn(0,ze,0,St),type:"button",icon:h.HL,onClick:function(){return Ke(null)},title:"".concat((0,E.t)("labels.alignBottom")," — ").concat((0,P.uY)("CtrlOrCmd+Shift+Down")),"aria-label":(0,E.t)("labels.alignBottom"),visible:(0,g.N)((0,$.Lm)(Pe),ze)})}}),(0,L.z)({name:"alignLeft",trackEvent:{category:"element"},predicate:Xn,perform:function(de,Pe,ze,Ke){return{appState:Pe,elements:jn(de,Pe,Ke,{position:"start",axis:"x"}),commitToHistory:!0}},keyTest:function(de){return de[A.tW.CTRL_OR_CMD]&&de.shiftKey&&de.key===A.tW.ARROW_LEFT},PanelComponent:function(de){var Pe=de.elements,ze=de.appState,Ke=de.updateData,St=de.app;return(0,r.jsx)(pe.V,{hidden:!Xn(0,ze,0,St),type:"button",icon:h.xs,onClick:function(){return Ke(null)},title:"".concat((0,E.t)("labels.alignLeft")," — ").concat((0,P.uY)("CtrlOrCmd+Shift+Left")),"aria-label":(0,E.t)("labels.alignLeft"),visible:(0,g.N)((0,$.Lm)(Pe),ze)})}}),(0,L.z)({name:"alignRight",trackEvent:{category:"element"},predicate:Xn,perform:function(de,Pe,ze,Ke){return{appState:Pe,elements:jn(de,Pe,Ke,{position:"end",axis:"x"}),commitToHistory:!0}},keyTest:function(de){return de[A.tW.CTRL_OR_CMD]&&de.shiftKey&&de.key===A.tW.ARROW_RIGHT},PanelComponent:function(de){var Pe=de.elements,ze=de.appState,Ke=de.updateData,St=de.app;return(0,r.jsx)(pe.V,{hidden:!Xn(0,ze,0,St),type:"button",icon:h.mh,onClick:function(){return Ke(null)},title:"".concat((0,E.t)("labels.alignRight")," — ").concat((0,P.uY)("CtrlOrCmd+Shift+Right")),"aria-label":(0,E.t)("labels.alignRight"),visible:(0,g.N)((0,$.Lm)(Pe),ze)})}}),(0,L.z)({name:"alignVerticallyCentered",trackEvent:{category:"element"},predicate:Xn,perform:function(de,Pe,ze,Ke){return{appState:Pe,elements:jn(de,Pe,Ke,{position:"center",axis:"y"}),commitToHistory:!0}},PanelComponent:function(de){var Pe=de.elements,ze=de.appState,Ke=de.updateData,St=de.app;return(0,r.jsx)(pe.V,{hidden:!Xn(0,ze,0,St),type:"button",icon:h.ST,onClick:function(){return Ke(null)},title:(0,E.t)("labels.centerVertically"),"aria-label":(0,E.t)("labels.centerVertically"),visible:(0,g.N)((0,$.Lm)(Pe),ze)})}}),(0,L.z)({name:"alignHorizontallyCentered",trackEvent:{category:"element"},predicate:Xn,perform:function(de,Pe,ze,Ke){return{appState:Pe,elements:jn(de,Pe,Ke,{position:"center",axis:"x"}),commitToHistory:!0}},PanelComponent:function(de){var Pe=de.elements,ze=de.appState,Ke=de.updateData,St=de.app;return(0,r.jsx)(pe.V,{hidden:!Xn(0,ze,0,St),type:"button",icon:h.gK,onClick:function(){return Ke(null)},title:(0,E.t)("labels.centerHorizontally"),"aria-label":(0,E.t)("labels.centerHorizontally"),visible:(0,g.N)((0,$.Lm)(Pe),ze)})}});function wt(de,Pe){var ze=typeof Symbol<"u"&&de[Symbol.iterator]||de["@@iterator"];if(!ze){if(Array.isArray(de)||(ze=function(Ot,sn){if(Ot){if(typeof Ot=="string")return Et(Ot,sn);var un=Object.prototype.toString.call(Ot).slice(8,-1);if(un==="Object"&&Ot.constructor&&(un=Ot.constructor.name),un==="Map"||un==="Set")return Array.from(Ot);if(un==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(un))return Et(Ot,sn)}}(de))||Pe){ze&&(de=ze);var Ke=0,St=function(){};return{s:St,n:function(){return Ke>=de.length?{done:!0}:{done:!1,value:de[Ke++]}},e:function(Ot){throw Ot},f:St}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
49
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var nn,$t=!0,cn=!1;return{s:function(){ze=ze.call(de)},n:function(){var Ot=ze.next();return $t=Ot.done,Ot},e:function(Ot){cn=!0,nn=Ot},f:function(){try{$t||ze.return==null||ze.return()}finally{if(cn)throw nn}}}}function Et(de,Pe){(Pe==null||Pe>de.length)&&(Pe=de.length);for(var ze=0,Ke=new Array(Pe);ze<Pe;ze++)Ke[ze]=de[ze];return Ke}var Ct=function(de,Pe){var ze=Pe.scene.getSelectedElements(de);return ze.length>1&&!ze.some(function(Ke){return Ke.type==="frame"})},Lt=function(de,Pe,ze,Ke){var St=function($t,cn){var Ot,sn=cn.axis==="x"?["minX","midX","maxX","width"]:["minY","midY","maxY","height"],un=(0,j.Z)(sn,4),Rn=un[0],Fn=un[1],Hn=un[2],rr=un[3],er=(0,Vt.v2)($t),zn=(0,k.AI)($t).map(function(Pr){return[Pr,(0,Vt.v2)(Pr)]}).sort(function(Pr,Vr){return Pr[1][Fn]-Vr[1][Fn]}),ur=0,vr=wt(zn);try{for(vr.s();!(Ot=vr.n()).done;)ur+=Ot.value[1][rr]}catch(Pr){vr.e(Pr)}finally{vr.f()}var oo=(er[rr]-ur)/(zn.length-1);if(oo<0){var po=zn.findIndex(function(Pr){return Pr[1][Rn]===er[Rn]}),Lo=zn.findIndex(function(Pr){return Pr[1][Hn]===er[Hn]}),hi=(zn[Lo][1][Fn]-zn[po][1][Fn])/(zn.length-1),An=zn[po][1][Fn];return zn.flatMap(function(Pr,Vr){var ko=(0,j.Z)(Pr,2),Bo=ko[0],Ri=ko[1],Go={x:0,y:0};return Vr!==po&&Vr!==Lo&&(An+=hi,Go[cn.axis]=An-Ri[Fn]),Bo.map(function(ni){return(0,l.BE)(ni,{x:ni.x+Go.x,y:ni.y+Go.y})})})}var br=er[Rn];return zn.flatMap(function(Pr){var Vr=(0,j.Z)(Pr,2),ko=Vr[0],Bo=Vr[1],Ri={x:0,y:0};return Ri[cn.axis]=br-Bo[Rn],br+=oo,br+=Bo[rr],ko.map(function(Go){return(0,l.BE)(Go,{x:Go.x+Ri.x,y:Go.y+Ri.y})})})}(ze.scene.getSelectedElements(Pe),Ke),nn=(0,P.xn)(St);return(0,Le.Tq)(de.map(function($t){return nn.get($t.id)||$t}),Pe,ze)},hn=((0,L.z)({name:"distributeHorizontally",trackEvent:{category:"element"},perform:function(de,Pe,ze,Ke){return{appState:Pe,elements:Lt(de,Pe,Ke,{space:"between",axis:"x"}),commitToHistory:!0}},keyTest:function(de){return!de[A.tW.CTRL_OR_CMD]&&de.altKey&&de.code===A.aU.H},PanelComponent:function(de){var Pe=de.elements,ze=de.appState,Ke=de.updateData,St=de.app;return(0,r.jsx)(pe.V,{hidden:!Ct(ze,St),type:"button",icon:h.uD,onClick:function(){return Ke(null)},title:"".concat((0,E.t)("labels.distributeHorizontally")," — ").concat((0,P.uY)("Alt+H")),"aria-label":(0,E.t)("labels.distributeHorizontally"),visible:(0,g.N)((0,$.Lm)(Pe),ze)})}}),(0,L.z)({name:"distributeVertically",trackEvent:{category:"element"},perform:function(de,Pe,ze,Ke){return{appState:Pe,elements:Lt(de,Pe,Ke,{space:"between",axis:"y"}),commitToHistory:!0}},keyTest:function(de){return!de[A.tW.CTRL_OR_CMD]&&de.altKey&&de.code===A.aU.V},PanelComponent:function(de){var Pe=de.elements,ze=de.appState,Ke=de.updateData,St=de.app;return(0,r.jsx)(pe.V,{hidden:!Ct(ze,St),type:"button",icon:h.W5,onClick:function(){return Ke(null)},title:"".concat((0,E.t)("labels.distributeVertically")," — ").concat((0,P.uY)("Alt+V")),"aria-label":(0,E.t)("labels.distributeVertically"),visible:(0,g.N)((0,$.Lm)(Pe),ze)})}}),t(4381)),yn=(0,L.z)({name:"flipHorizontal",trackEvent:{category:"element"},perform:function(de,Pe,ze,Ke){return{elements:(0,Le.Tq)(Bn(de,Pe,"horizontal"),Pe,Ke),appState:Pe,commitToHistory:!0}},keyTest:function(de){return de.shiftKey&&de.code===A.aU.H},contextItemLabel:"labels.flipHorizontal"}),fn=(0,L.z)({name:"flipVertical",trackEvent:{category:"element"},perform:function(de,Pe,ze,Ke){return{elements:(0,Le.Tq)(Bn(de,Pe,"vertical"),Pe,Ke),appState:Pe,commitToHistory:!0}},keyTest:function(de){return de.shiftKey&&de.code===A.aU.V&&!de[A.tW.CTRL_OR_CMD]},contextItemLabel:"labels.flipVertical"}),Bn=function(de,Pe,ze){var Ke=(0,g.eD)((0,$.Lm)(de),Pe,{includeBoundTextElement:!0,includeElementsInFrames:!0}),St=En(Ke,Pe,ze),nn=(0,P.xn)(St);return de.map(function($t){return nn.get($t.id)||$t})},En=function(de,Pe,ze){var Ke=(0,Vt.v2)(de),St=Ke.minX,nn=Ke.minY,$t=Ke.maxX,cn=Ke.maxY;return(0,hn.LM)({originalElements:(0,P.xn)(de)},de,"nw",!0,ze==="horizontal"?$t:St,ze==="horizontal"?nn:cn),((0,te.N1)(Pe)?te.el:te.H)(de),de},Cn=t(5047);function qn(de,Pe){var ze=Object.keys(de);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(de);Pe&&(Ke=Ke.filter(function(St){return Object.getOwnPropertyDescriptor(de,St).enumerable})),ze.push.apply(ze,Ke)}return ze}function vn(de){for(var Pe=1;Pe<arguments.length;Pe++){var ze=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?qn(Object(ze),!0).forEach(function(Ke){(0,O.Z)(de,Ke,ze[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(ze)):qn(Object(ze)).forEach(function(Ke){Object.defineProperty(de,Ke,Object.getOwnPropertyDescriptor(ze,Ke))})}return de}var wn=(0,L.z)({name:"gridMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(de){return!de.gridSize}},perform:function(de,Pe){return{appState:vn(vn({},Pe),{},{gridSize:this.checked(Pe)?null:y.k,objectsSnapModeEnabled:!1}),commitToHistory:!1}},checked:function(de){return de.gridSize!==null},predicate:function(de,Pe,ze){return ze.gridModeEnabled===void 0},contextItemLabel:"labels.showGrid",keyTest:function(de){return de[A.tW.CTRL_OR_CMD]&&de.code===A.aU.QUOTE}});function In(de,Pe){var ze=Object.keys(de);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(de);Pe&&(Ke=Ke.filter(function(St){return Object.getOwnPropertyDescriptor(de,St).enumerable})),ze.push.apply(ze,Ke)}return ze}function kn(de){for(var Pe=1;Pe<arguments.length;Pe++){var ze=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?In(Object(ze),!0).forEach(function(Ke){(0,O.Z)(de,Ke,ze[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(ze)):In(Object(ze)).forEach(function(Ke){Object.defineProperty(de,Ke,Object.getOwnPropertyDescriptor(ze,Ke))})}return de}var nr=(0,L.z)({name:"zenMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(de){return!de.zenModeEnabled}},perform:function(de,Pe){return{appState:kn(kn({},Pe),{},{zenModeEnabled:!this.checked(Pe)}),commitToHistory:!1}},checked:function(de){return de.zenModeEnabled},predicate:function(de,Pe,ze){return ze.zenModeEnabled===void 0},contextItemLabel:"buttons.zenMode",keyTest:function(de){return!de[A.tW.CTRL_OR_CMD]&&de.altKey&&de.code===A.aU.Z}});function Pn(de,Pe){var ze=Object.keys(de);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(de);Pe&&(Ke=Ke.filter(function(St){return Object.getOwnPropertyDescriptor(de,St).enumerable})),ze.push.apply(ze,Ke)}return ze}function Jn(de){for(var Pe=1;Pe<arguments.length;Pe++){var ze=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?Pn(Object(ze),!0).forEach(function(Ke){(0,O.Z)(de,Ke,ze[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(ze)):Pn(Object(ze)).forEach(function(Ke){Object.defineProperty(de,Ke,Object.getOwnPropertyDescriptor(ze,Ke))})}return de}var xr=(0,L.z)({name:"objectsSnapMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(de){return!de.objectsSnapModeEnabled}},perform:function(de,Pe){return{appState:Jn(Jn({},Pe),{},{objectsSnapModeEnabled:!this.checked(Pe),gridSize:null}),commitToHistory:!1}},checked:function(de){return de.objectsSnapModeEnabled},predicate:function(de,Pe,ze){return ze.objectsSnapModeEnabled===void 0},contextItemLabel:"buttons.objectsSnapMode",keyTest:function(de){return!de[A.tW.CTRL_OR_CMD]&&de.altKey&&de.code===A.aU.S}}),Nr=t(7080),$r=t(7392),ao=t(5992),lo=t(9672);function Dr(de,Pe){var ze=Object.keys(de);if(Object.getOwnPropertySymbols){var Ke=Object.getOwnPropertySymbols(de);Pe&&(Ke=Ke.filter(function(St){return Object.getOwnPropertyDescriptor(de,St).enumerable})),ze.push.apply(ze,Ke)}return ze}function Ar(de){for(var Pe=1;Pe<arguments.length;Pe++){var ze=arguments[Pe]!=null?arguments[Pe]:{};Pe%2?Dr(Object(ze),!0).forEach(function(Ke){(0,O.Z)(de,Ke,ze[Ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(de,Object.getOwnPropertyDescriptors(ze)):Dr(Object(ze)).forEach(function(Ke){Object.defineProperty(de,Ke,Object.getOwnPropertyDescriptor(ze,Ke))})}return de}var wo=(0,L.z)({name:"toggleLinearEditor",trackEvent:{category:"element"},predicate:function(de,Pe,ze,Ke){var St=Ke.scene.getSelectedElements(Pe);return!(St.length!==1||!(0,v.bt)(St[0]))},perform:function(de,Pe,ze,Ke){var St,nn=Ke.scene.getSelectedElements({selectedElementIds:Pe.selectedElementIds,includeBoundTextElement:!0})[0],$t=((St=Pe.editingLinearElement)===null||St===void 0?void 0:St.elementId)===nn.id?null:new I._(nn,Ke.scene);return{appState:Ar(Ar({},Pe),{},{editingLinearElement:$t}),commitToHistory:!1}},contextItemLabel:function(de,Pe,ze){var Ke,St=ze.scene.getSelectedElements({selectedElementIds:Pe.selectedElementIds,includeBoundTextElement:!0})[0];return((Ke=Pe.editingLinearElement)===null||Ke===void 0?void 0:Ke.elementId)===St.id?"labels.lineEditor.exit":"labels.lineEditor.edit"}})},2767:function(fe,Q,t){t.d(Q,{N:function(){return T},z:function(){return j}});var T=[],j=function(f){return T=T.concat(f),f}},2529:function(fe,Q,t){t.d(Q,{C:function(){return v}});var T=t(9937),j=t(8227),f=t(9827),l={toggleTheme:[(0,f.uY)("Shift+Alt+D")],saveScene:[(0,f.uY)("CtrlOrCmd+S")],loadScene:[(0,f.uY)("CtrlOrCmd+O")],clearCanvas:[(0,f.uY)("CtrlOrCmd+Delete")],imageExport:[(0,f.uY)("CtrlOrCmd+Shift+E")],cut:[(0,f.uY)("CtrlOrCmd+X")],copy:[(0,f.uY)("CtrlOrCmd+C")],paste:[(0,f.uY)("CtrlOrCmd+V")],copyStyles:[(0,f.uY)("CtrlOrCmd+Alt+C")],pasteStyles:[(0,f.uY)("CtrlOrCmd+Alt+V")],selectAll:[(0,f.uY)("CtrlOrCmd+A")],deleteSelectedElements:[(0,f.uY)("Delete")],duplicateSelection:[(0,f.uY)("CtrlOrCmd+D"),(0,f.uY)("Alt+".concat((0,j.t)("helpDialog.drag")))],sendBackward:[(0,f.uY)("CtrlOrCmd+[")],bringForward:[(0,f.uY)("CtrlOrCmd+]")],sendToBack:[T.Um?(0,f.uY)("CtrlOrCmd+Alt+["):(0,f.uY)("CtrlOrCmd+Shift+[")],bringToFront:[T.Um?(0,f.uY)("CtrlOrCmd+Alt+]"):(0,f.uY)("CtrlOrCmd+Shift+]")],copyAsPng:[(0,f.uY)("Shift+Alt+C")],copyAsSvg:[],group:[(0,f.uY)("CtrlOrCmd+G")],ungroup:[(0,f.uY)("CtrlOrCmd+Shift+G")],gridMode:[(0,f.uY)("CtrlOrCmd+'")],zenMode:[(0,f.uY)("Alt+Z")],objectsSnapMode:[(0,f.uY)("Alt+S")],stats:[(0,f.uY)("Alt+/")],addToLibrary:[],flipHorizontal:[(0,f.uY)("Shift+H")],flipVertical:[(0,f.uY)("Shift+V")],viewMode:[(0,f.uY)("Alt+R")],hyperlink:[(0,f.uY)("CtrlOrCmd+K")],toggleElementLock:[(0,f.uY)("CtrlOrCmd+Shift+L")]},v=function(k){var g=l[k];return g&&g.length>0?g[0]:""}},3646:function(fe,Q,t){t.d(Q,{L:function(){return T}});var T=function(j,f,l,v){try{if(typeof window>"u"||{VITE_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",VITE_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",VITE_APP_LIBRARY_URL:"https://libraries.excalidraw.com",VITE_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",VITE_APP_PORTAL_URL:"https://portal.excalidraw.com",VITE_APP_PLUS_LP:"https://plus.excalidraw.com",VITE_APP_PLUS_APP:"https://app.excalidraw.com",VITE_APP_WS_SERVER_URL:"",VITE_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',VITE_APP_DISABLE_TRACKING:"",VITE_PKG_NAME:"@excalidraw/excalidraw",VITE_PKG_VERSION:"0.17.6",VITE_IS_EXCALIDRAW_NPM_PACKAGE:!0}.VITE_WORKER_ID||![].includes(j))return;window.sa_event&&window.sa_event(f,{category:j,label:l,value:v})}catch(k){console.error("error during analytics",k)}}},6853:function(fe,Q,t){t.d(Q,{EN:function(){return K},eS:function(){return R},im:function(){return k},l$:function(){return U},s:function(){return P}});var T=t(9240),j=t(9937),f=t(8227),l=t(9827),v=j.ZB.includes(devicePixelRatio)?devicePixelRatio:1,k=function(){return{showWelcomeScreen:!1,theme:j.C6.LIGHT,collaborators:new Map,currentChartType:"bar",currentItemBackgroundColor:j.HN.backgroundColor,currentItemEndArrowhead:"arrow",currentItemFillStyle:j.HN.fillStyle,currentItemFontFamily:j.rk,currentItemFontSize:j.n5,currentItemOpacity:j.HN.opacity,currentItemRoughness:j.HN.roughness,currentItemStartArrowhead:null,currentItemStrokeColor:j.HN.strokeColor,currentItemRoundness:"round",currentItemStrokeStyle:j.HN.strokeStyle,currentItemStrokeWidth:j.HN.strokeWidth,currentItemTextAlign:j.Hg,cursorButton:"up",activeEmbeddable:null,draggingElement:null,editingElement:null,editingGroupId:null,editingLinearElement:null,activeTool:{type:"selection",customType:null,locked:j.HN.locked,lastActiveTool:null},penMode:!1,penDetected:!1,errorMessage:null,exportBackground:!0,exportScale:v,exportEmbedScene:!1,exportWithDarkMode:!1,fileHandle:null,gridSize:null,isBindingEnabled:!0,defaultSidebarDockedPreference:!1,isLoading:!1,isResizing:!1,isRotating:!1,lastPointerDownWith:"mouse",multiElement:null,name:"".concat((0,f.t)("labels.untitled"),"-").concat((0,l.Fc)()),contextMenu:null,openMenu:null,openPopup:null,openSidebar:null,openDialog:null,pasteDialog:{shown:!1,data:null},previousSelectedElementIds:{},resizingElement:null,scrolledOutside:!1,scrollX:0,scrollY:0,selectedElementIds:{},selectedGroupIds:{},selectedElementsAreBeingDragged:!1,selectionElement:null,shouldCacheIgnoreZoom:!1,showStats:!1,startBoundElement:null,suggestedBindings:[],frameRendering:{enabled:!0,clip:!0,name:!0,outline:!0},frameToHighlight:null,editingFrame:null,elementsToHighlight:null,toast:null,viewBackgroundColor:T.HO.white,zenModeEnabled:!1,zoom:{value:1},viewModeEnabled:!1,pendingImageElementId:null,showHyperlinkPopup:!1,selectedLinearElement:null,snapLines:[],originSnapOffset:{x:0,y:0},objectsSnapModeEnabled:!1}},g={showWelcomeScreen:{browser:!0,export:!1,server:!1},theme:{browser:!0,export:!1,server:!1},collaborators:{browser:!1,export:!1,server:!1},currentChartType:{browser:!0,export:!1,server:!1},currentItemBackgroundColor:{browser:!0,export:!1,server:!1},currentItemEndArrowhead:{browser:!0,export:!1,server:!1},currentItemFillStyle:{browser:!0,export:!1,server:!1},currentItemFontFamily:{browser:!0,export:!1,server:!1},currentItemFontSize:{browser:!0,export:!1,server:!1},currentItemRoundness:{browser:!0,export:!1,server:!1},currentItemOpacity:{browser:!0,export:!1,server:!1},currentItemRoughness:{browser:!0,export:!1,server:!1},currentItemStartArrowhead:{browser:!0,export:!1,server:!1},currentItemStrokeColor:{browser:!0,export:!1,server:!1},currentItemStrokeStyle:{browser:!0,export:!1,server:!1},currentItemStrokeWidth:{browser:!0,export:!1,server:!1},currentItemTextAlign:{browser:!0,export:!1,server:!1},cursorButton:{browser:!0,export:!1,server:!1},activeEmbeddable:{browser:!1,export:!1,server:!1},draggingElement:{browser:!1,export:!1,server:!1},editingElement:{browser:!1,export:!1,server:!1},editingGroupId:{browser:!0,export:!1,server:!1},editingLinearElement:{browser:!1,export:!1,server:!1},activeTool:{browser:!0,export:!1,server:!1},penMode:{browser:!0,export:!1,server:!1},penDetected:{browser:!0,export:!1,server:!1},errorMessage:{browser:!1,export:!1,server:!1},exportBackground:{browser:!0,export:!1,server:!1},exportEmbedScene:{browser:!0,export:!1,server:!1},exportScale:{browser:!0,export:!1,server:!1},exportWithDarkMode:{browser:!0,export:!1,server:!1},fileHandle:{browser:!1,export:!1,server:!1},gridSize:{browser:!0,export:!0,server:!0},height:{browser:!1,export:!1,server:!1},isBindingEnabled:{browser:!1,export:!1,server:!1},defaultSidebarDockedPreference:{browser:!0,export:!1,server:!1},isLoading:{browser:!1,export:!1,server:!1},isResizing:{browser:!1,export:!1,server:!1},isRotating:{browser:!1,export:!1,server:!1},lastPointerDownWith:{browser:!0,export:!1,server:!1},multiElement:{browser:!1,export:!1,server:!1},name:{browser:!0,export:!1,server:!1},offsetLeft:{browser:!1,export:!1,server:!1},offsetTop:{browser:!1,export:!1,server:!1},contextMenu:{browser:!1,export:!1,server:!1},openMenu:{browser:!0,export:!1,server:!1},openPopup:{browser:!1,export:!1,server:!1},openSidebar:{browser:!0,export:!1,server:!1},openDialog:{browser:!1,export:!1,server:!1},pasteDialog:{browser:!1,export:!1,server:!1},previousSelectedElementIds:{browser:!0,export:!1,server:!1},resizingElement:{browser:!1,export:!1,server:!1},scrolledOutside:{browser:!0,export:!1,server:!1},scrollX:{browser:!0,export:!1,server:!1},scrollY:{browser:!0,export:!1,server:!1},selectedElementIds:{browser:!0,export:!1,server:!1},selectedGroupIds:{browser:!0,export:!1,server:!1},selectedElementsAreBeingDragged:{browser:!1,export:!1,server:!1},selectionElement:{browser:!1,export:!1,server:!1},shouldCacheIgnoreZoom:{browser:!0,export:!1,server:!1},showStats:{browser:!0,export:!1,server:!1},startBoundElement:{browser:!1,export:!1,server:!1},suggestedBindings:{browser:!1,export:!1,server:!1},frameRendering:{browser:!1,export:!1,server:!1},frameToHighlight:{browser:!1,export:!1,server:!1},editingFrame:{browser:!1,export:!1,server:!1},elementsToHighlight:{browser:!1,export:!1,server:!1},toast:{browser:!1,export:!1,server:!1},viewBackgroundColor:{browser:!0,export:!0,server:!0},width:{browser:!1,export:!1,server:!1},zenModeEnabled:{browser:!0,export:!1,server:!1},zoom:{browser:!0,export:!1,server:!1},viewModeEnabled:{browser:!1,export:!1,server:!1},pendingImageElementId:{browser:!1,export:!1,server:!1},showHyperlinkPopup:{browser:!1,export:!1,server:!1},selectedLinearElement:{browser:!0,export:!1,server:!1},snapLines:{browser:!1,export:!1,server:!1},originSnapOffset:{browser:!1,export:!1,server:!1},objectsSnapModeEnabled:{browser:!0,export:!1,server:!1}},a=function(m,G){for(var he={},be=0,we=Object.keys(m);be<we.length;be++){var xe=we[be],ce=g[xe];if(ce!=null&&ce[G]){var D=m[xe];he[xe]=D}}return he},P=function(m){return a(m,"export")},R=function(m){return a(m,"server")},K=function(m){return m.activeTool.type==="eraser"},U=function(m){return m.activeTool.type==="hand"}},901:function(fe,Q,t){t.d(Q,{dz:function(){return D},i$:function(){return be},ps:function(){return E}});var T=t(1930),j=t(7169),f=t(2577),l=t(9240),v=t(9937),k=t(7651),g=t(4643);function a(L,h){var y=typeof Symbol<"u"&&L[Symbol.iterator]||L["@@iterator"];if(!y){if(Array.isArray(L)||(y=function(O,$){if(O){if(typeof O=="string")return P(O,$);var I=Object.prototype.toString.call(O).slice(8,-1);if(I==="Object"&&O.constructor&&(I=O.constructor.name),I==="Map"||I==="Set")return Array.from(O);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return P(O,$)}}(L))||h){y&&(L=y);var r=0,M=function(){};return{s:M,n:function(){return r>=L.length?{done:!0}:{done:!1,value:L[r++]}},e:function(O){throw O},f:M}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
50
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p,c=!0,w=!1;return{s:function(){y=y.call(L)},n:function(){var O=y.next();return c=O.done,O},e:function(O){w=!0,p=O},f:function(){try{c||y.return==null||y.return()}finally{if(w)throw p}}}}function P(L,h){(h==null||h>L.length)&&(h=L.length);for(var y=0,r=new Array(h);y<h;y++)r[y]=L[y];return r}function R(L,h){var y=Object.keys(L);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(L);h&&(r=r.filter(function(M){return Object.getOwnPropertyDescriptor(L,M).enumerable})),y.push.apply(y,r)}return y}function K(L){for(var h=1;h<arguments.length;h++){var y=arguments[h]!=null?arguments[h]:{};h%2?R(Object(y),!0).forEach(function(r){(0,j.Z)(L,r,y[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(y)):R(Object(y)).forEach(function(r){Object.defineProperty(L,r,Object.getOwnPropertyDescriptor(y,r))})}return L}var U=32,m=12,G=256,he="NOT_SPREADSHEET",be="VALID_SPREADSHEET",we=function(L){var h=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(L);return h?parseFloat("".concat((h[1]||h[2])+h[3]).replace(/,/g,"")):null},xe=function(L,h){return L.slice(1).every(function(y){return we(y[h])!==null})},ce=function(L){var h=L[0].length;if(h>2)return{type:he,reason:"More than 2 columns"};if(h===1){if(!xe(L,0))return{type:he,reason:"Value is not numeric"};var y=we(L[0][0])===null,r=(y?L.slice(1):L).map(function(_){return we(_[0])});return r.length<2?{type:he,reason:"Less than two rows"}:{type:be,spreadsheet:{title:y?L[0][0]:null,labels:null,values:r}}}var M=xe(L,0),p=xe(L,1);if(!M&&!p)return{type:he,reason:"Value is not numeric"};var c=p?[0,1]:[1,0],w=(0,f.Z)(c,2),O=w[0],$=w[1],I=we(L[0][$])===null,C=I?L.slice(1):L;return C.length<2?{type:he,reason:"Less than 2 rows"}:{type:be,spreadsheet:{title:I?L[0][$]:null,labels:C.map(function(_){return _[O]}),values:C.map(function(_){return we(_[$])})}}},D=function(L){var h=L.trim().split(`
|
|
51
|
+
`).map(function(p){return p.trim().split(" ")});if(h.length&&h[0].length!==2&&(h=L.trim().split(`
|
|
52
|
+
`).map(function(p){return p.trim().split(",")})),h.length===0)return{type:he,reason:"No values"};var y=h[0].length;if(!h.every(function(p){return p.length===y}))return{type:he,reason:"All rows don't have same number of columns"};var r=ce(h);if(r.type!==be){var M=ce(function(p){for(var c=[],w=0;w<p[0].length;w++){for(var O=[],$=0;$<p.length;$++)O.push(p[$][w]);c.push(O)}return c}(h));if(M.type===be)return M}return r},ne=(0,l.sF)(l.C2),S={fillStyle:"hachure",fontFamily:v.rk,fontSize:v.n5,opacity:100,roughness:1,strokeColor:l.HO.black,roundness:null,strokeStyle:"solid",strokeWidth:1,verticalAlign:v.oX.MIDDLE,locked:!1},z=function(L){return{chartWidth:44*L.values.length+m,chartHeight:280}},A=function(L,h,y,r,M,p){var c=z(L),w=c.chartWidth,O=L.title?(0,k.VL)(K(K({backgroundColor:M,groupIds:[r]},S),{},{text:L.title,x:h+w/2,y:y-G-24-v.n5,roundness:null,textAlign:"center"})):null;return[].concat((0,T.Z)([]),(0,T.Z)(O?[O]:[]),(0,T.Z)(function($,I,C,_,N){var q;return((q=$.labels)===null||q===void 0?void 0:q.map(function(pe,te){return(0,k.VL)(K(K({groupIds:[_],backgroundColor:N},S),{},{text:pe.length>8?"".concat(pe.slice(0,5),"..."):pe,x:I+44*te+24,y:C+6,width:U,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))}))||[]}(L,h,y,r,M)),(0,T.Z)(function($,I,C,_,N){var q=(0,k.VL)(K(K({groupIds:[_],backgroundColor:N},S),{},{x:I-m,y:C-m,text:"0",textAlign:"right"}));return[q,(0,k.VL)(K(K({groupIds:[_],backgroundColor:N},S),{},{x:I-m,y:C-G-q.height/2,text:Math.max.apply(Math,(0,T.Z)($.values)).toLocaleString(),textAlign:"right"}))]}(L,h,y,r,M)),(0,T.Z)(function($,I,C,_,N){var q=z($),pe=q.chartWidth,te=q.chartHeight;return[(0,k.y8)(K(K({backgroundColor:N,groupIds:[_]},S),{},{type:"line",x:I,y:C,startArrowhead:null,endArrowhead:null,width:pe,points:[[0,0],[pe,0]]})),(0,k.y8)(K(K({backgroundColor:N,groupIds:[_]},S),{},{type:"line",x:I,y:C,startArrowhead:null,endArrowhead:null,height:te,points:[[0,0],[0,-te]]})),(0,k.y8)(K(K({backgroundColor:N,groupIds:[_]},S),{},{type:"line",x:I,y:C-G-m,startArrowhead:null,endArrowhead:null,strokeStyle:"dotted",width:pe,opacity:50,points:[[0,0],[pe,0]]}))]}(L,h,y,r,M)))},E=function(L,h,y,r){return L==="line"?function(M,p,c){var w,O=Math.max.apply(Math,(0,T.Z)(M.values)),$=(0,g.kb)(),I=ne[Math.floor(Math.random()*ne.length)],C=0,_=[],N=a(M.values);try{for(N.s();!(w=N.n()).done;){var q=w.value,pe=44*C,te=-q/O*G;_.push([pe,te]),C++}}catch(Ne){N.e(Ne)}finally{N.f()}var ve=Math.max.apply(Math,(0,T.Z)(_.map(function(Ne){return Ne[0]}))),ae=Math.max.apply(Math,(0,T.Z)(_.map(function(Ne){return Ne[1]}))),H=Math.min.apply(Math,(0,T.Z)(_.map(function(Ne){return Ne[0]}))),le=Math.min.apply(Math,(0,T.Z)(_.map(function(Ne){return Ne[1]}))),ke=(0,k.y8)(K(K({backgroundColor:I,groupIds:[$]},S),{},{type:"line",x:p+m+16,y:c-m,startArrowhead:null,endArrowhead:null,height:ae-le,width:ve-H,strokeWidth:2,points:_})),Le=M.values.map(function(Ne,Ce){var Oe=44*Ce+6,De=-Ne/O*G+6;return(0,k.Up)(K(K({backgroundColor:I,groupIds:[$]},S),{},{fillStyle:"solid",strokeWidth:2,type:"ellipse",x:p+Oe+16,y:c+De-24,width:m,height:m}))}),Ge=M.values.map(function(Ne,Ce){var Oe=44*Ce+6,De=Ne/O*G+6+m;return(0,k.y8)(K(K({backgroundColor:I,groupIds:[$]},S),{},{type:"line",x:p+Oe+16+6,y:c-De,startArrowhead:null,endArrowhead:null,height:De,strokeStyle:"dotted",opacity:50,points:[[0,0],[0,De]]}))});return[].concat((0,T.Z)(A(M,p,c,$,I)),[ke],(0,T.Z)(Ge),(0,T.Z)(Le))}(h,y,r):function(M,p,c){var w=Math.max.apply(Math,(0,T.Z)(M.values)),O=(0,g.kb)(),$=ne[Math.floor(Math.random()*ne.length)],I=M.values.map(function(C,_){var N=C/w*G;return(0,k.Up)(K(K({backgroundColor:$,groupIds:[O]},S),{},{type:"rectangle",x:p+44*_+m,y:c-N-m,width:U,height:N}))});return[].concat((0,T.Z)(I),(0,T.Z)(A(M,p,c,O,$)))}(h,y,r)}},957:function(fe,Q,t){t.d(Q,{G:function(){return T},l:function(){return j}});var T=function(f){var l=Math.abs(function(v){var k=0;if(v.length===0)return k;for(var g=0;g<v.length;g++)k=(k<<5)-k+v.charCodeAt(g);return k}(f));return"hsl(".concat(l%37*10,", ").concat(100,"%, ").concat(83,"%)")},j=function(f){var l,v=f==null||(l=f.trim())===null||l===void 0?void 0:l.codePointAt(0);return(v?String.fromCodePoint(v):"?").toUpperCase()}},4694:function(fe,Q,t){t.d(Q,{OO:function(){return ce},Se:function(){return E},dd:function(){return r},mQ:function(){return h},uR:function(){return y},vQ:function(){return ne},vt:function(){return we},wx:function(){return be}});var T=t(7169),j=t(8950),f=t(2577),l=t(2975),v=t.n(l),k=t(901),g=t(9937),a=t(4183),P=t(5742),R=t(583),K=t(4682),U=t(9827),m=t(8227);function G(p,c){var w=typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(!w){if(Array.isArray(p)||(w=function(N,q){if(N){if(typeof N=="string")return he(N,q);var pe=Object.prototype.toString.call(N).slice(8,-1);if(pe==="Object"&&N.constructor&&(pe=N.constructor.name),pe==="Map"||pe==="Set")return Array.from(N);if(pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pe))return he(N,q)}}(p))||c){w&&(p=w);var O=0,$=function(){};return{s:$,n:function(){return O>=p.length?{done:!0}:{done:!1,value:p[O++]}},e:function(N){throw N},f:$}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
53
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var I,C=!0,_=!1;return{s:function(){w=w.call(p)},n:function(){var N=w.next();return C=N.done,N},e:function(N){_=!0,I=N},f:function(){try{C||w.return==null||w.return()}finally{if(_)throw I}}}}function he(p,c){(c==null||c>p.length)&&(c=p.length);for(var w=0,O=new Array(c);w<c;w++)O[w]=p[w];return O}var be="clipboard"in navigator&&"writeText"in navigator.clipboard,we="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,xe=function(p){return!(![g.r8.excalidraw,g.r8.excalidrawClipboard,g.r8.excalidrawClipboardWithAPI].includes(p==null?void 0:p.type)||!Array.isArray(p.elements))},ce=function(p){var c=p.types,w=p.files;c||w||console.warn("createPasteEvent: no types or files provided");var O=new ClipboardEvent("paste",{clipboardData:new DataTransfer});if(c)for(var $=0,I=Object.entries(c);$<I.length;$++){var C=(0,f.Z)(I[$],2),_=C[0],N=C[1];try{var q,pe;if((q=O.clipboardData)===null||q===void 0||q.setData(_,N),((pe=O.clipboardData)===null||pe===void 0?void 0:pe.getData(_))!==N)throw new Error('Failed to set "'.concat(_,'" as clipboardData item'))}catch(Le){throw new Error(Le.message)}}if(w){var te,ve=-1,ae=G(w);try{for(ae.s();!(te=ae.n()).done;){var H=te.value;ve++;try{var le,ke;if((le=O.clipboardData)===null||le===void 0||le.items.add(H),((ke=O.clipboardData)===null||ke===void 0?void 0:ke.files[ve])!==H)throw new Error('Failed to set file "'.concat(H.name,'" as clipboardData item'))}catch(Le){throw new Error(Le.message)}}}catch(Le){ae.e(Le)}finally{ae.f()}}return O},D=function(p){var c=p.elements,w=p.files,O=new Set(c.filter(function(_){return _.type==="frame"})),$=!1,I=c.reduce(function(_,N){return(0,a.wi)(N)&&($=!0,w&&w[N.fileId]&&(_[N.fileId]=w[N.fileId])),_},{});$&&!w&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object.");var C={type:g.r8.excalidrawClipboard,elements:c.map(function(_){if((0,K.$Z)(_)&&!O.has((0,K.$Z)(_))){var N=(0,P.OL)(_);return(0,R.DR)(N,{frameId:null}),N}return _}),files:w?I:void 0};return JSON.stringify(C)},ne=function(){var p=(0,j.Z)(v().mark(function c(w,O,$){return v().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.next=2,r(D({elements:w,files:O}),$);case 2:case"end":return I.stop()}},c)}));return function(c,w,O){return p.apply(this,arguments)}}(),S=function(p){var c=(0,k.dz)(p);return c.type===k.i$?{spreadsheet:c.spreadsheet}:null};function z(p){var c,w=[],O=G(p.childNodes);try{for(O.s();!(c=O.n()).done;){var $=c.value;if($.nodeType===3){var I,C=(I=$.textContent)===null||I===void 0?void 0:I.trim();C&&w.push({type:"text",value:C})}else if($ instanceof HTMLImageElement){var _=$.getAttribute("src");_&&_.startsWith("http")&&w.push({type:"imageUrl",value:_})}else w=w.concat(z($))}}catch(N){O.e(N)}finally{O.f()}return w}var A=function(p){var c,w=(c=p.clipboardData)===null||c===void 0?void 0:c.getData("text/html");if(!w)return null;try{var O=z(new DOMParser().parseFromString(w,"text/html").body);if(O.length)return{type:"mixedContent",value:O}}catch($){console.error("error in parseHTMLFromPaste: ".concat($.message))}return null},E=function(){var p=(0,j.Z)(v().mark(function c(){var w,O,$,I,C,_,N,q,pe,te,ve,ae;return v().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:if(w={},H.prev=1,(O=navigator.clipboard)===null||O===void 0||!O.readText){H.next=7;break}return H.next=5,($=navigator.clipboard)===null||$===void 0?void 0:$.readText();case 5:return H.t0=H.sent,H.abrupt("return",{"text/plain":H.t0});case 7:H.next=16;break;case 9:if(H.prev=9,H.t1=H.catch(1),(I=navigator.clipboard)===null||I===void 0||!I.read){H.next=15;break}console.warn("navigator.clipboard.readText() failed (".concat(H.t1.message,"). Failling back to navigator.clipboard.read()")),H.next=16;break;case 15:throw H.t1;case 16:return H.prev=16,H.next=19,(_=navigator.clipboard)===null||_===void 0?void 0:_.read();case 19:C=H.sent,H.next=28;break;case 22:if(H.prev=22,H.t2=H.catch(16),H.t2.name!=="DataError"){H.next=27;break}return console.warn("navigator.clipboard.read() error, clipboard is probably empty: ".concat(H.t2.message)),H.abrupt("return",w);case 27:throw H.t2;case 28:N=G(C),H.prev=29,N.s();case 31:if((q=N.n()).done){H.next=63;break}pe=q.value,te=G(pe.types),H.prev=34,te.s();case 36:if((ve=te.n()).done){H.next=53;break}if(ae=ve.value,(0,U.XF)(g.wL,ae)){H.next=40;break}return H.abrupt("continue",51);case 40:return H.prev=40,H.next=43,pe.getType(ae);case 43:return H.next=45,H.sent.text();case 45:w[ae]=H.sent,H.next=51;break;case 48:H.prev=48,H.t3=H.catch(40),console.warn("Cannot retrieve ".concat(ae," from clipboardItem: ").concat(H.t3.message));case 51:H.next=36;break;case 53:H.next=58;break;case 55:H.prev=55,H.t4=H.catch(34),te.e(H.t4);case 58:return H.prev=58,te.f(),H.finish(58);case 61:H.next=31;break;case 63:H.next=68;break;case 65:H.prev=65,H.t5=H.catch(29),N.e(H.t5);case 68:return H.prev=68,N.f(),H.finish(68);case 71:if(Object.keys(w).length!==0){H.next=74;break}return console.warn("No clipboard data found from clipboard.read()."),H.abrupt("return",w);case 74:return H.abrupt("return",w);case 75:case"end":return H.stop()}},c,null,[[1,9],[16,22],[29,65,68,71],[34,55,58,61],[40,48]])}));return function(){return p.apply(this,arguments)}}(),L=function(){var p=(0,j.Z)(v().mark(function c(w){var O,$,I,C,_,N=arguments;return v().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(O=N.length>1&&N[1]!==void 0&&N[1],q.prev=1,!(I=!O&&w&&A(w))){q.next=7;break}if(!I.value.every(function(pe){return pe.type==="text"})){q.next=6;break}return q.abrupt("return",{type:"text",value:((C=w.clipboardData)===null||C===void 0?void 0:C.getData("text/plain"))||I.value.map(function(pe){return pe.value}).join(`
|
|
54
|
+
`).trim()});case 6:return q.abrupt("return",I);case 7:return _=($=w.clipboardData)===null||$===void 0?void 0:$.getData("text/plain"),q.abrupt("return",{type:"text",value:(_||"").trim()});case 11:return q.prev=11,q.t0=q.catch(1),q.abrupt("return",{type:"text",value:""});case 14:case"end":return q.stop()}},c,null,[[1,11]])}));return function(c){return p.apply(this,arguments)}}(),h=function(){var p=(0,j.Z)(v().mark(function c(w){var O,$,I,C,_,N=arguments;return v().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return O=N.length>1&&N[1]!==void 0&&N[1],q.next=3,L(w,O);case 3:if(($=q.sent).type!=="mixedContent"){q.next=6;break}return q.abrupt("return",{mixedContent:$.value});case 6:if(q.prev=6,!(I=!O&&S($.value))){q.next=10;break}return q.abrupt("return",I);case 10:q.next=15;break;case 12:q.prev=12,q.t0=q.catch(6),console.error(q.t0);case 15:if(q.prev=15,C=JSON.parse($.value),_=C.type===g.r8.excalidrawClipboardWithAPI,!xe(C)){q.next=20;break}return q.abrupt("return",{elements:C.elements,files:C.files,text:O?JSON.stringify(C.elements,null,2):void 0,programmaticAPI:_});case 20:q.next=24;break;case 22:q.prev=22,q.t1=q.catch(15);case 24:return q.abrupt("return",{text:$.value});case 25:case"end":return q.stop()}},c,null,[[6,12],[15,22]])}));return function(c){return p.apply(this,arguments)}}(),y=function(){var p=(0,j.Z)(v().mark(function c(w){return v().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.prev=0,O.next=3,navigator.clipboard.write([new window.ClipboardItem((0,T.Z)({},g.LO.png,w))]);case 3:case 21:O.next=24;break;case 5:if(O.prev=5,O.t0=O.catch(0),!(0,U.y8)(w)){O.next=23;break}return O.t1=navigator.clipboard,O.t2=window.ClipboardItem,O.t3=T.Z,O.t4={},O.t5=g.LO.png,O.next=15,w;case 15:return O.t6=O.sent,O.t7=(0,O.t3)(O.t4,O.t5,O.t6),O.t8=new O.t2(O.t7),O.t9=[O.t8],O.next=21,O.t1.write.call(O.t1,O.t9);case 23:throw O.t0;case 24:case"end":return O.stop()}},c,null,[[0,5]])}));return function(c){return p.apply(this,arguments)}}(),r=function(){var p=(0,j.Z)(v().mark(function c(w,O){var $,I;return v().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(!be){C.next=10;break}return C.prev=1,C.next=4,navigator.clipboard.writeText(w||"");case 4:return C.abrupt("return");case 7:C.prev=7,C.t0=C.catch(1),console.error(C.t0);case 10:if(C.prev=10,!O){C.next=16;break}if(($=O.clipboardData)===null||$===void 0||$.setData("text/plain",w||""),((I=O.clipboardData)===null||I===void 0?void 0:I.getData("text/plain"))===w){C.next=15;break}throw new Error("Failed to setData on clipboardEvent");case 15:return C.abrupt("return");case 16:C.next=21;break;case 18:C.prev=18,C.t1=C.catch(10),console.error(C.t1);case 21:if(M(w)){C.next=23;break}throw new Error((0,m.t)("errors.copyToSystemClipboardFailed"));case 23:case"end":return C.stop()}},c,null,[[1,7],[10,18]])}));return function(c,w){return p.apply(this,arguments)}}(),M=function(p){p||(p=" ");var c=document.documentElement.getAttribute("dir")==="rtl",w=document.createElement("textarea");w.style.border="0",w.style.padding="0",w.style.margin="0",w.style.position="absolute",w.style[c?"right":"left"]="-9999px";var O=window.pageYOffset||document.documentElement.scrollTop;w.style.top="".concat(O,"px"),w.style.fontSize="12pt",w.setAttribute("readonly",""),w.value=p,document.body.appendChild(w);var $=!1;try{w.select(),w.setSelectionRange(0,w.value.length),$=document.execCommand("copy")}catch(I){console.error(I)}return w.remove(),$}},9240:function(fe,Q,t){t.d(Q,{C2:function(){return a},HO:function(){return m},Lx:function(){return k},SF:function(){return ce},Wk:function(){return xe},_T:function(){return R},ay:function(){return we},dC:function(){return g},eq:function(){return be},fY:function(){return he},sF:function(){return D},vq:function(){return ne},z8:function(){return P}});var T=t(7169),j=t(5284);function f(S,z){var A=Object.keys(S);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(S);z&&(E=E.filter(function(L){return Object.getOwnPropertyDescriptor(S,L).enumerable})),A.push.apply(A,E)}return A}function l(S){for(var z=1;z<arguments.length;z++){var A=arguments[z]!=null?arguments[z]:{};z%2?f(Object(A),!0).forEach(function(E){(0,T.Z)(S,E,A[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(A)):f(Object(A)).forEach(function(E){Object.defineProperty(S,E,Object.getOwnPropertyDescriptor(A,E))})}return S}var v,k=5,g=5,a=4,P=4,R=1,K=[0,2,4,6,8],U=function(S,z){return z.map(function(A){return j[S][A]})},m={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:U("gray",K),red:U("red",K),pink:U("pink",K),grape:U("grape",K),violet:U("violet",K),blue:U("blue",K),cyan:U("cyan",K),teal:U("teal",K),green:U("green",K),yellow:U("yellow",K),orange:U("orange",K),bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},G=(v=m,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"].reduce(function(S,z){return z in v&&(S[z]=v[z]),S},{})),he=[m.black,m.red[P],m.green[P],m.blue[P],m.yellow[P]],be=[m.transparent,m.red[R],m.green[R],m.blue[R],m.yellow[R]],we=[m.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],xe=l({transparent:m.transparent,white:m.white,gray:m.gray,black:m.black,bronze:m.bronze},G),ce=l({transparent:m.transparent,white:m.white,gray:m.gray,black:m.black,bronze:m.bronze},G),D=function(S){return[m.cyan[S],m.blue[S],m.violet[S],m.grape[S],m.pink[S],m.green[S],m.teal[S],m.yellow[S],m.orange[S],m.red[S]]},ne=function(S,z,A){return"#".concat(((1<<24)+(S<<16)+(z<<8)+A).toString(16).slice(1))}},8973:function(fe,Q,t){t.d(Q,{o:function(){return R},w:function(){return P}});var T=t(2577),j=t(3607),f=t(5463),l=t(8227),v=t(453),k=t(8242),g=t(6887),a=t(4512),P=(0,j.cn)(null),R=function(){var K=(0,j.KO)(P,v.yE),U=(0,T.Z)(K,2),m=U[0],G=U[1],he=(0,k.eh)();return m&&m==="clearCanvas"?(0,a.jsx)(g.Z,{onConfirm:function(){he.executeAction(f.mo),G(null)},onCancel:function(){return G(null)},title:(0,l.t)("clearCanvasDialog.title"),children:(0,a.jsxs)("p",{className:"clear-canvas__content",children:[" ",(0,l.t)("alerts.clearReset")]})}):null}},8242:function(fe,Q,t){var Rf,zf;t.d(Q,{ZP:function(){return b2},qD:function(){return Cf},hY:function(){return bm},Fy:function(){return Ku},eh:function(){return Pf},gF:function(){return xm},J0:function(){return If},bd:function(){return ym},n9:function(){return wm}});var T=t(6655),j=t(2577),f=t(1930),l=t(8950),v=t(8821),k=t(5169),g=t(3173),a=t(2248),P=t(7245),R=t(2312),K=t(7169),U=t(2975),m=t.n(U),G=t(9787),he=t.n(G),be=t(5156),we=t(9845),xe=t(45),ce=t(5605),D=t(5463),ne=t(8935),S=t(1512),z=t(8227),A=t(5491),E=t(583),L=t(9645),h=t(9827),y=t(9937),r=t(4512);function M(o,b){var Z=Object.keys(o);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(o);b&&(X=X.filter(function(ue){return Object.getOwnPropertyDescriptor(o,ue).enumerable})),Z.push.apply(Z,X)}return Z}function p(o){for(var b=1;b<arguments.length;b++){var Z=arguments[b]!=null?arguments[b]:{};b%2?M(Object(Z),!0).forEach(function(X){(0,K.Z)(o,X,Z[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(Z)):M(Object(Z)).forEach(function(X){Object.defineProperty(o,X,Object.getOwnPropertyDescriptor(Z,X))})}return o}var c=function(o,b,Z){var X=!1;if(!(b.multiElement||b.resizingElement||b.editingElement||b.draggingElement)){var ue=Z();if(ue===null)return{commitToHistory:X};var je=(0,h.xn)(o),Y=ue.elements,B=(0,h.xn)(Y),ye=o.filter(function(Te){return!B.has(Te.id)}),Re=Y.map(function(Te){return(0,E.BE)(je.get(Te.id)||Te,Te)}).concat(ye.map(function(Te){return(0,E.BE)(Te,{isDeleted:!0})}));return(0,L.$q)(Re,ye),{elements:Re,appState:p(p({},b),ue.appState),commitToHistory:X,syncHistory:!0}}return{commitToHistory:X}},w=t(3646),O=function(o,b,Z,X,ue,je){if(o.trackEvent)try{(0,T.Z)(o.trackEvent)==="object"&&(!o.trackEvent.predicate||o.trackEvent.predicate(Z,X,je))&&(0,w.L)(o.trackEvent.category,o.trackEvent.action||o.name,"".concat(b," (").concat(ue.device.editor.isMobile?"mobile":"desktop",")"))}catch(Y){console.error("error while logging action:",Y)}},$=function(){function o(b,Z,X,ue){var je=this;(0,v.Z)(this,o),this.actions={},this.renderAction=function(Y,B){var ye=je.app.props.UIOptions.canvasActions;if(je.actions[Y]&&"PanelComponent"in je.actions[Y]&&(!(Y in ye)||ye[Y])){var Re=je.actions[Y],Te=Re.PanelComponent;Te.displayName="PanelComponent";var $e=je.getElementsIncludingDeleted(),Qe=je.getAppState();return(0,r.jsx)(Te,{elements:je.getElementsIncludingDeleted(),appState:je.getAppState(),updateData:function(et){O(Re,"ui",Qe,$e,je.app,et),je.updater(Re.perform(je.getElementsIncludingDeleted(),je.getAppState(),et,je.app))},appProps:je.app.props,app:je.app,data:B})}return null},this.isActionEnabled=function(Y){var B=je.getElementsIncludingDeleted(),ye=je.getAppState();return!Y.predicate||Y.predicate(B,ye,je.app.props,je.app)},this.updater=function(Y){if(!Y||!("then"in Y))return b(Y);Y.then(function(B){return b(B)})},this.getAppState=Z,this.getElementsIncludingDeleted=X,this.app=ue}return(0,k.Z)(o,[{key:"registerAction",value:function(b){this.actions[b.name]=b}},{key:"registerAll",value:function(b){var Z=this;b.forEach(function(X){return Z.registerAction(X)})}},{key:"handleKeyDown",value:function(b){var Z=this,X=this.app.props.UIOptions.canvasActions,ue=Object.values(this.actions).sort(function(ye,Re){return(Re.keyPriority||0)-(ye.keyPriority||0)}).filter(function(ye){return(!(ye.name in X)||X[ye.name])&&ye.keyTest&&ye.keyTest(b,Z.getAppState(),Z.getElementsIncludingDeleted(),Z.app)});if(ue.length!==1)return ue.length>1&&console.warn("Canceling as multiple actions match this shortcut",ue),!1;var je=ue[0];if(this.getAppState().viewModeEnabled&&je.viewMode!==!0)return!1;var Y=this.getElementsIncludingDeleted(),B=this.getAppState();return O(je,"keyboard",B,Y,this.app,null),b.preventDefault(),b.stopPropagation(),this.updater(ue[0].perform(Y,B,null,this.app)),!0}},{key:"executeAction",value:function(b){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"api",X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,ue=this.getElementsIncludingDeleted(),je=this.getAppState();O(b,Z,je,ue,this.app,X),this.updater(b.perform(ue,je,X,this.app))}}]),o}(),I=t(2767),C=t(6853),_=t(4694),N=t(2435),q=t(9326),pe=t(7994),te=t(7651),ve=t(7422),ae=t(5742),H=t(4183),le=function(o){var b=Array.from(o.values());return{x:Le(b,function(Z){return Z.x})/b.length,y:Le(b,function(Z){return Z.y})/b.length}},ke=function(o){var b=(0,j.Z)(o,2),Z=b[0],X=b[1];return Math.hypot(Z.x-X.x,Z.y-X.y)},Le=function(o,b){return o.reduce(function(Z,X){return Z+b(X)},0)},Ge=t(9215);function Ne(o,b){var Z=Object.keys(o);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(o);b&&(X=X.filter(function(ue){return Object.getOwnPropertyDescriptor(o,ue).enumerable})),Z.push.apply(Z,X)}return Z}function Ce(o){for(var b=1;b<arguments.length;b++){var Z=arguments[b]!=null?arguments[b]:{};b%2?Ne(Object(Z),!0).forEach(function(X){(0,K.Z)(o,X,Z[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(Z)):Ne(Object(Z)).forEach(function(X){Object.defineProperty(o,X,Object.getOwnPropertyDescriptor(Z,X))})}return o}var Oe=function(o){return{selectedElementIds:o.selectedElementIds,selectedGroupIds:o.selectedGroupIds,viewBackgroundColor:o.viewBackgroundColor,editingLinearElement:o.editingLinearElement,editingGroupId:o.editingGroupId,name:o.name}},De=function(){function o(){var b=this;(0,v.Z)(this,o),this.elementCache=new Map,this.recording=!0,this.stateHistory=[],this.redoStack=[],this.lastEntry=null,this.generateEntry=function(Z,X){return b.dehydrateHistoryEntry({appState:Oe(Z),elements:X.reduce(function(ue,je){if((0,H.bt)(je)&&Z.multiElement&&Z.multiElement.id===je.id){if(Z.multiElement&&Z.multiElement.id===je.id&&je.points.length<2)return ue;ue.push(Ce(Ce({},je),{},{points:je.lastCommittedPoint!==je.points[je.points.length-1]?je.points.slice(0,-1):je.points}))}else ue.push(je);return ue},[])})}}return(0,k.Z)(o,[{key:"hydrateHistoryEntry",value:function(b){var Z=this,X=b.appState,ue=b.elements;return{appState:JSON.parse(X),elements:ue.map(function(je){var Y,B=(Y=Z.elementCache.get(je.id))===null||Y===void 0?void 0:Y.get(je.versionNonce);if(!B)throw new Error("Element not found: ".concat(je.id,":").concat(je.versionNonce));return B})}}},{key:"dehydrateHistoryEntry",value:function(b){var Z=this,X=b.appState,ue=b.elements;return{appState:JSON.stringify(X),elements:ue.map(function(je){Z.elementCache.has(je.id)||Z.elementCache.set(je.id,new Map);var Y=Z.elementCache.get(je.id);return Y.has(je.versionNonce)||Y.set(je.versionNonce,(0,ae.OL)(je)),{id:je.id,versionNonce:je.versionNonce}})}}},{key:"getSnapshotForTest",value:function(){var b=this;return{recording:this.recording,stateHistory:this.stateHistory.map(function(Z){return b.hydrateHistoryEntry(Z)}),redoStack:this.redoStack.map(function(Z){return b.hydrateHistoryEntry(Z)})}}},{key:"clear",value:function(){this.stateHistory.length=0,this.redoStack.length=0,this.lastEntry=null,this.elementCache.clear()}},{key:"shouldCreateEntry",value:function(b){var Z,X=this.lastEntry;if(!X||b.elements.length!==X.elements.length)return!0;for(var ue=b.elements.length-1;ue>-1;ue--){var je=b.elements[ue],Y=X.elements[ue];if(!je||!Y||je.id!==Y.id||je.versionNonce!==Y.versionNonce)return!0}for(Z in b.appState){var B,ye;if(!(Z==="editingLinearElement"&&((B=b.appState[Z])===null||B===void 0?void 0:B.elementId)===((ye=X.appState[Z])===null||ye===void 0?void 0:ye.elementId))&&Z!=="selectedElementIds"&&Z!=="selectedGroupIds"&&b.appState[Z]!==X.appState[Z])return!0}return!1}},{key:"pushEntry",value:function(b,Z){var X=this.generateEntry(b,Z),ue=this.hydrateHistoryEntry(X);if(ue){if(!this.shouldCreateEntry(ue))return;this.stateHistory.push(X),this.lastEntry=ue,this.clearRedoStack()}}},{key:"clearRedoStack",value:function(){this.redoStack.splice(0,this.redoStack.length)}},{key:"redoOnce",value:function(){if(this.redoStack.length===0)return null;var b=this.redoStack.pop();return b!==void 0?(this.stateHistory.push(b),this.hydrateHistoryEntry(b)):null}},{key:"undoOnce",value:function(){if(this.stateHistory.length===1)return null;var b=this.stateHistory.pop(),Z=this.stateHistory[this.stateHistory.length-1];return b!==void 0?(this.redoStack.push(b),this.hydrateHistoryEntry(Z)):null}},{key:"setCurrentState",value:function(b,Z){this.lastEntry=this.hydrateHistoryEntry(this.generateEntry(b,Z))}},{key:"resumeRecording",value:function(){this.recording=!0}},{key:"record",value:function(b,Z){this.recording&&(this.pushEntry(b,Z),this.recording=!1)}}]),o}(),Ae=t(7935),ie=t(2361),Ie=t(4105),oe=t(457),s=t(4116),u=[{icon:ne.zu,value:"selection",key:A.tW.V,numericKey:A.tW[1],fillable:!0},{icon:ne.OW,value:"rectangle",key:A.tW.R,numericKey:A.tW[2],fillable:!0},{icon:ne.nb,value:"diamond",key:A.tW.D,numericKey:A.tW[3],fillable:!0},{icon:ne.Re,value:"ellipse",key:A.tW.O,numericKey:A.tW[4],fillable:!0},{icon:ne.e0,value:"arrow",key:A.tW.A,numericKey:A.tW[5],fillable:!0},{icon:ne.zb,value:"line",key:A.tW.L,numericKey:A.tW[6],fillable:!0},{icon:ne.Pm,value:"freedraw",key:[A.tW.P,A.tW.X],numericKey:A.tW[7],fillable:!1},{icon:ne.VL,value:"text",key:A.tW.T,numericKey:A.tW[8],fillable:!1},{icon:ne.XB,value:"image",key:null,numericKey:A.tW[9],fillable:!1},{icon:ne.$q,value:"eraser",key:A.tW.E,numericKey:A.tW[0],fillable:!1}],x=t(761),V=t(3204),W=t(3379),re=t.n(W),ee=t(7795),se=t.n(ee),Ee=t(569),_e=t.n(Ee),Ue=t(3565),We=t.n(Ue),Ye=t(9216),Ze=t.n(Ye),Je=t(4589),nt=t.n(Je),dt=t(6578),ge={};ge.styleTagTransform=nt(),ge.setAttributes=We(),ge.insert=_e().bind(null,"head"),ge.domAPI=se(),ge.insertStyleElement=Ze(),re()(dt.Z,ge),dt.Z&&dt.Z.locals&&dt.Z.locals;var Se=t(2529),Be="separator",Xe=he().memo(function(o){var b=o.actionManager,Z=o.items,X=o.top,ue=o.left,je=o.onClose,Y=xm(),B=ym(),ye=Z.reduce(function(Re,Te){return!Te||Te!==Be&&Te.predicate&&!Te.predicate(B,Y,b.app.props,b.app)||Re.push(Te),Re},[]);return(0,r.jsx)(V.J,{onCloseRequest:function(){je()},top:X,left:ue,fitInViewport:!0,offsetLeft:Y.offsetLeft,offsetTop:Y.offsetTop,viewportWidth:Y.width,viewportHeight:Y.height,children:(0,r.jsx)("ul",{className:"context-menu",onContextMenu:function(Re){return Re.preventDefault()},children:ye.map(function(Re,Te){var $e;if(Re===Be)return ye[Te-1]&&ye[Te-1]!==Be?(0,r.jsx)("hr",{className:"context-menu-item-separator"},Te):null;var Qe=Re.name,et="";return Re.contextItemLabel&&(et=typeof Re.contextItemLabel=="function"?(0,z.t)(Re.contextItemLabel(B,Y,b.app)):(0,z.t)(Re.contextItemLabel)),(0,r.jsx)("li",{"data-testid":Qe,onClick:function(){je(function(){b.executeAction(Re,"contextMenu")})},children:(0,r.jsxs)("button",{className:(0,xe.Z)("context-menu-item",{dangerous:Qe==="deleteSelectedElements",checkmark:($e=Re.checked)===null||$e===void 0?void 0:$e.call(Re,Y)}),children:[(0,r.jsx)("div",{className:"context-menu-item__label",children:et}),(0,r.jsx)("kbd",{className:"context-menu-item__shortcut",children:Qe?(0,Se.C)(Qe):""})]})},Te)})})})}),lt=t(2726),it=t(2540),yt=t(1648),_t=t(8925),ut=t(4761),Tt=t(6086),Yt={};Yt.styleTagTransform=nt(),Yt.setAttributes=We(),Yt.insert=_e().bind(null,"head"),Yt.domAPI=se(),Yt.insertStyleElement=Ze(),re()(Tt.Z,Yt),Tt.Z&&Tt.Z.locals&&Tt.Z.locals;var Zt=t(7104);function Pt(o,b){var Z=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!Z){if(Array.isArray(o)||(Z=function(ye,Re){if(ye){if(typeof ye=="string")return en(ye,Re);var Te=Object.prototype.toString.call(ye).slice(8,-1);if(Te==="Object"&&ye.constructor&&(Te=ye.constructor.name),Te==="Map"||Te==="Set")return Array.from(ye);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return en(ye,Re)}}(o))||b){Z&&(o=Z);var X=0,ue=function(){};return{s:ue,n:function(){return X>=o.length?{done:!0}:{done:!1,value:o[X++]}},e:function(ye){throw ye},f:ue}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
55
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je,Y=!0,B=!1;return{s:function(){Z=Z.call(o)},n:function(){var ye=Z.next();return Y=ye.done,ye},e:function(ye){B=!0,je=ye},f:function(){try{Y||Z.return==null||Z.return()}finally{if(B)throw je}}}}function en(o,b){(b==null||b>o.length)&&(b=o.length);for(var Z=0,X=new Array(b);Z<b;Z++)X[Z]=o[Z];return X}var tn=function(o){var b,Z=o.appState,X=o.elements,ue=o.renderAction,je=(0,Ie.Zs)((0,te.Lm)(X),Z),Y=!1;je.length===2&&((0,H.Xo)(je[0])||(0,H.Xo)(je[1]))&&(Y=!0);var B,ye=!!Z.editingElement,Re=Ku(),Te=document.documentElement.getAttribute("dir")==="rtl",$e=(0,Ie.$b)(Z.activeTool.type)&&!(0,h.Qm)(Z.currentItemBackgroundColor)||je.some(function(vt){return(0,Ie.$b)(vt.type)&&!(0,h.Qm)(vt.backgroundColor)}),Qe=(0,Ie.$b)(Z.activeTool.type)||je.some(function(vt){return(0,Ie.$b)(vt.type)}),et=je.length===1||Y,ft=((b=je[0])===null||b===void 0?void 0:b.type)||null,gt=Pt(je);try{for(gt.s();!(B=gt.n()).done;)if(B.value.type!==ft){ft=null;break}}catch(vt){gt.e(vt)}finally{gt.f()}return(0,r.jsxs)("div",{className:"panelColumn",children:[(0,r.jsx)("div",{children:((0,yt.PD)(Z.activeTool.type)&&Z.activeTool.type!=="image"&&ft!=="image"&&ft!=="frame"||je.some(function(vt){return(0,yt.PD)(vt.type)}))&&ue("changeStrokeColor")}),Qe&&(0,r.jsx)("div",{children:ue("changeBackgroundColor")}),$e&&ue("changeFillStyle"),((0,Ie.Zd)(Z.activeTool.type)||je.some(function(vt){return(0,Ie.Zd)(vt.type)}))&&ue("changeStrokeWidth"),(Z.activeTool.type==="freedraw"||je.some(function(vt){return vt.type==="freedraw"}))&&ue("changeStrokeShape"),((0,Ie.M9)(Z.activeTool.type)||je.some(function(vt){return(0,Ie.M9)(vt.type)}))&&(0,r.jsxs)(r.Fragment,{children:[ue("changeStrokeStyle"),ue("changeSloppiness")]}),((0,Ie.sh)(Z.activeTool.type)||je.some(function(vt){return(0,Ie.sh)(vt.type)}))&&(0,r.jsx)(r.Fragment,{children:ue("changeRoundness")}),(Z.activeTool.type==="text"||je.some(H.iB))&&(0,r.jsxs)(r.Fragment,{children:[ue("changeFontSize"),ue("changeFontFamily"),(Z.activeTool.type==="text"||(0,ut.aV)(je))&&ue("changeTextAlign")]}),(0,ut.cn)(je)&&ue("changeVerticalAlign"),((0,Ie.Un)(Z.activeTool.type)||je.some(function(vt){return(0,Ie.Un)(vt.type)}))&&(0,r.jsx)(r.Fragment,{children:ue("changeArrowhead")}),ue("changeOpacity"),(0,r.jsxs)("fieldset",{children:[(0,r.jsx)("legend",{children:(0,z.t)("labels.layers")}),(0,r.jsxs)("div",{className:"buttonList",children:[ue("sendToBack"),ue("sendBackward"),ue("bringToFront"),ue("bringForward")]})]}),je.length>1&&!Y&&(0,r.jsxs)("fieldset",{children:[(0,r.jsx)("legend",{children:(0,z.t)("labels.align")}),(0,r.jsxs)("div",{className:"buttonList",children:[Te?(0,r.jsxs)(r.Fragment,{children:[ue("alignRight"),ue("alignHorizontallyCentered"),ue("alignLeft")]}):(0,r.jsxs)(r.Fragment,{children:[ue("alignLeft"),ue("alignHorizontallyCentered"),ue("alignRight")]}),je.length>2&&ue("distributeHorizontally"),(0,r.jsx)("div",{style:{flexBasis:"100%",height:0}}),(0,r.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:".5rem",marginTop:"-0.5rem"},children:[ue("alignTop"),ue("alignVerticallyCentered"),ue("alignBottom"),je.length>2&&ue("distributeVertically")]})]})]}),!ye&&je.length>0&&(0,r.jsxs)("fieldset",{children:[(0,r.jsx)("legend",{children:(0,z.t)("labels.actions")}),(0,r.jsxs)("div",{className:"buttonList",children:[!Re.editor.isMobile&&ue("duplicateSelection"),!Re.editor.isMobile&&ue("deleteSelectedElements"),ue("group"),ue("ungroup"),et&&ue("hyperlink")]})]})]})},ot=function(o){var b=o.activeTool,Z=o.appState,X=o.app,ue=o.UIOptions,je=(0,G.useState)(!1),Y=(0,j.Z)(je,2),B=Y[0],ye=Y[1],Re=b.type==="frame",Te=b.type==="laser",$e=b.type==="embeddable";return(0,r.jsxs)(r.Fragment,{children:[u.map(function(Qe,et){var ft,gt=Qe.value,vt=Qe.icon,on=Qe.key,Rt=Qe.numericKey,bt=Qe.fillable;if(((ft=ue.tools)===null||ft===void 0?void 0:ft[gt])===!1)return null;var Mt=(0,z.t)("toolBar.".concat(gt)),Ht=on&&(0,h.Oo)(typeof on=="string"?on:on[0]),an=Ht?"".concat(Ht," ").concat((0,z.t)("helpDialog.or")," ").concat(Rt):"".concat(Rt);return(0,r.jsx)(S.V,{className:(0,xe.Z)("Shape",{fillable:bt}),type:"radio",icon:vt,checked:b.type===gt,name:"editor-current-shape",title:"".concat((0,h.Oo)(Mt)," — ").concat(an),keyBindingLabel:Rt||Ht,"aria-label":(0,h.Oo)(Mt),"aria-keyshortcuts":an,"data-testid":"toolbar-".concat(gt),onPointerDown:function(ln){var Bt=ln.pointerType;Z.penDetected||Bt!=="pen"||X.togglePenMode(!0)},onChange:function(ln){var Bt=ln.pointerType;Z.activeTool.type!==gt&&(0,w.L)("toolbar",gt,"ui"),gt==="image"?X.setActiveTool({type:gt,insertOnCanvasDirectly:Bt!=="mouse"}):X.setActiveTool({type:gt})}},gt)}),(0,r.jsx)("div",{className:"App-toolbar__divider"}),(0,r.jsxs)(Zt.Z,{open:B,children:[(0,r.jsx)(Zt.Z.Trigger,{className:(0,xe.Z)("App-toolbar__extra-tools-trigger",{"App-toolbar__extra-tools-trigger--selected":Re||$e||Te&&!X.props.isCollaborating}),onToggle:function(){return ye(!B)},title:(0,z.t)("toolBar.extraTools"),children:ne.dg}),(0,r.jsxs)(Zt.Z.Content,{onClickOutside:function(){return ye(!1)},onSelect:function(){return ye(!1)},className:"App-toolbar__extra-tools-dropdown",children:[(0,r.jsx)(Zt.Z.Item,{onSelect:function(){return X.setActiveTool({type:"frame"})},icon:ne.zl,shortcut:A.tW.F.toLocaleUpperCase(),"data-testid":"toolbar-frame",selected:Re,children:(0,z.t)("toolBar.frame")}),(0,r.jsx)(Zt.Z.Item,{onSelect:function(){return X.setActiveTool({type:"embeddable"})},icon:ne.FL,"data-testid":"toolbar-embeddable",selected:$e,children:(0,z.t)("toolBar.embeddable")}),(0,r.jsx)(Zt.Z.Item,{onSelect:function(){return X.setActiveTool({type:"laser"})},icon:ne.d,"data-testid":"toolbar-laser",selected:Te,shortcut:A.tW.K.toLocaleUpperCase(),children:(0,z.t)("toolBar.laser")}),(0,r.jsx)(Zt.Z.Item,{onSelect:function(){return X.setOpenDialog("mermaid")},icon:ne.II,"data-testid":"toolbar-embeddable",children:(0,z.t)("toolBar.mermaidToExcalidraw")})]})]})]})},It=function(o){var b=o.renderAction;return o.zoom,(0,r.jsx)(it.Z.Col,{gap:1,className:"zoom-actions",children:(0,r.jsxs)(it.Z.Row,{align:"center",children:[b("zoomOut"),b("resetZoom"),b("zoomIn")]})})},mt=function(o){var b=o.renderAction,Z=o.className;return(0,r.jsxs)("div",{className:"undo-redo-buttons ".concat(Z),children:[(0,r.jsx)("div",{className:"undo-button-container",children:(0,r.jsx)(_t.u,{label:(0,z.t)("buttons.undo"),children:b("undo")})}),(0,r.jsx)("div",{className:"redo-button-container",children:(0,r.jsxs)(_t.u,{label:(0,z.t)("buttons.redo"),children:[" ",b("redo")]})})]})},jt=function(o){var b=o.actionManager,Z=o.showExitZenModeBtn;return(0,r.jsx)("button",{className:(0,xe.Z)("disable-zen-mode",{"disable-zen-mode--visible":Z}),onClick:function(){return b.executeAction(D.JN)},children:(0,z.t)("buttons.exitZenMode")})},xt=function(o){var b=o.renderAction,Z=o.className;return(0,r.jsx)("div",{className:"finalize-button ".concat(Z),children:b("finalize",{size:"small"})})},Nt=t(1300),Ut=function(o){var b=o.children,Z=o.onClose,X=(0,G.useState)(!!b),ue=(0,j.Z)(X,2),je=ue[0],Y=ue[1],B=If().container,ye=he().useCallback(function(){Y(!1),Z&&Z(),B==null||B.focus()},[Z,B]);return(0,r.jsx)(r.Fragment,{children:je&&(0,r.jsx)(Nt.V,{size:"small",onCloseRequest:ye,title:(0,z.t)("errorDialog.title"),children:(0,r.jsx)("div",{style:{whiteSpace:"pre-wrap"},children:b})})})},rn=t(4406),Ft=t(5796),Sn=t(6548),mn=t(507),Yn=t(6217),ht={};ht.styleTagTransform=nt(),ht.setAttributes=We(),ht.insert=_e().bind(null,"head"),ht.domAPI=se(),ht.insertStyleElement=Ze(),re()(Yn.Z,ht),Yn.Z&&Yn.Z.locals&&Yn.Z.locals;var Xt=function(o){var b=o.onChange,Z=o.value,X=o.choices,ue=o.name;return(0,r.jsx)("div",{className:"RadioGroup",children:X.map(function(je){return(0,r.jsxs)("div",{className:(0,xe.Z)("RadioGroup__choice",{active:je.value===Z}),children:[(0,r.jsx)("input",{name:ue,type:"radio",checked:je.value===Z,onChange:function(){return b(je.value)}}),je.label]},je.label)})})},zt=t(7802),Vt={};Vt.styleTagTransform=nt(),Vt.setAttributes=We(),Vt.insert=_e().bind(null,"head"),Vt.domAPI=se(),Vt.insertStyleElement=Ze(),re()(zt.Z,Vt),zt.Z&&zt.Z.locals&&zt.Z.locals;var Tn=function(o){var b=o.title,Z=o.name,X=o.checked,ue=o.onChange,je=o.disabled,Y=je!==void 0&&je;return(0,r.jsx)("div",{className:(0,xe.Z)("Switch",{toggled:X,disabled:Y}),children:(0,r.jsx)("input",{name:Z,id:Z,title:b,type:"checkbox",checked:X,disabled:Y,onChange:function(){return ue(!X)},onKeyDown:function(B){B.key===" "&&ue(!X)}})})},Dn=t(9706),Nn={};Nn.styleTagTransform=nt(),Nn.setAttributes=We(),Nn.insert=_e().bind(null,"head"),Nn.domAPI=se(),Nn.insertStyleElement=Ze(),re()(Dn.Z,Nn),Dn.Z&&Dn.Z.locals&&Dn.Z.locals;var Xn=t(8960),jn={};jn.styleTagTransform=nt(),jn.setAttributes=We(),jn.insert=_e().bind(null,"head"),jn.domAPI=se(),jn.insertStyleElement=Ze(),re()(Xn.Z,jn),Xn.Z&&Xn.Z.locals&&Xn.Z.locals;var wt=(0,G.forwardRef)(function(o,b){var Z=o.children,X=o.startIcon,ue=o.onClick,je=o.label,Y=o.variant,B=Y===void 0?"filled":Y,ye=o.color,Re=ye===void 0?"primary":ye,Te=o.size,$e=Te===void 0?"medium":Te,Qe=o.fullWidth,et=o.className;return(0,r.jsxs)("button",{className:(0,xe.Z)("ExcButton","ExcButton--color-".concat(Re),"ExcButton--variant-".concat(B),"ExcButton--size-".concat($e),{"ExcButton--fullWidth":Qe},et),onClick:ue,type:"button","aria-label":je,ref:b,children:[X&&(0,r.jsx)("div",{className:"ExcButton__icon","aria-hidden":!0,children:X}),B!=="icon"&&(Z??je)]})});function Et(o,b){var Z=Object.keys(o);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(o);b&&(X=X.filter(function(ue){return Object.getOwnPropertyDescriptor(o,ue).enumerable})),Z.push.apply(Z,X)}return Z}function Ct(o){for(var b=1;b<arguments.length;b++){var Z=arguments[b]!=null?arguments[b]:{};b%2?Et(Object(Z),!0).forEach(function(X){(0,K.Z)(o,X,Z[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(Z)):Et(Object(Z)).forEach(function(X){Object.defineProperty(o,X,Object.getOwnPropertyDescriptor(Z,X))})}return o}var Lt="filter"in document.createElement("canvas").getContext("2d"),hn=function(){return(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{children:(0,z.t)("canvasError.cannotShowPreview")}),(0,r.jsx)("p",{children:(0,r.jsx)("span",{children:(0,z.t)("canvasError.canvasTooBig")})}),(0,r.jsxs)("em",{children:["(",(0,z.t)("canvasError.canvasTooBigTip"),")"]})]})},yn=function(o){var b=o.appStateSnapshot,Z=o.elementsSnapshot,X=o.files,ue=o.actionManager,je=o.onExportImage,Y=(0,Ie.N)(Z,b),B=bm(),ye=(0,G.useState)(b.name),Re=(0,j.Z)(ye,2),Te=Re[0],$e=Re[1],Qe=(0,G.useState)(Y),et=(0,j.Z)(Qe,2),ft=et[0],gt=et[1],vt=(0,G.useState)(b.exportBackground),on=(0,j.Z)(vt,2),Rt=on[0],bt=on[1],Mt=(0,G.useState)(b.exportWithDarkMode),Ht=(0,j.Z)(Mt,2),an=Ht[0],ln=Ht[1],Bt=(0,G.useState)(b.exportEmbedScene),Jt=(0,j.Z)(Bt,2),Mn=Jt[0],Un=Jt[1],Qn=(0,G.useState)(b.exportScale),ir=(0,j.Z)(Qn,2),mr=ir[0],pr=ir[1],Kn=(0,G.useRef)(null),yr=(0,G.useState)(null),tr=(0,j.Z)(yr,2),hr=tr[0],Mr=tr[1],Lr=(0,N.HD)(Z,b,ft),Cr=Lr.exportedElements,Qr=Lr.exportingFrame;return(0,G.useEffect)(function(){var cr=Kn.current;if(cr){var kr=cr.offsetWidth,vo=cr.offsetHeight;kr&&(0,mn.NL)({elements:Cr,appState:Ct(Ct({},b),{},{name:Te,exportBackground:Rt,exportWithDarkMode:an,exportScale:mr,exportEmbedScene:Mn}),files:X,exportPadding:y.qy,maxWidthOrHeight:Math.max(kr,vo),exportingFrame:Qr}).then(function(Gr){return Mr(null),(0,Ft._c)(Gr).then(function(){cr.replaceChildren(Gr)})}).catch(function(Gr){console.error(Gr),Mr(Gr)})}},[b,X,Cr,Qr,Te,Rt,an,mr,Mn]),(0,r.jsxs)("div",{className:"ImageExportModal",children:[(0,r.jsx)("h3",{children:(0,z.t)("imageExportDialog.header")}),(0,r.jsxs)("div",{className:"ImageExportModal__preview",children:[(0,r.jsx)("div",{className:"ImageExportModal__preview__canvas",ref:Kn,children:hr&&(0,r.jsx)(hn,{})}),(0,r.jsx)("div",{className:"ImageExportModal__preview__filename",children:!Sn.kr&&(0,r.jsx)("input",{type:"text",className:"TextInput",value:Te,style:{width:"30ch"},disabled:B.name!==void 0||b.viewModeEnabled,onChange:function(cr){$e(cr.target.value),ue.executeAction(rn.zX,"ui",cr.target.value)}})})]}),(0,r.jsxs)("div",{className:"ImageExportModal__settings",children:[(0,r.jsx)("h3",{children:(0,z.t)("imageExportDialog.header")}),Y&&(0,r.jsx)(fn,{label:(0,z.t)("imageExportDialog.label.onlySelected"),name:"exportOnlySelected",children:(0,r.jsx)(Tn,{name:"exportOnlySelected",checked:ft,onChange:function(cr){gt(cr)}})}),(0,r.jsx)(fn,{label:(0,z.t)("imageExportDialog.label.withBackground"),name:"exportBackgroundSwitch",children:(0,r.jsx)(Tn,{name:"exportBackgroundSwitch",checked:Rt,onChange:function(cr){bt(cr),ue.executeAction(rn.XA,"ui",cr)}})}),Lt&&(0,r.jsx)(fn,{label:(0,z.t)("imageExportDialog.label.darkMode"),name:"exportDarkModeSwitch",children:(0,r.jsx)(Tn,{name:"exportDarkModeSwitch",checked:an,onChange:function(cr){ln(cr),ue.executeAction(rn.bJ,"ui",cr)}})}),(0,r.jsx)(fn,{label:(0,z.t)("imageExportDialog.label.embedScene"),tooltip:(0,z.t)("imageExportDialog.tooltip.embedScene"),name:"exportEmbedSwitch",children:(0,r.jsx)(Tn,{name:"exportEmbedSwitch",checked:Mn,onChange:function(cr){Un(cr),ue.executeAction(rn.Du,"ui",cr)}})}),(0,r.jsx)(fn,{label:(0,z.t)("imageExportDialog.label.scale"),name:"exportScale",children:(0,r.jsx)(Xt,{name:"exportScale",value:mr,onChange:function(cr){pr(cr),ue.executeAction(rn.sK,"ui",cr)},choices:y.ZB.map(function(cr){return{value:cr,label:"".concat(cr,"×")}})})}),(0,r.jsxs)("div",{className:"ImageExportModal__settings__buttons",children:[(0,r.jsx)(wt,{className:"ImageExportModal__settings__buttons__button",label:(0,z.t)("imageExportDialog.title.exportToPng"),onClick:function(){return je(y.I_.png,Cr,{exportingFrame:Qr})},startIcon:ne.aL,children:(0,z.t)("imageExportDialog.button.exportToPng")}),(0,r.jsx)(wt,{className:"ImageExportModal__settings__buttons__button",label:(0,z.t)("imageExportDialog.title.exportToSvg"),onClick:function(){return je(y.I_.svg,Cr,{exportingFrame:Qr})},startIcon:ne.aL,children:(0,z.t)("imageExportDialog.button.exportToSvg")}),(_.vt||y.vU)&&(0,r.jsx)(wt,{className:"ImageExportModal__settings__buttons__button",label:(0,z.t)("imageExportDialog.title.copyPngToClipboard"),onClick:function(){return je(y.I_.clipboard,Cr,{exportingFrame:Qr})},startIcon:ne.UI,children:(0,z.t)("imageExportDialog.button.copyPngToClipboard")})]})]})]})},fn=function(o){var b=o.label,Z=o.children,X=o.tooltip,ue=o.name;return(0,r.jsxs)("div",{className:"ImageExportModal__settings__setting",title:b,children:[(0,r.jsxs)("label",{htmlFor:ue,className:"ImageExportModal__settings__setting__label",children:[b,X&&(0,r.jsx)(_t.u,{label:X,long:!0,children:ne.mv})]}),(0,r.jsx)("div",{className:"ImageExportModal__settings__setting__content",children:Z})]})},Bn=function(o){var b=o.elements,Z=o.appState,X=o.files,ue=o.actionManager,je=o.onExportImage,Y=o.onCloseRequest,B=(0,G.useState)(function(){return{appStateSnapshot:(0,h.xU)(Z),elementsSnapshot:(0,h.xU)(b)}}),ye=(0,j.Z)(B,1)[0],Re=ye.appStateSnapshot,Te=ye.elementsSnapshot;return(0,r.jsx)(Nt.V,{onCloseRequest:Y,size:"wide",title:!1,children:(0,r.jsx)(yn,{elementsSnapshot:Te,appStateSnapshot:Re,files:X,actionManager:ue,onExportImage:je})})},En=t(3195),Cn={};Cn.styleTagTransform=nt(),Cn.setAttributes=We(),Cn.insert=_e().bind(null,"head"),Cn.domAPI=se(),Cn.insertStyleElement=Ze(),re()(En.Z,Cn),En.Z&&En.Z.locals&&En.Z.locals;var qn=function(o){var b=o.children,Z=o.side,X=o.className;return(0,r.jsx)("div",{className:(0,xe.Z)("FixedSideContainer","FixedSideContainer_side_".concat(Z),X),children:b})},vn=t(1587),wn={};wn.styleTagTransform=nt(),wn.setAttributes=We(),wn.insert=_e().bind(null,"head"),wn.domAPI=se(),wn.insertStyleElement=Ze(),re()(vn.Z,wn),vn.Z&&vn.Z.locals&&vn.Z.locals;var In=function(o){var b=function(Z){var X=Z.appState,ue=Z.isMobile,je=Z.device,Y=Z.app,B=X.activeTool,ye=X.isResizing,Re=X.isRotating,Te=X.lastPointerDownWith,$e=X.multiElement!==null;if(X.openSidebar&&!je.editor.canFitSidebar)return null;if((0,C.EN)(X))return(0,z.t)("hints.eraserRevert");if(B.type==="arrow"||B.type==="line")return $e?(0,z.t)("hints.linearElementMulti"):(0,z.t)("hints.linearElement");if(B.type==="freedraw")return(0,z.t)("hints.freeDraw");if(B.type==="text")return(0,z.t)("hints.text");if(B.type==="embeddable")return(0,z.t)("hints.embeddable");if(X.activeTool.type==="image"&&X.pendingImageElementId)return(0,z.t)("hints.placeImage");var Qe=Y.scene.getSelectedElements(X);if(ye&&Te==="mouse"&&Qe.length===1){var et=Qe[0];return(0,H.bt)(et)&&et.points.length===2?(0,z.t)("hints.lockAngle"):(0,H.pC)(et)?(0,z.t)("hints.resizeImage"):(0,z.t)("hints.resize")}if(Re&&Te==="mouse")return(0,z.t)("hints.rotate");if(Qe.length===1&&(0,H.iB)(Qe[0]))return(0,z.t)("hints.text_selected");if(X.editingElement&&(0,H.iB)(X.editingElement))return(0,z.t)("hints.text_editing");if(B.type==="selection"){var ft;if(((ft=X.draggingElement)===null||ft===void 0?void 0:ft.type)==="selection"&&!Qe.length&&!X.editingElement&&!X.editingLinearElement)return(0,z.t)("hints.deepBoxSelect");if(X.gridSize&&X.draggingElement)return(0,z.t)("hints.disableSnapping");if(!Qe.length&&!ue)return(0,z.t)("hints.canvasPanning");if(Qe.length===1){if((0,H.bt)(Qe[0]))return X.editingLinearElement?X.editingLinearElement.selectedPointsIndices?(0,z.t)("hints.lineEditor_pointSelected"):(0,z.t)("hints.lineEditor_nothingSelected"):(0,z.t)("hints.lineEditor_info");if(!X.draggingElement&&(0,H.mG)(Qe[0]))return(0,z.t)("hints.bindTextToElement")}}return null}({appState:o.appState,isMobile:o.isMobile,device:o.device,app:o.app});return b?(b=(0,h.uY)(b),(0,r.jsx)("div",{className:"HintViewer",children:(0,r.jsx)("span",{children:b})})):null},kn=t(1404),nr=t(7165),Pn=(t(3041),{CHECKED:ne.FC,UNCHECKED:ne._C}),Jn=function(o){return(0,r.jsxs)("label",{className:(0,xe.Z)("ToolIcon ToolIcon__lock","ToolIcon_size_".concat("medium"),{"is-mobile":o.isMobile}),title:"".concat(o.title," — Q"),children:[(0,r.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:o.name,onChange:o.onChange,checked:o.checked,"aria-label":o.title,"data-testid":"toolbar-lock"}),(0,r.jsx)("div",{className:"ToolIcon__icon",children:o.checked?Pn.CHECKED:Pn.UNCHECKED})]})},xr=["heading","children"];function Nr(o,b){var Z=Object.keys(o);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(o);b&&(X=X.filter(function(ue){return Object.getOwnPropertyDescriptor(o,ue).enumerable})),Z.push.apply(Z,X)}return Z}function $r(o){for(var b=1;b<arguments.length;b++){var Z=arguments[b]!=null?arguments[b]:{};b%2?Nr(Object(Z),!0).forEach(function(X){(0,K.Z)(o,X,Z[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(Z)):Nr(Object(Z)).forEach(function(X){Object.defineProperty(o,X,Object.getOwnPropertyDescriptor(Z,X))})}return o}var ao=function(o){var b=o.heading,Z=o.children,X=(0,lt.Z)(o,xr),ue=If().id,je=(0,r.jsx)("h2",{className:"visually-hidden",id:"".concat(ue,"-").concat(b,"-title"),children:(0,z.t)("headings.".concat(b))});return(0,r.jsx)("section",$r($r({},X),{},{"aria-labelledby":"".concat(ue,"-").concat(b,"-title"),children:typeof Z=="function"?Z(je):(0,r.jsxs)(r.Fragment,{children:[je,Z]})}))},lo=t(4726),Dr=function(o){return o.penDetected?(0,r.jsxs)("label",{className:(0,xe.Z)("ToolIcon ToolIcon__penMode","ToolIcon_size_".concat("medium"),{"is-mobile":o.isMobile}),title:"".concat(o.title),children:[(0,r.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:o.name,onChange:o.onChange,checked:o.checked,"aria-label":o.title}),(0,r.jsx)("div",{className:"ToolIcon__icon",children:ne.tb})]}):null},Ar=t(4949),wo=t(2681),de={};de.styleTagTransform=nt(),de.setAttributes=We(),de.insert=_e().bind(null,"head"),de.domAPI=se(),de.insertStyleElement=Ze(),re()(wo.Z,de),wo.Z&&wo.Z.locals&&wo.Z.locals;var Pe=function(o){var b,Z=(0,Ar.KP)(o.elements),X=(0,Ie.Zs)(o.elements,o.appState),ue=(0,Ar.KP)(X);return(0,r.jsx)("div",{className:"Stats",children:(0,r.jsxs)(kn.W,{padding:2,children:[(0,r.jsx)("div",{className:"close",onClick:o.onClose,children:ne.Tw}),(0,r.jsx)("h3",{children:(0,z.t)("stats.title")}),(0,r.jsx)("table",{children:(0,r.jsxs)("tbody",{children:[(0,r.jsx)("tr",{children:(0,r.jsx)("th",{colSpan:2,children:(0,z.t)("stats.scene")})}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,z.t)("stats.elements")}),(0,r.jsx)("td",{children:o.elements.length})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,z.t)("stats.width")}),(0,r.jsx)("td",{children:Math.round(Z[2])-Math.round(Z[0])})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,z.t)("stats.height")}),(0,r.jsx)("td",{children:Math.round(Z[3])-Math.round(Z[1])})]}),X.length===1&&(0,r.jsx)("tr",{children:(0,r.jsx)("th",{colSpan:2,children:(0,z.t)("stats.element")})}),X.length>1&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("tr",{children:(0,r.jsx)("th",{colSpan:2,children:(0,z.t)("stats.selected")})}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,z.t)("stats.elements")}),(0,r.jsx)("td",{children:X.length})]})]}),X.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"x"}),(0,r.jsx)("td",{children:Math.round(ue[0])})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"y"}),(0,r.jsx)("td",{children:Math.round(ue[1])})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,z.t)("stats.width")}),(0,r.jsx)("td",{children:Math.round(ue[2]-ue[0])})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,z.t)("stats.height")}),(0,r.jsx)("td",{children:Math.round(ue[3]-ue[1])})]})]}),X.length===1&&(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,z.t)("stats.angle")}),(0,r.jsx)("td",{children:"".concat(Math.round(180*X[0].angle/Math.PI),"°")})]}),(b=o.renderCustomStats)===null||b===void 0?void 0:b.call(o,o.elements,o.appState)]})})]})})},ze=function(o){return(0,r.jsx)(S.V,{className:(0,xe.Z)("Shape",{fillable:!1}),type:"radio",icon:ne.Hk,name:"editor-current-shape",checked:o.checked,title:"".concat(o.title," — H"),keyBindingLabel:o.isMobile?void 0:A.tW.H.toLocaleUpperCase(),"aria-label":"".concat(o.title," — H"),"aria-keyshortcuts":A.tW.H,"data-testid":"toolbar-hand",onChange:function(){var b;return(b=o.onChange)===null||b===void 0?void 0:b.call(o)}})},Ke=t(4572);function St(o,b){var Z=Object.keys(o);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(o);b&&(X=X.filter(function(ue){return Object.getOwnPropertyDescriptor(o,ue).enumerable})),Z.push.apply(Z,X)}return Z}var nn=function(o){var b=o.appState,Z=o.elements,X=o.actionManager,ue=o.setAppState,je=o.onLockToggle,Y=o.onHandToolToggle,B=o.onPenModeToggle,ye=o.renderTopRightUI,Re=o.renderCustomStats,Te=o.renderSidebars,$e=o.device,Qe=o.renderWelcomeScreen,et=o.UIOptions,ft=o.app,gt=(0,Ke.R6)(),vt=gt.WelcomeScreenCenterTunnel,on=gt.MainMenuTunnel,Rt=gt.DefaultSidebarTriggerTunnel;return(0,r.jsxs)(r.Fragment,{children:[Te(),!b.viewModeEnabled&&(0,r.jsxs)(qn,{side:"top",className:"App-top-bar",children:[Qe&&(0,r.jsx)(vt.Out,{}),(0,r.jsx)(ao,{heading:"shapes",children:function(bt){return(0,r.jsx)(it.Z.Col,{gap:4,align:"center",children:(0,r.jsxs)(it.Z.Row,{gap:1,className:"App-toolbar-container",children:[(0,r.jsxs)(kn.W,{padding:1,className:"App-toolbar App-toolbar--mobile",children:[bt,(0,r.jsx)(it.Z.Row,{gap:1,children:(0,r.jsx)(ot,{appState:b,activeTool:b.activeTool,UIOptions:et,app:ft})})]}),ye&&ye(!0,b),(0,r.jsxs)("div",{className:"mobile-misc-tools-container",children:[!b.viewModeEnabled&&(0,r.jsx)(Rt.Out,{}),(0,r.jsx)(Dr,{checked:b.penMode,onChange:function(){return B(null)},title:(0,z.t)("toolBar.penMode"),isMobile:!0,penDetected:b.penDetected}),(0,r.jsx)(Jn,{checked:b.activeTool.locked,onChange:je,title:(0,z.t)("toolBar.lock"),isMobile:!0}),(0,r.jsx)(ze,{checked:(0,C.l$)(b),onChange:function(){return Y()},title:(0,z.t)("toolBar.hand"),isMobile:!0})]})]})})}}),(0,r.jsx)(In,{appState:b,isMobile:!0,device:$e,app:ft})]}),!b.openMenu&&b.showStats&&(0,r.jsx)(Pe,{appState:b,setAppState:ue,elements:Z,onClose:function(){X.executeAction(D.u0)},renderCustomStats:Re}),(0,r.jsx)("div",{className:"App-bottom-bar",style:{marginBottom:lo.nn+2*lo.WM,marginLeft:lo.nn+2*lo.WM,marginRight:lo.nn+2*lo.WM},children:(0,r.jsxs)(kn.W,{padding:0,children:[b.openMenu==="shape"&&!b.viewModeEnabled&&(0,te.RT)(b,Z)?(0,r.jsx)(ao,{className:"App-mobile-menu",heading:"selectedShapeActions",children:(0,r.jsx)(tn,{appState:b,elements:Z,renderAction:X.renderAction})}):null,(0,r.jsxs)("footer",{className:"App-toolbar",children:[b.viewModeEnabled?(0,r.jsx)("div",{className:"App-toolbar-content",children:(0,r.jsx)(on.Out,{})}):(0,r.jsxs)("div",{className:"App-toolbar-content",children:[(0,r.jsx)(on.Out,{}),X.renderAction("toggleEditMenu"),X.renderAction("undo"),X.renderAction("redo"),X.renderAction(b.multiElement?"finalize":"duplicateSelection"),X.renderAction("deleteSelectedElements")]}),b.scrolledOutside&&!b.openMenu&&!b.openSidebar&&(0,r.jsx)("button",{className:"scroll-back-to-content",onClick:function(){ue(function(bt){return function(Mt){for(var Ht=1;Ht<arguments.length;Ht++){var an=arguments[Ht]!=null?arguments[Ht]:{};Ht%2?St(Object(an),!0).forEach(function(ln){(0,K.Z)(Mt,ln,an[ln])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Mt,Object.getOwnPropertyDescriptors(an)):St(Object(an)).forEach(function(ln){Object.defineProperty(Mt,ln,Object.getOwnPropertyDescriptor(an,ln))})}return Mt}({},(0,Ie.W)(Z,bt))})},children:(0,z.t)("buttons.scrollBackToContent")})]})]})})]})},$t=t(5284),cn=t(901),Ot=t(3668),sn=t(8461),un={};un.styleTagTransform=nt(),un.setAttributes=We(),un.insert=_e().bind(null,"head"),un.domAPI=se(),un.insertStyleElement=Ze(),re()(sn.Z,un),sn.Z&&sn.Z.locals&&sn.Z.locals;var Rn=function(o){var b=(0,G.useRef)(null),Z=(0,G.useState)(null),X=(0,j.Z)(Z,2),ue=X[0],je=X[1];return(0,G.useLayoutEffect)(function(){if(o.spreadsheet){var Y,B=(0,cn.ps)(o.chartType,o.spreadsheet,0,0);je(B);var ye=b.current;return(0,l.Z)(m().mark(function Re(){var Te;return m().wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return $e.next=2,(0,Ot.$D)(B,{exportBackground:!1,viewBackgroundColor:$t.white},null);case 2:Y=$e.sent,(Te=Y.querySelector(".style-fonts"))===null||Te===void 0||Te.remove(),ye.replaceChildren(),ye.appendChild(Y),o.selected&&ye.parentNode.focus();case 7:case"end":return $e.stop()}},Re)}))(),function(){ye.replaceChildren()}}},[o.spreadsheet,o.chartType,o.selected]),(0,r.jsx)("button",{className:"ChartPreview",onClick:function(){ue&&o.onClick(o.chartType,ue)},children:(0,r.jsx)("div",{ref:b})})},Fn=function(o){var b=o.setAppState,Z=o.appState,X=o.onClose,ue=Cf().onInsertElements,je=he().useCallback(function(){X&&X()},[X]),Y=function(B,ye){ue(ye),(0,w.L)("magic","chart",B),b({currentChartType:B,pasteDialog:{shown:!1,data:null}})};return(0,r.jsx)(Nt.V,{size:"small",onCloseRequest:je,title:(0,z.t)("labels.pasteCharts"),className:"PasteChartDialog",autofocus:!1,children:(0,r.jsxs)("div",{className:"container",children:[(0,r.jsx)(Rn,{chartType:"bar",spreadsheet:Z.pasteDialog.data,selected:Z.currentChartType==="bar",onClick:Y}),(0,r.jsx)(Rn,{chartType:"line",spreadsheet:Z.pasteDialog.data,selected:Z.currentChartType==="line",onClick:Y})]})})},Hn=t(2978),rr={};rr.styleTagTransform=nt(),rr.setAttributes=We(),rr.insert=_e().bind(null,"head"),rr.domAPI=se(),rr.insertStyleElement=Ze(),re()(Hn.Z,rr),Hn.Z&&Hn.Z.locals&&Hn.Z.locals;function er(o,b){var Z=Object.keys(o);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(o);b&&(X=X.filter(function(ue){return Object.getOwnPropertyDescriptor(o,ue).enumerable})),Z.push.apply(Z,X)}return Z}var zn=m().mark(hi);function ur(o,b){var Z=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!Z){if(Array.isArray(o)||(Z=function(ye,Re){if(ye){if(typeof ye=="string")return vr(ye,Re);var Te=Object.prototype.toString.call(ye).slice(8,-1);if(Te==="Object"&&ye.constructor&&(Te=ye.constructor.name),Te==="Map"||Te==="Set")return Array.from(ye);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return vr(ye,Re)}}(o))||b){Z&&(o=Z);var X=0,ue=function(){};return{s:ue,n:function(){return X>=o.length?{done:!0}:{done:!1,value:o[X++]}},e:function(ye){throw ye},f:ue}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
56
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je,Y=!0,B=!1;return{s:function(){Z=Z.call(o)},n:function(){var ye=Z.next();return Y=ye.done,ye},e:function(ye){B=!0,je=ye},f:function(){try{Y||Z.return==null||Z.return()}finally{if(B)throw je}}}}function vr(o,b){(b==null||b>o.length)&&(b=o.length);for(var Z=0,X=new Array(b);Z<b;Z++)X[Z]=o[Z];return X}var oo=function(){return(0,r.jsxs)("div",{className:"HelpDialog__header",children:[(0,r.jsxs)("a",{className:"HelpDialog__btn",href:"https://docs.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:[(0,z.t)("helpDialog.documentation"),(0,r.jsx)("div",{className:"HelpDialog__link-icon",children:ne.h0})]}),(0,r.jsxs)("a",{className:"HelpDialog__btn",href:"https://blog.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:[(0,z.t)("helpDialog.blog"),(0,r.jsx)("div",{className:"HelpDialog__link-icon",children:ne.h0})]}),(0,r.jsxs)("a",{className:"HelpDialog__btn",href:"https://github.com/excalidraw/excalidraw/issues",target:"_blank",rel:"noopener noreferrer",children:[(0,z.t)("helpDialog.github"),(0,r.jsx)("div",{className:"HelpDialog__link-icon",children:ne.h0})]})]})},po=function(o){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h3",{children:o.title}),(0,r.jsx)("div",{className:"HelpDialog__islands-container",children:o.children})]})},Lo=function(o){return(0,r.jsxs)("div",{className:"HelpDialog__island ".concat(o.className),children:[(0,r.jsx)("h4",{className:"HelpDialog__island-title",children:o.caption}),(0,r.jsx)("div",{className:"HelpDialog__island-content",children:o.children})]})};function hi(o,b){var Z,X,ue,je;return m().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:Z=!0,X=ur(o),Y.prev=2,X.s();case 4:if((ue=X.n()).done){Y.next=14;break}if(je=ue.value,Z){Y.next=9;break}return Y.next=9,b;case 9:return Z=!1,Y.next=12,je;case 12:Y.next=4;break;case 14:Y.next=19;break;case 16:Y.prev=16,Y.t0=Y.catch(2),X.e(Y.t0);case 19:return Y.prev=19,X.f(),Y.finish(19);case 22:case"end":return Y.stop()}},zn,null,[[2,16,19,22]])}var An=function(o){var b=o.label,Z=o.shortcuts,X=o.isOr,ue=X===void 0||X,je=Z.map(function(Y){return(Y.endsWith("++")?[].concat((0,f.Z)(Y.slice(0,-2).split("+")),["+"]):Y.split("+")).map(function(B){return(0,r.jsx)(br,{children:(ye=B,ye.replace(/\b[a-z]\b/,function(Re){return Re.toUpperCase()}))},B);var ye})});return(0,r.jsxs)("div",{className:"HelpDialog__shortcut",children:[(0,r.jsx)("div",{children:b}),(0,r.jsx)("div",{className:"HelpDialog__key-container",children:(0,f.Z)(hi(je,ue?(0,z.t)("helpDialog.or"):null))})]})},br=function(o){return(0,r.jsx)("kbd",function(b){for(var Z=1;Z<arguments.length;Z++){var X=arguments[Z]!=null?arguments[Z]:{};Z%2?er(Object(X),!0).forEach(function(ue){(0,K.Z)(b,ue,X[ue])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(X)):er(Object(X)).forEach(function(ue){Object.defineProperty(b,ue,Object.getOwnPropertyDescriptor(X,ue))})}return b}({className:"HelpDialog__key"},o))},Pr=function(o){var b=o.onClose,Z=he().useCallback(function(){b&&b()},[b]);return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(Nt.V,{onCloseRequest:Z,title:(0,z.t)("helpDialog.title"),className:"HelpDialog",children:[(0,r.jsx)(oo,{}),(0,r.jsxs)(po,{title:(0,z.t)("helpDialog.shortcuts"),children:[(0,r.jsxs)(Lo,{className:"HelpDialog__island--tools",caption:(0,z.t)("helpDialog.tools"),children:[(0,r.jsx)(An,{label:(0,z.t)("toolBar.hand"),shortcuts:[A.tW.H]}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.selection"),shortcuts:[A.tW.V,A.tW[1]]}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.rectangle"),shortcuts:[A.tW.R,A.tW[2]]}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.diamond"),shortcuts:[A.tW.D,A.tW[3]]}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.ellipse"),shortcuts:[A.tW.O,A.tW[4]]}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.arrow"),shortcuts:[A.tW.A,A.tW[5]]}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.line"),shortcuts:[A.tW.L,A.tW[6]]}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.freedraw"),shortcuts:[A.tW.P,A.tW[7]]}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.text"),shortcuts:[A.tW.T,A.tW[8]]}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.image"),shortcuts:[A.tW[9]]}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.eraser"),shortcuts:[A.tW.E,A.tW[0]]}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.frame"),shortcuts:[A.tW.F]}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.laser"),shortcuts:[A.tW.K]}),(0,r.jsx)(An,{label:(0,z.t)("labels.eyeDropper"),shortcuts:[A.tW.I,"Shift+S","Shift+G"]}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.editLineArrowPoints"),shortcuts:[(0,h.uY)("CtrlOrCmd+Enter")]}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.editText"),shortcuts:[(0,h.uY)("Enter")]}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.textNewLine"),shortcuts:[(0,h.uY)("Enter"),(0,h.uY)("Shift+Enter")]}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.textFinish"),shortcuts:[(0,h.uY)("Esc"),(0,h.uY)("CtrlOrCmd+Enter")]}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.curvedArrow"),shortcuts:["A",(0,z.t)("helpDialog.click"),(0,z.t)("helpDialog.click"),(0,z.t)("helpDialog.click")],isOr:!1}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.curvedLine"),shortcuts:["L",(0,z.t)("helpDialog.click"),(0,z.t)("helpDialog.click"),(0,z.t)("helpDialog.click")],isOr:!1}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.lock"),shortcuts:[A.tW.Q]}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.preventBinding"),shortcuts:[(0,h.uY)("CtrlOrCmd")]}),(0,r.jsx)(An,{label:(0,z.t)("toolBar.link"),shortcuts:[(0,h.uY)("CtrlOrCmd+K")]})]}),(0,r.jsxs)(Lo,{className:"HelpDialog__island--view",caption:(0,z.t)("helpDialog.view"),children:[(0,r.jsx)(An,{label:(0,z.t)("buttons.zoomIn"),shortcuts:[(0,h.uY)("CtrlOrCmd++")]}),(0,r.jsx)(An,{label:(0,z.t)("buttons.zoomOut"),shortcuts:[(0,h.uY)("CtrlOrCmd+-")]}),(0,r.jsx)(An,{label:(0,z.t)("buttons.resetZoom"),shortcuts:[(0,h.uY)("CtrlOrCmd+0")]}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.zoomToFit"),shortcuts:["Shift+1"]}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.zoomToSelection"),shortcuts:["Shift+2"]}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.movePageUpDown"),shortcuts:["PgUp/PgDn"]}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.movePageLeftRight"),shortcuts:["Shift+PgUp/PgDn"]}),(0,r.jsx)(An,{label:(0,z.t)("buttons.zenMode"),shortcuts:[(0,h.uY)("Alt+Z")]}),(0,r.jsx)(An,{label:(0,z.t)("buttons.objectsSnapMode"),shortcuts:[(0,h.uY)("Alt+S")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.showGrid"),shortcuts:[(0,h.uY)("CtrlOrCmd+'")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.viewMode"),shortcuts:[(0,h.uY)("Alt+R")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.toggleTheme"),shortcuts:[(0,h.uY)("Alt+Shift+D")]}),(0,r.jsx)(An,{label:(0,z.t)("stats.title"),shortcuts:[(0,h.uY)("Alt+/")]})]}),(0,r.jsxs)(Lo,{className:"HelpDialog__island--editor",caption:(0,z.t)("helpDialog.editor"),children:[(0,r.jsx)(An,{label:(0,z.t)("labels.moveCanvas"),shortcuts:[(0,h.uY)("Space+".concat((0,z.t)("helpDialog.drag"))),(0,h.uY)("Wheel+".concat((0,z.t)("helpDialog.drag")))],isOr:!0}),(0,r.jsx)(An,{label:(0,z.t)("buttons.clearReset"),shortcuts:[(0,h.uY)("CtrlOrCmd+Delete")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.delete"),shortcuts:[(0,h.uY)("Delete")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.cut"),shortcuts:[(0,h.uY)("CtrlOrCmd+X")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.copy"),shortcuts:[(0,h.uY)("CtrlOrCmd+C")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.paste"),shortcuts:[(0,h.uY)("CtrlOrCmd+V")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.pasteAsPlaintext"),shortcuts:[(0,h.uY)("CtrlOrCmd+Shift+V")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.selectAll"),shortcuts:[(0,h.uY)("CtrlOrCmd+A")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.multiSelect"),shortcuts:[(0,h.uY)("Shift+".concat((0,z.t)("helpDialog.click")))]}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.deepSelect"),shortcuts:[(0,h.uY)("CtrlOrCmd+".concat((0,z.t)("helpDialog.click")))]}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.deepBoxSelect"),shortcuts:[(0,h.uY)("CtrlOrCmd+".concat((0,z.t)("helpDialog.drag")))]}),(_.vt||y.vU)&&(0,r.jsx)(An,{label:(0,z.t)("labels.copyAsPng"),shortcuts:[(0,h.uY)("Shift+Alt+C")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.copyStyles"),shortcuts:[(0,h.uY)("CtrlOrCmd+Alt+C")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.pasteStyles"),shortcuts:[(0,h.uY)("CtrlOrCmd+Alt+V")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.sendToBack"),shortcuts:[y.Um?(0,h.uY)("CtrlOrCmd+Alt+["):(0,h.uY)("CtrlOrCmd+Shift+[")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.bringToFront"),shortcuts:[y.Um?(0,h.uY)("CtrlOrCmd+Alt+]"):(0,h.uY)("CtrlOrCmd+Shift+]")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.sendBackward"),shortcuts:[(0,h.uY)("CtrlOrCmd+[")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.bringForward"),shortcuts:[(0,h.uY)("CtrlOrCmd+]")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.alignTop"),shortcuts:[(0,h.uY)("CtrlOrCmd+Shift+Up")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.alignBottom"),shortcuts:[(0,h.uY)("CtrlOrCmd+Shift+Down")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.alignLeft"),shortcuts:[(0,h.uY)("CtrlOrCmd+Shift+Left")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.alignRight"),shortcuts:[(0,h.uY)("CtrlOrCmd+Shift+Right")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.duplicateSelection"),shortcuts:[(0,h.uY)("CtrlOrCmd+D"),(0,h.uY)("Alt+".concat((0,z.t)("helpDialog.drag")))]}),(0,r.jsx)(An,{label:(0,z.t)("helpDialog.toggleElementLock"),shortcuts:[(0,h.uY)("CtrlOrCmd+Shift+L")]}),(0,r.jsx)(An,{label:(0,z.t)("buttons.undo"),shortcuts:[(0,h.uY)("CtrlOrCmd+Z")]}),(0,r.jsx)(An,{label:(0,z.t)("buttons.redo"),shortcuts:y.ED?[(0,h.uY)("CtrlOrCmd+Y"),(0,h.uY)("CtrlOrCmd+Shift+Z")]:[(0,h.uY)("CtrlOrCmd+Shift+Z")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.group"),shortcuts:[(0,h.uY)("CtrlOrCmd+G")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.ungroup"),shortcuts:[(0,h.uY)("CtrlOrCmd+Shift+G")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.flipHorizontal"),shortcuts:[(0,h.uY)("Shift+H")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.flipVertical"),shortcuts:[(0,h.uY)("Shift+V")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.showStroke"),shortcuts:[(0,h.uY)("S")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.showBackground"),shortcuts:[(0,h.uY)("G")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.decreaseFontSize"),shortcuts:[(0,h.uY)("CtrlOrCmd+Shift+<")]}),(0,r.jsx)(An,{label:(0,z.t)("labels.increaseFontSize"),shortcuts:[(0,h.uY)("CtrlOrCmd+Shift+>")]})]})]})]})})},Vr=t(4704),ko=t(4241),Bo={};Bo.styleTagTransform=nt(),Bo.setAttributes=We(),Bo.insert=_e().bind(null,"head"),Bo.domAPI=se(),Bo.insertStyleElement=Ze(),re()(ko.Z,Bo),ko.Z&&ko.Z.locals&&ko.Z.locals;var Ri=function(o){var b,Z=o.children,X=o.color;return(0,r.jsx)("div",{className:"Card",style:(b={},(0,K.Z)(b,"--card-color",X==="primary"?"var(--color-primary)":$t[X][7]),(0,K.Z)(b,"--card-color-darker",X==="primary"?"var(--color-primary-darker)":$t[X][8]),(0,K.Z)(b,"--card-color-darkest",X==="primary"?"var(--color-primary-darkest)":$t[X][9]),b),children:Z})},Go=t(7955),ni={};ni.styleTagTransform=nt(),ni.setAttributes=We(),ni.insert=_e().bind(null,"head"),ni.domAPI=se(),ni.insertStyleElement=Ze(),re()(Go.Z,ni),Go.Z&&Go.Z.locals&&Go.Z.locals;var Hs=function(o){var b=o.elements,Z=o.appState,X=o.setAppState,ue=o.files,je=o.actionManager,Y=o.exportOpts,B=o.canvas,ye=o.onCloseRequest,Re=Y.onExportToBackend;return(0,r.jsx)("div",{className:"ExportDialog ExportDialog--json",children:(0,r.jsxs)("div",{className:"ExportDialog-cards",children:[Y.saveFileToDisk&&(0,r.jsxs)(Ri,{color:"lime",children:[(0,r.jsx)("div",{className:"Card-icon",children:ne.TP}),(0,r.jsx)("h2",{children:(0,z.t)("exportDialog.disk_title")}),(0,r.jsxs)("div",{className:"Card-details",children:[(0,z.t)("exportDialog.disk_details"),!Sn.kr&&je.renderAction("changeProjectName")]}),(0,r.jsx)(S.V,{className:"Card-button",type:"button",title:(0,z.t)("exportDialog.disk_button"),"aria-label":(0,z.t)("exportDialog.disk_button"),showAriaLabel:!0,onClick:function(){je.executeAction(rn.mM,"ui")}})]}),Re&&(0,r.jsxs)(Ri,{color:"pink",children:[(0,r.jsx)("div",{className:"Card-icon",children:ne.xP}),(0,r.jsx)("h2",{children:(0,z.t)("exportDialog.link_title")}),(0,r.jsx)("div",{className:"Card-details",children:(0,z.t)("exportDialog.link_details")}),(0,r.jsx)(S.V,{className:"Card-button",type:"button",title:(0,z.t)("exportDialog.link_button"),"aria-label":(0,z.t)("exportDialog.link_button"),showAriaLabel:!0,onClick:(0,l.Z)(m().mark(function Te(){return m().wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return $e.prev=0,(0,w.L)("export","link","ui (".concat((0,h.$h)(),")")),$e.next=4,Re(b,Z,ue,B);case 4:ye(),$e.next=10;break;case 7:$e.prev=7,$e.t0=$e.catch(0),X({errorMessage:$e.t0.message});case 10:case"end":return $e.stop()}},Te,null,[[0,7]])}))})]}),Y.renderCustomUI&&Y.renderCustomUI(b,Z,ue,B)]})})},zl=function(o){var b=o.elements,Z=o.appState,X=o.files,ue=o.actionManager,je=o.exportOpts,Y=o.canvas,B=o.setAppState,ye=he().useCallback(function(){B({openDialog:null})},[B]);return(0,r.jsx)(r.Fragment,{children:Z.openDialog==="jsonExport"&&(0,r.jsx)(Nt.V,{onCloseRequest:ye,title:(0,z.t)("buttons.export"),children:(0,r.jsx)(Hs,{elements:b,appState:Z,setAppState:B,files:X,actionManager:ue,onCloseRequest:ye,exportOpts:je,canvas:Y})})})},bu=t(7080),af=function(o){return(0,r.jsx)("button",{className:"help-icon",onClick:o.onClick,type:"button",title:"".concat((0,z.t)("helpDialog.title")," — ?"),"aria-label":(0,z.t)("helpDialog.title"),children:ne.by})},yu=function(o){var b=o.appState,Z=o.actionManager,X=o.showExitZenModeBtn,ue=o.renderWelcomeScreen,je=(0,Ke.R6)(),Y=je.FooterCenterTunnel,B=je.WelcomeScreenHelpHintTunnel,ye=Ku(),Re=!b.viewModeEnabled&&b.multiElement&&ye.isTouchScreen;return(0,r.jsxs)("footer",{role:"contentinfo",className:"layer-ui__wrapper__footer App-menu App-menu_bottom",children:[(0,r.jsx)("div",{className:(0,xe.Z)("layer-ui__wrapper__footer-left zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":b.zenModeEnabled}),children:(0,r.jsx)(it.Z.Col,{gap:2,children:(0,r.jsxs)(ao,{heading:"canvasActions",children:[(0,r.jsx)(It,{renderAction:Z.renderAction,zoom:b.zoom}),!b.viewModeEnabled&&(0,r.jsx)(mt,{renderAction:Z.renderAction,className:(0,xe.Z)("zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":b.zenModeEnabled})}),Re&&(0,r.jsx)(xt,{renderAction:Z.renderAction,className:(0,xe.Z)("zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-left":b.zenModeEnabled})})]})})}),(0,r.jsx)(Y.Out,{}),(0,r.jsx)("div",{className:(0,xe.Z)("layer-ui__wrapper__footer-right zen-mode-transition",{"transition-right":b.zenModeEnabled}),children:(0,r.jsxs)("div",{style:{position:"relative"},children:[ue&&(0,r.jsx)(B.Out,{}),(0,r.jsx)(af,{onClick:function(){return Z.executeAction(D.jY)}})]})}),(0,r.jsx)(jt,{actionManager:Z,showExitZenModeBtn:X})]})},xu=yu;yu.displayName="Footer";var wu=t(5902),zi=t(453),Nl=t(3607),Fo=t(7021),ku=t(8973),lf=t(6922),Ws=t(7827),Ca=function(o){var b=o.title,Z=o.children,X=o.actionLabel,ue=o.onClick;return(0,r.jsxs)("div",{className:"OverwriteConfirm__Actions__Action",children:[(0,r.jsx)("h4",{children:b}),(0,r.jsx)("div",{className:"OverwriteConfirm__Actions__Action__content",children:Z}),(0,r.jsx)(wt,{variant:"outlined",color:"muted",label:X,size:"large",fullWidth:!0,onClick:ue})]})},ea=Object.assign(function(o){var b=o.children;return(0,r.jsx)("div",{className:"OverwriteConfirm__Actions",children:b})},{ExportToImage:function(){var o=(0,z.QT)().t,b=Pf(),Z=wm();return(0,r.jsx)(Ca,{title:o("overwriteConfirm.action.exportToImage.title"),actionLabel:o("overwriteConfirm.action.exportToImage.button"),onClick:function(){b.executeAction(rn.Du,"ui",!0),Z({openDialog:"imageExport"})},children:o("overwriteConfirm.action.exportToImage.description")})},SaveToDisk:function(){var o=(0,z.QT)().t,b=Pf();return(0,r.jsx)(Ca,{title:o("overwriteConfirm.action.saveToDisk.title"),actionLabel:o("overwriteConfirm.action.saveToDisk.button"),onClick:function(){b.executeAction(D.mM,"ui")},children:o("overwriteConfirm.action.saveToDisk.description")})}}),Ja=t(9439),ta={};ta.styleTagTransform=nt(),ta.setAttributes=We(),ta.insert=_e().bind(null,"head"),ta.domAPI=se(),ta.insertStyleElement=Ze(),re()(Ja.Z,ta),Ja.Z&&Ja.Z.locals&&Ja.Z.locals;function Us(o,b){var Z=Object.keys(o);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(o);b&&(X=X.filter(function(ue){return Object.getOwnPropertyDescriptor(o,ue).enumerable})),Z.push.apply(Z,X)}return Z}function el(o){for(var b=1;b<arguments.length;b++){var Z=arguments[b]!=null?arguments[b]:{};b%2?Us(Object(Z),!0).forEach(function(X){(0,K.Z)(o,X,Z[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(Z)):Us(Object(Z)).forEach(function(X){Object.defineProperty(o,X,Object.getOwnPropertyDescriptor(Z,X))})}return o}var Ia=Object.assign((0,lf.$)("OverwriteConfirmDialog",function(o){var b=o.children,Z=(0,Ke.R6)().OverwriteConfirmDialogTunnel,X=(0,Nl.KO)(Ws.K,zi.yE),ue=(0,j.Z)(X,2),je=ue[0],Y=ue[1];return je.active?(0,r.jsx)(Z.In,{children:(0,r.jsx)(Nt.V,{onCloseRequest:function(){je.onClose(),Y(function(B){return el(el({},B),{},{active:!1})})},title:!1,size:916,children:(0,r.jsxs)("div",{className:"OverwriteConfirm",children:[(0,r.jsx)("h3",{children:je.title}),(0,r.jsxs)("div",{className:"OverwriteConfirm__Description OverwriteConfirm__Description--color-".concat(je.color),children:[(0,r.jsx)("div",{className:"OverwriteConfirm__Description__icon",children:ne.UT}),(0,r.jsx)("div",{children:je.description}),(0,r.jsx)("div",{className:"OverwriteConfirm__Description__spacer"}),(0,r.jsx)(wt,{color:je.color,size:"large",label:je.actionLabel,onClick:function(){je.onConfirm(),Y(function(B){return el(el({},B),{},{active:!1})})}})]}),(0,r.jsx)(ea,{children:b})]})})}):null}),{Actions:ea,Action:Ca}),Eu=t(100),Ks=t(1925),Vs=t(8924),Bl=t(1434),ri={};ri.styleTagTransform=nt(),ri.setAttributes=We(),ri.insert=_e().bind(null,"head"),ri.domAPI=se(),ri.insertStyleElement=Ze(),re()(Bl.Z,ri),Bl.Z&&Bl.Z.locals&&Bl.Z.locals;var tl=t(9144),Pa={};Pa.styleTagTransform=nt(),Pa.setAttributes=We(),Pa.insert=_e().bind(null,"head"),Pa.domAPI=se(),Pa.insertStyleElement=Ze(),re()(tl.Z,Pa),tl.Z&&tl.Z.locals&&tl.Z.locals;var Ni=t(2921),sf=function(o){return(0,r.jsxs)("label",{className:(0,xe.Z)("ToolIcon ToolIcon__LaserPointer","ToolIcon_size_".concat("small"),{"is-mobile":o.isMobile}),title:"".concat(o.title),children:[(0,r.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",name:o.name,onChange:o.onChange,checked:o.checked,"aria-label":o.title,"data-testid":"toolbar-LaserPointer"}),(0,r.jsx)("div",{className:"ToolIcon__icon",children:ne.d})]})},Su=["suggestedBindings","startBoundElement","cursorButton","scrollX","scrollY"],_u=["canvas","appState"],vm=["canvas","appState"];function nl(o,b){var Z=Object.keys(o);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(o);b&&(X=X.filter(function(ue){return Object.getOwnPropertyDescriptor(o,ue).enumerable})),Z.push.apply(Z,X)}return Z}function cf(o,b){var Z=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!Z){if(Array.isArray(o)||(Z=function(ye,Re){if(ye){if(typeof ye=="string")return na(ye,Re);var Te=Object.prototype.toString.call(ye).slice(8,-1);if(Te==="Object"&&ye.constructor&&(Te=ye.constructor.name),Te==="Map"||Te==="Set")return Array.from(ye);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return na(ye,Re)}}(o))||b){Z&&(o=Z);var X=0,ue=function(){};return{s:ue,n:function(){return X>=o.length?{done:!0}:{done:!1,value:o[X++]}},e:function(ye){throw ye},f:ue}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
57
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je,Y=!0,B=!1;return{s:function(){Z=Z.call(o)},n:function(){var ye=Z.next();return Y=ye.done,ye},e:function(ye){B=!0,je=ye},f:function(){try{Y||Z.return==null||Z.return()}finally{if(B)throw je}}}}function na(o,b){(b==null||b>o.length)&&(b=o.length);for(var Z=0,X=new Array(b);Z<b;Z++)X[Z]=o[Z];return X}var uf=function(o){var b=o.UIOptions;return(0,r.jsxs)(Fo.Z,{__fallback:!0,children:[(0,r.jsx)(Fo.Z.DefaultItems.LoadScene,{}),(0,r.jsx)(Fo.Z.DefaultItems.SaveToActiveFile,{}),b.canvasActions.export&&(0,r.jsx)(Fo.Z.DefaultItems.Export,{}),b.canvasActions.saveAsImage&&(0,r.jsx)(Fo.Z.DefaultItems.SaveAsImage,{}),(0,r.jsx)(Fo.Z.DefaultItems.Help,{}),(0,r.jsx)(Fo.Z.DefaultItems.ClearCanvas,{}),(0,r.jsx)(Fo.Z.Separator,{}),(0,r.jsx)(Fo.Z.Group,{title:"Excalidraw links",children:(0,r.jsx)(Fo.Z.DefaultItems.Socials,{})}),(0,r.jsx)(Fo.Z.Separator,{}),(0,r.jsx)(Fo.Z.DefaultItems.ToggleTheme,{}),(0,r.jsx)(Fo.Z.DefaultItems.ChangeCanvasBackground,{})]})},df=function(){return(0,r.jsxs)(Ia,{__fallback:!0,children:[(0,r.jsx)(Ia.Actions.SaveToDisk,{}),(0,r.jsx)(Ia.Actions.ExportToImage,{})]})},ff=function(o){var b,Z,X=o.actionManager,ue=o.appState,je=o.files,Y=o.setAppState,B=o.elements,ye=o.canvas,Re=o.onLockToggle,Te=o.onHandToolToggle,$e=o.onPenModeToggle,Qe=o.showExitZenModeBtn,et=o.renderTopRightUI,ft=o.renderCustomStats,gt=o.UIOptions,vt=o.onExportImage,on=o.renderWelcomeScreen,Rt=o.children,bt=o.app,Mt=o.isCollaborating,Ht=Ku(),an=(0,Ke.ZC)(),ln=(0,Nl.KO)(Vs.$,zi.yE),Bt=(0,j.Z)(ln,2),Jt=Bt[0],Mn=Bt[1],Un=function(){return gt.canvasActions.export?(0,r.jsx)(zl,{elements:B,appState:ue,files:je,actionManager:X,exportOpts:gt.canvasActions.export,canvas:ye,setAppState:Y}):null},Qn=function(){return gt.canvasActions.saveAsImage&&ue.openDialog==="imageExport"?(0,r.jsx)(Bn,{elements:B,appState:ue,files:je,actionManager:X,onExportImage:vt,onCloseRequest:function(){return Y({openDialog:null})}}):null},ir=function(){return(0,r.jsx)(Ks.O,{__fallback:!0,onDock:function(Kn){(0,w.L)("sidebar","toggleDock (".concat(Kn?"dock":"undock",")"),"(".concat(Ht.editor.isMobile?"mobile":"desktop",")"))}})},mr=(0,Nl.Dv)(wu.t6,zi.yE),pr=(0,r.jsxs)(r.Fragment,{children:[Rt,(0,r.jsx)(uf,{UIOptions:gt}),(0,r.jsx)(Ks.O.Trigger,{__fallback:!0,icon:ne.Vq,title:(0,h.Oo)((0,z.t)("toolBar.library")),onToggle:function(Kn){Kn&&(0,w.L)("sidebar","".concat(y.Cc.name," (open)"),"button (".concat(Ht.editor.isMobile?"mobile":"desktop",")"))},tab:y.Cc.defaultTab,children:(0,z.t)("toolBar.library")}),(0,r.jsx)(df,{}),ue.isLoading&&(0,r.jsx)(nr.z,{delay:250}),ue.errorMessage&&(0,r.jsx)(Ut,{onClose:function(){return Y({errorMessage:null})},children:ue.errorMessage}),Jt&&!Ht.editor.isMobile&&(0,r.jsx)(Vs.p,{colorPickerType:Jt.colorPickerType,onCancel:function(){Mn(null)},onChange:function(Kn,yr,tr,hr){var Mr=hr.altKey;if(Kn==="elementBackground"||Kn==="elementStroke")if(tr.length){var Lr,Cr,Qr=cf(tr);try{for(Qr.s();!(Cr=Qr.n()).done;){var cr=Cr.value;(0,E.DR)(cr,(0,K.Z)({},Mr&&Jt.swapPreviewOnAlt?Kn==="elementBackground"?"strokeColor":"backgroundColor":Kn==="elementBackground"?"backgroundColor":"strokeColor",yr),!1),Ni.R.delete(cr)}}catch(kr){Qr.e(kr)}finally{Qr.f()}(Lr=oe.Z.getScene(tr[0]))===null||Lr===void 0||Lr.informMutation()}else Y(Kn==="elementBackground"?{currentItemBackgroundColor:yr}:{currentItemStrokeColor:yr})},onSelect:function(Kn,yr){var tr;Mn(function(hr){return hr!=null&&hr.keepOpenOnAlt&&yr.altKey?hr:null}),Jt==null||(tr=Jt.onSelect)===null||tr===void 0||tr.call(Jt,Kn,yr)}}),ue.openDialog==="help"&&(0,r.jsx)(Pr,{onClose:function(){Y({openDialog:null})}}),(0,r.jsx)(ku.o,{}),(0,r.jsx)(an.OverwriteConfirmDialogTunnel.Out,{}),Qn(),Un(),ue.pasteDialog.shown&&(0,r.jsx)(Fn,{setAppState:Y,appState:ue,onClose:function(){return Y({pasteDialog:{shown:!1,data:null}})}}),Ht.editor.isMobile&&(0,r.jsx)(nn,{app:bt,appState:ue,elements:B,actionManager:X,renderJSONExportDialog:Un,renderImageExportDialog:Qn,setAppState:Y,onLockToggle:Re,onHandToolToggle:Te,onPenModeToggle:$e,renderTopRightUI:et,renderCustomStats:ft,renderSidebars:ir,device:Ht,renderWelcomeScreen:on,UIOptions:gt}),!Ht.editor.isMobile&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"layer-ui__wrapper",style:ue.openSidebar&&mr&&Ht.editor.canFitSidebar?{width:"calc(100% - ".concat(y.EE,"px)")}:{},children:[on&&(0,r.jsx)(an.WelcomeScreenCenterTunnel.Out,{}),(Z=(0,te.RT)(ue,B),(0,r.jsx)(qn,{side:"top",children:(0,r.jsxs)("div",{className:"App-menu App-menu_top",children:[(0,r.jsxs)(it.Z.Col,{gap:6,className:(0,xe.Z)("App-menu_top__left"),children:[(0,r.jsxs)("div",{style:{position:"relative"},children:[(0,r.jsx)(an.MainMenuTunnel.Out,{}),on&&(0,r.jsx)(an.WelcomeScreenMenuHintTunnel.Out,{})]}),Z&&(0,r.jsx)(ao,{heading:"selectedShapeActions",className:(0,xe.Z)("selected-shape-actions zen-mode-transition",{"transition-left":ue.zenModeEnabled}),children:(0,r.jsx)(kn.W,{className:y.$C.SHAPE_ACTIONS_MENU,padding:2,style:{maxHeight:"".concat(ue.height-166,"px")},children:(0,r.jsx)(tn,{appState:ue,elements:B,renderAction:X.renderAction})})})]}),!ue.viewModeEnabled&&(0,r.jsx)(ao,{heading:"shapes",className:"shapes-section",children:function(Kn){return(0,r.jsxs)("div",{style:{position:"relative"},children:[on&&(0,r.jsx)(an.WelcomeScreenToolbarHintTunnel.Out,{}),(0,r.jsx)(it.Z.Col,{gap:4,align:"start",children:(0,r.jsxs)(it.Z.Row,{gap:1,className:(0,xe.Z)("App-toolbar-container",{"zen-mode":ue.zenModeEnabled}),children:[(0,r.jsxs)(kn.W,{padding:1,className:(0,xe.Z)("App-toolbar",{"zen-mode":ue.zenModeEnabled}),children:[(0,r.jsx)(In,{appState:ue,isMobile:Ht.editor.isMobile,device:Ht,app:bt}),Kn,(0,r.jsxs)(it.Z.Row,{gap:1,children:[(0,r.jsx)(Dr,{zenModeEnabled:ue.zenModeEnabled,checked:ue.penMode,onChange:function(){return $e(null)},title:(0,z.t)("toolBar.penMode"),penDetected:ue.penDetected}),(0,r.jsx)(Jn,{checked:ue.activeTool.locked,onChange:Re,title:(0,z.t)("toolBar.lock")}),(0,r.jsx)("div",{className:"App-toolbar__divider"}),(0,r.jsx)(ze,{checked:(0,C.l$)(ue),onChange:function(){return Te()},title:(0,z.t)("toolBar.hand"),isMobile:!0}),(0,r.jsx)(ot,{appState:ue,activeTool:ue.activeTool,UIOptions:gt,app:bt})]})]}),Mt&&(0,r.jsx)(kn.W,{style:{marginLeft:8,alignSelf:"center",height:"fit-content"},children:(0,r.jsx)(sf,{title:(0,z.t)("toolBar.laser"),checked:ue.activeTool.type==="laser",onChange:function(){return bt.setActiveTool({type:"laser"})},isMobile:!0})})]})})]})}}),(0,r.jsxs)("div",{className:(0,xe.Z)("layer-ui__wrapper__top-right zen-mode-transition",{"transition-right":ue.zenModeEnabled}),children:[(0,r.jsx)(Vr.Z,{collaborators:ue.collaborators}),et==null?void 0:et(Ht.editor.isMobile,ue),!ue.viewModeEnabled&&(!mr||((b=ue.openSidebar)===null||b===void 0?void 0:b.name)!==y.Cc.name)&&(0,r.jsx)(an.DefaultSidebarTriggerTunnel.Out,{})]})]})})),(0,r.jsx)(xu,{appState:ue,actionManager:X,showExitZenModeBtn:Qe,renderWelcomeScreen:on}),ue.showStats&&(0,r.jsx)(Pe,{appState:ue,setAppState:Y,elements:B,onClose:function(){X.executeAction(bu.u)},renderCustomStats:ft}),ue.scrolledOutside&&(0,r.jsx)("button",{className:"scroll-back-to-content",onClick:function(){Y(function(Kn){return function(yr){for(var tr=1;tr<arguments.length;tr++){var hr=arguments[tr]!=null?arguments[tr]:{};tr%2?nl(Object(hr),!0).forEach(function(Mr){(0,K.Z)(yr,Mr,hr[Mr])}):Object.getOwnPropertyDescriptors?Object.defineProperties(yr,Object.getOwnPropertyDescriptors(hr)):nl(Object(hr)).forEach(function(Mr){Object.defineProperty(yr,Mr,Object.getOwnPropertyDescriptor(hr,Mr))})}return yr}({},(0,Ie.W)(B,Kn))})},children:(0,z.t)("buttons.scrollBackToContent")})]}),ir()]})]});return(0,r.jsx)(Eu.k.Provider,{value:ue,children:(0,r.jsx)(Nl.zt,{scope:an.jotaiScope,children:(0,r.jsx)(Ke.A3.Provider,{value:an,children:pr})})})},Ys=function(o){return o.suggestedBindings,o.startBoundElement,o.cursorButton,o.scrollX,o.scrollY,(0,lt.Z)(o,Su)},pf=function(o,b){if(o.children!==b.children)return!1;o.canvas;var Z=o.appState,X=(0,lt.Z)(o,_u),ue=(b.canvas,b.appState),je=(0,lt.Z)(b,vm);return(0,h.w8)(Ys(Z),Ys(ue),{selectedElementIds:h.w8,selectedGroupIds:h.w8})&&(0,h.w8)(X,je)},hf=he().memo(ff,pf),Fl=t(9650),mi={};mi.styleTagTransform=nt(),mi.setAttributes=We(),mi.insert=_e().bind(null,"head"),mi.domAPI=se(),mi.insertStyleElement=Ze(),re()(Fl.Z,mi),Fl.Z&&Fl.Z.locals&&Fl.Z.locals;var mf=function(o){var b=o.message,Z=o.onClose,X=o.closable,ue=X!==void 0&&X,je=o.duration,Y=je===void 0?5e3:je,B=(0,G.useRef)(0),ye=Y!==1/0,Re=(0,G.useCallback)(function(){ye&&(B.current=window.setTimeout(function(){return Z()},Y))},[Z,Y,ye]);(0,G.useEffect)(function(){if(ye)return Re(),function(){return clearTimeout(B.current)}},[Re,b,Y,ye]);var Te=ye?function(){return clearTimeout(B==null?void 0:B.current)}:void 0,$e=ye?Re:void 0;return(0,r.jsxs)("div",{className:"Toast",onMouseEnter:Te,onMouseLeave:$e,children:[(0,r.jsx)("p",{className:"Toast__message",children:b}),ue&&(0,r.jsx)(S.V,{icon:ne.Tw,"aria-label":"close",type:"icon",onClick:Z,className:"close"})]})};function ju(o,b){var Z=Object.keys(o);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(o);b&&(X=X.filter(function(ue){return Object.getOwnPropertyDescriptor(o,ue).enumerable})),Z.push.apply(Z,X)}return Z}function Ou(o){for(var b=1;b<arguments.length;b++){var Z=arguments[b]!=null?arguments[b]:{};b%2?ju(Object(Z),!0).forEach(function(X){(0,K.Z)(o,X,Z[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(Z)):ju(Object(Z)).forEach(function(X){Object.defineProperty(o,X,Object.getOwnPropertyDescriptor(Z,X))})}return o}var Gs=(0,I.z)({name:"viewMode",viewMode:!0,trackEvent:{category:"canvas",predicate:function(o){return!o.viewModeEnabled}},perform:function(o,b){return{appState:Ou(Ou({},b),{},{viewModeEnabled:!this.checked(b)}),commitToHistory:!1}},checked:function(o){return o.viewModeEnabled},predicate:function(o,b,Z){return Z.viewModeEnabled===void 0},contextItemLabel:"labels.viewMode",keyTest:function(o){return!o[A.tW.CTRL_OR_CMD]&&o.altKey&&o.code===A.aU.R}}),Hl=t(4178),Cu=t(200),gf=t.n(Cu),Iu=t(3528),ra=t(5992),rl=t(8020),vf=t(4048),Xs=t(9672);function $s(o,b){var Z=Object.keys(o);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(o);b&&(X=X.filter(function(ue){return Object.getOwnPropertyDescriptor(o,ue).enumerable})),Z.push.apply(Z,X)}return Z}var Pu=(0,k.Z)(function o(b){var Z=this,X=b.scene,ue=b.onSceneUpdated;(0,v.Z)(this,o),this.onFontsLoaded=function(je){if(je.every(function(B){var ye="".concat(B.family,"-").concat(B.style,"-").concat(B.weight);return!!o.loadedFontFaces.has(ye)||(o.loadedFontFaces.add(ye),!1)}))return!1;var Y=!1;Z.scene.mapElements(function(B){return(0,te.iB)(B)&&!(0,H.Xh)(B)?(Ni.R.delete(B),Y=!0,(0,E.BE)(B,function(ye){for(var Re=1;Re<arguments.length;Re++){var Te=arguments[Re]!=null?arguments[Re]:{};Re%2?$s(Object(Te),!0).forEach(function($e){(0,K.Z)(ye,$e,Te[$e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ye,Object.getOwnPropertyDescriptors(Te)):$s(Object(Te)).forEach(function($e){Object.defineProperty(ye,$e,Object.getOwnPropertyDescriptor(Te,$e))})}return ye}({},(0,te.JZ)(B)))):B}),Y&&Z.onSceneUpdated()},this.loadFontsForElements=function(){var je=(0,l.Z)(m().mark(function Y(B){var ye;return m().wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return Re.next=2,Promise.all((0,f.Z)(new Set(B.filter(function(Te){return(0,te.iB)(Te)}).map(function(Te){return Te.fontFamily}))).map(function(Te){var $e,Qe,et,ft,gt=(0,h.mO)({fontFamily:Te,fontSize:16});if(($e=document.fonts)===null||$e===void 0||(Qe=$e.check)===null||Qe===void 0||!Qe.call($e,gt))return(et=document.fonts)===null||et===void 0||(ft=et.load)===null||ft===void 0?void 0:ft.call(et,gt)}));case 2:ye=Re.sent,Z.onFontsLoaded(ye.flat().filter(Boolean));case 4:case"end":return Re.stop()}},Y)}));return function(Y){return je.apply(this,arguments)}}(),this.scene=X,this.onSceneUpdated=ue});Pu.loadedFontFaces=new Set;var Fr=t(4682),Sr=t(6264),Mu=t(5047),ar=t(7652);function Tu(o,b){var Z=Object.keys(o);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(o);b&&(X=X.filter(function(ue){return Object.getOwnPropertyDescriptor(o,ue).enumerable})),Z.push.apply(Z,X)}return Z}function Xo(o){for(var b=1;b<arguments.length;b++){var Z=arguments[b]!=null?arguments[b]:{};b%2?Tu(Object(Z),!0).forEach(function(X){(0,K.Z)(o,X,Z[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(Z)):Tu(Object(Z)).forEach(function(X){Object.defineProperty(o,X,Object.getOwnPropertyDescriptor(Z,X))})}return o}var Du=function(o,b){var Z=b.scene.getSelectedElements(o);return Z.length===1&&Z[0].type==="frame"},bf=(0,I.z)({name:"selectAllElementsInFrame",trackEvent:{category:"canvas"},perform:function(o,b,Z,X){var ue=X.scene.getSelectedElements(b)[0];if(ue&&ue.type==="frame"){var je=(0,Fr.zD)((0,te.Lm)(o),ue.id).filter(function(Y){return!(Y.type==="text"&&Y.containerId)});return{elements:o,appState:Xo(Xo({},b),{},{selectedElementIds:je.reduce(function(Y,B){return Y[B.id]=!0,Y},{})}),commitToHistory:!1}}return{elements:o,appState:b,commitToHistory:!1}},contextItemLabel:"labels.selectAllElementsInFrame",predicate:function(o,b,Z,X){return Du(b,X)}}),yf=(0,I.z)({name:"removeAllElementsFromFrame",trackEvent:{category:"history"},perform:function(o,b,Z,X){var ue=X.scene.getSelectedElements(b)[0];return ue&&ue.type==="frame"?{elements:(0,Fr.yZ)(o,ue,b),appState:Xo(Xo({},b),{},{selectedElementIds:(0,K.Z)({},ue.id,!0)}),commitToHistory:!0}:{elements:o,appState:b,commitToHistory:!1}},contextItemLabel:"labels.removeAllElementsFromFrame",predicate:function(o,b,Z,X){return Du(b,X)}}),Au=((0,I.z)({name:"updateFrameRendering",viewMode:!0,trackEvent:{category:"canvas"},perform:function(o,b){return{elements:o,appState:Xo(Xo({},b),{},{frameRendering:Xo(Xo({},b.frameRendering),{},{enabled:!b.frameRendering.enabled})}),commitToHistory:!1}},contextItemLabel:"labels.updateFrameRendering",checked:function(o){return o.frameRendering.enabled}}),(0,I.z)({name:"setFrameAsActiveTool",trackEvent:{category:"toolbar"},perform:function(o,b,Z,X){var ue=(0,h.Om)(b,{type:"frame"});return(0,ar.Uk)(X.interactiveCanvas,Xo(Xo({},b),{},{activeTool:ue})),{elements:o,appState:Xo(Xo({},b),{},{activeTool:(0,h.Om)(b,{type:"frame"})}),commitToHistory:!1}},keyTest:function(o){return!o[A.tW.CTRL_OR_CMD]&&!o.shiftKey&&!o.altKey&&o.key.toLocaleLowerCase()===A.tW.F}}),t(6006)),xf=t(3506);function Lu(o,b){var Z=Object.keys(o);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(o);b&&(X=X.filter(function(ue){return Object.getOwnPropertyDescriptor(o,ue).enumerable})),Z.push.apply(Z,X)}return Z}function Zu(o){for(var b=1;b<arguments.length;b++){var Z=arguments[b]!=null?arguments[b]:{};b%2?Lu(Object(Z),!0).forEach(function(X){(0,K.Z)(o,X,Z[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(Z)):Lu(Object(Z)).forEach(function(X){Object.defineProperty(o,X,Object.getOwnPropertyDescriptor(Z,X))})}return o}function oi(o,b){var Z=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!Z){if(Array.isArray(o)||(Z=function(ye,Re){if(ye){if(typeof ye=="string")return ol(ye,Re);var Te=Object.prototype.toString.call(ye).slice(8,-1);if(Te==="Object"&&ye.constructor&&(Te=ye.constructor.name),Te==="Map"||Te==="Set")return Array.from(ye);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return ol(ye,Re)}}(o))||b){Z&&(o=Z);var X=0,ue=function(){};return{s:ue,n:function(){return X>=o.length?{done:!0}:{done:!1,value:o[X++]}},e:function(ye){throw ye},f:ue}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
58
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je,Y=!0,B=!1;return{s:function(){Z=Z.call(o)},n:function(){var ye=Z.next();return Y=ye.done,ye},e:function(ye){B=!0,je=ye},f:function(){try{Y||Z.return==null||Z.return()}finally{if(B)throw je}}}}function ol(o,b){(b==null||b>o.length)&&(b=o.length);for(var Z=0,X=new Array(b);Z<b;Z++)X[Z]=o[Z];return X}var _i=function(o){return 8/o},Yr=(0,k.Z)(function o(){(0,v.Z)(this,o)});Yr.referenceSnapPoints=null,Yr.visibleGaps=null,Yr.setReferenceSnapPoints=function(o){Yr.referenceSnapPoints=o},Yr.getReferenceSnapPoints=function(){return Yr.referenceSnapPoints},Yr.setVisibleGaps=function(o){Yr.visibleGaps=o},Yr.getVisibleGaps=function(){return Yr.visibleGaps},Yr.destroy=function(){Yr.referenceSnapPoints=null,Yr.visibleGaps=null};var ji=function(o){var b=o.event,Z=o.appState,X=o.selectedElements;return b?Z.objectsSnapModeEnabled&&!b[A.tW.CTRL_OR_CMD]||!Z.objectsSnapModeEnabled&&b[A.tW.CTRL_OR_CMD]&&Z.gridSize===null:(X.length!==1||X[0].type!=="arrow")&&Z.objectsSnapModeEnabled},il=function(o){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{omitCenter:!1,boundingBoxCorners:!1},Z=b.omitCenter,X=b.boundingBoxCorners,ue=b.dragOffset,je=[];if(o.length===1){var Y=o[0],B=(0,Ar.qf)(Y),ye=(0,j.Z)(B,6),Re=ye[0],Te=ye[1],$e=ye[2],Qe=ye[3],et=ye[4],ft=ye[5];ue&&(Re+=ue.x,$e+=ue.x,et+=ue.x,Te+=ue.y,Qe+=ue.y,ft+=ue.y);var gt=($e-Re)/2,vt=(Qe-Te)/2;if(Y.type!=="diamond"&&Y.type!=="ellipse"||X){var on=(0,ie.xj)([Re,Te],[et,ft],Y.angle),Rt=(0,ie.xj)([$e,Te],[et,ft],Y.angle),bt=(0,ie.xj)([Re,Qe],[et,ft],Y.angle),Mt=(0,ie.xj)([$e,Qe],[et,ft],Y.angle),Ht=[et,ft];je=Z?[on,Rt,bt,Mt]:[on,Rt,bt,Mt,Ht]}else{var an=(0,ie.xj)([Re,Te+vt],[et,ft],Y.angle),ln=(0,ie.xj)([Re+gt,Te],[et,ft],Y.angle),Bt=(0,ie.xj)([$e,Te+vt],[et,ft],Y.angle),Jt=(0,ie.xj)([Re+gt,Qe],[et,ft],Y.angle),Mn=[et,ft];je=Z?[an,ln,Bt,Jt]:[an,ln,Bt,Jt,Mn]}}else if(o.length>1){var Un=(0,Ar.hC)(o,ue??{x:0,y:0}),Qn=(0,j.Z)(Un,4),ir=Qn[0],mr=Qn[1],pr=Qn[2],Kn=Qn[3],yr=pr-ir,tr=Kn-mr,hr=[ir,mr],Mr=[pr,mr],Lr=[ir,Kn],Cr=[pr,Kn],Qr=[ir+yr/2,mr+tr/2];je=Z?[hr,Mr,Lr,Cr]:[hr,Mr,Lr,Cr,Qr]}return je.map(function(cr){return[Ve(cr[0]),Ve(cr[1])]})},Ru=function(o,b,Z){var X=b.filter(function(ue){return(0,H.He)(ue)}).map(function(ue){return ue.id});return(0,Sr.CF)(o,b,Z).filter(function(ue){return!(ue.frameId&&X.includes(ue.frameId))})},wf=function(o,b,Z){var X=Ru(o,b,Z),ue=(0,Ge.AI)(X).filter(function(tr){return!(tr.length===1&&(0,H.Xh)(tr[0]))}).map(function(tr){return(0,Ar.KP)(tr).map(function(hr){return Ve(hr)})}),je=ue.sort(function(tr,hr){return tr[0]-hr[0]}),Y=[],B=0;e:for(var ye=0;ye<je.length;ye++)for(var Re=je[ye],Te=ye+1;Te<je.length;Te++){if(++B>99999)break e;var $e=je[Te],Qe=(0,j.Z)(Re,4),et=Qe[1],ft=Qe[2],gt=Qe[3],vt=(0,j.Z)($e,4),on=vt[0],Rt=vt[1],bt=vt[3];ft<on&&(0,ie.ep)([et,gt],[Rt,bt])&&Y.push({startBounds:Re,endBounds:$e,startSide:[[ft,et],[ft,gt]],endSide:[[on,Rt],[on,bt]],length:on-ft,overlap:(0,ie.mW)([et,gt],[Rt,bt])})}var Mt=ue.sort(function(tr,hr){return tr[1]-hr[1]}),Ht=[];B=0;e:for(var an=0;an<Mt.length;an++)for(var ln=Mt[an],Bt=an+1;Bt<Mt.length;Bt++){if(++B>99999)break e;var Jt=Mt[Bt],Mn=(0,j.Z)(ln,4),Un=Mn[0],Qn=Mn[2],ir=Mn[3],mr=(0,j.Z)(Jt,3),pr=mr[0],Kn=mr[1],yr=mr[2];ir<Kn&&(0,ie.ep)([Un,Qn],[pr,yr])&&Ht.push({startBounds:ln,endBounds:Jt,startSide:[[Un,ir],[Qn,ir]],endSide:[[pr,Kn],[yr,Kn]],length:Kn-ir,overlap:(0,ie.mW)([Un,Qn],[pr,yr])})}return{horizontalGaps:Y,verticalGaps:Ht}},me=function(o,b,Z,X,ue,je,Y){if(!ji({appState:Z,event:X,selectedElements:o}))return[];if(o.length===0)return[];var B=Yr.getVisibleGaps();if(B){var ye,Re=B.horizontalGaps,Te=B.verticalGaps,$e=(0,Ar.hC)(o,b).map(function(Gr){return Ve(Gr)}),Qe=(0,j.Z)($e,4),et=Qe[0],ft=Qe[1],gt=Qe[2],vt=Qe[3],on=(et+gt)/2,Rt=(ft+vt)/2,bt=oi(Re);try{for(bt.s();!(ye=bt.n()).done;){var Mt=ye.value;if((0,ie.ep)([ft,vt],Mt.overlap)){var Ht=Mt.startSide[0][0]+Mt.length/2,an=Ve(Ht-on);if(Mt.length>gt-et&&Math.abs(an)<=Y.x){Math.abs(an)<Y.x&&(ue.length=0),Y.x=Math.abs(an);var ln={type:"gap",direction:"center_horizontal",gap:Mt,offset:an};ue.push(ln)}else{var Bt=et-(0,j.Z)(Mt.endBounds,3)[2],Jt=Ve(Mt.length-Bt);if(Math.abs(Jt)<=Y.x){Math.abs(Jt)<Y.x&&(ue.length=0),Y.x=Math.abs(Jt);var Mn={type:"gap",direction:"side_right",gap:Mt,offset:Jt};ue.push(Mn)}else{var Un=(0,j.Z)(Mt.startBounds,3)[0],Qn=Ve(Un-gt-Mt.length);if(Math.abs(Qn)<=Y.x){Math.abs(Qn)<Y.x&&(ue.length=0),Y.x=Math.abs(Qn);var ir={type:"gap",direction:"side_left",gap:Mt,offset:Qn};ue.push(ir)}}}}}}catch(Gr){bt.e(Gr)}finally{bt.f()}var mr,pr=oi(Te);try{for(pr.s();!(mr=pr.n()).done;){var Kn=mr.value;if((0,ie.ep)([et,gt],Kn.overlap)){var yr=Kn.startSide[0][1]+Kn.length/2,tr=Ve(yr-Rt);if(Kn.length>vt-ft&&Math.abs(tr)<=Y.y){Math.abs(tr)<Y.y&&(je.length=0),Y.y=Math.abs(tr);var hr={type:"gap",direction:"center_vertical",gap:Kn,offset:tr};je.push(hr)}else{var Mr=(0,j.Z)(Kn.startBounds,3)[1],Lr=Ve(Mr-vt-Kn.length);if(Math.abs(Lr)<=Y.y){Math.abs(Lr)<Y.y&&(je.length=0),Y.y=Math.abs(Lr);var Cr={type:"gap",direction:"side_top",gap:Kn,offset:Lr};je.push(Cr)}else{var Qr=(0,j.Z)(Kn.endBounds,4)[3],cr=Ve(ft-Qr),kr=Kn.length-cr;if(Math.abs(kr)<=Y.y){Math.abs(kr)<Y.y&&(je.length=0),Y.y=Math.abs(kr);var vo={type:"gap",direction:"side_bottom",gap:Kn,offset:kr};je.push(vo)}}}}}}catch(Gr){pr.e(Gr)}finally{pr.f()}}},Fe=function(o,b,Z){var X=Ru(o,b,Z);return(0,Ge.AI)(X).filter(function(ue){return!(ue.length===1&&(0,H.Xh)(ue[0]))}).flatMap(function(ue){return il(ue)})},He=function(o,b,Z,X,ue,je,Y){if(!ji({appState:Z,event:X,selectedElements:o})||o.length===0&&b.length===0)return[];var B=Yr.getReferenceSnapPoints();if(B){var ye,Re=oi(b);try{for(Re.s();!(ye=Re.n()).done;){var Te,$e=ye.value,Qe=oi(B);try{for(Qe.s();!(Te=Qe.n()).done;){var et=Te.value,ft=et[0]-$e[0],gt=et[1]-$e[1];Math.abs(ft)<=Y.x&&(Math.abs(ft)<Y.x&&(ue.length=0),ue.push({type:"point",points:[$e,et],offset:ft}),Y.x=Math.abs(ft)),Math.abs(gt)<=Y.y&&(Math.abs(gt)<Y.y&&(je.length=0),je.push({type:"point",points:[$e,et],offset:gt}),Y.y=Math.abs(gt))}}catch(vt){Qe.e(vt)}finally{Qe.f()}}}catch(vt){Re.e(vt)}finally{Re.f()}}},Ve=function(o){return Math.round(o*Math.pow(10,6))/Math.pow(10,6)},rt=function(o){var b,Z=new Map,X=oi(o);try{for(X.s();!(b=X.n()).done;){var ue=b.value,je=ue.join(",");Z.has(je)||Z.set(je,ue)}}catch(Y){X.e(Y)}finally{X.f()}return Array.from(Z.values())},st=function(o,b){var Z={},X={};if(o.length>0){var ue,je=oi(o);try{for(je.s();!(ue=je.n()).done;){var Y=ue.value;if(Y.type==="point"){var B,ye=Ve(Y.points[0][0]);Z[ye]||(Z[ye]=[]),(B=Z[ye]).push.apply(B,(0,f.Z)(Y.points.map(function(ft){return[Ve(ft[0]),Ve(ft[1])]})))}}}catch(ft){je.e(ft)}finally{je.f()}}if(b.length>0){var Re,Te=oi(b);try{for(Te.s();!(Re=Te.n()).done;){var $e=Re.value;if($e.type==="point"){var Qe,et=Ve($e.points[0][1]);X[et]||(X[et]=[]),(Qe=X[et]).push.apply(Qe,(0,f.Z)($e.points.map(function(ft){return[Ve(ft[0]),Ve(ft[1])]})))}}}catch(ft){Te.e(ft)}finally{Te.f()}}return Object.entries(Z).map(function(ft){var gt=(0,j.Z)(ft,2),vt=gt[0],on=gt[1];return{type:"points",points:rt(on.map(function(Rt){return[Number(vt),Rt[1]]}).sort(function(Rt,bt){return Rt[1]-bt[1]}))}}).concat(Object.entries(X).map(function(ft){var gt=(0,j.Z)(ft,2),vt=gt[0],on=gt[1];return{type:"points",points:rt(on.map(function(Rt){return[Rt[0],Number(vt)]}).sort(function(Rt,bt){return Rt[0]-bt[0]}))}}))},pt=function(o,b,Z){var X,ue=(0,Ar.hC)(o,b),je=(0,j.Z)(ue,4),Y=je[0],B=je[1],ye=je[2],Re=je[3],Te=[],$e=oi(Z);try{for($e.s();!(X=$e.n()).done;){var Qe=X.value,et=(0,j.Z)(Qe.gap.startBounds,4),ft=et[0],gt=et[1],vt=et[2],on=et[3],Rt=(0,j.Z)(Qe.gap.endBounds,4),bt=Rt[0],Mt=Rt[1],Ht=Rt[2],an=Rt[3],ln=(0,ie.mW)([B,Re],Qe.gap.overlap),Bt=(0,ie.mW)([Y,ye],Qe.gap.overlap);switch(Qe.direction){case"center_horizontal":if(ln){var Jt=(ln[0]+ln[1])/2;Te.push({type:"gap",direction:"horizontal",points:[[Qe.gap.startSide[0][0],Jt],[Y,Jt]]},{type:"gap",direction:"horizontal",points:[[ye,Jt],[Qe.gap.endSide[0][0],Jt]]})}break;case"center_vertical":if(Bt){var Mn=(Bt[0]+Bt[1])/2;Te.push({type:"gap",direction:"vertical",points:[[Mn,Qe.gap.startSide[0][1]],[Mn,B]]},{type:"gap",direction:"vertical",points:[[Mn,Re],[Mn,Qe.gap.endSide[0][1]]]})}break;case"side_right":if(ln){var Un=(ln[0]+ln[1])/2;Te.push({type:"gap",direction:"horizontal",points:[[vt,Un],[bt,Un]]},{type:"gap",direction:"horizontal",points:[[Ht,Un],[Y,Un]]})}break;case"side_left":if(ln){var Qn=(ln[0]+ln[1])/2;Te.push({type:"gap",direction:"horizontal",points:[[ye,Qn],[ft,Qn]]},{type:"gap",direction:"horizontal",points:[[vt,Qn],[bt,Qn]]})}break;case"side_top":if(Bt){var ir=(Bt[0]+Bt[1])/2;Te.push({type:"gap",direction:"vertical",points:[[ir,Re],[ir,gt]]},{type:"gap",direction:"vertical",points:[[ir,on],[ir,Mt]]})}break;case"side_bottom":if(Bt){var mr=(Bt[0]+Bt[1])/2;Te.push({type:"gap",direction:"vertical",points:[[mr,on],[mr,Mt]]},{type:"gap",direction:"vertical",points:[[mr,an],[mr,B]]})}}}}catch(pr){$e.e(pr)}finally{$e.f()}return function(pr){var Kn,yr=new Map,tr=oi(pr);try{for(tr.s();!(Kn=tr.n()).done;){var hr=Kn.value,Mr=hr.points.flat().map(function(Lr){return[Ve(Lr)]}).join(",");yr.has(Mr)||yr.set(Mr,hr)}}catch(Lr){tr.e(Lr)}finally{tr.f()}return Array.from(yr.values())}(Te.map(function(pr){return Zu(Zu({},pr),{},{points:pr.points.map(function(Kn){return[Ve(Kn[0]),Ve(Kn[1])]})})}))},at=function(o,b,Z,X,ue,je){var Y,B,ye,Re;if(!ji({event:X,selectedElements:o,appState:Z})||o.length===0||o.length===1&&!function(Qn,ir){var mr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:.01;return Math.abs(Qn-ir)<=mr}(o[0].angle,0))return{snapOffset:{x:0,y:0},snapLines:[]};var Te=(0,Ar.KP)(b),$e=(0,j.Z)(Te,4),Qe=$e[0],et=$e[1],ft=$e[2],gt=$e[3];je&&(je.includes("e")?ft+=ue.x:je.includes("w")&&(Qe+=ue.x),je.includes("n")?et+=ue.y:je.includes("s")&&(gt+=ue.y));var vt=[];if(je)switch(je){case"e":vt.push([ft,et],[ft,gt]);break;case"w":vt.push([Qe,et],[Qe,gt]);break;case"n":vt.push([Qe,et],[ft,et]);break;case"s":vt.push([Qe,gt],[ft,gt]);break;case"ne":vt.push([ft,et]);break;case"nw":vt.push([Qe,et]);break;case"se":vt.push([ft,gt]);break;case"sw":vt.push([Qe,gt])}var on=_i(Z.zoom.value),Rt={x:on,y:on},bt=[],Mt=[];He(b,vt,Z,X,bt,Mt,Rt);var Ht={x:(Y=(B=bt[0])===null||B===void 0?void 0:B.offset)!==null&&Y!==void 0?Y:0,y:(ye=(Re=Mt[0])===null||Re===void 0?void 0:Re.offset)!==null&&ye!==void 0?ye:0};Rt.x=0,Rt.y=0,bt.length=0,Mt.length=0;var an=(0,Ar.KP)(o).map(function(Qn){return Ve(Qn)}),ln=(0,j.Z)(an,4),Bt=ln[0],Jt=ln[1],Mn=ln[2],Un=ln[3];return He(o,[[Bt,Jt],[Bt,Un],[Mn,Jt],[Mn,Un]],Z,X,bt,Mt,Rt),{snapOffset:Ht,snapLines:st(bt,Mt)}},Wt=t(7392),dn=t(9247),qt=function(){return(0,r.jsxs)("div",{"data-testid":"brave-measure-text-error",children:[(0,r.jsx)("p",{children:(0,r.jsx)(dn.Z,{i18nKey:"errors.brave_measure_text_error.line1",bold:function(o){return(0,r.jsx)("span",{style:{fontWeight:600},children:o})}})}),(0,r.jsx)("p",{children:(0,r.jsx)(dn.Z,{i18nKey:"errors.brave_measure_text_error.line2",bold:function(o){return(0,r.jsx)("span",{style:{fontWeight:600},children:o})}})}),(0,r.jsx)("p",{children:(0,r.jsx)(dn.Z,{i18nKey:"errors.brave_measure_text_error.line3",link:function(o){return(0,r.jsx)("a",{href:"http://docs.excalidraw.com/docs/@excalidraw/excalidraw/faq#turning-off-aggresive-block-fingerprinting-in-brave-browser",children:o})}})}),(0,r.jsx)("p",{children:(0,r.jsx)(dn.Z,{i18nKey:"errors.brave_measure_text_error.line4",issueLink:function(o){return(0,r.jsx)("a",{href:"https://github.com/excalidraw/excalidraw/issues/new",children:o})},discordLink:function(o){return(0,r.jsxs)("a",{href:"https://discord.gg/UexuTaE",children:[o,"."]})}})})]})},Dt=t(6199),gn=t(7766),Qt=function(o){var b=(0,G.useRef)(!1);return(0,G.useEffect)(function(){var Z;if(b.current){var X={},ue={},je={},Y={},B={};o.appState.collaborators.forEach(function(Re,Te){if(Re.selectedElementIds)for(var $e=0,Qe=Object.keys(Re.selectedElementIds);$e<Qe.length;$e++){var et=Qe[$e];et in je||(je[et]=[]),je[et].push(Te)}Re.pointer&&(Re.username&&(Y[Te]=Re.username),Re.userState&&(B[Te]=Re.userState),ue[Te]=(0,h._i)({sceneX:Re.pointer.x,sceneY:Re.pointer.y},o.appState),X[Te]=Re.button)});var ye=((Z=o.containerRef)===null||Z===void 0?void 0:Z.current)&&getComputedStyle(o.containerRef.current).getPropertyValue("--color-selection")||"#6965db";(0,gn.tp)({canvas:o.canvas,elements:o.elements,visibleElements:o.visibleElements,selectedElements:o.selectedElements,scale:window.devicePixelRatio,appState:o.appState,renderConfig:{remotePointerViewportCoords:ue,remotePointerButton:X,remoteSelectedElementIds:je,remotePointerUsernames:Y,remotePointerUserStates:B,selectionColor:ye,renderScrollbars:!1},callback:o.renderInteractiveSceneCallback},(0,h.G9)())}else b.current=!0}),(0,r.jsx)("canvas",{className:"excalidraw__canvas interactive",style:{width:o.appState.width,height:o.appState.height,cursor:o.appState.viewModeEnabled?y.oc.GRAB:y.oc.AUTO},width:o.appState.width*o.scale,height:o.appState.height*o.scale,ref:o.handleCanvasRef,onContextMenu:o.onContextMenu,onPointerMove:o.onPointerMove,onPointerUp:o.onPointerUp,onPointerCancel:o.onPointerCancel,onTouchMove:o.onTouchMove,onPointerDown:o.onPointerDown,onDoubleClick:o.appState.viewModeEnabled?void 0:o.onDoubleClick,children:(0,z.t)("labels.drawingCanvas")})},bn=function(o){return{zoom:o.zoom,scrollX:o.scrollX,scrollY:o.scrollY,width:o.width,height:o.height,viewModeEnabled:o.viewModeEnabled,editingGroupId:o.editingGroupId,editingLinearElement:o.editingLinearElement,selectedElementIds:o.selectedElementIds,frameToHighlight:o.frameToHighlight,offsetLeft:o.offsetLeft,offsetTop:o.offsetTop,theme:o.theme,pendingImageElementId:o.pendingImageElementId,selectionElement:o.selectionElement,selectedGroupIds:o.selectedGroupIds,selectedLinearElement:o.selectedLinearElement,multiElement:o.multiElement,isBindingEnabled:o.isBindingEnabled,suggestedBindings:o.suggestedBindings,isRotating:o.isRotating,elementsToHighlight:o.elementsToHighlight,openSidebar:o.openSidebar,showHyperlinkPopup:o.showHyperlinkPopup,collaborators:o.collaborators,activeEmbeddable:o.activeEmbeddable,snapLines:o.snapLines,zenModeEnabled:o.zenModeEnabled}},Kt=function(o,b){return o.selectionNonce===b.selectionNonce&&o.versionNonce===b.versionNonce&&o.scale===b.scale&&o.elements===b.elements&&o.visibleElements===b.visibleElements&&o.selectedElements===b.selectedElements&&(0,h.w8)(bn(o.appState),bn(b.appState))},pn=he().memo(Qt,Kt),On=function(o){var b=(0,G.useRef)(null),Z=(0,G.useRef)(!1);return(0,G.useEffect)(function(){var X=b.current;if(X){var ue=o.canvas;Z.current||(Z.current=!0,X.replaceChildren(ue),ue.classList.add("excalidraw__canvas","static"));var je="".concat(o.appState.width,"px"),Y="".concat(o.appState.height,"px");ue.style.width!==je&&(ue.style.width=je),ue.style.height!==Y&&(ue.style.height=Y);var B=o.appState.width*o.scale,ye=o.appState.height*o.scale;ue.width!==B&&(ue.width=B),ue.height!==ye&&(ue.height=ye),(0,gn.AW)({canvas:ue,rc:o.rc,scale:o.scale,elements:o.elements,visibleElements:o.visibleElements,appState:o.appState,renderConfig:o.renderConfig},(0,h.G9)())}}),(0,r.jsx)("div",{className:"excalidraw__canvas-wrapper",ref:b})},Ln=function(o){return{zoom:o.zoom,scrollX:o.scrollX,scrollY:o.scrollY,width:o.width,height:o.height,viewModeEnabled:o.viewModeEnabled,offsetLeft:o.offsetLeft,offsetTop:o.offsetTop,theme:o.theme,pendingImageElementId:o.pendingImageElementId,shouldCacheIgnoreZoom:o.shouldCacheIgnoreZoom,viewBackgroundColor:o.viewBackgroundColor,exportScale:o.exportScale,selectedElementsAreBeingDragged:o.selectedElementsAreBeingDragged,gridSize:o.gridSize,frameRendering:o.frameRendering,selectedElementIds:o.selectedElementIds,frameToHighlight:o.frameToHighlight,editingGroupId:o.editingGroupId}},Zn=function(o,b){return o.versionNonce===b.versionNonce&&o.scale===b.scale&&o.elements===b.elements&&o.visibleElements===b.visibleElements&&(0,h.w8)(Ln(o.appState),Ln(b.appState))&&(0,h.w8)(o.renderConfig,b.renderConfig)},_n=he().memo(On,Zn),Gn=function(){function o(b){var Z=this;(0,v.Z)(this,o),this.getRenderableElements=(0,h.HP)(function(X){var ue=X.zoom,je=X.offsetLeft,Y=X.offsetTop,B=X.scrollX,ye=X.scrollY,Re=X.height,Te=X.width,$e=X.editingElement,Qe=X.pendingImageElementId,et=(X.versionNonce,function(gt){var vt=gt.editingElement,on=gt.elements,Rt=gt.pendingImageElementId;return on.filter(function(bt){return!((0,H.pC)(bt)&&Rt===bt.id||vt&&vt.type==="text"&&bt.id===vt.id)})}({elements:Z.scene.getNonDeletedElements(),editingElement:$e,pendingImageElementId:Qe})),ft=function(gt){var vt=gt.elements,on=gt.zoom,Rt=gt.offsetLeft,bt=gt.offsetTop,Mt=gt.scrollX,Ht=gt.scrollY,an=gt.height,ln=gt.width;return vt.filter(function(Bt){return(0,Ae.PZ)(Bt,ln,an,{zoom:on,offsetLeft:Rt,offsetTop:bt,scrollX:Mt,scrollY:Ht})})}({elements:et,zoom:ue,offsetLeft:je,offsetTop:Y,scrollX:B,scrollY:ye,height:Re,width:Te});return{canvasElements:et,visibleElements:ft}}),this.scene=b}return(0,k.Z)(o,[{key:"destroy",value:function(){(0,gn.n_)(),this.getRenderableElements.clear()}}]),o}(),lr=t(8806),dr=t(4864),Wn=t(8531),or=t(5830),sr={};sr.styleTagTransform=nt(),sr.setAttributes=We(),sr.insert=_e().bind(null,"head"),sr.domAPI=se(),sr.insertStyleElement=Ze(),re()(or.Z,sr),or.Z&&or.Z.locals&&or.Z.locals;var fr="mermaid-to-excalidraw",Ir=function(o){var b=o.error;return(0,r.jsxs)("div",{"data-testid":"mermaid-error",className:"mermaid-error",children:["Error! ",(0,r.jsx)("p",{children:b})]})},wr=function(){var o=(0,G.useState)({loaded:!1,api:null}),b=(0,j.Z)(o,2),Z=b[0],X=b[1],ue=(0,G.useState)(""),je=(0,j.Z)(ue,2),Y=je[0],B=je[1],ye=(0,G.useDeferredValue)(Y.trim()),Re=(0,G.useState)(null),Te=(0,j.Z)(Re,2),$e=Te[0],Qe=Te[1],et=(0,G.useRef)(null),ft=(0,G.useRef)({elements:[],files:null}),gt=Cf(),vt=function(){var Rt=et.current;if(Rt){var bt=Rt.parentElement;bt&&(bt.style.background="",Qe(null),Rt.replaceChildren())}};(0,G.useEffect)(function(){var Rt=function(){var bt=(0,l.Z)(m().mark(function Mt(){var Ht;return m().wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return an.next=2,t.e(4736).then(t.bind(t,1049));case 2:Ht=an.sent,X({loaded:!0,api:Ht});case 4:case"end":return an.stop()}},Mt)}));return function(){return bt.apply(this,arguments)}}();Rt()},[]),(0,G.useEffect)(function(){var Rt=function(){try{var bt=localStorage.getItem(fr);if(bt)return bt}catch(Mt){console.error(Mt)}return null}()||`flowchart TD
|
|
59
|
+
A[Christmas] -->|Get money| B(Go shopping)
|
|
60
|
+
B --> C{Let me think}
|
|
61
|
+
C -->|One| D[Laptop]
|
|
62
|
+
C -->|Two| E[iPhone]
|
|
63
|
+
C -->|Three| F[Car]`;B(Rt)},[]),(0,G.useEffect)(function(){var Rt=function(){var bt=(0,l.Z)(m().mark(function Mt(){var Ht,an,ln,Bt,Jt,Mn;return m().wrap(function(Un){for(;;)switch(Un.prev=Un.next){case 0:if(Ht=et.current,an=Ht==null?void 0:Ht.parentElement,Z.loaded&&Ht&&an&&Z.api){Un.next=4;break}return Un.abrupt("return");case 4:if(ye){Un.next=7;break}return vt(),Un.abrupt("return");case 7:return Un.prev=7,Un.next=10,Z.api.parseMermaidToExcalidraw(ye,{fontSize:y.n5});case 10:return ln=Un.sent,Bt=ln.elements,Jt=ln.files,Qe(null),ft.current={elements:(0,dr.wc)(Bt,{regenerateIds:!0}),files:Jt},Un.next=17,(0,dr.NL)({elements:ft.current.elements,files:ft.current.files,exportPadding:y.qy,maxWidthOrHeight:Math.max(an.offsetWidth,an.offsetHeight)*window.devicePixelRatio});case 17:return Mn=Un.sent,Un.next=20,(0,Ft._c)(Mn);case 20:an.style.background="var(--default-bg-color)",Ht.replaceChildren(Mn),Un.next=28;break;case 24:Un.prev=24,Un.t0=Un.catch(7),an.style.background="var(--default-bg-color)",ye&&Qe(Un.t0.message);case 28:case"end":return Un.stop()}},Mt,null,[[7,24]])}));return function(){return bt.apply(this,arguments)}}();Rt()},[ye,Z]);var on=function(){gt.setOpenDialog(null),function(Rt){try{localStorage.setItem(fr,Rt)}catch(bt){console.error(bt)}}(Y)};return(0,r.jsx)(Nt.V,{className:"dialog-mermaid",onCloseRequest:on,size:1200,title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"dialog-mermaid-title",children:(0,z.t)("mermaid.title")}),(0,r.jsxs)("span",{className:"dialog-mermaid-desc",children:[(0,r.jsx)(dn.Z,{i18nKey:"mermaid.description",flowchartLink:function(Rt){return(0,r.jsx)("a",{href:"https://mermaid.js.org/syntax/flowchart.html",children:Rt})},sequenceLink:function(Rt){return(0,r.jsx)("a",{href:"https://mermaid.js.org/syntax/sequenceDiagram.html",children:Rt})}}),(0,r.jsx)("br",{})]})]}),children:(0,r.jsxs)("div",{className:"dialog-mermaid-body",children:[(0,r.jsxs)("div",{className:"dialog-mermaid-panels",children:[(0,r.jsxs)("div",{className:"dialog-mermaid-panels-text",children:[(0,r.jsx)("label",{children:(0,z.t)("mermaid.syntax")}),(0,r.jsx)("textarea",{onChange:function(Rt){return B(Rt.target.value)},value:Y})]}),(0,r.jsxs)("div",{className:"dialog-mermaid-panels-preview",children:[(0,r.jsx)("label",{children:(0,z.t)("mermaid.preview")}),(0,r.jsxs)("div",{className:"dialog-mermaid-panels-preview-wrapper",children:[$e&&(0,r.jsx)(Ir,{error:$e}),Z.loaded?(0,r.jsx)("div",{ref:et,style:{opacity:$e?"0.15":1},className:"dialog-mermaid-panels-preview-canvas-container"}):(0,r.jsx)(Wn.Z,{size:"2rem"})]})]})]}),(0,r.jsx)("div",{className:"dialog-mermaid-buttons",children:(0,r.jsxs)(lr.z,{className:"dialog-mermaid-insert",onSelect:function(){var Rt=ft.current,bt=Rt.elements,Mt=Rt.files;gt.addElementsFromPasteOrLibrary({elements:bt,files:Mt,position:"center",fitToContent:!0}),on()},children:[(0,z.t)("mermaid.button"),(0,r.jsx)("span",{children:ne.LZ})]})})]})})},Hr=t(7930),zr={};zr.styleTagTransform=nt(),zr.setAttributes=We(),zr.insert=_e().bind(null,"head"),zr.domAPI=se(),zr.insertStyleElement=Ze(),re()(Hr.Z,zr),Hr.Z&&Hr.Z.locals&&Hr.Z.locals;var Oi=function(o){var b=o.manager,Z=(0,G.useRef)(null);return(0,G.useEffect)(function(){return Z.current&&b.start(Z.current),function(){b.stop()}},[b]),(0,r.jsx)("div",{className:"LaserToolOverlay",children:(0,r.jsx)("svg",{ref:Z,className:"LaserToolOverlayCanvas"})})},Eo,Bi,oa,gi;function Wr([o,b,Z],[X,ue,je]){return[o+X,b+ue,Z+je]}function Fi([o,b,Z],[X,ue,je]){return[o-X,b-ue,Z-je]}function qr([o,b,Z],X){return[o*X,b*X,Z*X]}function ii([o,b,Z]){return[o/Math.sqrt(o**2+b**2),b/Math.sqrt(o**2+b**2),Z]}function co([o,b,Z],X){return[Math.cos(X)*o-Math.sin(X)*b,Math.sin(X)*o+Math.cos(X)*b,Z]}function Wl(o,b,Z){return Math.atan2(Z[1]-o[1],Z[0]-o[0])-Math.atan2(b[1]-o[1],b[0]-o[0])}function Ci(o){return Math.atan2(Math.sin(o),Math.cos(o))}function Ul([o,b]){return Math.sqrt(o**2+b**2)}function ai([o,b],[Z,X]){return Math.sqrt((Z-o)**2+(X-b)**2)}Eo={},Bi="LaserPointer",oa=()=>ia,Object.defineProperty(Eo,Bi,{get:oa,set:gi,enumerable:!0,configurable:!0});function zu(o,b,Z){const X=ai(b,Z);if(X===0)return ai(o,b);const ue=((je,Y,B)=>Math.max(Y,Math.min(B,je)))(((o[0]-b[0])*(Z[0]-b[0])+(o[1]-b[1])*(Z[1]-b[1]))/X**2,0,1);return ai([b[0]+ue*(Z[0]-b[0]),b[1]+ue*(Z[1]-b[1]),o[2]],o)}function Kl(o,b){if(b===0||o.length<=2)return o;const Z=o[0],X=o[o.length-1],[ue,je]=o.reduce(([Y,B],ye,Re)=>{const Te=zu(ye,Z,X);return Te>Y?[Te,Re]:[Y,B]},[0,-1]);if(ue>=b){const Y=o[je];return[...Kl([Z,...o.slice(1,je),Y],b).slice(0,-1),Y,...Kl([Y,...o.slice(je,-1),X],b).slice(1)]}return[Z,X]}const Wi=class Wi{constructor(b){this.originalPoints=[],this.stablePoints=[],this.tailPoints=[],this.isFresh=!0,this.options=Object.assign({},Wi.defaults,b)}get lastPoint(){return this.tailPoints[this.tailPoints.length-1]??this.stablePoints[this.stablePoints.length-1]}addPoint(b){const Z=this.originalPoints[this.originalPoints.length-1];if(!Z||Z[0]!==b[0]||Z[1]!==b[1]){if(this.originalPoints.push(b),this.isFresh)return this.isFresh=!1,void this.stablePoints.push(b);var X,ue,je;this.options.streamline>0&&(X=this.lastPoint,ue=b,je=1-this.options.streamline,b=Wr(X,qr(Fi(ue,X),je))),this.tailPoints.push(b),function(Y){if(Y.length<2)return 0;let B=0;for(let ye=1;ye<=Y.length-1;ye++)B+=ai(Y[ye-1],Y[ye]);return B+=ai(Y[Y.length-2],Y[Y.length-1]),B}(this.tailPoints)>Wi.constants.maxTailLength&&this.stabilizeTail()}}close(){this.stabilizeTail()}stabilizeTail(){if(this.options.simplify>0&&this.options.simplifyPhase=="tail")throw new Error("Not implemented yet");this.stablePoints.push(...this.tailPoints),this.tailPoints=[]}getSize(b,Z,X,ue,je){return(b??this.options.size)*this.options.sizeMapping({pressure:Z,runningLength:je,currentIndex:X,totalLength:ue})}getStrokeOutline(b){if(this.isFresh)return[];let Z=[...this.stablePoints,...this.tailPoints];this.options.simplify>0&&this.options.simplifyPhase==="input"&&(Z=Kl(Z,this.options.simplify));const X=Z.length;if(X===0)return[];if(X===1){const ln=Z[0],Bt=[];for(let Jt=0;Jt<=2*Math.PI;Jt+=Math.PI/16)Bt.push(Wr(ln,qr(co([1,0,0],Jt),this.getSize(b,ln[2],0,X,0))));return Bt.push(Wr(ln,qr([1,0,0],this.getSize(b,ln[2],0,X,0)))),Bt}if(X===2){const ln=Z[0],Bt=Z[1],Jt=[],Mn=Wl(ln,[ln[0],ln[1]-100,ln[2]],Bt);for(let Un=Mn;Un<=Math.PI+Mn;Un+=Math.PI/16)Jt.push(Wr(ln,qr(co([1,0,0],Un),this.getSize(b,ln[2],0,X,0))));for(let Un=Math.PI+Mn;Un<=2*Math.PI+Mn;Un+=Math.PI/16)Jt.push(Wr(Bt,qr(co([1,0,0],Un),this.getSize(b,Bt[2],0,X,0))));return Jt.push(Jt[0]),Jt}const ue=[],je=[];let Y=0,B=0,ye=0,Re=0;for(let ln=1;ln<X-1;ln++){const Bt=Z[ln-1],Jt=Z[ln],Mn=Z[ln+1];let Un=Jt[2];const Qn=ai(Bt,Jt);Re+=Qn,Y=B+.2*(Qn-B);const ir=this.getSize(b,Un,ln,X,Re);if(ir===0){ye=ln+1;continue}const mr=ii(Fi(Bt,Jt)),pr=ii(Fi(Mn,Jt)),Kn=co(mr,Math.PI/2),yr=co(mr,-Math.PI/2),tr=co(pr,Math.PI/2),hr=co(pr,-Math.PI/2),Mr=Wr(Jt,qr(Kn,ir)),Lr=Wr(Jt,qr(yr,ir)),Cr=Wr(Jt,qr(tr,ir)),Qr=Wr(Jt,qr(hr,ir)),cr=Wr(Kn,hr),kr=Wr(yr,tr),vo=Wr(Jt,qr(Ul(cr)===0?mr:ii(cr),ir)),Gr=Wr(Jt,qr(Ul(kr)===0?pr:ii(kr),ir)),bo=Ci(Wl(Jt,Bt,Mn)),Tr=Wi.constants.cornerDetectionMaxAngle/180*Math.PI*Wi.constants.cornerDetectionVariance(Y);if(Math.abs(bo)<Tr){const uo=Math.abs(Ci(Math.PI-bo));if(uo===0)continue;if(bo<0){je.push(Lr,Gr);for(let Jr=0;Jr<=uo;Jr+=uo/4)ue.push(Wr(Jt,co(qr(Kn,ir),Jr)));for(let Jr=uo;Jr>=0;Jr-=uo/4)je.push(Wr(Jt,co(qr(Kn,ir),Jr)));je.push(Gr,Cr)}else{ue.push(Mr,vo);for(let Jr=0;Jr<=uo;Jr+=uo/4)je.push(Wr(Jt,co(qr(Kn,-ir),-Jr)));for(let Jr=uo;Jr>=0;Jr-=uo/4)ue.push(Wr(Jt,co(qr(Kn,-ir),-Jr)));ue.push(vo,Qr)}}else ue.push(vo),je.push(Gr);B=Y}const Te=Z[ye],$e=Z[ye+1],Qe=Z[X-2],et=Z[X-1];if(ye>=X-2)return[];const ft=ii(Fi($e,Te)),gt=ii(Fi(Qe,et)),vt=co(ft,-Math.PI/2),on=co(gt,Math.PI/2),Rt=this.getSize(b,Te[2],0,X,0),bt=[],Mt=this.getSize(b,Qe[2],X-2,X,Re),Ht=[];for(let ln=0;ln<=Math.PI;ln+=Math.PI/16)bt.unshift(Wr(Te,co(qr(vt,Rt),-ln)));bt.unshift(Wr(Te,qr(vt,-Rt)));for(let ln=0;ln<=Math.PI;ln+=Math.PI/16)Ht.push(Wr(et,co(qr(on,-Mt),-ln)));const an=[...bt,...ue,...Ht.reverse(),...je.reverse()];return bt.length>0&&an.push(bt[0]),this.options.simplify>0&&this.options.simplifyPhase==="output"?Kl(an,this.options.simplify):an}};Rf=new WeakMap,zf=new WeakMap,Kf(Wi,Rf,(()=>{Wi.defaults={size:2,streamline:.45,simplify:.1,simplifyPhase:"output",sizeMapping:()=>1}})()),Kf(Wi,zf,(()=>{Wi.constants={cornerDetectionMaxAngle:120,cornerDetectionVariance:b=>b>35?.5:1,maxTailLength:50}})());let ia=Wi;var kf=t(957);function Nu(o,b){var Z=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!Z){if(Array.isArray(o)||(Z=function(ye,Re){if(ye){if(typeof ye=="string")return Bu(ye,Re);var Te=Object.prototype.toString.call(ye).slice(8,-1);if(Te==="Object"&&ye.constructor&&(Te=ye.constructor.name),Te==="Map"||Te==="Set")return Array.from(ye);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return Bu(ye,Re)}}(o))||b){Z&&(o=Z);var X=0,ue=function(){};return{s:ue,n:function(){return X>=o.length?{done:!0}:{done:!1,value:o[X++]}},e:function(ye){throw ye},f:ue}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
64
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je,Y=!0,B=!1;return{s:function(){Z=Z.call(o)},n:function(){var ye=Z.next();return Y=ye.done,ye},e:function(ye){B=!0,je=ye},f:function(){try{Y||Z.return==null||Z.return()}finally{if(B)throw je}}}}function Bu(o,b){(b==null||b>o.length)&&(b=o.length);for(var Z=0,X=new Array(b);Z<b;Z++)X[Z]=o[Z];return X}var Fu=1e3,Vl=function(o,b){return(o+b)/2};function Hu(o){return 1-Math.pow(1-o,3)}function Hi(){return{currentPath:void 0,finishedPaths:[],lastPoint:[-1e4,-1e4],svg:document.createElementNS("http://www.w3.org/2000/svg","path")}}function Ma(){return ia.constants.cornerDetectionMaxAngle=70,new ia({simplify:0,streamline:.4,sizeMapping:function(o){var b=Math.max(0,1-(performance.now()-o.pressure)/1e3),Z=(50-Math.min(50,o.totalLength-o.currentIndex))/50;return Math.min(Hu(Z),Hu(b))}})}var Wu=function(){function o(b){(0,v.Z)(this,o),this.app=b,this.collaboratorsState=new Map,this.isDrawing=!1,this.isRunning=!1,this.ownState=Hi()}return(0,k.Z)(o,[{key:"destroy",value:function(){this.stop(),this.isDrawing=!1,this.ownState=Hi(),this.collaboratorsState=new Map}},{key:"startPath",value:function(b,Z){this.ownState.currentPath=Ma(),this.ownState.currentPath.addPoint([b,Z,performance.now()]),this.updatePath(this.ownState)}},{key:"addPointToPath",value:function(b,Z){var X;this.ownState.currentPath&&((X=this.ownState.currentPath)===null||X===void 0||X.addPoint([b,Z,performance.now()]),this.updatePath(this.ownState))}},{key:"endPath",value:function(){this.ownState.currentPath&&(this.ownState.currentPath.close(),this.ownState.finishedPaths.push(this.ownState.currentPath),this.updatePath(this.ownState))}},{key:"updatePath",value:function(b){this.isDrawing=!0,this.isRunning||this.start()}},{key:"start",value:function(b){b&&(this.container=b,this.container.appendChild(this.ownState.svg)),this.stop(),this.isRunning=!0,this.loop()}},{key:"stop",value:function(){this.isRunning=!1,this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=void 0}},{key:"loop",value:function(){this.rafId=requestAnimationFrame(this.loop.bind(this)),this.updateCollabolatorsState(),this.isDrawing?this.update():this.isRunning=!1}},{key:"draw",value:function(b){var Z=this;return function(X){var ue=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],je=X.length;if(je<4)return"";for(var Y=X[0],B=X[1],ye=X[2],Re="M".concat(Y[0].toFixed(2),",").concat(Y[1].toFixed(2)," Q").concat(B[0].toFixed(2),",").concat(B[1].toFixed(2)," ").concat(Vl(B[0],ye[0]).toFixed(2),",").concat(Vl(B[1],ye[1]).toFixed(2)," T"),Te=2,$e=je-1;Te<$e;Te++)Y=X[Te],B=X[Te+1],Re+="".concat(Vl(Y[0],B[0]).toFixed(2),",").concat(Vl(Y[1],B[1]).toFixed(2)," ");return ue&&(Re+="Z"),Re}(b.getStrokeOutline(b.options.size/this.app.state.zoom.value).map(function(X){var ue=(0,j.Z)(X,2),je=ue[0],Y=ue[1],B=(0,h._i)({sceneX:je,sceneY:Y},Z.app.state);return[B.x,B.y]}),!0)}},{key:"updateCollabolatorsState",value:function(){if(this.container&&this.app.state.collaborators.size){var b,Z=Nu(this.app.state.collaborators.entries());try{for(Z.s();!(b=Z.n()).done;){var X=(0,j.Z)(b.value,2),ue=X[0],je=X[1];if(!this.collaboratorsState.has(ue)){var Y=Hi();this.container.appendChild(Y.svg),this.collaboratorsState.set(ue,Y),this.updatePath(Y)}var B=this.collaboratorsState.get(ue);je.pointer&&je.pointer.tool==="laser"&&(je.button==="down"&&B.currentPath===void 0&&(B.lastPoint=[je.pointer.x,je.pointer.y],B.currentPath=Ma(),B.currentPath.addPoint([je.pointer.x,je.pointer.y,performance.now()]),this.updatePath(B)),je.button==="down"&&B.currentPath!==void 0&&(je.pointer.x===B.lastPoint[0]&&je.pointer.y===B.lastPoint[1]||(B.lastPoint=[je.pointer.x,je.pointer.y],B.currentPath.addPoint([je.pointer.x,je.pointer.y,performance.now()]),this.updatePath(B))),je.button==="up"&&B.currentPath!==void 0&&(B.lastPoint=[je.pointer.x,je.pointer.y],B.currentPath.addPoint([je.pointer.x,je.pointer.y,performance.now()]),B.currentPath.close(),B.finishedPaths.push(B.currentPath),B.currentPath=void 0,this.updatePath(B)))}}catch(ye){Z.e(ye)}finally{Z.f()}}}},{key:"update",value:function(){var b=this;if(this.container){var Z,X=!1,ue=Nu(this.collaboratorsState.entries());try{for(ue.s();!(Z=ue.n()).done;){var je=(0,j.Z)(Z.value,2),Y=je[0],B=je[1];if(this.app.state.collaborators.has(Y)){B.finishedPaths=B.finishedPaths.filter(function(Te){var $e=Te.originalPoints[Te.originalPoints.length-1];return!($e&&$e[2]<performance.now()-Fu)});var ye=B.finishedPaths.map(function(Te){return b.draw(Te)}).join(" ");B.currentPath&&(ye+=" ".concat(this.draw(B.currentPath))),ye.trim()&&(X=!0),B.svg.setAttribute("d",ye),B.svg.setAttribute("fill",(0,kf.G)(Y))}else B.svg.remove(),this.collaboratorsState.delete(Y)}}catch(Te){ue.e(Te)}finally{ue.f()}this.ownState.finishedPaths=this.ownState.finishedPaths.filter(function(Te){var $e=Te.originalPoints[Te.originalPoints.length-1];return!($e&&$e[2]<performance.now()-Fu)});var Re=this.ownState.finishedPaths.map(function(Te){return b.draw(Te)}).join(" ");this.ownState.currentPath&&(Re+=" ".concat(this.draw(this.ownState.currentPath))),(Re=Re.trim())&&(X=!0),this.ownState.svg.setAttribute("d",Re),this.ownState.svg.setAttribute("fill","red"),X||(this.isDrawing=!1)}}}]),o}(),go=function(){function o(b){var Z;(0,v.Z)(this,o),this.subscribers=[],this.updateOnChangeOnly=(Z=b==null?void 0:b.updateOnChangeOnly)!==null&&Z!==void 0&&Z,this.value=b==null?void 0:b.initialState}return(0,k.Z)(o,[{key:"on",value:function(){for(var b,Z=this,X=arguments.length,ue=new Array(X),je=0;je<X;je++)ue[je]=arguments[je];var Y=ue.flat().filter(function(B){return typeof B=="function"});return(b=this.subscribers).push.apply(b,(0,f.Z)(Y)),function(){return Z.off(Y)}}},{key:"off",value:function(){for(var b=arguments.length,Z=new Array(b),X=0;X<b;X++)Z[X]=arguments[X];var ue=Z.flat();this.subscribers=this.subscribers.filter(function(je){return!ue.includes(je)})}},{key:"trigger",value:function(){for(var b=arguments.length,Z=new Array(b),X=0;X<b;X++)Z[X]=arguments[X];return this.updateOnChangeOnly&&this.value===Z?[]:(this.value=Z,this.subscribers.map(function(ue){return ue.apply(void 0,Z)}))}},{key:"destroy",value:function(){this.subscribers=[],this.value=void 0}}]),o}();function Ii(o,b){var Z=typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(!Z){if(Array.isArray(o)||(Z=function(ye,Re){if(ye){if(typeof ye=="string")return Ta(ye,Re);var Te=Object.prototype.toString.call(ye).slice(8,-1);if(Te==="Object"&&ye.constructor&&(Te=ye.constructor.name),Te==="Map"||Te==="Set")return Array.from(ye);if(Te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Te))return Ta(ye,Re)}}(o))||b){Z&&(o=Z);var X=0,ue=function(){};return{s:ue,n:function(){return X>=o.length?{done:!0}:{done:!1,value:o[X++]}},e:function(ye){throw ye},f:ue}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
65
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je,Y=!0,B=!1;return{s:function(){Z=Z.call(o)},n:function(){var ye=Z.next();return Y=ye.done,ye},e:function(ye){B=!0,je=ye},f:function(){try{Y||Z.return==null||Z.return()}finally{if(B)throw je}}}}function Ta(o,b){(b==null||b>o.length)&&(b=o.length);for(var Z=0,X=new Array(b);Z<b;Z++)X[Z]=o[Z];return X}function Uu(o){var b=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var Z,X=(0,R.Z)(o);if(b){var ue=(0,R.Z)(this).constructor;Z=Reflect.construct(X,arguments,ue)}else Z=X.apply(this,arguments);return(0,P.Z)(this,Z)}}function Yl(o,b){var Z=Object.keys(o);if(Object.getOwnPropertySymbols){var X=Object.getOwnPropertySymbols(o);b&&(X=X.filter(function(ue){return Object.getOwnPropertyDescriptor(o,ue).enumerable})),Z.push.apply(Z,X)}return Z}function Gt(o){for(var b=1;b<arguments.length;b++){var Z=arguments[b]!=null?arguments[b]:{};b%2?Yl(Object(Z),!0).forEach(function(X){(0,K.Z)(o,X,Z[X])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(Z)):Yl(Object(Z)).forEach(function(X){Object.defineProperty(o,X,Object.getOwnPropertyDescriptor(Z,X))})}return o}var Gl=he().createContext(null),Xl=he().createContext(null),$l={viewport:{isMobile:!1,isLandscape:!1},editor:{isMobile:!1,canFitSidebar:!1},isTouchScreen:!1},ql=he().createContext($l);ql.displayName="DeviceContext";var Ef=he().createContext({container:null,id:null});Ef.displayName="ExcalidrawContainerContext";var Sf=he().createContext([]);Sf.displayName="ExcalidrawElementsContext";var _f=he().createContext(Gt(Gt({},(0,C.im)()),{},{width:0,height:0,offsetLeft:0,offsetTop:0}));_f.displayName="ExcalidrawAppStateContext";var jf=he().createContext(function(){console.warn("unitialized ExcalidrawSetAppStateContext context!")});jf.displayName="ExcalidrawSetAppStateContext";var Of=he().createContext(null);Of.displayName="ExcalidrawActionManagerContext";var Cf=function(){return(0,G.useContext)(Gl)},bm=function(){return(0,G.useContext)(Xl)},Ku=function(){return(0,G.useContext)(ql)},If=function(){return(0,G.useContext)(Ef)},ym=function(){return(0,G.useContext)(Sf)},xm=function(){return(0,G.useContext)(_f)},wm=function(){return(0,G.useContext)(jf)},Pf=function(){return(0,G.useContext)(Of)},km=typeof window<"u"&&"ResizeObserver"in window,qs=!1,Mf=0,al=!1,Qs=!1,Tf=!1,Df={horizontal:null,vertical:null},Da=0,Js=!1,Af=new Map,Lf=!1,Em=0,Sm=!1,Aa=null,Or={pointers:new Map,lastCenter:null,initialDistance:null,initialScale:null},Zf=function(o){(0,a.Z)(je,o);var b,Z,X,ue=Uu(je);function je(Y){var B;(0,v.Z)(this,je),B=ue.call(this,Y),v2.call((0,g.Z)(B));var ye,Re=(0,C.im)(),Te=Y.excalidrawAPI,$e=Y.viewModeEnabled,Qe=$e!==void 0&&$e,et=Y.zenModeEnabled,ft=et!==void 0&&et,gt=Y.gridModeEnabled,vt=gt!==void 0&>,on=Y.objectsSnapModeEnabled,Rt=on!==void 0&&on,bt=Y.theme,Mt=bt===void 0?Re.theme:bt,Ht=Y.name,an=Ht===void 0?Re.name:Ht;if(B.state=Gt(Gt(Gt({},Re),{},{theme:Mt,isLoading:!0},B.getCanvasOffsets()),{},{viewModeEnabled:Qe,zenModeEnabled:ft,objectsSnapModeEnabled:Rt,gridSize:vt?y.k:null,name:an,width:window.innerWidth,height:window.innerHeight}),B.id=(0,ce.x0)(),B.library=new q.ZP((0,g.Z)(B)),B.scene=new oe.Z,B.canvas=document.createElement("canvas"),B.rc=we.Z.canvas(B.canvas),B.renderer=new Gn(B.scene),Te){var ln={updateScene:B.updateScene,updateLibrary:B.library.updateLibrary,addFiles:B.addFiles,resetScene:B.resetScene,getSceneElementsIncludingDeleted:B.getSceneElementsIncludingDeleted,history:{clear:B.resetHistory},scrollToContent:B.scrollToContent,getSceneElements:B.getSceneElements,getAppState:function(){return B.state},getFiles:function(){return B.files},refresh:B.refresh,setToast:B.setToast,id:B.id,setActiveTool:B.setActiveTool,setCursor:B.setCursor,resetCursor:B.resetCursor,updateFrameRendering:B.updateFrameRendering,toggleSidebar:B.toggleSidebar,onChange:function(Bt){return B.onChangeEmitter.on(Bt)},onPointerDown:function(Bt){return B.onPointerDownEmitter.on(Bt)},onPointerUp:function(Bt){return B.onPointerUpEmitter.on(Bt)}};typeof Te=="function"?Te(ln):console.error("excalidrawAPI should be a function!")}return B.excalidrawContainerValue={container:B.excalidrawContainerRef.current,id:B.id},B.fonts=new Pu({scene:B.scene,onSceneUpdated:B.onSceneUpdated}),B.history=new De,B.actionManager=new $(B.syncActionResult,function(){return B.state},function(){return B.scene.getElementsIncludingDeleted()},(0,g.Z)(B)),B.actionManager.registerAll(I.N),B.actionManager.registerAction((ye=B.history,{name:"undo",trackEvent:{category:"history"},perform:function(Bt,Jt){return c(Bt,Jt,function(){return ye.undoOnce()})},keyTest:function(Bt){return Bt[A.tW.CTRL_OR_CMD]&&Bt.key.toLowerCase()===A.tW.Z&&!Bt.shiftKey},PanelComponent:function(Bt){var Jt=Bt.updateData,Mn=Bt.data;return(0,r.jsx)(S.V,{type:"button",icon:ne.UE,"aria-label":(0,z.t)("buttons.undo"),onClick:Jt,size:(Mn==null?void 0:Mn.size)||"medium"})},commitToHistory:function(){return!1}})),B.actionManager.registerAction(function(Bt){return{name:"redo",trackEvent:{category:"history"},perform:function(Jt,Mn){return c(Jt,Mn,function(){return Bt.redoOnce()})},keyTest:function(Jt){return Jt[A.tW.CTRL_OR_CMD]&&Jt.shiftKey&&Jt.key.toLowerCase()===A.tW.Z||y.ED&&Jt.ctrlKey&&!Jt.shiftKey&&Jt.key===A.tW.Y},PanelComponent:function(Jt){var Mn=Jt.updateData,Un=Jt.data;return(0,r.jsx)(S.V,{type:"button",icon:ne.zG,"aria-label":(0,z.t)("buttons.redo"),onClick:Mn,size:(Un==null?void 0:Un.size)||"medium"})},commitToHistory:function(){return!1}}}(B.history)),B}return(0,k.Z)(je,[{key:"onWindowMessage",value:function(Y){if(Y.origin==="https://player.vimeo.com"||Y.origin==="https://www.youtube.com"){var B=null;try{B=JSON.parse(Y.data)}catch{}if(B)switch(Y.origin){case"https://player.vimeo.com":if(B.method==="paused"){var ye,Re=null,Te=document.body.querySelectorAll("iframe.excalidraw__embeddable");if(!Te)break;var $e,Qe=Ii(Te);try{for(Qe.s();!($e=Qe.n()).done;){var et=$e.value;et.contentWindow===Y.source&&(Re=et.contentWindow)}}catch(vt){Qe.e(vt)}finally{Qe.f()}(ye=Re)===null||ye===void 0||ye.postMessage(JSON.stringify({method:B.value?"play":"pause",value:!0}),"*")}break;case"https://www.youtube.com":if(B.event==="infoDelivery"&&B.info&&B.id&&typeof B.info.playerState=="number"){var ft=B.id,gt=B.info.playerState;Object.values(y.vf).includes(gt)&&Af.set(ft,gt)}}}}},{key:"updateEmbeddableRef",value:function(Y,B){B&&this.iFrameRefs.set(Y,B)}},{key:"getHTMLIFrameElement",value:function(Y){return this.iFrameRefs.get(Y)}},{key:"handleEmbeddableCenterClick",value:function(Y){var B,ye,Re,Te,$e=this;if(((B=this.state.activeEmbeddable)===null||B===void 0?void 0:B.element)!==Y||((ye=this.state.activeEmbeddable)===null||ye===void 0?void 0:ye.state)!=="active"){setTimeout(function(){$e.setState({activeEmbeddable:{element:Y,state:"active"},selectedElementIds:(0,K.Z)({},Y.id,!0),draggingElement:null,selectionElement:null})},100);var Qe=this.getHTMLIFrameElement(Y.id);if(Qe!=null&&Qe.contentWindow){if(Qe.src.includes("youtube")){var et=Af.get(Y.id);switch(et||(Af.set(Y.id,y.vf.UNSTARTED),Qe.contentWindow.postMessage(JSON.stringify({event:"listening",id:Y.id}),"*")),et){case y.vf.PLAYING:case y.vf.BUFFERING:(Re=Qe.contentWindow)===null||Re===void 0||Re.postMessage(JSON.stringify({event:"command",func:"pauseVideo",args:""}),"*");break;default:(Te=Qe.contentWindow)===null||Te===void 0||Te.postMessage(JSON.stringify({event:"command",func:"playVideo",args:""}),"*")}}Qe.src.includes("player.vimeo.com")&&Qe.contentWindow.postMessage(JSON.stringify({method:"paused"}),"*")}}}},{key:"isEmbeddableCenter",value:function(Y,B,ye,Re){var Te,$e;return Y&&!B.altKey&&!B.shiftKey&&!B.metaKey&&!B.ctrlKey&&(((Te=this.state.activeEmbeddable)===null||Te===void 0?void 0:Te.element)!==Y||(($e=this.state.activeEmbeddable)===null||$e===void 0?void 0:$e.state)==="hover"||!this.state.activeEmbeddable)&&ye>=Y.x+Y.width/3&&ye<=Y.x+2*Y.width/3&&Re>=Y.y+Y.height/3&&Re<=Y.y+2*Y.height/3}},{key:"renderEmbeddables",value:function(){var Y=this,B=this.state.zoom.value,ye=this.state.width,Re=this.state.height,Te=this.scene.getNonDeletedElements().filter(function($e){return(0,H.gs)($e)&&!!$e.validated});return(0,r.jsx)(r.Fragment,{children:Te.map(function($e){var Qe,et,ft,gt,vt,on,Rt,bt,Mt,Ht=(0,h._i)({sceneX:$e.x,sceneY:$e.y},Y.state),an=Ht.x,ln=Ht.y,Bt=(0,x.LM)((0,rl.ye)($e.link||"")),Jt=(0,Ae.PZ)($e,ye,Re,Y.state),Mn=((Qe=Y.state.activeEmbeddable)===null||Qe===void 0?void 0:Qe.element)===$e&&((et=Y.state.activeEmbeddable)===null||et===void 0?void 0:et.state)==="active",Un=((ft=Y.state.activeEmbeddable)===null||ft===void 0?void 0:ft.element)===$e&&((gt=Y.state.activeEmbeddable)===null||gt===void 0?void 0:gt.state)==="hover";return(0,r.jsx)("div",{className:(0,xe.Z)("excalidraw__embeddable-container",{"is-hovered":Un}),style:(0,K.Z)({transform:Jt?"translate(".concat(an-Y.state.offsetLeft,"px, ").concat(ln-Y.state.offsetTop,"px) scale(").concat(B,")"):"none",display:Jt?"block":"none",opacity:$e.opacity/100},"--embeddable-radius","".concat((0,ie.yW)(Math.min($e.width,$e.height),$e),"px")),children:(0,r.jsxs)("div",{className:"excalidraw__embeddable-container__inner",style:{width:Jt?"".concat($e.width,"px"):0,height:Jt?"".concat($e.height,"px"):0,transform:Jt?"rotate(".concat($e.angle,"rad)"):"none",pointerEvents:Mn?y.XI.enabled:y.XI.disabled},children:[Un&&(0,r.jsx)("div",{className:"excalidraw__embeddable-hint",children:(0,z.t)("buttons.embeddableInteractionButton")}),(0,r.jsx)("div",{className:"excalidraw__embeddable__outer",style:{padding:"".concat($e.strokeWidth,"px")},children:(vt=(on=(Rt=Y.props).renderEmbeddable)===null||on===void 0?void 0:on.call(Rt,$e,Y.state))!==null&&vt!==void 0?vt:(0,r.jsx)("iframe",{ref:function(Qn){return Y.updateEmbeddableRef($e.id,Qn)},className:"excalidraw__embeddable",srcDoc:(Bt==null?void 0:Bt.type)==="document"?Bt.srcdoc(Y.state.theme):void 0,src:(Bt==null?void 0:Bt.type)!=="document"?(bt=Bt==null?void 0:Bt.link)!==null&&bt!==void 0?bt:"":void 0,scrolling:"no",referrerPolicy:"no-referrer-when-downgrade",title:"Excalidraw Embedded Content",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,sandbox:"".concat(Bt!=null&&(Mt=Bt.sandbox)!==null&&Mt!==void 0&&Mt.allowSameOrigin?"allow-same-origin":""," allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation allow-downloads")})})]})},$e.id)})})}},{key:"render",value:function(){var Y,B,ye,Re=this,Te=this.scene.getSelectedElements(this.state),$e=this.props,Qe=$e.renderTopRightUI,et=$e.renderCustomStats,ft=this.scene.getVersionNonce(),gt=this.renderer.getRenderableElements({versionNonce:ft,zoom:this.state.zoom,offsetLeft:this.state.offsetLeft,offsetTop:this.state.offsetTop,scrollX:this.state.scrollX,scrollY:this.state.scrollY,height:this.state.height,width:this.state.width,editingElement:this.state.editingElement,pendingImageElementId:this.state.pendingImageElementId}),vt=gt.canvasElements,on=gt.visibleElements,Rt=!(this.state.editingElement&&(0,H.bt)(this.state.editingElement))&&(this.state.selectionElement||this.state.draggingElement||this.state.resizingElement||this.state.activeTool.type==="laser"&&this.state.cursorButton==="down"||this.state.editingElement&&!(0,te.iB)(this.state.editingElement));return(0,r.jsx)("div",{className:(0,xe.Z)("excalidraw excalidraw-container",{"excalidraw--view-mode":this.state.viewModeEnabled,"excalidraw--mobile":this.device.editor.isMobile}),style:(0,K.Z)({},"--ui-pointerEvents",Rt?y.XI.disabled:y.XI.enabled),ref:this.excalidrawContainerRef,onDrop:this.handleAppOnDrop,tabIndex:0,onKeyDown:this.props.handleKeyboardGlobally?void 0:this.onKeyDown,children:(0,r.jsx)(Gl.Provider,{value:this,children:(0,r.jsx)(Xl.Provider,{value:this.props,children:(0,r.jsx)(Ef.Provider,{value:this.excalidrawContainerValue,children:(0,r.jsx)(ql.Provider,{value:this.device,children:(0,r.jsx)(jf.Provider,{value:this.setAppState,children:(0,r.jsx)(_f.Provider,{value:this.state,children:(0,r.jsxs)(Sf.Provider,{value:this.scene.getNonDeletedElements(),children:[(0,r.jsxs)(Of.Provider,{value:this.actionManager,children:[(0,r.jsxs)(hf,{canvas:this.canvas,appState:this.state,files:this.files,setAppState:this.setAppState,actionManager:this.actionManager,elements:this.scene.getNonDeletedElements(),onLockToggle:this.toggleLock,onPenModeToggle:this.togglePenMode,onHandToolToggle:this.onHandToolToggle,langCode:(0,z.G3)().code,renderTopRightUI:Qe,renderCustomStats:et,showExitZenModeBtn:((Y=this.props)===null||Y===void 0?void 0:Y.zenModeEnabled)===void 0&&this.state.zenModeEnabled,UIOptions:this.props.UIOptions,onExportImage:this.onExportImage,renderWelcomeScreen:!this.state.isLoading&&this.state.showWelcomeScreen&&this.state.activeTool.type==="selection"&&!this.state.zenModeEnabled&&!this.scene.getElementsIncludingDeleted().length,app:this,isCollaborating:this.props.isCollaborating,children:[this.props.children,this.state.openDialog==="mermaid"&&(0,r.jsx)(wr,{})]}),(0,r.jsx)("div",{className:"excalidraw-textEditorContainer"}),(0,r.jsx)("div",{className:"excalidraw-contextMenuContainer"}),(0,r.jsx)("div",{className:"excalidraw-eye-dropper-container"}),(0,r.jsx)(Oi,{manager:this.laserPathManager}),Te.length===1&&!this.state.contextMenu&&this.state.showHyperlinkPopup&&(0,r.jsx)(ra.nW,{element:Te[0],setAppState:this.setAppState,onLinkOpen:this.props.onLinkOpen,setToast:this.setToast},Te[0].id),this.state.toast!==null&&(0,r.jsx)(mf,{message:this.state.toast.message,onClose:function(){return Re.setToast(null)},duration:this.state.toast.duration,closable:this.state.toast.closable}),this.state.contextMenu&&(0,r.jsx)(Xe,{items:this.state.contextMenu.items,top:this.state.contextMenu.top,left:this.state.contextMenu.left,actionManager:this.actionManager,onClose:function(bt){Re.setState({contextMenu:null},function(){Re.focusContainer(),bt==null||bt()})}}),(0,r.jsx)(_n,{canvas:this.canvas,rc:this.rc,elements:vt,visibleElements:on,versionNonce:ft,selectionNonce:(B=this.state.selectionElement)===null||B===void 0?void 0:B.versionNonce,scale:window.devicePixelRatio,appState:this.state,renderConfig:{imageCache:this.imageCache,isExporting:!1,renderGrid:!0}}),(0,r.jsx)(pn,{containerRef:this.excalidrawContainerRef,canvas:this.interactiveCanvas,elements:vt,visibleElements:on,selectedElements:Te,versionNonce:ft,selectionNonce:(ye=this.state.selectionElement)===null||ye===void 0?void 0:ye.versionNonce,scale:window.devicePixelRatio,appState:this.state,renderInteractiveSceneCallback:this.renderInteractiveSceneCallback,handleCanvasRef:this.handleInteractiveCanvasRef,onContextMenu:this.handleCanvasContextMenu,onPointerMove:this.handleCanvasPointerMove,onPointerUp:this.handleCanvasPointerUp,onPointerCancel:this.removePointer,onTouchMove:this.handleTouchMove,onPointerDown:this.handleCanvasPointerDown,onDoubleClick:this.handleCanvasDoubleClick}),this.renderFrameNames()]}),this.renderEmbeddables()]})})})})})})})})}},{key:"componentDidMount",value:(X=(0,l.Z)(m().mark(function Y(){var B,ye=this;return m().wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:this.unmounted=!1,this.excalidrawContainerValue.container=this.excalidrawContainerRef.current,y.Vi.TEST==="production"&&(this.setState.bind(this),Object.defineProperties(window.h,{state:{configurable:!0,get:function(){return ye.state}},setState:{configurable:!0,value:function(){return ye.setState.apply(ye,arguments)}},app:{configurable:!0,value:this},history:{configurable:!0,value:this.history}})),this.scene.addCallback(this.onSceneUpdated),this.addEventListeners(),this.props.autoFocus&&this.excalidrawContainerRef.current&&this.focusContainer(),(0,h.h2)()||(this.refreshViewportBreakpoints(),this.refreshEditorBreakpoints()),km&&this.excalidrawContainerRef.current&&(this.resizeObserver=new ResizeObserver(function(){ye.refreshEditorBreakpoints(),ye.updateDOMRect()}),(B=this.resizeObserver)===null||B===void 0||B.observe(this.excalidrawContainerRef.current)),new URLSearchParams(window.location.search.slice(1)).has("web-share-target")?this.restoreFileFromShare():this.updateDOMRect(this.initializeScene),(0,y.jP)()&&!(0,ut.eB)()&&this.setState({errorMessage:(0,r.jsx)(qt,{})});case 11:case"end":return Re.stop()}},Y,this)})),function(){return X.apply(this,arguments)})},{key:"componentWillUnmount",value:function(){var Y;this.renderer.destroy(),this.scene=new oe.Z,this.renderer=new Gn(this.scene),this.files={},this.imageCache.clear(),(Y=this.resizeObserver)===null||Y===void 0||Y.disconnect(),this.unmounted=!0,this.removeEventListeners(),this.scene.destroy(),this.library.destroy(),this.laserPathManager.destroy(),this.onChangeEmitter.destroy(),Ni.R.destroy(),Yr.destroy(),clearTimeout(Da),Ie.N.clearCache(),Ge.bO.clearCache(),Da=0}},{key:"removeEventListeners",value:function(){var Y,B,ye,Re;document.removeEventListener(y.Ks.POINTER_UP,this.removePointer),document.removeEventListener(y.Ks.COPY,this.onCopy),document.removeEventListener(y.Ks.PASTE,this.pasteFromClipboard),document.removeEventListener(y.Ks.CUT,this.onCut),(Y=this.excalidrawContainerRef.current)===null||Y===void 0||Y.removeEventListener(y.Ks.WHEEL,this.onWheel),(B=this.nearestScrollableContainer)===null||B===void 0||B.removeEventListener(y.Ks.SCROLL,this.onScroll),document.removeEventListener(y.Ks.KEYDOWN,this.onKeyDown,!1),document.removeEventListener(y.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition,!1),document.removeEventListener(y.Ks.KEYUP,this.onKeyUp),window.removeEventListener(y.Ks.RESIZE,this.onResize,!1),window.removeEventListener(y.Ks.UNLOAD,this.onUnload,!1),window.removeEventListener(y.Ks.BLUR,this.onBlur,!1),(ye=this.excalidrawContainerRef.current)===null||ye===void 0||ye.removeEventListener(y.Ks.DRAG_OVER,this.disableEvent,!1),(Re=this.excalidrawContainerRef.current)===null||Re===void 0||Re.removeEventListener(y.Ks.DROP,this.disableEvent,!1),document.removeEventListener(y.Ks.GESTURE_START,this.onGestureStart,!1),document.removeEventListener(y.Ks.GESTURE_CHANGE,this.onGestureChange,!1),document.removeEventListener(y.Ks.GESTURE_END,this.onGestureEnd,!1),window.removeEventListener(y.Ks.MESSAGE,this.onWindowMessage,!1)}},{key:"addEventListeners",value:function(){var Y,B,ye,Re,Te,$e=this;this.removeEventListeners(),window.addEventListener(y.Ks.MESSAGE,this.onWindowMessage,!1),document.addEventListener(y.Ks.POINTER_UP,this.removePointer),document.addEventListener(y.Ks.COPY,this.onCopy),(Y=this.excalidrawContainerRef.current)===null||Y===void 0||Y.addEventListener(y.Ks.WHEEL,this.onWheel,{passive:!1}),this.props.handleKeyboardGlobally&&document.addEventListener(y.Ks.KEYDOWN,this.onKeyDown,!1),document.addEventListener(y.Ks.KEYUP,this.onKeyUp,{passive:!0}),document.addEventListener(y.Ks.MOUSE_MOVE,this.updateCurrentCursorPosition),(B=document.fonts)===null||B===void 0||(ye=B.addEventListener)===null||ye===void 0||ye.call(B,"loadingdone",function(Qe){var et=Qe.fontfaces;$e.fonts.onFontsLoaded(et)}),document.addEventListener(y.Ks.GESTURE_START,this.onGestureStart,!1),document.addEventListener(y.Ks.GESTURE_CHANGE,this.onGestureChange,!1),document.addEventListener(y.Ks.GESTURE_END,this.onGestureEnd,!1),this.state.viewModeEnabled||(document.addEventListener(y.Ks.PASTE,this.pasteFromClipboard),document.addEventListener(y.Ks.CUT,this.onCut),this.props.detectScroll&&(this.nearestScrollableContainer=(0,h.Ip)(this.excalidrawContainerRef.current),this.nearestScrollableContainer.addEventListener(y.Ks.SCROLL,this.onScroll)),window.addEventListener(y.Ks.RESIZE,this.onResize,!1),window.addEventListener(y.Ks.UNLOAD,this.onUnload,!1),window.addEventListener(y.Ks.BLUR,this.onBlur,!1),(Re=this.excalidrawContainerRef.current)===null||Re===void 0||Re.addEventListener(y.Ks.DRAG_OVER,this.disableEvent,!1),(Te=this.excalidrawContainerRef.current)===null||Te===void 0||Te.addEventListener(y.Ks.DROP,this.disableEvent,!1))}},{key:"componentDidUpdate",value:function(Y,B){var ye,Re,Te,$e,Qe=this;this.updateEmbeddables(),this.state.showWelcomeScreen||this.scene.getElementsIncludingDeleted().length||this.setState({showWelcomeScreen:!0}),Y.UIOptions.dockedSidebarBreakpoint!==this.props.UIOptions.dockedSidebarBreakpoint&&this.refreshEditorBreakpoints(),(B.scrollX!==this.state.scrollX||B.scrollY!==this.state.scrollY)&&((Te=this.props)===null||Te===void 0||($e=Te.onScrollChange)===null||$e===void 0||$e.call(Te,this.state.scrollX,this.state.scrollY)),Object.keys(this.state.selectedElementIds).length&&(0,C.EN)(this.state)&&this.setState({activeTool:(0,h.Om)(this.state,{type:"selection"})}),this.state.activeTool.type==="eraser"&&B.theme!==this.state.theme&&(0,ar.OF)(this.interactiveCanvas,this.state.theme),B.activeTool.type==="selection"&&this.state.activeTool.type!=="selection"&&this.state.showHyperlinkPopup&&this.setState({showHyperlinkPopup:!1}),Y.langCode!==this.props.langCode&&this.updateLanguage(),Y.viewModeEnabled!==this.props.viewModeEnabled&&this.setState({viewModeEnabled:!!this.props.viewModeEnabled}),B.viewModeEnabled!==this.state.viewModeEnabled&&(this.addEventListeners(),this.deselectElements()),Y.zenModeEnabled!==this.props.zenModeEnabled&&this.setState({zenModeEnabled:!!this.props.zenModeEnabled}),Y.theme!==this.props.theme&&this.props.theme&&this.setState({theme:this.props.theme}),Y.gridModeEnabled!==this.props.gridModeEnabled&&this.setState({gridSize:this.props.gridModeEnabled?y.k:null}),this.props.name&&Y.name!==this.props.name&&this.setState({name:this.props.name}),(ye=this.excalidrawContainerRef.current)===null||ye===void 0||ye.classList.toggle("theme--dark",this.state.theme==="dark"),this.state.editingLinearElement&&!this.state.selectedElementIds[this.state.editingLinearElement.elementId]&&setTimeout(function(){Qe.state.editingLinearElement&&Qe.actionManager.executeAction(D.pL)}),(Re=this.state.editingElement)!==null&&Re!==void 0&&Re.isDeleted&&this.setState({editingElement:null}),this.state.selectedLinearElement&&!this.state.selectedElementIds[this.state.selectedLinearElement.elementId]&&this.setState({selectedLinearElement:null});var et,ft,gt=B.multiElement;B.activeTool!==this.state.activeTool&>!=null&&(0,L.N1)(this.state)&&(0,H.Mn)(gt,!1)&&(0,L.R)(gt,this.state,this.scene,(0,h.AK)(ve._.getPointAtIndexGlobalCoordinates(gt,-1))),this.history.record(this.state,this.scene.getElementsIncludingDeleted()),this.state.isLoading||((et=(ft=this.props).onChange)===null||et===void 0||et.call(ft,this.scene.getElementsIncludingDeleted(),this.state,this.files),this.onChangeEmitter.trigger(this.scene.getElementsIncludingDeleted(),this.state,this.files))}},{key:"addElementsFromMixedContentPaste",value:(Z=(0,l.Z)(m().mark(function Y(B,ye){var Re,Te,$e,Qe,et,ft,gt,vt,on,Rt,bt,Mt,Ht,an,ln;return m().wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:if(Re=ye.isPlainPaste,Te=ye.sceneX,$e=ye.sceneY,Re||!B.some(function(Jt){return Jt.type==="imageUrl"})||!this.isToolSupported("image")){Bt.next=35;break}return Qe=B.filter(function(Jt){return Jt.type==="imageUrl"}).map(function(Jt){return Jt.value}),Bt.next=5,Promise.all(Qe.map(function(){var Jt=(0,l.Z)(m().mark(function Mn(Un){return m().wrap(function(Qn){for(;;)switch(Qn.prev=Qn.next){case 0:return Qn.prev=0,Qn.next=3,(0,Ft._p)(Un);case 3:return Qn.t0=Qn.sent,Qn.abrupt("return",{file:Qn.t0});case 7:return Qn.prev=7,Qn.t1=Qn.catch(0),Qn.abrupt("return",{errorMessage:Qn.t1.message});case 10:case"end":return Qn.stop()}},Mn,null,[[0,7]])}));return function(Mn){return Jt.apply(this,arguments)}}()));case 5:et=Bt.sent,ft=$e,gt=!1,vt={},on=Ii(et),Bt.prev=10,on.s();case 12:if((Rt=on.n()).done){Bt.next=22;break}if(!(bt=Rt.value).file){Bt.next=20;break}return Mt=this.createImageElement({sceneX:Te,sceneY:ft}),Bt.next=18,this.insertImageElement(Mt,bt.file);case 18:(Ht=Bt.sent)&&(gt||(gt=!0,ft-=Ht.height/2),(0,E.DR)(Ht,{y:ft},!1),ft=Mt.y+Mt.height+25,vt[Mt.id]=!0);case 20:Bt.next=12;break;case 22:Bt.next=27;break;case 24:Bt.prev=24,Bt.t0=Bt.catch(10),on.e(Bt.t0);case 27:return Bt.prev=27,on.f(),Bt.finish(27);case 30:this.setState({selectedElementIds:(0,Sr.Oh)(vt,this.state)}),an=et.find(function(Jt){return!!Jt.errorMessage}),an&&an.errorMessage&&this.setState({errorMessage:an.errorMessage}),Bt.next=37;break;case 35:(ln=B.filter(function(Jt){return Jt.type==="text"})).length&&this.addTextFromPaste(ln.map(function(Jt){return Jt.value}).join(`
|
|
66
|
+
|
|
67
|
+
`),Re);case 37:case"end":return Bt.stop()}},Y,this,[[10,24,27,30]])})),function(Y,B){return Z.apply(this,arguments)})},{key:"addTextFromPaste",value:function(Y){var B=this,ye=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Re=(0,h.dE)({clientX:this.lastViewportPosition.x,clientY:this.lastViewportPosition.y},this.state),Te=Re.x,$e=Re.y,Qe={x:Te,y:$e,strokeColor:this.state.currentItemStrokeColor,backgroundColor:this.state.currentItemBackgroundColor,fillStyle:this.state.currentItemFillStyle,strokeWidth:this.state.currentItemStrokeWidth,strokeStyle:this.state.currentItemStrokeStyle,roundness:null,roughness:this.state.currentItemRoughness,opacity:this.state.currentItemOpacity,text:Y,fontSize:this.state.currentItemFontSize,fontFamily:this.state.currentItemFontFamily,textAlign:this.state.currentItemTextAlign,verticalAlign:y.hs,locked:!1},et=10,ft=$e,gt=ye?[Y]:Y.split(`
|
|
68
|
+
`),vt=gt.reduce(function(Rt,bt,Mt){var Ht=bt.trim(),an=(0,ut.PT)(Qe.fontFamily);if(Ht.length){var ln=B.getTopLayerFrameAtSceneCoords({x:Te,y:ft}),Bt=(0,te.VL)(Gt(Gt({},Qe),{},{x:Te,y:ft,text:Ht,lineHeight:an,frameId:ln?ln.id:null}));Rt.push(Bt),ft+=Bt.height+et}else{var Jt;!((Jt=gt[Mt-1])===null||Jt===void 0)&&Jt.trim()&&(ft+=(0,ut.Rg)(Qe.fontSize,an)+et)}return Rt},[]);if(vt.length!==0){var on=vt[0].frameId;on?this.scene.insertElementsAtIndex(vt,this.scene.getElementIndex(on)):this.scene.replaceAllElements([].concat((0,f.Z)(this.scene.getElementsIncludingDeleted()),(0,f.Z)(vt))),this.setState({selectedElementIds:(0,Sr.Oh)(Object.fromEntries(vt.map(function(Rt){return[Rt.id,!0]})),this.state)}),!ye&&vt.length>1&&Sm===!1&&!this.device.editor.isMobile&&(this.setToast({message:(0,z.t)("toast.pasteAsSingleElement",{shortcut:(0,h.uY)("CtrlOrCmd+Shift+V")}),duration:5e3}),Sm=!0),this.history.resumeRecording()}}},{key:"handleTextWysiwyg",value:function(Y,B){var ye=this,Re=B.isExistingElement,Te=Re!==void 0&&Re,$e=function(Qe,et,ft){ye.scene.replaceAllElements((0,f.Z)(ye.scene.getElementsIncludingDeleted().map(function(gt){return gt.id===Y.id&&(0,te.iB)(gt)?(0,te.N_)(gt,{text:Qe,isDeleted:ft,originalText:et}):gt})))};(0,te.b_)({id:Y.id,canvas:this.canvas,getViewportCoords:function(Qe,et){var ft=(0,h._i)({sceneX:Qe,sceneY:et},ye.state),gt=ft.x,vt=ft.y;return[gt-ye.state.offsetLeft,vt-ye.state.offsetTop]},onChange:(0,h.tH)(function(Qe){$e(Qe,Qe,!1),(0,te.qP)(Y)&&(0,L.Ww)(Y)}),onSubmit:(0,h.tH)(function(Qe){var et=Qe.text,ft=Qe.viaKeyboard,gt=Qe.originalText,vt=!et.trim();if($e(et,gt,vt),!vt&&ft){var on=Y.containerId?Y.containerId:Y.id;ye.setState(function(Rt){return{selectedElementIds:(0,Sr.Oh)(Gt(Gt({},Rt.selectedElementIds),{},(0,K.Z)({},on,!0)),Rt)}})}vt&&(0,L.$q)(ye.scene.getNonDeletedElements(),[Y]),vt&&!Te||ye.history.resumeRecording(),ye.setState({draggingElement:null,editingElement:null}),ye.state.activeTool.locked&&(0,ar.Uk)(ye.interactiveCanvas,ye.state),ye.focusContainer()}),element:Y,excalidrawContainer:this.excalidrawContainerRef.current,app:this}),this.deselectElements(),$e(Y.text,Y.originalText,!1)}},{key:"deselectElements",value:function(){this.setState({selectedElementIds:(0,Sr.Oh)({},this.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})}},{key:"getTextElementAtPosition",value:function(Y,B){var ye=this.getElementAtPosition(Y,B,{includeBoundTextElement:!0});return ye&&(0,te.iB)(ye)&&!ye.isDeleted?ye:null}},{key:"getElementAtPosition",value:function(Y,B,ye){var Re=this.getElementsAtPosition(Y,B,ye==null?void 0:ye.includeBoundTextElement,ye==null?void 0:ye.includeLockedElements);if(Re.length>1){if(ye!=null&&ye.preferSelected){for(var Te=Re.length-1;Te>-1;Te--)if(this.state.selectedElementIds[Re[Te].id])return Re[Te]}var $e=Re[Re.length-1];return(0,te.wB)($e,this.state,this.frameNameBoundsCache,Y,B)?Re[Re.length-2]:$e}return Re.length===1?Re[0]:null}},{key:"getElementsAtPosition",value:function(Y,B){var ye=this,Re=arguments.length>2&&arguments[2]!==void 0&&arguments[2],Te=arguments.length>3&&arguments[3]!==void 0&&arguments[3],$e=Re&&Te?this.scene.getNonDeletedElements():this.scene.getNonDeletedElements().filter(function(Qe){return(Te||!Qe.locked)&&(Re||!((0,te.iB)(Qe)&&Qe.containerId))});return(0,Ie.CJ)($e,function(Qe){return(0,te.wX)(Qe,ye.state,ye.frameNameBoundsCache,Y,B)}).filter(function(Qe){var et=(0,Fr.$Z)(Qe);return!(et&&ye.state.frameRendering.enabled&&ye.state.frameRendering.clip)||(0,Fr.Dn)({x:Y,y:B},et)})}},{key:"handleHoverSelectedLinearElement",value:function(Y,B,ye){var Re=ve._.getElement(Y.elementId),Te=(0,ut.WJ)(Re);if(Re)if(this.state.selectedLinearElement){var $e=-1,Qe=null;(0,Iu.Qu)(Re,this.state,this.frameNameBoundsCache,[B,ye])?($e=ve._.getPointIndexUnderCursor(Re,this.state.zoom,B,ye),Qe=ve._.getSegmentMidpointHitCoords(Y,{x:B,y:ye},this.state),$e>=0||Qe?(0,ar.KJ)(this.interactiveCanvas,y.oc.POINTER):(0,ar.KJ)(this.interactiveCanvas,y.oc.MOVE)):((0,vf.oY)([Re],this.state)&&(0,te.wB)(Re,this.state,this.frameNameBoundsCache,B,ye)||Te&&(0,te.wX)(Te,this.state,this.frameNameBoundsCache,B,ye))&&(0,ar.KJ)(this.interactiveCanvas,y.oc.MOVE),this.state.selectedLinearElement.hoverPointIndex!==$e&&this.setState({selectedLinearElement:Gt(Gt({},this.state.selectedLinearElement),{},{hoverPointIndex:$e})}),ve._.arePointsEqual(this.state.selectedLinearElement.segmentMidPointHoveredCoords,Qe)||this.setState({selectedLinearElement:Gt(Gt({},this.state.selectedLinearElement),{},{segmentMidPointHoveredCoords:Qe})})}else(0,ar.KJ)(this.interactiveCanvas,y.oc.AUTO)}},{key:"maybeCleanupAfterMissingPointerUp",value:function(Y){Aa!==null&&Aa(Y)}},{key:"updateGestureOnPointerDown",value:function(Y){Or.pointers.set(Y.pointerId,{x:Y.clientX,y:Y.clientY}),Or.pointers.size===2&&(Or.lastCenter=le(Or.pointers),Or.initialScale=this.state.zoom.value,Or.initialDistance=ke(Array.from(Or.pointers.values())))}},{key:"initialPointerDownState",value:function(Y){var B=(0,h.dE)(Y,this.state),ye=this.scene.getSelectedElements(this.state),Re=(0,te.KP)(ye),Te=(0,j.Z)(Re,4),$e=Te[0],Qe=Te[1],et=Te[2],ft=Te[3];return{origin:B,withCmdOrCtrl:Y[A.tW.CTRL_OR_CMD],originInGrid:(0,h.AK)((0,ie.wC)(B.x,B.y,Y[A.tW.CTRL_OR_CMD]?null:this.state.gridSize)),scrollbars:(0,Ie._4)(Df,Y.clientX-this.state.offsetLeft,Y.clientY-this.state.offsetTop),lastCoords:Gt({},B),originalElements:this.scene.getNonDeletedElements().reduce(function(gt,vt){return gt.set(vt.id,(0,ae.OL)(vt)),gt},new Map),resize:{handleType:!1,isResizing:!1,offset:{x:0,y:0},arrowDirection:"origin",center:{x:(et+$e)/2,y:(ft+Qe)/2}},hit:{element:null,allHitElements:[],wasAddedToSelection:!1,hasBeenDuplicated:!1,hasHitCommonBoundingBoxOfSelectedElements:this.isHittingCommonBoundingBoxOfSelectedElements(B,ye)},drag:{hasOccurred:!1,offset:null},eventListeners:{onMove:null,onUp:null,onKeyUp:null,onKeyDown:null},boxSelection:{hasOccurred:!1},elementIdsToErase:{}}}},{key:"handleDraggingScrollBar",value:function(Y,B){var ye=this;if(!B.scrollbars.isOverEither||this.state.multiElement)return!1;Tf=!0,B.lastCoords.x=Y.clientX,B.lastCoords.y=Y.clientY;var Re=(0,h.$9)(function($e){$e.target instanceof HTMLElement&&ye.handlePointerMoveOverScrollbars($e,B)}),Te=(0,h.tH)(function(){Tf=!1,(0,ar.Uk)(ye.interactiveCanvas,ye.state),Aa=null,ye.setState({cursorButton:"up"}),ye.savePointer(Y.clientX,Y.clientY,"up"),window.removeEventListener(y.Ks.POINTER_MOVE,Re),window.removeEventListener(y.Ks.POINTER_UP,Te),Re.flush()});return Aa=Te,window.addEventListener(y.Ks.POINTER_MOVE,Re),window.addEventListener(y.Ks.POINTER_UP,Te),!0}},{key:"isASelectedElement",value:function(Y){return Y!=null&&this.state.selectedElementIds[Y.id]}},{key:"isHittingCommonBoundingBoxOfSelectedElements",value:function(Y,B){if(B.length<2)return!1;var ye=10/this.state.zoom.value,Re=(0,te.KP)(B),Te=(0,j.Z)(Re,4),$e=Te[0],Qe=Te[1],et=Te[2],ft=Te[3];return Y.x>$e-ye&&Y.x<et+ye&&Y.y>Qe-ye&&Y.y<ft+ye}},{key:"getCurrentItemRoundness",value:function(Y){return this.state.currentItemRoundness==="round"?{type:(0,H.QI)(Y)?y.a6.ADAPTIVE_RADIUS:y.a6.PROPORTIONAL_RADIUS}:null}},{key:"maybeCacheReferenceSnapPoints",value:function(Y,B){var ye=arguments.length>2&&arguments[2]!==void 0&&arguments[2];!ji({event:Y,appState:this.state,selectedElements:B})||!ye&&Yr.getReferenceSnapPoints()||Yr.setReferenceSnapPoints(Fe(this.scene.getNonDeletedElements(),B,this.state))}},{key:"maybeCacheVisibleGaps",value:function(Y,B){var ye=arguments.length>2&&arguments[2]!==void 0&&arguments[2];!ji({event:Y,appState:this.state,selectedElements:B})||!ye&&Yr.getVisibleGaps()||Yr.setVisibleGaps(wf(this.scene.getNonDeletedElements(),B,this.state))}},{key:"onKeyDownFromPointerDownHandler",value:function(Y){var B=this;return(0,h.tH)(function(ye){B.maybeHandleResize(Y,ye)||B.maybeDragNewGenericElement(Y,ye)})}},{key:"onKeyUpFromPointerDownHandler",value:function(Y){var B=this;return(0,h.tH)(function(ye){ye.key===A.tW.ALT&&ye.preventDefault(),B.maybeHandleResize(Y,ye)||B.maybeDragNewGenericElement(Y,ye)})}},{key:"onPointerMoveFromPointerDownHandler",value:function(Y){var B=this;return(0,h.$9)(function(ye){var Re;if(Y.drag.offset===null&&(Y.drag.offset=(0,h.AK)((0,te.$V)(B.scene.getSelectedElements(B.state),Y.origin.x,Y.origin.y))),ye.target instanceof HTMLElement&&!B.handlePointerMoveOverScrollbars(ye,Y)){var Te=(0,h.dE)(ye,B.state);if((0,C.EN)(B.state))B.handleEraser(ye,Y,Te);else{B.state.activeTool.type==="laser"&&B.laserPathManager.addPointToPath(Te.x,Te.y);var $e=(0,ie.wC)(Te.x,Te.y,ye[A.tW.CTRL_OR_CMD]?null:B.state.gridSize),Qe=(0,j.Z)($e,2),et=Qe[0],ft=Qe[1];if(Y.drag.hasOccurred||B.state.activeTool.type!=="arrow"&&B.state.activeTool.type!=="line"||!((0,ie.LW)(Te.x,Te.y,Y.origin.x,Y.origin.y)<y.f)){if(Y.resize.isResizing&&(Y.lastCoords.x=Te.x,Y.lastCoords.y=Te.y,B.maybeHandleResize(Y,ye)))return!0;if(B.state.selectedLinearElement){var gt=B.state.editingLinearElement||B.state.selectedLinearElement;if(ve._.shouldAddMidpoint(B.state.selectedLinearElement,Te,B.state)){var vt=ve._.addMidpoint(B.state.selectedLinearElement,Te,B.state,!ye[A.tW.CTRL_OR_CMD]);return vt?void(0,be.flushSync)(function(){B.state.selectedLinearElement&&B.setState({selectedLinearElement:Gt(Gt({},B.state.selectedLinearElement),{},{pointerDownState:vt.pointerDownState,selectedPointsIndices:vt.selectedPointsIndices})}),B.state.editingLinearElement&&B.setState({editingLinearElement:Gt(Gt({},B.state.editingLinearElement),{},{pointerDownState:vt.pointerDownState,selectedPointsIndices:vt.selectedPointsIndices})})}):void 0}if(gt.pointerDownState.segmentMidpoint.value!==null&&!gt.pointerDownState.segmentMidpoint.added)return;var on=ve._.handlePointDragging(ye,B.state,Te.x,Te.y,function(Er,jo){B.maybeSuggestBindingsForLinearElementAtCoords(Er,jo)},gt);if(on)return Y.lastCoords.x=Te.x,Y.lastCoords.y=Te.y,Y.drag.hasOccurred=!0,B.state.editingLinearElement&&!B.state.editingLinearElement.isDragging&&B.setState({editingLinearElement:Gt(Gt({},B.state.editingLinearElement),{},{isDragging:!0})}),void(B.state.selectedLinearElement.isDragging||B.setState({selectedLinearElement:Gt(Gt({},B.state.selectedLinearElement),{},{isDragging:!0})}))}var Rt=Y.hit.allHitElements.some(function(Er){return B.isASelectedElement(Er)}),bt=B.state.editingLinearElement&&ye.shiftKey&&B.state.editingLinearElement.elementId===((Re=Y.hit.element)===null||Re===void 0?void 0:Re.id);if((Rt||Y.hit.hasHitCommonBoundingBoxOfSelectedElements)&&!bt){var Mt,Ht=B.scene.getSelectedElements(B.state);if(Ht.every(function(Er){return Er.locked}))return;var an=Ht.find(function(Er){return(0,H.He)(Er)}),ln=B.getTopLayerFrameAtSceneCoords(Te);if(B.setState({frameToHighlight:ln&&!an?ln:null}),Y.drag.hasOccurred=!0,B.setState({selectedElementsAreBeingDragged:!0}),Ht.length>0&&!Y.withCmdOrCtrl&&!B.state.editingElement&&((Mt=B.state.activeEmbeddable)===null||Mt===void 0?void 0:Mt.state)!=="active"){var Bt={x:Te.x-Y.origin.x,y:Te.y-Y.origin.y},Jt=(0,f.Z)(Y.originalElements.values()),Mn=ye.shiftKey;if(Mn){var Un=Math.abs(Bt.x),Qn=Math.abs(Bt.y),ir=Mn&&Un>Qn;Mn&&Un<Qn&&(Bt.x=0),ir&&(Bt.y=0)}B.maybeCacheVisibleGaps(ye,Ht),B.maybeCacheReferenceSnapPoints(ye,Ht);var mr=function(Er,jo,li,ll){var Nf,Bf,Ff,Hf;if(!ji({appState:li,event:ll,selectedElements:Er})||Er.length===0)return{snapOffset:{x:0,y:0},snapLines:[]};jo.x=Ve(jo.x),jo.y=Ve(jo.y);var La=[],Za=[],_m=_i(li.zoom.value),Ql={x:_m,y:_m},y2=il(Er,{dragOffset:jo});He(Er,y2,li,ll,La,Za,Ql),me(Er,jo,li,ll,La,Za,Ql);var Wf={x:(Nf=(Bf=La[0])===null||Bf===void 0?void 0:Bf.offset)!==null&&Nf!==void 0?Nf:0,y:(Ff=(Hf=Za[0])===null||Hf===void 0?void 0:Hf.offset)!==null&&Ff!==void 0?Ff:0};Ql.x=0,Ql.y=0,La.length=0,Za.length=0;var Uf={x:Ve(jo.x+Wf.x),y:Ve(jo.y+Wf.y)};He(Er,il(Er,{dragOffset:Uf}),li,ll,La,Za,Ql),me(Er,Uf,li,ll,La,Za,Ql);var x2=st(La,Za),w2=pt(Er,Uf,[].concat(La,Za).filter(function(k2){return k2.type==="gap"}));return{snapOffset:Wf,snapLines:[].concat(x2,w2)}}((0,Ie.eD)(Jt,B.state),Bt,B.state,ye),pr=mr.snapOffset,Kn=mr.snapLines;if(B.setState({snapLines:Kn}),!B.state.editingFrame&&(0,te.o8)(Y,Ht,Bt,B.state,B.scene,pr,ye[A.tW.CTRL_OR_CMD]?null:B.state.gridSize),B.maybeSuggestBindingForAll(Ht),ye.altKey&&!Y.hit.hasBeenDuplicated){Y.hit.hasBeenDuplicated=!0;var yr,tr=[],hr=[],Mr=new Map,Lr=new Map,Cr=Y.hit.element,Qr=new Set(B.scene.getSelectedElements({selectedElementIds:B.state.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0}).map(function(Er){return Er.id})),cr=Ii(B.scene.getElementsIncludingDeleted());try{for(cr.s();!(yr=cr.n()).done;){var kr=yr.value;if(Qr.has(kr.id)||kr.id===(Cr==null?void 0:Cr.id)&&Y.hit.wasAddedToSelection){var vo=(0,te.Sy)(B.state.editingGroupId,Mr,kr),Gr=Y.originalElements.get(kr.id);(0,E.DR)(vo,{x:Gr.x,y:Gr.y}),Y.originalElements.set(vo.id,vo),tr.push(vo),hr.push(kr),Lr.set(kr.id,vo.id)}else tr.push(kr)}}catch(Er){cr.e(Er)}finally{cr.f()}var bo=[].concat(tr,hr);(0,ut.P7)(tr,hr,Lr),(0,L.ek)(bo,hr,Lr,"duplicatesServeAsOld"),(0,Fr.xr)(bo,hr,Lr),B.scene.replaceAllElements(bo),B.maybeCacheVisibleGaps(ye,Ht,!0),B.maybeCacheReferenceSnapPoints(ye,Ht,!0)}return}}var Tr=B.state.draggingElement;if(Tr){if(Tr.type==="freedraw"){var uo=Tr.points,Jr=Te.x-Tr.x,_r=Te.y-Tr.y,aa=uo.length>0&&uo[uo.length-1];if(!(aa&&aa[0]===Jr&&aa[1]===_r)){var vi=Tr.simulatePressure?Tr.pressures:[].concat((0,f.Z)(Tr.pressures),[ye.pressure]);(0,E.DR)(Tr,{points:[].concat((0,f.Z)(uo),[[Jr,_r]]),pressures:vi})}}else if((0,H.bt)(Tr)){Y.drag.hasOccurred=!0,B.setState({selectedElementsAreBeingDragged:!0});var $n=Tr.points,Rr=et-Tr.x,eo=ft-Tr.y;if((0,A.Ge)(ye)&&$n.length===2){var So=(0,te.o4)(Tr.x,Tr.y,Te.x,Te.y);Rr=So.width,eo=So.height}$n.length===1?(0,E.DR)(Tr,{points:[].concat((0,f.Z)($n),[[Rr,eo]])}):$n.length===2&&(0,E.DR)(Tr,{points:[].concat((0,f.Z)($n.slice(0,-1)),[[Rr,eo]])}),(0,H.Mn)(Tr,!1)&&B.maybeSuggestBindingsForLinearElementAtCoords(Tr,[Te],B.state.startBoundElement)}else Y.lastCoords.x=Te.x,Y.lastCoords.y=Te.y,B.maybeDragNewGenericElement(Y,ye);if(B.state.activeTool.type==="selection"){Y.boxSelection.hasOccurred=!0;var _o=B.scene.getNonDeletedElements();if(B.state.editingLinearElement)ve._.handleBoxSelection(ye,B.state,B.setState.bind(B));else{var Po=!0;!ye.shiftKey&&(0,Ie.N)(_o,B.state)&&(Y.withCmdOrCtrl&&Y.hit.element?B.setState(function(Er){return(0,Ge.bO)(Gt(Gt({},Er),{},{selectedElementIds:(0,K.Z)({},Y.hit.element.id,!0)}),B.scene.getNonDeletedElements(),Er,B)}):Po=!1);var Ho=(0,Ie.Yp)(_o,Tr);B.setState(function(Er){var jo=Gt(Gt({},Po&&Er.selectedElementIds),Ho.reduce(function(li,ll){return li[ll.id]=!0,li},{}));return Y.hit.element&&(Ho.length?delete jo[Y.hit.element.id]:jo[Y.hit.element.id]=!0),Er=Po?Er:Gt(Gt({},Er),{},{selectedGroupIds:{},editingGroupId:null}),Gt(Gt({},(0,Ge.bO)({editingGroupId:Er.editingGroupId,selectedElementIds:jo},B.scene.getNonDeletedElements(),Er,B)),{},{selectedLinearElement:Ho.length===1&&(0,H.bt)(Ho[0])?new ve._(Ho[0],B.scene):null,showHyperlinkPopup:!(Ho.length!==1||!Ho[0].link&&!(0,H.gs)(Ho[0]))&&"info"})})}}}}}}})}},{key:"handlePointerMoveOverScrollbars",value:function(Y,B){if(B.scrollbars.isOverHorizontal){var ye=Y.clientX,Re=ye-B.lastCoords.x;return this.translateCanvas({scrollX:this.state.scrollX-Re/this.state.zoom.value}),B.lastCoords.x=ye,!0}if(B.scrollbars.isOverVertical){var Te=Y.clientY,$e=Te-B.lastCoords.y;return this.translateCanvas({scrollY:this.state.scrollY-$e/this.state.zoom.value}),B.lastCoords.y=Te,!0}return!1}},{key:"onPointerUpFromPointerDownHandler",value:function(Y){var B=this;return(0,h.tH)(function(ye){var Re;Y.eventListeners.onMove&&Y.eventListeners.onMove.flush();var Te,$e,Qe=B.state,et=Qe.draggingElement,ft=Qe.resizingElement,gt=Qe.multiElement,vt=Qe.activeTool,on=Qe.isResizing,Rt=Qe.isRotating;if(B.setState({isResizing:!1,isRotating:!1,resizingElement:null,selectionElement:null,frameToHighlight:null,elementsToHighlight:null,cursorButton:"up",editingElement:gt||(0,te.iB)(B.state.editingElement)?B.state.editingElement:null,snapLines:[],originSnapOffset:null}),Yr.setReferenceSnapPoints(null),Yr.setVisibleGaps(null),B.savePointer(ye.clientX,ye.clientY,"up"),B.setState({selectedElementsAreBeingDragged:!1}),B.state.editingLinearElement)if(Y.boxSelection.hasOccurred||((Te=Y.hit)===null||Te===void 0||($e=Te.element)===null||$e===void 0?void 0:$e.id)===B.state.editingLinearElement.elementId){var bt=ve._.handlePointerUp(ye,B.state.editingLinearElement,B.state);bt!==B.state.editingLinearElement&&B.setState({editingLinearElement:bt,suggestedBindings:[]})}else B.actionManager.executeAction(D.pL);else if(B.state.selectedLinearElement){var Mt,Ht;if(((Mt=Y.hit)===null||Mt===void 0||(Ht=Mt.element)===null||Ht===void 0?void 0:Ht.id)!==B.state.selectedLinearElement.elementId)B.scene.getSelectedElements(B.state).length>1&&B.setState({selectedLinearElement:null});else{var an=ve._.handlePointerUp(ye,B.state.selectedLinearElement,B.state),ln=an.startBindingElement,Bt=an.endBindingElement,Jt=B.scene.getElement(an.elementId);(0,H.Mn)(Jt)&&(0,L.HG)(Jt,ln,Bt),an!==B.state.selectedLinearElement&&B.setState({selectedLinearElement:Gt(Gt({},an),{},{selectedPointsIndices:null}),suggestedBindings:[]})}}if(Aa=null,window.removeEventListener(y.Ks.POINTER_MOVE,Y.eventListeners.onMove),window.removeEventListener(y.Ks.POINTER_UP,Y.eventListeners.onUp),window.removeEventListener(y.Ks.KEYDOWN,Y.eventListeners.onKeyDown),window.removeEventListener(y.Ks.KEYUP,Y.eventListeners.onKeyUp),B.state.pendingImageElementId&&B.setState({pendingImageElementId:null}),B.onPointerUpEmitter.trigger(B.state.activeTool,Y,ye),(et==null?void 0:et.type)==="freedraw"){var Mn=(0,h.dE)(ye,B.state),Un=et.points,Qn=Mn.x-et.x,ir=Mn.y-et.y;Qn===Un[0][0]&&ir===Un[0][1]&&(ir+=1e-4,Qn+=1e-4);var mr=et.simulatePressure?[]:[].concat((0,f.Z)(et.pressures),[ye.pressure]);return(0,E.DR)(et,{points:[].concat((0,f.Z)(Un),[[Qn,ir]]),pressures:mr,lastCommittedPoint:[Qn,ir]}),void B.actionManager.executeAction(D.pL)}if((0,H.pC)(et)){var pr=et;try{B.initializeImageDimensions(pr),B.setState({selectedElementIds:(0,Sr.Oh)((0,K.Z)({},pr.id,!0),B.state)},function(){B.actionManager.executeAction(D.pL)})}catch($n){console.error($n),B.scene.replaceAllElements(B.scene.getElementsIncludingDeleted().filter(function(Rr){return Rr.id!==pr.id})),B.actionManager.executeAction(D.pL)}}else if((0,H.bt)(et)){et.points.length>1&&B.history.resumeRecording();var Kn=(0,h.dE)(ye,B.state);Y.drag.hasOccurred||!et||gt?Y.drag.hasOccurred&&!gt&&((0,L.N1)(B.state)&&(0,H.Mn)(et,!1)&&(0,L.R)(et,B.state,B.scene,Kn),B.setState({suggestedBindings:[],startBoundElement:null}),vt.locked?B.setState(function($n){return{draggingElement:null}}):((0,ar.z8)(B.interactiveCanvas),B.setState(function($n){return{draggingElement:null,activeTool:(0,h.Om)(B.state,{type:"selection"}),selectedElementIds:(0,Sr.Oh)(Gt(Gt({},$n.selectedElementIds),{},(0,K.Z)({},et.id,!0)),$n),selectedLinearElement:new ve._(et,B.scene)}}))):((0,E.DR)(et,{points:[].concat((0,f.Z)(et.points),[[Kn.x-et.x,Kn.y-et.y]])}),B.setState({multiElement:et,editingElement:B.state.draggingElement}))}else{if(vt.type!=="selection"&&et&&(0,te.QD)(et))return B.scene.replaceAllElements(B.scene.getElementsIncludingDeleted().filter(function($n){return $n.id!==et.id})),void B.setState({draggingElement:null});if(et){if(Y.drag.hasOccurred){var yr=(0,h.dE)(ye,B.state);if(B.state.selectedLinearElement&&B.state.selectedLinearElement.isDragging){var tr=B.scene.getElement(B.state.selectedLinearElement.elementId);if(tr!=null&&tr.frameId){var hr=(0,Fr.$Z)(tr);hr&&tr&&((0,Fr.cO)(tr,hr)||((0,E.DR)(tr,{groupIds:[]}),B.scene.replaceAllElements((0,Fr.lz)(B.scene.getElementsIncludingDeleted(),[tr],B.state))))}}else{var Mr=B.getTopLayerFrameAtSceneCoords(yr),Lr=B.scene.getSelectedElements(B.state),Cr=B.scene.getElementsIncludingDeleted(),Qr=function($n){if($n.length>0){var Rr,eo=Ii($n);try{for(eo.s();!(Rr=eo.n()).done;){var So=Rr.value,_o=So.groupIds.indexOf(B.state.editingGroupId);(0,E.DR)(So,{groupIds:So.groupIds.slice(0,_o)},!1)}}catch(Po){eo.e(Po)}finally{eo.f()}Cr.forEach(function(Po){Po.groupIds.length&&(0,Ge.Fb)(Cr,Po.groupIds[Po.groupIds.length-1]).length<2&&(0,E.DR)(Po,{groupIds:[]},!1)}),B.setState({editingGroupId:null})}};if(Mr&&!B.state.selectedElementIds[Mr.id]){var cr=Lr.filter(function($n){return $n.frameId!==Mr.id&&(0,Fr.Qs)($n,Cr,B.state)});B.state.editingGroupId&&Qr(cr),Cr=(0,Fr.A_)(Cr,cr,Mr)}else if(!Mr&&B.state.editingGroupId){var kr=Lr.filter(function($n){return $n.frameId&&!(0,Fr.Qs)($n,Cr,B.state)});Qr(kr)}Cr=(0,Fr.Tq)(Cr,B.state,B),B.scene.replaceAllElements(Cr)}}if(et.type==="frame"){var vo=(0,Fr.fj)(B.scene.getElementsIncludingDeleted(),et);B.scene.replaceAllElements((0,Fr.A_)(B.scene.getElementsIncludingDeleted(),vo,et))}(0,E.DR)(et,(0,te.Qp)(et))}if(ft&&B.history.resumeRecording(),ft&&(0,te.QD)(ft)&&B.scene.replaceAllElements(B.scene.getElementsIncludingDeleted().filter(function($n){return $n.id!==ft.id})),Y.resize.isResizing){var Gr,bo=(0,Fr.Tq)(B.scene.getElementsIncludingDeleted(),B.state,B),Tr=B.scene.getSelectedElements(B.state).filter(function($n){return $n.type==="frame"}),uo=Ii(Tr);try{for(uo.s();!(Gr=uo.n()).done;){var Jr=Gr.value;bo=(0,Fr.pr)(bo,(0,Fr.ni)(B.scene.getElementsIncludingDeleted(),Jr,B.state),Jr,B.state)}}catch($n){uo.e($n)}finally{uo.f()}B.scene.replaceAllElements(bo)}var _r=Y.hit.element;if(((Re=B.state.selectedLinearElement)===null||Re===void 0?void 0:Re.elementId)!==(_r==null?void 0:_r.id)&&(0,H.bt)(_r)&&B.scene.getSelectedElements(B.state).length===1&&B.setState({selectedLinearElement:new ve._(_r,B.scene)}),(0,C.EN)(B.state)){if((0,ie.LW)(B.lastPointerDownEvent.clientX,B.lastPointerDownEvent.clientY,B.lastPointerUpEvent.clientX,B.lastPointerUpEvent.clientY)===0){var aa=(0,h.dE)({clientX:B.lastPointerUpEvent.clientX,clientY:B.lastPointerUpEvent.clientY},B.state);B.getElementsAtPosition(aa.x,aa.y).forEach(function($n){return Y.elementIdsToErase[$n.id]={erase:!0,opacity:$n.opacity}})}B.eraseElements(Y)}else{var vi;Object.keys(Y.elementIdsToErase).length&&B.restoreReadyToEraseElements(Y),_r&&!Y.drag.hasOccurred&&!Y.hit.wasAddedToSelection&&(!B.state.editingLinearElement||!Y.boxSelection.hasOccurred)&&(ye.shiftKey&&!B.state.editingLinearElement?B.state.selectedElementIds[_r.id]?(0,Ge.zq)(B.state,_r)?B.setState(function($n){var Rr,eo=Gt({},$n.selectedElementIds),So=Ii(_r.groupIds.flatMap(function(_o){return(0,Ge.Fb)(B.scene.getNonDeletedElements(),_o)}));try{for(So.s();!(Rr=So.n()).done;)delete eo[Rr.value.id]}catch(_o){So.e(_o)}finally{So.f()}return{selectedGroupIds:Gt(Gt({},$n.selectedElementIds),_r.groupIds.map(function(_o){return(0,K.Z)({},_o,!1)}).reduce(function(_o,Po){return Gt(Gt({},_o),Po)},{})),selectedElementIds:(0,Sr.Oh)(eo,$n)}}):(vi=B.state.selectedLinearElement)!==null&&vi!==void 0&&vi.isDragging||B.setState(function($n){var Rr=Gt({},$n.selectedElementIds);delete Rr[_r.id];var eo=(0,Ie.eD)(B.scene.getNonDeletedElements(),{selectedElementIds:Rr});return Gt(Gt({},(0,Ge.bO)({editingGroupId:$n.editingGroupId,selectedElementIds:Rr},B.scene.getNonDeletedElements(),$n,B)),{},{selectedLinearElement:eo.length===1&&(0,H.bt)(eo[0])?new ve._(eo[0],B.scene):$n.selectedLinearElement})}):_r.frameId&&B.state.selectedElementIds[_r.frameId]?B.setState(function($n){var Rr,eo,So=Gt(Gt({},$n.selectedElementIds),{},(0,K.Z)({},_r.id,!0));return delete So[_r.frameId],((Rr=(eo=B.scene.getElement(_r.frameId))===null||eo===void 0?void 0:eo.groupIds)!==null&&Rr!==void 0?Rr:[]).flatMap(function(_o){return(0,Ge.Fb)(B.scene.getNonDeletedElements(),_o)}).forEach(function(_o){delete So[_o.id]}),Gt(Gt({},(0,Ge.bO)({editingGroupId:$n.editingGroupId,selectedElementIds:So},B.scene.getNonDeletedElements(),$n,B)),{},{showHyperlinkPopup:!(!_r.link&&!(0,H.gs)(_r))&&"info"})}):B.setState(function($n){return{selectedElementIds:(0,Sr.Oh)(Gt(Gt({},$n.selectedElementIds),{},(0,K.Z)({},_r.id,!0)),$n)}}):B.setState(function($n){var Rr;return Gt(Gt({},(0,Ge.bO)({editingGroupId:$n.editingGroupId,selectedElementIds:(0,K.Z)({},_r.id,!0)},B.scene.getNonDeletedElements(),$n,B)),{},{selectedLinearElement:(0,H.bt)(_r)&&((Rr=$n.selectedLinearElement)===null||Rr===void 0?void 0:Rr.elementId)!==_r.id?new ve._(_r,B.scene):$n.selectedLinearElement})})),Y.drag.hasOccurred||B.state.isResizing||!(_r&&(0,te.wB)(_r,B.state,B.frameNameBoundsCache,Y.origin.x,Y.origin.y)||!_r&&Y.hit.hasHitCommonBoundingBoxOfSelectedElements)?(!vt.locked&&vt.type!=="freedraw"&&et&&et.type!=="selection"&&B.setState(function($n){return{selectedElementIds:(0,Sr.Oh)(Gt(Gt({},$n.selectedElementIds),{},(0,K.Z)({},et.id,!0)),$n),showHyperlinkPopup:(0,H.gs)(et)&&!et.link?"editor":$n.showHyperlinkPopup}}),(vt.type!=="selection"||(0,Ie.N)(B.scene.getNonDeletedElements(),B.state))&&B.history.resumeRecording(),(Y.drag.hasOccurred||on||Rt)&&((0,L.N1)(B.state)?L.el:L.H)(B.scene.getSelectedElements(B.state)),vt.type!=="laser"?(vt.locked||vt.type==="freedraw"?B.setState({draggingElement:null,suggestedBindings:[]}):((0,ar.z8)(B.interactiveCanvas),B.setState({draggingElement:null,suggestedBindings:[],activeTool:(0,h.Om)(B.state,{type:"selection"})})),_r&&B.lastPointerUpEvent&&B.lastPointerDownEvent&&B.lastPointerUpEvent.timeStamp-B.lastPointerDownEvent.timeStamp<300&&Or.pointers.size<=1&&(0,H.gs)(_r)&&B.isEmbeddableCenter(_r,B.lastPointerUpEvent,Y.origin.x,Y.origin.y)&&B.handleEmbeddableCenterClick(_r)):B.laserPathManager.endPath()):B.state.editingLinearElement?B.setState({editingLinearElement:null}):B.setState({selectedElementIds:(0,Sr.Oh)({},B.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})}}})}},{key:"maybeSuggestBindingForAll",value:function(Y){if(!(Y.length>50)){var B=(0,L.ZB)(Y);this.setState({suggestedBindings:B})}}},{key:"clearSelection",value:function(Y){this.setState(function(B){return{selectedElementIds:(0,Sr.Oh)({},B),activeEmbeddable:null,selectedGroupIds:{},editingGroupId:B.editingGroupId&&Y!=null&&(0,Ge.Nd)(Y,B.editingGroupId)?B.editingGroupId:null}}),this.setState({selectedElementIds:(0,Sr.Oh)({},this.state),activeEmbeddable:null,previousSelectedElementIds:this.state.selectedElementIds})}},{key:"getTextWysiwygSnappedToCenterPosition",value:function(Y,B,ye,Re){if(Re){var Te=Re.x+Re.width/2,$e=Re.y+Re.height/2,Qe=(0,ut.TP)(Re,ye);if(Qe&&(Te=Qe.x,$e=Qe.y),Math.hypot(Y-Te,B-$e)<y.wZ){var et=(0,h._i)({sceneX:Te,sceneY:$e},ye);return{viewportX:et.x,viewportY:et.y,elementCenterX:Te,elementCenterY:$e}}}}},{key:"getCanvasOffsets",value:function(){var Y;if((Y=this.excalidrawContainerRef)!==null&&Y!==void 0&&Y.current){var B=this.excalidrawContainerRef.current.getBoundingClientRect();return{offsetLeft:B.left,offsetTop:B.top}}return{offsetLeft:0,offsetTop:0}}},{key:"updateLanguage",value:(b=(0,l.Z)(m().mark(function Y(){var B,ye=this;return m().wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return B=z.Mj.find(function(Te){return Te.code===ye.props.langCode})||z.Fp,Re.next=3,(0,z.m0)(B);case 3:this.setAppState({});case 4:case"end":return Re.stop()}},Y,this)})),function(){return b.apply(this,arguments)})}],[{key:"resetTapTwice",value:function(){qs=!1}}]),je}(he().Component);Zf.defaultProps={UIOptions:y.cW};var v2=function(){var o=this;this.interactiveCanvas=null,this.unmounted=!1,this.device=$l,this.excalidrawContainerRef=he().createRef(),this.files={},this.imageCache=new Map,this.iFrameRefs=new Map,this.lastPointerDownEvent=null,this.lastPointerUpEvent=null,this.lastViewportPosition={x:0,y:0},this.laserPathManager=new Wu(this),this.onChangeEmitter=new go,this.onPointerDownEmitter=new go,this.onPointerUpEmitter=new go,this.updateEmbeddables=function(){var b=new Map,Z=!1;o.scene.getNonDeletedElements().filter(function(X){if((0,H.gs)(X)&&(b.set(X.id,!0),X.validated==null)){Z=!0;var ue=(0,x.xm)(X.link,o.props.validateEmbeddable);(0,E.DR)(X,{validated:ue},!1),Ni.R.delete(X)}return!1}),Z&&o.scene.informMutation(),o.iFrameRefs.forEach(function(X,ue){b.has(ue)||o.iFrameRefs.delete(ue)})},this.getFrameNameDOMId=function(b){return"".concat(o.id,"-frame-name-").concat(b.id)},this.frameNameBoundsCache={get:function(b){var Z=o.frameNameBoundsCache._cache.get(b.id);if(!Z||Z.zoom!==o.state.zoom.value||Z.versionNonce!==b.versionNonce){var X=document.getElementById(o.getFrameNameDOMId(b));if(X){var ue=X.getBoundingClientRect(),je=(0,h.dE)({clientX:ue.x,clientY:ue.y},o.state),Y=(0,h.dE)({clientX:ue.right,clientY:ue.bottom},o.state);return Z={x:je.x,y:je.y,width:Y.x-je.x,height:Y.y-je.y,angle:0,zoom:o.state.zoom.value,versionNonce:b.versionNonce},o.frameNameBoundsCache._cache.set(b.id,Z),Z}return null}return Z},_cache:new Map},this.renderFrameNames=function(){if(!o.state.frameRendering.enabled||!o.state.frameRendering.name)return null;var b=o.state.theme==="dark";return o.scene.getNonDeletedFrames().map(function(Z,X){if(!(0,Ae.PZ)(Z,o.canvas.width/window.devicePixelRatio,o.canvas.height/window.devicePixelRatio,{offsetLeft:o.state.offsetLeft,offsetTop:o.state.offsetTop,scrollX:o.state.scrollX,scrollY:o.state.scrollY,zoom:o.state.zoom}))return null;var ue,je=(0,h._i)({sceneX:Z.x,sceneY:Z.y},o.state),Y=je.x,B=je.y,ye=function(){var Te;((Te=Z.name)===null||Te===void 0?void 0:Te.trim())===""&&(0,E.DR)(Z,{name:null}),o.setState({editingFrame:null})};if(Z.id===o.state.editingFrame){var Re=Z.name==null?"Frame ".concat(X+1):Z.name;ue=(0,r.jsx)("input",{autoFocus:!0,value:Re,onChange:function(Te){(0,E.DR)(Z,{name:Te.target.value})},onBlur:function(){return ye()},onKeyDown:function(Te){Te.key!==A.tW.ESCAPE&&Te.key!==A.tW.ENTER||ye()},style:{background:o.state.viewBackgroundColor,filter:b?y.ZF:"none",zIndex:2,border:"none",display:"block",padding:"".concat(6,"px"),borderRadius:4,boxShadow:"inset 0 0 0 1px var(--color-primary)",fontFamily:"Assistant",fontSize:"14px",transform:"translate(-".concat(6,"px, ").concat(6,"px)"),color:"var(--color-gray-80)",overflow:"hidden",maxWidth:"".concat(document.body.clientWidth-Y-6,"px")},size:Re.length+1||1,dir:"auto",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off"})}else ue=Z.name==null||Z.name.trim()===""?"Frame ".concat(X+1):Z.name.trim();return(0,r.jsx)("div",{id:o.getFrameNameDOMId(Z),style:{position:"absolute",bottom:"".concat(o.state.height+y.iG.nameOffsetY-B+o.state.offsetTop,"px"),left:"".concat(Y-o.state.offsetLeft,"px"),zIndex:2,fontSize:y.iG.nameFontSize,color:b?y.iG.nameColorDarkTheme:y.iG.nameColorLightTheme,lineHeight:y.iG.nameLineHeight,width:"max-content",maxWidth:"".concat(Z.width,"px"),overflow:Z.id===o.state.editingFrame?"visible":"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",cursor:y.oc.MOVE,pointerEvents:o.state.viewModeEnabled?y.XI.disabled:y.XI.enabled},onPointerDown:function(Te){return o.handleCanvasPointerDown(Te)},onWheel:function(Te){return o.handleWheel(Te)},onContextMenu:o.handleCanvasContextMenu,onDoubleClick:function(){o.setState({editingFrame:Z.id})},children:ue},Z.id)})},this.focusContainer=function(){var b;(b=o.excalidrawContainerRef.current)===null||b===void 0||b.focus()},this.getSceneElementsIncludingDeleted=function(){return o.scene.getElementsIncludingDeleted()},this.getSceneElements=function(){return o.scene.getNonDeletedElements()},this.onInsertElements=function(b){o.addElementsFromPasteOrLibrary({elements:b,position:"center",files:null})},this.onExportImage=function(){var b=(0,l.Z)(m().mark(function Z(X,ue,je){var Y;return m().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return(0,w.L)("export",X,"ui"),B.next=3,(0,N.p1)(X,ue,o.state,o.files,{exportBackground:o.state.exportBackground,name:o.state.name,viewBackgroundColor:o.state.viewBackgroundColor,exportingFrame:je.exportingFrame}).catch(h.FG).catch(function(ye){console.error(ye),o.setState({errorMessage:ye.message})});case 3:Y=B.sent,o.state.exportEmbedScene&&Y&&(0,Ft.g8)(Y)&&o.setState({fileHandle:Y});case 5:case"end":return B.stop()}},Z)}));return function(Z,X,ue){return b.apply(this,arguments)}}(),this.openEyeDropper=function(b){var Z=b.type;zi.e_.set(Vs.$,{swapPreviewOnAlt:!0,colorPickerType:Z==="stroke"?"elementStroke":"elementBackground",onSelect:function(X,ue){var je=Z==="background"&&ue.altKey||Z==="stroke"&&!ue.altKey;o.scene.getSelectedElements(o.state).length&&o.state.activeTool.type==="selection"?o.updateScene({elements:o.scene.getElementsIncludingDeleted().map(function(Y){return o.state.selectedElementIds[Y.id]?(0,E.BE)(Y,(0,K.Z)({},je?"strokeColor":"backgroundColor",X)):Y})}):je?o.syncActionResult({appState:Gt(Gt({},o.state),{},{currentItemStrokeColor:X}),commitToHistory:!0}):o.syncActionResult({appState:Gt(Gt({},o.state),{},{currentItemBackgroundColor:X}),commitToHistory:!0})},keepOpenOnAlt:!1})},this.syncActionResult=(0,h.tH)(function(b){if(!o.unmounted&&b!==!1){var Z=null;if(b.elements&&(b.elements.forEach(function(bt){var Mt;((Mt=o.state.editingElement)===null||Mt===void 0?void 0:Mt.id)===bt.id&&o.state.editingElement!==bt&&(0,te.qP)(bt)&&(Z=bt)}),o.scene.replaceAllElements(b.elements),b.commitToHistory&&o.history.resumeRecording()),b.files&&(o.files=b.replaceFiles?b.files:Gt(Gt({},o.files),b.files),o.addNewImagesToImageCache()),b.appState||Z||o.state.contextMenu){var X,ue,je,Y,B,ye,Re,Te,$e,Qe;b.commitToHistory&&o.history.resumeRecording();var et=(b==null||(X=b.appState)===null||X===void 0?void 0:X.viewModeEnabled)||!1,ft=(b==null||(ue=b.appState)===null||ue===void 0?void 0:ue.zenModeEnabled)||!1,gt=(b==null||(je=b.appState)===null||je===void 0?void 0:je.gridSize)||null,vt=(b==null||(Y=b.appState)===null||Y===void 0?void 0:Y.theme)||o.props.theme||y.C6.LIGHT,on=(B=b==null||(ye=b.appState)===null||ye===void 0?void 0:ye.name)!==null&&B!==void 0?B:o.state.name,Rt=(Re=b==null||(Te=b.appState)===null||Te===void 0?void 0:Te.errorMessage)!==null&&Re!==void 0?Re:o.state.errorMessage;o.props.viewModeEnabled!==void 0&&(et=o.props.viewModeEnabled),o.props.zenModeEnabled!==void 0&&(ft=o.props.zenModeEnabled),o.props.gridModeEnabled!==void 0&&(gt=o.props.gridModeEnabled?y.k:null),o.props.name!==void 0&&(on=o.props.name),(Qe=Z=Z||(($e=b.appState)===null||$e===void 0?void 0:$e.editingElement)||null)!==null&&Qe!==void 0&&Qe.isDeleted&&(Z=null),o.setState(function(bt){return Object.assign(b.appState||{},{contextMenu:null,editingElement:Z,viewModeEnabled:et,zenModeEnabled:ft,gridSize:gt,theme:vt,name:on,errorMessage:Rt})},function(){b.syncHistory&&o.history.setCurrentState(o.state,o.scene.getElementsIncludingDeleted())})}}}),this.onBlur=(0,h.tH)(function(){al=!1,o.setState({isBindingEnabled:!0})}),this.onUnload=function(){o.onBlur()},this.disableEvent=function(b){b.preventDefault()},this.resetHistory=function(){o.history.clear()},this.resetScene=(0,h.tH)(function(b){o.scene.replaceAllElements([]),o.setState(function(Z){return Gt(Gt({},(0,C.im)()),{},{isLoading:(b==null||!b.resetLoadingState)&&Z.isLoading,theme:o.state.theme})}),o.resetHistory()}),this.initializeScene=(0,l.Z)(m().mark(function b(){var Z,X,ue,je,Y;return m().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return"launchQueue"in window&&"LaunchParams"in window&&window.launchQueue.setConsumer(function(){var ye=(0,l.Z)(m().mark(function Re(Te){var $e,Qe;return m().wrap(function(et){for(;;)switch(et.prev=et.next){case 0:if(Te.files.length){et.next=2;break}return et.abrupt("return");case 2:return $e=Te.files[0],et.next=5,$e.getFile();case 5:Qe=et.sent,o.loadFileToCanvas(new File([Qe],Qe.name||"",{type:Qe.type}),$e);case 7:case"end":return et.stop()}},Re)}));return function(Re){return ye.apply(this,arguments)}}()),o.props.theme&&o.setState({theme:o.props.theme}),o.state.isLoading||o.setState({isLoading:!0}),ue=null,B.prev=4,B.next=7,o.props.initialData;case 7:if(B.t0=B.sent,B.t0){B.next=10;break}B.t0=null;case 10:ue=B.t0,(je=ue)!==null&&je!==void 0&&je.libraryItems&&o.library.updateLibrary({libraryItems:ue.libraryItems,merge:!0}).catch(function(ye){console.error(ye)}),B.next=18;break;case 14:B.prev=14,B.t1=B.catch(4),console.error(B.t1),ue={appState:{errorMessage:B.t1.message||"Encountered an error during importing or restoring scene data"}};case 18:(Y=(0,pe.nu)(ue,null,null,{repairBindings:!0})).appState=Gt(Gt({},Y.appState),{},{theme:o.props.theme||Y.appState.theme,openSidebar:((Z=Y.appState)===null||Z===void 0?void 0:Z.openSidebar)||o.state.openSidebar,activeTool:Y.appState.activeTool.type==="image"?Gt(Gt({},Y.appState.activeTool),{},{type:"selection"}):Y.appState.activeTool,isLoading:!1,toast:o.state.toast}),(X=ue)!==null&&X!==void 0&&X.scrollToContent&&(Y.appState=Gt(Gt({},Y.appState),(0,Ie.W)(Y.elements,Gt(Gt({},Y.appState),{},{width:o.state.width,height:o.state.height,offsetTop:o.state.offsetTop,offsetLeft:o.state.offsetLeft})))),o.fonts.loadFontsForElements(Y.elements),o.resetHistory(),o.syncActionResult(Gt(Gt({},Y),{},{commitToHistory:!0}));case 24:case"end":return B.stop()}},b,null,[[4,14]])})),this.isMobileBreakpoint=function(b,Z){return b<y.kV||Z<y.Yx&&b<y.sS},this.refreshViewportBreakpoints=function(){if(o.excalidrawContainerRef.current){var b=document.body,Z=b.clientWidth,X=b.clientHeight,ue=o.device.viewport,je=(0,h.v4)(ue,{isLandscape:Z>X,isMobile:o.isMobileBreakpoint(Z,X)});return ue!==je&&(o.device=Gt(Gt({},o.device),{},{viewport:je}),!0)}},this.refreshEditorBreakpoints=function(){var b=o.excalidrawContainerRef.current;if(b){var Z=b.getBoundingClientRect(),X=Z.width,ue=Z.height,je=o.props.UIOptions.dockedSidebarBreakpoint!=null?o.props.UIOptions.dockedSidebarBreakpoint:y.sk,Y=o.device.editor,B=(0,h.v4)(Y,{isMobile:o.isMobileBreakpoint(X,ue),canFitSidebar:X>je});return Y!==B&&(o.device=Gt(Gt({},o.device),{},{editor:B}),!0)}},this.onResize=(0,h.tH)(function(){o.scene.getElementsIncludingDeleted().forEach(function(b){return Ni.R.delete(b)}),o.refreshViewportBreakpoints(),o.updateDOMRect(),km||o.refreshEditorBreakpoints(),o.setState({})}),this.renderInteractiveSceneCallback=function(b){var Z=b.atLeastOneVisibleElement,X=b.scrollBars,ue=b.elements;X&&(Df=X);var je=!(0,te.iB)(o.state.editingElement)&&!Z&&ue.length>0;o.state.scrolledOutside!==je&&o.setState({scrolledOutside:je}),o.scheduleImageRefresh()},this.onScroll=(0,h.Ds)(function(){var b=o.getCanvasOffsets(),Z=b.offsetTop,X=b.offsetLeft;o.setState(function(ue){return ue.offsetLeft===X&&ue.offsetTop===Z?null:{offsetTop:Z,offsetLeft:X}})},y.HM),this.onCut=(0,h.tH)(function(b){var Z;!((Z=o.excalidrawContainerRef.current)===null||Z===void 0)&&Z.contains(document.activeElement)&&!(0,h.s)(b.target)&&(o.actionManager.executeAction(D.ZM,"keyboard",b),b.preventDefault(),b.stopPropagation())}),this.onCopy=(0,h.tH)(function(b){var Z;!((Z=o.excalidrawContainerRef.current)===null||Z===void 0)&&Z.contains(document.activeElement)&&!(0,h.s)(b.target)&&(o.actionManager.executeAction(D.uN,"keyboard",b),b.preventDefault(),b.stopPropagation())}),this.onTouchStart=function(b){if(y.Dt||b.preventDefault(),!qs)return qs=!0,clearTimeout(Mf),void(Mf=window.setTimeout(Zf.resetTapTwice,y.Gj));if(qs&&b.touches.length===1){var Z=b.touches[0];o.handleCanvasDoubleClick({clientX:Z.clientX,clientY:Z.clientY}),qs=!1,clearTimeout(Mf)}y.Dt&&b.preventDefault(),b.touches.length===2&&o.setState({selectedElementIds:(0,Sr.Oh)({},o.state),activeEmbeddable:null})},this.onTouchEnd=function(b){o.resetContextMenuTimer(),b.touches.length>0?o.setState({previousSelectedElementIds:{},selectedElementIds:(0,Sr.Oh)(o.state.previousSelectedElementIds,o.state)}):Or.pointers.clear()},this.pasteFromClipboard=(0,h.tH)(function(){var b=(0,l.Z)(m().mark(function Z(X){var ue,je,Y,B,ye,Re,Te,$e,Qe,et,ft,gt,vt,on,Rt,bt,Mt;return m().wrap(function(Ht){for(;;)switch(Ht.prev=Ht.next){case 0:if(Y=!!Lf,B=document.activeElement,ye=(ue=o.excalidrawContainerRef.current)===null||ue===void 0?void 0:ue.contains(B),!X||ye){Ht.next=5;break}return Ht.abrupt("return");case 5:if(Re=document.elementFromPoint(o.lastViewportPosition.x,o.lastViewportPosition.y),!X||Re instanceof HTMLCanvasElement&&!(0,h.s)(B)){Ht.next=8;break}return Ht.abrupt("return");case 8:return Te=(0,h.dE)({clientX:o.lastViewportPosition.x,clientY:o.lastViewportPosition.y},o.state),$e=Te.x,Qe=Te.y,et=X==null||(je=X.clipboardData)===null||je===void 0?void 0:je.files[0],Ht.next=12,(0,_.mQ)(X,Y);case 12:if(ft=Ht.sent,et||Y){Ht.next=19;break}if(!ft.mixedContent){Ht.next=18;break}return Ht.abrupt("return",o.addElementsFromMixedContentPaste(ft.mixedContent,{isPlainPaste:Y,sceneX:$e,sceneY:Qe}));case 18:ft.text&&(gt=ft.text.trim()).startsWith("<svg")&>.endsWith("</svg>")&&(et=(0,Ft.Pn)(gt));case 19:if(!(0,Ft.Wr)(et)||ft.spreadsheet){Ht.next=28;break}if(o.isToolSupported("image")){Ht.next=23;break}return o.setState({errorMessage:(0,z.t)("errors.imageToolNotSupported")}),Ht.abrupt("return");case 23:return vt=o.createImageElement({sceneX:$e,sceneY:Qe}),o.insertImageElement(vt,et),o.initializeImageDimensions(vt),o.setState({selectedElementIds:(0,Sr.Oh)((0,K.Z)({},vt.id,!0),o.state)}),Ht.abrupt("return");case 28:if(!o.props.onPaste){Ht.next=40;break}return Ht.prev=29,Ht.next=32,o.props.onPaste(ft,X);case 32:if(Ht.t0=Ht.sent,Ht.t0!==!1){Ht.next=35;break}return Ht.abrupt("return");case 35:Ht.next=40;break;case 37:Ht.prev=37,Ht.t1=Ht.catch(29),console.error(Ht.t1);case 40:if(!ft.errorMessage){Ht.next=44;break}o.setState({errorMessage:ft.errorMessage}),Ht.next=60;break;case 44:if(!ft.spreadsheet||Y){Ht.next=48;break}o.setState({pasteDialog:{data:ft.spreadsheet,shown:!0}}),Ht.next=60;break;case 48:if(!ft.elements){Ht.next=53;break}on=ft.programmaticAPI?(0,Dt.w)(ft.elements):ft.elements,o.addElementsFromPasteOrLibrary({elements:on,files:ft.files||null,position:"cursor",retainSeed:Y}),Ht.next=60;break;case 53:if(!ft.text){Ht.next=60;break}if(bt=(0,x.eX)(ft.text),Y||!(0,x.xm)(bt,o.props.validateEmbeddable)||!/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(bt)&&((Rt=(0,x.LM)(bt))===null||Rt===void 0?void 0:Rt.type)!=="video"){Ht.next=59;break}return(Mt=o.insertEmbeddableElement({sceneX:$e,sceneY:Qe,link:(0,rl.$u)(bt)}))&&o.setState({selectedElementIds:(0,K.Z)({},Mt.id,!0)}),Ht.abrupt("return");case 59:o.addTextFromPaste(ft.text,Y);case 60:o.setActiveTool({type:"selection"}),X==null||X.preventDefault();case 62:case"end":return Ht.stop()}},Z,null,[[29,37]])}));return function(Z){return b.apply(this,arguments)}}()),this.addElementsFromPasteOrLibrary=function(b){var Z=(0,pe.ET)(b.elements,null,void 0),X=(0,te.KP)(Z),ue=(0,j.Z)(X,4),je=ue[0],Y=ue[1],B=ue[2],ye=ue[3],Re=(0,h.TE)(je,B)/2,Te=(0,h.TE)(Y,ye)/2,$e=(0,T.Z)(b.position)==="object"?b.position.clientX:b.position==="cursor"?o.lastViewportPosition.x:o.state.width/2+o.state.offsetLeft,Qe=(0,T.Z)(b.position)==="object"?b.position.clientY:b.position==="cursor"?o.lastViewportPosition.y:o.state.height/2+o.state.offsetTop,et=(0,h.dE)({clientX:$e,clientY:Qe},o.state),ft=et.x-Re,gt=et.y-Te,vt=(0,ie.wC)(ft,gt,o.state.gridSize),on=(0,j.Z)(vt,2),Rt=on[0],bt=on[1],Mt=(0,ae._N)(Z.map(function(ln){return(0,E.BE)(ln,{x:ln.x+Rt-je,y:ln.y+bt-Y})}),{randomizeSeed:!b.retainSeed}),Ht=[].concat((0,f.Z)(o.scene.getElementsIncludingDeleted()),(0,f.Z)(Mt));o.scene.replaceAllElements(Ht),Mt.forEach(function(ln){if((0,te.iB)(ln)&&(0,H.Xh)(ln)){var Bt=(0,ut.tl)(ln);(0,te.oN)(ln,Bt)}}),b.files&&(o.files=Gt(Gt({},o.files),b.files)),o.history.resumeRecording();var an=(0,Sr.aI)(Mt);o.setState(Gt(Gt({},o.state),{},{openSidebar:o.state.openSidebar&&o.device.editor.canFitSidebar&&zi.e_.get(wu.t6)?o.state.openSidebar:null},(0,Ge.bO)({editingGroupId:null,selectedElementIds:an.reduce(function(ln,Bt){return(0,H.Xh)(Bt)||(ln[Bt.id]=!0),ln},{})},o.scene.getNonDeletedElements(),o.state,o)),function(){b.files&&o.addNewImagesToImageCache()}),o.setActiveTool({type:"selection"}),b.fitToContent&&o.scrollToContent(Mt,{fitToContent:!0})},this.setAppState=function(b,Z){o.setState(b,Z)},this.removePointer=function(b){Da&&o.resetContextMenuTimer(),Or.pointers.delete(b.pointerId)},this.toggleLock=function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"ui";o.state.activeTool.locked||(0,w.L)("toolbar","toggleLock","".concat(b," (").concat(o.device.editor.isMobile?"mobile":"desktop",")")),o.setState(function(Z){return{activeTool:Gt(Gt(Gt({},Z.activeTool),(0,h.Om)(o.state,Z.activeTool.locked?{type:"selection"}:Z.activeTool)),{},{locked:!Z.activeTool.locked})}})},this.updateFrameRendering=function(b){o.setState(function(Z){var X,ue,je,Y,B=typeof b=="function"?b(Z.frameRendering):b;return{frameRendering:{enabled:(X=B==null?void 0:B.enabled)!==null&&X!==void 0?X:Z.frameRendering.enabled,clip:(ue=B==null?void 0:B.clip)!==null&&ue!==void 0?ue:Z.frameRendering.clip,name:(je=B==null?void 0:B.name)!==null&&je!==void 0?je:Z.frameRendering.name,outline:(Y=B==null?void 0:B.outline)!==null&&Y!==void 0?Y:Z.frameRendering.outline}}})},this.togglePenMode=function(b){o.setState(function(Z){return{penMode:b??!Z.penMode,penDetected:!0}})},this.onHandToolToggle=function(){o.actionManager.executeAction(Au.eF)},this.zoomCanvas=function(b){o.setState(Gt({},(0,s.E)({viewportX:o.state.width/2+o.state.offsetLeft,viewportY:o.state.height/2+o.state.offsetTop,nextZoom:(0,Ie.j)(b)},o.state)))},this.cancelInProgresAnimation=null,this.scrollToContent=function(){var b,Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o.scene.getNonDeletedElements(),X=arguments.length>1?arguments[1]:void 0;(b=o.cancelInProgresAnimation)===null||b===void 0||b.call(o);var ue=Array.isArray(Z)?Z:[Z],je=o.state.zoom,Y=o.state.scrollX,B=o.state.scrollY;if(X!=null&&X.fitToContent||X!=null&&X.fitToViewport){var ye=(0,Au.JB)({targetElements:ue,appState:o.state,fitToViewport:!(X==null||!X.fitToViewport),viewportZoomFactor:X==null?void 0:X.viewportZoomFactor}),Re=ye.appState;je=Re.zoom,Y=Re.scrollX,B=Re.scrollY}else{var Te=(0,Ie.W)(ue,o.state);Y=Te.scrollX,B=Te.scrollY}if(X!=null&&X.animate){var $e,Qe=o.state.scrollX,et=o.state.scrollY,ft=o.state.zoom.value,gt=(0,h.B4)({fromValues:{scrollX:Qe,scrollY:et,zoom:ft},toValues:{scrollX:Y,scrollY:B,zoom:je.value},interpolateValue:function(vt,on,Rt,bt){if(bt==="zoom")return vt*Math.pow(on/vt,(0,h.Vv)(Rt))},onStep:function(vt){var on=vt.scrollX,Rt=vt.scrollY,bt=vt.zoom;o.setState({scrollX:on,scrollY:Rt,zoom:{value:bt}})},onStart:function(){o.setState({shouldCacheIgnoreZoom:!0})},onEnd:function(){o.setState({shouldCacheIgnoreZoom:!1})},onCancel:function(){o.setState({shouldCacheIgnoreZoom:!1})},duration:($e=X==null?void 0:X.duration)!==null&&$e!==void 0?$e:500});o.cancelInProgresAnimation=function(){gt(),o.cancelInProgresAnimation=null}}else o.setState({scrollX:Y,scrollY:B,zoom:je})},this.translateCanvas=function(b){var Z;(Z=o.cancelInProgresAnimation)===null||Z===void 0||Z.call(o),o.setState(b)},this.setToast=function(b){o.setState({toast:b})},this.restoreFileFromShare=(0,l.Z)(m().mark(function b(){var Z,X,ue,je;return m().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.prev=0,Y.next=3,caches.open("web-share-target");case 3:return Z=Y.sent,Y.next=6,Z.match("shared-file");case 6:if(!(X=Y.sent)){Y.next=16;break}return Y.next=10,X.blob();case 10:return ue=Y.sent,je=new File([ue],ue.name||"",{type:ue.type}),o.loadFileToCanvas(je,null),Y.next=15,Z.delete("shared-file");case 15:window.history.replaceState(null,y.iC,window.location.pathname);case 16:Y.next=21;break;case 18:Y.prev=18,Y.t0=Y.catch(0),o.setState({errorMessage:Y.t0.message});case 21:case"end":return Y.stop()}},b,null,[[0,18]])})),this.addFiles=(0,h.tH)(function(b){var Z=b.reduce(function(X,ue){return X.set(ue.id,ue),X},new Map);o.files=Gt(Gt({},o.files),Object.fromEntries(Z)),o.scene.getNonDeletedElements().forEach(function(X){(0,H.wi)(X)&&Z.has(X.fileId)&&(o.imageCache.delete(X.fileId),Ni.R.delete(X))}),o.scene.informMutation(),o.addNewImagesToImageCache()}),this.updateScene=(0,h.tH)(function(b){b.commitToHistory&&o.history.resumeRecording(),b.appState&&o.setState(b.appState),b.elements&&o.scene.replaceAllElements(b.elements),b.collaborators&&o.setState({collaborators:b.collaborators})}),this.onSceneUpdated=function(){o.setState({})},this.toggleSidebar=function(b){var Z,X,ue=b.name,je=b.tab,Y=b.force;return Y===void 0?Z=((X=o.state.openSidebar)===null||X===void 0?void 0:X.name)===ue?null:ue:Z=Y?ue:null,o.setState({openSidebar:Z?{name:Z,tab:je}:null}),!!Z},this.updateCurrentCursorPosition=(0,h.tH)(function(b){o.lastViewportPosition.x=b.clientX,o.lastViewportPosition.y=b.clientY}),this.onKeyDown=(0,h.tH)(function(b){if("Proxy"in window&&(!b.shiftKey&&/^[A-Z]$/.test(b.key)||b.shiftKey&&/^[a-z]$/.test(b.key))&&(b=new Proxy(b,{get:function(Rt,bt){var Mt=Rt[bt];return typeof Mt=="function"?Mt.bind(Rt):bt==="key"?b.shiftKey?Rt.key.toUpperCase():Rt.key.toLowerCase():Mt}})),b[A.tW.CTRL_OR_CMD]&&b.key.toLowerCase()===A.tW.V&&(Lf=b.shiftKey,clearTimeout(Em),Em=window.setTimeout(function(){Lf=!1},100)),!b[A.tW.CTRL_OR_CMD]||!(0,h.s)(b.target)||b.code!==A.aU.MINUS&&b.code!==A.aU.EQUAL){if(!((0,h.s)(b.target)&&b.key!==A.tW.ESCAPE||(0,A.Wl)(b.key)&&(0,h._Z)(b.target)))if(b.key!==A.tW.QUESTION_MARK){if(b.key.toLowerCase()===A.tW.E&&b.shiftKey&&b[A.tW.CTRL_OR_CMD])return b.preventDefault(),void o.setState({openDialog:"imageExport"});if(b.key===A.tW.PAGE_UP||b.key===A.tW.PAGE_DOWN){var Z=(b.shiftKey?o.state.width:o.state.height)/o.state.zoom.value;b.key===A.tW.PAGE_DOWN&&(Z=-Z),b.shiftKey?o.translateCanvas(function(Rt){return{scrollX:Rt.scrollX+Z}}):o.translateCanvas(function(Rt){return{scrollY:Rt.scrollY+Z}})}if(!o.actionManager.handleKeyDown(b)&&!o.state.viewModeEnabled){if(b[A.tW.CTRL_OR_CMD]&&o.state.isBindingEnabled&&o.setState({isBindingEnabled:!1}),(0,A.Wl)(b.key)){var X=o.state.gridSize&&(b.shiftKey?y.$e:o.state.gridSize)||(b.shiftKey?y.Iw:y.$e),ue=0,je=0;b.key===A.tW.ARROW_LEFT?ue=-X:b.key===A.tW.ARROW_RIGHT?ue=X:b.key===A.tW.ARROW_UP?je=-X:b.key===A.tW.ARROW_DOWN&&(je=X);var Y=o.scene.getSelectedElements({selectedElementIds:o.state.selectedElementIds,includeBoundTextElement:!0,includeElementsInFrames:!0});Y.forEach(function(Rt){(0,E.DR)(Rt,{x:Rt.x+ue,y:Rt.y+je}),(0,L.Ww)(Rt,{simultaneouslyUpdated:Y})}),o.maybeSuggestBindingForAll(Y),b.preventDefault()}else if(b.key===A.tW.ENTER){var B=o.scene.getSelectedElements(o.state);if(B.length===1){var ye=B[0];if(b[A.tW.CTRL_OR_CMD])(0,H.bt)(ye)&&(o.state.editingLinearElement&&o.state.editingLinearElement.elementId===B[0].id||(o.history.resumeRecording(),o.setState({editingLinearElement:new ve._(ye,o.scene)})));else{if((0,te.iB)(ye)||(0,ut.Zr)(ye)){var Re;(0,te.iB)(ye)||(Re=ye);var Te=(0,ut.TP)(ye,o.state),$e=Te.x,Qe=Te.y;return o.startTextEditing({sceneX:$e,sceneY:Qe,container:Re}),void b.preventDefault()}(0,H.He)(ye)&&o.setState({editingFrame:ye.id})}}}else if(!b.ctrlKey&&!b.altKey&&!b.metaKey&&o.state.draggingElement===null){var et=function(Rt){var bt=u.find(function(Mt,Ht){return Mt.numericKey!=null&&Rt===Mt.numericKey.toString()||Mt.key&&(typeof Mt.key=="string"?Mt.key===Rt:Mt.key.includes(Rt))});return(bt==null?void 0:bt.value)||null}(b.key);et?(o.state.activeTool.type!==et&&(0,w.L)("toolbar",et,"keyboard (".concat(o.device.editor.isMobile?"mobile":"desktop",")")),o.setActiveTool({type:et}),b.stopPropagation()):b.key===A.tW.Q&&(o.toggleLock("keyboard"),b.stopPropagation())}if(b.key===A.tW.SPACE&&Or.pointers.size===0&&(al=!0,(0,ar.KJ)(o.interactiveCanvas,y.oc.GRAB),b.preventDefault()),!(b.key!==A.tW.G&&b.key!==A.tW.S||b.altKey||b[A.tW.CTRL_OR_CMD])){var ft=o.scene.getSelectedElements(o.state);if(o.state.activeTool.type==="selection"&&!ft.length)return;b.key===A.tW.G&&((0,Ie.$b)(o.state.activeTool.type)||ft.some(function(Rt){return(0,Ie.$b)(Rt.type)}))&&(o.setState({openPopup:"elementBackground"}),b.stopPropagation()),b.key===A.tW.S&&(o.setState({openPopup:"elementStroke"}),b.stopPropagation())}if(b.key!==A.tW.K||b.altKey||b[A.tW.CTRL_OR_CMD]){!b[A.tW.CTRL_OR_CMD]||b.key!==A.tW.BACKSPACE&&b.key!==A.tW.DELETE||zi.e_.set(ku.w,"clearCanvas");var gt=b.key.toLocaleLowerCase(),vt=gt===A.tW.S&&b.shiftKey,on=b.key===A.tW.I||gt===A.tW.G&&b.shiftKey;(vt||on)&&o.openEyeDropper({type:vt?"stroke":"background"})}else o.state.activeTool.type==="laser"?o.setActiveTool({type:"selection"}):o.setActiveTool({type:"laser"})}}else o.setState({openDialog:"help"})}else b.preventDefault()}),this.onWheel=(0,h.tH)(function(b){b.target instanceof HTMLCanvasElement||!b.ctrlKey||b.preventDefault()}),this.onKeyUp=(0,h.tH)(function(b){if(b.key===A.tW.SPACE&&(o.state.viewModeEnabled?(0,ar.KJ)(o.interactiveCanvas,y.oc.GRAB):o.state.activeTool.type==="selection"?(0,ar.z8)(o.interactiveCanvas):((0,ar.Uk)(o.interactiveCanvas,o.state),o.setState({selectedElementIds:(0,Sr.Oh)({},o.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})),al=!1),b[A.tW.CTRL_OR_CMD]||o.state.isBindingEnabled||o.setState({isBindingEnabled:!0}),(0,A.Wl)(b.key)){var Z=o.scene.getSelectedElements(o.state);(0,L.N1)(o.state)?(0,L.el)(Z):(0,L.H)(Z),o.setState({suggestedBindings:[]})}}),this.isToolSupported=function(b){var Z;return((Z=o.props.UIOptions.tools)===null||Z===void 0?void 0:Z[b])!==!1},this.setActiveTool=function(b){if(o.isToolSupported(b.type)){var Z,X=(0,h.Om)(o.state,b);X.type==="hand"?(0,ar.KJ)(o.interactiveCanvas,y.oc.GRAB):al||(0,ar.Uk)(o.interactiveCanvas,o.state),(0,h.wO)(document.activeElement)&&o.focusContainer(),(0,H.dt)(X.type)||o.setState({suggestedBindings:[]}),X.type==="image"&&o.onImageAction({insertOnCanvasDirectly:(Z=b.type==="image"&&b.insertOnCanvasDirectly)!==null&&Z!==void 0&&Z}),o.setState(function(ue){var je={snapLines:ue.snapLines.length?[]:ue.snapLines,originSnapOffset:null,activeEmbeddable:null};return X.type!=="selection"?Gt(Gt({},ue),{},{activeTool:X,selectedElementIds:(0,Sr.Oh)({},ue),selectedGroupIds:(0,Sr.Oh)({},ue),editingGroupId:null,multiElement:null},je):Gt(Gt({},ue),{},{activeTool:X},je)})}else console.warn('"'.concat(b.type,'" tool is disabled via "UIOptions.canvasActions.tools.').concat(b.type,'"'))},this.setOpenDialog=function(b){o.setState({openDialog:b})},this.setCursor=function(b){(0,ar.KJ)(o.interactiveCanvas,b)},this.resetCursor=function(){(0,ar.z8)(o.interactiveCanvas)},this.isTouchScreenMultiTouchGesture=function(){return Or.pointers.size>=2},this.onGestureStart=(0,h.tH)(function(b){b.preventDefault(),o.isTouchScreenMultiTouchGesture()&&o.setState({selectedElementIds:(0,Sr.Oh)({},o.state),activeEmbeddable:null}),Or.initialScale=o.state.zoom.value}),this.onGestureChange=(0,h.tH)(function(b){if(b.preventDefault(),!o.isTouchScreenMultiTouchGesture()){var Z=Or.initialScale;Z&&o.setState(function(X){return Gt({},(0,s.E)({viewportX:o.lastViewportPosition.x,viewportY:o.lastViewportPosition.y,nextZoom:(0,Ie.j)(Z*b.scale)},X))})}}),this.onGestureEnd=(0,h.tH)(function(b){b.preventDefault(),o.isTouchScreenMultiTouchGesture()&&o.setState({previousSelectedElementIds:{},selectedElementIds:(0,Sr.Oh)(o.state.previousSelectedElementIds,o.state)}),Or.initialScale=null}),this.startTextEditing=function(b){var Z,X,ue,je,Y=b.sceneX,B=b.sceneY,ye=b.insertAtParentCenter,Re=ye===void 0||ye,Te=b.container,$e=!1,Qe=Re&&o.getTextWysiwygSnappedToCenterPosition(Y,B,o.state,Te);Te&&Qe&&((0,ut.WJ)(Te)||($e=!0));var et=null,ft=o.scene.getSelectedElements(o.state),gt=((Z=et=ft.length===1?(0,te.iB)(ft[0])?ft[0]:Te?(0,ut.WJ)(ft[0]):o.getTextElementAtPosition(Y,B):o.getTextElementAtPosition(Y,B))===null||Z===void 0?void 0:Z.fontFamily)||o.state.currentItemFontFamily,vt=((X=et)===null||X===void 0?void 0:X.lineHeight)||(0,ut.PT)(gt),on=o.state.currentItemFontSize;if(!et&&$e&&Te&&!(0,H.Yv)(Te)){var Rt={fontSize:on,fontFamily:gt},bt=(0,ut.AT)((0,h.mO)(Rt),vt),Mt=(0,ut.w_)(on,vt),Ht=Math.max(Te.height,Mt),an=Math.max(Te.width,bt);(0,E.DR)(Te,{height:Ht,width:an}),Y=Te.x+an/2,B=Te.y+Ht/2,Qe&&(Qe=o.getTextWysiwygSnappedToCenterPosition(Y,B,o.state,Te))}var ln=o.getTopLayerFrameAtSceneCoords({x:Y,y:B}),Bt=et||(0,te.VL)({x:Qe?Qe.elementCenterX:Y,y:Qe?Qe.elementCenterY:B,strokeColor:o.state.currentItemStrokeColor,backgroundColor:o.state.currentItemBackgroundColor,fillStyle:o.state.currentItemFillStyle,strokeWidth:o.state.currentItemStrokeWidth,strokeStyle:o.state.currentItemStrokeStyle,roughness:o.state.currentItemRoughness,opacity:o.state.currentItemOpacity,text:"",fontSize:on,fontFamily:gt,textAlign:Qe?"center":o.state.currentItemTextAlign,verticalAlign:Qe?y.oX.MIDDLE:y.hs,containerId:$e?Te==null?void 0:Te.id:void 0,groupIds:(ue=Te==null?void 0:Te.groupIds)!==null&&ue!==void 0?ue:[],lineHeight:vt,angle:(je=Te==null?void 0:Te.angle)!==null&&je!==void 0?je:0,frameId:ln?ln.id:null});if(!et&&$e&&Te&&(0,E.DR)(Te,{boundElements:(Te.boundElements||[]).concat({type:"text",id:Bt.id})}),o.setState({editingElement:Bt}),!et)if(Te&&$e){var Jt=o.scene.getElementIndex(Te.id);o.scene.insertElementAtIndex(Bt,Jt+1)}else o.scene.addNewElement(Bt);o.setState({editingElement:Bt}),o.handleTextWysiwyg(Bt,{isExistingElement:!!et})},this.handleCanvasDoubleClick=function(b){if(!o.state.multiElement&&o.state.activeTool.type==="selection"){var Z=o.scene.getSelectedElements(o.state);if(Z.length===1&&(0,H.bt)(Z[0])){if(b[A.tW.CTRL_OR_CMD]&&(!o.state.editingLinearElement||o.state.editingLinearElement.elementId!==Z[0].id))return o.history.resumeRecording(),void o.setState({editingLinearElement:new ve._(Z[0],o.scene)});if(o.state.editingLinearElement&&o.state.editingLinearElement.elementId===Z[0].id)return}(0,ar.z8)(o.interactiveCanvas);var X=(0,h.dE)(b,o.state),ue=X.x,je=X.y;if((0,Ge.iJ)(o.state).length>0){var Y=o.getElementAtPosition(ue,je),B=Y&&(0,Ge.YS)(Y,o.state.selectedGroupIds);if(B)return void o.setState(function($e){return Gt(Gt({},$e),(0,Ge.bO)({editingGroupId:B,selectedElementIds:(0,K.Z)({},Y.id,!0)},o.scene.getNonDeletedElements(),$e,o))})}if((0,ar.z8)(o.interactiveCanvas),!b[A.tW.CTRL_OR_CMD]&&!o.state.viewModeEnabled){var ye=o.getElementAtPosition(ue,je);if((0,H.gs)(ye))return void o.setState({activeEmbeddable:{element:ye,state:"active"}});var Re=(0,ut.OW)(o.scene.getNonDeletedElements(),o.state,ue,je);if(Re&&((0,H.Xo)(Re)||!(0,h.Qm)(Re.backgroundColor)||(0,Iu.Qu)(Re,o.state,o.frameNameBoundsCache,[ue,je]))){var Te=(0,ut.TP)(Re,o.state);ue=Te.x,je=Te.y}o.startTextEditing({sceneX:ue,sceneY:je,insertAtParentCenter:!b.altKey,container:Re})}}},this.getElementLinkAtPosition=function(b,Z){var X=o.scene.getNonDeletedElements().slice().reverse(),ue=1/0;return X.find(function(je,Y){return Z&&je.id===Z.id&&(ue=Y),je.link&&Y<=ue&&(0,ra.Ni)(je,o.state,[b.x,b.y],o.device.editor.isMobile)})},this.redirectToLink=function(b,Z){var X=(0,ie.LW)(o.lastPointerDownEvent.clientX,o.lastPointerDownEvent.clientY,o.lastPointerUpEvent.clientX,o.lastPointerUpEvent.clientY);if(!(!o.hitLinkElement||Z&&X>y.f||!Z&&X!==0)){var ue=(0,h.dE)(o.lastPointerDownEvent,o.state),je=(0,ra.Ni)(o.hitLinkElement,o.state,[ue.x,ue.y],o.device.editor.isMobile),Y=(0,h.dE)(o.lastPointerUpEvent,o.state),B=(0,ra.Ni)(o.hitLinkElement,o.state,[Y.x,Y.y],o.device.editor.isMobile);if(je&&B){var ye,Re,Te=o.hitLinkElement.link;if(Te&&(Te=(0,rl.$u)(Te),o.props.onLinkOpen&&(Re=(0,h.ag)(y.Ks.EXCALIDRAW_LINK,b.nativeEvent),o.props.onLinkOpen(Gt(Gt({},o.hitLinkElement),{},{link:Te}),Re)),(ye=Re)===null||ye===void 0||!ye.defaultPrevented)){var $e=(0,rl.q$)(Te)?"_self":"_blank",Qe=window.open(void 0,$e);Qe&&(Qe.opener=null,Qe.location=Te)}}}},this.getTopLayerFrameAtSceneCoords=function(b){var Z=o.scene.getNonDeletedFrames().filter(function(X){return(0,Fr.Dn)(b,X)});return Z.length?Z[Z.length-1]:null},this.handleCanvasPointerMove=function(b){o.savePointer(b.clientX,b.clientY,o.state.cursorButton),Or.pointers.has(b.pointerId)&&Or.pointers.set(b.pointerId,{x:b.clientX,y:b.clientY});var Z=Or.initialScale;if(Or.pointers.size===2&&Or.lastCenter&&Z&&Or.initialDistance){var X=le(Or.pointers),ue=X.x-Or.lastCenter.x,je=X.y-Or.lastCenter.y;Or.lastCenter=X;var Y=ke(Array.from(Or.pointers.values())),B=o.state.activeTool.type==="freedraw"&&o.state.penMode?1:Y/Or.initialDistance,ye=B?(0,Ie.j)(Z*B):o.state.zoom.value;o.setState(function(Gr){var bo=(0,s.E)({viewportX:X.x,viewportY:X.y,nextZoom:ye},Gr);o.translateCanvas({zoom:bo.zoom,scrollX:bo.scrollX+ue/ye,scrollY:bo.scrollY+je/ye,shouldCacheIgnoreZoom:!0})}),o.resetShouldCacheIgnoreZoomDebounced()}else Or.lastCenter=Or.initialDistance=Or.initialScale=null;if(!(al||Qs||Tf||(0,C.l$)(o.state))){var Re=(0,Ie._4)(Df,b.clientX-o.state.offsetLeft,b.clientY-o.state.offsetTop).isOverEither;o.state.draggingElement||o.state.multiElement||(Re?(0,ar.z8)(o.interactiveCanvas):(0,ar.Uk)(o.interactiveCanvas,o.state));var Te,$e=(0,h.dE)(b,o.state),Qe=$e.x,et=$e.y;if(o.state.draggingElement||(Te=o.state.activeTool.type)!=="rectangle"&&Te!=="ellipse"&&Te!=="diamond"&&Te!=="frame"&&Te!=="image")o.state.draggingElement||o.setState({snapLines:[]});else{var ft=function(Gr,bo,Tr,uo){if(!ji({event:uo,selectedElements:[],appState:bo}))return{originOffset:{x:0,y:0},snapLines:[]};var Jr,_r=(0,Sr.CF)(Gr,[],bo),aa=_i(bo.zoom.value),vi={x:aa,y:aa},$n=[],Rr=[],eo=oi(_r);try{for(eo.s();!(Jr=eo.n()).done;){var So,_o=Jr.value,Po=oi(il([_o]));try{for(Po.s();!(So=Po.n()).done;){var Ho=So.value,Er=Ho[0]-Tr.x;Math.abs(Er)<=Math.abs(vi.x)&&(Math.abs(Er)<Math.abs(vi.x)&&(Rr.length=0),Rr.push({type:"pointer",points:[Ho,[Ho[0],Tr.y]],direction:"vertical"}),vi.x=Er);var jo=Ho[1]-Tr.y;Math.abs(jo)<=Math.abs(vi.y)&&(Math.abs(jo)<Math.abs(vi.y)&&($n.length=0),$n.push({type:"pointer",points:[Ho,[Tr.x,Ho[1]]],direction:"horizontal"}),vi.y=jo)}}catch(li){Po.e(li)}finally{Po.f()}}}catch(li){eo.e(li)}finally{eo.f()}return{originOffset:{x:Rr.length>0?Rr[0].points[0][0]-Tr.x:0,y:$n.length>0?$n[0].points[0][1]-Tr.y:0},snapLines:[].concat(Rr,$n)}}(o.scene.getNonDeletedElements(),o.state,{x:Qe,y:et},b),gt=ft.originOffset,vt=ft.snapLines;o.setState({snapLines:vt,originSnapOffset:gt})}if(o.state.editingLinearElement&&!o.state.editingLinearElement.isDragging){var on=ve._.handlePointerMove(b,Qe,et,o.state);on&&on!==o.state.editingLinearElement&&(0,be.flushSync)(function(){o.setState({editingLinearElement:on})}),(on==null?void 0:on.lastUncommittedPoint)!=null?o.maybeSuggestBindingAtCursor($e):(0,be.flushSync)(function(){o.setState({suggestedBindings:[]})})}if((0,H.Lx)(o.state.activeTool.type)){var Rt=o.state.draggingElement;(0,H.Mn)(Rt,!1)?o.maybeSuggestBindingsForLinearElementAtCoords(Rt,[$e],o.state.startBoundElement):o.maybeSuggestBindingAtCursor($e)}if(o.state.multiElement){var bt=o.state.multiElement,Mt=bt.x,Ht=bt.y,an=bt.points,ln=bt.lastCommittedPoint,Bt=an[an.length-1];if((0,ar.Uk)(o.interactiveCanvas,o.state),Bt===ln)(0,ie.LW)(Qe-Mt,et-Ht,Bt[0],Bt[1])>=y.qx?(0,E.DR)(bt,{points:[].concat((0,f.Z)(an),[[Qe-Mt,et-Ht]])}):(0,ar.KJ)(o.interactiveCanvas,y.oc.POINTER);else if(an.length>2&&ln&&(0,ie.LW)(Qe-Mt,et-Ht,ln[0],ln[1])<y.qx)(0,ar.KJ)(o.interactiveCanvas,y.oc.POINTER),(0,E.DR)(bt,{points:an.slice(0,-1)});else{var Jt,Mn=(0,ie.wC)(Qe,et,b[A.tW.CTRL_OR_CMD]?null:o.state.gridSize),Un=(0,j.Z)(Mn,2),Qn=Un[0],ir=Un[1],mr=(Jt=bt==null?void 0:bt.lastCommittedPoint)!==null&&Jt!==void 0?Jt:[0,0],pr=(0,j.Z)(mr,2),Kn=pr[0],yr=pr[1],tr=Qn-Mt-Kn,hr=ir-Ht-yr;if((0,A.Ge)(b)){var Mr=(0,te.o4)(Kn+Mt,yr+Ht,Qn,ir);tr=Mr.width,hr=Mr.height}(0,ie.g6)(an,o.state.zoom.value)&&(0,ar.KJ)(o.interactiveCanvas,y.oc.POINTER),(0,E.DR)(bt,{points:[].concat((0,f.Z)(an.slice(0,-1)),[[Kn+tr,yr+hr]])})}}else if(!(b.buttons||o.state.activeTool.type!=="selection"&&o.state.activeTool.type!=="text"&&o.state.activeTool.type!=="eraser")){var Lr=o.scene.getNonDeletedElements(),Cr=o.scene.getSelectedElements(o.state);if(Cr.length!==1||Re||o.state.editingLinearElement){if(Cr.length>1&&!Re){var Qr=(0,te.n2)((0,te.KP)(Cr),Qe,et,o.state.zoom,b.pointerType);if(Qr)return void(0,ar.KJ)(o.interactiveCanvas,(0,te.Un)({transformHandleType:Qr}))}}else{var cr=(0,te.jt)(Lr,o.state,Qe,et,o.state.zoom,b.pointerType);if(cr&&cr.transformHandleType)return void(0,ar.KJ)(o.interactiveCanvas,(0,te.Un)(cr))}var kr=o.getElementAtPosition($e.x,$e.y);if(o.hitLinkElement=o.getElementLinkAtPosition($e,kr),!(0,C.EN)(o.state))if(o.hitLinkElement&&!o.state.selectedElementIds[o.hitLinkElement.id])(0,ar.KJ)(o.interactiveCanvas,y.oc.POINTER),(0,ra.Pp)(o.hitLinkElement,o.state);else if((0,ra.lV)(),kr&&(kr.link||(0,H.gs)(kr))&&o.state.selectedElementIds[kr.id]&&!o.state.contextMenu&&!o.state.showHyperlinkPopup)o.setState({showHyperlinkPopup:"info"});else if(o.state.activeTool.type==="text")(0,ar.KJ)(o.interactiveCanvas,(0,te.iB)(kr)?y.oc.TEXT:y.oc.CROSSHAIR);else if(o.state.viewModeEnabled)(0,ar.KJ)(o.interactiveCanvas,y.oc.GRAB);else if(Re)(0,ar.KJ)(o.interactiveCanvas,y.oc.AUTO);else if(o.state.selectedLinearElement)o.handleHoverSelectedLinearElement(o.state.selectedLinearElement,Qe,et);else if(b[A.tW.CTRL_OR_CMD])(0,ar.KJ)(o.interactiveCanvas,y.oc.AUTO);else{var vo;(kr||o.isHittingCommonBoundingBoxOfSelectedElements($e,Cr))&&(kr==null||!kr.locked)&&(kr&&(0,H.gs)(kr)&&o.isEmbeddableCenter(kr,b,Qe,et)?((0,ar.KJ)(o.interactiveCanvas,y.oc.POINTER),o.setState({activeEmbeddable:{element:kr,state:"hover"}})):((0,ar.KJ)(o.interactiveCanvas,y.oc.MOVE),((vo=o.state.activeEmbeddable)===null||vo===void 0?void 0:vo.state)==="hover"&&o.setState({activeEmbeddable:null})))}}}},this.handleEraser=function(b,Z,X){for(var ue=function(ft){ft.forEach(function(gt){gt.locked||(je.push(gt.id),b.altKey?Z.elementIdsToErase[gt.id]&&Z.elementIdsToErase[gt.id].erase&&(Z.elementIdsToErase[gt.id].erase=!1):Z.elementIdsToErase[gt.id]||(Z.elementIdsToErase[gt.id]={erase:!0,opacity:gt.opacity}))})},je=[],Y=(0,ie.LW)(Z.lastCoords.x,Z.lastCoords.y,X.x,X.y),B=10/o.state.zoom.value,ye=Gt({},Z.lastCoords),Re=0;Re<=Y&&(ue(o.getElementsAtPosition(ye.x,ye.y)),Re!==Y);){var Te=(Re=Math.min(Re+B,Y))/Y,$e=(1-Te)*ye.x+Te*X.x,Qe=(1-Te)*ye.y+Te*X.y;ye.x=$e,ye.y=Qe}var et=o.scene.getElementsIncludingDeleted().map(function(ft){var gt=(0,H.Xh)(ft)&&je.includes(ft.containerId)?ft.containerId:ft.id;if(je.includes(gt)){if(!b.altKey)return(0,E.BE)(ft,{opacity:y.xY});if(Z.elementIdsToErase[gt]&&Z.elementIdsToErase[gt].erase===!1)return(0,E.BE)(ft,{opacity:Z.elementIdsToErase[gt].opacity})}return ft});o.scene.replaceAllElements(et),Z.lastCoords.x=X.x,Z.lastCoords.y=X.y},this.handleTouchMove=function(b){Js=!0},this.handleCanvasPointerDown=function(b){var Z,X;if(o.state.contextMenu&&o.setState({contextMenu:null}),o.state.snapLines&&o.setAppState({snapLines:[]}),o.updateGestureOnPointerDown(b),b.pointerType==="touch"&&o.state.draggingElement&&o.state.draggingElement.type==="freedraw"){var ue=o.state.draggingElement;o.updateScene(Gt(Gt({},ue.points.length<10?{elements:o.scene.getElementsIncludingDeleted().filter(function(vt){return vt.id!==ue.id})}:{}),{},{appState:{draggingElement:null,editingElement:null,startBoundElement:null,suggestedBindings:[],selectedElementIds:(0,Sr.Oh)(Object.keys(o.state.selectedElementIds).filter(function(vt){return vt!==ue.id}).reduce(function(vt,on){return vt[on]=o.state.selectedElementIds[on],vt},{}),o.state)}}))}else{var je=document.getSelection();if(je!=null&&je.anchorNode&&je.removeAllRanges(),o.maybeOpenContextMenuAfterPointerDownOnTouchDevices(b),o.maybeCleanupAfterMissingPointerUp(b),o.state.penDetected||b.pointerType!=="pen"||o.setState(function(vt){return{penMode:!0,penDetected:!0}}),!o.device.isTouchScreen&&["pen","touch"].includes(b.pointerType)&&(o.device=(0,h.v4)(o.device,{isTouchScreen:!0})),!(Qs||(o.lastPointerDownEvent=b,o.handleCanvasPanUsingWheelOrSpaceDrag(b)||(o.setState({lastPointerDownWith:b.pointerType,cursorButton:"down"}),o.savePointer(b.clientX,b.clientY,"down"),b.button!==y.Oh.MAIN&&b.button!==y.Oh.TOUCH||Or.pointers.size>1)))){var Y=o.initialPointerDownState(b);if(o.setState({selectedElementsAreBeingDragged:!1}),!o.handleDraggingScrollBar(b,Y)&&(o.clearSelectionIfNotUsingSelection(),o.updateBindingEnabledOnPointerMove(b),!o.handleSelectionOnPointerDown(b,Y)&&(!o.state.penMode||b.pointerType!=="touch"||o.state.activeTool.type==="selection"||o.state.activeTool.type==="text"||o.state.activeTool.type==="image")))if(o.state.activeTool.type!=="text"){if(o.state.activeTool.type==="arrow"||o.state.activeTool.type==="line")o.handleLinearElementOnPointerDown(b,o.state.activeTool.type,Y);else if(o.state.activeTool.type==="image"){(0,ar.KJ)(o.interactiveCanvas,y.oc.CROSSHAIR);var B=o.state.pendingImageElementId&&o.scene.getElement(o.state.pendingImageElementId);if(!B)return;o.setState({draggingElement:B,editingElement:B,pendingImageElementId:null,multiElement:null});var ye=(0,h.dE)(b,o.state),Re=ye.x,Te=ye.y,$e=o.getTopLayerFrameAtSceneCoords({x:Re,y:Te});(0,E.DR)(B,{x:Re,y:Te,frameId:$e?$e.id:null})}else o.state.activeTool.type==="freedraw"?o.handleFreeDrawElementOnPointerDown(b,o.state.activeTool.type,Y):o.state.activeTool.type==="custom"?(0,ar.Uk)(o.interactiveCanvas,o.state):o.state.activeTool.type==="frame"?o.createFrameElementOnPointerDown(Y):o.state.activeTool.type==="laser"?o.laserPathManager.startPath(Y.lastCoords.x,Y.lastCoords.y):o.state.activeTool.type!=="eraser"&&o.state.activeTool.type!=="hand"&&o.createGenericElementOnPointerDown(o.state.activeTool.type,Y);(Z=o.props)===null||Z===void 0||(X=Z.onPointerDown)===null||X===void 0||X.call(Z,o.state.activeTool,Y),o.onPointerDownEmitter.trigger(o.state.activeTool,Y,b);var Qe=o.onPointerMoveFromPointerDownHandler(Y),et=o.onPointerUpFromPointerDownHandler(Y),ft=o.onKeyDownFromPointerDownHandler(Y),gt=o.onKeyUpFromPointerDownHandler(Y);Aa=et,o.state.viewModeEnabled&&o.state.activeTool.type!=="laser"||(window.addEventListener(y.Ks.POINTER_MOVE,Qe),window.addEventListener(y.Ks.POINTER_UP,et),window.addEventListener(y.Ks.KEYDOWN,ft),window.addEventListener(y.Ks.KEYUP,gt),Y.eventListeners.onMove=Qe,Y.eventListeners.onUp=et,Y.eventListeners.onKeyUp=gt,Y.eventListeners.onKeyDown=ft)}else o.handleTextOnPointerDown(b,Y)}}},this.handleCanvasPointerUp=function(b){var Z,X;o.removePointer(b),o.lastPointerUpEvent=b;var ue=(0,h.dE)({clientX:b.clientX,clientY:b.clientY},o.state),je=b.timeStamp-((Z=(X=o.lastPointerDownEvent)===null||X===void 0?void 0:X.timeStamp)!==null&&Z!==void 0?Z:0);if(o.device.editor.isMobile&&je<300){var Y=o.getElementAtPosition(ue.x,ue.y);if((0,H.gs)(Y)&&o.isEmbeddableCenter(Y,b,ue.x,ue.y))return void o.handleEmbeddableCenterClick(Y)}if(o.device.isTouchScreen){var B=o.getElementAtPosition(ue.x,ue.y);o.hitLinkElement=o.getElementLinkAtPosition(ue,B)}o.hitLinkElement&&!o.state.selectedElementIds[o.hitLinkElement.id]?je<300&&o.hitLinkElement.type==="embeddable"&&!(0,ra.wq)(o.hitLinkElement,o.state,[ue.x,ue.y])?o.handleEmbeddableCenterClick(o.hitLinkElement):o.redirectToLink(b,o.device.isTouchScreen):o.state.viewModeEnabled&&o.setState({activeEmbeddable:null,selectedElementIds:{}})},this.maybeOpenContextMenuAfterPointerDownOnTouchDevices=function(b){b.pointerType==="touch"&&(Js=!1,Da?Js=!0:Da=window.setTimeout(function(){Da=0,Js||o.handleCanvasContextMenu(b)},y.nM))},this.resetContextMenuTimer=function(){clearTimeout(Da),Da=0,Js=!1},this.handleCanvasPanUsingWheelOrSpaceDrag=function(b){if(!(Or.pointers.size<=1&&(b.button===y.Oh.WHEEL||b.button===y.Oh.MAIN&&al||(0,C.l$)(o.state)||o.state.viewModeEnabled))||(0,te.iB)(o.state.editingElement))return!1;Qs=!0,b.preventDefault();var Z=!1,X=/Linux/.test(window.navigator.platform);(0,ar.KJ)(o.interactiveCanvas,y.oc.GRABBING);var ue=b.clientX,je=b.clientY,Y=(0,h.$9)(function(ye){var Re=ue-ye.clientX,Te=je-ye.clientY;if(ue=ye.clientX,je=ye.clientY,X&&!Z&&(Math.abs(Re)>1||Math.abs(Te)>1)){Z=!0;var $e=function Qe(et){document.body.removeEventListener(y.Ks.PASTE,Qe),et.stopPropagation()};document.body.addEventListener(y.Ks.PASTE,$e),window.addEventListener(y.Ks.POINTER_UP,function Qe(){setTimeout(function(){document.body.removeEventListener(y.Ks.PASTE,$e),window.removeEventListener(y.Ks.POINTER_UP,Qe)},100)})}o.translateCanvas({scrollX:o.state.scrollX-Re/o.state.zoom.value,scrollY:o.state.scrollY-Te/o.state.zoom.value})}),B=(0,h.tH)(Aa=function(){Aa=null,Qs=!1,al||(o.state.viewModeEnabled?(0,ar.KJ)(o.interactiveCanvas,y.oc.GRAB):(0,ar.Uk)(o.interactiveCanvas,o.state)),o.setState({cursorButton:"up"}),o.savePointer(b.clientX,b.clientY,"up"),window.removeEventListener(y.Ks.POINTER_MOVE,Y),window.removeEventListener(y.Ks.POINTER_UP,B),window.removeEventListener(y.Ks.BLUR,B),Y.flush()});return window.addEventListener(y.Ks.BLUR,B),window.addEventListener(y.Ks.POINTER_MOVE,Y,{passive:!0}),window.addEventListener(y.Ks.POINTER_UP,B),!0},this.clearSelectionIfNotUsingSelection=function(){o.state.activeTool.type!=="selection"&&o.setState({selectedElementIds:(0,Sr.Oh)({},o.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null})},this.handleSelectionOnPointerDown=function(b,Z){if(o.state.activeTool.type==="selection"){var X=o.scene.getNonDeletedElements(),ue=o.scene.getSelectedElements(o.state);if(ue.length!==1||o.state.editingLinearElement)ue.length>1&&(Z.resize.handleType=(0,te.n2)((0,te.KP)(ue),Z.origin.x,Z.origin.y,o.state.zoom,b.pointerType));else{var je=(0,te.jt)(X,o.state,Z.origin.x,Z.origin.y,o.state.zoom,b.pointerType);je!=null&&(o.setState({resizingElement:je.element}),Z.resize.handleType=je.transformHandleType)}if(Z.resize.handleType)Z.resize.isResizing=!0,Z.resize.offset=(0,h.AK)((0,te.xx)(Z.resize.handleType,ue,Z.origin.x,Z.origin.y)),ue.length===1&&(0,H.bt)(ue[0])&&ue[0].points.length===2&&(Z.resize.arrowDirection=(0,te.T)(Z.resize.handleType,ue[0]));else{var Y;if(o.state.selectedLinearElement){var B=o.state.editingLinearElement||o.state.selectedLinearElement,ye=ve._.handlePointerDown(b,o.state,o.history,Z.origin,B);if(ye.hitElement&&(Z.hit.element=ye.hitElement),ye.linearElementEditor&&(o.setState({selectedLinearElement:ye.linearElementEditor}),o.state.editingLinearElement&&o.setState({editingLinearElement:ye.linearElementEditor})),ye.didAddPoint)return!0}if(Z.hit.element=(Y=Z.hit.element)!==null&&Y!==void 0?Y:o.getElementAtPosition(Z.origin.x,Z.origin.y),Z.hit.element&&o.getElementLinkAtPosition({x:Z.origin.x,y:Z.origin.y},Z.hit.element))return!1;Z.hit.allHitElements=o.getElementsAtPosition(Z.origin.x,Z.origin.y);var Re=Z.hit.element,Te=Z.hit.allHitElements.some(function($e){return o.isASelectedElement($e)});if(Re!==null&&Te||b.shiftKey||Z.hit.hasHitCommonBoundingBoxOfSelectedElements||o.clearSelection(Re),o.state.editingLinearElement)o.setState({selectedElementIds:(0,Sr.Oh)((0,K.Z)({},o.state.editingLinearElement.elementId,!0),o.state)});else if(Re!=null){if(b[A.tW.CTRL_OR_CMD])return o.state.selectedElementIds[Re.id]||(Z.hit.wasAddedToSelection=!0),o.setState(function($e){return Gt(Gt({},(0,Ge.iE)($e,Re)),{},{previousSelectedElementIds:o.state.selectedElementIds})}),!1;o.state.selectedElementIds[Re.id]||(o.state.editingGroupId&&!(0,Ge.Nd)(Re,o.state.editingGroupId)&&o.setState({selectedElementIds:(0,Sr.Oh)({},o.state),selectedGroupIds:{},editingGroupId:null,activeEmbeddable:null}),Te||Z.hit.hasHitCommonBoundingBoxOfSelectedElements||(o.setState(function($e){var Qe=Gt(Gt({},$e.selectedElementIds),{},(0,K.Z)({},Re.id,!0)),et=[];if(Object.keys($e.selectedElementIds).forEach(function(vt){var on=o.scene.getElement(vt);on&&et.push(on)}),Re.type==="frame")(0,Fr.zD)(et,Re.id).forEach(function(vt){delete Qe[vt.id]});else if(Re.frameId)Qe[Re.frameId]&&delete Qe[Re.id];else{var ft=Re.groupIds,gt=new Set(ft.flatMap(function(vt){return(0,Ge.Fb)(o.scene.getNonDeletedElements(),vt)}).filter(function(vt){return vt.type==="frame"}).map(function(vt){return vt.id}));gt.size>0&&et.forEach(function(vt){vt.frameId&>.has(vt.frameId)&&(delete Qe[vt.id],vt.groupIds.flatMap(function(on){return(0,Ge.Fb)(o.scene.getNonDeletedElements(),on)}).forEach(function(on){delete Qe[on.id]}))})}return Gt(Gt({},(0,Ge.bO)({editingGroupId:$e.editingGroupId,selectedElementIds:Qe},o.scene.getNonDeletedElements(),$e,o)),{},{showHyperlinkPopup:!(!Re.link&&!(0,H.gs)(Re))&&"info"})}),Z.hit.wasAddedToSelection=!0))}o.setState({previousSelectedElementIds:o.state.selectedElementIds})}}return!1},this.handleTextOnPointerDown=function(b,Z){if(!(0,te.iB)(o.state.editingElement)){var X=Z.origin.x,ue=Z.origin.y,je=o.getElementAtPosition(X,ue,{includeBoundTextElement:!0}),Y=(0,ut.OW)(o.scene.getNonDeletedElements(),o.state,X,ue);(0,H.Xo)(je)&&(Y=je,X=je.x+je.width/2,ue=je.y+je.height/2),o.startTextEditing({sceneX:X,sceneY:ue,insertAtParentCenter:!b.altKey,container:Y}),(0,ar.z8)(o.interactiveCanvas),o.state.activeTool.locked||o.setState({activeTool:(0,h.Om)(o.state,{type:"selection"})})}},this.handleFreeDrawElementOnPointerDown=function(b,Z,X){var ue=(0,ie.wC)(X.origin.x,X.origin.y,null),je=(0,j.Z)(ue,2),Y=je[0],B=je[1],ye=o.getTopLayerFrameAtSceneCoords({x:Y,y:B}),Re=(0,ae.KE)({type:Z,x:Y,y:B,strokeColor:o.state.currentItemStrokeColor,backgroundColor:o.state.currentItemBackgroundColor,fillStyle:o.state.currentItemFillStyle,strokeWidth:o.state.currentItemStrokeWidth,strokeStyle:o.state.currentItemStrokeStyle,roughness:o.state.currentItemRoughness,opacity:o.state.currentItemOpacity,roundness:null,simulatePressure:b.pressure===.5,locked:!1,frameId:ye?ye.id:null});o.setState(function(Qe){var et=Gt({},Qe.selectedElementIds);return delete et[Re.id],{selectedElementIds:(0,Sr.Oh)(et,Qe)}});var Te=Re.simulatePressure?Re.pressures:[].concat((0,f.Z)(Re.pressures),[b.pressure]);(0,E.DR)(Re,{points:[[0,0]],pressures:Te});var $e=(0,L.Y9)(X.origin,o.scene);o.scene.addNewElement(Re),o.setState({draggingElement:Re,editingElement:Re,startBoundElement:$e,suggestedBindings:[]})},this.insertEmbeddableElement=function(b){var Z,X=b.sceneX,ue=b.sceneY,je=b.link,Y=(0,ie.wC)(X,ue,(Z=o.lastPointerDownEvent)!==null&&Z!==void 0&&Z[A.tW.CTRL_OR_CMD]?null:o.state.gridSize),B=(0,j.Z)(Y,2),ye=B[0],Re=B[1],Te=(0,x.LM)(je);if(Te){Te.warning&&o.setToast({message:Te.warning,closable:!0});var $e=(0,ae.M)({type:"embeddable",x:ye,y:Re,strokeColor:"transparent",backgroundColor:"transparent",fillStyle:o.state.currentItemFillStyle,strokeWidth:o.state.currentItemStrokeWidth,strokeStyle:o.state.currentItemStrokeStyle,roughness:o.state.currentItemRoughness,roundness:o.getCurrentItemRoundness("embeddable"),opacity:o.state.currentItemOpacity,locked:!1,width:Te.aspectRatio.w,height:Te.aspectRatio.h,link:je,validated:null});return o.scene.replaceAllElements([].concat((0,f.Z)(o.scene.getElementsIncludingDeleted()),[$e])),$e}},this.createImageElement=function(b){var Z,X=b.sceneX,ue=b.sceneY,je=b.addToFrameUnderCursor,Y=je===void 0||je,B=(0,ie.wC)(X,ue,(Z=o.lastPointerDownEvent)!==null&&Z!==void 0&&Z[A.tW.CTRL_OR_CMD]?null:o.state.gridSize),ye=(0,j.Z)(B,2),Re=ye[0],Te=ye[1],$e=Y?o.getTopLayerFrameAtSceneCoords({x:Re,y:Te}):null;return(0,te.vw)({type:"image",x:Re,y:Te,strokeColor:o.state.currentItemStrokeColor,backgroundColor:o.state.currentItemBackgroundColor,fillStyle:o.state.currentItemFillStyle,strokeWidth:o.state.currentItemStrokeWidth,strokeStyle:o.state.currentItemStrokeStyle,roughness:o.state.currentItemRoughness,roundness:null,opacity:o.state.currentItemOpacity,locked:!1,frameId:$e?$e.id:null})},this.handleLinearElementOnPointerDown=function(b,Z,X){if(o.state.multiElement){var ue=o.state.multiElement;if(ue.type==="line"&&(0,ie.g6)(ue.points,o.state.zoom.value))return(0,E.DR)(ue,{lastCommittedPoint:ue.points[ue.points.length-1]}),void o.actionManager.executeAction(D.pL);var je=ue.x,Y=ue.y,B=ue.lastCommittedPoint;if(ue.points.length>1&&B&&(0,ie.LW)(X.origin.x-je,X.origin.y-Y,B[0],B[1])<y.qx)return void o.actionManager.executeAction(D.pL);o.setState(function(an){return{selectedElementIds:(0,Sr.Oh)(Gt(Gt({},an.selectedElementIds),{},(0,K.Z)({},ue.id,!0)),an)}}),(0,E.DR)(ue,{lastCommittedPoint:ue.points[ue.points.length-1]}),(0,ar.KJ)(o.interactiveCanvas,y.oc.POINTER)}else{var ye=(0,ie.wC)(X.origin.x,X.origin.y,b[A.tW.CTRL_OR_CMD]?null:o.state.gridSize),Re=(0,j.Z)(ye,2),Te=Re[0],$e=Re[1],Qe=o.getTopLayerFrameAtSceneCoords({x:Te,y:$e}),et=o.state,ft=et.currentItemStartArrowhead,gt=et.currentItemEndArrowhead,vt=Z==="arrow"?[ft,gt]:[null,null],on=(0,j.Z)(vt,2),Rt=on[0],bt=on[1],Mt=(0,te.y8)({type:Z,x:Te,y:$e,strokeColor:o.state.currentItemStrokeColor,backgroundColor:o.state.currentItemBackgroundColor,fillStyle:o.state.currentItemFillStyle,strokeWidth:o.state.currentItemStrokeWidth,strokeStyle:o.state.currentItemStrokeStyle,roughness:o.state.currentItemRoughness,opacity:o.state.currentItemOpacity,roundness:o.state.currentItemRoundness==="round"?{type:y.a6.PROPORTIONAL_RADIUS}:null,startArrowhead:Rt,endArrowhead:bt,locked:!1,frameId:Qe?Qe.id:null});o.setState(function(an){var ln=Gt({},an.selectedElementIds);return delete ln[Mt.id],{selectedElementIds:(0,Sr.Oh)(ln,an)}}),(0,E.DR)(Mt,{points:[].concat((0,f.Z)(Mt.points),[[0,0]])});var Ht=(0,L.Y9)(X.origin,o.scene);o.scene.addNewElement(Mt),o.setState({draggingElement:Mt,editingElement:Mt,startBoundElement:Ht,suggestedBindings:[]})}},this.createGenericElementOnPointerDown=function(b,Z){var X,ue,je=(0,ie.wC)(Z.origin.x,Z.origin.y,(X=o.lastPointerDownEvent)!==null&&X!==void 0&&X[A.tW.CTRL_OR_CMD]?null:o.state.gridSize),Y=(0,j.Z)(je,2),B=Y[0],ye=Y[1],Re=o.getTopLayerFrameAtSceneCoords({x:B,y:ye}),Te={x:B,y:ye,strokeColor:o.state.currentItemStrokeColor,backgroundColor:o.state.currentItemBackgroundColor,fillStyle:o.state.currentItemFillStyle,strokeWidth:o.state.currentItemStrokeWidth,strokeStyle:o.state.currentItemStrokeStyle,roughness:o.state.currentItemRoughness,opacity:o.state.currentItemOpacity,roundness:o.getCurrentItemRoundness(b),locked:!1,frameId:Re?Re.id:null};(ue=b==="embeddable"?(0,ae.M)(Gt({type:"embeddable",validated:null},Te)):(0,te.Up)(Gt({type:b},Te))).type==="selection"?o.setState({selectionElement:ue,draggingElement:ue}):(o.scene.addNewElement(ue),o.setState({multiElement:null,draggingElement:ue,editingElement:ue}))},this.createFrameElementOnPointerDown=function(b){var Z,X=(0,ie.wC)(b.origin.x,b.origin.y,(Z=o.lastPointerDownEvent)!==null&&Z!==void 0&&Z[A.tW.CTRL_OR_CMD]?null:o.state.gridSize),ue=(0,j.Z)(X,2),je=ue[0],Y=ue[1],B=(0,ae.M3)(Gt({x:je,y:Y,opacity:o.state.currentItemOpacity,locked:!1},y.iG));o.scene.replaceAllElements([].concat((0,f.Z)(o.scene.getElementsIncludingDeleted()),[B])),o.setState({multiElement:null,draggingElement:B,editingElement:B})},this.restoreReadyToEraseElements=function(b){var Z=o.scene.getElementsIncludingDeleted().map(function(X){return b.elementIdsToErase[X.id]&&b.elementIdsToErase[X.id].erase?(0,E.BE)(X,{opacity:b.elementIdsToErase[X.id].opacity}):(0,H.Xh)(X)&&b.elementIdsToErase[X.containerId]&&b.elementIdsToErase[X.containerId].erase?(0,E.BE)(X,{opacity:b.elementIdsToErase[X.containerId].opacity}):X.frameId&&b.elementIdsToErase[X.frameId]&&b.elementIdsToErase[X.frameId].erase?(0,E.BE)(X,{opacity:b.elementIdsToErase[X.frameId].opacity}):X});o.scene.replaceAllElements(Z)},this.eraseElements=function(b){var Z=o.scene.getElementsIncludingDeleted().map(function(X){return b.elementIdsToErase[X.id]&&b.elementIdsToErase[X.id].erase||(0,H.Xh)(X)&&b.elementIdsToErase[X.containerId]&&b.elementIdsToErase[X.containerId].erase||X.frameId&&b.elementIdsToErase[X.frameId]&&b.elementIdsToErase[X.frameId].erase?(0,E.BE)(X,{isDeleted:!0}):X});o.history.resumeRecording(),o.scene.replaceAllElements(Z)},this.initializeImage=function(){var b=(0,l.Z)(m().mark(function Z(X){var ue,je,Y,B,ye,Re,Te,$e,Qe,et,ft,gt,vt,on,Rt;return m().wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(B=X.imageFile,ye=X.imageElement,Re=X.showCursorImagePreview,Te=Re!==void 0&&Re,(0,Ft.Wr)(B)){bt.next=3;break}throw new Error((0,z.t)("errors.unsupportedFileType"));case 3:if($e=B.type,(0,ar.KJ)(o.interactiveCanvas,"wait"),$e!==y.LO.svg){bt.next=23;break}return bt.prev=6,bt.t0=Ft.Pn,bt.t1=Hl.bp,bt.next=11,B.text();case 11:return bt.t2=bt.sent,bt.next=14,(0,bt.t1)(bt.t2);case 14:bt.t3=bt.sent,bt.t4=B.name,B=(0,bt.t0)(bt.t3,bt.t4),bt.next=23;break;case 19:throw bt.prev=19,bt.t5=bt.catch(6),console.warn(bt.t5),new Error((0,z.t)("errors.svgImageInsertError"));case 23:return bt.next=25,((ue=(je=o.props).generateIdForFile)===null||ue===void 0?void 0:ue.call(je,B))||(0,Ft.tW)(B);case 25:if(Qe=bt.sent){bt.next=29;break}throw console.warn("Couldn't generate file id or the supplied `generateIdForFile` didn't resolve to one."),new Error((0,z.t)("errors.imageInsertError"));case 29:if((et=o.files[Qe])!=null&&et.dataURL){bt.next=42;break}return bt.prev=31,bt.next=34,(0,Ft.Tu)(B,{maxWidthOrHeight:y.h6});case 34:B=bt.sent,bt.next=40;break;case 37:bt.prev=37,bt.t6=bt.catch(31),console.error("error trying to resing image file on insertion",bt.t6);case 40:if(!(B.size>y.$n)){bt.next=42;break}throw new Error((0,z.t)("errors.fileTooBig",{maxSize:"".concat(Math.trunc(y.$n/1024/1024),"MB")}));case 42:if(Te&&(gt=(ft=o.files[Qe])===null||ft===void 0?void 0:ft.dataURL,vt=gt&&(0,Ft.KG)(gt),o.setImagePreviewCursor(vt||B)),bt.t7=(Y=o.files[Qe])===null||Y===void 0?void 0:Y.dataURL,bt.t7){bt.next=48;break}return bt.next=47,(0,Ft.Sf)(B);case 47:bt.t7=bt.sent;case 48:return on=bt.t7,Rt=(0,E.DR)(ye,{fileId:Qe},!1),bt.abrupt("return",new Promise(function(){var Mt=(0,l.Z)(m().mark(function Ht(an,ln){var Bt,Jt;return m().wrap(function(Mn){for(;;)switch(Mn.prev=Mn.next){case 0:if(Mn.prev=0,o.files=Gt(Gt({},o.files),{},(0,K.Z)({},Qe,{mimeType:$e,id:Qe,dataURL:on,created:Date.now(),lastRetrieved:Date.now()})),Jt=o.imageCache.get(Qe)){Mn.next=7;break}return o.addNewImagesToImageCache(),Mn.next=7,o.updateImageCache([Rt]);case 7:if(!((Jt==null?void 0:Jt.image)instanceof Promise)){Mn.next=10;break}return Mn.next=10,Jt.image;case 10:o.state.pendingImageElementId!==Rt.id&&((Bt=o.state.draggingElement)===null||Bt===void 0?void 0:Bt.id)!==Rt.id&&o.initializeImageDimensions(Rt,!0),an(Rt),Mn.next=18;break;case 14:Mn.prev=14,Mn.t0=Mn.catch(0),console.error(Mn.t0),ln(new Error((0,z.t)("errors.imageInsertError")));case 18:return Mn.prev=18,Te||(0,ar.z8)(o.interactiveCanvas),Mn.finish(18);case 21:case"end":return Mn.stop()}},Ht,null,[[0,14,18,21]])}));return function(Ht,an){return Mt.apply(this,arguments)}}()));case 51:case"end":return bt.stop()}},Z,null,[[6,19],[31,37]])}));return function(Z){return b.apply(this,arguments)}}(),this.insertImageElement=function(){var b=(0,l.Z)(m().mark(function Z(X,ue,je){return m().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(o.isToolSupported("image")){Y.next=3;break}return o.setState({errorMessage:(0,z.t)("errors.imageToolNotSupported")}),Y.abrupt("return");case 3:return o.scene.addNewElement(X),Y.prev=4,Y.next=7,o.initializeImage({imageFile:ue,imageElement:X,showCursorImagePreview:je});case 7:return Y.abrupt("return",Y.sent);case 10:return Y.prev=10,Y.t0=Y.catch(4),(0,E.DR)(X,{isDeleted:!0}),o.actionManager.executeAction(D.pL),o.setState({errorMessage:Y.t0.message||(0,z.t)("errors.imageInsertError")}),Y.abrupt("return",null);case 16:case"end":return Y.stop()}},Z,null,[[4,10]])}));return function(Z,X,ue){return b.apply(this,arguments)}}(),this.setImagePreviewCursor=function(){var b=(0,l.Z)(m().mark(function Z(X){var ue,je,Y,B,ye,Re,Te;return m().wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:return ue=96,$e.next=3,(0,Ft.Tu)(X,{maxWidthOrHeight:ue});case 3:return je=$e.sent,$e.next=6,(0,Ft.Sf)(je);case 6:if(Y=$e.sent,X.type!==y.LO.svg){$e.next=20;break}return $e.next=10,(0,Hl.PK)(Y);case 10:B=$e.sent,ye=Math.min(B.height,ue),(Re=ye*(B.width/B.height))>ue&&(ye=(Re=ue)*(B.height/B.width)),(Te=document.createElement("canvas")).height=ye,Te.width=Re,Te.getContext("2d").drawImage(B,0,0,Re,ye),Y=Te.toDataURL(y.LO.svg);case 20:o.state.pendingImageElementId&&(0,ar.KJ)(o.interactiveCanvas,"url(".concat(Y,") 4 4, auto"));case 21:case"end":return $e.stop()}},Z)}));return function(Z){return b.apply(this,arguments)}}(),this.onImageAction=function(){var b=(0,l.Z)(m().mark(function Z(X){var ue,je,Y,B,ye,Re,Te,$e;return m().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return ue=X.insertOnCanvasDirectly,Qe.prev=1,je=o.state.width/2+o.state.offsetLeft,Y=o.state.height/2+o.state.offsetTop,B=(0,h.dE)({clientX:je,clientY:Y},o.state),ye=B.x,Re=B.y,Qe.next=7,(0,Sn.I$)({description:"Image",extensions:Object.keys(y.KL)});case 7:Te=Qe.sent,$e=o.createImageElement({sceneX:ye,sceneY:Re,addToFrameUnderCursor:!1}),ue?(o.insertImageElement($e,Te),o.initializeImageDimensions($e),o.setState({selectedElementIds:(0,Sr.Oh)((0,K.Z)({},$e.id,!0),o.state)},function(){o.actionManager.executeAction(D.pL)})):o.setState({pendingImageElementId:$e.id},function(){o.insertImageElement($e,Te,!0)}),Qe.next=16;break;case 12:Qe.prev=12,Qe.t0=Qe.catch(1),Qe.t0.name!=="AbortError"?console.error(Qe.t0):console.warn(Qe.t0),o.setState({pendingImageElementId:null,editingElement:null,activeTool:(0,h.Om)(o.state,{type:"selection"})},function(){o.actionManager.executeAction(D.pL)});case 16:case"end":return Qe.stop()}},Z,null,[[1,12]])}));return function(Z){return b.apply(this,arguments)}}(),this.initializeImageDimensions=function(b){var Z,X=arguments.length>1&&arguments[1]!==void 0&&arguments[1],ue=(0,H.wi)(b)&&((Z=o.imageCache.get(b.fileId))===null||Z===void 0?void 0:Z.image);if(!ue||ue instanceof Promise){if(b.width<y.f/o.state.zoom.value&&b.height<y.f/o.state.zoom.value){var je=100/o.state.zoom.value;(0,E.DR)(b,{x:b.x-je/2,y:b.y-je/2,width:je,height:je})}}else if(X||b.width<y.f/o.state.zoom.value&&b.height<y.f/o.state.zoom.value){var Y=Math.max(o.state.height-120,160),B=Math.min(Y,Math.floor(.5*o.state.height)/o.state.zoom.value),ye=Math.min(ue.naturalHeight,B),Re=ye*(ue.naturalWidth/ue.naturalHeight),Te=b.x+b.width/2-Re/2,$e=b.y+b.height/2-ye/2;(0,E.DR)(b,{x:Te,y:$e,width:Re,height:ye})}},this.updateImageCache=function(){var b=(0,l.Z)(m().mark(function Z(X){var ue,je,Y,B,ye,Re,Te,$e=arguments;return m().wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return ue=$e.length>1&&$e[1]!==void 0?$e[1]:o.files,Qe.next=3,(0,Hl.Xx)({imageCache:o.imageCache,fileIds:X.map(function(et){return et.fileId}),files:ue});case 3:if(je=Qe.sent,Y=je.updatedFiles,B=je.erroredFiles,Y.size||B.size){ye=Ii(X);try{for(ye.s();!(Re=ye.n()).done;)Te=Re.value,Y.has(Te.fileId)&&Ni.R.delete(Te)}catch(et){ye.e(et)}finally{ye.f()}}return B.size&&o.scene.replaceAllElements(o.scene.getElementsIncludingDeleted().map(function(et){return(0,H.wi)(et)&&B.has(et.fileId)?(0,E.BE)(et,{status:"error"}):et})),Qe.abrupt("return",{updatedFiles:Y,erroredFiles:B});case 9:case"end":return Qe.stop()}},Z)}));return function(Z){return b.apply(this,arguments)}}(),this.addNewImagesToImageCache=(0,l.Z)(m().mark(function b(){var Z,X,ue,je,Y=arguments;return m().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(Z=Y.length>0&&Y[0]!==void 0?Y[0]:(0,Hl.oA)(o.scene.getNonDeletedElements()),X=Y.length>1&&Y[1]!==void 0?Y[1]:o.files,!(ue=Z.filter(function(ye){return!ye.isDeleted&&!o.imageCache.has(ye.fileId)})).length){B.next=9;break}return B.next=6,o.updateImageCache(ue,X);case 6:je=B.sent,je.updatedFiles.size&&o.scene.informMutation();case 9:case"end":return B.stop()}},b)})),this.scheduleImageRefresh=gf()(function(){o.addNewImagesToImageCache()},y.LL),this.updateBindingEnabledOnPointerMove=function(b){var Z=(0,L.cz)(b);o.state.isBindingEnabled!==Z&&o.setState({isBindingEnabled:Z})},this.maybeSuggestBindingAtCursor=function(b){var Z=(0,L.Y9)(b,o.scene);o.setState({suggestedBindings:Z!=null?[Z]:[]})},this.maybeSuggestBindingsForLinearElementAtCoords=function(b,Z,X){if(Z.length){var ue=Z.reduce(function(je,Y){var B=(0,L.Y9)(Y,o.scene);return B==null||(0,L.DK)(b,X==null?void 0:X.id,B)||je.push(B),je},[]);o.setState({suggestedBindings:ue})}},this.handleInteractiveCanvasRef=function(b){var Z,X,ue;b!==null?(o.interactiveCanvas=b,o.interactiveCanvas.addEventListener(y.Ks.WHEEL,o.handleWheel),o.interactiveCanvas.addEventListener(y.Ks.TOUCH_START,o.onTouchStart),o.interactiveCanvas.addEventListener(y.Ks.TOUCH_END,o.onTouchEnd)):((Z=o.interactiveCanvas)===null||Z===void 0||Z.removeEventListener(y.Ks.WHEEL,o.handleWheel),(X=o.interactiveCanvas)===null||X===void 0||X.removeEventListener(y.Ks.TOUCH_START,o.onTouchStart),(ue=o.interactiveCanvas)===null||ue===void 0||ue.removeEventListener(y.Ks.TOUCH_END,o.onTouchEnd))},this.handleAppOnDrop=function(){var b=(0,l.Z)(m().mark(function Z(X){var ue,je,Y,B,ye,Re,Te,$e,Qe,et,ft,gt,vt,on,Rt,bt;return m().wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return Mt.next=2,(0,Ft.bv)(X);case 2:if(Y=Mt.sent,B=Y.file,ye=Y.fileHandle,Re=(0,h.dE)(X,o.state),Te=Re.x,$e=Re.y,Mt.prev=6,!(0,Ft.Wr)(B)||!o.isToolSupported("image")){Mt.next=26;break}if((B==null?void 0:B.type)!==y.LO.png&&(B==null?void 0:B.type)!==y.LO.svg){Mt.next=21;break}return Mt.prev=9,Mt.next=12,(0,N.cT)(B,o.state,o.scene.getElementsIncludingDeleted(),ye);case 12:return Qe=Mt.sent,o.syncActionResult(Gt(Gt({},Qe),{},{appState:Gt(Gt({},Qe.appState||o.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0})),Mt.abrupt("return");case 17:if(Mt.prev=17,Mt.t0=Mt.catch(9),Mt.t0.name==="EncodingError"){Mt.next=21;break}throw Mt.t0;case 21:return et=o.createImageElement({sceneX:Te,sceneY:$e}),o.insertImageElement(et,B),o.initializeImageDimensions(et),o.setState({selectedElementIds:(0,Sr.Oh)((0,K.Z)({},et.id,!0),o.state)}),Mt.abrupt("return");case 26:Mt.next=31;break;case 28:return Mt.prev=28,Mt.t1=Mt.catch(6),Mt.abrupt("return",o.setState({isLoading:!1,errorMessage:Mt.t1.message}));case 31:if(!(ft=X.dataTransfer.getData(y.LO.excalidrawlib))||typeof ft!="string"){Mt.next=35;break}try{gt=(0,Ft.wf)(ft),o.addElementsFromPasteOrLibrary({elements:(0,q.WV)(gt),position:X,files:null})}catch(Ht){o.setState({errorMessage:Ht.message})}return Mt.abrupt("return");case 35:if(!B){Mt.next=38;break}return Mt.next=38,o.loadFileToCanvas(B,ye);case 38:(ue=X.dataTransfer)!==null&&ue!==void 0&&(je=ue.types)!==null&&je!==void 0&&je.includes("text/plain")&&(Rt=(vt=X.dataTransfer)===null||vt===void 0?void 0:vt.getData("text"))&&(0,x.xm)(Rt,o.props.validateEmbeddable)&&(/^(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(Rt)||((on=(0,x.LM)(Rt))===null||on===void 0?void 0:on.type)==="video")&&(bt=o.insertEmbeddableElement({sceneX:Te,sceneY:$e,link:(0,rl.$u)(Rt)}))&&o.setState({selectedElementIds:(0,K.Z)({},bt.id,!0)});case 39:case"end":return Mt.stop()}},Z,null,[[6,28],[9,17]])}));return function(Z){return b.apply(this,arguments)}}(),this.loadFileToCanvas=function(){var b=(0,l.Z)(m().mark(function Z(X,ue){var je;return m().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.next=2,(0,Ft.gY)(X);case 2:return X=Y.sent,Y.prev=3,Y.next=6,(0,Ft.ZY)(X,o.state,o.scene.getElementsIncludingDeleted(),ue);case 6:if((je=Y.sent).type!==y.LO.excalidraw){Y.next=12;break}o.setState({isLoading:!0}),o.syncActionResult(Gt(Gt({},je.data),{},{appState:Gt(Gt({},je.data.appState||o.state),{},{isLoading:!1}),replaceFiles:!0,commitToHistory:!0})),Y.next=15;break;case 12:if(je.type!==y.LO.excalidrawlib){Y.next=15;break}return Y.next=15,o.library.updateLibrary({libraryItems:X,merge:!0,openLibraryMenu:!0}).catch(function(B){console.error(B),o.setState({errorMessage:(0,z.t)("errors.importLibraryError")})});case 15:Y.next=23;break;case 17:if(Y.prev=17,Y.t0=Y.catch(3),!(Y.t0 instanceof xf.jk&&Y.t0.code==="IMAGE_NOT_CONTAINS_SCENE_DATA")||o.isToolSupported("image")){Y.next=22;break}return o.setState({isLoading:!1,errorMessage:(0,z.t)("errors.imageToolNotSupported")}),Y.abrupt("return");case 22:o.setState({isLoading:!1,errorMessage:Y.t0.message});case 23:case"end":return Y.stop()}},Z,null,[[3,17]])}));return function(Z,X){return b.apply(this,arguments)}}(),this.handleCanvasContextMenu=function(b){if(b.preventDefault(),!("pointerType"in b.nativeEvent&&b.nativeEvent.pointerType==="touch"||"pointerType"in b.nativeEvent&&b.nativeEvent.pointerType==="pen"&&b.button!==y.Oh.SECONDARY)||o.state.activeTool.type==="selection"){var Z=(0,h.dE)(b,o.state),X=Z.x,ue=Z.y,je=o.getElementAtPosition(X,ue,{preferSelected:!0,includeLockedElements:!0}),Y=o.scene.getSelectedElements(o.state),B=o.isHittingCommonBoundingBoxOfSelectedElements({x:X,y:ue},Y),ye=je||B?"element":"canvas",Re=o.excalidrawContainerRef.current.getBoundingClientRect(),Te=Re.top,$e=Re.left,Qe=b.clientX-$e,et=b.clientY-Te;(0,w.L)("contextMenu","openContextMenu",ye),o.setState(Gt(Gt({},je&&!o.state.selectedElementIds[je.id]?Gt(Gt(Gt({},o.state),(0,Ge.bO)({editingGroupId:o.state.editingGroupId,selectedElementIds:(0,K.Z)({},je.id,!0)},o.scene.getNonDeletedElements(),o.state,o)),{},{selectedLinearElement:(0,H.bt)(je)?new ve._(je,o.scene):null}):o.state),{},{showHyperlinkPopup:!1}),function(){o.setState({contextMenu:{top:et,left:Qe,items:o.getContextMenuItems(ye)}})})}},this.maybeDragNewGenericElement=function(b,Z){var X=o.state.draggingElement,ue=b.lastCoords;if(X)if(X.type==="selection"&&o.state.activeTool.type!=="eraser")(0,te.EJ)(X,o.state.activeTool.type,b.origin.x,b.origin.y,ue.x,ue.y,(0,h.TE)(b.origin.x,ue.x),(0,h.TE)(b.origin.y,ue.y),(0,A.E0)(Z),(0,A.OA)(Z));else{var je,Y,B,ye,Re,Te=(0,ie.wC)(ue.x,ue.y,Z[A.tW.CTRL_OR_CMD]?null:o.state.gridSize),$e=(0,j.Z)(Te,2),Qe=$e[0],et=$e[1],ft=(0,H.wi)(X)&&((je=o.imageCache.get(X.fileId))===null||je===void 0?void 0:je.image),gt=!ft||ft instanceof Promise?null:ft.width/ft.height;o.maybeCacheReferenceSnapPoints(Z,[X]);var vt=function(bt,Mt,Ht,an,ln){var Bt,Jt,Mn,Un;if(!ji({event:Ht,selectedElements:[bt],appState:Mt}))return{snapOffset:{x:0,y:0},snapLines:[]};var Qn=[[an.x+ln.x,an.y+ln.y]],ir=_i(Mt.zoom.value),mr={x:ir,y:ir},pr=[],Kn=[];He([bt],Qn,Mt,Ht,pr,Kn,mr);var yr={x:(Bt=(Jt=pr[0])===null||Jt===void 0?void 0:Jt.offset)!==null&&Bt!==void 0?Bt:0,y:(Mn=(Un=Kn[0])===null||Un===void 0?void 0:Un.offset)!==null&&Mn!==void 0?Mn:0};mr.x=0,mr.y=0,pr.length=0,Kn.length=0;var tr=il([bt],{boundingBoxCorners:!0,omitCenter:!0});return He([bt],tr,Mt,Ht,pr,Kn,mr),{snapOffset:yr,snapLines:st(pr,Kn)}}(X,o.state,Z,{x:b.originInGrid.x+((Y=(B=o.state.originSnapOffset)===null||B===void 0?void 0:B.x)!==null&&Y!==void 0?Y:0),y:b.originInGrid.y+((ye=(Re=o.state.originSnapOffset)===null||Re===void 0?void 0:Re.y)!==null&&ye!==void 0?ye:0)},{x:Qe-b.originInGrid.x,y:et-b.originInGrid.y}),on=vt.snapOffset,Rt=vt.snapLines;Qe+=on.x,et+=on.y,o.setState({snapLines:Rt}),(0,te.EJ)(X,o.state.activeTool.type,b.originInGrid.x,b.originInGrid.y,Qe,et,(0,h.TE)(b.originInGrid.x,Qe),(0,h.TE)(b.originInGrid.y,et),(0,H.pC)(X)?!(0,A.E0)(Z):(0,A.E0)(Z),(0,A.OA)(Z),gt,o.state.originSnapOffset),o.maybeSuggestBindingForAll([X]),o.state.activeTool.type==="frame"&&o.setState({elementsToHighlight:(0,Fr.ni)(o.scene.getNonDeletedElements(),X,o.state)})}},this.maybeHandleResize=function(b,Z){var X=o.scene.getSelectedElements(o.state),ue=X.filter(function(an){return an.type==="frame"}),je=b.resize.handleType;if(ue.length>0&&je==="rotation")return!1;o.setState({isResizing:je&&je!=="rotation",isRotating:je==="rotation",activeEmbeddable:null});var Y=b.lastCoords,B=(0,ie.wC)(Y.x-b.resize.offset.x,Y.y-b.resize.offset.y,Z[A.tW.CTRL_OR_CMD]?null:o.state.gridSize),ye=(0,j.Z)(B,2),Re=ye[0],Te=ye[1],$e=new Map;if(ue.forEach(function(an){(0,Fr.zD)(o.scene.getNonDeletedElements(),an.id).forEach(function(ln){$e.set(an.id+ln.id,{x:ln.x-an.x,y:ln.y-an.y})})}),!o.state.selectedElementsAreBeingDragged){var Qe=(0,ie.wC)(Y.x,Y.y,Z[A.tW.CTRL_OR_CMD]?null:o.state.gridSize),et=(0,j.Z)(Qe,2),ft=et[0],gt=et[1],vt={x:ft-b.originInGrid.x,y:gt-b.originInGrid.y},on=(0,f.Z)(b.originalElements.values());o.maybeCacheReferenceSnapPoints(Z,X);var Rt=at(X,(0,Ie.eD)(on,o.state),o.state,Z,vt,je),bt=Rt.snapOffset,Mt=Rt.snapLines;Re+=bt.x,Te+=bt.y,o.setState({snapLines:Mt})}if((0,te.vY)(b,je,X,b.resize.arrowDirection,(0,A.Ge)(Z),(0,A.OA)(Z),X.length===1&&(0,H.pC)(X[0])?!(0,A.E0)(Z):(0,A.E0)(Z),Re,Te,b.resize.center.x,b.resize.center.y,o.state)){o.maybeSuggestBindingForAll(X);var Ht=new Set;return ue.forEach(function(an){var ln=(0,Fr.zD)(o.scene.getNonDeletedElements(),an.id);je&&(je.includes("w")&&ln.forEach(function(Bt){var Jt,Mn;(0,E.DR)(Bt,{x:an.x+(((Jt=$e.get(an.id+Bt.id))===null||Jt===void 0?void 0:Jt.x)||0),y:an.y+(((Mn=$e.get(an.id+Bt.id))===null||Mn===void 0?void 0:Mn.y)||0)})}),je.includes("n")&&ln.forEach(function(Bt){var Jt,Mn;(0,E.DR)(Bt,{x:an.x+(((Jt=$e.get(an.id+Bt.id))===null||Jt===void 0?void 0:Jt.x)||0),y:an.y+(((Mn=$e.get(an.id+Bt.id))===null||Mn===void 0?void 0:Mn.y)||0)})})),(0,Fr.ni)(o.scene.getNonDeletedElements(),an,o.state).forEach(function(Bt){return Ht.add(Bt)})}),o.setState({elementsToHighlight:(0,f.Z)(Ht)}),!0}return!1},this.getContextMenuItems=function(b){var Z=[];return Z.push(D.jK,D.FA),b==="canvas"?o.state.viewModeEnabled?[].concat(Z,[D.Pb,D.JN,Gs,D.u0]):[Mu.yQ,Be,D.jK,D.FA,D.zp,Be,D.Yy,Xs.U,Be,D.Pb,D.pm,D.JN,Gs,D.u0]:(Z.push(D.zp),o.state.viewModeEnabled?[D.uN].concat(Z):[D.ZM,D.uN,Mu.yQ,bf,yf,Be].concat(Z,[Be,D.pw,D.W3,Be,D.EQ,D.y7,D.vD,Wt.JQ,D.s,Be,D.FL,Be,D.V,D.yA,D.zi,D.BZ,Be,D.jl,D.kt,Be,D.Qs,D.nz,D.xF,D.$h,Be,D.X9]))},this.handleWheel=(0,h.tH)(function(b){if(b.preventDefault(),!Qs){var Z=b.deltaX,X=b.deltaY;if(b.metaKey||b.ctrlKey){var ue=Math.sign(X),je=100*y.V4,Y=Math.abs(X),B=X;Y>je&&(B=je*ue);var ye=o.state.zoom.value-B/100;return ye+=Math.log10(Math.max(1,o.state.zoom.value))*-ue*Math.min(1,Y/20),o.translateCanvas(function(Re){return Gt(Gt({},(0,s.E)({viewportX:o.lastViewportPosition.x,viewportY:o.lastViewportPosition.y,nextZoom:(0,Ie.j)(ye)},Re)),{},{shouldCacheIgnoreZoom:!0})}),void o.resetShouldCacheIgnoreZoomDebounced()}b.shiftKey?o.translateCanvas(function(Re){var Te=Re.zoom;return{scrollX:Re.scrollX-(X||Z)/Te.value}}):o.translateCanvas(function(Re){var Te=Re.zoom,$e=Re.scrollX,Qe=Re.scrollY;return{scrollX:$e-Z/Te.value,scrollY:Qe-X/Te.value}})}}),this.savePointer=function(b,Z,X){var ue,je;if(b&&Z){var Y=(0,h.dE)({clientX:b,clientY:Z},o.state),B=Y.x,ye=Y.y,Re={x:B,y:ye,tool:o.state.activeTool.type==="laser"?"laser":"pointer"};(ue=(je=o.props).onPointerUpdate)===null||ue===void 0||ue.call(je,{pointer:Re,button:X,pointersMap:Or.pointers})}},this.resetShouldCacheIgnoreZoomDebounced=(0,h.Ds)(function(){o.unmounted||o.setState({shouldCacheIgnoreZoom:!1})},300),this.updateDOMRect=function(b){var Z;if((Z=o.excalidrawContainerRef)!==null&&Z!==void 0&&Z.current){var X=o.excalidrawContainerRef.current.getBoundingClientRect(),ue=X.width,je=X.height,Y=X.left,B=X.top,ye=o.state,Re=ye.width,Te=ye.height,$e=ye.offsetTop,Qe=ye.offsetLeft;if(ue===Re&&je===Te&&Y===Qe&&B===$e)return void(b&&b());o.setState({width:ue,height:je,offsetLeft:Y,offsetTop:B},function(){b&&b()})}},this.refresh=function(){o.setState(Gt({},o.getCanvasOffsets()))}};y.Vi.TEST==="production"&&(window.h=window.h||{},Object.defineProperties(window.h,{elements:{configurable:!0,get:function(){var o;return(o=this.app)===null||o===void 0?void 0:o.scene.getElementsIncludingDeleted()},set:function(o){var b;return(b=this.app)===null||b===void 0?void 0:b.scene.replaceAllElements(o)}}}));var b2=Zf},8806:function(fe,Q,t){t.d(Q,{z:function(){return z}});var T=t(7169),j=t(2726),f=t(45),l=t(9827),v=t(3379),k=t.n(v),g=t(7795),a=t.n(g),P=t(569),R=t.n(P),K=t(3565),U=t.n(K),m=t(9216),G=t.n(m),he=t(4589),be=t.n(he),we=t(3137),xe={};xe.styleTagTransform=be(),xe.setAttributes=U(),xe.insert=R().bind(null,"head"),xe.domAPI=a(),xe.insertStyleElement=G(),k()(we.Z,xe),we.Z&&we.Z.locals&&we.Z.locals;var ce=t(4512),D=["type","onSelect","selected","children","className"];function ne(A,E){var L=Object.keys(A);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(A);E&&(h=h.filter(function(y){return Object.getOwnPropertyDescriptor(A,y).enumerable})),L.push.apply(L,h)}return L}function S(A){for(var E=1;E<arguments.length;E++){var L=arguments[E]!=null?arguments[E]:{};E%2?ne(Object(L),!0).forEach(function(h){(0,T.Z)(A,h,L[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(L)):ne(Object(L)).forEach(function(h){Object.defineProperty(A,h,Object.getOwnPropertyDescriptor(L,h))})}return A}var z=function(A){var E=A.type,L=E===void 0?"button":E,h=A.onSelect,y=A.selected,r=A.children,M=A.className,p=M===void 0?"":M,c=(0,j.Z)(A,D);return(0,ce.jsx)("button",S(S({onClick:(0,l.Mj)(c.onClick,function(w){h()}),type:L,className:(0,f.Z)("excalidraw-button",p,{selected:y})},c),{},{children:r}))}},6238:function(fe,Q,t){t.d(Q,{o:function(){return xe}});var T=t(45),j=t(8935),f=t(3379),l=t.n(f),v=t(7795),k=t.n(v),g=t(569),a=t.n(g),P=t(3565),R=t.n(P),K=t(9216),U=t.n(K),m=t(4589),G=t.n(m),he=t(6029),be={};be.styleTagTransform=G(),be.setAttributes=R(),be.insert=a().bind(null,"head"),be.domAPI=k(),be.insertStyleElement=U(),l()(he.Z,be),he.Z&&he.Z.locals&&he.Z.locals;var we=t(4512),xe=function(ce){var D=ce.children,ne=ce.checked,S=ce.onChange,z=ce.className;return(0,we.jsxs)("div",{className:(0,T.Z)("Checkbox",z,{"is-checked":ne}),onClick:function(A){S(!ne,A),A.currentTarget.querySelector(".Checkbox-box").focus()},children:[(0,we.jsx)("button",{className:"Checkbox-box",role:"checkbox","aria-checked":ne,children:j.eQ}),(0,we.jsx)("div",{className:"Checkbox-label",children:D})]})}},193:function(fe,Q,t){t.d(Q,{z:function(){return wf},L:function(){return ji}});var T=t(2577),j=t(9827),f=t(45),l=t(9240),v=t(4512),k=function(me){var Fe,He=me.onChange,Ve=me.type,rt=me.activeColor,st=me.topPicks;return Ve==="elementStroke"&&(Fe=l.fY),Ve==="elementBackground"&&(Fe=l.eq),Ve==="canvasBackground"&&(Fe=l.ay),st&&(Fe=st),Fe?(0,v.jsx)("div",{className:"color-picker__top-picks",children:Fe.map(function(pt){return(0,v.jsx)("button",{className:(0,f.Z)("color-picker__button",{active:pt===rt,"is-transparent":pt==="transparent"||!pt}),style:{"--swatch-color":pt},type:"button",title:pt,onClick:function(){return He(pt)},"data-testid":"color-top-pick-".concat(pt),children:(0,v.jsx)("div",{className:"color-picker__button-outline"})},pt)})}):(console.error("Invalid type for TopPicks"),null)},g=t(9787),a=t.n(g),P=t(8227),R=t(3607),K=t(1930),U=function(me){for(var Fe=me.palette,He=me.color,Ve=0,rt=Object.entries(Fe);Ve<rt.length;Ve++){var st=(0,T.Z)(rt[Ve],2),pt=st[0],at=st[1];if(Array.isArray(at)){var Wt=at.indexOf(He);if(Wt>-1)return{colorName:pt,shade:Wt}}else if(at===He)return{colorName:pt,shade:null}}return null},m=[["q","w","e","r","t"],["a","s","d","f","g"],["z","x","c","v","b"]].flat(),G=function(me){var Fe=me.color,He=me.palette;return!Object.values(He).flat().includes(Fe)},he=(0,R.cn)(null),be=function(me,Fe,He){return(299*me+587*Fe+114*He)/1e3>=160?"black":"white"},we=function(me,Fe){if(Fe){var He=new Option().style;if(He.color=me,He.color){var Ve=He.color.replace(/^(rgb|rgba)\(/,"").replace(/\)$/,"").replace(/\s/g,"").split(","),rt=parseInt(Ve[0]),st=parseInt(Ve[1]),pt=parseInt(Ve[2]);return be(rt,st,pt)}}if(me==="transparent")return"black";var at=parseInt(me.substring(1,3),16),Wt=parseInt(me.substring(3,5),16),dn=parseInt(me.substring(5,7),16);return be(at,Wt,dn)},xe=function(me){var Fe=me.color,He=me.keyLabel,Ve=me.isCustomColor,rt=Ve!==void 0&&Ve,st=me.isShade,pt=st!==void 0&&st;return(0,v.jsxs)("div",{className:"color-picker__button__hotkey-label",style:{color:we(Fe,rt)},children:[pt&&"⇧",He]})},ce=function(me){var Fe=me.hex,He=me.onChange,Ve=me.palette,rt=U({color:Fe||"transparent",palette:Ve}),st=(0,R.KO)(he),pt=(0,T.Z)(st,2),at=pt[0],Wt=pt[1],dn=(0,g.useRef)(null);if((0,g.useEffect)(function(){dn.current&&at==="shades"&&dn.current.focus()},[rt,at]),rt){var qt=rt.colorName,Dt=rt.shade,gn=Ve[qt];if(Array.isArray(gn))return(0,v.jsx)("div",{className:"color-picker-content--default shades",children:gn.map(function(Qt,bn){return(0,v.jsxs)("button",{ref:bn===Dt&&at==="shades"?dn:void 0,tabIndex:-1,type:"button",className:(0,f.Z)("color-picker__button color-picker__button--large",{active:bn===Dt}),"aria-label":"Shade",title:"".concat(qt," - ").concat(bn+1),style:Qt?{"--swatch-color":Qt}:void 0,onClick:function(){He(Qt),Wt("shades")},children:[(0,v.jsx)("div",{className:"color-picker__button-outline"}),(0,v.jsx)(xe,{color:Qt,keyLabel:bn+1,isShade:!0})]},bn)})})}return(0,v.jsxs)("div",{className:"color-picker-content--default",style:{position:"relative"},tabIndex:-1,children:[(0,v.jsx)("button",{type:"button",tabIndex:-1,className:"color-picker__button color-picker__button--large color-picker__button--no-focus-visible"}),(0,v.jsx)("div",{tabIndex:-1,style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"0.75rem"},children:(0,P.t)("colorPicker.noShades")})]})},D=function(me){var Fe=me.palette,He=me.color,Ve=me.onChange,rt=(me.label,me.activeShade),st=U({color:He||"transparent",palette:Fe}),pt=(0,R.KO)(he),at=(0,T.Z)(pt,2),Wt=at[0],dn=at[1],qt=(0,g.useRef)(null);return(0,g.useEffect)(function(){qt.current&&Wt==="baseColors"&&qt.current.focus()},[st==null?void 0:st.colorName,Wt]),(0,v.jsx)("div",{className:"color-picker-content--default",children:Object.entries(Fe).map(function(Dt,gn){var Qt=(0,T.Z)(Dt,2),bn=Qt[0],Kt=Qt[1],pn=(Array.isArray(Kt)?Kt[rt]:Kt)||"transparent",On=m[gn],Ln=(0,P.t)("colors.".concat(bn.replace(/\d+/,"")),null,"");return(0,v.jsxs)("button",{ref:(st==null?void 0:st.colorName)===bn?qt:void 0,tabIndex:-1,type:"button",className:(0,f.Z)("color-picker__button color-picker__button--large",{active:(st==null?void 0:st.colorName)===bn,"is-transparent":pn==="transparent"||!pn}),onClick:function(){Ve(pn),dn("baseColors")},title:"".concat(Ln).concat(pn.startsWith("#")?" ".concat(pn):""," — ").concat(On),"aria-label":"".concat(Ln," — ").concat(On),style:pn?{"--swatch-color":pn}:void 0,"data-testid":"color-".concat(bn),children:[(0,v.jsx)("div",{className:"color-picker__button-outline"}),(0,v.jsx)(xe,{color:pn,keyLabel:On})]},bn)})})},ne=function(me){var Fe=me.colors,He=me.color,Ve=me.onChange,rt=me.label,st=(0,R.KO)(he),pt=(0,T.Z)(st,2),at=pt[0],Wt=pt[1],dn=(0,g.useRef)(null);return(0,g.useEffect)(function(){dn.current&&dn.current.focus()},[He,at]),(0,v.jsx)("div",{className:"color-picker-content--default",children:Fe.map(function(qt,Dt){return(0,v.jsxs)("button",{ref:He===qt?dn:void 0,tabIndex:-1,type:"button",className:(0,f.Z)("color-picker__button color-picker__button--large",{active:He===qt,"is-transparent":qt==="transparent"||!qt}),onClick:function(){Ve(qt),Wt("custom")},title:qt,"aria-label":rt,style:{"--swatch-color":qt},children:[(0,v.jsx)("div",{className:"color-picker__button-outline"}),(0,v.jsx)(xe,{color:qt,keyLabel:Dt+1,isCustomColor:!0})]},Dt)})})},S=t(5491),z=function(me,Fe,He){var Ve,rt=Math.ceil(He/l.dC);switch(Fe=(Ve=Fe)!==null&&Ve!==void 0?Ve:-1,me){case"ArrowLeft":var st=Fe-1;return st<0?He-1:st;case"ArrowRight":return(Fe+1)%He;case"ArrowDown":var pt=Fe+l.dC;return pt>=He?Fe%l.dC:pt;case"ArrowUp":var at=Fe-l.dC,Wt=at<0?l.dC*rt+at:at;return Wt>=He?void 0:Wt}},A=function(me){var Fe=me.event,He=me.activeColorPickerSection,Ve=me.palette,rt=me.color,st=me.onChange,pt=me.customColors,at=me.setActiveColorPickerSection,Wt=me.activeShade,dn=me.onEyeDropperToggle,qt=me.onEscape;if(Fe[S.tW.CTRL_OR_CMD])return!1;if(Fe.key===S.tW.ESCAPE)return qt(Fe),!0;if(Fe.key===S.tW.ALT)return dn(!0),!0;if(Fe.key===S.tW.I)return dn(),!0;var Dt=U({color:rt,palette:Ve});if(Fe.key===S.tW.TAB){var gn={custom:!!pt.length,baseColors:!0,shades:(Dt==null?void 0:Dt.shade)!=null,hex:!0},Qt=Object.entries(gn).reduce(function(sr,fr){var Ir=(0,T.Z)(fr,2),wr=Ir[0];return Ir[1]&&sr.push(wr),sr},[]),bn=Qt.indexOf(He),Kt=Fe.shiftKey?-1:1,pn=Qt[bn+Kt>Qt.length-1?0:bn+Kt<0?Qt.length-1:bn+Kt];return pn&&at(pn),pn==="custom"?st(pt[0]):pn==="baseColors"&&(Object.entries(Ve).find(function(sr){var fr=(0,T.Z)(sr,2),Ir=fr[0],wr=fr[1];return Array.isArray(wr)?wr.includes(rt):wr===rt?Ir:null})||st(l.HO.black)),Fe.preventDefault(),Fe.stopPropagation(),!0}if(function(sr){var fr=sr.e,Ir=sr.colorObj,wr=sr.onChange,Hr=sr.palette,zr=sr.customColors,Oi=sr.setActiveColorPickerSection,Eo=sr.activeShade;if((Ir==null?void 0:Ir.shade)!=null&&["Digit1","Digit2","Digit3","Digit4","Digit5"].includes(fr.code)&&fr.shiftKey){var Bi=Number(fr.code.slice(-1))-1;return wr(Hr[Ir.colorName][Bi]),Oi("shades"),!0}if(["1","2","3","4","5"].includes(fr.key)&&zr[Number(fr.key)-1])return wr(zr[Number(fr.key)-1]),Oi("custom"),!0;if(m.includes(fr.key)){var oa=m.indexOf(fr.key),gi=Hr[Object.keys(Hr)[oa]];return wr(Array.isArray(gi)?gi[Eo]:gi),Oi("baseColors"),!0}return!1}({e:Fe,colorObj:Dt,onChange:st,palette:Ve,customColors:pt,setActiveColorPickerSection:at,activeShade:Wt}))return!0;if(He==="shades"&&Dt){var On=Dt.shade,Ln=z(Fe.key,On,l.dC);if(Ln!==void 0)return st(Ve[Dt.colorName][Ln]),!0}if(He==="baseColors"&&Dt){var Zn=Dt.colorName,_n=Object.keys(Ve),Gn=_n.indexOf(Zn),lr=z(Fe.key,Gn,_n.length);if(lr!==void 0){var dr=Ve[_n[lr]];return st(Array.isArray(dr)?dr[Wt]:dr),!0}}if(He==="custom"){var Wn=pt.indexOf(rt),or=z(Fe.key,Wn,pt.length);if(or!==void 0)return st(pt[or]),!0}return!1},E=function(me){var Fe=me.children;return(0,v.jsx)("div",{className:"color-picker__heading",children:Fe})},L=t(9937),h=function(me){var Fe,He=me.color,Ve=me.onChange,rt=me.label,st=me.type,pt=me.elements,at=me.palette,Wt=me.updateData,dn=me.children,qt=me.onEyeDropperToggle,Dt=me.onEscape,gn=a().useState(function(){return st==="canvasBackground"?[]:function(Wn,or,sr){var fr={elementBackground:"backgroundColor",elementStroke:"strokeColor"},Ir=Wn.filter(function(Hr){if(Hr.isDeleted)return!1;var zr=Hr[fr[or]];return G({color:zr,palette:sr})}),wr=new Map;return Ir.forEach(function(Hr){var zr=Hr[fr[or]];wr.has(zr)?wr.set(zr,wr.get(zr)+1):wr.set(zr,1)}),(0,K.Z)(wr.entries()).sort(function(Hr,zr){return zr[1]-Hr[1]}).map(function(Hr){return Hr[0]}).slice(0,l.Lx)}(pt,st,at)}),Qt=(0,T.Z)(gn,1)[0],bn=(0,R.KO)(he),Kt=(0,T.Z)(bn,2),pn=Kt[0],On=Kt[1],Ln=U({color:He,palette:at});(0,g.useEffect)(function(){if(!pn){var Wn=G({color:He,palette:at}),or=Wn&&!Qt.includes(He);On(or?"hex":Wn?"custom":(Ln==null?void 0:Ln.shade)!=null?"shades":"baseColors")}},[pn,He,at,On,Ln,Qt]);var Zn=(0,g.useState)((Fe=Ln==null?void 0:Ln.shade)!==null&&Fe!==void 0?Fe:st==="elementBackground"?l._T:l.z8),_n=(0,T.Z)(Zn,2),Gn=_n[0],lr=_n[1];(0,g.useEffect)(function(){(Ln==null?void 0:Ln.shade)!=null&&lr(Ln.shade);var Wn=function(or){or.key===S.tW.ALT&&qt(!1)};return document.addEventListener(L.Ks.KEYUP,Wn,{capture:!0}),function(){document.removeEventListener(L.Ks.KEYUP,Wn,{capture:!0})}},[Ln,qt]);var dr=a().useRef(null);return(0,v.jsx)("div",{role:"dialog","aria-modal":"true","aria-label":(0,P.t)("labels.colorPicker"),children:(0,v.jsxs)("div",{ref:dr,onKeyDown:function(Wn){A({event:Wn,activeColorPickerSection:pn,palette:at,color:He,onChange:Ve,onEyeDropperToggle:qt,customColors:Qt,setActiveColorPickerSection:On,updateData:Wt,activeShade:Gn,onEscape:Dt})&&(Wn.preventDefault(),Wn.stopPropagation())},className:"color-picker-content",tabIndex:-1,children:[!!Qt.length&&(0,v.jsxs)("div",{children:[(0,v.jsx)(E,{children:(0,P.t)("colorPicker.mostUsedCustomColors")}),(0,v.jsx)(ne,{colors:Qt,color:He,label:(0,P.t)("colorPicker.mostUsedCustomColors"),onChange:Ve})]}),(0,v.jsxs)("div",{children:[(0,v.jsx)(E,{children:(0,P.t)("colorPicker.colors")}),(0,v.jsx)(D,{color:He,label:rt,palette:at,onChange:Ve,activeShade:Gn})]}),(0,v.jsxs)("div",{children:[(0,v.jsx)(E,{children:(0,P.t)("colorPicker.shades")}),(0,v.jsx)(ce,{hex:He,onChange:Ve,palette:at})]}),dn]})})},y=t(11),r=t(7217),M=t(9335),p=t(1267),c=t(3119),w=t(3060);const O="dismissableLayer.update",$="dismissableLayer.pointerDownOutside",I="dismissableLayer.focusOutside";let C;const _=(0,g.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),N=(0,g.forwardRef)((me,Fe)=>{var He;const{disableOutsidePointerEvents:Ve=!1,onEscapeKeyDown:rt,onPointerDownOutside:st,onFocusOutside:pt,onInteractOutside:at,onDismiss:Wt,...dn}=me,qt=(0,g.useContext)(_),[Dt,gn]=(0,g.useState)(null),Qt=(He=Dt==null?void 0:Dt.ownerDocument)!==null&&He!==void 0?He:globalThis==null?void 0:globalThis.document,[,bn]=(0,g.useState)({}),Kt=(0,M.e)(Fe,Wn=>gn(Wn)),pn=Array.from(qt.layers),[On]=[...qt.layersWithOutsidePointerEventsDisabled].slice(-1),Ln=pn.indexOf(On),Zn=Dt?pn.indexOf(Dt):-1,_n=qt.layersWithOutsidePointerEventsDisabled.size>0,Gn=Zn>=Ln,lr=function(Wn,or=globalThis==null?void 0:globalThis.document){const sr=(0,w.W)(Wn),fr=(0,g.useRef)(!1),Ir=(0,g.useRef)(()=>{});return(0,g.useEffect)(()=>{const wr=zr=>{if(zr.target&&!fr.current){let Eo=function(){pe($,sr,Oi,{discrete:!0})};const Oi={originalEvent:zr};zr.pointerType==="touch"?(or.removeEventListener("click",Ir.current),Ir.current=Eo,or.addEventListener("click",Ir.current,{once:!0})):Eo()}fr.current=!1},Hr=window.setTimeout(()=>{or.addEventListener("pointerdown",wr)},0);return()=>{window.clearTimeout(Hr),or.removeEventListener("pointerdown",wr),or.removeEventListener("click",Ir.current)}},[or,sr]),{onPointerDownCapture:()=>fr.current=!0}}(Wn=>{const or=Wn.target,sr=[...qt.branches].some(fr=>fr.contains(or));Gn&&!sr&&(st==null||st(Wn),at==null||at(Wn),Wn.defaultPrevented||Wt==null||Wt())},Qt),dr=function(Wn,or=globalThis==null?void 0:globalThis.document){const sr=(0,w.W)(Wn),fr=(0,g.useRef)(!1);return(0,g.useEffect)(()=>{const Ir=wr=>{wr.target&&!fr.current&&pe(I,sr,{originalEvent:wr},{discrete:!1})};return or.addEventListener("focusin",Ir),()=>or.removeEventListener("focusin",Ir)},[or,sr]),{onFocusCapture:()=>fr.current=!0,onBlurCapture:()=>fr.current=!1}}(Wn=>{const or=Wn.target;[...qt.branches].some(sr=>sr.contains(or))||(pt==null||pt(Wn),at==null||at(Wn),Wn.defaultPrevented||Wt==null||Wt())},Qt);return function(Wn,or=globalThis==null?void 0:globalThis.document){const sr=(0,w.W)(Wn);(0,g.useEffect)(()=>{const fr=Ir=>{Ir.key==="Escape"&&sr(Ir)};return or.addEventListener("keydown",fr),()=>or.removeEventListener("keydown",fr)},[sr,or])}(Wn=>{Zn===qt.layers.size-1&&(rt==null||rt(Wn),!Wn.defaultPrevented&&Wt&&(Wn.preventDefault(),Wt()))},Qt),(0,g.useEffect)(()=>{if(Dt)return Ve&&(qt.layersWithOutsidePointerEventsDisabled.size===0&&(C=Qt.body.style.pointerEvents,Qt.body.style.pointerEvents="none"),qt.layersWithOutsidePointerEventsDisabled.add(Dt)),qt.layers.add(Dt),q(),()=>{Ve&&qt.layersWithOutsidePointerEventsDisabled.size===1&&(Qt.body.style.pointerEvents=C)}},[Dt,Qt,Ve,qt]),(0,g.useEffect)(()=>()=>{Dt&&(qt.layers.delete(Dt),qt.layersWithOutsidePointerEventsDisabled.delete(Dt),q())},[Dt,qt]),(0,g.useEffect)(()=>{const Wn=()=>bn({});return document.addEventListener(O,Wn),()=>document.removeEventListener(O,Wn)},[]),(0,g.createElement)(c.WV.div,(0,y.Z)({},dn,{ref:Kt,style:{pointerEvents:_n?Gn?"auto":"none":void 0,...me.style},onFocusCapture:(0,r.M)(me.onFocusCapture,dr.onFocusCapture),onBlurCapture:(0,r.M)(me.onBlurCapture,dr.onBlurCapture),onPointerDownCapture:(0,r.M)(me.onPointerDownCapture,lr.onPointerDownCapture)}))});function q(){const me=new CustomEvent(O);document.dispatchEvent(me)}function pe(me,Fe,He,{discrete:Ve}){const rt=He.originalEvent.target,st=new CustomEvent(me,{bubbles:!1,cancelable:!0,detail:He});Fe&&rt.addEventListener(me,Fe,{once:!0}),Ve?(0,c.jH)(rt,st):rt.dispatchEvent(st)}let te=0;function ve(){(0,g.useEffect)(()=>{var me,Fe;const He=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(me=He[0])!==null&&me!==void 0?me:ae()),document.body.insertAdjacentElement("beforeend",(Fe=He[1])!==null&&Fe!==void 0?Fe:ae()),te++,()=>{te===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(Ve=>Ve.remove()),te--}},[])}function ae(){const me=document.createElement("span");return me.setAttribute("data-radix-focus-guard",""),me.tabIndex=0,me.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",me}const H="focusScope.autoFocusOnMount",le="focusScope.autoFocusOnUnmount",ke={bubbles:!1,cancelable:!0},Le=(0,g.forwardRef)((me,Fe)=>{const{loop:He=!1,trapped:Ve=!1,onMountAutoFocus:rt,onUnmountAutoFocus:st,...pt}=me,[at,Wt]=(0,g.useState)(null),dn=(0,w.W)(rt),qt=(0,w.W)(st),Dt=(0,g.useRef)(null),gn=(0,M.e)(Fe,Kt=>Wt(Kt)),Qt=(0,g.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,g.useEffect)(()=>{if(Ve){let Kt=function(On){if(Qt.paused||!at)return;const Ln=On.target;at.contains(Ln)?Dt.current=Ln:Oe(Dt.current,{select:!0})},pn=function(On){!Qt.paused&&at&&(at.contains(On.relatedTarget)||Oe(Dt.current,{select:!0}))};return document.addEventListener("focusin",Kt),document.addEventListener("focusout",pn),()=>{document.removeEventListener("focusin",Kt),document.removeEventListener("focusout",pn)}}},[Ve,at,Qt.paused]),(0,g.useEffect)(()=>{if(at){De.add(Qt);const pn=document.activeElement;if(!at.contains(pn)){const On=new CustomEvent(H,ke);at.addEventListener(H,dn),at.dispatchEvent(On),On.defaultPrevented||(function(Ln,{select:Zn=!1}={}){const _n=document.activeElement;for(const Gn of Ln)if(Oe(Gn,{select:Zn}),document.activeElement!==_n)return}((Kt=Ge(at),Kt.filter(Ln=>Ln.tagName!=="A")),{select:!0}),document.activeElement===pn&&Oe(at))}return()=>{at.removeEventListener(H,dn),setTimeout(()=>{const On=new CustomEvent(le,ke);at.addEventListener(le,qt),at.dispatchEvent(On),On.defaultPrevented||Oe(pn??document.body,{select:!0}),at.removeEventListener(le,qt),De.remove(Qt)},0)}}var Kt},[at,dn,qt,Qt]);const bn=(0,g.useCallback)(Kt=>{if(!He&&!Ve||Qt.paused)return;const pn=Kt.key==="Tab"&&!Kt.altKey&&!Kt.ctrlKey&&!Kt.metaKey,On=document.activeElement;if(pn&&On){const Ln=Kt.currentTarget,[Zn,_n]=function(Gn){const lr=Ge(Gn),dr=Ne(lr,Gn),Wn=Ne(lr.reverse(),Gn);return[dr,Wn]}(Ln);Zn&&_n?Kt.shiftKey||On!==_n?Kt.shiftKey&&On===Zn&&(Kt.preventDefault(),He&&Oe(_n,{select:!0})):(Kt.preventDefault(),He&&Oe(Zn,{select:!0})):On===Ln&&Kt.preventDefault()}},[He,Ve,Qt.paused]);return(0,g.createElement)(c.WV.div,(0,y.Z)({tabIndex:-1},pt,{ref:gn,onKeyDown:bn}))});function Ge(me){const Fe=[],He=document.createTreeWalker(me,NodeFilter.SHOW_ELEMENT,{acceptNode:Ve=>{const rt=Ve.tagName==="INPUT"&&Ve.type==="hidden";return Ve.disabled||Ve.hidden||rt?NodeFilter.FILTER_SKIP:Ve.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;He.nextNode();)Fe.push(He.currentNode);return Fe}function Ne(me,Fe){for(const He of me)if(!Ce(He,{upTo:Fe}))return He}function Ce(me,{upTo:Fe}){if(getComputedStyle(me).visibility==="hidden")return!0;for(;me;){if(Fe!==void 0&&me===Fe)return!1;if(getComputedStyle(me).display==="none")return!0;me=me.parentElement}return!1}function Oe(me,{select:Fe=!1}={}){if(me&&me.focus){const He=document.activeElement;me.focus({preventScroll:!0}),me!==He&&function(Ve){return Ve instanceof HTMLInputElement&&"select"in Ve}(me)&&Fe&&me.select()}}const De=function(){let me=[];return{add(Fe){const He=me[0];Fe!==He&&(He==null||He.pause()),me=Ae(me,Fe),me.unshift(Fe)},remove(Fe){var He;me=Ae(me,Fe),(He=me[0])===null||He===void 0||He.resume()}}}();function Ae(me,Fe){const He=[...me],Ve=He.indexOf(Fe);return Ve!==-1&&He.splice(Ve,1),He}var ie=t(5622);function Ie(me){return me.split("-")[0]}function oe(me){return me.split("-")[1]}function s(me){return["top","bottom"].includes(Ie(me))?"x":"y"}function u(me){return me==="y"?"height":"width"}function x(me,Fe,He){let{reference:Ve,floating:rt}=me;const st=Ve.x+Ve.width/2-rt.width/2,pt=Ve.y+Ve.height/2-rt.height/2,at=s(Fe),Wt=u(at),dn=Ve[Wt]/2-rt[Wt]/2,qt=at==="x";let Dt;switch(Ie(Fe)){case"top":Dt={x:st,y:Ve.y-rt.height};break;case"bottom":Dt={x:st,y:Ve.y+Ve.height};break;case"right":Dt={x:Ve.x+Ve.width,y:pt};break;case"left":Dt={x:Ve.x-rt.width,y:pt};break;default:Dt={x:Ve.x,y:Ve.y}}switch(oe(Fe)){case"start":Dt[at]-=dn*(He&&qt?-1:1);break;case"end":Dt[at]+=dn*(He&&qt?-1:1)}return Dt}function V(me){return typeof me!="number"?function(Fe){return{top:0,right:0,bottom:0,left:0,...Fe}}(me):{top:me,right:me,bottom:me,left:me}}function W(me){return{...me,top:me.y,left:me.x,right:me.x+me.width,bottom:me.y+me.height}}async function re(me,Fe){var He;Fe===void 0&&(Fe={});const{x:Ve,y:rt,platform:st,rects:pt,elements:at,strategy:Wt}=me,{boundary:dn="clippingAncestors",rootBoundary:qt="viewport",elementContext:Dt="floating",altBoundary:gn=!1,padding:Qt=0}=Fe,bn=V(Qt),Kt=at[gn?Dt==="floating"?"reference":"floating":Dt],pn=W(await st.getClippingRect({element:(He=await(st.isElement==null?void 0:st.isElement(Kt)))==null||He?Kt:Kt.contextElement||await(st.getDocumentElement==null?void 0:st.getDocumentElement(at.floating)),boundary:dn,rootBoundary:qt,strategy:Wt})),On=W(st.convertOffsetParentRelativeRectToViewportRelativeRect?await st.convertOffsetParentRelativeRectToViewportRelativeRect({rect:Dt==="floating"?{...pt.floating,x:Ve,y:rt}:pt.reference,offsetParent:await(st.getOffsetParent==null?void 0:st.getOffsetParent(at.floating)),strategy:Wt}):pt[Dt]);return{top:pn.top-On.top+bn.top,bottom:On.bottom-pn.bottom+bn.bottom,left:pn.left-On.left+bn.left,right:On.right-pn.right+bn.right}}const ee=Math.min,se=Math.max;function Ee(me,Fe,He){return se(me,ee(Fe,He))}const _e=me=>({name:"arrow",options:me,async fn(Fe){const{element:He,padding:Ve=0}=me??{},{x:rt,y:st,placement:pt,rects:at,platform:Wt}=Fe;if(He==null)return{};const dn=V(Ve),qt={x:rt,y:st},Dt=s(pt),gn=oe(pt),Qt=u(Dt),bn=await Wt.getDimensions(He),Kt=Dt==="y"?"top":"left",pn=Dt==="y"?"bottom":"right",On=at.reference[Qt]+at.reference[Dt]-qt[Dt]-at.floating[Qt],Ln=qt[Dt]-at.reference[Dt],Zn=await(Wt.getOffsetParent==null?void 0:Wt.getOffsetParent(He));let _n=Zn?Dt==="y"?Zn.clientHeight||0:Zn.clientWidth||0:0;_n===0&&(_n=at.floating[Qt]);const Gn=On/2-Ln/2,lr=dn[Kt],dr=_n-bn[Qt]-dn[pn],Wn=_n/2-bn[Qt]/2+Gn,or=Ee(lr,Wn,dr),sr=(gn==="start"?dn[Kt]:dn[pn])>0&&Wn!==or&&at.reference[Qt]<=at.floating[Qt];return{[Dt]:qt[Dt]-(sr?Wn<lr?lr-Wn:dr-Wn:0),data:{[Dt]:or,centerOffset:Wn-or}}}}),Ue={left:"right",right:"left",bottom:"top",top:"bottom"};function We(me){return me.replace(/left|right|bottom|top/g,Fe=>Ue[Fe])}function Ye(me,Fe,He){He===void 0&&(He=!1);const Ve=oe(me),rt=s(me),st=u(rt);let pt=rt==="x"?Ve===(He?"end":"start")?"right":"left":Ve==="start"?"bottom":"top";return Fe.reference[st]>Fe.floating[st]&&(pt=We(pt)),{main:pt,cross:We(pt)}}const Ze={start:"end",end:"start"};function Je(me){return me.replace(/start|end/g,Fe=>Ze[Fe])}const nt=["top","right","bottom","left"],dt=(nt.reduce((me,Fe)=>me.concat(Fe,Fe+"-start",Fe+"-end"),[]),function(me){return me===void 0&&(me={}),{name:"flip",options:me,async fn(Fe){var He;const{placement:Ve,middlewareData:rt,rects:st,initialPlacement:pt,platform:at,elements:Wt}=Fe,{mainAxis:dn=!0,crossAxis:qt=!0,fallbackPlacements:Dt,fallbackStrategy:gn="bestFit",flipAlignment:Qt=!0,...bn}=me,Kt=Ie(Ve),pn=Dt||(Kt!==pt&&Qt?function(Wn){const or=We(Wn);return[Je(Wn),or,Je(or)]}(pt):[We(pt)]),On=[pt,...pn],Ln=await re(Fe,bn),Zn=[];let _n=((He=rt.flip)==null?void 0:He.overflows)||[];if(dn&&Zn.push(Ln[Kt]),qt){const{main:Wn,cross:or}=Ye(Ve,st,await(at.isRTL==null?void 0:at.isRTL(Wt.floating)));Zn.push(Ln[Wn],Ln[or])}if(_n=[..._n,{placement:Ve,overflows:Zn}],!Zn.every(Wn=>Wn<=0)){var Gn,lr;const Wn=((Gn=(lr=rt.flip)==null?void 0:lr.index)!=null?Gn:0)+1,or=On[Wn];if(or)return{data:{index:Wn,overflows:_n},reset:{placement:or}};let sr="bottom";switch(gn){case"bestFit":{var dr;const fr=(dr=_n.map(Ir=>[Ir,Ir.overflows.filter(wr=>wr>0).reduce((wr,Hr)=>wr+Hr,0)]).sort((Ir,wr)=>Ir[1]-wr[1])[0])==null?void 0:dr[0].placement;fr&&(sr=fr);break}case"initialPlacement":sr=pt}if(Ve!==sr)return{reset:{placement:sr}}}return{}}}});function ge(me,Fe){return{top:me.top-Fe.height,right:me.right-Fe.width,bottom:me.bottom-Fe.height,left:me.left-Fe.width}}function Se(me){return nt.some(Fe=>me[Fe]>=0)}const Be=function(me){let{strategy:Fe="referenceHidden",...He}=me===void 0?{}:me;return{name:"hide",async fn(Ve){const{rects:rt}=Ve;switch(Fe){case"referenceHidden":{const st=ge(await re(Ve,{...He,elementContext:"reference"}),rt.reference);return{data:{referenceHiddenOffsets:st,referenceHidden:Se(st)}}}case"escaped":{const st=ge(await re(Ve,{...He,altBoundary:!0}),rt.floating);return{data:{escapedOffsets:st,escaped:Se(st)}}}default:return{}}}}},Xe=function(me){return me===void 0&&(me=0),{name:"offset",options:me,async fn(Fe){const{x:He,y:Ve}=Fe,rt=await async function(st,pt){const{placement:at,platform:Wt,elements:dn}=st,qt=await(Wt.isRTL==null?void 0:Wt.isRTL(dn.floating)),Dt=Ie(at),gn=oe(at),Qt=s(at)==="x",bn=["left","top"].includes(Dt)?-1:1,Kt=qt&&Qt?-1:1,pn=typeof pt=="function"?pt(st):pt;let{mainAxis:On,crossAxis:Ln,alignmentAxis:Zn}=typeof pn=="number"?{mainAxis:pn,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...pn};return gn&&typeof Zn=="number"&&(Ln=gn==="end"?-1*Zn:Zn),Qt?{x:Ln*Kt,y:On*bn}:{x:On*bn,y:Ln*Kt}}(Fe,me);return{x:He+rt.x,y:Ve+rt.y,data:rt}}}};function lt(me){return me==="x"?"y":"x"}const it=function(me){return me===void 0&&(me={}),{name:"shift",options:me,async fn(Fe){const{x:He,y:Ve,placement:rt}=Fe,{mainAxis:st=!0,crossAxis:pt=!1,limiter:at={fn:pn=>{let{x:On,y:Ln}=pn;return{x:On,y:Ln}}},...Wt}=me,dn={x:He,y:Ve},qt=await re(Fe,Wt),Dt=s(Ie(rt)),gn=lt(Dt);let Qt=dn[Dt],bn=dn[gn];if(st){const pn=Dt==="y"?"bottom":"right";Qt=Ee(Qt+qt[Dt==="y"?"top":"left"],Qt,Qt-qt[pn])}if(pt){const pn=gn==="y"?"bottom":"right";bn=Ee(bn+qt[gn==="y"?"top":"left"],bn,bn-qt[pn])}const Kt=at.fn({...Fe,[Dt]:Qt,[gn]:bn});return{...Kt,data:{x:Kt.x-He,y:Kt.y-Ve}}}}},yt=function(me){return me===void 0&&(me={}),{options:me,fn(Fe){const{x:He,y:Ve,placement:rt,rects:st,middlewareData:pt}=Fe,{offset:at=0,mainAxis:Wt=!0,crossAxis:dn=!0}=me,qt={x:He,y:Ve},Dt=s(rt),gn=lt(Dt);let Qt=qt[Dt],bn=qt[gn];const Kt=typeof at=="function"?at({...st,placement:rt}):at,pn=typeof Kt=="number"?{mainAxis:Kt,crossAxis:0}:{mainAxis:0,crossAxis:0,...Kt};if(Wt){const Gn=Dt==="y"?"height":"width",lr=st.reference[Dt]-st.floating[Gn]+pn.mainAxis,dr=st.reference[Dt]+st.reference[Gn]-pn.mainAxis;Qt<lr?Qt=lr:Qt>dr&&(Qt=dr)}if(dn){var On,Ln,Zn,_n;const Gn=Dt==="y"?"width":"height",lr=["top","left"].includes(Ie(rt)),dr=st.reference[gn]-st.floating[Gn]+(lr&&(On=(Ln=pt.offset)==null?void 0:Ln[gn])!=null?On:0)+(lr?0:pn.crossAxis),Wn=st.reference[gn]+st.reference[Gn]+(lr?0:(Zn=(_n=pt.offset)==null?void 0:_n[gn])!=null?Zn:0)-(lr?pn.crossAxis:0);bn<dr?bn=dr:bn>Wn&&(bn=Wn)}return{[Dt]:Qt,[gn]:bn}}}},_t=function(me){return me===void 0&&(me={}),{name:"size",options:me,async fn(Fe){const{placement:He,rects:Ve,platform:rt,elements:st}=Fe,{apply:pt,...at}=me,Wt=await re(Fe,at),dn=Ie(He),qt=oe(He);let Dt,gn;dn==="top"||dn==="bottom"?(Dt=dn,gn=qt===(await(rt.isRTL==null?void 0:rt.isRTL(st.floating))?"start":"end")?"left":"right"):(gn=dn,Dt=qt==="end"?"top":"bottom");const Qt=se(Wt.left,0),bn=se(Wt.right,0),Kt=se(Wt.top,0),pn=se(Wt.bottom,0),On={availableHeight:Ve.floating.height-(["left","right"].includes(He)?2*(Kt!==0||pn!==0?Kt+pn:se(Wt.top,Wt.bottom)):Wt[Dt]),availableWidth:Ve.floating.width-(["top","bottom"].includes(He)?2*(Qt!==0||bn!==0?Qt+bn:se(Wt.left,Wt.right)):Wt[gn])},Ln=await rt.getDimensions(st.floating);pt==null||pt({...Fe,...On});const Zn=await rt.getDimensions(st.floating);return Ln.width!==Zn.width||Ln.height!==Zn.height?{reset:{rects:!0}}:{}}}};function ut(me){return me&&me.document&&me.location&&me.alert&&me.setInterval}function Tt(me){if(me==null)return window;if(!ut(me)){const Fe=me.ownerDocument;return Fe&&Fe.defaultView||window}return me}function Yt(me){return Tt(me).getComputedStyle(me)}function Zt(me){return ut(me)?"":me?(me.nodeName||"").toLowerCase():""}function Pt(){const me=navigator.userAgentData;return me!=null&&me.brands?me.brands.map(Fe=>Fe.brand+"/"+Fe.version).join(" "):navigator.userAgent}function en(me){return me instanceof Tt(me).HTMLElement}function tn(me){return me instanceof Tt(me).Element}function ot(me){return typeof ShadowRoot<"u"&&(me instanceof Tt(me).ShadowRoot||me instanceof ShadowRoot)}function It(me){const{overflow:Fe,overflowX:He,overflowY:Ve}=Yt(me);return/auto|scroll|overlay|hidden/.test(Fe+Ve+He)}function mt(me){return["table","td","th"].includes(Zt(me))}function jt(me){const Fe=/firefox/i.test(Pt()),He=Yt(me);return He.transform!=="none"||He.perspective!=="none"||He.contain==="paint"||["transform","perspective"].includes(He.willChange)||Fe&&He.willChange==="filter"||Fe&&!!He.filter&&He.filter!=="none"}function xt(){return!/^((?!chrome|android).)*safari/i.test(Pt())}const Nt=Math.min,Ut=Math.max,rn=Math.round;function Ft(me,Fe,He){var Ve,rt,st,pt;Fe===void 0&&(Fe=!1),He===void 0&&(He=!1);const at=me.getBoundingClientRect();let Wt=1,dn=1;Fe&&en(me)&&(Wt=me.offsetWidth>0&&rn(at.width)/me.offsetWidth||1,dn=me.offsetHeight>0&&rn(at.height)/me.offsetHeight||1);const qt=tn(me)?Tt(me):window,Dt=!xt()&&He,gn=(at.left+(Dt&&(Ve=(rt=qt.visualViewport)==null?void 0:rt.offsetLeft)!=null?Ve:0))/Wt,Qt=(at.top+(Dt&&(st=(pt=qt.visualViewport)==null?void 0:pt.offsetTop)!=null?st:0))/dn,bn=at.width/Wt,Kt=at.height/dn;return{width:bn,height:Kt,top:Qt,right:gn+bn,bottom:Qt+Kt,left:gn,x:gn,y:Qt}}function Sn(me){return(Fe=me,(Fe instanceof Tt(Fe).Node?me.ownerDocument:me.document)||window.document).documentElement;var Fe}function mn(me){return tn(me)?{scrollLeft:me.scrollLeft,scrollTop:me.scrollTop}:{scrollLeft:me.pageXOffset,scrollTop:me.pageYOffset}}function Yn(me){return Ft(Sn(me)).left+mn(me).scrollLeft}function ht(me,Fe,He){const Ve=en(Fe),rt=Sn(Fe),st=Ft(me,Ve&&function(Wt){const dn=Ft(Wt);return rn(dn.width)!==Wt.offsetWidth||rn(dn.height)!==Wt.offsetHeight}(Fe),He==="fixed");let pt={scrollLeft:0,scrollTop:0};const at={x:0,y:0};if(Ve||!Ve&&He!=="fixed")if((Zt(Fe)!=="body"||It(rt))&&(pt=mn(Fe)),en(Fe)){const Wt=Ft(Fe,!0);at.x=Wt.x+Fe.clientLeft,at.y=Wt.y+Fe.clientTop}else rt&&(at.x=Yn(rt));return{x:st.left+pt.scrollLeft-at.x,y:st.top+pt.scrollTop-at.y,width:st.width,height:st.height}}function Xt(me){return Zt(me)==="html"?me:me.assignedSlot||me.parentNode||(ot(me)?me.host:null)||Sn(me)}function zt(me){return en(me)&&getComputedStyle(me).position!=="fixed"?me.offsetParent:null}function Vt(me){const Fe=Tt(me);let He=zt(me);for(;He&&mt(He)&&getComputedStyle(He).position==="static";)He=zt(He);return He&&(Zt(He)==="html"||Zt(He)==="body"&&getComputedStyle(He).position==="static"&&!jt(He))?Fe:He||function(Ve){let rt=Xt(Ve);for(ot(rt)&&(rt=rt.host);en(rt)&&!["html","body"].includes(Zt(rt));){if(jt(rt))return rt;rt=rt.parentNode}return null}(me)||Fe}function Tn(me){if(en(me))return{width:me.offsetWidth,height:me.offsetHeight};const Fe=Ft(me);return{width:Fe.width,height:Fe.height}}function Dn(me){const Fe=Xt(me);return["html","body","#document"].includes(Zt(Fe))?me.ownerDocument.body:en(Fe)&&It(Fe)?Fe:Dn(Fe)}function Nn(me,Fe){var He;Fe===void 0&&(Fe=[]);const Ve=Dn(me),rt=Ve===((He=me.ownerDocument)==null?void 0:He.body),st=Tt(Ve),pt=rt?[st].concat(st.visualViewport||[],It(Ve)?Ve:[]):Ve,at=Fe.concat(pt);return rt?at:at.concat(Nn(pt))}function Xn(me,Fe,He){return Fe==="viewport"?W(function(Ve,rt){const st=Tt(Ve),pt=Sn(Ve),at=st.visualViewport;let Wt=pt.clientWidth,dn=pt.clientHeight,qt=0,Dt=0;if(at){Wt=at.width,dn=at.height;const gn=xt();(gn||!gn&&rt==="fixed")&&(qt=at.offsetLeft,Dt=at.offsetTop)}return{width:Wt,height:dn,x:qt,y:Dt}}(me,He)):tn(Fe)?function(Ve,rt){const st=Ft(Ve,!1,rt==="fixed"),pt=st.top+Ve.clientTop,at=st.left+Ve.clientLeft;return{top:pt,left:at,x:at,y:pt,right:at+Ve.clientWidth,bottom:pt+Ve.clientHeight,width:Ve.clientWidth,height:Ve.clientHeight}}(Fe,He):W(function(Ve){var rt;const st=Sn(Ve),pt=mn(Ve),at=(rt=Ve.ownerDocument)==null?void 0:rt.body,Wt=Ut(st.scrollWidth,st.clientWidth,at?at.scrollWidth:0,at?at.clientWidth:0),dn=Ut(st.scrollHeight,st.clientHeight,at?at.scrollHeight:0,at?at.clientHeight:0);let qt=-pt.scrollLeft+Yn(Ve);const Dt=-pt.scrollTop;return Yt(at||st).direction==="rtl"&&(qt+=Ut(st.clientWidth,at?at.clientWidth:0)-Wt),{width:Wt,height:dn,x:qt,y:Dt}}(Sn(me)))}function jn(me){const Fe=Nn(me),He=["absolute","fixed"].includes(Yt(me).position)&&en(me)?Vt(me):me;return tn(He)?Fe.filter(Ve=>tn(Ve)&&function(rt,st){const pt=st.getRootNode==null?void 0:st.getRootNode();if(rt.contains(st))return!0;if(pt&&ot(pt)){let at=st;do{if(at&&rt===at)return!0;at=at.parentNode||at.host}while(at)}return!1}(Ve,He)&&Zt(Ve)!=="body"):[]}const wt={getClippingRect:function(me){let{element:Fe,boundary:He,rootBoundary:Ve,strategy:rt}=me;const st=[...He==="clippingAncestors"?jn(Fe):[].concat(He),Ve],pt=st[0],at=st.reduce((Wt,dn)=>{const qt=Xn(Fe,dn,rt);return Wt.top=Ut(qt.top,Wt.top),Wt.right=Nt(qt.right,Wt.right),Wt.bottom=Nt(qt.bottom,Wt.bottom),Wt.left=Ut(qt.left,Wt.left),Wt},Xn(Fe,pt,rt));return{width:at.right-at.left,height:at.bottom-at.top,x:at.left,y:at.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(me){let{rect:Fe,offsetParent:He,strategy:Ve}=me;const rt=en(He),st=Sn(He);if(He===st)return Fe;let pt={scrollLeft:0,scrollTop:0};const at={x:0,y:0};if((rt||!rt&&Ve!=="fixed")&&((Zt(He)!=="body"||It(st))&&(pt=mn(He)),en(He))){const Wt=Ft(He,!0);at.x=Wt.x+He.clientLeft,at.y=Wt.y+He.clientTop}return{...Fe,x:Fe.x-pt.scrollLeft+at.x,y:Fe.y-pt.scrollTop+at.y}},isElement:tn,getDimensions:Tn,getOffsetParent:Vt,getDocumentElement:Sn,getElementRects:me=>{let{reference:Fe,floating:He,strategy:Ve}=me;return{reference:ht(Fe,Vt(He),Ve),floating:{...Tn(He),x:0,y:0}}},getClientRects:me=>Array.from(me.getClientRects()),isRTL:me=>Yt(me).direction==="rtl"};function Et(me,Fe,He,Ve){Ve===void 0&&(Ve={});const{ancestorScroll:rt=!0,ancestorResize:st=!0,elementResize:pt=!0,animationFrame:at=!1}=Ve,Wt=rt&&!at,dn=st&&!at,qt=Wt||dn?[...tn(me)?Nn(me):[],...Nn(Fe)]:[];qt.forEach(bn=>{Wt&&bn.addEventListener("scroll",He,{passive:!0}),dn&&bn.addEventListener("resize",He)});let Dt,gn=null;if(pt){let bn=!0;gn=new ResizeObserver(()=>{bn||He(),bn=!1}),tn(me)&&!at&&gn.observe(me),gn.observe(Fe)}let Qt=at?Ft(me):null;return at&&function bn(){const Kt=Ft(me);!Qt||Kt.x===Qt.x&&Kt.y===Qt.y&&Kt.width===Qt.width&&Kt.height===Qt.height||He(),Qt=Kt,Dt=requestAnimationFrame(bn)}(),He(),()=>{var bn;qt.forEach(Kt=>{Wt&&Kt.removeEventListener("scroll",He),dn&&Kt.removeEventListener("resize",He)}),(bn=gn)==null||bn.disconnect(),gn=null,at&&cancelAnimationFrame(Dt)}}const Ct=(me,Fe,He)=>(async(Ve,rt,st)=>{const{placement:pt="bottom",strategy:at="absolute",middleware:Wt=[],platform:dn}=st,qt=await(dn.isRTL==null?void 0:dn.isRTL(rt));let Dt=await dn.getElementRects({reference:Ve,floating:rt,strategy:at}),{x:gn,y:Qt}=x(Dt,pt,qt),bn=pt,Kt={},pn=0;for(let On=0;On<Wt.length;On++){const{name:Ln,fn:Zn}=Wt[On],{x:_n,y:Gn,data:lr,reset:dr}=await Zn({x:gn,y:Qt,initialPlacement:pt,placement:bn,strategy:at,middlewareData:Kt,rects:Dt,platform:dn,elements:{reference:Ve,floating:rt}});gn=_n??gn,Qt=Gn??Qt,Kt={...Kt,[Ln]:{...Kt[Ln],...lr}},dr&&pn<=50&&(pn++,typeof dr=="object"&&(dr.placement&&(bn=dr.placement),dr.rects&&(Dt=dr.rects===!0?await dn.getElementRects({reference:Ve,floating:rt,strategy:at}):dr.rects),{x:gn,y:Qt}=x(Dt,bn,qt)),On=-1)}return{x:gn,y:Qt,placement:bn,strategy:at,middlewareData:Kt}})(me,Fe,{platform:wt,...He});var Lt=t(5156),hn=t.n(Lt),yn=typeof document<"u"?g.useLayoutEffect:g.useEffect;function fn(me,Fe){if(me===Fe)return!0;if(typeof me!=typeof Fe)return!1;if(typeof me=="function"&&me.toString()===Fe.toString())return!0;let He,Ve,rt;if(me&&Fe&&typeof me=="object"){if(Array.isArray(me)){if(He=me.length,He!=Fe.length)return!1;for(Ve=He;Ve--!=0;)if(!fn(me[Ve],Fe[Ve]))return!1;return!0}if(rt=Object.keys(me),He=rt.length,He!==Object.keys(Fe).length)return!1;for(Ve=He;Ve--!=0;)if(!Object.prototype.hasOwnProperty.call(Fe,rt[Ve]))return!1;for(Ve=He;Ve--!=0;){const st=rt[Ve];if((st!=="_owner"||!me.$$typeof)&&!fn(me[st],Fe[st]))return!1}return!0}return me!=me&&Fe!=Fe}function Bn(me){let{middleware:Fe,placement:He="bottom",strategy:Ve="absolute",whileElementsMounted:rt}=me===void 0?{}:me;const st=g.useRef(null),pt=g.useRef(null),at=function(Zn){const _n=g.useRef(Zn);return yn(()=>{_n.current=Zn}),_n}(rt),Wt=g.useRef(null),[dn,qt]=g.useState({x:null,y:null,strategy:Ve,placement:He,middlewareData:{}}),[Dt,gn]=g.useState(Fe);fn(Dt==null?void 0:Dt.map(Zn=>{let{options:_n}=Zn;return _n}),Fe==null?void 0:Fe.map(Zn=>{let{options:_n}=Zn;return _n}))||gn(Fe);const Qt=g.useCallback(()=>{st.current&&pt.current&&Ct(st.current,pt.current,{middleware:Dt,placement:He,strategy:Ve}).then(Zn=>{bn.current&&Lt.flushSync(()=>{qt(Zn)})})},[Dt,He,Ve]);yn(()=>{bn.current&&Qt()},[Qt]);const bn=g.useRef(!1);yn(()=>(bn.current=!0,()=>{bn.current=!1}),[]);const Kt=g.useCallback(()=>{if(typeof Wt.current=="function"&&(Wt.current(),Wt.current=null),st.current&&pt.current)if(at.current){const Zn=at.current(st.current,pt.current,Qt);Wt.current=Zn}else Qt()},[Qt,at]),pn=g.useCallback(Zn=>{st.current=Zn,Kt()},[Kt]),On=g.useCallback(Zn=>{pt.current=Zn,Kt()},[Kt]),Ln=g.useMemo(()=>({reference:st,floating:pt}),[]);return g.useMemo(()=>({...dn,update:Qt,refs:Ln,reference:pn,floating:On}),[dn,Qt,Ln,pn,On])}const En=me=>{const{element:Fe,padding:He}=me;return{name:"arrow",options:me,fn(Ve){return rt=Fe,Object.prototype.hasOwnProperty.call(rt,"current")?Fe.current!=null?_e({element:Fe.current,padding:He}).fn(Ve):{}:Fe?_e({element:Fe,padding:He}).fn(Ve):{};var rt}}},Cn=(0,g.forwardRef)((me,Fe)=>{const{children:He,width:Ve=10,height:rt=5,...st}=me;return(0,g.createElement)(c.WV.svg,(0,y.Z)({},st,{ref:Fe,width:Ve,height:rt,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),me.asChild?He:(0,g.createElement)("polygon",{points:"0,0 30,0 15,10"}))}),qn=Cn;var vn=t(3348);const wn="Popper",[In,kn]=(0,p.b)(wn),[nr,Pn]=In(wn),Jn=me=>{const{__scopePopper:Fe,children:He}=me,[Ve,rt]=(0,g.useState)(null);return(0,g.createElement)(nr,{scope:Fe,anchor:Ve,onAnchorChange:rt},He)},xr="PopperAnchor",Nr=(0,g.forwardRef)((me,Fe)=>{const{__scopePopper:He,virtualRef:Ve,...rt}=me,st=Pn(xr,He),pt=(0,g.useRef)(null),at=(0,M.e)(Fe,pt);return(0,g.useEffect)(()=>{st.onAnchorChange((Ve==null?void 0:Ve.current)||pt.current)}),Ve?null:(0,g.createElement)(c.WV.div,(0,y.Z)({},rt,{ref:at}))}),$r="PopperContent",[ao,lo]=In($r),[Dr,Ar]=In($r,{hasParent:!1,positionUpdateFns:new Set}),wo=(0,g.forwardRef)((me,Fe)=>{var He,Ve,rt,st,pt,at,Wt,dn;const{__scopePopper:qt,side:Dt="bottom",sideOffset:gn=0,align:Qt="center",alignOffset:bn=0,arrowPadding:Kt=0,collisionBoundary:pn=[],collisionPadding:On=0,sticky:Ln="partial",hideWhenDetached:Zn=!1,avoidCollisions:_n=!0,onPlaced:Gn,...lr}=me,dr=Pn($r,qt),[Wn,or]=(0,g.useState)(null),sr=(0,M.e)(Fe,go=>or(go)),[fr,Ir]=(0,g.useState)(null),wr=function(go){const[Ii,Ta]=(0,g.useState)(void 0);return(0,vn.b)(()=>{if(go){Ta({width:go.offsetWidth,height:go.offsetHeight});const Uu=new ResizeObserver(Yl=>{if(!Array.isArray(Yl)||!Yl.length)return;const Gt=Yl[0];let Gl,Xl;if("borderBoxSize"in Gt){const $l=Gt.borderBoxSize,ql=Array.isArray($l)?$l[0]:$l;Gl=ql.inlineSize,Xl=ql.blockSize}else Gl=go.offsetWidth,Xl=go.offsetHeight;Ta({width:Gl,height:Xl})});return Uu.observe(go,{box:"border-box"}),()=>Uu.unobserve(go)}Ta(void 0)},[go]),Ii}(fr),Hr=(He=wr==null?void 0:wr.width)!==null&&He!==void 0?He:0,zr=(Ve=wr==null?void 0:wr.height)!==null&&Ve!==void 0?Ve:0,Oi=Dt+(Qt!=="center"?"-"+Qt:""),Eo=typeof On=="number"?On:{top:0,right:0,bottom:0,left:0,...On},Bi=Array.isArray(pn)?pn:[pn],oa=Bi.length>0,gi={padding:Eo,boundary:Bi.filter(St),altBoundary:oa},{reference:Wr,floating:Fi,strategy:qr,x:ii,y:co,placement:Wl,middlewareData:Ci,update:Ul}=Bn({strategy:"fixed",placement:Oi,whileElementsMounted:Et,middleware:[nn(),Xe({mainAxis:gn+zr,alignmentAxis:bn}),_n?it({mainAxis:!0,crossAxis:!1,limiter:Ln==="partial"?yt():void 0,...gi}):void 0,fr?En({element:fr,padding:Kt}):void 0,_n?dt({...gi}):void 0,_t({...gi,apply:({elements:go,availableWidth:Ii,availableHeight:Ta})=>{go.floating.style.setProperty("--radix-popper-available-width",`${Ii}px`),go.floating.style.setProperty("--radix-popper-available-height",`${Ta}px`)}}),$t({arrowWidth:Hr,arrowHeight:zr}),Zn?Be({strategy:"referenceHidden"}):void 0].filter(Ke)});(0,vn.b)(()=>{Wr(dr.anchor)},[Wr,dr.anchor]);const ai=ii!==null&&co!==null,[zu,Kl]=cn(Wl),ia=(0,w.W)(Gn);(0,vn.b)(()=>{ai&&(ia==null||ia())},[ai,ia]);const kf=(rt=Ci.arrow)===null||rt===void 0?void 0:rt.x,Nu=(st=Ci.arrow)===null||st===void 0?void 0:st.y,Bu=((pt=Ci.arrow)===null||pt===void 0?void 0:pt.centerOffset)!==0,[Fu,Vl]=(0,g.useState)();(0,vn.b)(()=>{Wn&&Vl(window.getComputedStyle(Wn).zIndex)},[Wn]);const{hasParent:Hu,positionUpdateFns:Hi}=Ar($r,qt),Ma=!Hu;(0,g.useLayoutEffect)(()=>{if(!Ma)return Hi.add(Ul),()=>{Hi.delete(Ul)}},[Ma,Hi,Ul]),(0,vn.b)(()=>{Ma&&ai&&Array.from(Hi).reverse().forEach(go=>requestAnimationFrame(go))},[Ma,ai,Hi]);const Wu={"data-side":zu,"data-align":Kl,...lr,ref:sr,style:{...lr.style,animation:ai?void 0:"none",opacity:(at=Ci.hide)!==null&&at!==void 0&&at.referenceHidden?0:void 0}};return(0,g.createElement)("div",{ref:Fi,"data-radix-popper-content-wrapper":"",style:{position:qr,left:0,top:0,transform:ai?`translate3d(${Math.round(ii)}px, ${Math.round(co)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:Fu,"--radix-popper-transform-origin":[(Wt=Ci.transformOrigin)===null||Wt===void 0?void 0:Wt.x,(dn=Ci.transformOrigin)===null||dn===void 0?void 0:dn.y].join(" ")},dir:me.dir},(0,g.createElement)(ao,{scope:qt,placedSide:zu,onArrowChange:Ir,arrowX:kf,arrowY:Nu,shouldHideArrow:Bu},Ma?(0,g.createElement)(Dr,{scope:qt,hasParent:!0,positionUpdateFns:Hi},(0,g.createElement)(c.WV.div,Wu)):(0,g.createElement)(c.WV.div,Wu)))}),de="PopperArrow",Pe={top:"bottom",right:"left",bottom:"top",left:"right"},ze=(0,g.forwardRef)(function(me,Fe){const{__scopePopper:He,...Ve}=me,rt=lo(de,He),st=Pe[rt.placedSide];return(0,g.createElement)("span",{ref:rt.onArrowChange,style:{position:"absolute",left:rt.arrowX,top:rt.arrowY,[st]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[rt.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[rt.placedSide],visibility:rt.shouldHideArrow?"hidden":void 0}},(0,g.createElement)(qn,(0,y.Z)({},Ve,{ref:Fe,style:{...Ve.style,display:"block"}})))});function Ke(me){return me!==void 0}function St(me){return me!==null}const nn=()=>({name:"anchorCssProperties",fn(me){const{rects:Fe,elements:He}=me,{width:Ve,height:rt}=Fe.reference;return He.floating.style.setProperty("--radix-popper-anchor-width",`${Ve}px`),He.floating.style.setProperty("--radix-popper-anchor-height",`${rt}px`),{}}}),$t=me=>({name:"transformOrigin",options:me,fn(Fe){var He,Ve,rt,st,pt;const{placement:at,rects:Wt,middlewareData:dn}=Fe,qt=((He=dn.arrow)===null||He===void 0?void 0:He.centerOffset)!==0,Dt=qt?0:me.arrowWidth,gn=qt?0:me.arrowHeight,[Qt,bn]=cn(at),Kt={start:"0%",center:"50%",end:"100%"}[bn],pn=((Ve=(rt=dn.arrow)===null||rt===void 0?void 0:rt.x)!==null&&Ve!==void 0?Ve:0)+Dt/2,On=((st=(pt=dn.arrow)===null||pt===void 0?void 0:pt.y)!==null&&st!==void 0?st:0)+gn/2;let Ln="",Zn="";return Qt==="bottom"?(Ln=qt?Kt:`${pn}px`,Zn=-gn+"px"):Qt==="top"?(Ln=qt?Kt:`${pn}px`,Zn=`${Wt.floating.height+gn}px`):Qt==="right"?(Ln=-gn+"px",Zn=qt?Kt:`${On}px`):Qt==="left"&&(Ln=`${Wt.floating.width+gn}px`,Zn=qt?Kt:`${On}px`),{data:{x:Ln,y:Zn}}}});function cn(me){const[Fe,He="center"]=me.split("-");return[Fe,He]}const Ot=Jn,sn=Nr,un=wo,Rn=ze,Fn=(0,g.forwardRef)((me,Fe)=>{var He;const{container:Ve=globalThis==null||(He=globalThis.document)===null||He===void 0?void 0:He.body,...rt}=me;return Ve?hn().createPortal((0,g.createElement)(c.WV.div,(0,y.Z)({},rt,{ref:Fe})),Ve):null});var Hn=t(1483),rr=t(4801),er=t(2673),zn=function(me){return typeof document>"u"?null:(Array.isArray(me)?me[0]:me).ownerDocument.body},ur=new WeakMap,vr=new WeakMap,oo={},po=0,Lo=function(me){return me&&(me.host||Lo(me.parentNode))},hi=function(me,Fe,He,Ve){var rt=function(Dt,gn){return gn.map(function(Qt){if(Dt.contains(Qt))return Qt;var bn=Lo(Qt);return bn&&Dt.contains(bn)?bn:(console.error("aria-hidden",Qt,"in not contained inside",Dt,". Doing nothing"),null)}).filter(function(Qt){return!!Qt})}(Fe,Array.isArray(me)?me:[me]);oo[He]||(oo[He]=new WeakMap);var st=oo[He],pt=[],at=new Set,Wt=new Set(rt),dn=function(Dt){Dt&&!at.has(Dt)&&(at.add(Dt),dn(Dt.parentNode))};rt.forEach(dn);var qt=function(Dt){Dt&&!Wt.has(Dt)&&Array.prototype.forEach.call(Dt.children,function(gn){if(at.has(gn))qt(gn);else{var Qt=gn.getAttribute(Ve),bn=Qt!==null&&Qt!=="false",Kt=(ur.get(gn)||0)+1,pn=(st.get(gn)||0)+1;ur.set(gn,Kt),st.set(gn,pn),pt.push(gn),Kt===1&&bn&&vr.set(gn,!0),pn===1&&gn.setAttribute(He,"true"),bn||gn.setAttribute(Ve,"true")}})};return qt(Fe),at.clear(),po++,function(){pt.forEach(function(Dt){var gn=ur.get(Dt)-1,Qt=st.get(Dt)-1;ur.set(Dt,gn),st.set(Dt,Qt),gn||(vr.has(Dt)||Dt.removeAttribute(Ve),vr.delete(Dt)),Qt||Dt.removeAttribute(He)}),--po||(ur=new WeakMap,ur=new WeakMap,vr=new WeakMap,oo={})}},An=function(me,Fe,He){He===void 0&&(He="data-aria-hidden");var Ve=Array.from(Array.isArray(me)?me:[me]),rt=zn(me);return rt?(Ve.push.apply(Ve,Array.from(rt.querySelectorAll("[aria-live]"))),hi(Ve,rt,He,"aria-hidden")):function(){return null}},br=function(){return br=Object.assign||function(me){for(var Fe,He=1,Ve=arguments.length;He<Ve;He++)for(var rt in Fe=arguments[He])Object.prototype.hasOwnProperty.call(Fe,rt)&&(me[rt]=Fe[rt]);return me},br.apply(this,arguments)};function Pr(me,Fe){var He={};for(var Ve in me)Object.prototype.hasOwnProperty.call(me,Ve)&&Fe.indexOf(Ve)<0&&(He[Ve]=me[Ve]);if(me!=null&&typeof Object.getOwnPropertySymbols=="function"){var rt=0;for(Ve=Object.getOwnPropertySymbols(me);rt<Ve.length;rt++)Fe.indexOf(Ve[rt])<0&&Object.prototype.propertyIsEnumerable.call(me,Ve[rt])&&(He[Ve[rt]]=me[Ve[rt]])}return He}var Vr="right-scroll-bar-position",ko="width-before-scroll-bar";function Bo(me,Fe){return He=null,Ve=function(st){return me.forEach(function(pt){return function(at,Wt){return typeof at=="function"?at(Wt):at&&(at.current=Wt),at}(pt,st)})},(rt=(0,g.useState)(function(){return{value:He,callback:Ve,facade:{get current(){return rt.value},set current(st){var pt=rt.value;pt!==st&&(rt.value=st,rt.callback(st,pt))}}}})[0]).callback=Ve,rt.facade;var He,Ve,rt}function Ri(me){return me}function Go(me,Fe){Fe===void 0&&(Fe=Ri);var He=[],Ve=!1,rt={read:function(){if(Ve)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return He.length?He[He.length-1]:me},useMedium:function(st){var pt=Fe(st,Ve);return He.push(pt),function(){He=He.filter(function(at){return at!==pt})}},assignSyncMedium:function(st){for(Ve=!0;He.length;){var pt=He;He=[],pt.forEach(st)}He={push:function(at){return st(at)},filter:function(){return He}}},assignMedium:function(st){Ve=!0;var pt=[];if(He.length){var at=He;He=[],at.forEach(st),pt=He}var Wt=function(){var qt=pt;pt=[],qt.forEach(st)},dn=function(){return Promise.resolve().then(Wt)};dn(),He={push:function(qt){pt.push(qt),dn()},filter:function(qt){return pt=pt.filter(qt),He}}}};return rt}var ni=function(me){me===void 0&&(me={});var Fe=Go(null);return Fe.options=br({async:!0,ssr:!1},me),Fe}(),Hs=function(){},zl=g.forwardRef(function(me,Fe){var He=g.useRef(null),Ve=g.useState({onScrollCapture:Hs,onWheelCapture:Hs,onTouchMoveCapture:Hs}),rt=Ve[0],st=Ve[1],pt=me.forwardProps,at=me.children,Wt=me.className,dn=me.removeScrollBar,qt=me.enabled,Dt=me.shards,gn=me.sideCar,Qt=me.noIsolation,bn=me.inert,Kt=me.allowPinchZoom,pn=me.as,On=pn===void 0?"div":pn,Ln=Pr(me,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),Zn=gn,_n=Bo([He,Fe]),Gn=br(br({},Ln),rt);return g.createElement(g.Fragment,null,qt&&g.createElement(Zn,{sideCar:ni,removeScrollBar:dn,shards:Dt,noIsolation:Qt,inert:bn,setCallbacks:st,allowPinchZoom:!!Kt,lockRef:He}),pt?g.cloneElement(g.Children.only(at),br(br({},Gn),{ref:_n})):g.createElement(On,br({},Gn,{className:Wt,ref:_n}),at))});zl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},zl.classNames={fullWidth:ko,zeroRight:Vr};var bu=function(me){var Fe=me.sideCar,He=Pr(me,["sideCar"]);if(!Fe)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var Ve=Fe.read();if(!Ve)throw new Error("Sidecar medium not found");return g.createElement(Ve,br({},He))};bu.isSideCarExport=!0;function af(){if(!document)return null;var me=document.createElement("style");me.type="text/css";var Fe=t.nc;return Fe&&me.setAttribute("nonce",Fe),me}var yu=function(){var me=0,Fe=null;return{add:function(He){var Ve,rt;me==0&&(Fe=af())&&(rt=He,(Ve=Fe).styleSheet?Ve.styleSheet.cssText=rt:Ve.appendChild(document.createTextNode(rt)),function(st){(document.head||document.getElementsByTagName("head")[0]).appendChild(st)}(Fe)),me++},remove:function(){!--me&&Fe&&(Fe.parentNode&&Fe.parentNode.removeChild(Fe),Fe=null)}}},xu=function(){var me,Fe=(me=yu(),function(He,Ve){g.useEffect(function(){return me.add(He),function(){me.remove()}},[He&&Ve])});return function(He){var Ve=He.styles,rt=He.dynamic;return Fe(Ve,rt),null}},wu={left:0,top:0,right:0,gap:0},zi=function(me){return parseInt(me||"",10)||0},Nl=function(me){if(me===void 0&&(me="margin"),typeof window>"u")return wu;var Fe=function(rt){var st=window.getComputedStyle(document.body),pt=st[rt==="padding"?"paddingLeft":"marginLeft"],at=st[rt==="padding"?"paddingTop":"marginTop"],Wt=st[rt==="padding"?"paddingRight":"marginRight"];return[zi(pt),zi(at),zi(Wt)]}(me),He=document.documentElement.clientWidth,Ve=window.innerWidth;return{left:Fe[0],top:Fe[1],right:Fe[2],gap:Math.max(0,Ve-He+Fe[2]-Fe[0])}},Fo=xu(),ku=function(me,Fe,He,Ve){var rt=me.left,st=me.top,pt=me.right,at=me.gap;return He===void 0&&(He="margin"),`
|
|
69
|
+
.`.concat("with-scroll-bars-hidden",` {
|
|
70
|
+
overflow: hidden `).concat(Ve,`;
|
|
71
|
+
padding-right: `).concat(at,"px ").concat(Ve,`;
|
|
72
|
+
}
|
|
73
|
+
body {
|
|
74
|
+
overflow: hidden `).concat(Ve,`;
|
|
75
|
+
overscroll-behavior: contain;
|
|
76
|
+
`).concat([Fe&&"position: relative ".concat(Ve,";"),He==="margin"&&`
|
|
77
|
+
padding-left: `.concat(rt,`px;
|
|
78
|
+
padding-top: `).concat(st,`px;
|
|
79
|
+
padding-right: `).concat(pt,`px;
|
|
80
|
+
margin-left:0;
|
|
81
|
+
margin-top:0;
|
|
82
|
+
margin-right: `).concat(at,"px ").concat(Ve,`;
|
|
83
|
+
`),He==="padding"&&"padding-right: ".concat(at,"px ").concat(Ve,";")].filter(Boolean).join(""),`
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.`).concat(Vr,` {
|
|
87
|
+
right: `).concat(at,"px ").concat(Ve,`;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.`).concat(ko,` {
|
|
91
|
+
margin-right: `).concat(at,"px ").concat(Ve,`;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.`).concat(Vr," .").concat(Vr,` {
|
|
95
|
+
right: 0 `).concat(Ve,`;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.`).concat(ko," .").concat(ko,` {
|
|
99
|
+
margin-right: 0 `).concat(Ve,`;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
body {
|
|
103
|
+
`).concat("--removed-body-scroll-bar-size",": ").concat(at,`px;
|
|
104
|
+
}
|
|
105
|
+
`)},lf=function(me){var Fe=me.noRelative,He=me.noImportant,Ve=me.gapMode,rt=Ve===void 0?"margin":Ve,st=g.useMemo(function(){return Nl(rt)},[rt]);return g.createElement(Fo,{styles:ku(st,!Fe,rt,He?"":"!important")})},Ws=!1;if(typeof window<"u")try{var Ca=Object.defineProperty({},"passive",{get:function(){return Ws=!0,!0}});window.addEventListener("test",Ca,Ca),window.removeEventListener("test",Ca,Ca)}catch{Ws=!1}var ea=!!Ws&&{passive:!1},Ja=function(me,Fe){var He=window.getComputedStyle(me);return He[Fe]!=="hidden"&&!(He.overflowY===He.overflowX&&!function(Ve){return Ve.tagName==="TEXTAREA"}(me)&&He[Fe]==="visible")},ta=function(me,Fe){var He=Fe;do{if(typeof ShadowRoot<"u"&&He instanceof ShadowRoot&&(He=He.host),Us(me,He)){var Ve=el(me,He);if(Ve[1]>Ve[2])return!0}He=He.parentNode}while(He&&He!==document.body);return!1},Us=function(me,Fe){return me==="v"?function(He){return Ja(He,"overflowY")}(Fe):function(He){return Ja(He,"overflowX")}(Fe)},el=function(me,Fe){return me==="v"?[(He=Fe).scrollTop,He.scrollHeight,He.clientHeight]:function(Ve){return[Ve.scrollLeft,Ve.scrollWidth,Ve.clientWidth]}(Fe);var He},Ia=function(me){return"changedTouches"in me?[me.changedTouches[0].clientX,me.changedTouches[0].clientY]:[0,0]},Eu=function(me){return[me.deltaX,me.deltaY]},Ks=function(me){return me&&"current"in me?me.current:me},Vs=function(me){return`
|
|
106
|
+
.block-interactivity-`.concat(me,` {pointer-events: none;}
|
|
107
|
+
.allow-interactivity-`).concat(me,` {pointer-events: all;}
|
|
108
|
+
`)},Bl=0,ri=[],tl,Pa=(tl=function(me){var Fe=g.useRef([]),He=g.useRef([0,0]),Ve=g.useRef(),rt=g.useState(Bl++)[0],st=g.useState(function(){return xu()})[0],pt=g.useRef(me);g.useEffect(function(){pt.current=me},[me]),g.useEffect(function(){if(me.inert){document.body.classList.add("block-interactivity-".concat(rt));var Kt=function(pn,On,Ln){for(var Zn,_n=0,Gn=On.length;_n<Gn;_n++)!Zn&&_n in On||(Zn||(Zn=Array.prototype.slice.call(On,0,_n)),Zn[_n]=On[_n]);return pn.concat(Zn||Array.prototype.slice.call(On))}([me.lockRef.current],(me.shards||[]).map(Ks)).filter(Boolean);return Kt.forEach(function(pn){return pn.classList.add("allow-interactivity-".concat(rt))}),function(){document.body.classList.remove("block-interactivity-".concat(rt)),Kt.forEach(function(pn){return pn.classList.remove("allow-interactivity-".concat(rt))})}}},[me.inert,me.lockRef.current,me.shards]);var at=g.useCallback(function(Kt,pn){if("touches"in Kt&&Kt.touches.length===2)return!pt.current.allowPinchZoom;var On,Ln=Ia(Kt),Zn=He.current,_n="deltaX"in Kt?Kt.deltaX:Zn[0]-Ln[0],Gn="deltaY"in Kt?Kt.deltaY:Zn[1]-Ln[1],lr=Kt.target,dr=Math.abs(_n)>Math.abs(Gn)?"h":"v";if("touches"in Kt&&dr==="h"&&lr.type==="range")return!1;var Wn=ta(dr,lr);if(!Wn)return!0;if(Wn?On=dr:(On=dr==="v"?"h":"v",Wn=ta(dr,lr)),!Wn)return!1;if(!Ve.current&&"changedTouches"in Kt&&(_n||Gn)&&(Ve.current=On),!On)return!0;var or=Ve.current||On;return function(sr,fr,Ir,wr,Hr){var zr=function(Wl,Ci){return Wl==="h"&&Ci==="rtl"?-1:1}(sr,window.getComputedStyle(fr).direction),Oi=zr*wr,Eo=Ir.target,Bi=fr.contains(Eo),oa=!1,gi=Oi>0,Wr=0,Fi=0;do{var qr=el(sr,Eo),ii=qr[0],co=qr[1]-qr[2]-zr*ii;(ii||co)&&Us(sr,Eo)&&(Wr+=co,Fi+=ii),Eo=Eo.parentNode}while(!Bi&&Eo!==document.body||Bi&&(fr.contains(Eo)||fr===Eo));return(gi&&(Wr===0||!Hr)||!gi&&(Fi===0||!Hr))&&(oa=!0),oa}(or,pn,Kt,or==="h"?_n:Gn,!0)},[]),Wt=g.useCallback(function(Kt){var pn=Kt;if(ri.length&&ri[ri.length-1]===st){var On="deltaY"in pn?Eu(pn):Ia(pn),Ln=Fe.current.filter(function(_n){return _n.name===pn.type&&_n.target===pn.target&&function(Gn,lr){return Gn[0]===lr[0]&&Gn[1]===lr[1]}(_n.delta,On)})[0];if(Ln&&Ln.should)pn.cancelable&&pn.preventDefault();else if(!Ln){var Zn=(pt.current.shards||[]).map(Ks).filter(Boolean).filter(function(_n){return _n.contains(pn.target)});(Zn.length>0?at(pn,Zn[0]):!pt.current.noIsolation)&&pn.cancelable&&pn.preventDefault()}}},[]),dn=g.useCallback(function(Kt,pn,On,Ln){var Zn={name:Kt,delta:pn,target:On,should:Ln};Fe.current.push(Zn),setTimeout(function(){Fe.current=Fe.current.filter(function(_n){return _n!==Zn})},1)},[]),qt=g.useCallback(function(Kt){He.current=Ia(Kt),Ve.current=void 0},[]),Dt=g.useCallback(function(Kt){dn(Kt.type,Eu(Kt),Kt.target,at(Kt,me.lockRef.current))},[]),gn=g.useCallback(function(Kt){dn(Kt.type,Ia(Kt),Kt.target,at(Kt,me.lockRef.current))},[]);g.useEffect(function(){return ri.push(st),me.setCallbacks({onScrollCapture:Dt,onWheelCapture:Dt,onTouchMoveCapture:gn}),document.addEventListener("wheel",Wt,ea),document.addEventListener("touchmove",Wt,ea),document.addEventListener("touchstart",qt,ea),function(){ri=ri.filter(function(Kt){return Kt!==st}),document.removeEventListener("wheel",Wt,ea),document.removeEventListener("touchmove",Wt,ea),document.removeEventListener("touchstart",qt,ea)}},[]);var Qt=me.removeScrollBar,bn=me.inert;return g.createElement(g.Fragment,null,bn?g.createElement(st,{styles:Vs(rt)}):null,Qt?g.createElement(lf,{gapMode:"margin"}):null)},ni.useMedium(tl),bu),Ni=g.forwardRef(function(me,Fe){return g.createElement(zl,br({},me,{ref:Fe,sideCar:Pa}))});Ni.classNames=zl.classNames;var sf=Ni;const Su="Popover",[_u,vm]=(0,p.b)(Su,[kn]),nl=kn(),[cf,na]=_u(Su),uf=me=>{const{__scopePopover:Fe,children:He,open:Ve,defaultOpen:rt,onOpenChange:st,modal:pt=!1}=me,at=nl(Fe),Wt=(0,g.useRef)(null),[dn,qt]=(0,g.useState)(!1),[Dt=!1,gn]=(0,er.T)({prop:Ve,defaultProp:rt,onChange:st});return(0,g.createElement)(Ot,at,(0,g.createElement)(cf,{scope:Fe,contentId:(0,ie.M)(),triggerRef:Wt,open:Dt,onOpenChange:gn,onOpenToggle:(0,g.useCallback)(()=>gn(Qt=>!Qt),[gn]),hasCustomAnchor:dn,onCustomAnchorAdd:(0,g.useCallback)(()=>qt(!0),[]),onCustomAnchorRemove:(0,g.useCallback)(()=>qt(!1),[]),modal:pt},He))},df="PopoverTrigger",ff=(0,g.forwardRef)((me,Fe)=>{const{__scopePopover:He,...Ve}=me,rt=na(df,He),st=nl(He),pt=(0,M.e)(Fe,rt.triggerRef),at=(0,g.createElement)(c.WV.button,(0,y.Z)({type:"button","aria-haspopup":"dialog","aria-expanded":rt.open,"aria-controls":rt.contentId,"data-state":Cu(rt.open)},Ve,{ref:pt,onClick:(0,r.M)(me.onClick,rt.onOpenToggle)}));return rt.hasCustomAnchor?at:(0,g.createElement)(sn,(0,y.Z)({asChild:!0},st),at)}),Ys="PopoverPortal",[pf,hf]=_u(Ys,{forceMount:void 0}),Fl=me=>{const{__scopePopover:Fe,forceMount:He,children:Ve,container:rt}=me,st=na(Ys,Fe);return(0,g.createElement)(pf,{scope:Fe,forceMount:He},(0,g.createElement)(Hn.z,{present:He||st.open},(0,g.createElement)(Fn,{asChild:!0,container:rt},Ve)))},mi="PopoverContent",mf=(0,g.forwardRef)((me,Fe)=>{const He=hf(mi,me.__scopePopover),{forceMount:Ve=He.forceMount,...rt}=me,st=na(mi,me.__scopePopover);return(0,g.createElement)(Hn.z,{present:Ve||st.open},st.modal?(0,g.createElement)(ju,(0,y.Z)({},rt,{ref:Fe})):(0,g.createElement)(Ou,(0,y.Z)({},rt,{ref:Fe})))}),ju=(0,g.forwardRef)((me,Fe)=>{const He=na(mi,me.__scopePopover),Ve=(0,g.useRef)(null),rt=(0,M.e)(Fe,Ve),st=(0,g.useRef)(!1);return(0,g.useEffect)(()=>{const pt=Ve.current;if(pt)return An(pt)},[]),(0,g.createElement)(sf,{as:rr.g7,allowPinchZoom:!0},(0,g.createElement)(Gs,(0,y.Z)({},me,{ref:rt,trapFocus:He.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,r.M)(me.onCloseAutoFocus,pt=>{var at;pt.preventDefault(),st.current||(at=He.triggerRef.current)===null||at===void 0||at.focus()}),onPointerDownOutside:(0,r.M)(me.onPointerDownOutside,pt=>{const at=pt.detail.originalEvent,Wt=at.button===0&&at.ctrlKey===!0,dn=at.button===2||Wt;st.current=dn},{checkForDefaultPrevented:!1}),onFocusOutside:(0,r.M)(me.onFocusOutside,pt=>pt.preventDefault(),{checkForDefaultPrevented:!1})})))}),Ou=(0,g.forwardRef)((me,Fe)=>{const He=na(mi,me.__scopePopover),Ve=(0,g.useRef)(!1);return(0,g.createElement)(Gs,(0,y.Z)({},me,{ref:Fe,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:rt=>{var st,pt;(st=me.onCloseAutoFocus)===null||st===void 0||st.call(me,rt),rt.defaultPrevented||(Ve.current||(pt=He.triggerRef.current)===null||pt===void 0||pt.focus(),rt.preventDefault()),Ve.current=!1},onInteractOutside:rt=>{var st,pt;(st=me.onInteractOutside)===null||st===void 0||st.call(me,rt),rt.defaultPrevented||(Ve.current=!0);const at=rt.target;!((pt=He.triggerRef.current)===null||pt===void 0)&&pt.contains(at)&&rt.preventDefault()}}))}),Gs=(0,g.forwardRef)((me,Fe)=>{const{__scopePopover:He,trapFocus:Ve,onOpenAutoFocus:rt,onCloseAutoFocus:st,disableOutsidePointerEvents:pt,onEscapeKeyDown:at,onPointerDownOutside:Wt,onFocusOutside:dn,onInteractOutside:qt,...Dt}=me,gn=na(mi,He),Qt=nl(He);return ve(),(0,g.createElement)(Le,{asChild:!0,loop:!0,trapped:Ve,onMountAutoFocus:rt,onUnmountAutoFocus:st},(0,g.createElement)(N,{asChild:!0,disableOutsidePointerEvents:pt,onInteractOutside:qt,onEscapeKeyDown:at,onPointerDownOutside:Wt,onFocusOutside:dn,onDismiss:()=>gn.onOpenChange(!1)},(0,g.createElement)(un,(0,y.Z)({"data-state":Cu(gn.open),role:"dialog",id:gn.contentId},Qt,Dt,{ref:Fe,style:{...Dt.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)"}}))))}),Hl=(0,g.forwardRef)((me,Fe)=>{const{__scopePopover:He,...Ve}=me,rt=nl(He);return(0,g.createElement)(Rn,(0,y.Z)({},rt,Ve,{ref:Fe}))});function Cu(me){return me?"open":"closed"}const gf=uf,Iu=ff,ra=Fl,rl=mf,vf=Hl;var Xs=t(8242),$s=t(453),Pu=t(8935),Fr=t(8924),Sr=function(me){var Fe=me.color,He=me.onChange,Ve=me.label,rt=me.colorPickerType,st=(0,Xs.Fy)(),pt=(0,g.useState)(Fe),at=(0,T.Z)(pt,2),Wt=at[0],dn=at[1],qt=(0,R.KO)(he),Dt=(0,T.Z)(qt,2),gn=Dt[0],Qt=Dt[1];(0,g.useEffect)(function(){dn(Fe)},[Fe]);var bn=(0,g.useCallback)(function(Gn){var lr=Gn.toLowerCase(),dr=ji(lr);dr&&He(dr),dn(lr)},[He]),Kt=(0,g.useRef)(null),pn=(0,g.useRef)(null);(0,g.useEffect)(function(){Kt.current&&Kt.current.focus()},[gn]);var On=(0,R.KO)(Fr.$,$s.yE),Ln=(0,T.Z)(On,2),Zn=Ln[0],_n=Ln[1];return(0,g.useEffect)(function(){return function(){_n(null)}},[_n]),(0,v.jsxs)("div",{className:"color-picker__input-label",children:[(0,v.jsx)("div",{className:"color-picker__input-hash",children:"#"}),(0,v.jsx)("input",{ref:gn==="hex"?Kt:void 0,style:{border:0,padding:0},spellCheck:!1,className:"color-picker-input","aria-label":Ve,onChange:function(Gn){bn(Gn.target.value)},value:(Wt||"").replace(/^#/,""),onBlur:function(){dn(Fe)},tabIndex:-1,onFocus:function(){return Qt("hex")},onKeyDown:function(Gn){var lr;Gn.key!==S.tW.TAB&&(Gn.key===S.tW.ESCAPE&&((lr=pn.current)===null||lr===void 0||lr.focus()),Gn.stopPropagation())}}),!st.editor.isMobile&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{style:{width:"1px",height:"1.25rem",backgroundColor:"var(--default-border-color)"}}),(0,v.jsx)("div",{ref:pn,className:(0,f.Z)("excalidraw-eye-dropper-trigger",{selected:Zn}),onClick:function(){return _n(function(Gn){return Gn?null:{keepOpenOnAlt:!1,onSelect:function(lr){return He(lr)},colorPickerType:rt}})},title:"".concat((0,P.t)("labels.eyeDropper")," — ").concat(S.tW.I.toLocaleUpperCase()," or ").concat((0,j.uY)("Alt")," "),children:Pu.$W})]})]})},Mu=t(3379),ar=t.n(Mu),Tu=t(7795),Xo=t.n(Tu),Du=t(569),bf=t.n(Du),yf=t(3565),Au=t.n(yf),xf=t(9216),Lu=t.n(xf),Zu=t(4589),oi=t.n(Zu),ol=t(4269),_i={};_i.styleTagTransform=oi(),_i.setAttributes=Au(),_i.insert=bf().bind(null,"head"),_i.domAPI=Xo(),_i.insertStyleElement=Lu(),ar()(ol.Z,_i),ol.Z&&ol.Z.locals&&ol.Z.locals;var Yr=function(me){var Fe=new Option().style;return Fe.color=me,!!Fe.color},ji=function(me){return(0,j.Qm)(me)?me:Yr("#".concat(me))?"#".concat(me):Yr(me)?me:null},il=function(me){var Fe=me.type,He=me.color,Ve=me.onChange,rt=me.label,st=me.elements,pt=me.palette,at=pt===void 0?l.HO:pt,Wt=me.updateData,dn=(0,R.KO)(he),qt=(0,T.Z)(dn,2)[1],Dt=(0,R.KO)(Fr.$,$s.yE),gn=(0,T.Z)(Dt,2),Qt=gn[0],bn=gn[1],Kt=(0,Xs.J0)().container,pn=(0,Xs.Fy)(),On=(0,v.jsxs)("div",{children:[(0,v.jsx)(E,{children:(0,P.t)("colorPicker.hexCode")}),(0,v.jsx)(Sr,{color:He,label:rt,onChange:function(_n){Ve(_n)},colorPickerType:Fe})]}),Ln=(0,g.useRef)(null),Zn=function(){var _n,Gn;(_n=Ln.current)===null||_n===void 0||(Gn=_n.querySelector(".color-picker-content"))===null||Gn===void 0||Gn.focus()};return(0,v.jsx)(ra,{container:Kt,children:(0,v.jsxs)(rl,{ref:Ln,className:"focus-visible-none","data-prevent-outside-click":!0,onFocusOutside:function(_n){Zn(),_n.preventDefault()},onPointerDownOutside:function(_n){Qt&&_n.preventDefault()},onCloseAutoFocus:function(_n){_n.stopPropagation(),_n.preventDefault(),Kt&&!(0,j.y1)(document.activeElement)&&Kt.focus(),Wt({openPopup:null}),qt(null)},side:pn.editor.isMobile&&!pn.viewport.isLandscape?"bottom":"right",align:pn.editor.isMobile&&!pn.viewport.isLandscape?"center":"start",alignOffset:-16,sideOffset:20,style:{zIndex:"var(--zIndex-layerUI)",backgroundColor:"var(--popup-bg-color)",maxWidth:"208px",maxHeight:window.innerHeight,padding:"12px",borderRadius:"8px",boxSizing:"border-box",overflowY:"auto",boxShadow:"0px 7px 14px rgba(0, 0, 0, 0.05), 0px 0px 3.12708px rgba(0, 0, 0, 0.0798), 0px 0px 0.931014px rgba(0, 0, 0, 0.1702)"},children:[at?(0,v.jsx)(h,{palette:at,color:He,onChange:function(_n){Ve(_n)},onEyeDropperToggle:function(_n){bn(function(Gn){return _n?((Gn=Gn||{keepOpenOnAlt:!0,onSelect:Ve,colorPickerType:Fe}).keepOpenOnAlt=!0,Gn):_n===!1||Gn?null:{keepOpenOnAlt:!1,onSelect:Ve,colorPickerType:Fe}})},onEscape:function(_n){Qt?bn(null):(0,j.s)(_n.target)?Zn():Wt({openPopup:null})},label:rt,type:Fe,elements:st,updateData:Wt,children:On}):On,(0,v.jsx)(vf,{width:20,height:10,style:{fill:"var(--popup-bg-color)",filter:"drop-shadow(rgba(0, 0, 0, 0.05) 0px 3px 2px)"}})]})})},Ru=function(me){var Fe=me.label,He=me.color,Ve=me.type;return(0,v.jsx)(Iu,{type:"button",className:(0,f.Z)("color-picker__button active-color",{"is-transparent":He==="transparent"||!He}),"aria-label":Fe,style:He?{"--swatch-color":He}:void 0,title:Ve==="elementStroke"?(0,P.t)("labels.showStroke"):(0,P.t)("labels.showBackground"),children:(0,v.jsx)("div",{className:"color-picker__button-outline"})})},wf=function(me){var Fe=me.type,He=me.color,Ve=me.onChange,rt=me.label,st=me.elements,pt=me.palette,at=pt===void 0?l.HO:pt,Wt=me.topPicks,dn=me.updateData,qt=me.appState;return(0,v.jsx)("div",{children:(0,v.jsxs)("div",{role:"dialog","aria-modal":"true",className:"color-picker-container",children:[(0,v.jsx)(k,{activeColor:He,onChange:Ve,type:Fe,topPicks:Wt}),(0,v.jsx)("div",{style:{width:1,height:"100%",backgroundColor:"var(--default-border-color)",margin:"0 auto"}}),(0,v.jsxs)(gf,{open:qt.openPopup===Fe,onOpenChange:function(Dt){dn({openPopup:Dt?Fe:null})},children:[(0,v.jsx)(Ru,{color:He,label:rt,type:Fe}),qt.openPopup===Fe&&(0,v.jsx)(il,{type:Fe,color:He,onChange:Ve,label:rt,elements:st,palette:at,updateData:dn})]})]})})}},6887:function(fe,Q,t){t.d(Q,{Z:function(){return y}});var T=t(7169),j=t(2726),f=t(8227),l=t(1300),v=t(3379),k=t.n(v),g=t(7795),a=t.n(g),P=t(569),R=t.n(P),K=t(3565),U=t.n(K),m=t(9216),G=t.n(m),he=t(4589),be=t.n(he),we=t(9393),xe={};xe.styleTagTransform=be(),xe.setAttributes=U(),xe.insert=R().bind(null,"head"),xe.domAPI=a(),xe.insertStyleElement=G(),k()(we.Z,xe),we.Z&&we.Z.locals&&we.Z.locals;var ce=t(4932),D=t(3607),ne=t(3116),S=t(8242),z=t(453),A=t(4512),E=["onConfirm","onCancel","children","confirmText","cancelText","className"];function L(r,M){var p=Object.keys(r);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);M&&(c=c.filter(function(w){return Object.getOwnPropertyDescriptor(r,w).enumerable})),p.push.apply(p,c)}return p}function h(r){for(var M=1;M<arguments.length;M++){var p=arguments[M]!=null?arguments[M]:{};M%2?L(Object(p),!0).forEach(function(c){(0,T.Z)(r,c,p[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(p)):L(Object(p)).forEach(function(c){Object.defineProperty(r,c,Object.getOwnPropertyDescriptor(p,c))})}return r}var y=function(r){var M=r.onConfirm,p=r.onCancel,c=r.children,w=r.confirmText,O=w===void 0?(0,f.t)("buttons.confirm"):w,$=r.cancelText,I=$===void 0?(0,f.t)("buttons.cancel"):$,C=r.className,_=C===void 0?"":C,N=(0,j.Z)(r,E),q=(0,S.n9)(),pe=(0,D.b9)(ne.uh,z.yE),te=(0,S.J0)().container;return(0,A.jsxs)(l.V,h(h({onCloseRequest:p,size:"small"},N),{},{className:"confirm-dialog ".concat(_),children:[c,(0,A.jsxs)("div",{className:"confirm-dialog-buttons",children:[(0,A.jsx)(ce.Z,{label:I,onClick:function(){q({openMenu:null}),pe(!1),p(),te==null||te.focus()}}),(0,A.jsx)(ce.Z,{label:O,onClick:function(){q({openMenu:null}),pe(!1),M(),te==null||te.focus()},actionType:"danger"})]})]}))}},1925:function(fe,Q,t){t.d(Q,{O:function(){return ne}});var T=t(2726),j=t(7169),f=t(45),l=t(9937),v=t(4572),k=t(100),g=t(8227),a=t(9827),P=t(8242),R=t(6922),K=t(3116),U=t(5902),m=t(4512),G=t(9787),he=["children"],be=["children","className","onDock","docked"];function we(S,z){var A=Object.keys(S);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(S);z&&(E=E.filter(function(L){return Object.getOwnPropertyDescriptor(S,L).enumerable})),A.push.apply(A,E)}return A}function xe(S){for(var z=1;z<arguments.length;z++){var A=arguments[z]!=null?arguments[z]:{};z%2?we(Object(A),!0).forEach(function(E){(0,j.Z)(S,E,A[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(A)):we(Object(A)).forEach(function(E){Object.defineProperty(S,E,Object.getOwnPropertyDescriptor(A,E))})}return S}var ce=(0,R.$)("DefaultSidebarTrigger",function(S){var z=(0,v.R6)().DefaultSidebarTriggerTunnel;return(0,m.jsx)(z.In,{children:(0,m.jsx)(U.YE.Trigger,xe(xe({},S),{},{className:"default-sidebar-trigger",name:l.Cc.name}))})});ce.displayName="DefaultSidebarTrigger";var D=function(S){var z=S.children,A=(0,T.Z)(S,he),E=(0,v.R6)().DefaultSidebarTabTriggersTunnel;return(0,m.jsx)(E.In,{children:(0,m.jsx)(U.YE.TabTriggers,xe(xe({},A),{},{children:z}))})};D.displayName="DefaultTabTriggers";var ne=Object.assign((0,R.$)("DefaultSidebar",function(S){var z=S.children,A=S.className,E=S.onDock,L=S.docked,h=(0,T.Z)(S,be),y=(0,k.I)(),r=(0,P.n9)(),M=(0,v.R6)().DefaultSidebarTabTriggersTunnel;return(0,G.createElement)(U.YE,xe(xe({},h),{},{name:"default",key:"default",className:(0,f.Z)("default-sidebar",A),docked:L??y.defaultSidebarDockedPreference,onDock:E===!1||!E&&L!=null?void 0:(0,a.Mj)(E,function(p){r({defaultSidebarDockedPreference:p})})}),(0,m.jsxs)(U.YE.Tabs,{children:[(0,m.jsxs)(U.YE.Header,{children:[h.__fallback&&(0,m.jsx)("div",{style:{color:"var(--color-primary)",fontSize:"1.2em",fontWeight:"bold",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",paddingRight:"1em"},children:(0,g.t)("toolBar.library")}),(0,m.jsx)(M.Out,{})]}),(0,m.jsx)(U.YE.Tab,{tab:l.tf,children:(0,m.jsx)(K.rY,{})}),z]}))}),{Trigger:ce,TabTriggers:D})},1300:function(fe,Q,t){t.d(Q,{V:function(){return O}});var T=t(2577),j=t(45),f=t(9787),l=t(8227),v=t(8242),k=t(5491),g=t(3379),a=t.n(g),P=t(7795),R=t.n(P),K=t(569),U=t.n(K),m=t(3565),G=t.n(m),he=t(9216),be=t.n(he),we=t(4589),xe=t.n(we),ce=t(9482),D={};D.styleTagTransform=xe(),D.setAttributes=G(),D.insert=U().bind(null,"head"),D.domAPI=R(),D.insertStyleElement=be(),a()(ce.Z,D),ce.Z&&ce.Z.locals&&ce.Z.locals;var ne=t(8935),S=t(1404),z=t(6843),A={};A.styleTagTransform=xe(),A.setAttributes=G(),A.insert=U().bind(null,"head"),A.domAPI=R(),A.insertStyleElement=be(),a()(z.Z,A),z.Z&&z.Z.locals&&z.Z.locals;var E=t(5156),L=t(334),h=t(4512),y=function($){var I=$.closeOnClickOutside,C=I===void 0||I,_=(0,L.F)({className:"excalidraw-modal-container"});return _?(0,E.createPortal)((0,h.jsxs)("div",{className:(0,j.Z)("Modal",$.className),role:"dialog","aria-modal":"true",onKeyDown:function(N){N.key===k.tW.ESCAPE&&(N.nativeEvent.stopImmediatePropagation(),N.stopPropagation(),$.onCloseRequest())},"aria-labelledby":$.labelledBy,"data-prevent-outside-click":!0,children:[(0,h.jsx)("div",{className:"Modal__background",onClick:C?$.onCloseRequest:void 0}),(0,h.jsx)("div",{className:"Modal__content",style:{"--max-width":"".concat($.maxWidth,"px")},tabIndex:0,children:$.children})]}),_):null},r=t(9827),M=t(3607),p=t(3116),c=t(453);function w($){if($&&typeof $=="number")return $;switch($){case"small":return 550;case"wide":return 1024;default:return 800}}var O=function($){var I=function(){var ke=(0,f.useState)(null),Le=(0,T.Z)(ke,2),Ge=Le[0],Ne=Le[1];return[Ge,(0,f.useCallback)(function(Ce){return Ne(Ce)},[])]}(),C=(0,T.Z)(I,2),_=C[0],N=C[1],q=(0,f.useState)(document.activeElement),pe=(0,T.Z)(q,1)[0],te=(0,v.J0)().id,ve=(0,v.Fy)().viewport.isMobile;(0,f.useEffect)(function(){if(_){var ke=(0,r.xp)(_);ke.length>0&&$.autofocus!==!1&&(ke[1]||ke[0]).focus();var Le=function(Ge){if(Ge.key===k.tW.TAB){var Ne=(0,r.xp)(_),Ce=document.activeElement,Oe=Ne.findIndex(function(De){return De===Ce});Oe===0&&Ge.shiftKey?(Ne[Ne.length-1].focus(),Ge.preventDefault()):Oe!==Ne.length-1||Ge.shiftKey||(Ne[0].focus(),Ge.preventDefault())}};return _.addEventListener("keydown",Le),function(){return _.removeEventListener("keydown",Le)}}},[_,$.autofocus]);var ae=(0,v.n9)(),H=(0,M.b9)(p.uh,c.yE),le=function(){ae({openMenu:null}),H(!1),pe.focus(),$.onCloseRequest()};return(0,h.jsx)(y,{className:(0,j.Z)("Dialog",$.className,{"Dialog--fullscreen":ve}),labelledBy:"dialog-title",maxWidth:w($.size),onCloseRequest:le,closeOnClickOutside:$.closeOnClickOutside,children:(0,h.jsxs)(S.W,{ref:N,children:[$.title&&(0,h.jsx)("h2",{id:"".concat(te,"-dialog-title"),className:"Dialog__title",children:(0,h.jsx)("span",{className:"Dialog__titleContent",children:$.title})}),(0,h.jsx)("button",{className:"Dialog__close",onClick:le,title:(0,l.t)("buttons.close"),"aria-label":(0,l.t)("buttons.close"),children:ve?ne.op:ne.Tw}),(0,h.jsx)("div",{className:"Dialog__content",children:$.children})]})})}},4932:function(fe,Q,t){t.d(Q,{Z:function(){return z}});var T=t(7169),j=t(2726),f=t(45),l=t(3379),v=t.n(l),k=t(7795),g=t.n(k),a=t(569),P=t.n(a),R=t(3565),K=t.n(R),U=t(9216),m=t.n(U),G=t(4589),he=t.n(G),be=t(6148),we={};we.styleTagTransform=he(),we.setAttributes=K(),we.insert=P().bind(null,"head"),we.domAPI=g(),we.insertStyleElement=m(),v()(be.Z,we),be.Z&&be.Z.locals&&be.Z.locals;var xe=t(8531),ce=t(4512),D=["label","onClick","className","children","actionType","type","isLoading"];function ne(A,E){var L=Object.keys(A);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(A);E&&(h=h.filter(function(y){return Object.getOwnPropertyDescriptor(A,y).enumerable})),L.push.apply(L,h)}return L}function S(A){for(var E=1;E<arguments.length;E++){var L=arguments[E]!=null?arguments[E]:{};E%2?ne(Object(L),!0).forEach(function(h){(0,T.Z)(A,h,L[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(L)):ne(Object(L)).forEach(function(h){Object.defineProperty(A,h,Object.getOwnPropertyDescriptor(L,h))})}return A}var z=function(A){var E=A.label,L=A.onClick,h=A.className,y=A.children,r=A.actionType,M=A.type,p=M===void 0?"button":M,c=A.isLoading,w=(0,j.Z)(A,D),O=r?"Dialog__action-button--".concat(r):"";return(0,ce.jsxs)("button",S(S({className:(0,f.Z)("Dialog__action-button",O,h),type:p,"aria-label":E,onClick:L},w),{},{children:[y&&(0,ce.jsx)("div",{style:c?{visibility:"hidden"}:{},children:y}),(0,ce.jsx)("div",{style:c?{visibility:"hidden"}:{},children:E}),c&&(0,ce.jsx)("div",{style:{position:"absolute",inset:0},children:(0,ce.jsx)(xe.Z,{})})]}))}},8924:function(fe,Q,t){t.d(Q,{p:function(){return y},$:function(){return h}});var T=t(3607),j=t(9787),f=t(5156),l=t(9240),v=t(9937),k=t(100),g=t(334),a=t(1901),P=t(5491),R=t(4105),K=t(8242),U=t(3379),m=t.n(U),G=t(7795),he=t.n(G),be=t(569),we=t.n(be),xe=t(3565),ce=t.n(xe),D=t(9216),ne=t.n(D),S=t(4589),z=t.n(S),A=t(7522),E={};E.styleTagTransform=z(),E.setAttributes=ce(),E.insert=we().bind(null,"head"),E.domAPI=he(),E.insertStyleElement=ne(),m()(A.Z,E),A.Z&&A.Z.locals&&A.Z.locals;var L=t(4512),h=(0,T.cn)(null),y=function(r){var M=r.onCancel,p=r.onChange,c=r.onSelect,w=r.colorPickerType,O=(0,g.F)({className:"excalidraw-eye-dropper-backdrop",parentSelector:".excalidraw-eye-dropper-container"}),$=(0,k.I)(),I=(0,K.bd)(),C=(0,K.qD)(),_=(0,R.eD)(I,$),N=function(te){var ve=(0,j.useRef)(te);return Object.assign(ve.current,te),ve.current}({app:C,onCancel:M,onChange:p,onSelect:c,selectedElements:_}),q=(0,K.J0)().container;(0,j.useEffect)(function(){var te=pe.current;if(te&&C.canvas&&O){var ve=!1,ae=C.canvas.getContext("2d"),H=function(Ce){var Oe=Ce.clientX,De=Ce.clientY,Ae=ae.getImageData((Oe-$.offsetLeft)*window.devicePixelRatio,(De-$.offsetTop)*window.devicePixelRatio,1,1).data;return(0,l.vq)(Ae[0],Ae[1],Ae[2])},le=function(Ce){var Oe=Ce.clientX,De=Ce.clientY,Ae=Ce.altKey;te.style.top="".concat(De+20,"px"),te.style.left="".concat(Oe+20,"px");var ie=H({clientX:Oe,clientY:De});ve&&N.onChange(w,ie,N.selectedElements,{altKey:Ae}),te.style.background=ie},ke=function(){N.onCancel()},Le=function(Ce){ve=!0,Ce.stopImmediatePropagation()},Ge=function(Ce){ve=!1,q==null||q.focus(),Ce.stopImmediatePropagation(),Ce.preventDefault(),function(Oe,De){N.onSelect(Oe,De)}(H(Ce),Ce)},Ne=function(Ce){Ce.key===P.tW.ESCAPE&&(Ce.preventDefault(),Ce.stopImmediatePropagation(),ke())};return O.tabIndex=-1,O.focus(),le({clientX:N.app.lastViewportPosition.x,clientY:N.app.lastViewportPosition.y,altKey:!1}),O.addEventListener(v.Ks.KEYDOWN,Ne),O.addEventListener(v.Ks.POINTER_DOWN,Le),O.addEventListener(v.Ks.POINTER_UP,Ge),window.addEventListener("pointermove",le,{passive:!0}),window.addEventListener(v.Ks.BLUR,ke),function(){ve=!1,O.removeEventListener(v.Ks.KEYDOWN,Ne),O.removeEventListener(v.Ks.POINTER_DOWN,Le),O.removeEventListener(v.Ks.POINTER_UP,Ge),window.removeEventListener("pointermove",le),window.removeEventListener(v.Ks.BLUR,ke)}}},[N,C.canvas,O,w,q,$.offsetLeft,$.offsetTop]);var pe=(0,j.useRef)(null);return(0,a.O)(pe,function(){M()},function(te){return!!te.target.closest(".excalidraw-eye-dropper-trigger, .excalidraw-eye-dropper-backdrop")}),O?(0,f.createPortal)((0,L.jsx)("div",{ref:pe,className:"excalidraw-eye-dropper-preview"}),O):null}},1404:function(fe,Q,t){t.d(Q,{W:function(){return S}});var T=t(7169),j=t(3379),f=t.n(j),l=t(7795),v=t.n(l),k=t(569),g=t.n(k),a=t(3565),P=t.n(a),R=t(9216),K=t.n(R),U=t(4589),m=t.n(U),G=t(7369),he={};he.styleTagTransform=m(),he.setAttributes=P(),he.insert=g().bind(null,"head"),he.domAPI=v(),he.insertStyleElement=K(),f()(G.Z,he),G.Z&&G.Z.locals&&G.Z.locals;var be=t(9787),we=t.n(be),xe=t(45),ce=t(4512);function D(z,A){var E=Object.keys(z);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(z);A&&(L=L.filter(function(h){return Object.getOwnPropertyDescriptor(z,h).enumerable})),E.push.apply(E,L)}return E}function ne(z){for(var A=1;A<arguments.length;A++){var E=arguments[A]!=null?arguments[A]:{};A%2?D(Object(E),!0).forEach(function(L){(0,T.Z)(z,L,E[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(E)):D(Object(E)).forEach(function(L){Object.defineProperty(z,L,Object.getOwnPropertyDescriptor(E,L))})}return z}var S=we().forwardRef(function(z,A){var E=z.children,L=z.padding,h=z.className,y=z.style;return(0,ce.jsx)("div",{className:(0,xe.Z)("Island",h),style:ne({"--padding":L},y),ref:A,children:E})})},3116:function(fe,Q,t){t.d(Q,{rY:function(){return tn},uh:function(){return Zt}});var T=t(6655),j=t(1930),f=t(8950),l=t(2577),v=t(2975),k=t.n(v),g=t(9787),a=t.n(g),P=t(9326),R=t(8227),K=t(4643),U=t(7169),m=t(4419),G=t(9827),he=t(2540),be=t(9937),we=t(8531),xe=t(5742),ce=t(4512),D=function(ot){var It=ot.theme,mt=ot.id,jt=ot.libraryReturnUrl||window.location.origin+window.location.pathname;return(0,ce.jsx)("a",{className:"library-menu-browse-button",href:"".concat("https://libraries.excalidraw.com","?target=").concat(window.name||"_blank","&referrer=").concat(jt,"&useHash=true&token=").concat(mt,"&theme=").concat(It,"&version=").concat(be.Kr.excalidrawLibrary),target:"_excalidraw_libraries",children:(0,R.t)("labels.libraries")})},ne=t(45),S=function(ot){var It=ot.libraryReturnUrl,mt=ot.theme,jt=ot.id,xt=ot.style,Nt=ot.children,Ut=ot.className;return(0,ce.jsxs)("div",{className:(0,ne.Z)("library-menu-control-buttons",Ut),style:xt,children:[(0,ce.jsx)(D,{id:jt,libraryReturnUrl:It,theme:mt}),Nt]})},z=t(9247),A=t(453),E=t(8242),L=t(8935),h=t(1512),y=t(6548),r=t(3607),M=t(6887),p=t(5284),c=t(1300),w=t(507),O=t(5796),$=t(4932),I=t(3379),C=t.n(I),_=t(7795),N=t.n(_),q=t(569),pe=t.n(q),te=t(3565),ve=t.n(te),ae=t(9216),H=t.n(ae),le=t(4589),ke=t.n(le),Le=t(7589),Ge={};Ge.styleTagTransform=ke(),Ge.setAttributes=ve(),Ge.insert=pe().bind(null,"head"),Ge.domAPI=N(),Ge.insertStyleElement=H(),C()(Le.Z,Ge),Le.Z&&Le.Z.locals&&Le.Z.locals;function Ne(ot,It){var mt=Object.keys(ot);if(Object.getOwnPropertySymbols){var jt=Object.getOwnPropertySymbols(ot);It&&(jt=jt.filter(function(xt){return Object.getOwnPropertyDescriptor(ot,xt).enumerable})),mt.push.apply(mt,jt)}return mt}function Ce(ot){for(var It=1;It<arguments.length;It++){var mt=arguments[It]!=null?arguments[It]:{};It%2?Ne(Object(mt),!0).forEach(function(jt){(0,U.Z)(ot,jt,mt[jt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ot,Object.getOwnPropertyDescriptors(mt)):Ne(Object(mt)).forEach(function(jt){Object.defineProperty(ot,jt,Object.getOwnPropertyDescriptor(mt,jt))})}return ot}function Oe(ot,It){var mt=typeof Symbol<"u"&&ot[Symbol.iterator]||ot["@@iterator"];if(!mt){if(Array.isArray(ot)||(mt=function(Ft,Sn){if(Ft){if(typeof Ft=="string")return De(Ft,Sn);var mn=Object.prototype.toString.call(Ft).slice(8,-1);if(mn==="Object"&&Ft.constructor&&(mn=Ft.constructor.name),mn==="Map"||mn==="Set")return Array.from(Ft);if(mn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(mn))return De(Ft,Sn)}}(ot))||It){mt&&(ot=mt);var jt=0,xt=function(){};return{s:xt,n:function(){return jt>=ot.length?{done:!0}:{done:!1,value:ot[jt++]}},e:function(Ft){throw Ft},f:xt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
109
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Nt,Ut=!0,rn=!1;return{s:function(){mt=mt.call(ot)},n:function(){var Ft=mt.next();return Ut=Ft.done,Ft},e:function(Ft){rn=!0,Nt=Ft},f:function(){try{Ut||mt.return==null||mt.return()}finally{if(rn)throw Nt}}}}function De(ot,It){(It==null||It>ot.length)&&(It=ot.length);for(var mt=0,jt=new Array(It);mt<It;mt++)jt[mt]=ot[mt];return jt}var Ae="publish-library-data",ie=function(){var ot=(0,f.Z)(k().mark(function It(mt){var jt,xt,Nt,Ut,rn,Ft,Sn,mn,Yn,ht,Xt,zt,Vt,Tn,Dn,Nn,Xn;return k().wrap(function(jn){for(;;)switch(jn.prev=jn.next){case 0:jt=6,xt=128,Nt=Math.round(xt/16),Ut=Math.max(Math.round(xt/64),2),rn=(0,G.yo)(mt,jt),(Ft=document.createElement("canvas")).width=rn[0].length*xt+(rn[0].length+1)*(2*Nt)-2*Nt,Ft.height=rn.length*xt+(rn.length+1)*(2*Nt)-2*Nt,(Sn=Ft.getContext("2d")).fillStyle=p.white,Sn.fillRect(0,0,Ft.width,Ft.height),mn=Oe(mt.entries()),jn.prev=12,mn.s();case 14:if((Yn=mn.n()).done){jn.next=28;break}return ht=(0,l.Z)(Yn.value,2),Xt=ht[0],zt=ht[1],jn.next=18,(0,w.NL)({elements:zt.elements,files:null,maxWidthOrHeight:xt});case 18:Vt=jn.sent,Tn=Vt.width,Dn=Vt.height,Nn=Math.floor(Xt/jt)*(xt+2*Nt),Xn=Xt%jt*(xt+2*Nt),Sn.drawImage(Vt,Xn+(xt-Tn)/2+Nt,Nn+(xt-Dn)/2+Nt),Sn.lineWidth=Ut,Sn.strokeStyle=p.gray[4],Sn.strokeRect(Xn+Nt/2,Nn+Nt/2,xt+Nt,xt+Nt);case 26:jn.next=14;break;case 28:jn.next=33;break;case 30:jn.prev=30,jn.t0=jn.catch(12),mn.e(jn.t0);case 33:return jn.prev=33,mn.f(),jn.finish(33);case 36:return jn.t1=O.Tu,jn.t2=File,jn.next=40,(0,O._c)(Ft);case 40:return jn.t3=jn.sent,jn.t4=[jn.t3],jn.t5={type:be.LO.png},jn.t6=new jn.t2(jn.t4,"preview",jn.t5),jn.t7={outputType:be.LO.jpg,maxWidthOrHeight:5e3},jn.next=47,(0,jn.t1)(jn.t6,jn.t7);case 47:return jn.abrupt("return",jn.sent);case 48:case"end":return jn.stop()}},It,null,[[12,30,33,36]])}));return function(It){return ot.apply(this,arguments)}}(),Ie=function(ot){var It=ot.libItem,mt=ot.appState,jt=ot.index,xt=ot.onChange,Nt=ot.onRemove,Ut=(0,g.useRef)(null),rn=(0,g.useRef)(null);return(0,g.useEffect)(function(){var Ft=Ut.current;Ft&&(0,f.Z)(k().mark(function Sn(){var mn;return k().wrap(function(Yn){for(;;)switch(Yn.prev=Yn.next){case 0:return Yn.next=2,(0,w.$D)({elements:It.elements,appState:Ce(Ce({},mt),{},{viewBackgroundColor:p.white,exportBackground:!0}),files:null});case 2:mn=Yn.sent,Ft.innerHTML=mn.outerHTML;case 4:case"end":return Yn.stop()}},Sn)}))()},[It.elements,mt]),(0,ce.jsxs)("div",{className:"single-library-item",children:[It.status==="published"&&(0,ce.jsx)("span",{className:"single-library-item-status",children:(0,R.t)("labels.statusPublished")}),(0,ce.jsx)("div",{ref:Ut,className:"single-library-item__svg"}),(0,ce.jsx)(h.V,{"aria-label":(0,R.t)("buttons.remove"),type:"button",icon:L.Tw,className:"single-library-item--remove",onClick:Nt.bind(null,It.id),title:(0,R.t)("buttons.remove")}),(0,ce.jsxs)("div",{style:{display:"flex",margin:"0.8rem 0",width:"100%",fontSize:"14px",fontWeight:500,flexDirection:"column"},children:[(0,ce.jsxs)("label",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column"},children:[(0,ce.jsxs)("div",{style:{padding:"0.5em 0"},children:[(0,ce.jsx)("span",{style:{fontWeight:500,color:p.gray[6]},children:(0,R.t)("publishDialog.itemName")}),(0,ce.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,ce.jsx)("input",{type:"text",ref:rn,style:{width:"80%",padding:"0.2rem"},defaultValue:It.name,placeholder:"Item name",onChange:function(Ft){xt(Ft.target.value,jt)}})]}),(0,ce.jsx)("span",{className:"error",children:It.error})]})]})},oe=function(ot){var It=ot.onClose,mt=ot.libraryItems,jt=ot.appState,xt=ot.onSuccess,Nt=ot.onError,Ut=ot.updateItemsInStorage,rn=ot.onRemove,Ft=(0,g.useState)({authorName:"",githubHandle:"",name:"",description:"",twitterHandle:"",website:""}),Sn=(0,l.Z)(Ft,2),mn=Sn[0],Yn=Sn[1],ht=(0,g.useState)(!1),Xt=(0,l.Z)(ht,2),zt=Xt[0],Vt=Xt[1];(0,g.useEffect)(function(){var yn=function(){try{var fn=localStorage.getItem(Ae);if(fn)return JSON.parse(fn)}catch(Bn){console.error(Bn)}return null}();yn&&Yn(yn)},[]);var Tn=(0,g.useState)(mt.slice()),Dn=(0,l.Z)(Tn,2),Nn=Dn[0],Xn=Dn[1];(0,g.useEffect)(function(){Xn(mt.slice())},[mt]);var jn,wt=function(yn){Yn(Ce(Ce({},mn),{},(0,U.Z)({},yn.target.name,yn.target.value)))},Et=function(){var yn=(0,f.Z)(k().mark(function fn(Bn){var En,Cn,qn,vn,wn,In,kn;return k().wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:if(Bn.preventDefault(),Vt(!0),En=[],Cn=!1,Nn.forEach(function(Pn){var Jn="";Pn.name||(Jn=(0,R.t)("publishDialog.errors.required"),Cn=!0),En.push(Ce(Ce({},Pn),{},{error:Jn}))}),!Cn){nr.next=9;break}return Xn(En),Vt(!1),nr.abrupt("return");case 9:return nr.next=11,ie(Nn);case 11:qn=nr.sent,vn={type:be.r8.excalidrawLibrary,version:be.Kr.excalidrawLibrary,source:be.pb,libraryItems:Nn},wn=JSON.stringify(vn,null,2),In=new Blob([wn],{type:"application/json"}),(kn=new FormData).append("excalidrawLib",In),kn.append("previewImage",qn),kn.append("previewImageType",qn.type),kn.append("title",mn.name),kn.append("authorName",mn.authorName),kn.append("githubHandle",mn.githubHandle),kn.append("name",mn.name),kn.append("description",mn.description),kn.append("twitterHandle",mn.twitterHandle),kn.append("website",mn.website),fetch("".concat("https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries","/submit"),{method:"post",body:kn}).then(function(Pn){return Pn.ok?Pn.json().then(function(Jn){var xr=Jn.url;localStorage.removeItem(Ae),xt({url:xr,authorName:mn.authorName,items:Nn})}):Pn.json().catch(function(){throw new Error(Pn.statusText||"something went wrong")}).then(function(Jn){throw new Error(Jn.message||Pn.statusText||"something went wrong")})},function(Pn){console.error(Pn),Nt(Pn),Vt(!1)}).catch(function(Pn){console.error(Pn),Nt(Pn),Vt(!1)});case 27:case"end":return nr.stop()}},fn)}));return function(fn){return yn.apply(this,arguments)}}(),Ct=(0,g.useCallback)(function(){Ut(Nn),function(yn){try{localStorage.setItem(Ae,JSON.stringify(yn))}catch(fn){console.error(fn)}}(mn),It()},[Nn,It,Ut,mn]),Lt=!!mt.length,hn=mt.some(function(yn){return yn.status==="published"});return(0,ce.jsx)(c.V,{onCloseRequest:Ct,title:(0,R.t)("publishDialog.title"),className:"publish-library",children:Lt?(0,ce.jsxs)("form",{onSubmit:Et,children:[(0,ce.jsx)("div",{className:"publish-library-note",children:(0,ce.jsx)(z.Z,{i18nKey:"publishDialog.noteDescription",link:function(yn){return(0,ce.jsx)("a",{href:"https://libraries.excalidraw.com",target:"_blank",rel:"noopener noreferrer",children:yn})}})}),(0,ce.jsx)("span",{className:"publish-library-note",children:(0,ce.jsx)(z.Z,{i18nKey:"publishDialog.noteGuidelines",link:function(yn){return(0,ce.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries#guidelines",target:"_blank",rel:"noopener noreferrer",children:yn})}})}),(0,ce.jsx)("div",{className:"publish-library-note",children:(0,R.t)("publishDialog.noteItems")}),hn&&(0,ce.jsx)("span",{className:"publish-library-note publish-library-warning",children:(0,R.t)("publishDialog.republishWarning")}),(jn=[],Nn.forEach(function(yn,fn){jn.push((0,ce.jsx)("div",{className:"single-library-item-wrapper",children:(0,ce.jsx)(Ie,{libItem:yn,appState:jt,index:fn,onChange:function(Bn,En){var Cn=Nn.slice();Cn[En].name=Bn,Xn(Cn)},onRemove:rn})},fn))}),(0,ce.jsx)("div",{className:"selected-library-items",children:jn})),(0,ce.jsxs)("div",{className:"publish-library__fields",children:[(0,ce.jsxs)("label",{children:[(0,ce.jsxs)("div",{children:[(0,ce.jsx)("span",{children:(0,R.t)("publishDialog.libraryName")}),(0,ce.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,ce.jsx)("input",{type:"text",name:"name",required:!0,value:mn.name,onChange:wt,placeholder:(0,R.t)("publishDialog.placeholder.libraryName")})]}),(0,ce.jsxs)("label",{style:{alignItems:"flex-start"},children:[(0,ce.jsxs)("div",{children:[(0,ce.jsx)("span",{children:(0,R.t)("publishDialog.libraryDesc")}),(0,ce.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,ce.jsx)("textarea",{name:"description",rows:4,required:!0,value:mn.description,onChange:wt,placeholder:(0,R.t)("publishDialog.placeholder.libraryDesc")})]}),(0,ce.jsxs)("label",{children:[(0,ce.jsxs)("div",{children:[(0,ce.jsx)("span",{children:(0,R.t)("publishDialog.authorName")}),(0,ce.jsx)("span",{"aria-hidden":"true",className:"required",children:"*"})]}),(0,ce.jsx)("input",{type:"text",name:"authorName",required:!0,value:mn.authorName,onChange:wt,placeholder:(0,R.t)("publishDialog.placeholder.authorName")})]}),(0,ce.jsxs)("label",{children:[(0,ce.jsx)("span",{children:(0,R.t)("publishDialog.githubUsername")}),(0,ce.jsx)("input",{type:"text",name:"githubHandle",value:mn.githubHandle,onChange:wt,placeholder:(0,R.t)("publishDialog.placeholder.githubHandle")})]}),(0,ce.jsxs)("label",{children:[(0,ce.jsx)("span",{children:(0,R.t)("publishDialog.twitterUsername")}),(0,ce.jsx)("input",{type:"text",name:"twitterHandle",value:mn.twitterHandle,onChange:wt,placeholder:(0,R.t)("publishDialog.placeholder.twitterHandle")})]}),(0,ce.jsxs)("label",{children:[(0,ce.jsx)("span",{children:(0,R.t)("publishDialog.website")}),(0,ce.jsx)("input",{type:"text",name:"website",pattern:"https?://.+",title:(0,R.t)("publishDialog.errors.website"),value:mn.website,onChange:wt,placeholder:(0,R.t)("publishDialog.placeholder.website")})]}),(0,ce.jsx)("span",{className:"publish-library-note",children:(0,ce.jsx)(z.Z,{i18nKey:"publishDialog.noteLicense",link:function(yn){return(0,ce.jsx)("a",{href:"https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:yn})}})})]}),(0,ce.jsxs)("div",{className:"publish-library__buttons",children:[(0,ce.jsx)($.Z,{label:(0,R.t)("buttons.cancel"),onClick:Ct,"data-testid":"cancel-clear-canvas-button"}),(0,ce.jsx)($.Z,{type:"submit",label:(0,R.t)("buttons.submit"),actionType:"primary",isLoading:zt})]})]}):(0,ce.jsx)("p",{style:{padding:"1em",textAlign:"center",fontWeight:500},children:(0,R.t)("publishDialog.atleastOneLibItem")})})},s=t(7104),u=t(100),x=t(5832),V=function(ot,It){return ot.filter(function(mt){return It.includes(mt.id)})},W=function(ot){var It,mt,jt=ot.setAppState,xt=ot.selectedItems,Nt=ot.library,Ut=ot.onRemoveFromLibrary,rn=ot.resetLibrary,Ft=ot.onSelectItems,Sn=ot.appState,mn=ot.className,Yn=(0,r.KO)(P.rF,A.yE),ht=(0,l.Z)(Yn,1)[0],Xt=(0,r.KO)(Zt,A.yE),zt=(0,l.Z)(Xt,2),Vt=zt[0],Tn=zt[1],Dn=(0,g.useState)(!1),Nn=(0,l.Z)(Dn,2),Xn=Nn[0],jn=Nn[1],wt=!!xt.length,Et=wt?ht.libraryItems.filter(function(kn){return xt.includes(kn.id)}):ht.libraryItems,Ct=wt?(0,R.t)("buttons.remove"):(0,R.t)("buttons.resetLibrary"),Lt=(0,g.useState)(!1),hn=(0,l.Z)(Lt,2),yn=hn[0],fn=hn[1],Bn=(0,g.useState)(null),En=(0,l.Z)(Bn,2),Cn=En[0],qn=En[1],vn=(0,g.useCallback)(function(){return(0,ce.jsxs)(c.V,{onCloseRequest:function(){return qn(null)},title:(0,R.t)("publishSuccessDialog.title"),className:"publish-library-success",size:"small",children:[(0,ce.jsx)("p",{children:(0,ce.jsx)(z.Z,{i18nKey:"publishSuccessDialog.content",authorName:Cn.authorName,link:function(kn){return(0,ce.jsx)("a",{href:Cn==null?void 0:Cn.url,target:"_blank",rel:"noopener noreferrer",children:kn})}})}),(0,ce.jsx)(h.V,{type:"button",title:(0,R.t)("buttons.close"),"aria-label":(0,R.t)("buttons.close"),label:(0,R.t)("buttons.close"),onClick:function(){return qn(null)},"data-testid":"publish-library-success-close",className:"publish-library-success-close"})]})},[qn,Cn]),wn=function(){var kn=(0,f.Z)(k().mark(function nr(){return k().wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:return Pn.prev=0,Pn.next=3,Nt.updateLibrary({libraryItems:(0,y.I$)({description:"Excalidraw library files"}),merge:!0,openLibraryMenu:!0});case 3:Pn.next=11;break;case 5:if(Pn.prev=5,Pn.t0=Pn.catch(0),(Pn.t0===null||Pn.t0===void 0?void 0:Pn.t0.name)!=="AbortError"){Pn.next=10;break}return console.warn(Pn.t0),Pn.abrupt("return");case 10:jt({errorMessage:(0,R.t)("errors.importLibraryError")});case 11:case"end":return Pn.stop()}},nr,null,[[0,5]])}));return function(){return kn.apply(this,arguments)}}(),In=function(){var kn=(0,f.Z)(k().mark(function nr(){var Pn;return k().wrap(function(Jn){for(;;)switch(Jn.prev=Jn.next){case 0:if(!wt){Jn.next=4;break}Jn.t0=Et,Jn.next=7;break;case 4:return Jn.next=6,Nt.getLatestLibrary();case 6:Jn.t0=Jn.sent;case 7:Pn=Jn.t0,(0,m.t1)(Pn).catch(G.FG).catch(function(xr){jt({errorMessage:xr.message})});case 9:case"end":return Jn.stop()}},nr)}));return function(){return kn.apply(this,arguments)}}();return(0,ce.jsxs)("div",{className:(0,ne.Z)("library-menu-dropdown-container",mn),children:[(0,ce.jsxs)(s.Z,{open:Vt,children:[(0,ce.jsx)(s.Z.Trigger,{onToggle:function(){return Tn(!Vt)},children:L.YA}),(0,ce.jsxs)(s.Z.Content,{onClickOutside:function(){return Tn(!1)},onSelect:function(){return Tn(!1)},className:"library-menu",children:[!wt&&(0,ce.jsx)(s.Z.Item,{onSelect:wn,icon:L.Tl,"data-testid":"lib-dropdown--load",children:(0,R.t)("buttons.load")}),!!Et.length&&(0,ce.jsx)(s.Z.Item,{onSelect:In,icon:L.Hy,"data-testid":"lib-dropdown--export",children:(0,R.t)("buttons.export")}),!!Et.length&&(0,ce.jsx)(s.Z.Item,{onSelect:function(){return jn(!0)},icon:L.XH,children:Ct}),wt&&(0,ce.jsx)(s.Z.Item,{icon:L.Nw,onSelect:function(){return fn(!0)},"data-testid":"lib-dropdown--remove",children:(0,R.t)("buttons.publishLibrary")})]})]}),xt.length>0&&(0,ce.jsx)("div",{className:"library-actions-counter",children:xt.length}),Xn&&(It=xt.length?(0,R.t)("alerts.removeItemsFromsLibrary",{count:xt.length}):(0,R.t)("alerts.resetLibrary"),mt=xt.length?(0,R.t)("confirmDialog.removeItemsFromLib"):(0,R.t)("confirmDialog.resetLibrary"),(0,ce.jsx)(M.Z,{onConfirm:function(){xt.length?Ut():rn(),jn(!1)},onCancel:function(){jn(!1)},title:mt,children:(0,ce.jsx)("p",{children:It})})),yn&&(0,ce.jsx)(oe,{onClose:function(){return fn(!1)},libraryItems:V(ht.libraryItems,xt),appState:Sn,onSuccess:function(kn){return function(nr,Pn){fn(!1),qn({url:nr.url,authorName:nr.authorName});var Jn=Pn.slice();Jn.forEach(function(xr){xt.includes(xr.id)&&(xr.status="published")}),Nt.setLibrary(Jn)}(kn,ht.libraryItems)},onError:function(kn){return window.alert(kn)},updateItemsInStorage:function(){return Nt.setLibrary(ht.libraryItems)},onRemove:function(kn){return Ft(xt.filter(function(nr){return nr!==kn}))}}),Cn&&vn()]})},re=function(ot){var It=ot.selectedItems,mt=ot.onSelectItems,jt=ot.className,xt=(0,E.qD)().library,Nt=(0,x.yT)(),Ut=Nt.clearLibraryCache,rn=Nt.deleteItemsFromLibraryCache,Ft=(0,u.I)(),Sn=(0,E.n9)(),mn=(0,r.KO)(P.rF,A.yE),Yn=(0,l.Z)(mn,1)[0],ht=function(){var Xt=(0,f.Z)(k().mark(function zt(Vt){var Tn;return k().wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:Tn=Vt.filter(function(Nn){return!It.includes(Nn.id)}),xt.setLibrary(Tn).catch(function(){Sn({errorMessage:(0,R.t)("alerts.errorRemovingFromLibrary")})}),rn(It),mt([]);case 4:case"end":return Dn.stop()}},zt)}));return function(zt){return Xt.apply(this,arguments)}}();return(0,ce.jsx)(W,{appState:Ft,setAppState:Sn,selectedItems:It,onSelectItems:mt,library:xt,onRemoveFromLibrary:function(){return ht(Yn.libraryItems)},resetLibrary:function(){xt.resetLibrary(),Ut()},className:jt})},ee=t(5644),se={};se.styleTagTransform=ke(),se.setAttributes=ve(),se.insert=pe().bind(null,"head"),se.domAPI=N(),se.insertStyleElement=H(),C()(ee.Z,se),ee.Z&&ee.Z.locals&&ee.Z.locals;var Ee=t(6238),_e=(0,g.memo)(function(ot){var It=ot.id,mt=ot.elements,jt=ot.isPending,xt=ot.onClick,Nt=ot.selected,Ut=ot.onToggle,rn=ot.onDrag,Ft=ot.svgCache,Sn=(0,g.useRef)(null),mn=(0,x.mF)(It,mt,Ft);(0,g.useEffect)(function(){var Dn=Sn.current;if(Dn)return mn&&(Dn.innerHTML=mn.outerHTML),function(){Dn.innerHTML=""}},[mn]);var Yn=(0,g.useState)(!1),ht=(0,l.Z)(Yn,2),Xt=ht[0],zt=ht[1],Vt=(0,E.Fy)().editor.isMobile,Tn=jt&&(0,ce.jsx)("div",{className:"library-unit__adder",children:L.pO});return(0,ce.jsxs)("div",{className:(0,ne.Z)("library-unit",{"library-unit__active":mt,"library-unit--hover":mt&&Xt,"library-unit--selected":Nt,"library-unit--skeleton":!mn}),onMouseEnter:function(){return zt(!0)},onMouseLeave:function(){return zt(!1)},children:[(0,ce.jsx)("div",{className:(0,ne.Z)("library-unit__dragger",{"library-unit__pulse":!!jt}),ref:Sn,draggable:!!mt,onClick:mt||jt?function(Dn){It&&Dn.shiftKey?Ut(It,Dn):xt(It)}:void 0,onDragStart:function(Dn){It?(zt(!1),rn(It,Dn)):Dn.preventDefault()}}),Tn,It&&mt&&(Xt||Vt||Nt)&&(0,ce.jsx)(Ee.o,{checked:Nt,onChange:function(Dn,Nn){return Ut(It,Nn)},className:"library-unit__checkbox"})]})}),Ue=function(){return(0,ce.jsx)("div",{className:"library-unit library-unit--skeleton"})},We=a().useTransition||function(){return[!1,(0,g.useCallback)(function(ot){return ot()},[])]},Ye=function(ot){var It=ot.children;return(0,ce.jsx)("div",{className:"library-menu-items-container__grid",children:It})},Ze=(0,g.memo)(function(ot){var It=ot.items,mt=ot.onItemSelectToggle,jt=ot.onItemDrag,xt=ot.isItemSelected,Nt=ot.onClick,Ut=ot.svgCache,rn=ot.itemsRenderedPerBatch,Ft=We(),Sn=(0,l.Z)(Ft,2)[1],mn=(0,g.useState)(0),Yn=(0,l.Z)(mn,2),ht=Yn[0],Xt=Yn[1];return(0,g.useEffect)(function(){ht<It.length&&Sn(function(){Xt(ht+rn)})},[ht,It.length,Sn,rn]),(0,ce.jsx)(ce.Fragment,{children:It.map(function(zt,Vt){var Tn;return Vt<ht?(0,ce.jsx)(_e,{elements:zt==null?void 0:zt.elements,isPending:!(zt!=null&&zt.id||zt==null||!zt.elements),onClick:Nt,svgCache:Ut,id:zt==null?void 0:zt.id,selected:xt(zt.id),onToggle:mt,onDrag:jt},(Tn=zt==null?void 0:zt.id)!==null&&Tn!==void 0?Tn:Vt):(0,ce.jsx)(Ue,{},Vt)})})}),Je=t(200),nt=t.n(Je),dt=(0,r.cn)(0),ge=t(6440),Se={};Se.styleTagTransform=ke(),Se.setAttributes=ve(),Se.insert=pe().bind(null,"head"),Se.domAPI=N(),Se.insertStyleElement=H(),C()(ge.Z,Se),ge.Z&&ge.Z.locals&&ge.Z.locals;function Be(ot,It){var mt=Object.keys(ot);if(Object.getOwnPropertySymbols){var jt=Object.getOwnPropertySymbols(ot);It&&(jt=jt.filter(function(xt){return Object.getOwnPropertyDescriptor(ot,xt).enumerable})),mt.push.apply(mt,jt)}return mt}function Xe(ot){for(var It=1;It<arguments.length;It++){var mt=arguments[It]!=null?arguments[It]:{};It%2?Be(Object(mt),!0).forEach(function(jt){(0,U.Z)(ot,jt,mt[jt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ot,Object.getOwnPropertyDescriptors(mt)):Be(Object(mt)).forEach(function(jt){Object.defineProperty(ot,jt,Object.getOwnPropertyDescriptor(mt,jt))})}return ot}function lt(ot){var It=ot.isLoading,mt=ot.libraryItems,jt=ot.onAddToLibrary,xt=ot.onInsertLibraryItems,Nt=ot.pendingElements,Ut=ot.theme,rn=ot.id,Ft=ot.libraryReturnUrl,Sn=ot.onSelectItems,mn=ot.selectedItems,Yn=(0,g.useRef)(null),ht=function(En){var Cn=(0,r.KO)(dt),qn=(0,l.Z)(Cn,2),vn=qn[0],wn=qn[1];return(0,g.useEffect)(function(){var In=En.current;if(In){var kn=nt()(function(){var nr=In.scrollTop;wn(nr)},200);return In.addEventListener("scroll",kn),function(){kn.cancel(),In.removeEventListener("scroll",kn)}}},[En,wn]),vn}(Yn);(0,g.useEffect)(function(){var En;ht>0&&((En=Yn.current)===null||En===void 0||En.scrollTo(0,ht))},[]);var Xt=(0,x.yT)().svgCache,zt=(0,g.useMemo)(function(){return mt.filter(function(En){return En.status!=="published"})},[mt]),Vt=(0,g.useMemo)(function(){return mt.filter(function(En){return En.status==="published"})},[mt]),Tn=!mt.length&&!Nt.length,Dn=!Nt.length&&!zt.length&&!Vt.length,Nn=(0,g.useState)(null),Xn=(0,l.Z)(Nn,2),jn=Xn[0],wt=Xn[1],Et=(0,g.useCallback)(function(En,Cn){var qn=!mn.includes(En),vn=[].concat((0,j.Z)(zt),(0,j.Z)(Vt));if(qn){if(Cn.shiftKey&&jn){var wn=vn.findIndex(function(Pn){return Pn.id===jn}),In=vn.findIndex(function(Pn){return Pn.id===En});if(wn===-1||In===-1)return void Sn([].concat((0,j.Z)(mn),[En]));var kn=(0,G.xn)(mn),nr=vn.reduce(function(Pn,Jn,xr){return(xr>=wn&&xr<=In||kn.has(Jn.id))&&Pn.push(Jn.id),Pn},[]);Sn(nr)}else Sn([].concat((0,j.Z)(mn),[En]));wt(En)}else wt(null),Sn(mn.filter(function(Pn){return Pn!==En}))},[jn,Sn,Vt,mn,zt]),Ct=(0,g.useCallback)(function(En){return(mn.includes(En)?mt.filter(function(Cn){return mn.includes(Cn.id)}):mt.filter(function(Cn){return Cn.id===En})).map(function(Cn){return Xe(Xe({},Cn),{},{elements:(0,xe._N)(Cn.elements,{randomizeSeed:!0})})})},[mt,mn]),Lt=(0,g.useCallback)(function(En,Cn){Cn.dataTransfer.setData(be.LO.excalidrawlib,(0,m.NI)(Ct(En)))},[Ct]),hn=(0,g.useCallback)(function(En){return!!En&&mn.includes(En)},[mn]),yn=(0,g.useCallback)(function(){jt(Nt)},[Nt,jt]),fn=(0,g.useCallback)(function(En){En&&xt(Ct(En))},[Ct,xt]),Bn=Xt.size>=mt.length?64:17;return(0,ce.jsxs)("div",{className:"library-menu-items-container",style:Nt.length||zt.length||Vt.length?{justifyContent:"flex-start"}:{borderBottom:0},children:[!Dn&&(0,ce.jsx)(re,{selectedItems:mn,onSelectItems:Sn,className:"library-menu-dropdown-container--in-heading"}),(0,ce.jsxs)(he.Z.Col,{className:"library-menu-items-container__items",align:"start",gap:1,style:{flex:Vt.length>0?1:"0 1 auto",marginBottom:0},ref:Yn,children:[(0,ce.jsxs)(ce.Fragment,{children:[!Dn&&(0,ce.jsx)("div",{className:"library-menu-items-container__header",children:(0,R.t)("labels.personalLib")}),It&&(0,ce.jsx)("div",{style:{position:"absolute",top:"var(--container-padding-y)",right:"var(--container-padding-x)",transform:"translateY(50%)"},children:(0,ce.jsx)(we.Z,{})}),Nt.length||zt.length?(0,ce.jsxs)(Ye,{children:[Nt.length>0&&(0,ce.jsx)(Ze,{itemsRenderedPerBatch:Bn,items:[{id:null,elements:Nt}],onItemSelectToggle:Et,onItemDrag:Lt,onClick:yn,isItemSelected:hn,svgCache:Xt}),(0,ce.jsx)(Ze,{itemsRenderedPerBatch:Bn,items:zt,onItemSelectToggle:Et,onItemDrag:Lt,onClick:fn,isItemSelected:hn,svgCache:Xt})]}):(0,ce.jsxs)("div",{className:"library-menu-items__no-items",children:[(0,ce.jsx)("div",{className:"library-menu-items__no-items__label",children:(0,R.t)("library.noItems")}),(0,ce.jsx)("div",{className:"library-menu-items__no-items__hint",children:Vt.length>0?(0,R.t)("library.hint_emptyPrivateLibrary"):(0,R.t)("library.hint_emptyLibrary")})]})]}),(0,ce.jsxs)(ce.Fragment,{children:[(Vt.length>0||Nt.length>0||zt.length>0)&&(0,ce.jsx)("div",{className:"library-menu-items-container__header library-menu-items-container__header--excal",children:(0,R.t)("labels.excalidrawLib")}),Vt.length>0?(0,ce.jsx)(Ye,{children:(0,ce.jsx)(Ze,{itemsRenderedPerBatch:Bn,items:Vt,onItemSelectToggle:Et,onItemDrag:Lt,onClick:fn,isItemSelected:hn,svgCache:Xt})}):zt.length>0?(0,ce.jsx)("div",{style:{margin:"1rem 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",fontSize:".9rem"},children:(0,R.t)("library.noItems")}):null]}),Tn&&(0,ce.jsx)(S,{style:{padding:"16px 0",width:"100%"},id:rn,libraryReturnUrl:Ft,theme:Ut,children:(0,ce.jsx)(re,{selectedItems:mn,onSelectItems:Sn})})]})]})}var it=t(3646),yt=t(4105),_t=t(8923),ut={};ut.styleTagTransform=ke(),ut.setAttributes=ve(),ut.insert=pe().bind(null,"head"),ut.domAPI=N(),ut.insertStyleElement=H(),C()(_t.Z,ut),_t.Z&&_t.Z.locals&&_t.Z.locals;function Tt(ot,It){var mt=typeof Symbol<"u"&&ot[Symbol.iterator]||ot["@@iterator"];if(!mt){if(Array.isArray(ot)||(mt=function(Ft,Sn){if(Ft){if(typeof Ft=="string")return Yt(Ft,Sn);var mn=Object.prototype.toString.call(Ft).slice(8,-1);if(mn==="Object"&&Ft.constructor&&(mn=Ft.constructor.name),mn==="Map"||mn==="Set")return Array.from(Ft);if(mn==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(mn))return Yt(Ft,Sn)}}(ot))||It){mt&&(ot=mt);var jt=0,xt=function(){};return{s:xt,n:function(){return jt>=ot.length?{done:!0}:{done:!1,value:ot[jt++]}},e:function(Ft){throw Ft},f:xt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
110
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Nt,Ut=!0,rn=!1;return{s:function(){mt=mt.call(ot)},n:function(){var Ft=mt.next();return Ut=Ft.done,Ft},e:function(Ft){rn=!0,Nt=Ft},f:function(){try{Ut||mt.return==null||mt.return()}finally{if(rn)throw Nt}}}}function Yt(ot,It){(It==null||It>ot.length)&&(It=ot.length);for(var mt=0,jt=new Array(It);mt<It;mt++)jt[mt]=ot[mt];return jt}var Zt=(0,r.cn)(!1),Pt=function(ot){var It=ot.children;return(0,ce.jsx)("div",{className:"layer-ui__library",children:It})},en=function(ot){var It=ot.onInsertLibraryItems,mt=ot.pendingElements,jt=ot.onAddToLibrary,xt=ot.setAppState,Nt=ot.libraryReturnUrl,Ut=ot.library,rn=ot.id,Ft=ot.theme,Sn=ot.selectedItems,mn=ot.onSelectItems,Yn=(0,r.KO)(P.rF,A.yE),ht=(0,l.Z)(Yn,1)[0],Xt=(0,g.useCallback)(function(Tn){var Dn=function(){var Nn=(0,f.Z)(k().mark(function Xn(jn,wt){var Et,Ct,Lt,hn,yn;return k().wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:(0,it.L)("element","addToLibrary","ui"),Et=Tt(be.PR),fn.prev=2,Lt=function(){var Bn=Ct.value;if(jn.some(function(En){return En.type===Bn}))return{v:xt({errorMessage:(0,R.t)("errors.libraryElementTypeError.".concat(Bn))})}},Et.s();case 5:if((Ct=Et.n()).done){fn.next=11;break}if(hn=Lt(),(0,T.Z)(hn)!=="object"){fn.next=9;break}return fn.abrupt("return",hn.v);case 9:fn.next=5;break;case 11:fn.next=16;break;case 13:fn.prev=13,fn.t0=fn.catch(2),Et.e(fn.t0);case 16:return fn.prev=16,Et.f(),fn.finish(16);case 19:yn=[{status:"unpublished",elements:jn,id:(0,K.kb)(),created:Date.now()}].concat((0,j.Z)(wt)),jt(),Ut.setLibrary(yn).catch(function(){xt({errorMessage:(0,R.t)("alerts.errorAddingToLibrary")})});case 22:case"end":return fn.stop()}},Xn,null,[[2,13,16,19]])}));return function(Xn,jn){return Nn.apply(this,arguments)}}();Dn(Tn,ht.libraryItems)},[jt,Ut,xt,ht.libraryItems]),zt=(0,g.useMemo)(function(){return ht.libraryItems},[ht]);if(ht.status==="loading"&&!ht.isInitialized)return(0,ce.jsx)(Pt,{children:(0,ce.jsx)("div",{className:"layer-ui__library-message",children:(0,ce.jsxs)("div",{children:[(0,ce.jsx)(we.Z,{size:"2em"}),(0,ce.jsx)("span",{children:(0,R.t)("labels.libraryLoadingMessage")})]})})});var Vt=ht.libraryItems.length>0||mt.length>0;return(0,ce.jsxs)(Pt,{children:[(0,ce.jsx)(lt,{isLoading:ht.status==="loading",libraryItems:zt,onAddToLibrary:Xt,onInsertLibraryItems:It,pendingElements:mt,id:rn,libraryReturnUrl:Nt,theme:Ft,onSelectItems:mn,selectedItems:Sn}),Vt&&(0,ce.jsx)(S,{className:"library-menu-control-buttons--at-bottom",style:{padding:"16px 12px 0 12px"},id:rn,libraryReturnUrl:Nt,theme:Ft})]})},tn=function(){var ot=(0,E.qD)(),It=ot.library,mt=ot.id,jt=ot.onInsertElements,xt=(0,E.hY)(),Nt=(0,u.I)(),Ut=(0,E.n9)(),rn=(0,E.bd)(),Ft=(0,g.useState)([]),Sn=(0,l.Z)(Ft,2),mn=Sn[0],Yn=Sn[1],ht=(0,g.useMemo)(function(){return It},[It]),Xt=function(Tn,Dn){var Nn=function(){return(0,yt.eD)(Dn,Tn,{includeBoundTextElement:!0,includeElementsInFrames:!0})},Xn=(0,g.useRef)(Nn()),jn=(0,g.useRef)(Tn),wt=(0,g.useRef)(Dn);return(0,G.w8)(Tn.selectedElementIds,jn.current.selectedElementIds)&&(0,G.w8)(Dn,wt.current)||(Xn.current=Nn(),jn.current=Tn,wt.current=Dn),Xn.current}(Nt,rn),zt=(0,g.useCallback)(function(Tn){jt((0,P.WV)(Tn))},[jt]),Vt=(0,g.useCallback)(function(){Ut({selectedElementIds:{},selectedGroupIds:{},activeEmbeddable:null})},[Ut]);return(0,ce.jsx)(en,{pendingElements:Xt,onInsertLibraryItems:zt,onAddToLibrary:Vt,setAppState:Ut,libraryReturnUrl:xt.libraryReturnUrl,library:ht,id:mt,theme:Nt.theme,selectedItems:mn,onSelectItems:Yn})}},7165:function(fe,Q,t){t.d(Q,{z:function(){return a}});var T=t(2577),j=t(8227),f=t(9787),l=t(8531),v=t(45),k=t(9937),g=t(4512),a=function(P){var R=P.delay,K=P.theme,U=(0,f.useState)(!!R),m=(0,T.Z)(U,2),G=m[0],he=m[1];return(0,f.useEffect)(function(){if(R){var be=setTimeout(function(){he(!1)},R);return function(){return clearTimeout(be)}}},[R]),G?null:(0,g.jsxs)("div",{className:(0,v.Z)("LoadingMessage",{"LoadingMessage--dark":K===k.C6.DARK}),children:[(0,g.jsx)("div",{children:(0,g.jsx)(l.Z,{})}),(0,g.jsx)("div",{className:"LoadingMessage-text",children:(0,j.t)("labels.loadingScene")})]})}},7827:function(fe,Q,t){t.d(Q,{K:function(){return k},_:function(){return g}});var T=t(8950),j=t(2975),f=t.n(j),l=t(3607),v=t(453),k=(0,l.cn)({active:!1});function g(P){return a.apply(this,arguments)}function a(){return(a=(0,T.Z)(f().mark(function P(R){var K,U,m,G;return f().wrap(function(he){for(;;)switch(he.prev=he.next){case 0:return K=R.title,U=R.description,m=R.actionLabel,G=R.color,he.abrupt("return",new Promise(function(be){v.e_.set(k,{active:!0,onConfirm:function(){return be(!0)},onClose:function(){return be(!1)},onReject:function(){return be(!1)},title:K,description:U,actionLabel:m,color:G})}));case 2:case"end":return he.stop()}},P)}))).apply(this,arguments)}},3204:function(fe,Q,t){t.d(Q,{J:function(){return D}});var T=t(9787),j=t(3379),f=t.n(j),l=t(7795),v=t.n(l),k=t(569),g=t.n(k),a=t(3565),P=t.n(a),R=t(9216),K=t.n(R),U=t(4589),m=t.n(U),G=t(9935),he={};he.styleTagTransform=m(),he.setAttributes=P(),he.insert=g().bind(null,"head"),he.domAPI=v(),he.insertStyleElement=K(),f()(G.Z,he),G.Z&&G.Z.locals&&G.Z.locals;var be=t(5156),we=t(9827),xe=t(5491),ce=t(4512),D=function(ne){var S=ne.children,z=ne.left,A=ne.top,E=ne.onCloseRequest,L=ne.fitInViewport,h=L!==void 0&&L,y=ne.offsetLeft,r=y===void 0?0:y,M=ne.offsetTop,p=M===void 0?0:M,c=ne.viewportWidth,w=c===void 0?window.innerWidth:c,O=ne.viewportHeight,$=O===void 0?window.innerHeight:O,I=(0,T.useRef)(null);(0,T.useEffect)(function(){var _=I.current;if(_){_.contains(document.activeElement)||_.focus();var N=function(q){if(q.key===xe.tW.TAB){var pe=(0,we.xp)(_),te=document.activeElement,ve=pe.findIndex(function(ke){return ke===te});if(te===_){var ae;q.shiftKey?(ae=pe[pe.length-1])===null||ae===void 0||ae.focus():pe[0].focus(),q.preventDefault(),q.stopImmediatePropagation()}else if(ve===0&&q.shiftKey){var H;(H=pe[pe.length-1])===null||H===void 0||H.focus(),q.preventDefault(),q.stopImmediatePropagation()}else if(ve===pe.length-1&&!q.shiftKey){var le;(le=pe[0])===null||le===void 0||le.focus(),q.preventDefault(),q.stopImmediatePropagation()}}};return _.addEventListener("keydown",N),function(){return _.removeEventListener("keydown",N)}}},[]);var C=(0,T.useRef)(null);return(0,T.useLayoutEffect)(function(){if(h&&I.current&&A!=null&&z!=null){var _,N,q=I.current,pe=q.getBoundingClientRect(),te=pe.width,ve=pe.height;if(((_=C.current)===null||_===void 0?void 0:_.top)===A&&((N=C.current)===null||N===void 0?void 0:N.left)===z)return;C.current={top:A,left:z},te>=w?(q.style.width="".concat(w,"px"),q.style.left="0px",q.style.overflowX="scroll"):q.style.left="".concat(z+te-r>w?w-te-10:z,"px"),ve>=$?(q.style.height="".concat($-20,"px"),q.style.top="10px",q.style.overflowY="scroll"):q.style.top="".concat(A+ve-p>$?$-ve:A,"px")}},[A,z,h,w,$,r,p]),(0,T.useEffect)(function(){if(E){var _=function(N){var q;(q=I.current)!==null&&q!==void 0&&q.contains(N.target)||(0,be.unstable_batchedUpdates)(function(){return E(N)})};return document.addEventListener("pointerdown",_,!1),function(){return document.removeEventListener("pointerdown",_,!1)}}},[E]),(0,ce.jsx)("div",{className:"popover",ref:I,tabIndex:-1,children:S})}},5902:function(fe,Q,t){t.d(Q,{YE:function(){return jn},t6:function(){return Nn}});var T=t(2577),j=t(7169),f=t(2726),l=t(9787),v=t.n(l),k=t(1404),g=t(3607),a=t(453),P=v().createContext({}),R=t(45),K=t(8227),U=t(8242),m=t(8935),G=t(8925),he=t(8806),be=t(4512),we=function(wt){var Et=wt.children,Ct=wt.className,Lt=(0,U.Fy)(),hn=(0,l.useContext)(P),yn=!(!Lt.editor.canFitSidebar||!hn.shouldRenderDockButton);return(0,be.jsxs)("div",{className:(0,R.Z)("sidebar__header",Ct),"data-testid":"sidebar-header",children:[Et,(0,be.jsxs)("div",{className:"sidebar__header__buttons",children:[yn&&(0,be.jsx)(G.u,{label:(0,K.t)("labels.sidebarLock"),children:(0,be.jsx)(he.z,{onSelect:function(){var fn;return(fn=hn.onDock)===null||fn===void 0?void 0:fn.call(hn,!hn.docked)},selected:!!hn.docked,className:"sidebar__dock","data-testid":"sidebar-dock","aria-label":(0,K.t)("labels.sidebarLock"),children:m.qQ})}),(0,be.jsx)(he.z,{"data-testid":"sidebar-close",className:"sidebar__close",onSelect:hn.onCloseRequest,"aria-label":(0,K.t)("buttons.close"),children:m.Tw})]})]})};we.displayName="SidebarHeader";var xe=t(9827),ce=t(5491),D=t(9937),ne=t(100),S=t(3379),z=t.n(S),A=t(7795),E=t.n(A),L=t(569),h=t.n(L),y=t(3565),r=t.n(y),M=t(9216),p=t.n(M),c=t(4589),w=t.n(c),O=t(7051),$={};$.styleTagTransform=w(),$.setAttributes=r(),$.insert=h().bind(null,"head"),$.domAPI=E(),$.insertStyleElement=p(),z()(O.Z,$),O.Z&&O.Z.locals&&O.Z.locals;var I=function(wt){var Et,Ct=wt.name,Lt=wt.tab,hn=wt.icon,yn=wt.title,fn=wt.children,Bn=wt.onToggle,En=wt.className,Cn=wt.style,qn=(0,U.n9)(),vn=(0,ne.I)();return(0,be.jsxs)("label",{title:yn,children:[(0,be.jsx)("input",{className:"ToolIcon_type_checkbox",type:"checkbox",onChange:function(wn){var In;(In=document.querySelector(".layer-ui__wrapper"))===null||In===void 0||In.classList.remove("animate");var kn=wn.target.checked;qn({openSidebar:kn?{name:Ct,tab:Lt}:null}),Bn==null||Bn(kn)},checked:((Et=vn.openSidebar)===null||Et===void 0?void 0:Et.name)===Ct,"aria-label":yn,"aria-keyshortcuts":"0"}),(0,be.jsxs)("div",{className:(0,R.Z)("sidebar-trigger",En),style:Cn,children:[hn&&(0,be.jsx)("div",{children:hn}),fn&&(0,be.jsx)("div",{className:"sidebar-trigger__label",children:fn})]})]})};I.displayName="SidebarTrigger";var C=t(11),_=t(7217),N=t(1267),q=t(9335),pe=t(4801),te=t(5622),ve=t(3119),ae=t(3060),H=t(2673);const le=(0,l.createContext)(void 0);function ke(wt){const Et=(0,l.useContext)(le);return wt||Et||"ltr"}const Le="rovingFocusGroup.onEntryFocus",Ge={bubbles:!1,cancelable:!0},Ne="RovingFocusGroup",[Ce,Oe,De]=function(wt){const Et=wt+"CollectionProvider",[Ct,Lt]=(0,N.b)(Et),[hn,yn]=Ct(Et,{collectionRef:{current:null},itemMap:new Map}),fn=wn=>{const{scope:In,children:kn}=wn,nr=v().useRef(null),Pn=v().useRef(new Map).current;return v().createElement(hn,{scope:In,itemMap:Pn,collectionRef:nr},kn)},Bn=wt+"CollectionSlot",En=v().forwardRef((wn,In)=>{const{scope:kn,children:nr}=wn,Pn=yn(Bn,kn),Jn=(0,q.e)(In,Pn.collectionRef);return v().createElement(pe.g7,{ref:Jn},nr)}),Cn=wt+"CollectionItemSlot",qn="data-radix-collection-item",vn=v().forwardRef((wn,In)=>{const{scope:kn,children:nr,...Pn}=wn,Jn=v().useRef(null),xr=(0,q.e)(In,Jn),Nr=yn(Cn,kn);return v().useEffect(()=>(Nr.itemMap.set(Jn,{ref:Jn,...Pn}),()=>{Nr.itemMap.delete(Jn)})),v().createElement(pe.g7,{[qn]:"",ref:xr},nr)});return[{Provider:fn,Slot:En,ItemSlot:vn},function(wn){const In=yn(wt+"CollectionConsumer",wn);return v().useCallback(()=>{const kn=In.collectionRef.current;if(!kn)return[];const nr=Array.from(kn.querySelectorAll(`[${qn}]`));return Array.from(In.itemMap.values()).sort((Pn,Jn)=>nr.indexOf(Pn.ref.current)-nr.indexOf(Jn.ref.current))},[In.collectionRef,In.itemMap])},Lt]}(Ne),[Ae,ie]=(0,N.b)(Ne,[De]),[Ie,oe]=Ae(Ne),s=(0,l.forwardRef)((wt,Et)=>(0,l.createElement)(Ce.Provider,{scope:wt.__scopeRovingFocusGroup},(0,l.createElement)(Ce.Slot,{scope:wt.__scopeRovingFocusGroup},(0,l.createElement)(u,(0,C.Z)({},wt,{ref:Et}))))),u=(0,l.forwardRef)((wt,Et)=>{const{__scopeRovingFocusGroup:Ct,orientation:Lt,loop:hn=!1,dir:yn,currentTabStopId:fn,defaultCurrentTabStopId:Bn,onCurrentTabStopIdChange:En,onEntryFocus:Cn,...qn}=wt,vn=(0,l.useRef)(null),wn=(0,q.e)(Et,vn),In=ke(yn),[kn=null,nr]=(0,H.T)({prop:fn,defaultProp:Bn,onChange:En}),[Pn,Jn]=(0,l.useState)(!1),xr=(0,ae.W)(Cn),Nr=Oe(Ct),$r=(0,l.useRef)(!1),[ao,lo]=(0,l.useState)(0);return(0,l.useEffect)(()=>{const Dr=vn.current;if(Dr)return Dr.addEventListener(Le,xr),()=>Dr.removeEventListener(Le,xr)},[xr]),(0,l.createElement)(Ie,{scope:Ct,orientation:Lt,dir:In,loop:hn,currentTabStopId:kn,onItemFocus:(0,l.useCallback)(Dr=>nr(Dr),[nr]),onItemShiftTab:(0,l.useCallback)(()=>Jn(!0),[]),onFocusableItemAdd:(0,l.useCallback)(()=>lo(Dr=>Dr+1),[]),onFocusableItemRemove:(0,l.useCallback)(()=>lo(Dr=>Dr-1),[])},(0,l.createElement)(ve.WV.div,(0,C.Z)({tabIndex:Pn||ao===0?-1:0,"data-orientation":Lt},qn,{ref:wn,style:{outline:"none",...wt.style},onMouseDown:(0,_.M)(wt.onMouseDown,()=>{$r.current=!0}),onFocus:(0,_.M)(wt.onFocus,Dr=>{const Ar=!$r.current;if(Dr.target===Dr.currentTarget&&Ar&&!Pn){const wo=new CustomEvent(Le,Ge);if(Dr.currentTarget.dispatchEvent(wo),!wo.defaultPrevented){const de=Nr().filter(Pe=>Pe.focusable);re([de.find(Pe=>Pe.active),de.find(Pe=>Pe.id===kn),...de].filter(Boolean).map(Pe=>Pe.ref.current))}}$r.current=!1}),onBlur:(0,_.M)(wt.onBlur,()=>Jn(!1))})))}),x="RovingFocusGroupItem",V=(0,l.forwardRef)((wt,Et)=>{const{__scopeRovingFocusGroup:Ct,focusable:Lt=!0,active:hn=!1,tabStopId:yn,...fn}=wt,Bn=(0,te.M)(),En=yn||Bn,Cn=oe(x,Ct),qn=Cn.currentTabStopId===En,vn=Oe(Ct),{onFocusableItemAdd:wn,onFocusableItemRemove:In}=Cn;return(0,l.useEffect)(()=>{if(Lt)return wn(),()=>In()},[Lt,wn,In]),(0,l.createElement)(Ce.ItemSlot,{scope:Ct,id:En,focusable:Lt,active:hn},(0,l.createElement)(ve.WV.span,(0,C.Z)({tabIndex:qn?0:-1,"data-orientation":Cn.orientation},fn,{ref:Et,onMouseDown:(0,_.M)(wt.onMouseDown,kn=>{Lt?Cn.onItemFocus(En):kn.preventDefault()}),onFocus:(0,_.M)(wt.onFocus,()=>Cn.onItemFocus(En)),onKeyDown:(0,_.M)(wt.onKeyDown,kn=>{if(kn.key==="Tab"&&kn.shiftKey)return void Cn.onItemShiftTab();if(kn.target!==kn.currentTarget)return;const nr=function(xr,Nr,$r){const ao=function(lo,Dr){return Dr!=="rtl"?lo:lo==="ArrowLeft"?"ArrowRight":lo==="ArrowRight"?"ArrowLeft":lo}(xr.key,$r);return Nr==="vertical"&&["ArrowLeft","ArrowRight"].includes(ao)||Nr==="horizontal"&&["ArrowUp","ArrowDown"].includes(ao)?void 0:W[ao]}(kn,Cn.orientation,Cn.dir);if(nr!==void 0){kn.preventDefault();let xr=vn().filter(Nr=>Nr.focusable).map(Nr=>Nr.ref.current);if(nr==="last")xr.reverse();else if(nr==="prev"||nr==="next"){nr==="prev"&&xr.reverse();const Nr=xr.indexOf(kn.currentTarget);xr=Cn.loop?(Jn=Nr+1,(Pn=xr).map(($r,ao)=>Pn[(Jn+ao)%Pn.length])):xr.slice(Nr+1)}setTimeout(()=>re(xr))}var Pn,Jn})})))}),W={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function re(wt){const Et=document.activeElement;for(const Ct of wt)if(Ct===Et||(Ct.focus(),document.activeElement!==Et))return}const ee=s,se=V;var Ee=t(1483);const _e="Tabs",[Ue,We]=(0,N.b)(_e,[ie]),Ye=ie(),[Ze,Je]=Ue(_e),nt=(0,l.forwardRef)((wt,Et)=>{const{__scopeTabs:Ct,value:Lt,onValueChange:hn,defaultValue:yn,orientation:fn="horizontal",dir:Bn,activationMode:En="automatic",...Cn}=wt,qn=ke(Bn),[vn,wn]=(0,H.T)({prop:Lt,onChange:hn,defaultProp:yn});return(0,l.createElement)(Ze,{scope:Ct,baseId:(0,te.M)(),value:vn,onValueChange:wn,orientation:fn,dir:qn,activationMode:En},(0,l.createElement)(ve.WV.div,(0,C.Z)({dir:qn,"data-orientation":fn},Cn,{ref:Et})))}),dt="TabsList",ge=(0,l.forwardRef)((wt,Et)=>{const{__scopeTabs:Ct,loop:Lt=!0,...hn}=wt,yn=Je(dt,Ct),fn=Ye(Ct);return(0,l.createElement)(ee,(0,C.Z)({asChild:!0},fn,{orientation:yn.orientation,dir:yn.dir,loop:Lt}),(0,l.createElement)(ve.WV.div,(0,C.Z)({role:"tablist","aria-orientation":yn.orientation},hn,{ref:Et})))}),Se="TabsTrigger",Be=(0,l.forwardRef)((wt,Et)=>{const{__scopeTabs:Ct,value:Lt,disabled:hn=!1,...yn}=wt,fn=Je(Se,Ct),Bn=Ye(Ct),En=it(fn.baseId,Lt),Cn=yt(fn.baseId,Lt),qn=Lt===fn.value;return(0,l.createElement)(se,(0,C.Z)({asChild:!0},Bn,{focusable:!hn,active:qn}),(0,l.createElement)(ve.WV.button,(0,C.Z)({type:"button",role:"tab","aria-selected":qn,"aria-controls":Cn,"data-state":qn?"active":"inactive","data-disabled":hn?"":void 0,disabled:hn,id:En},yn,{ref:Et,onMouseDown:(0,_.M)(wt.onMouseDown,vn=>{hn||vn.button!==0||vn.ctrlKey!==!1?vn.preventDefault():fn.onValueChange(Lt)}),onKeyDown:(0,_.M)(wt.onKeyDown,vn=>{[" ","Enter"].includes(vn.key)&&fn.onValueChange(Lt)}),onFocus:(0,_.M)(wt.onFocus,()=>{const vn=fn.activationMode!=="manual";qn||hn||!vn||fn.onValueChange(Lt)})})))}),Xe="TabsContent",lt=(0,l.forwardRef)((wt,Et)=>{const{__scopeTabs:Ct,value:Lt,forceMount:hn,children:yn,...fn}=wt,Bn=Je(Xe,Ct),En=it(Bn.baseId,Lt),Cn=yt(Bn.baseId,Lt),qn=Lt===Bn.value,vn=(0,l.useRef)(qn);return(0,l.useEffect)(()=>{const wn=requestAnimationFrame(()=>vn.current=!1);return()=>cancelAnimationFrame(wn)},[]),(0,l.createElement)(Ee.z,{present:hn||qn},({present:wn})=>(0,l.createElement)(ve.WV.div,(0,C.Z)({"data-state":qn?"active":"inactive","data-orientation":Bn.orientation,role:"tabpanel","aria-labelledby":En,hidden:!wn,id:Cn,tabIndex:0},fn,{ref:Et,style:{...wt.style,animationDuration:vn.current?"0s":void 0}}),wn&&yn))});function it(wt,Et){return`${wt}-trigger-${Et}`}function yt(wt,Et){return`${wt}-content-${Et}`}const _t=nt,ut=ge,Tt=Be,Yt=lt;var Zt=["children"];function Pt(wt,Et){var Ct=Object.keys(wt);if(Object.getOwnPropertySymbols){var Lt=Object.getOwnPropertySymbols(wt);Et&&(Lt=Lt.filter(function(hn){return Object.getOwnPropertyDescriptor(wt,hn).enumerable})),Ct.push.apply(Ct,Lt)}return Ct}function en(wt){for(var Et=1;Et<arguments.length;Et++){var Ct=arguments[Et]!=null?arguments[Et]:{};Et%2?Pt(Object(Ct),!0).forEach(function(Lt){(0,j.Z)(wt,Lt,Ct[Lt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(wt,Object.getOwnPropertyDescriptors(Ct)):Pt(Object(Ct)).forEach(function(Lt){Object.defineProperty(wt,Lt,Object.getOwnPropertyDescriptor(Ct,Lt))})}return wt}var tn=function(wt){var Et=wt.children,Ct=(0,f.Z)(wt,Zt);return(0,be.jsx)(ut,en(en({className:"sidebar-triggers"},Ct),{},{children:Et}))};tn.displayName="SidebarTabTriggers";var ot=["children","tab","onSelect"];function It(wt,Et){var Ct=Object.keys(wt);if(Object.getOwnPropertySymbols){var Lt=Object.getOwnPropertySymbols(wt);Et&&(Lt=Lt.filter(function(hn){return Object.getOwnPropertyDescriptor(wt,hn).enumerable})),Ct.push.apply(Ct,Lt)}return Ct}function mt(wt){for(var Et=1;Et<arguments.length;Et++){var Ct=arguments[Et]!=null?arguments[Et]:{};Et%2?It(Object(Ct),!0).forEach(function(Lt){(0,j.Z)(wt,Lt,Ct[Lt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(wt,Object.getOwnPropertyDescriptors(Ct)):It(Object(Ct)).forEach(function(Lt){Object.defineProperty(wt,Lt,Object.getOwnPropertyDescriptor(Ct,Lt))})}return wt}var jt=function(wt){var Et=wt.children,Ct=wt.tab,Lt=wt.onSelect,hn=(0,f.Z)(wt,ot);return(0,be.jsx)(Tt,{value:Ct,asChild:!0,onSelect:Lt,children:(0,be.jsx)("button",mt(mt({type:"button",className:"excalidraw-button sidebar-tab-trigger"},hn),{},{children:Et}))})};jt.displayName="SidebarTabTrigger";var xt=["children"];function Nt(wt,Et){var Ct=Object.keys(wt);if(Object.getOwnPropertySymbols){var Lt=Object.getOwnPropertySymbols(wt);Et&&(Lt=Lt.filter(function(hn){return Object.getOwnPropertyDescriptor(wt,hn).enumerable})),Ct.push.apply(Ct,Lt)}return Ct}function Ut(wt){for(var Et=1;Et<arguments.length;Et++){var Ct=arguments[Et]!=null?arguments[Et]:{};Et%2?Nt(Object(Ct),!0).forEach(function(Lt){(0,j.Z)(wt,Lt,Ct[Lt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(wt,Object.getOwnPropertyDescriptors(Ct)):Nt(Object(Ct)).forEach(function(Lt){Object.defineProperty(wt,Lt,Object.getOwnPropertyDescriptor(Ct,Lt))})}return wt}var rn=function(wt){var Et=wt.children,Ct=(0,f.Z)(wt,xt),Lt=(0,ne.I)(),hn=(0,U.n9)();if(!Lt.openSidebar)return null;var yn=Lt.openSidebar.name;return(0,be.jsx)(_t,Ut(Ut({className:"sidebar-tabs-root",value:Lt.openSidebar.tab,onValueChange:function(fn){return hn(function(Bn){return Ut(Ut({},Bn),{},{openSidebar:Ut(Ut({},Bn.openSidebar),{},{name:yn,tab:fn})})})}},Ct),{},{children:Et}))};rn.displayName="SidebarTabs";var Ft=["tab","children"];function Sn(wt,Et){var Ct=Object.keys(wt);if(Object.getOwnPropertySymbols){var Lt=Object.getOwnPropertySymbols(wt);Et&&(Lt=Lt.filter(function(hn){return Object.getOwnPropertyDescriptor(wt,hn).enumerable})),Ct.push.apply(Ct,Lt)}return Ct}function mn(wt){for(var Et=1;Et<arguments.length;Et++){var Ct=arguments[Et]!=null?arguments[Et]:{};Et%2?Sn(Object(Ct),!0).forEach(function(Lt){(0,j.Z)(wt,Lt,Ct[Lt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(wt,Object.getOwnPropertyDescriptors(Ct)):Sn(Object(Ct)).forEach(function(Lt){Object.defineProperty(wt,Lt,Object.getOwnPropertyDescriptor(Ct,Lt))})}return wt}var Yn=function(wt){var Et=wt.tab,Ct=wt.children,Lt=(0,f.Z)(wt,Ft);return(0,be.jsx)(Yt,mn(mn({},Lt),{},{value:Et,children:Ct}))};Yn.displayName="SidebarTab";var ht=t(1901),Xt=t(8208),zt={};zt.styleTagTransform=w(),zt.setAttributes=r(),zt.insert=h().bind(null,"head"),zt.domAPI=E(),zt.insertStyleElement=p(),z()(Xt.Z,zt),Xt.Z&&Xt.Z.locals&&Xt.Z.locals;var Vt=["name","children","onDock","docked","className"];function Tn(wt,Et){var Ct=Object.keys(wt);if(Object.getOwnPropertySymbols){var Lt=Object.getOwnPropertySymbols(wt);Et&&(Lt=Lt.filter(function(hn){return Object.getOwnPropertyDescriptor(wt,hn).enumerable})),Ct.push.apply(Ct,Lt)}return Ct}function Dn(wt){for(var Et=1;Et<arguments.length;Et++){var Ct=arguments[Et]!=null?arguments[Et]:{};Et%2?Tn(Object(Ct),!0).forEach(function(Lt){(0,j.Z)(wt,Lt,Ct[Lt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(wt,Object.getOwnPropertyDescriptors(Ct)):Tn(Object(Ct)).forEach(function(Lt){Object.defineProperty(wt,Lt,Object.getOwnPropertyDescriptor(Ct,Lt))})}return wt}var Nn=(0,g.cn)(!1),Xn=(0,l.forwardRef)(function(wt,Et){wt.name;var Ct=wt.children,Lt=wt.onDock,hn=wt.docked,yn=wt.className,fn=(0,f.Z)(wt,Vt),Bn=(0,U.n9)(),En=(0,g.b9)(Nn,a.yE);(0,l.useLayoutEffect)(function(){return En(!!hn),function(){En(!1)}},[En,hn]);var Cn=(0,l.useRef)({});Cn.current.onCloseRequest=function(){Bn({openSidebar:null})},Cn.current.onDock=function(In){return Lt==null?void 0:Lt(In)},Cn.current=(0,xe.v4)(Cn.current,{docked:hn,shouldRenderDockButton:!!Lt&&hn!=null});var qn=(0,l.useRef)(null);(0,l.useImperativeHandle)(Et,function(){return qn.current});var vn=(0,U.Fy)(),wn=(0,l.useCallback)(function(){document.querySelector(".Dialog")||Bn({openSidebar:null})},[Bn]);return(0,ht.O)(qn,(0,l.useCallback)(function(In){In.target.closest(".sidebar-trigger")||hn&&vn.editor.canFitSidebar||wn()},[wn,hn,vn.editor.canFitSidebar])),(0,l.useEffect)(function(){var In=function(kn){kn.key!==ce.tW.ESCAPE||hn&&vn.editor.canFitSidebar||wn()};return document.addEventListener(D.Ks.KEYDOWN,In),function(){document.removeEventListener(D.Ks.KEYDOWN,In)}},[wn,hn,vn.editor.canFitSidebar]),(0,be.jsx)(k.W,Dn(Dn({},fn),{},{className:(0,R.Z)("sidebar",{"sidebar--docked":hn},yn),ref:qn,children:(0,be.jsx)(P.Provider,{value:Cn.current,children:Ct})}))});Xn.displayName="SidebarInner";var jn=Object.assign((0,l.forwardRef)(function(wt,Et){var Ct,Lt=(0,ne.I)(),hn=wt.onStateChange,yn=(0,l.useRef)(Lt.openSidebar);(0,l.useEffect)(function(){var qn,vn,wn,In,kn;(!Lt.openSidebar&&(yn==null||(qn=yn.current)===null||qn===void 0?void 0:qn.name)===wt.name||((vn=Lt.openSidebar)===null||vn===void 0?void 0:vn.name)===wt.name&&(yn==null||(wn=yn.current)===null||wn===void 0?void 0:wn.name)!==wt.name||((In=yn.current)===null||In===void 0?void 0:In.name)===wt.name)&&Lt.openSidebar!==yn.current&&(hn==null||hn(((kn=Lt.openSidebar)===null||kn===void 0?void 0:kn.name)!==wt.name?null:Lt.openSidebar)),yn.current=Lt.openSidebar},[Lt.openSidebar,hn,wt.name]);var fn=(0,l.useState)(!1),Bn=(0,T.Z)(fn,2),En=Bn[0],Cn=Bn[1];return(0,l.useLayoutEffect)(function(){return Cn(!0),function(){return Cn(!1)}},[]),En&&((Ct=Lt.openSidebar)===null||Ct===void 0?void 0:Ct.name)===wt.name?(0,l.createElement)(Xn,Dn(Dn({},wt),{},{ref:Et,key:wt.name})):null}),{Header:we,TabTriggers:tn,TabTrigger:jt,Tabs:rn,Tab:Yn,Trigger:I});jn.displayName="Sidebar"},8531:function(fe,Q,t){t.d(Q,{Z:function(){return ce}});var T=t(7169),j=t(9787),f=t.n(j),l=t(3379),v=t.n(l),k=t(7795),g=t.n(k),a=t(569),P=t.n(a),R=t(3565),K=t.n(R),U=t(9216),m=t.n(U),G=t(4589),he=t.n(G),be=t(5892),we={};we.styleTagTransform=he(),we.setAttributes=K(),we.insert=P().bind(null,"head"),we.domAPI=g(),we.insertStyleElement=m(),v()(be.Z,we),be.Z&&be.Z.locals&&be.Z.locals;var xe=t(4512),ce=function(D){var ne=D.size,S=ne===void 0?"1em":ne,z=D.circleWidth,A=z===void 0?8:z,E=D.synchronized,L=E!==void 0&&E,h=-f().useRef(Date.now()).current%1600;return(0,xe.jsx)("div",{className:"Spinner",children:(0,xe.jsx)("svg",{viewBox:"0 0 100 100",style:(0,T.Z)({width:S,height:S},"--spinner-delay",L?"".concat(h,"ms"):0),children:(0,xe.jsx)("circle",{cx:"50",cy:"50",r:50-A/2,strokeWidth:A,fill:"none",strokeMiterlimit:"10"})})})}},2540:function(fe,Q,t){t.d(Q,{Z:function(){return ne}});var T=t(7169),j=t(3379),f=t.n(j),l=t(7795),v=t.n(l),k=t(569),g=t.n(k),a=t(3565),P=t.n(a),R=t(9216),K=t.n(R),U=t(4589),m=t.n(U),G=t(3874),he={};he.styleTagTransform=m(),he.setAttributes=P(),he.insert=g().bind(null,"head"),he.domAPI=v(),he.insertStyleElement=K(),f()(G.Z,he),G.Z&&G.Z.locals&&G.Z.locals;var be=t(9787),we=t(45),xe=t(4512);function ce(S,z){var A=Object.keys(S);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(S);z&&(E=E.filter(function(L){return Object.getOwnPropertyDescriptor(S,L).enumerable})),A.push.apply(A,E)}return A}function D(S){for(var z=1;z<arguments.length;z++){var A=arguments[z]!=null?arguments[z]:{};z%2?ce(Object(A),!0).forEach(function(E){(0,T.Z)(S,E,A[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(A)):ce(Object(A)).forEach(function(E){Object.defineProperty(S,E,Object.getOwnPropertyDescriptor(A,E))})}return S}var ne={Row:(0,be.forwardRef)(function(S,z){var A=S.children,E=S.gap,L=S.align,h=S.justifyContent,y=S.className,r=S.style;return(0,xe.jsx)("div",{className:(0,we.Z)("Stack Stack_horizontal",y),style:D({"--gap":E,alignItems:L,justifyContent:h},r),ref:z,children:A})}),Col:(0,be.forwardRef)(function(S,z){var A=S.children,E=S.gap,L=S.align,h=S.justifyContent,y=S.className,r=S.style;return(0,xe.jsx)("div",{className:(0,we.Z)("Stack Stack_vertical",y),style:D({"--gap":E,justifyItems:L,justifyContent:h},r),ref:z,children:A})})}},1512:function(fe,Q,t){t.d(Q,{V:function(){return U}});var T=t(8950),j=t(2577),f=t(2975),l=t.n(f),v=(t(3041),t(9787)),k=t.n(v),g=t(45),a=t(8242),P=t(3506),R=t(8531),K=t(4512),U=k().forwardRef(function(m,G){var he=(0,a.J0)().id,be=k().useRef(null);k().useImperativeHandle(G,function(){return be.current});var we="ToolIcon_size_".concat(m.size),xe=(0,v.useState)(!1),ce=(0,j.Z)(xe,2),D=ce[0],ne=ce[1],S=(0,v.useRef)(!0),z=function(){var L=(0,T.Z)(l().mark(function h(y){var r,M;return l().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(!(M="onClick"in m&&((r=m.onClick)===null||r===void 0?void 0:r.call(m,y)))||!("then"in M)){p.next=18;break}return p.prev=2,ne(!0),p.next=6,M;case 6:p.next=15;break;case 8:if(p.prev=8,p.t0=p.catch(2),p.t0 instanceof P._L){p.next=14;break}throw p.t0;case 14:console.warn(p.t0);case 15:return p.prev=15,S.current&&ne(!1),p.finish(15);case 18:case"end":return p.stop()}},h,null,[[2,8,15,18]])}));return function(h){return L.apply(this,arguments)}}();(0,v.useEffect)(function(){return S.current=!0,function(){S.current=!1}},[]);var A=(0,v.useRef)(null);if(m.type==="button"||m.type==="icon"||m.type==="submit"){var E=m.type==="icon"?"button":m.type;return(0,K.jsxs)("button",{className:(0,g.Z)("ToolIcon_type_button",we,m.className,m.visible&&!m.hidden?"ToolIcon_type_button--show":"ToolIcon_type_button--hide",{ToolIcon:!m.hidden,"ToolIcon--selected":m.selected,"ToolIcon--plain":m.type==="icon"}),style:m.style,"data-testid":m["data-testid"],hidden:m.hidden,title:m.title,"aria-label":m["aria-label"],type:E,onClick:z,ref:be,disabled:D||m.isLoading,children:[(m.icon||m.label)&&(0,K.jsxs)("div",{className:"ToolIcon__icon","aria-hidden":"true",children:[m.icon||m.label,m.keyBindingLabel&&(0,K.jsx)("span",{className:"ToolIcon__keybinding",children:m.keyBindingLabel}),m.isLoading&&(0,K.jsx)(R.Z,{})]}),m.showAriaLabel&&(0,K.jsxs)("div",{className:"ToolIcon__label",children:[m["aria-label"]," ",D&&(0,K.jsx)(R.Z,{})]}),m.children]})}return(0,K.jsxs)("label",{className:(0,g.Z)("ToolIcon",m.className),title:m.title,onPointerDown:function(L){var h;A.current=L.pointerType||null,(h=m.onPointerDown)===null||h===void 0||h.call(m,{pointerType:L.pointerType||null})},onPointerUp:function(){requestAnimationFrame(function(){A.current=null})},children:[(0,K.jsx)("input",{className:"ToolIcon_type_radio ".concat(we),type:"radio",name:m.name,"aria-label":m["aria-label"],"aria-keyshortcuts":m["aria-keyshortcuts"],"data-testid":m["data-testid"],id:"".concat(he,"-").concat(m.id),onChange:function(){var L;(L=m.onChange)===null||L===void 0||L.call(m,{pointerType:A.current})},checked:m.checked,ref:be}),(0,K.jsxs)("div",{className:"ToolIcon__icon",children:[m.icon,m.keyBindingLabel&&(0,K.jsx)("span",{className:"ToolIcon__keybinding",children:m.keyBindingLabel})]})]})});U.defaultProps={visible:!0,className:"",size:"medium"},U.displayName="ToolButton"},8925:function(fe,Q,t){t.d(Q,{u:function(){return ce},bK:function(){return we},Js:function(){return xe}});var T=t(3379),j=t.n(T),f=t(7795),l=t.n(f),v=t(569),k=t.n(v),g=t(3565),a=t.n(g),P=t(9216),R=t.n(P),K=t(4589),U=t.n(K),m=t(6626),G={};G.styleTagTransform=U(),G.setAttributes=a(),G.insert=k().bind(null,"head"),G.domAPI=l(),G.insertStyleElement=R(),j()(m.Z,G),m.Z&&m.Z.locals&&m.Z.locals;var he=t(9787),be=t(4512),we=function(){var D=document.querySelector(".excalidraw-tooltip");if(D)return D;var ne=document.createElement("div");return document.body.appendChild(ne),ne.classList.add("excalidraw-tooltip"),ne},xe=function(D,ne){var S,z=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"bottom",A=D.getBoundingClientRect(),E=window.innerWidth,L=window.innerHeight,h=5,y=ne.left+ne.width/2-A.width/2;y<0?y=h:y+A.width>=E&&(y=E-A.width-h),z==="bottom"?(S=ne.top+ne.height+h)+A.height>=L&&(S=ne.top-A.height-h):(S=ne.top-A.height-h)<0&&(S=ne.top+ne.height+h),Object.assign(D.style,{top:"".concat(S,"px"),left:"".concat(y,"px")})},ce=function(D){var ne=D.children,S=D.label,z=D.long,A=z!==void 0&&z,E=D.style;return(0,he.useEffect)(function(){return function(){return we().classList.remove("excalidraw-tooltip--visible")}},[]),(0,be.jsx)("div",{className:"excalidraw-tooltip-wrapper",onPointerEnter:function(L){return function(h,y,r,M){y.classList.add("excalidraw-tooltip--visible"),y.style.minWidth=M?"50ch":"10ch",y.style.maxWidth=M?"50ch":"15ch",y.textContent=r;var p=h.getBoundingClientRect();xe(y,p)}(L.currentTarget,we(),S,A)},onPointerLeave:function(){return we().classList.remove("excalidraw-tooltip--visible")},style:E,children:ne})}},9247:function(fe,Q,t){var T=t(2726),j=t(1930),f=t(9787),l=t.n(f),v=t(8227),k=["i18nKey","children"],g=/({{[\w-]+}})|(<[\w-]+>)|(<\/[\w-]+>)/g,a=/{{([\w-]+)}}/,P=/<([\w-]+)>/,R=/<\/([\w-]+)>/;Q.Z=function(K){var U=K.i18nKey,m=(K.children,(0,T.Z)(K,k)),G=(0,v.QT)().t;return l().createElement.apply(l(),[l().Fragment,{}].concat((0,j.Z)(function(he,be){var we=[{name:"",children:[]}];return he.split(g).filter(Boolean).forEach(function(xe){var ce=xe.match(P),D=xe.match(R),ne=xe.match(a);if(ce!==null){var S=ce[1];be.hasOwnProperty(S)?we.push({name:S,children:[]}):console.warn("Trans: missed to pass in prop ".concat(S," for interpolating ").concat(he))}else if(D!==null)if(D[1]===we[we.length-1].name){var z=we.pop(),A=l().createElement.apply(l(),[l().Fragment,{}].concat((0,j.Z)(z.children))),E=be[z.name];typeof E=="function"&&we[we.length-1].children.push(E(A))}else console.warn("Trans: unexpected end tag ".concat(xe," for interpolating ").concat(he));else if(ne!==null){var L=ne[1];be.hasOwnProperty(L)?we[we.length-1].children.push(be[L]):console.warn("Trans: key ".concat(L," not in props for interpolating ").concat(he))}else we[we.length-1].children.push(xe)}),we.length!==1&&console.warn("Trans: stack not empty for interpolating ".concat(he)),we[0].children}(G(U),m))))}},4704:function(fe,Q,t){t.d(Q,{Z:function(){return S}});var T=t(2577),j=t(3379),f=t.n(j),l=t(7795),v=t.n(l),k=t(569),g=t.n(k),a=t(3565),P=t.n(a),R=t(9216),K=t.n(R),U=t(4589),m=t.n(U),G=t(6359),he={};he.styleTagTransform=m(),he.setAttributes=P(),he.insert=g().bind(null,"head"),he.domAPI=v(),he.insertStyleElement=K(),f()(G.Z,he),G.Z&&G.Z.locals&&G.Z.locals;var be=t(9787),we=t.n(be),xe=t(45),ce=t(8925),D=t(8242),ne=t(4512),S=function(z){var A=z.className,E=z.mobile,L=z.collaborators,h=(0,D.eh)(),y=new Map;L.forEach(function(M,p){y.set(M.id||p,M)});var r=y.size>0&&Array.from(y).filter(function(M){var p=(0,T.Z)(M,2),c=(p[0],p[1]);return Object.keys(c).length!==0}).map(function(M){var p=(0,T.Z)(M,2),c=p[0],w=p[1],O=h.renderAction("goToCollaborator",[c,w]);return E?(0,ne.jsx)(ce.u,{label:w.username||"Unknown user",children:O},c):(0,ne.jsx)(we().Fragment,{children:O},c)});return(0,ne.jsx)("div",{className:(0,xe.Z)("UserList",A,{UserList_mobile:E}),children:r})}},7104:function(fe,Q,t){t.d(Q,{Z:function(){return ae}});var T=t(7169),j=t(2726),f=t(45),l=t(8242),v=t(4512),k=["className","children","onToggle","title"];function g(H,le){var ke=Object.keys(H);if(Object.getOwnPropertySymbols){var Le=Object.getOwnPropertySymbols(H);le&&(Le=Le.filter(function(Ge){return Object.getOwnPropertyDescriptor(H,Ge).enumerable})),ke.push.apply(ke,Le)}return ke}function a(H){for(var le=1;le<arguments.length;le++){var ke=arguments[le]!=null?arguments[le]:{};le%2?g(Object(ke),!0).forEach(function(Le){(0,T.Z)(H,Le,ke[Le])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(ke)):g(Object(ke)).forEach(function(Le){Object.defineProperty(H,Le,Object.getOwnPropertyDescriptor(ke,Le))})}return H}var P=function(H){var le=H.className,ke=le===void 0?"":le,Le=H.children,Ge=H.onToggle,Ne=H.title,Ce=(0,j.Z)(H,k),Oe=(0,l.Fy)(),De=(0,f.Z)("dropdown-menu-button ".concat(ke),"zen-mode-transition",{"dropdown-menu-button--mobile":Oe.editor.isMobile}).trim();return(0,v.jsx)("button",a(a({"data-prevent-outside-click":!0,className:De,onClick:Ge,type:"button","data-testid":"dropdown-menu-button",title:Ne},Ce),{},{children:Le}))},R=P;P.displayName="DropdownMenuTrigger";var K=t(5735),U=function(){return(0,v.jsx)("div",{style:{height:"1px",backgroundColor:"var(--default-border-color)",margin:".5rem 0"}})},m=U;U.displayName="DropdownMenuSeparator";var G=function(H){var le=H.children,ke=H.className,Le=ke===void 0?"":ke,Ge=H.style,Ne=H.title;return(0,v.jsxs)("div",{className:"dropdown-menu-group ".concat(Le),style:Ge,children:[Ne&&(0,v.jsx)("p",{className:"dropdown-menu-group-title",children:Ne}),le]})},he=G;G.displayName="DropdownMenuGroup";var be=t(1404),we=t(2540),xe=t(9787),ce=t.n(xe),D=t(7009),ne=t(1901),S=function(H){var le=H.children,ke=H.onClickOutside,Le=H.className,Ge=Le===void 0?"":Le,Ne=H.onSelect,Ce=H.style,Oe=(0,l.Fy)(),De=(0,xe.useRef)(null);(0,ne.O)(De,function(){ke==null||ke()});var Ae=(0,f.Z)("dropdown-menu ".concat(Ge),{"dropdown-menu--mobile":Oe.editor.isMobile}).trim();return(0,v.jsx)(D.N7.Provider,{value:{onSelect:Ne},children:(0,v.jsx)("div",{ref:De,className:Ae,style:Ce,"data-testid":"dropdown-menu",children:Oe.editor.isMobile?(0,v.jsx)(we.Z.Col,{className:"dropdown-menu-container",children:le}):(0,v.jsx)(be.W,{className:"dropdown-menu-container",padding:2,style:{zIndex:2},children:le})})})};S.displayName="DropdownMenuContent";var z=S,A=t(3858),E=["children","className","selected"];function L(H,le){var ke=Object.keys(H);if(Object.getOwnPropertySymbols){var Le=Object.getOwnPropertySymbols(H);le&&(Le=Le.filter(function(Ge){return Object.getOwnPropertyDescriptor(H,Ge).enumerable})),ke.push.apply(ke,Le)}return ke}function h(H){for(var le=1;le<arguments.length;le++){var ke=arguments[le]!=null?arguments[le]:{};le%2?L(Object(ke),!0).forEach(function(Le){(0,T.Z)(H,Le,ke[Le])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(ke)):L(Object(ke)).forEach(function(Le){Object.defineProperty(H,Le,Object.getOwnPropertyDescriptor(ke,Le))})}return H}var y=function(H){var le=H.children,ke=H.className,Le=ke===void 0?"":ke,Ge=H.selected,Ne=(0,j.Z)(H,E);return(0,v.jsx)("div",h(h({},Ne),{},{className:"dropdown-menu-item-base dropdown-menu-item-custom ".concat(Le," ").concat(Ge?"dropdown-menu-item--selected":"").trim(),children:le}))},r=t(3379),M=t.n(r),p=t(7795),c=t.n(p),w=t(569),O=t.n(w),$=t(3565),I=t.n($),C=t(9216),_=t.n(C),N=t(4589),q=t.n(N),pe=t(7399),te={};te.styleTagTransform=q(),te.setAttributes=I(),te.insert=O().bind(null,"head"),te.domAPI=c(),te.insertStyleElement=_(),M()(pe.Z,te),pe.Z&&pe.Z.locals&&pe.Z.locals;var ve=function(H){var le=H.children,ke=H.open,Le=function(Ne){return ce().Children.toArray(Ne).find(function(Ce){return ce().isValidElement(Ce)&&typeof Ce.type!="string"&&(Ce==null?void 0:Ce.type.displayName)&&Ce.type.displayName==="DropdownMenuTrigger"})||null}(le),Ge=function(Ne){return ce().Children.toArray(Ne).find(function(Ce){return ce().isValidElement(Ce)&&typeof Ce.type!="string"&&(Ce==null?void 0:Ce.type.displayName)&&Ce.type.displayName==="DropdownMenuContent"})||null}(le);return(0,v.jsxs)(v.Fragment,{children:[Le,ke&&Ge]})};ve.Trigger=R,ve.Content=z,ve.Item=K.Z,ve.ItemLink=A.Z,ve.ItemCustom=y,ve.Group=he,ve.Separator=m;var ae=ve;ve.displayName="DropdownMenu"},5735:function(fe,Q,t){var T=t(7169),j=t(2726),f=t(7009),l=t(6732),v=t(4512),k=["icon","onSelect","children","shortcut","className","selected"];function g(R,K){var U=Object.keys(R);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(R);K&&(m=m.filter(function(G){return Object.getOwnPropertyDescriptor(R,G).enumerable})),U.push.apply(U,m)}return U}function a(R){for(var K=1;K<arguments.length;K++){var U=arguments[K]!=null?arguments[K]:{};K%2?g(Object(U),!0).forEach(function(m){(0,T.Z)(R,m,U[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(U)):g(Object(U)).forEach(function(m){Object.defineProperty(R,m,Object.getOwnPropertyDescriptor(U,m))})}return R}var P=function(R){var K,U=R.icon,m=R.onSelect,G=R.children,he=R.shortcut,be=R.className,we=R.selected,xe=(0,j.Z)(R,k),ce=(0,f.qZ)(xe.onClick,m);return(0,v.jsx)("button",a(a({},xe),{},{onClick:ce,type:"button",className:(0,f.n)(be,we),title:(K=xe.title)!==null&&K!==void 0?K:xe["aria-label"],children:(0,v.jsx)(l.Z,{icon:U,shortcut:he,children:G})}))};Q.Z=P,P.displayName="DropdownMenuItem"},6732:function(fe,Q,t){var T=t(8242),j=t(4512);Q.Z=function(f){var l=f.icon,v=f.shortcut,k=f.children,g=(0,T.Fy)();return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{className:"dropdown-menu-item__icon",children:l}),(0,j.jsx)("div",{className:"dropdown-menu-item__text",children:k}),v&&!g.editor.isMobile&&(0,j.jsx)("div",{className:"dropdown-menu-item__shortcut",children:v})]})}},3858:function(fe,Q,t){var T=t(7169),j=t(2726),f=t(6732),l=t(7009),v=t(4512),k=["icon","shortcut","href","children","onSelect","className","selected"];function g(R,K){var U=Object.keys(R);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(R);K&&(m=m.filter(function(G){return Object.getOwnPropertyDescriptor(R,G).enumerable})),U.push.apply(U,m)}return U}function a(R){for(var K=1;K<arguments.length;K++){var U=arguments[K]!=null?arguments[K]:{};K%2?g(Object(U),!0).forEach(function(m){(0,T.Z)(R,m,U[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(U)):g(Object(U)).forEach(function(m){Object.defineProperty(R,m,Object.getOwnPropertyDescriptor(U,m))})}return R}var P=function(R){var K,U=R.icon,m=R.shortcut,G=R.href,he=R.children,be=R.onSelect,we=R.className,xe=we===void 0?"":we,ce=R.selected,D=(0,j.Z)(R,k),ne=(0,l.qZ)(D.onClick,be);return(0,v.jsx)("a",a(a({},D),{},{href:G,target:"_blank",rel:"noreferrer",className:(0,l.n)(xe,ce),title:(K=D.title)!==null&&K!==void 0?K:D["aria-label"],onClick:ne,children:(0,v.jsx)(f.Z,{icon:U,shortcut:m,children:he})}))};Q.Z=P,P.displayName="DropdownMenuItemLink"},7009:function(fe,Q,t){t.d(Q,{N7:function(){return v},n:function(){return k},qZ:function(){return g}});var T=t(9787),j=t.n(T),f=t(9937),l=t(9827),v=j().createContext({}),k=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",P=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return"dropdown-menu-item dropdown-menu-item-base ".concat(a," ").concat(P?"dropdown-menu-item--selected":"").trim()},g=function(a,P){var R=(0,T.useContext)(v);return(0,l.Mj)(a,function(K){var U,m=new CustomEvent(f.Ks.MENU_ITEM_SELECT,{bubbles:!0,cancelable:!0});P==null||P(m),m.defaultPrevented||(U=R.onSelect)===null||U===void 0||U.call(R,m)})}},6922:function(fe,Q,t){t.d(Q,{$:function(){return a}});var T=t(7169),j=t(2577),f=t(3607),l=t(9787),v=t(4572),k=t(4512);function g(P,R){var K=Object.keys(P);if(Object.getOwnPropertySymbols){var U=Object.getOwnPropertySymbols(P);R&&(U=U.filter(function(m){return Object.getOwnPropertyDescriptor(P,m).enumerable})),K.push.apply(K,U)}return K}var a=function(P,R){var K=(0,f.cn)(0),U=function(m){var G=(0,v.R6)().jotaiScope,he=(0,f.KO)(K,G),be=(0,j.Z)(he,2)[1],we=(0,l.useRef)({preferHost:!1,counter:0});return(0,l.useLayoutEffect)(function(){var xe=we.current;return be(function(ce){var D=ce+1;return xe.counter=D,D}),function(){be(function(ce){var D=ce-1;return xe.counter=D,D||(xe.preferHost=!1),D})}},[be]),m.__fallback||(we.current.preferHost=!0),!we.current.counter&&m.__fallback&&we.current.preferHost||we.current.counter>1&&m.__fallback?null:(0,k.jsx)(R,function(xe){for(var ce=1;ce<arguments.length;ce++){var D=arguments[ce]!=null?arguments[ce]:{};ce%2?g(Object(D),!0).forEach(function(ne){(0,T.Z)(xe,ne,D[ne])}):Object.getOwnPropertyDescriptors?Object.defineProperties(xe,Object.getOwnPropertyDescriptors(D)):g(Object(D)).forEach(function(ne){Object.defineProperty(xe,ne,Object.getOwnPropertyDescriptor(D,ne))})}return xe}({},m))};return U.displayName=P,U}},8935:function(fe,Q,t){t.d(Q,{$W:function(){return yn},$c:function(){return s},$q:function(){return $},BF:function(){return Be},Ct:function(){return Ee},D7:function(){return Le},DG:function(){return ie},DJ:function(){return A},DS:function(){return mt},EO:function(){return Dn},ET:function(){return ke},FC:function(){return ne},FL:function(){return N},Gc:function(){return re},HL:function(){return _e},Hk:function(){return wt},Hy:function(){return ae},II:function(){return En},IN:function(){return ee},J8:function(){return Ie},LZ:function(){return Cn},NA:function(){return q},NW:function(){return te},Nw:function(){return jn},OA:function(){return Yn},OW:function(){return L},P7:function(){return Xn},Pm:function(){return c},RJ:function(){return Xe},RY:function(){return ve},Re:function(){return y},ST:function(){return Je},Sd:function(){return I},TP:function(){return oe},Tl:function(){return Ae},Tw:function(){return ge},UE:function(){return u},UI:function(){return Ct},UT:function(){return hn},VL:function(){return w},Vl:function(){return V},Vq:function(){return be},W2:function(){return ot},W5:function(){return Ze},Wl:function(){return Tt},X7:function(){return _t},XB:function(){return O},XH:function(){return _},YA:function(){return xe},ZA:function(){return ut},Zm:function(){return Ge},_C:function(){return D},_U:function(){return z},a0:function(){return it},a1:function(){return Oe},a5:function(){return Zt},aA:function(){return Nn},aL:function(){return Et},aT:function(){return Pt},bf:function(){return en},by:function(){return H},d:function(){return qn},dg:function(){return fn},e0:function(){return r},eQ:function(){return Ne},fr:function(){return jt},gK:function(){return nt},h0:function(){return le},il:function(){return xt},j8:function(){return rn},jn:function(){return dt},kL:function(){return pe},kM:function(){return tn},lF:function(){return lt},m:function(){return Ut},m9:function(){return Yt},mh:function(){return We},mv:function(){return Lt},nb:function(){return h},np:function(){return yt},nq:function(){return Sn},o3:function(){return Vt},oQ:function(){return S},oT:function(){return Tn},op:function(){return Se},pO:function(){return we},po:function(){return De},pw:function(){return se},q0:function(){return Ft},qQ:function(){return ce},rr:function(){return zt},t5:function(){return W},tW:function(){return mn},tb:function(){return p},tn:function(){return Nt},uD:function(){return Ye},vo:function(){return ht},wr:function(){return It},xL:function(){return C},xP:function(){return Ce},xs:function(){return Ue},z6:function(){return Xt},zG:function(){return x},zb:function(){return M},zl:function(){return Bn},zu:function(){return E}});var T=t(7169),j=t(2726),f=t(9787),l=t.n(f),v=t(5284),k=t(45),g=t(9937),a=t(4512),P=["width","height","mirror","style"];function R(vn,wn){var In=Object.keys(vn);if(Object.getOwnPropertySymbols){var kn=Object.getOwnPropertySymbols(vn);wn&&(kn=kn.filter(function(nr){return Object.getOwnPropertyDescriptor(vn,nr).enumerable})),In.push.apply(In,kn)}return In}function K(vn){for(var wn=1;wn<arguments.length;wn++){var In=arguments[wn]!=null?arguments[wn]:{};wn%2?R(Object(In),!0).forEach(function(kn){(0,T.Z)(vn,kn,In[kn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(vn,Object.getOwnPropertyDescriptors(In)):R(Object(In)).forEach(function(kn){Object.defineProperty(vn,kn,Object.getOwnPropertyDescriptor(In,kn))})}return vn}var U=function(vn){return vn===g.C6.LIGHT?v.white:"#1e1e1e"},m=function(vn){var wn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:512,In=typeof wn=="number"?{width:wn}:wn,kn=In.width,nr=kn===void 0?512:kn,Pn=In.height,Jn=Pn===void 0?nr:Pn,xr=In.mirror,Nr=In.style,$r=(0,j.Z)(In,P);return(0,a.jsx)("svg",K(K({"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 ".concat(nr," ").concat(Jn),className:(0,k.Z)({"rtl-mirror":xr}),style:Nr},$r),{},{children:typeof vn=="string"?(0,a.jsx)("path",{fill:"currentColor",d:vn}):vn}))},G={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},he={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},be=(m((0,a.jsxs)("g",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("rect",{x:3,y:8,width:18,height:4,rx:1}),(0,a.jsx)("line",{x1:12,y1:8,x2:12,y2:21}),(0,a.jsx)("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),(0,a.jsx)("path",{d:"M7.5 8a2.5 2.5 0 0 1 0 -5a4.8 8 0 0 1 4.5 5a4.8 8 0 0 1 4.5 -5a2.5 2.5 0 0 1 0 5"})]}),G),m((0,a.jsxs)("g",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,a.jsx)("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,a.jsx)("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),(0,a.jsx)("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),(0,a.jsx)("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),G)),we=m((0,a.jsxs)("svg",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,a.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),G),xe=m((0,a.jsxs)("g",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,a.jsx)("circle",{cx:"12",cy:"19",r:"1"}),(0,a.jsx)("circle",{cx:"12",cy:"5",r:"1"})]}),G),ce=m((0,a.jsxs)("svg",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),(0,a.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),(0,a.jsx)("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),G),D=m((0,a.jsxs)("g",{children:[(0,a.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,a.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,a.jsx)("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:(0,a.jsx)("path",{stroke:"none",d:"M6.399 9.561V5.175c0-.93.401-1.823 1.116-2.48a3.981 3.981 0 0 1 2.693-1.028c1.01 0 1.98.37 2.694 1.027.715.658 1.116 1.55 1.116 2.481",fill:"#fff"})}),(0,a.jsx)("g",{mask:"url(#UnlockedIcon)",children:(0,a.jsx)("path",{stroke:"none",d:"M5.149 9.561v1.25h2.5v-1.25h-2.5Zm5.06-7.894V.417v1.25Zm2.559 3.508v1.25h2.5v-1.25h-2.5ZM7.648 8.51V5.175h-2.5V8.51h2.5Zm0-3.334c0-.564.243-1.128.713-1.561L6.668 1.775c-.959.883-1.52 2.104-1.52 3.4h2.5Zm.713-1.561a2.732 2.732 0 0 1 1.847-.697v-2.5c-1.31 0-2.585.478-3.54 1.358L8.36 3.614Zm1.847-.697c.71 0 1.374.26 1.847.697l1.694-1.839a5.231 5.231 0 0 0-3.54-1.358v2.5Zm1.847.697c.47.433.713.997.713 1.561h2.5c0-1.296-.56-2.517-1.52-3.4l-1.693 1.839Z",fill:"currentColor"})})]}),he),ne=m((0,a.jsxs)("g",{strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M13.542 8.542H6.458a2.5 2.5 0 0 0-2.5 2.5v3.75a2.5 2.5 0 0 0 2.5 2.5h7.084a2.5 2.5 0 0 0 2.5-2.5v-3.75a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,a.jsx)("path",{d:"M10 13.958a1.042 1.042 0 1 0 0-2.083 1.042 1.042 0 0 0 0 2.083Z"}),(0,a.jsx)("path",{d:"M6.667 8.333V5.417C6.667 3.806 8.159 2.5 10 2.5c1.841 0 3.333 1.306 3.333 2.917v2.916"})]}),he),S=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:"M38.5 83.5c-14-2-17.833-10.473-21-22.5C14.333 48.984 12 22 12 12.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),(0,a.jsx)("path",{d:"M12.005 10.478c1.92 3.495 3.838 7 7.905 14.423m-7.905-14.423c3.11 5.683 6.23 11.368 7.905 14.423m0 0c-3.68.226-7.35.455-13.91.85m13.91-.85c-5.279.33-10.566.647-13.91.85m0 0c1.936-4.931 3.882-9.86 6.005-15.273M6 25.75c2.069-5.257 4.135-10.505 6.005-15.272",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:41,height:94,fill:"none"}),z=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:"M18.026 1.232c-5.268 13.125-5.548 33.555 3.285 42.311 8.823 8.75 33.31 12.304 42.422 13.523",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m72.181 59.247-13.058-10-2.948 13.62 16.006-3.62Z",fill:"currentColor"}),(0,a.jsx)("path",{d:"M72.181 59.247c-3.163-2.429-6.337-4.856-13.058-10m13.058 10c-5.145-3.936-10.292-7.882-13.058-10m0 0c-.78 3.603-1.563 7.196-2.948 13.62m2.948-13.62c-1.126 5.168-2.24 10.346-2.948 13.62m0 0c5.168-1.166 10.334-2.343 16.006-3.62m-16.006 3.62c5.51-1.248 11.01-2.495 16.006-3.62",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:85,height:71,fill:"none"}),A=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:"M1 77c14-2 31.833-11.973 35-24 3.167-12.016-6-35-9.5-43.5",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m24.165 1.093-2.132 16.309 13.27-4.258-11.138-12.05Z",fill:"currentColor"}),(0,a.jsx)("path",{d:"M24.165 1.093c-.522 3.953-1.037 7.916-2.132 16.309m2.131-16.309c-.835 6.424-1.68 12.854-2.13 16.308m0 0c3.51-1.125 7.013-2.243 13.27-4.257m-13.27 4.257c5.038-1.608 10.08-3.232 13.27-4.257m0 0c-3.595-3.892-7.197-7.777-11.14-12.05m11.14 12.05c-3.837-4.148-7.667-8.287-11.14-12.05",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})]}),{width:38,height:78,fill:"none"}),E=(m((0,a.jsx)("g",{fill:"currentColor",children:(0,a.jsx)("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})}),{width:40,height:40,fill:"none"}),m((0,a.jsxs)("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M6 6l4.153 11.793a0.365 .365 0 0 0 .331 .207a0.366 .366 0 0 0 .332 -.207l2.184 -4.793l4.787 -1.994a0.355 .355 0 0 0 .213 -.323a0.355 .355 0 0 0 -.213 -.323l-11.787 -4.36z"}),(0,a.jsx)("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25})),L=m((0,a.jsxs)("g",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),G),h=m((0,a.jsxs)("g",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M10.5 20.4l-6.9 -6.9c-.781 -.781 -.781 -2.219 0 -3l6.9 -6.9c.781 -.781 2.219 -.781 3 0l6.9 6.9c.781 .781 .781 2.219 0 3l-6.9 6.9c-.781 .781 -2.219 .781 -3 0z"})]}),G),y=m((0,a.jsxs)("g",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("circle",{cx:"12",cy:"12",r:"9"})]}),G),r=m((0,a.jsxs)("g",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,a.jsx)("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),(0,a.jsx)("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),G),M=m((0,a.jsx)("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),he),p=m((0,a.jsxs)("g",{strokeWidth:"1.25",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),(0,a.jsx)("path",{d:"M16 7h4"}),(0,a.jsx)("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),G),c=m((0,a.jsxs)("g",{strokeWidth:"1.25",children:[(0,a.jsx)("path",{clipRule:"evenodd",d:"m7.643 15.69 7.774-7.773a2.357 2.357 0 1 0-3.334-3.334L4.31 12.357a3.333 3.333 0 0 0-.977 2.357v1.953h1.953c.884 0 1.732-.352 2.357-.977Z"}),(0,a.jsx)("path",{d:"m11.25 5.417 3.333 3.333"})]}),he),w=m((0,a.jsxs)("g",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),(0,a.jsx)("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),(0,a.jsx)("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),(0,a.jsx)("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),(0,a.jsx)("polyline",{points:"5 20 11 4 13 4 20 20"})]}),G),O=m((0,a.jsxs)("g",{strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M12.5 6.667h.01"}),(0,a.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z"}),(0,a.jsx)("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),(0,a.jsx)("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),he),$=m((0,a.jsxs)("g",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3"}),(0,a.jsx)("path",{d:"M18 13.3l-6.3 -6.3"})]}),G),I=m((0,a.jsx)("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),he),C=m((0,a.jsx)("path",{d:"M5 10h10",strokeWidth:"1.25"}),he),_=m((0,a.jsx)("path",{strokeWidth:"1.25",d:"M3.333 5.833h13.334M8.333 9.167v5M11.667 9.167v5M4.167 5.833l.833 10c0 .92.746 1.667 1.667 1.667h6.666c.92 0 1.667-.746 1.667-1.667l.833-10M7.5 5.833v-2.5c0-.46.373-.833.833-.833h3.334c.46 0 .833.373.833.833v2.5"}),he),N=m((0,a.jsxs)("g",{strokeWidth:"1.25",children:[(0,a.jsx)("polyline",{points:"12 16 18 10 12 4"}),(0,a.jsx)("polyline",{points:"8 4 2 10 8 16"})]}),he),q=m((0,a.jsxs)("g",{strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M14.375 6.458H8.958a2.5 2.5 0 0 0-2.5 2.5v5.417a2.5 2.5 0 0 0 2.5 2.5h5.417a2.5 2.5 0 0 0 2.5-2.5V8.958a2.5 2.5 0 0 0-2.5-2.5Z"}),(0,a.jsx)("path",{clipRule:"evenodd",d:"M11.667 3.125c.517 0 .986.21 1.325.55.34.338.55.807.55 1.325v1.458H8.333c-.485 0-.927.185-1.26.487-.343.312-.57.75-.609 1.24l-.005 5.357H5a1.87 1.87 0 0 1-1.326-.55 1.87 1.87 0 0 1-.549-1.325V5c0-.518.21-.987.55-1.326.338-.34.807-.549 1.325-.549h6.667Z"})]}),he),pe=m((0,a.jsx)("path",{clipRule:"evenodd",d:"M10 2.5h.328a6.25 6.25 0 0 0 6.6 10.372A7.5 7.5 0 1 1 10 2.493V2.5Z",stroke:"currentColor"}),he),te=m((0,a.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("path",{d:"M10 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM10 4.167V2.5M14.167 5.833l1.166-1.166M15.833 10H17.5M14.167 14.167l1.166 1.166M10 15.833V17.5M5.833 14.167l-1.166 1.166M5 10H3.333M5.833 5.833 4.667 4.667"})}),he),ve=m((0,a.jsxs)("g",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),(0,a.jsx)("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,a.jsx)("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),G),ae=m((0,a.jsx)("path",{strokeWidth:"1.25",d:"M3.333 14.167v1.666c0 .92.747 1.667 1.667 1.667h10c.92 0 1.667-.746 1.667-1.667v-1.666M5.833 9.167 10 13.333l4.167-4.166M10 3.333v10"}),he),H=m((0,a.jsxs)("g",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,a.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),(0,a.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),G),le=m((0,a.jsx)("path",{strokeWidth:"1.25",d:"M9.167 5.833H5.833c-1.254 0-2.5 1.282-2.5 2.5v5.834c0 1.283 1.252 2.5 2.5 2.5h5.834c1.251 0 2.5-1.25 2.5-2.5v-3.334M8.333 11.667l8.334-8.334M12.5 3.333h4.167V7.5"}),he),ke=m((0,a.jsx)("path",{d:"M7.5 15.833c-3.583 1.167-3.583-2.083-5-2.5m10 4.167v-2.917c0-.833.083-1.166-.417-1.666 2.334-.25 4.584-1.167 4.584-5a3.833 3.833 0 0 0-1.084-2.667 3.5 3.5 0 0 0-.083-2.667s-.917-.25-2.917 1.084a10.25 10.25 0 0 0-5.166 0C5.417 2.333 4.5 2.583 4.5 2.583a3.5 3.5 0 0 0-.083 2.667 3.833 3.833 0 0 0-1.084 2.667c0 3.833 2.25 4.75 4.584 5-.5.5-.5 1-.417 1.666V17.5",strokeWidth:"1.25"}),he),Le=m((0,a.jsxs)("g",{strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M7.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM12.5 10.833a.833.833 0 1 0 0-1.666.833.833 0 0 0 0 1.666ZM6.25 6.25c2.917-.833 4.583-.833 7.5 0M5.833 13.75c2.917.833 5.417.833 8.334 0"}),(0,a.jsx)("path",{d:"M12.917 14.167c0 .833 1.25 2.5 1.666 2.5 1.25 0 2.361-1.39 2.917-2.5.556-1.39.417-4.861-1.25-9.584-1.214-.846-2.5-1.116-3.75-1.25l-.833 2.084M7.083 14.167c0 .833-1.13 2.5-1.526 2.5-1.191 0-2.249-1.39-2.778-2.5-.529-1.39-.397-4.861 1.19-9.584 1.157-.846 2.318-1.116 3.531-1.25l.833 2.084"})]}),he),Ge=m((0,a.jsxs)("g",{strokeWidth:"1.25",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z"})]}),G),Ne=m((0,a.jsx)("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),Ce=m((0,a.jsxs)("g",{strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M8.333 11.667a2.917 2.917 0 0 0 4.167 0l3.333-3.334a2.946 2.946 0 1 0-4.166-4.166l-.417.416"}),(0,a.jsx)("path",{d:"M11.667 8.333a2.917 2.917 0 0 0-4.167 0l-3.333 3.334a2.946 2.946 0 0 0 4.166 4.166l.417-.416"})]}),he),Oe=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}),De=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}),Ae=m((0,a.jsx)("path",{d:"m9.257 6.351.183.183H15.819c.34 0 .727.182 1.051.506.323.323.505.708.505 1.05v5.819c0 .316-.183.7-.52 1.035-.337.338-.723.522-1.037.522H4.182c-.352 0-.74-.181-1.058-.5-.318-.318-.499-.705-.499-1.057V5.182c0-.351.181-.736.5-1.054.32-.321.71-.503 1.057-.503H6.53l2.726 2.726Z",strokeWidth:"1.25"}),he),ie=(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}),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")),Ie=m((0,a.jsxs)("g",{strokeWidth:"1.25",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M15 8h.01"}),(0,a.jsx)("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),(0,a.jsx)("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),(0,a.jsx)("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),(0,a.jsx)("path",{d:"M19 16v6"}),(0,a.jsx)("path",{d:"M22 19l-3 3l-3 -3"})]}),G),oe=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}),s=(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}),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}),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"),m((0,a.jsx)("path",{d:"M7.5 10.833 4.167 7.5 7.5 4.167M4.167 7.5h9.166a3.333 3.333 0 0 1 0 6.667H12.5",strokeWidth:"1.25"}),he)),x=m((0,a.jsx)("path",{d:"M12.5 10.833 15.833 7.5 12.5 4.167M15.833 7.5H6.667a3.333 3.333 0 1 0 0 6.667H7.5",strokeWidth:"1.25"}),he),V=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}),W=(m((0,a.jsx)("path",{d:"M5 12.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM15 17.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7.25 8.917l5.5-2.834M7.25 11.083l5.5 2.834",strokeWidth:"1.5"}),he),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}),m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{fill:"currentColor",d:"M40 5.6v6.1l-4.1.7c-8.9 1.4-16.5 6.9-20.6 15C13 32 10.9 43 12.4 43c.4 0 2.4-1.3 4.4-3 5-3.9 12.1-7 18.2-7.7l5-.6v12.8l11.2-11.3L62.5 22 51.2 10.8 40-.5v6.1zm10.2 22.6L44 34.5v-6.8l-6.9.6c-3.9.3-9.8 1.7-13.2 3.1-3.5 1.4-6.5 2.4-6.7 2.2-.9-1 3-7.5 6.4-10.8C28 18.6 34.4 16 40.1 16c3.7 0 3.9-.1 3.9-3.2V9.5l6.2 6.3 6.3 6.2-6.3 6.2z"}),(0,a.jsx)("path",{stroke:"currentColor",fill:"currentColor",d:"M0 36v20h48v-6.2c0-6 0-6.1-2-4.3-1.1 1-2 2.9-2 4.2V52H4V34c0-17.3-.1-18-2-18s-2 .7-2 20z"})]}),{width:64,height:64}),m((0,a.jsx)("path",{stroke:"currentColor",strokeWidth:"40",fill:"currentColor",d:"M148 560a318 318 0 0 0 522 110 316 316 0 0 0 0-450 316 316 0 0 0-450 0c-11 11-21 22-30 34v4h47c25 0 46 21 46 46s-21 45-46 45H90c-13 0-25-6-33-14-9-9-14-20-14-33V156c0-25 20-45 45-45s45 20 45 45v32l1 1a401 401 0 0 1 623 509l212 212a42 42 0 0 1-59 59L698 757A401 401 0 0 1 65 570a42 42 0 0 1 83-10z"}),{width:1024}),m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.622-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.767-.622-1.39-1.39-1.39Z",fill:"currentColor"}),(0,a.jsx)("path",{d:"M12.5 12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388"})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he)),re=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.944 12.5H12.5v1.389a1.389 1.389 0 0 1-1.389 1.389H5.556a1.389 1.389 0 0 1-1.39-1.39V8.334a1.389 1.389 0 0 1 1.39-1.389h1.388",fill:"currentColor"}),(0,a.jsx)("path",{d:"M13.889 4.167H8.333c-.767 0-1.389.621-1.389 1.389v5.555c0 .767.622 1.389 1.39 1.389h5.555c.767 0 1.389-.622 1.389-1.389V5.556c0-.768-.622-1.39-1.39-1.39Z"})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),ee=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M8.775 6.458h2.45a2.316 2.316 0 0 1 2.317 2.316v2.452a2.316 2.316 0 0 1-2.316 2.316H8.774a2.316 2.316 0 0 1-2.317-2.316V8.774a2.316 2.316 0 0 1 2.317-2.316Z",fill:"currentColor"}),(0,a.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316ZM12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z"})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),se=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("g",{clipPath:"url(#a)",children:[(0,a.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,a.jsx)("path",{d:"M5.441 9.792h2.451a2.316 2.316 0 0 1 2.316 2.316v2.45a2.316 2.316 0 0 1-2.316 2.317h-2.45a2.316 2.316 0 0 1-2.317-2.316v-2.451a2.316 2.316 0 0 1 2.316-2.316Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,a.jsx)("mask",{id:"SendToBackIcon",fill:"#fff",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z"})}),(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.167 5.833v2.06a2.941 2.941 0 0 0 2.94 2.94h2.06v.393a2.941 2.941 0 0 1-2.941 2.94h-.393v-2.058a2.941 2.941 0 0 0-2.94-2.941h-2.06v-.393a2.941 2.941 0 0 1 2.942-2.94h.392Z",fill:"currentColor"}),(0,a.jsx)("path",{d:"M9.167 5.833h1.25v-1.25h-1.25v1.25Zm5 5h1.25v-1.25h-1.25v1.25Zm-3.334 3.334h-1.25v1.25h1.25v-1.25Zm-5-5h-1.25v1.25h1.25v-1.25Zm2.084-3.334v2.06h2.5v-2.06h-2.5Zm0 2.06a4.191 4.191 0 0 0 4.19 4.19v-2.5a1.691 1.691 0 0 1-1.69-1.69h-2.5Zm4.19 4.19h2.06v-2.5h-2.06v2.5Zm.81-1.25v.393h2.5v-.393h-2.5Zm0 .393c0 .933-.758 1.69-1.691 1.69v2.5a4.191 4.191 0 0 0 4.19-4.19h-2.5Zm-1.691 1.69h-.393v2.5h.393v-2.5Zm.857 1.25v-2.058h-2.5v2.059h2.5Zm0-2.058a4.191 4.191 0 0 0-4.19-4.191v2.5c.933 0 1.69.757 1.69 1.69h2.5Zm-4.19-4.191h-2.06v2.5h2.06v-2.5Zm-.81 1.25v-.393h-2.5v.393h2.5Zm0-.393c0-.934.758-1.69 1.692-1.69v-2.5a4.191 4.191 0 0 0-4.192 4.19h2.5Zm1.692-1.69h.392v-2.5h-.392v2.5Z",fill:"currentColor",mask:"url(#SendToBackIcon)"}),(0,a.jsx)("path",{d:"M12.108 3.125h2.45a2.316 2.316 0 0 1 2.317 2.316v2.451a2.316 2.316 0 0 1-2.316 2.316h-2.451a2.316 2.316 0 0 1-2.316-2.316v-2.45a2.316 2.316 0 0 1 2.316-2.317Z",stroke:"currentColor",strokeWidth:"1.25"})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),Ee=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v7.083c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V8.125c0-.92-.746-1.667-1.666-1.667ZM6.875 6.458h-.417c-.92 0-1.666.747-1.666 1.667v3.75c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667v-3.75c0-.92-.747-1.667-1.667-1.667Z"})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),_e=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M6.875 3.125h-.417c-.92 0-1.666.746-1.666 1.667v7.083c0 .92.746 1.667 1.666 1.667h.417c.92 0 1.667-.746 1.667-1.667V4.792c0-.92-.747-1.667-1.667-1.667ZM13.542 5.817h-.417c-.92 0-1.667.747-1.667 1.667v4.391c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667V7.484c0-.92-.746-1.667-1.666-1.667Z"})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),Ue=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M15.208 4.792H8.125c-.92 0-1.667.746-1.667 1.666v.417c0 .92.747 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM12.516 11.458H8.125c-.92 0-1.667.746-1.667 1.667v.417c0 .92.747 1.666 1.667 1.666h4.391c.92 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.667-1.667Z"})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),We=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M11.875 4.792H4.792c-.92 0-1.667.746-1.667 1.666v.417c0 .92.746 1.667 1.667 1.667h7.083c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666ZM11.683 11.458H7.292c-.92 0-1.667.746-1.667 1.667v.417c0 .92.746 1.666 1.667 1.666h4.39c.921 0 1.667-.746 1.667-1.666v-.417c0-.92-.746-1.667-1.666-1.667Z"})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),Ye=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M14.375 10.208v-.416c0-.92-.746-1.667-1.667-1.667H7.292c-.92 0-1.667.746-1.667 1.667v.416c0 .92.746 1.667 1.667 1.667h5.416c.92 0 1.667-.746 1.667-1.667Z"})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),Ze=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M10.208 5.625h-.416c-.92 0-1.667.746-1.667 1.667v5.416c0 .92.746 1.667 1.667 1.667h.416c.92 0 1.667-.746 1.667-1.667V7.292c0-.92-.746-1.667-1.667-1.667Z"})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),Je=m((0,a.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M6.875 4.792h-.417c-.92 0-1.666.746-1.666 1.666v7.084c0 .92.746 1.666 1.666 1.666h.417c.92 0 1.667-.746 1.667-1.666V6.458c0-.92-.747-1.666-1.667-1.666ZM13.542 6.458h-.417c-.92 0-1.667.747-1.667 1.667v3.75c0 .92.746 1.667 1.667 1.667h.417c.92 0 1.666-.746 1.666-1.667v-3.75c0-.92-.746-1.667-1.666-1.667Z"})]}),he),nt=m((0,a.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M4.792 13.125v.417c0 .92.746 1.666 1.666 1.666h7.084c.92 0 1.666-.746 1.666-1.666v-.417c0-.92-.746-1.667-1.666-1.667H6.458c-.92 0-1.666.746-1.666 1.667ZM6.458 6.458v.417c0 .92.747 1.667 1.667 1.667h3.75c.92 0 1.667-.747 1.667-1.667v-.417c0-.92-.746-1.666-1.667-1.666h-3.75c-.92 0-1.667.746-1.667 1.666Z"})]}),he),dt=m((0,a.jsxs)("g",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,a.jsx)("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),(0,a.jsx)("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),(0,a.jsx)("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),G),ge=(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"),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"),m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("path",{d:"M15 5 5 15M5 5l10 10"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he)),Se=m("M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z",{width:320,height:512,style:{marginLeft:"-0.2rem"},mirror:!0}),Be=(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}),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}),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}),l().memo(function(vn){var wn=vn.theme;return m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,a.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,a.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,a.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,a.jsxs)("g",{fill:U(wn),stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,a.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,a.jsx)("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),(0,a.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,a.jsx)("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})})),Xe=l().memo(function(vn){var wn=vn.theme;return m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:"M25 26H111V111H25",fill:"var(--icon-fill-color)"}),(0,a.jsx)("path",{d:"M25 111C25 80.2068 25 49.4135 25 26M25 26C48.6174 26 72.2348 26 111 26H25ZM25 26C53.3671 26 81.7343 26 111 26H25ZM111 26C111 52.303 111 78.606 111 111V26ZM111 26C111 51.2947 111 76.5893 111 111V26ZM111 111C87.0792 111 63.1585 111 25 111H111ZM111 111C87.4646 111 63.9293 111 25 111H111ZM25 111C25 81.1514 25 51.3028 25 26V111Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,a.jsx)("path",{d:"M100 100H160V160H100",fill:"var(--icon-fill-color)"}),(0,a.jsx)("path",{d:"M100 160C100 144.106 100 128.211 100 100M100 100C117.706 100 135.412 100 160 100H100ZM100 100C114.214 100 128.428 100 160 100H100ZM160 100C160 120.184 160 140.369 160 160V100ZM160 100C160 113.219 160 126.437 160 160V100ZM160 160C145.534 160 131.068 160 100 160H160ZM160 160C143.467 160 126.934 160 100 160H160ZM100 160C100 143.661 100 127.321 100 100V160Z",stroke:"var(--icon-fill-color)",strokeWidth:"2"}),(0,a.jsxs)("g",{fill:U(wn),stroke:"var(--icon-fill-color)",strokeWidth:"6",children:[(0,a.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,a.jsx)("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),(0,a.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,a.jsx)("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),(0,a.jsx)("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),(0,a.jsx)("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})}),lt=m((0,a.jsx)("g",{strokeWidth:1.25,children:(0,a.jsx)("path",{d:"M5.879 2.625h8.242a3.27 3.27 0 0 1 3.254 3.254v8.242a3.27 3.27 0 0 1-3.254 3.254H5.88a3.27 3.27 0 0 1-3.254-3.254V5.88A3.27 3.27 0 0 1 5.88 2.626l-.001-.001ZM4.518 16.118l7.608-12.83m.198 13.934 5.051-9.897M2.778 9.675l9.348-6.387m-7.608 12.83 12.857-8.793"})}),he),it=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,a.jsx)("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:(0,a.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.25"})}),(0,a.jsx)("g",{mask:"url(#FillHachureIcon)",children:(0,a.jsx)("path",{d:"M2.258 15.156 15.156 2.258M7.324 20.222 20.222 7.325m-20.444 5.35L12.675-.222m-8.157 18.34L17.416 5.22",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})]}),he),yt=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("g",{clipPath:"url(#a)",children:[(0,a.jsx)("path",{d:"M5.879 2.625h8.242a3.254 3.254 0 0 1 3.254 3.254v8.242a3.254 3.254 0 0 1-3.254 3.254H5.88a3.254 3.254 0 0 1-3.254-3.254V5.88a3.254 3.254 0 0 1 3.254-3.254Z",stroke:"currentColor",strokeWidth:"1.25"}),(0,a.jsx)("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:(0,a.jsx)("path",{d:"M2.426 15.044 15.044 2.426M7.383 20 20 7.383M0 12.617 12.617 0m-7.98 17.941L17.256 5.324m-2.211 12.25L2.426 4.956M20 12.617 7.383 0m5.234 20L0 7.383m17.941 7.98L5.324 2.745",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,a.jsx)("g",{mask:"url(#FillCrossHatchIcon)",children:(0,a.jsx)("path",{d:"M14.121 2H5.88A3.879 3.879 0 0 0 2 5.879v8.242A3.879 3.879 0 0 0 5.879 18h8.242A3.879 3.879 0 0 0 18 14.121V5.88A3.879 3.879 0 0 0 14.121 2Z",fill:"currentColor"})})]}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),_t=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("g",{clipPath:"url(#a)",children:(0,a.jsx)("path",{d:"M4.91 2.625h10.18a2.284 2.284 0 0 1 2.285 2.284v10.182a2.284 2.284 0 0 1-2.284 2.284H4.909a2.284 2.284 0 0 1-2.284-2.284V4.909a2.284 2.284 0 0 1 2.284-2.284Z",stroke:"currentColor",strokeWidth:"1.25"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),K(K({},he),{},{fill:"currentColor"})),ut=m((0,a.jsx)(a.Fragment,{children:(0,a.jsx)("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),he),Tt=m((0,a.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),he),Yt=m((0,a.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),he),Zt=m((0,a.jsxs)("g",{strokeWidth:"2",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M5 12h2"}),(0,a.jsx)("path",{d:"M17 12h2"}),(0,a.jsx)("path",{d:"M11 12h2"})]}),G),Pt=m((0,a.jsxs)("g",{strokeWidth:"2",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M4 12v.01"}),(0,a.jsx)("path",{d:"M8 12v.01"}),(0,a.jsx)("path",{d:"M12 12v.01"}),(0,a.jsx)("path",{d:"M16 12v.01"}),(0,a.jsx)("path",{d:"M20 12v.01"})]}),G),en=m((0,a.jsx)("path",{d:"M2.5 12.038c1.655-.885 5.9-3.292 8.568-4.354 2.668-1.063.101 2.821 1.32 3.104 1.218.283 5.112-1.814 5.112-1.814",strokeWidth:"1.25"}),he),tn=m((0,a.jsx)("path",{d:"M2.5 12.563c1.655-.886 5.9-3.293 8.568-4.355 2.668-1.062.101 2.822 1.32 3.105 1.218.283 5.112-1.814 5.112-1.814m-13.469 2.23c2.963-1.586 6.13-5.62 7.468-4.998 1.338.623-1.153 4.11-.132 5.595 1.02 1.487 6.133-1.43 6.133-1.43",strokeWidth:"1.25"}),he),ot=m((0,a.jsx)("path",{d:"M2.5 11.936c1.737-.879 8.627-5.346 10.42-5.268 1.795.078-.418 5.138.345 5.736.763.598 3.53-1.789 4.235-2.147M2.929 9.788c1.164-.519 5.47-3.28 6.987-3.114 1.519.165 1 3.827 2.121 4.109 1.122.281 3.839-2.016 4.606-2.42",strokeWidth:"1.25"}),he),It=m((0,a.jsxs)("svg",{strokeWidth:"1.5",children:[(0,a.jsx)("path",{d:"M3.33334 9.99998V6.66665C3.33334 6.04326 3.33403 4.9332 3.33539 3.33646C4.95233 3.33436 6.06276 3.33331 6.66668 3.33331H10"}),(0,a.jsx)("path",{d:"M13.3333 3.33331V3.34331"}),(0,a.jsx)("path",{d:"M16.6667 3.33331V3.34331"}),(0,a.jsx)("path",{d:"M16.6667 6.66669V6.67669"}),(0,a.jsx)("path",{d:"M16.6667 10V10.01"}),(0,a.jsx)("path",{d:"M3.33334 13.3333V13.3433"}),(0,a.jsx)("path",{d:"M16.6667 13.3333V13.3433"}),(0,a.jsx)("path",{d:"M3.33334 16.6667V16.6767"}),(0,a.jsx)("path",{d:"M6.66666 16.6667V16.6767"}),(0,a.jsx)("path",{d:"M10 16.6667V16.6767"}),(0,a.jsx)("path",{d:"M13.3333 16.6667V16.6767"}),(0,a.jsx)("path",{d:"M16.6667 16.6667V16.6767"})]}),he),mt=m((0,a.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),(0,a.jsx)("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),(0,a.jsx)("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),(0,a.jsx)("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),(0,a.jsx)("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),(0,a.jsx)("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),(0,a.jsx)("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),(0,a.jsx)("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),(0,a.jsx)("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),(0,a.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),(0,a.jsx)("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),(0,a.jsx)("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),G),jt=m((0,a.jsx)("path",{d:"M6 10H34",stroke:"currentColor",strokeWidth:2,fill:"none"}),{width:40,height:20}),xt=l().memo(function(vn){var wn=vn.flip,In=wn!==void 0&&wn;return m((0,a.jsxs)("g",{transform:In?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[(0,a.jsx)("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),(0,a.jsx)("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})}),Nt=l().memo(function(vn){var wn=vn.flip,In=wn!==void 0&&wn;return m((0,a.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:In?"translate(40, 0) scale(-1, 1)":"",children:[(0,a.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,a.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})}),Ut=l().memo(function(vn){var wn=vn.flip,In=wn!==void 0&&wn;return m((0,a.jsx)("g",{transform:In?"translate(40, 0) scale(-1, 1)":"",children:(0,a.jsx)("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})}),rn=l().memo(function(vn){var wn=vn.flip,In=wn!==void 0&&wn;return m((0,a.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:In?"translate(40, 0) scale(-1, 1)":"",children:[(0,a.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,a.jsx)("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})}),Ft=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("g",{clipPath:"url(#a)",children:(0,a.jsx)("path",{d:"M14.167 6.667a3.333 3.333 0 0 0-3.334-3.334H9.167a3.333 3.333 0 0 0 0 6.667h1.666a3.333 3.333 0 0 1 0 6.667H9.167a3.333 3.333 0 0 1-3.334-3.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),Sn=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("g",{clipPath:"url(#a)",children:(0,a.jsx)("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),mn=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("g",{clipPath:"url(#a)",children:(0,a.jsx)("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),Yn=m((0,a.jsx)(a.Fragment,{children:(0,a.jsx)("path",{d:"m1.667 3.333 6.666 13.334M8.333 3.333 1.667 16.667M11.667 3.333v13.334h6.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),he),ht=m((0,a.jsx)(a.Fragment,{children:(0,a.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("path",{d:"M5.833 16.667v-10a3.333 3.333 0 0 1 3.334-3.334h1.666a3.333 3.333 0 0 1 3.334 3.334v10M5.833 10.833h8.334"})})}),he),Xt=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("path",{d:"M5.833 6.667 2.5 10l3.333 3.333M14.167 6.667 17.5 10l-3.333 3.333M11.667 3.333 8.333 16.667"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"a",children:(0,a.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),he),zt=m((0,a.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,a.jsx)("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),(0,a.jsx)("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),G),Vt=m((0,a.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,a.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),(0,a.jsx)("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),G),Tn=m((0,a.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,a.jsx)("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),(0,a.jsx)("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),G),Dn=l().memo(function(vn){return vn.theme,m((0,a.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),(0,a.jsx)("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),G)}),Nn=l().memo(function(vn){return vn.theme,m((0,a.jsxs)("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),(0,a.jsx)("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),G)}),Xn=l().memo(function(vn){return vn.theme,m((0,a.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),(0,a.jsx)("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),(0,a.jsx)("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),G)}),jn=m((0,a.jsx)("path",{d:"M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4zM393.4 288H328v112c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V288h-65.4c-14.3 0-21.4-17.2-11.3-27.3l105.4-105.4c6.2-6.2 16.4-6.2 22.6 0l105.4 105.4c10.1 10.1 2.9 27.3-11.3 27.3z",fill:"currentColor"}),{width:640,height:512}),wt=(m((0,a.jsx)("path",{d:"M480 416C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H150.6C133.7 480 117.4 473.3 105.4 461.3L25.37 381.3C.3786 356.3 .3786 315.7 25.37 290.7L258.7 57.37C283.7 32.38 324.3 32.38 349.3 57.37L486.6 194.7C511.6 219.7 511.6 260.3 486.6 285.3L355.9 416H480zM265.4 416L332.7 348.7L195.3 211.3L70.63 336L150.6 416L265.4 416z"})),m((0,a.jsxs)("g",{strokeWidth:1.25,children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,a.jsx)("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),(0,a.jsx)("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,a.jsx)("path",{d:"M17 7.5a1.5 1.5 0 0 1 3 0v8.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47"})]}),G)),Et=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),(0,a.jsx)("path",{d:"M7 11l5 5l5 -5"}),(0,a.jsx)("path",{d:"M12 4l0 12"})]}),G),Ct=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"}),(0,a.jsx)("path",{d:"M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"})]}),G),Lt=m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),(0,a.jsx)("path",{d:"M12 17l0 .01"}),(0,a.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),G),hn=(m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M7 4v16l13 -8z"})]}),G),m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z",strokeWidth:"0",fill:"currentColor"})]}),G),m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M5 12l5 5l10 -10"})]}),G),m((0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"}),(0,a.jsx)("path",{d:"M12 9v4"}),(0,a.jsx)("path",{d:"M12 17h.01"})]}),G)),yn=m((0,a.jsxs)("g",{strokeWidth:1.25,children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M11 7l6 6"}),(0,a.jsx)("path",{d:"M4 16l11.7 -11.7a1 1 0 0 1 1.4 0l2.6 2.6a1 1 0 0 1 0 1.4l-11.7 11.7h-4v-4z"})]}),G),fn=m((0,a.jsxs)("g",{strokeWidth:1.5,children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M12 3l-4 7h8z"}),(0,a.jsx)("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),(0,a.jsx)("path",{d:"M4 14m0 1a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1z"})]}),G),Bn=m((0,a.jsxs)("g",{strokeWidth:1.5,children:[(0,a.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,a.jsx)("path",{d:"M4 7l16 0"}),(0,a.jsx)("path",{d:"M4 17l16 0"}),(0,a.jsx)("path",{d:"M7 4l0 16"}),(0,a.jsx)("path",{d:"M17 4l0 16"})]}),G),En=m((0,a.jsx)("path",{fill:"currentColor",d:"M407.48,111.18C335.587,108.103 269.573,152.338 245.08,220C220.587,152.338 154.573,108.103 82.68,111.18C80.285,168.229 107.577,222.632 154.74,254.82C178.908,271.419 193.35,298.951 193.27,328.27L193.27,379.13L296.9,379.13L296.9,328.27C296.816,298.953 311.255,271.42 335.42,254.82C382.596,222.644 409.892,168.233 407.48,111.18Z"})),Cn=m((0,a.jsxs)("g",{strokeWidth:"1.25",children:[(0,a.jsx)("path",{d:"M4.16602 10H15.8327"}),(0,a.jsx)("path",{d:"M12.5 13.3333L15.8333 10"}),(0,a.jsx)("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),he),qn=m((0,a.jsxs)("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[(0,a.jsx)("path",{clipRule:"evenodd",d:"m9.644 13.69 7.774-7.773a2.357 2.357 0 0 0-3.334-3.334l-7.773 7.774L8 12l1.643 1.69Z"}),(0,a.jsx)("path",{d:"m13.25 3.417 3.333 3.333M10 10l2-2M5 15l3-3M2.156 17.894l1-1M5.453 19.029l-.144-1.407M2.377 11.887l.866 1.118M8.354 17.273l-1.194-.758M.953 14.652l1.408.13"})]}),20)},7021:function(fe,Q,t){t.d(Q,{Z:function(){return Ge}});var T={};t.r(T),t.d(T,{ChangeCanvasBackground:function(){return pe},ClearCanvas:function(){return N},Export:function(){return te},Help:function(){return _},LiveCollaborationTrigger:function(){return ae},LoadScene:function(){return $},SaveAsImage:function(){return C},SaveToActiveFile:function(){return I},Socials:function(){return ve},ToggleTheme:function(){return q}});var j=t(8242),f=t(7104),l=t(8950),v=t(2975),k=t.n(v),g=t(2529),a=t(8227),P=t(8935),R=t(5735),K=t(3858),U=t(5463),m=t(3379),G=t.n(m),he=t(7795),be=t.n(he),we=t(569),xe=t.n(we),ce=t(3565),D=t.n(ce),ne=t(9216),S=t.n(ne),z=t(4589),A=t.n(z),E=t(4343),L={};L.styleTagTransform=A(),L.setAttributes=D(),L.insert=xe().bind(null,"head"),L.domAPI=be(),L.insertStyleElement=S(),G()(E.Z,L),E.Z&&E.Z.locals&&E.Z.locals;var h=t(45),y=t(3607),r=t(8973),M=t(453),p=t(100),c=t(7827),w=t(9247),O=t(4512),$=function(){var Ne=(0,a.QT)().t,Ce=(0,j.eh)(),Oe=(0,j.bd)();if(!Ce.isActionEnabled(U._d))return null;var De=function(){var Ae=(0,l.Z)(k().mark(function ie(){return k().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:if(Ie.t0=!Oe.length,Ie.t0){Ie.next=5;break}return Ie.next=4,(0,c._)({title:Ne("overwriteConfirm.modal.loadFromFile.title"),actionLabel:Ne("overwriteConfirm.modal.loadFromFile.button"),color:"warning",description:(0,O.jsx)(w.Z,{i18nKey:"overwriteConfirm.modal.loadFromFile.description",bold:function(oe){return(0,O.jsx)("strong",{children:oe})},br:function(){return(0,O.jsx)("br",{})}})});case 4:Ie.t0=Ie.sent;case 5:if(!Ie.t0){Ie.next=7;break}Ce.executeAction(U._d);case 7:case"end":return Ie.stop()}},ie)}));return function(){return Ae.apply(this,arguments)}}();return(0,O.jsx)(R.Z,{icon:P.Tl,onSelect:De,"data-testid":"load-button",shortcut:(0,g.C)("loadScene"),"aria-label":Ne("buttons.load"),children:Ne("buttons.load")})};$.displayName="LoadScene";var I=function(){var Ne=(0,a.QT)().t,Ce=(0,j.eh)();return Ce.isActionEnabled(U.ns)?(0,O.jsx)(R.Z,{shortcut:(0,g.C)("saveScene"),"data-testid":"save-button",onSelect:function(){return Ce.executeAction(U.ns)},icon:P.a1,"aria-label":"".concat(Ne("buttons.save")),children:"".concat(Ne("buttons.save"))}):null};I.displayName="SaveToActiveFile";var C=function(){var Ne=(0,j.n9)(),Ce=(0,a.QT)().t;return(0,O.jsx)(R.Z,{icon:P.J8,"data-testid":"image-export-button",onSelect:function(){return Ne({openDialog:"imageExport"})},shortcut:(0,g.C)("imageExport"),"aria-label":Ce("buttons.exportImage"),children:Ce("buttons.exportImage")})};C.displayName="SaveAsImage";var _=function(){var Ne=(0,a.QT)().t,Ce=(0,j.eh)();return(0,O.jsx)(R.Z,{"data-testid":"help-menu-item",icon:P.by,onSelect:function(){return Ce.executeAction(U.jY)},shortcut:"?","aria-label":Ne("helpDialog.title"),children:Ne("helpDialog.title")})};_.displayName="Help";var N=function(){var Ne=(0,a.QT)().t,Ce=(0,y.b9)(r.w,M.yE);return(0,j.eh)().isActionEnabled(U.mo)?(0,O.jsx)(R.Z,{icon:P.XH,onSelect:function(){return Ce("clearCanvas")},"data-testid":"clear-canvas-button","aria-label":Ne("buttons.clearReset"),children:Ne("buttons.clearReset")}):null};N.displayName="ClearCanvas";var q=function(){var Ne=(0,a.QT)().t,Ce=(0,p.I)(),Oe=(0,j.eh)();return Oe.isActionEnabled(U.Zp)?(0,O.jsx)(R.Z,{onSelect:function(De){return De.preventDefault(),Oe.executeAction(U.Zp)},icon:Ce.theme==="dark"?P.NW:P.kL,"data-testid":"toggle-dark-mode",shortcut:(0,g.C)("toggleTheme"),"aria-label":Ce.theme==="dark"?Ne("buttons.lightMode"):Ne("buttons.darkMode"),children:Ce.theme==="dark"?Ne("buttons.lightMode"):Ne("buttons.darkMode")}):null};q.displayName="ToggleTheme";var pe=function(){var Ne=(0,a.QT)().t,Ce=(0,p.I)(),Oe=(0,j.eh)(),De=(0,j.hY)();return Ce.viewModeEnabled||!De.UIOptions.canvasActions.changeViewBackgroundColor?null:(0,O.jsxs)("div",{style:{marginTop:"0.5rem"},children:[(0,O.jsx)("div",{"data-testid":"canvas-background-label",style:{fontSize:".75rem",marginBottom:".5rem"},children:Ne("labels.canvasBackground")}),(0,O.jsx)("div",{style:{padding:"0 0.625rem"},children:Oe.renderAction("changeViewBackgroundColor")})]})};pe.displayName="ChangeCanvasBackground";var te=function(){var Ne=(0,a.QT)().t,Ce=(0,j.n9)();return(0,O.jsx)(R.Z,{icon:P.Hy,onSelect:function(){Ce({openDialog:"jsonExport"})},"data-testid":"json-export-button","aria-label":Ne("buttons.export"),children:Ne("buttons.export")})};te.displayName="Export";var ve=function(){return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(K.Z,{icon:P.ET,href:"https://github.com/excalidraw/excalidraw","aria-label":"GitHub",children:"GitHub"}),(0,O.jsx)(K.Z,{icon:P.D7,href:"https://discord.gg/UexuTaE","aria-label":"Discord",children:"Discord"}),(0,O.jsx)(K.Z,{icon:P.Zm,href:"https://twitter.com/excalidraw","aria-label":"Twitter",children:"Twitter"})]})};ve.displayName="Socials";var ae=function(Ne){var Ce=Ne.onSelect,Oe=Ne.isCollaborating,De=(0,a.QT)().t;return(0,O.jsx)(R.Z,{"data-testid":"collab-button",icon:P.jn,className:(0,h.Z)({"active-collab":Oe}),onSelect:Ce,children:De("labels.liveCollaboration")})};ae.displayName="LiveCollaborationTrigger";var H=t(4704),le=t(6922),ke=t(9827),Le=t(4572),Ge=Object.assign((0,le.$)("MainMenu",function(Ne){var Ce=Ne.children,Oe=Ne.onSelect,De=(0,Le.R6)().MainMenuTunnel,Ae=(0,j.Fy)(),ie=(0,p.I)(),Ie=(0,j.n9)(),oe=Ae.editor.isMobile?void 0:function(){return Ie({openMenu:null})};return(0,O.jsx)(De.In,{children:(0,O.jsxs)(f.Z,{open:ie.openMenu==="canvas",children:[(0,O.jsx)(f.Z.Trigger,{onToggle:function(){Ie({openMenu:ie.openMenu==="canvas"?null:"canvas"})},"data-testid":"main-menu-trigger",className:"main-menu-trigger",children:P.RY}),(0,O.jsxs)(f.Z.Content,{onClickOutside:oe,onSelect:(0,ke.Mj)(Oe,function(){Ie({openMenu:null})}),children:[Ce,Ae.editor.isMobile&&ie.collaborators.size>0&&(0,O.jsxs)("fieldset",{className:"UserList-Wrapper",children:[(0,O.jsx)("legend",{children:(0,a.t)("labels.collaborators")}),(0,O.jsx)(H.Z,{mobile:!0,collaborators:ie.collaborators})]})]})]})})}),{Trigger:f.Z.Trigger,Item:f.Z.Item,ItemLink:f.Z.ItemLink,ItemCustom:f.Z.ItemCustom,Group:f.Z.Group,Separator:f.Z.Separator,DefaultItems:T})},9937:function(fe,Q,t){t.d(Q,{wL:function(){return Ne},iC:function(){return L},vL:function(){return it},bY:function(){return lt},gK:function(){return Xe},$C:function(){return _},oc:function(){return w},_9:function(){return Yt},HN:function(){return ot},qy:function(){return nt},rk:function(){return H},n5:function(){return ae},h6:function(){return dt},Rx:function(){return Tt},Cc:function(){return mt},Hg:function(){return le},cW:function(){return se},hs:function(){return ke},f:function(){return h},xY:function(){return ut},Iw:function(){return r},$e:function(){return M},Vi:function(){return C},Ks:function(){return ce},r8:function(){return De},I_:function(){return Oe},ZB:function(){return Je},pb:function(){return Ae},ut:function(){return N},iG:function(){return pe},k:function(){return Le},sA:function(){return V},KL:function(){return Ge},LL:function(){return ie},PR:function(){return jt},tf:function(){return It},EE:function(){return Ye},qx:function(){return y},$n:function(){return ge},zK:function(){return Ze},LO:function(){return Ce},CP:function(){return ve},Zj:function(){return x},Yx:function(){return Ue},sS:function(){return _e},kV:function(){return Ee},sk:function(){return We},Oh:function(){return O},XI:function(){return $},WR:function(){return Pt},$h:function(){return en},a6:function(){return Zt},HM:function(){return s},ay:function(){return c},dg:function(){return tn},hR:function(){return Se},Gj:function(){return Ie},I8:function(){return _t},wZ:function(){return p},C6:function(){return q},ZF:function(){return W},nM:function(){return oe},ah:function(){return ee},UO:function(){return re},Kr:function(){return Be},oX:function(){return yt},_D:function(){return te},vf:function(){return I},V4:function(){return u},Dt:function(){return S},jP:function(){return E},Um:function(){return D},vU:function(){return z},G6:function(){return A},ED:function(){return ne}});var T=t(7169),j=t(3379),f=t.n(j),l=t(7795),v=t.n(l),k=t(569),g=t.n(k),a=t(3565),P=t.n(a),R=t(9216),K=t.n(R),U=t(4589),m=t.n(U),G=t(6464),he={};he.styleTagTransform=m(),he.setAttributes=P(),he.insert=g().bind(null,"head"),he.domAPI=v(),he.insertStyleElement=K(),f()(G.Z,he);var be=G.Z&&G.Z.locals?G.Z.locals:void 0,we=t(9240);function xe(xt,Nt){var Ut=Object.keys(xt);if(Object.getOwnPropertySymbols){var rn=Object.getOwnPropertySymbols(xt);Nt&&(rn=rn.filter(function(Ft){return Object.getOwnPropertyDescriptor(xt,Ft).enumerable})),Ut.push.apply(Ut,rn)}return Ut}var ce,D=/Mac|iPod|iPhone|iPad/.test(navigator.platform),ne=/^Win/.test(navigator.platform),S=/\b(android)\b/i.test(navigator.userAgent),z="netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,A=navigator.userAgent.indexOf("Chrome")===-1&&navigator.userAgent.indexOf("Safari")!==-1,E=function(){var xt,Nt;return((xt=navigator.brave)===null||xt===void 0||(Nt=xt.isBrave)===null||Nt===void 0?void 0:Nt.name)==="isBrave"},L="Excalidraw",h=10,y=8,r=5,M=1,p=30,c=Math.PI/12,w={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},O={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1},$={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"};(function(xt){xt.COPY="copy",xt.PASTE="paste",xt.CUT="cut",xt.KEYDOWN="keydown",xt.KEYUP="keyup",xt.MOUSE_MOVE="mousemove",xt.RESIZE="resize",xt.UNLOAD="unload",xt.FOCUS="focus",xt.BLUR="blur",xt.DRAG_OVER="dragover",xt.DROP="drop",xt.GESTURE_END="gestureend",xt.BEFORE_UNLOAD="beforeunload",xt.GESTURE_START="gesturestart",xt.GESTURE_CHANGE="gesturechange",xt.POINTER_MOVE="pointermove",xt.POINTER_DOWN="pointerdown",xt.POINTER_UP="pointerup",xt.STATE_CHANGE="statechange",xt.WHEEL="wheel",xt.TOUCH_START="touchstart",xt.TOUCH_END="touchend",xt.HASHCHANGE="hashchange",xt.VISIBILITY_CHANGE="visibilitychange",xt.SCROLL="scroll",xt.EXCALIDRAW_LINK="excalidraw-link",xt.MENU_ITEM_SELECT="menu.itemSelect",xt.MESSAGE="message"})(ce||(ce={}));var I={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},C={TEST:"test",DEVELOPMENT:"development"},_={SHAPE_ACTIONS_MENU:"App-menu__left"},N={Virgil:1,Helvetica:2,Cascadia:3,Assistant:4},q={LIGHT:"light",DARK:"dark"},pe={strokeColor:"#bbb",strokeWidth:2,strokeStyle:"solid",fillStyle:"solid",roughness:0,roundness:null,backgroundColor:"transparent",radius:8,nameOffsetY:3,nameColorLightTheme:"#999999",nameColorDarkTheme:"#7a7a7a",nameFontSize:14,nameLineHeight:1.25},te="Segoe UI Emoji",ve=1,ae=20,H=N.Virgil,le="left",ke="top",Le=20,Ge={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif",jfif:"image/jfif"},Ne=["text/plain","text/html"],Ce=function(xt){for(var Nt=1;Nt<arguments.length;Nt++){var Ut=arguments[Nt]!=null?arguments[Nt]:{};Nt%2?xe(Object(Ut),!0).forEach(function(rn){(0,T.Z)(xt,rn,Ut[rn])}):Object.getOwnPropertyDescriptors?Object.defineProperties(xt,Object.getOwnPropertyDescriptors(Ut)):xe(Object(Ut)).forEach(function(rn){Object.defineProperty(xt,rn,Object.getOwnPropertyDescriptor(Ut,rn))})}return xt}({json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json","excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream"},Ge),Oe={png:"png",svg:"svg",clipboard:"clipboard"},De={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},Ae=window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,ie=500,Ie=300,oe=500,s=100,u=.1,x=.1,V=300,W=be.themeFilter,re={addLibrary:"addLibrary"},ee={addLibrary:"addLibrary"},se={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},Ee=730,_e=1e3,Ue=500,We=1229,Ye=parseInt(be.rightSidebarWidth),Ze=2,Je=[1,2,3],nt=10,dt=1440,ge=2097152,Se="http://www.w3.org/2000/svg",Be={excalidraw:2,excalidrawLibrary:2},Xe=5,lt=.7,it=11,yt={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},_t={LEFT:"left",CENTER:"center",RIGHT:"right"},ut=20,Tt=.25,Yt=32,Zt={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},Pt="__precedingElement__",en={architect:0,artist:1,cartoonist:2},tn={thin:1,bold:2,extraBold:4},ot={strokeColor:we.HO.black,backgroundColor:we.HO.transparent,fillStyle:"solid",strokeWidth:2,strokeStyle:"solid",roughness:en.artist,opacity:100,locked:!1},It="library",mt={name:"default",defaultTab:It},jt=new Set(["embeddable","image"])},4572:function(fe,Q,t){t.d(Q,{A3:function(){return m},ZC:function(){return he},R6:function(){return G}});var T=t(9787),j=t.n(T);const f=be=>{let we;const xe=new Set,ce=(S,z)=>{const A=typeof S=="function"?S(we):S;if(!Object.is(A,we)){const E=we;we=z??typeof A!="object"?A:Object.assign({},we,A),xe.forEach(L=>L(we,E))}},D=()=>we,ne={setState:ce,getState:D,subscribe:S=>(xe.add(S),()=>xe.delete(S)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),xe.clear()}};return we=be(ce,D,ne),ne},l=be=>be?f(be):f;var v=t(5668);const{useSyncExternalStoreWithSelector:k}=v,g=be=>{typeof be!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const we=typeof be=="function"?l(be):be,xe=(ce,D)=>function(ne,S=ne.getState,z){const A=k(ne.subscribe,ne.getState,ne.getServerState||ne.getState,S,z);return(0,T.useDebugValue)(A),A}(we,ce,D);return Object.assign(xe,we),xe},a=be=>be?g(be):g;var P,R;const K=typeof window<"u"&&((P=window.document)!=null&&P.createElement||((R=window.navigator)==null?void 0:R.product)==="ReactNative")?j().useLayoutEffect:j().useEffect;function U(){const be=a(we=>({current:new Array,version:0,set:we}));return{In:({children:we})=>{const xe=be(D=>D.set),ce=be(D=>D.version);return K(()=>{xe(D=>({version:D.version+1}))},[]),K(()=>(xe(({current:D})=>({current:[...D,we]})),()=>xe(({current:D})=>({current:D.filter(ne=>ne!==we)}))),[we,ce]),null},Out:()=>{const we=be(xe=>xe.current);return j().createElement(j().Fragment,null,we)}}}var m=j().createContext(null),G=function(){return j().useContext(m)},he=function(){return j().useMemo(function(){return{MainMenuTunnel:U(),WelcomeScreenMenuHintTunnel:U(),WelcomeScreenToolbarHintTunnel:U(),WelcomeScreenHelpHintTunnel:U(),WelcomeScreenCenterTunnel:U(),FooterCenterTunnel:U(),DefaultSidebarTriggerTunnel:U(),DefaultSidebarTabTriggersTunnel:U(),OverwriteConfirmDialogTunnel:U(),jotaiScope:Symbol()}},[])}},100:function(fe,Q,t){t.d(Q,{I:function(){return l},k:function(){return f}});var T=t(9787),j=t.n(T),f=j().createContext(null),l=function(){return j().useContext(f)}},7652:function(fe,Q,t){t.d(Q,{KJ:function(){return K},OF:function(){return U},Uk:function(){return m},z8:function(){return R}});var T,j,f=t(9937),l=t(5284),v=t(6853),k='<svg viewBox="0 0 24 24" stroke-width="1" width="28" height="28" xmlns="http://www.w3.org/2000/svg">',g='<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"/>',a="data:".concat(f.LO.svg,",").concat(encodeURIComponent("".concat(k).concat(g,"</svg>"))),P="data:".concat(f.LO.svg,",").concat(encodeURIComponent("".concat(k).concat('<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"/>').concat(g,"</svg>"))),R=function(G){G&&(G.style.cursor="")},K=function(G,he){G&&(G.style.cursor=he)},U=function(G,he){T&&T.theme===he||function(){var be=he===f.C6.DARK;(T=document.createElement("canvas")).theme=he,T.height=20,T.width=20;var we=T.getContext("2d");we.lineWidth=1,we.beginPath(),we.arc(T.width/2,T.height/2,5,0,2*Math.PI),we.fillStyle=be?l.black:l.white,we.fill(),we.strokeStyle=be?l.white:l.black,we.stroke(),j=T.toDataURL(f.LO.svg)}(),K(G,"url(".concat(j,") ").concat(10," ").concat(10,", auto"))},m=function(G,he){if(G)if(he.activeTool.type==="selection")R(G);else if((0,v.l$)(he))G.style.cursor=f.oc.GRAB;else if((0,v.EN)(he))U(G,he.theme);else if(he.activeTool.type==="laser"){var be=he.theme===f.C6.LIGHT?a:P;G.style.cursor="url(".concat(be,"), auto")}else["image","custom"].includes(he.activeTool.type)?he.activeTool.type!=="image"&&(G.style.cursor=f.oc.AUTO):G.style.cursor=f.oc.CROSSHAIR}},5796:function(fe,Q,t){t.d(Q,{DQ:function(){return S},KG:function(){return c},Pn:function(){return O},Qk:function(){return ne},Sf:function(){return p},Tu:function(){return w},Wr:function(){return A},ZY:function(){return E},_c:function(){return r},_p:function(){return $},bv:function(){return I},cT:function(){return L},g8:function(){return z},gY:function(){return q},lV:function(){return y},tW:function(){return M},vZ:function(){return pe},wf:function(){return h}});var T=t(1930),j=t(2577),f=t(7169),l=t(8950),v=t(2975),k=t.n(v),g=t(5605),a=t(6853),P=t(9937),R=t(7651),K=t(3506),U=t(8227),m=t(4105),G=t(9827),he=t(6548),be=t(4419),we=t(7994);function xe(te,ve){var ae=Object.keys(te);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(te);ve&&(H=H.filter(function(le){return Object.getOwnPropertyDescriptor(te,le).enumerable})),ae.push.apply(ae,H)}return ae}function ce(te){for(var ve=1;ve<arguments.length;ve++){var ae=arguments[ve]!=null?arguments[ve]:{};ve%2?xe(Object(ae),!0).forEach(function(H){(0,f.Z)(te,H,ae[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(te,Object.getOwnPropertyDescriptors(ae)):xe(Object(ae)).forEach(function(H){Object.defineProperty(te,H,Object.getOwnPropertyDescriptor(ae,H))})}return te}var D=function(){var te=(0,l.Z)(k().mark(function ve(ae){var H;return k().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(ae.type!==P.LO.png){le.next=18;break}return le.prev=1,le.next=4,Promise.resolve().then(t.bind(t,250));case 4:return le.next=6,le.sent.decodePngMetadata(ae);case 6:return le.abrupt("return",le.sent);case 9:if(le.prev=9,le.t0=le.catch(1),le.t0.message!=="INVALID"){le.next=15;break}throw new K.jk((0,U.t)("alerts.imageDoesNotContainScene"),"IMAGE_NOT_CONTAINS_SCENE_DATA");case 15:throw new K.jk((0,U.t)("alerts.cannotRestoreFromImage"));case 16:le.next=43;break;case 18:if(!("text"in Blob)){le.next=24;break}return le.next=21,ae.text();case 21:H=le.sent,le.next=27;break;case 24:return le.next=26,new Promise(function(ke){var Le=new FileReader;Le.readAsText(ae,"utf8"),Le.onloadend=function(){Le.readyState===FileReader.DONE&&ke(Le.result)}});case 26:H=le.sent;case 27:if(ae.type!==P.LO.svg){le.next=43;break}return le.prev=28,le.next=31,Promise.resolve().then(t.bind(t,250));case 31:return le.next=33,le.sent.decodeSvgMetadata({svg:H});case 33:return le.abrupt("return",le.sent);case 36:if(le.prev=36,le.t1=le.catch(28),le.t1.message!=="INVALID"){le.next=42;break}throw new K.jk((0,U.t)("alerts.imageDoesNotContainScene"),"IMAGE_NOT_CONTAINS_SCENE_DATA");case 42:throw new K.jk((0,U.t)("alerts.cannotRestoreFromImage"));case 43:return le.abrupt("return",H);case 44:case"end":return le.stop()}},ve,null,[[1,9],[28,36]])}));return function(ve){return te.apply(this,arguments)}}(),ne=function(te){var ve;return te&&((ve=te.name.match(/\.(json|excalidraw|png|svg)$/))===null||ve===void 0?void 0:ve[1])||null},S=function(te){return te==="png"||te==="svg"},z=function(te){var ve=ne(te);return ve==="png"||ve==="svg"},A=function(te){var ve=(te||{}).type;return!!ve&&Object.values(P.KL).includes(ve)},E=function(){var te=(0,l.Z)(k().mark(function ve(ae,H,le,ke){var Le,Ge;return k().wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.next=2,D(ae);case 2:Le=Ne.sent,Ne.prev=3,Ne.prev=4,Ge=JSON.parse(Le),Ne.next=13;break;case 8:if(Ne.prev=8,Ne.t0=Ne.catch(4),!A(ae)){Ne.next=12;break}throw new K.jk((0,U.t)("alerts.imageDoesNotContainScene"),"IMAGE_NOT_CONTAINS_SCENE_DATA");case 12:throw Ne.t0;case 13:if(!(0,be.dS)(Ge)){Ne.next=17;break}return Ne.abrupt("return",{type:P.LO.excalidraw,data:(0,we.nu)({elements:(0,R._M)(Ge.elements||[]),appState:ce(ce({theme:H==null?void 0:H.theme,fileHandle:ke||ae.handle||null},(0,a.s)(Ge.appState||{})),H?(0,m.W)(Ge.elements||[],H):{}),files:Ge.files},H,le,{repairBindings:!0,refreshDimensions:!1})});case 17:if(!(0,be.HT)(Ge)){Ne.next=19;break}return Ne.abrupt("return",{type:P.LO.excalidrawlib,data:Ge});case 19:case 26:throw new Error((0,U.t)("alerts.couldNotLoadInvalidFile"));case 22:if(Ne.prev=22,Ne.t1=Ne.catch(3),!(Ne.t1 instanceof K.jk)){Ne.next=26;break}throw Ne.t1;case 27:case"end":return Ne.stop()}},ve,null,[[3,22],[4,8]])}));return function(ve,ae,H,le){return te.apply(this,arguments)}}(),L=function(){var te=(0,l.Z)(k().mark(function ve(ae,H,le,ke){var Le;return k().wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return Ge.next=2,E(ae,H,le,ke);case 2:if((Le=Ge.sent).type===P.LO.excalidraw){Ge.next=5;break}throw new Error((0,U.t)("alerts.couldNotLoadInvalidFile"));case 5:return Ge.abrupt("return",Le.data);case 6:case"end":return Ge.stop()}},ve)}));return function(ve,ae,H,le){return te.apply(this,arguments)}}(),h=function(te){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"unpublished",ae=JSON.parse(te);if(!(0,be.HT)(ae))throw new Error("Invalid library");var H=ae.libraryItems||ae.library;return(0,we.wJ)(H,ve)},y=function(){var te=(0,l.Z)(k().mark(function ve(ae){var H,le=arguments;return k().wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return H=le.length>1&&le[1]!==void 0?le[1]:"unpublished",ke.t0=h,ke.next=4,D(ae);case 4:return ke.t1=ke.sent,ke.t2=H,ke.abrupt("return",(0,ke.t0)(ke.t1,ke.t2));case 7:case"end":return ke.stop()}},ve)}));return function(ve){return te.apply(this,arguments)}}(),r=function(){var te=(0,l.Z)(k().mark(function ve(ae){return k().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.abrupt("return",new Promise(function(){var le=(0,l.Z)(k().mark(function ke(Le,Ge){return k().wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:if(Ne.prev=0,!(0,G.y8)(ae)){Ne.next=5;break}return Ne.next=4,ae;case 4:ae=Ne.sent;case 5:ae.toBlob(function(Ce){if(!Ce)return Ge(new K.lp((0,U.t)("canvasError.canvasTooBig"),"CANVAS_POSSIBLY_TOO_BIG"));Le(Ce)}),Ne.next=11;break;case 8:Ne.prev=8,Ne.t0=Ne.catch(0),Ge(Ne.t0);case 11:case"end":return Ne.stop()}},ke,null,[[0,8]])}));return function(ke,Le){return le.apply(this,arguments)}}()));case 1:case"end":return H.stop()}},ve)}));return function(ve){return te.apply(this,arguments)}}(),M=function(){var te=(0,l.Z)(k().mark(function ve(ae){var H;return k().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return le.prev=0,le.t0=window.crypto.subtle,le.next=4,pe(ae);case 4:return le.t1=le.sent,le.next=7,le.t0.digest.call(le.t0,"SHA-1",le.t1);case 7:return H=le.sent,le.abrupt("return",(0,G.G3)(new Uint8Array(H)));case 11:return le.prev=11,le.t2=le.catch(0),console.error(le.t2),le.abrupt("return",(0,g.x0)(40));case 15:case"end":return le.stop()}},ve,null,[[0,11]])}));return function(ve){return te.apply(this,arguments)}}(),p=function(){var te=(0,l.Z)(k().mark(function ve(ae){return k().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.abrupt("return",new Promise(function(le,ke){var Le=new FileReader;Le.onload=function(){var Ge=Le.result;le(Ge)},Le.onerror=function(Ge){return ke(Ge)},Le.readAsDataURL(ae)}));case 1:case"end":return H.stop()}},ve)}));return function(ve){return te.apply(this,arguments)}}(),c=function(te){for(var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",ae=te.indexOf(","),H=atob(te.slice(ae+1)),le=te.slice(0,ae).split(":")[1].split(";")[0],ke=new ArrayBuffer(H.length),Le=new Uint8Array(ke),Ge=0;Ge<H.length;Ge++)Le[Ge]=H.charCodeAt(Ge);return new File([ke],ve,{type:le})},w=function(){var te=(0,l.Z)(k().mark(function ve(ae,H){var le,ke,Le,Ge,Ne,Ce;return k().wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:if(ae.type!==P.LO.svg){Oe.next=2;break}return Oe.abrupt("return",ae);case 2:return Oe.next=4,Promise.all([t.e(4736).then(t.t.bind(t,4881,23)).then(function(De){return De.default}),t.e(4736).then(t.bind(t,5446)).then(function(De){return De.default})]);case 4:if(le=Oe.sent,ke=(0,j.Z)(le,2),Le=ke[0],Ge=ke[1],Ne=Ge({pica:Le({features:["js","wasm"]})}),H.outputType&&(Ce=H.outputType,Ne._create_blob=function(De){return this.pica.toBlob(De.out_canvas,Ce,.8).then(function(Ae){return De.out_blob=Ae,De})}),A(ae)){Oe.next=12;break}throw new Error((0,U.t)("errors.unsupportedFileType"));case 12:return Oe.t0=File,Oe.next=15,Ne.toBlob(ae,{max:H.maxWidthOrHeight});case 15:return Oe.t1=Oe.sent,Oe.t2=[Oe.t1],Oe.t3=ae.name,Oe.t4={type:H.outputType||ae.type},Oe.abrupt("return",new Oe.t0(Oe.t2,Oe.t3,Oe.t4));case 20:case"end":return Oe.stop()}},ve)}));return function(ve,ae){return te.apply(this,arguments)}}(),O=function(te){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return new File([new TextEncoder().encode(te)],ve,{type:P.LO.svg})},$=function(){var te=(0,l.Z)(k().mark(function ve(ae){var H,le,ke,Le,Ge=arguments;return k().wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return H=Ge.length>1&&Ge[1]!==void 0?Ge[1]:"",Ne.prev=1,Ne.next=4,fetch(ae);case 4:le=Ne.sent,Ne.next=10;break;case 7:throw Ne.prev=7,Ne.t0=Ne.catch(1),new Error((0,U.t)("errors.failedToFetchImage"));case 10:if(le.ok){Ne.next=12;break}throw new Error((0,U.t)("errors.failedToFetchImage"));case 12:return Ne.next=14,le.blob();case 14:if(!(ke=Ne.sent).type||!A(ke)){Ne.next=18;break}return Le=H||ke.name||"",Ne.abrupt("return",new File([ke],Le,{type:ke.type}));case 18:throw new Error((0,U.t)("errors.unsupportedFileType"));case 19:case"end":return Ne.stop()}},ve,null,[[1,7]])}));return function(ve){return te.apply(this,arguments)}}(),I=function(){var te=(0,l.Z)(k().mark(function ve(ae){var H,le;return k().wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return H=ae.dataTransfer.files.item(0),ke.next=3,C(ae);case 3:if(le=ke.sent,!H){ke.next=10;break}return ke.next=7,q(H);case 7:ke.t0=ke.sent,ke.next=11;break;case 10:ke.t0=null;case 11:return ke.t1=ke.t0,ke.t2=le,ke.abrupt("return",{file:ke.t1,fileHandle:ke.t2});case 14:case"end":return ke.stop()}},ve)}));return function(ve){return te.apply(this,arguments)}}(),C=function(){var te=(0,l.Z)(k().mark(function ve(ae){var H,le;return k().wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:if(!he.kr){ke.next=16;break}return ke.prev=1,H=ae.dataTransfer.items[0],ke.next=5,H.getAsFileSystemHandle();case 5:if(ke.t0=ke.sent,ke.t0){ke.next=8;break}ke.t0=null;case 8:return le=ke.t0,ke.abrupt("return",le);case 12:return ke.prev=12,ke.t1=ke.catch(1),console.warn(ke.t1.name,ke.t1.message),ke.abrupt("return",null);case 16:return ke.abrupt("return",null);case 17:case"end":return ke.stop()}},ve,null,[[1,12]])}));return function(ve){return te.apply(this,arguments)}}(),_=function(te){var ve=null,ae="".concat((0,T.Z)(new Uint8Array(te).slice(0,8)).join(" ")," "),H="255 216 255 ",le="71 73 70 56 57 97 ";return ae==="137 80 78 71 13 10 26 10 "?ve=P.LO.png:ae.startsWith(H)?ve=P.LO.jpg:ae.startsWith(le)&&(ve=P.LO.gif),ve},N=function(te,ve,ae){return new File([te],ae||"",{type:ve})},q=function(){var te=(0,l.Z)(k().mark(function ve(ae){var H,le,ke,Le,Ge,Ne,Ce,Oe;return k().wrap(function(De){for(;;)switch(De.prev=De.next){case 0:if(ae.type){De.next=28;break}if((H=ae)===null||H===void 0||(le=H.name)===null||le===void 0||!le.endsWith(".excalidrawlib")){De.next=11;break}return De.t0=N,De.next=5,pe(ae);case 5:De.t1=De.sent,De.t2=P.LO.excalidrawlib,De.t3=ae.name,ae=(0,De.t0)(De.t1,De.t2,De.t3),De.next=26;break;case 11:if((ke=ae)===null||ke===void 0||(Le=ke.name)===null||Le===void 0||!Le.endsWith(".excalidraw")){De.next=21;break}return De.t4=N,De.next=15,pe(ae);case 15:De.t5=De.sent,De.t6=P.LO.excalidraw,De.t7=ae.name,ae=(0,De.t4)(De.t5,De.t6,De.t7),De.next=26;break;case 21:return De.next=23,pe(ae);case 23:Ge=De.sent,(Ne=_(Ge))&&(ae=N(Ge,Ne,ae.name));case 26:De.next=34;break;case 28:if(!A(ae)){De.next=34;break}return De.next=31,pe(ae);case 31:Ce=De.sent,(Oe=_(Ce))&&Oe!==ae.type&&(ae=N(Ce,Oe,ae.name));case 34:return De.abrupt("return",ae);case 35:case"end":return De.stop()}},ve)}));return function(ve){return te.apply(this,arguments)}}(),pe=function(te){return"arrayBuffer"in te?te.arrayBuffer():new Promise(function(ve,ae){var H=new FileReader;H.onload=function(le){var ke;if((ke=le.target)===null||ke===void 0||!ke.result)return ae(new Error("Couldn't convert blob to ArrayBuffer"));ve(le.target.result)},H.readAsArrayBuffer(te)})}},6548:function(fe,Q,t){t.d(Q,{I$:function(){return U},NL:function(){return m},kr:function(){return l}});var T=t(1930),j=t(8950),f=t(2975),l=function(){if(typeof self>"u")return!1;if("top"in self&&self!==top)try{}catch{return!1}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1}(),v=l?t.e(4736).then(t.bind(t,7464)):t.e(4736).then(t.bind(t,3948));function k(){return k=(0,j.Z)(f.mark(function G(){var he,be=arguments;return f.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:return we.next=2,v;case 2:return we.abrupt("return",(he=we.sent).default.apply(he,be));case 3:case"end":return we.stop()}},G)})),k.apply(this,arguments)}l?t.e(4736).then(t.bind(t,4036)):t.e(4736).then(t.bind(t,7693));var g=l?t.e(4736).then(t.bind(t,357)):t.e(4736).then(t.bind(t,341));function a(){return a=(0,j.Z)(f.mark(function G(){var he,be=arguments;return f.wrap(function(we){for(;;)switch(we.prev=we.next){case 0:return we.next=2,g;case 2:return we.abrupt("return",(he=we.sent).default.apply(he,be));case 3:case"end":return we.stop()}},G)})),a.apply(this,arguments)}var P=t(9937),R=t(3506),K=t(9827),U=function(G){var he,be,we,xe=(he=G.extensions)===null||he===void 0?void 0:he.reduce(function(D,ne){return D.push(P.LO[ne]),D},[]),ce=(be=G.extensions)===null||be===void 0?void 0:be.reduce(function(D,ne){return ne==="jpg"?D.concat(".jpg",".jpeg"):D.concat(".".concat(ne))},[]);return function(){return k.apply(this,arguments)}({description:G.description,extensions:ce,mimeTypes:xe,multiple:(we=G.multiple)!==null&&we!==void 0&&we,legacySetup:function(D,ne,S){var z=(0,K.Ds)(ne,500),A=function(){E(),document.addEventListener(P.Ks.KEYUP,z),document.addEventListener(P.Ks.POINTER_UP,z),z()},E=function(){var h;if((h=S.files)!==null&&h!==void 0&&h.length){var y=G.multiple?(0,T.Z)(S.files):S.files[0];D(y)}};requestAnimationFrame(function(){window.addEventListener(P.Ks.FOCUS,A)});var L=window.setInterval(function(){E()},500);return function(h){clearInterval(L),z.cancel(),window.removeEventListener(P.Ks.FOCUS,A),document.removeEventListener(P.Ks.KEYUP,z),document.removeEventListener(P.Ks.POINTER_UP,z),h&&(console.warn("Opening the file was canceled (legacy-fs)."),h(new R._L))}}})},m=function(G,he){return function(){return a.apply(this,arguments)}(G,{fileName:"".concat(he.name,".").concat(he.extension),description:he.description,extensions:[".".concat(he.extension)]},he.fileHandle)}},250:function(fe,Q,t){t.r(Q),t.d(Q,{decodePngMetadata:function(){return ne},decodeSvgMetadata:function(){return z},encodePngMetadata:function(){return D},encodeSvgMetadata:function(){return S},getTEXtChunk:function(){return ce}});var T=t(8950),j=t(2975),f=t.n(j),l=t(2983),v=t.n(l),k=t(1194),g=t(3434),a=t.n(g),P=t(2744),R=t(9937),K=t(5796),U=function(A){return new Promise(function(E,L){var h=typeof A=="string"?new Blob([new TextEncoder().encode(A)]):new Blob([A instanceof Uint8Array?A:new Uint8Array(A)]),y=new FileReader;y.onload=function(r){if(!r.target||typeof r.target.result!="string")return L(new Error("couldn't convert to byte string"));E(r.target.result)},y.readAsBinaryString(h)})},m=function(A){for(var E=new ArrayBuffer(A.length),L=new Uint8Array(E),h=0,y=A.length;h<y;h++)L[h]=A.charCodeAt(h);return E},G=function(A){return new TextDecoder("utf-8").decode(m(A))},he=function(){var A=(0,T.Z)(f().mark(function E(L){var h=arguments;return f().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:if(!(h.length>1&&h[1]!==void 0&&h[1])){y.next=5;break}y.t0=window.btoa(L),y.next=10;break;case 5:return y.t1=window,y.next=8,U(L);case 8:y.t2=y.sent,y.t0=y.t1.btoa.call(y.t1,y.t2);case 10:return y.abrupt("return",y.t0);case 11:case"end":return y.stop()}},E)}));return function(E){return A.apply(this,arguments)}}(),be=function(){var A=(0,T.Z)(f().mark(function E(L){var h,y=arguments;return f().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return h=y.length>1&&y[1]!==void 0&&y[1],r.abrupt("return",h?window.atob(L):G(window.atob(L)));case 2:case"end":return r.stop()}},E)}));return function(E){return A.apply(this,arguments)}}(),we=function(){var A=(0,T.Z)(f().mark(function E(L){var h,y;return f().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(h=L.text,L.compress===!1){r.next=11;break}return r.prev=2,r.next=5,U((0,P.deflate)(h));case 5:y=r.sent,r.next=11;break;case 8:r.prev=8,r.t0=r.catch(2),console.error("encode: cannot deflate",r.t0);case 11:if(r.t1=!!y,r.t2=y,r.t2){r.next=17;break}return r.next=16,U(h);case 16:r.t2=r.sent;case 17:return r.t3=r.t2,r.abrupt("return",{version:"1",encoding:"bstring",compressed:r.t1,encoded:r.t3});case 19:case"end":return r.stop()}},E,null,[[2,8]])}));return function(E){return A.apply(this,arguments)}}(),xe=function(){var A=(0,T.Z)(f().mark(function E(L){var h;return f().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:y.t0=L.encoding,y.next=y.t0==="bstring"?3:12;break;case 3:if(!L.compressed){y.next=7;break}y.t1=L.encoded,y.next=10;break;case 7:return y.next=9,G(L.encoded);case 9:y.t1=y.sent;case 10:return h=y.t1,y.abrupt("break",13);case 12:throw new Error('decode: unknown encoding "'.concat(L.encoding,'"'));case 13:if(!L.compressed){y.next=15;break}return y.abrupt("return",(0,P.inflate)(new Uint8Array(m(h)),{to:"string"}));case 15:return y.abrupt("return",h);case 16:case"end":return y.stop()}},E)}));return function(E){return A.apply(this,arguments)}}(),ce=function(){var A=(0,T.Z)(f().mark(function E(L){var h,y;return f().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=v(),r.t1=Uint8Array,r.next=4,(0,K.vZ)(L);case 4:if(r.t2=r.sent,r.t3=new r.t1(r.t2),h=(0,r.t0)(r.t3),!(y=h.find(function(M){return M.name==="tEXt"}))){r.next=10;break}return r.abrupt("return",k.decode(y.data));case 10:return r.abrupt("return",null);case 11:case"end":return r.stop()}},E)}));return function(E){return A.apply(this,arguments)}}(),D=function(){var A=(0,T.Z)(f().mark(function E(L){var h,y,r,M;return f().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return h=L.blob,y=L.metadata,p.t0=v(),p.t1=Uint8Array,p.next=5,(0,K.vZ)(h);case 5:return p.t2=p.sent,p.t3=new p.t1(p.t2),r=(0,p.t0)(p.t3),p.t4=k,p.t5=R.LO.excalidraw,p.t6=JSON,p.next=13,we({text:y,compress:!0});case 13:return p.t7=p.sent,p.t8=p.t6.stringify.call(p.t6,p.t7),M=p.t4.encode.call(p.t4,p.t5,p.t8),r.splice(-1,0,M),p.abrupt("return",new Blob([a()(r)],{type:R.LO.png}));case 18:case"end":return p.stop()}},E)}));return function(E){return A.apply(this,arguments)}}(),ne=function(){var A=(0,T.Z)(f().mark(function E(L){var h,y;return f().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,ce(L);case 2:if(((h=r.sent)==null?void 0:h.keyword)!==R.LO.excalidraw){r.next=19;break}if(r.prev=4,"encoded"in(y=JSON.parse(h.text))){r.next=10;break}if(!("type"in y)||y.type!==R.r8.excalidraw){r.next=9;break}return r.abrupt("return",h.text);case 9:throw new Error("FAILED");case 10:return r.next=12,xe(y);case 12:return r.abrupt("return",r.sent);case 15:throw r.prev=15,r.t0=r.catch(4),console.error(r.t0),new Error("FAILED");case 19:throw new Error("INVALID");case 20:case"end":return r.stop()}},E,null,[[4,15]])}));return function(E){return A.apply(this,arguments)}}(),S=function(){var A=(0,T.Z)(f().mark(function E(L){var h,y,r;return f().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return h=L.text,M.t0=he,M.t1=JSON,M.next=5,we({text:h});case 5:return M.t2=M.sent,M.t3=M.t1.stringify.call(M.t1,M.t2),M.next=9,(0,M.t0)(M.t3,!0);case 9:return y=M.sent,r="",r+="<!-- payload-type:".concat(R.LO.excalidraw," -->"),r+="<!-- payload-version:2 -->",r+="<!-- payload-start -->",r+=y,r+="<!-- payload-end -->",M.abrupt("return",r);case 17:case"end":return M.stop()}},E)}));return function(E){return A.apply(this,arguments)}}(),z=function(){var A=(0,T.Z)(f().mark(function E(L){var h,y,r,M,p,c,w;return f().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:if(!(h=L.svg).includes("payload-type:".concat(R.LO.excalidraw))){O.next=26;break}if(y=h.match(/<!-- payload-start -->\s*(.+?)\s*<!-- payload-end -->/)){O.next=5;break}throw new Error("INVALID");case 5:return r=h.match(/<!-- payload-version:(\d+) -->/),M=(r==null?void 0:r[1])||"1",p=M!=="1",O.prev=8,O.next=11,be(y[1],p);case 11:if(c=O.sent,"encoded"in(w=JSON.parse(c))){O.next=17;break}if(!("type"in w)||w.type!==R.r8.excalidraw){O.next=16;break}return O.abrupt("return",c);case 16:throw new Error("FAILED");case 17:return O.next=19,xe(w);case 19:return O.abrupt("return",O.sent);case 22:throw O.prev=22,O.t0=O.catch(8),console.error(O.t0),new Error("FAILED");case 26:throw new Error("INVALID");case 27:case"end":return O.stop()}},E,null,[[8,22]])}));return function(E){return A.apply(this,arguments)}}()},2435:function(fe,Q,t){t.d(Q,{HD:function(){return he},Um:function(){return G.Um},cT:function(){return U.cT},n8:function(){return G.n8},p1:function(){return be}});var T=t(8950),j=t(2975),f=t.n(j),l=t(4694),v=t(9937),k=t(7651),g=t(8227),a=t(6013),P=t(4105),R=t(3668),K=t(9827),U=t(5796),m=t(6548),G=t(4419),he=function(we,xe,ce){var D=xe.selectedElementIds;we=(0,k.Lm)(we);var ne=ce&&(0,P.N)(we,{selectedElementIds:D}),S=null,z=ne?(0,P.eD)(we,{selectedElementIds:D},{includeBoundTextElement:!0}):we;return ne&&(z.length===1&&(0,k.He)(z[0])?(S=z[0],z=(0,a.Xs)({elements:we,bounds:S,type:"overlap"})):z.length>1&&(z=(0,P.eD)(we,{selectedElementIds:D},{includeBoundTextElement:!0,includeElementsInFrames:!0}))),{exportingFrame:S,exportedElements:(0,K.xU)(z)}},be=function(){var we=(0,T.Z)(f().mark(function xe(ce,D,ne,S,z){var A,E,L,h,y,r,M,p,c,w,O,$,I;return f().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(A=z.exportBackground,E=z.exportPadding,L=E===void 0?v.qy:E,h=z.viewBackgroundColor,y=z.name,r=z.fileHandle,M=r===void 0?null:r,p=z.exportingFrame,c=p===void 0?null:p,D.length!==0){C.next=3;break}throw new Error((0,g.t)("alerts.cannotExportEmptyCanvas"));case 3:if(ce!=="svg"&&ce!=="clipboard-svg"){C.next=17;break}return C.next=6,(0,R.$D)(D,{exportBackground:A,exportWithDarkMode:ne.exportWithDarkMode,viewBackgroundColor:h,exportPadding:L,exportScale:ne.exportScale,exportEmbedScene:ne.exportEmbedScene&&ce==="svg"},S,{exportingFrame:c});case 6:if(w=C.sent,ce!=="svg"){C.next=13;break}return C.next=10,(0,m.NL)(new Blob([w.outerHTML],{type:v.LO.svg}),{description:"Export to SVG",name:y,extension:ne.exportEmbedScene?"excalidraw.svg":"svg",fileHandle:M});case 10:return C.abrupt("return",C.sent);case 13:if(ce!=="clipboard-svg"){C.next=17;break}return C.next=16,(0,l.dd)(w.outerHTML);case 16:return C.abrupt("return");case 17:if(O=(0,R.NL)(D,ne,S,{exportBackground:A,viewBackgroundColor:h,exportPadding:L,exportingFrame:c}),ce!=="png"){C.next=33;break}return C.next=21,(0,U._c)(O);case 21:if($=C.sent,!ne.exportEmbedScene){C.next=28;break}return C.next=25,Promise.resolve().then(t.bind(t,250));case 25:return C.next=27,C.sent.encodePngMetadata({blob:$,metadata:(0,G.I_)(D,ne,S,"local")});case 27:$=C.sent;case 28:return C.next=30,(0,m.NL)($,{description:"Export to PNG",name:y,extension:"png",fileHandle:M});case 30:return C.abrupt("return",C.sent);case 33:if(ce!=="clipboard"){C.next=52;break}return C.prev=34,I=(0,U._c)(O),C.next=38,(0,l.uR)(I);case 38:C.next=50;break;case 40:if(C.prev=40,C.t0=C.catch(34),console.warn(C.t0),C.t0.name!=="CANVAS_POSSIBLY_TOO_BIG"){C.next=45;break}throw C.t0;case 45:if(!v.vU||C.t0.name!=="TypeError"){C.next=49;break}throw new Error("".concat((0,g.t)("alerts.couldNotCopyToClipboard"),`
|
|
111
|
+
|
|
112
|
+
`).concat((0,g.t)("hints.firefox_clipboard_write")));case 49:throw new Error((0,g.t)("alerts.couldNotCopyToClipboard"));case 50:C.next=53;break;case 52:throw new Error("Unsupported export type");case 53:case"end":return C.stop()}},xe,null,[[34,40]])}));return function(xe,ce,D,ne,S){return we.apply(this,arguments)}}()},4419:function(fe,Q,t){t.d(Q,{HT:function(){return we},I_:function(){return m},NI:function(){return xe},Um:function(){return G},dS:function(){return be},n8:function(){return he},t1:function(){return ce}});var T=t(6655),j=t(8950),f=t(2975),l=t.n(f),v=t(6548),k=t(6853),g=t(9937),a=t(7651),P=t(5796);function R(D,ne){var S=typeof Symbol<"u"&&D[Symbol.iterator]||D["@@iterator"];if(!S){if(Array.isArray(D)||(S=function(y,r){if(y){if(typeof y=="string")return K(y,r);var M=Object.prototype.toString.call(y).slice(8,-1);if(M==="Object"&&y.constructor&&(M=y.constructor.name),M==="Map"||M==="Set")return Array.from(y);if(M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M))return K(y,r)}}(D))||ne){S&&(D=S);var z=0,A=function(){};return{s:A,n:function(){return z>=D.length?{done:!0}:{done:!1,value:D[z++]}},e:function(y){throw y},f:A}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
113
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var E,L=!0,h=!1;return{s:function(){S=S.call(D)},n:function(){var y=S.next();return L=y.done,y},e:function(y){h=!0,E=y},f:function(){try{L||S.return==null||S.return()}finally{if(h)throw E}}}}function K(D,ne){(ne==null||ne>D.length)&&(ne=D.length);for(var S=0,z=new Array(ne);S<ne;S++)z[S]=D[S];return z}var U=function(D,ne){var S,z={},A=R(D);try{for(A.s();!(S=A.n()).done;){var E=S.value;!E.isDeleted&&"fileId"in E&&E.fileId&&ne[E.fileId]&&(z[E.fileId]=ne[E.fileId])}}catch(L){A.e(L)}finally{A.f()}return z},m=function(D,ne,S,z){var A={type:g.r8.excalidraw,version:g.Kr.excalidraw,source:g.pb,elements:z==="local"?(0,a._M)(D):(0,a.BQ)(D),appState:z==="local"?(0,k.s)(ne):(0,k.eS)(ne),files:z==="local"?U(D,S):void 0};return JSON.stringify(A,null,2)},G=function(){var D=(0,j.Z)(l().mark(function ne(S,z,A){var E,L,h;return l().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return E=m(S,z,A,"local"),L=new Blob([E],{type:g.LO.excalidraw}),y.next=4,(0,v.NL)(L,{name:z.name,extension:"excalidraw",description:"Excalidraw file",fileHandle:(0,P.g8)(z.fileHandle)?null:z.fileHandle});case 4:return h=y.sent,y.abrupt("return",{fileHandle:h});case 6:case"end":return y.stop()}},ne)}));return function(ne,S,z){return D.apply(this,arguments)}}(),he=function(){var D=(0,j.Z)(l().mark(function ne(S,z){var A;return l().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,(0,v.I$)({description:"Excalidraw files"});case 2:return A=E.sent,E.t0=P.cT,E.next=6,(0,P.gY)(A);case 6:return E.t1=E.sent,E.t2=S,E.t3=z,E.t4=A.handle,E.abrupt("return",(0,E.t0)(E.t1,E.t2,E.t3,E.t4));case 11:case"end":return E.stop()}},ne)}));return function(ne,S){return D.apply(this,arguments)}}(),be=function(D){return(D==null?void 0:D.type)===g.r8.excalidraw&&(!D.elements||Array.isArray(D.elements)&&(!D.appState||(0,T.Z)(D.appState)==="object"))},we=function(D){return(0,T.Z)(D)==="object"&&D&&D.type===g.r8.excalidrawLibrary&&(D.version===1||D.version===2)},xe=function(D){var ne={type:g.r8.excalidrawLibrary,version:g.Kr.excalidrawLibrary,source:g.pb,libraryItems:D};return JSON.stringify(ne,null,2)},ce=function(){var D=(0,j.Z)(l().mark(function ne(S){var z;return l().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return z=xe(S),A.next=3,(0,v.NL)(new Blob([z],{type:g.LO.excalidrawlib}),{name:"library",extension:"excalidrawlib",description:"Excalidraw library file"});case 3:case"end":return A.stop()}},ne)}));return function(ne){return D.apply(this,arguments)}}()},9326:function(fe,Q,t){t.d(Q,{Di:function(){return r},WV:function(){return y},rF:function(){return z},xS:function(){return M},zh:function(){return L}});var T=t(7169),j=t(8950),f=t(5169),l=t(8821),v=t(1930),k=t(2975),g=t.n(k),a=t(5796),P=t(7994),R=t(3607),K=t(453),U=t(4949),m=t(3506),G=t(8227),he=t(9787),be=t(9937),we=t(5832),xe=t(9827);function ce(p,c){var w=Object.keys(p);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(p);c&&(O=O.filter(function($){return Object.getOwnPropertyDescriptor(p,$).enumerable})),w.push.apply(w,O)}return w}function D(p){for(var c=1;c<arguments.length;c++){var w=arguments[c]!=null?arguments[c]:{};c%2?ce(Object(w),!0).forEach(function(O){(0,T.Z)(p,O,w[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(w)):ce(Object(w)).forEach(function(O){Object.defineProperty(p,O,Object.getOwnPropertyDescriptor(w,O))})}return p}function ne(p,c){var w=typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(!w){if(Array.isArray(p)||(w=function(N,q){if(N){if(typeof N=="string")return S(N,q);var pe=Object.prototype.toString.call(N).slice(8,-1);if(pe==="Object"&&N.constructor&&(pe=N.constructor.name),pe==="Map"||pe==="Set")return Array.from(N);if(pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pe))return S(N,q)}}(p))||c){w&&(p=w);var O=0,$=function(){};return{s:$,n:function(){return O>=p.length?{done:!0}:{done:!1,value:p[O++]}},e:function(N){throw N},f:$}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
114
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var I,C=!0,_=!1;return{s:function(){w=w.call(p)},n:function(){var N=w.next();return C=N.done,N},e:function(N){_=!0,I=N},f:function(){try{C||w.return==null||w.return()}finally{if(_)throw I}}}}function S(p,c){(c==null||c>p.length)&&(c=p.length);for(var w=0,O=new Array(c);w<c;w++)O[w]=p[w];return O}var z=(0,R.cn)({status:"loaded",isInitialized:!0,libraryItems:[]}),A=function(p){return(0,xe.xU)(p)},E=function(p,c){return!p.find(function(w){return w.elements.length===c.elements.length&&w.elements.every(function(O,$){return O.id===c.elements[$].id&&O.versionNonce===c.elements[$].versionNonce})})},L=function(p,c){var w,O=[],$=ne(c);try{for($.s();!(w=$.n()).done;){var I=w.value;E(p,I)&&O.push(I)}}catch(C){$.e(C)}finally{$.f()}return[].concat(O,(0,v.Z)(p))},h=(0,f.Z)(function p(c){var w=this;(0,l.Z)(this,p),this.lastLibraryItems=[],this.isInitialized=!1,this.updateQueue=[],this.getLastUpdateTask=function(){return w.updateQueue[w.updateQueue.length-1]},this.notifyListeners=function(){if(w.updateQueue.length>0)K.e_.set(z,{status:"loading",libraryItems:w.lastLibraryItems,isInitialized:w.isInitialized});else{w.isInitialized=!0,K.e_.set(z,{status:"loaded",libraryItems:w.lastLibraryItems,isInitialized:w.isInitialized});try{var O,$;(O=($=w.app.props).onLibraryChange)===null||O===void 0||O.call($,A(w.lastLibraryItems))}catch(I){console.error(I)}}},this.destroy=function(){w.isInitialized=!1,w.updateQueue=[],w.lastLibraryItems=[],K.e_.set(we.YX,new Map)},this.resetLibrary=function(){return w.setLibrary([])},this.getLatestLibrary=function(){return new Promise(function(){var O=(0,j.Z)(g().mark(function $(I){var C;return g().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.prev=0,_.next=3,w.getLastUpdateTask()||w.lastLibraryItems;case 3:C=_.sent,w.updateQueue.length>0?I(w.getLatestLibrary()):I(A(C)),_.next=10;break;case 7:return _.prev=7,_.t0=_.catch(0),_.abrupt("return",I(w.lastLibraryItems));case 10:case"end":return _.stop()}},$,null,[[0,7]])}));return function($){return O.apply(this,arguments)}}())},this.updateLibrary=function(){var O=(0,j.Z)(g().mark(function $(I){var C,_,N,q,pe,te,ve,ae,H;return g().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return C=I.libraryItems,_=I.prompt,N=_!==void 0&&_,q=I.merge,pe=q!==void 0&&q,te=I.openLibraryMenu,ve=te!==void 0&&te,ae=I.defaultStatus,H=ae===void 0?"unpublished":ae,ve&&w.app.setState({openSidebar:{name:be.Cc.name,tab:be.tf}}),le.abrupt("return",w.setLibrary(function(){return new Promise(function(){var ke=(0,j.Z)(g().mark(function Le(Ge,Ne){var Ce,Oe;return g().wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.prev=0,De.next=3,typeof C!="function"||C instanceof Blob?C:C(w.lastLibraryItems);case 3:if(!((Ce=De.sent)instanceof Blob)){De.next=10;break}return De.next=7,(0,a.lV)(Ce,H);case 7:Oe=De.sent,De.next=11;break;case 10:Oe=(0,P.wJ)(Ce,H);case 11:!N||window.confirm((0,G.t)("alerts.confirmAddLibrary",{numShapes:Oe.length}))?(N&&w.app.focusContainer(),Ge(pe?L(w.lastLibraryItems,Oe):Oe)):Ne(new m._L),De.next=17;break;case 14:De.prev=14,De.t0=De.catch(0),Ne(De.t0);case 17:case"end":return De.stop()}},Le,null,[[0,14]])}));return function(Le,Ge){return ke.apply(this,arguments)}}())}));case 3:case"end":return le.stop()}},$)}));return function($){return O.apply(this,arguments)}}(),this.setLibrary=function(O){var $=new Promise(function(){var I=(0,j.Z)(g().mark(function C(_,N){return g().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.prev=0,q.next=3,w.getLastUpdateTask();case 3:return typeof O=="function"&&(O=O(w.lastLibraryItems)),q.t0=A,q.next=7,O;case 7:q.t1=q.sent,w.lastLibraryItems=(0,q.t0)(q.t1),_(w.lastLibraryItems),q.next=15;break;case 12:q.prev=12,q.t2=q.catch(0),N(q.t2);case 15:case"end":return q.stop()}},C,null,[[0,12]])}));return function(C,_){return I.apply(this,arguments)}}()).catch(function(I){if(I.name==="AbortError")return console.warn("Library update aborted by user"),w.lastLibraryItems;throw I}).finally(function(){w.updateQueue=w.updateQueue.filter(function(I){return I!==$}),w.notifyListeners()});return w.updateQueue.push($),w.notifyListeners(),$},this.app=c});Q.ZP=h;var y=function(p){var c,w=Math.ceil(Math.sqrt(p.length)),O=[],$=0,I=0,C=0,_=0,N=0,q=0,pe=0,te=ne(p);try{var ve=function(){var ae=c.value;N&&N%w==0&&(I+=C+50,$=0,q=0,pe++),q===0&&(C=function(Oe){return p.slice(Oe*w,Oe*w+w).reduce(function(De,Ae){var ie=(0,U.v2)(Ae.elements).height;return Math.max(De,ie)},0)}(pe)),_=function(Oe){var De,Ae=0,ie=0,Ie=0,oe=ne(p);try{for(oe.s();!(De=oe.n()).done;){var s=De.value;if(Ae%w==0&&(ie=0),ie===Oe){var u=(0,U.v2)(s.elements).width;Ie=Math.max(Ie,u)}Ae++,ie++}}catch(x){oe.e(x)}finally{oe.f()}return Ie}(q);var H=(0,U.v2)(ae.elements),le=H.minX,ke=H.minY,Le=H.width,Ge=H.height,Ne=(_-Le)/2,Ce=(C-Ge)/2;O.push.apply(O,(0,v.Z)(ae.elements.map(function(Oe){return D(D({},Oe),{},{x:Oe.x+$+Ne-le,y:Oe.y+I+Ce-ke})}))),$+=_+50,N++,q++};for(te.s();!(c=te.n()).done;)ve()}catch(ae){te.e(ae)}finally{te.f()}return O},r=function(){var p=new URLSearchParams(window.location.hash.slice(1)).get(be.ah.addLibrary)||new URLSearchParams(window.location.search).get(be.UO.addLibrary),c=p?new URLSearchParams(window.location.hash.slice(1)).get("token"):null;return p?{libraryUrl:p,idToken:c}:null},M=function(p){var c=p.excalidrawAPI,w=p.getInitialLibraryItems,O=(0,he.useRef)(w);(0,he.useEffect)(function(){if(c){var $=function(){var _=(0,j.Z)(g().mark(function N(q){var pe,te,ve,ae,H,le;return g().wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return pe=q.libraryUrl,te=q.idToken,ve=new Promise(function(){var Le=(0,j.Z)(g().mark(function Ge(Ne,Ce){var Oe,De;return g().wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return Ae.prev=0,Ae.next=3,fetch(decodeURIComponent(pe));case 3:return Oe=Ae.sent,Ae.next=6,Oe.blob();case 6:De=Ae.sent,Ne(De),Ae.next=13;break;case 10:Ae.prev=10,Ae.t0=Ae.catch(0),Ce(Ae.t0);case 13:case"end":return Ae.stop()}},Ge,null,[[0,10]])}));return function(Ge,Ne){return Le.apply(this,arguments)}}()),ae=te!==c.id,ke.next=5,ae&&document.hidden?new Promise(function(Le){window.addEventListener("focus",function(){return Le()},{once:!0})}):null;case 5:return ke.prev=5,ke.next=8,c.updateLibrary({libraryItems:ve,prompt:ae,merge:!0,defaultStatus:"published",openLibraryMenu:!0});case 8:ke.next=13;break;case 10:throw ke.prev=10,ke.t0=ke.catch(5),ke.t0;case 13:return ke.prev=13,window.location.hash.includes(be.ah.addLibrary)?((H=new URLSearchParams(window.location.hash.slice(1))).delete(be.ah.addLibrary),window.history.replaceState({},be.iC,"#".concat(H.toString()))):window.location.search.includes(be.UO.addLibrary)&&((le=new URLSearchParams(window.location.search)).delete(be.UO.addLibrary),window.history.replaceState({},be.iC,"?".concat(le.toString()))),ke.finish(13);case 16:case"end":return ke.stop()}},N,null,[[5,10,13,16]])}));return function(N){return _.apply(this,arguments)}}(),I=function(_){_.preventDefault();var N=r();N&&(_.stopImmediatePropagation(),window.history.replaceState({},"",_.oldURL),$(N))};O.current&&c.updateLibrary({libraryItems:O.current()});var C=r();return C&&$(C),window.addEventListener(be.Ks.HASHCHANGE,I),function(){window.removeEventListener(be.Ks.HASHCHANGE,I)}}},[c])}},7994:function(fe,Q,t){t.d(Q,{ET:function(){return A},lY:function(){return h},nu:function(){return y},wJ:function(){return M}});var T=t(2577),j=t(7169),f=t(7651),l=t(4183),v=t(4643),k=t(9937),g=t(6853),a=t(7422),P=t(583),R=t(9827),K=t(4761),U=t(8020);function m(p,c){var w=typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(!w){if(Array.isArray(p)||(w=function(N,q){if(N){if(typeof N=="string")return G(N,q);var pe=Object.prototype.toString.call(N).slice(8,-1);if(pe==="Object"&&N.constructor&&(pe=N.constructor.name),pe==="Map"||pe==="Set")return Array.from(N);if(pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pe))return G(N,q)}}(p))||c){w&&(p=w);var O=0,$=function(){};return{s:$,n:function(){return O>=p.length?{done:!0}:{done:!1,value:p[O++]}},e:function(N){throw N},f:$}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
115
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var I,C=!0,_=!1;return{s:function(){w=w.call(p)},n:function(){var N=w.next();return C=N.done,N},e:function(N){_=!0,I=N},f:function(){try{C||w.return==null||w.return()}finally{if(_)throw I}}}}function G(p,c){(c==null||c>p.length)&&(c=p.length);for(var w=0,O=new Array(c);w<c;w++)O[w]=p[w];return O}function he(p,c){var w=Object.keys(p);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(p);c&&(O=O.filter(function($){return Object.getOwnPropertyDescriptor(p,$).enumerable})),w.push.apply(w,O)}return w}function be(p){for(var c=1;c<arguments.length;c++){var w=arguments[c]!=null?arguments[c]:{};c%2?he(Object(w),!0).forEach(function(O){(0,j.Z)(p,O,w[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(w)):he(Object(w)).forEach(function(O){Object.defineProperty(p,O,Object.getOwnPropertyDescriptor(w,O))})}return p}var we={selection:!0,text:!0,rectangle:!0,diamond:!0,ellipse:!0,line:!0,image:!0,arrow:!0,freedraw:!0,eraser:!1,custom:!0,frame:!0,embeddable:!0,hand:!0,laser:!1},xe=function(p){return Object.keys(k.ut).includes(p)?k.ut[p]:k.rk},ce=function(p){return p?be(be({},p),{},{focus:p.focus||0}):null},D=function(p,c){var w,O,$,I,C,_,N,q,pe,te,ve,ae,H,le,ke={type:c.type||p.type,version:p.version||1,versionNonce:(w=p.versionNonce)!==null&&w!==void 0?w:0,isDeleted:(O=p.isDeleted)!==null&&O!==void 0&&O,id:p.id||(0,v.kb)(),fillStyle:p.fillStyle||k.HN.fillStyle,strokeWidth:p.strokeWidth||k.HN.strokeWidth,strokeStyle:($=p.strokeStyle)!==null&&$!==void 0?$:k.HN.strokeStyle,roughness:(I=p.roughness)!==null&&I!==void 0?I:k.HN.roughness,opacity:p.opacity==null?k.HN.opacity:p.opacity,angle:p.angle||0,x:(C=(_=c.x)!==null&&_!==void 0?_:p.x)!==null&&C!==void 0?C:0,y:(N=(q=c.y)!==null&&q!==void 0?q:p.y)!==null&&N!==void 0?N:0,strokeColor:p.strokeColor||k.HN.strokeColor,backgroundColor:p.backgroundColor||k.HN.backgroundColor,width:p.width||0,height:p.height||0,seed:(pe=p.seed)!==null&&pe!==void 0?pe:1,groupIds:(te=p.groupIds)!==null&&te!==void 0?te:[],frameId:(ve=p.frameId)!==null&&ve!==void 0?ve:null,roundness:p.roundness?p.roundness:p.strokeSharpness==="round"?{type:(0,l.QI)(p.type)?k.a6.LEGACY:k.a6.PROPORTIONAL_RADIUS}:null,boundElements:p.boundElementIds?p.boundElementIds.map(function(Le){return{type:"arrow",id:Le}}):(ae=p.boundElements)!==null&&ae!==void 0?ae:[],updated:(H=p.updated)!==null&&H!==void 0?H:(0,R.C3)(),link:p.link?(0,U.$u)(p.link):null,locked:(le=p.locked)!==null&&le!==void 0&&le};return"customData"in p&&(ke.customData=p.customData),k.WR in p&&(ke[k.WR]=p[k.WR]),be(be(be({},ke),(0,f.Qp)(ke)),c)},ne=function(p,c){if(p.boundElements){var w=p.boundElements.slice(),O=new Set;p.boundElements=w.reduce(function($,I){var C=c.get(I.id);if(C&&!O.has(I.id)){if(O.add(I.id),C.isDeleted)return $;$.push(I),(0,l.iB)(C)&&!C.containerId&&(C.containerId=p.id)}return $},[])}},S=function(p,c){var w=p.containerId?c.get(p.containerId):null;if(w){if(!p.isDeleted&&w.boundElements&&!w.boundElements.find(function($){return $.id===p.id})){var O=(w.boundElements||(w.boundElements=[])).slice();O.push({type:"text",id:p.id}),w.boundElements=O}}else p.containerId=null},z=function(p,c){p.frameId&&(c.get(p.frameId)||(p.frameId=null))},A=function(p,c,w){var O=new Set,$=c?(0,R.xn)(c):null,I=(p||[]).reduce(function(pe,te){if(te.type!=="selection"&&!(0,f.QD)(te)){var ve=function(H){var le,ke,Le=arguments.length>1&&arguments[1]!==void 0&&arguments[1];switch(H.type){case"text":var Ge=H.fontSize,Ne=H.fontFamily;if("font"in H){var Ce=H.font.split(" "),Oe=(0,T.Z)(Ce,2),De=Oe[0],Ae=Oe[1];Ge=parseFloat(De),Ne=xe(Ae)}var ie=typeof H.text=="string"&&H.text||"",Ie=H.lineHeight||(H.height?(0,K.$2)(H):(0,K.PT)(H.fontFamily)),oe=(0,K.R8)(H.text,(0,R.mO)(H),Ie);return H=D(H,{fontSize:Ge,fontFamily:Ne,text:ie,textAlign:H.textAlign||k.Hg,verticalAlign:H.verticalAlign||k.hs,containerId:(le=H.containerId)!==null&&le!==void 0?le:null,originalText:H.originalText||ie,lineHeight:Ie,baseline:oe}),ie||H.isDeleted||(H=be(be({},H),{},{originalText:ie,isDeleted:!0}),H=(0,P.ZP)(H)),Le&&(H=be(be({},H),(0,f.JZ)(H))),H;case"freedraw":return D(H,{points:H.points,lastCommittedPoint:null,simulatePressure:H.simulatePressure,pressures:H.pressures});case"image":return D(H,{status:H.status||"pending",fileId:H.fileId,scale:H.scale||[1,1]});case"line":case"draw":case"arrow":var s=H,u=s.startArrowhead,x=u===void 0?null:u,V=s.endArrowhead,W=V===void 0?H.type==="arrow"?"arrow":null:V,re=H.x,ee=H.y,se=!Array.isArray(H.points)||H.points.length<2?[[0,0],[H.width,H.height]]:H.points;if(se[0][0]!==0||se[0][1]!==0){var Ee=a._.getNormalizedPoints(H);se=Ee.points,re=Ee.x,ee=Ee.y}return D(H,{type:H.type==="draw"?"line":H.type,startBinding:ce(H.startBinding),endBinding:ce(H.endBinding),lastCommittedPoint:null,startArrowhead:x,endArrowhead:W,points:se,x:re,y:ee});case"ellipse":case"rectangle":case"diamond":return D(H,{});case"embeddable":return D(H,{validated:null});case"frame":return D(H,{name:(ke=H.name)!==null&&ke!==void 0?ke:null})}return null}(te,w==null?void 0:w.refreshDimensions);if(ve){var ae=$==null?void 0:$.get(te.id);ae&&ae.version>ve.version&&(ve=(0,P.ZP)(ve,ae.version)),O.has(ve.id)&&(ve=be(be({},ve),{},{id:(0,v.kb)()})),O.add(ve.id),pe.push(ve)}}return pe},[]);if(w==null||!w.repairBindings)return I;var C,_=(0,R.xn)(I),N=m(I);try{for(N.s();!(C=N.n()).done;){var q=C.value;q.frameId&&z(q,_),(0,l.iB)(q)&&q.containerId?S(q,_):q.boundElements&&ne(q,_)}}catch(pe){N.e(pe)}finally{N.f()}return I},E=function(p,c,w){var O=c[p];return O!==void 0?O:w[p]},L={isSidebarDocked:function(p,c){var w;return["defaultSidebarDockedPreference",(w=p.isSidebarDocked)!==null&&w!==void 0?w:E("defaultSidebarDockedPreference",p,c)]}},h=function(p,c){var w,O,$,I;p=p||{};for(var C=(0,g.im)(),_={},N=0,q=Object.keys(L);N<q.length;N++){var pe=q[N];if(pe in p){var te=L[pe](p,C),ve=(0,T.Z)(te,2),ae=ve[0],H=ve[1];_[ae]=H}}for(var le=0,ke=Object.entries(C);le<ke.length;le++){var Le=(0,T.Z)(ke[le],2),Ge=Le[0],Ne=Le[1],Ce=p[Ge],Oe=c?c[Ge]:void 0;_[Ge]=Ce!==void 0?Ce:Oe!==void 0?Oe:Ne}return be(be({},_),{},{cursorButton:(c==null?void 0:c.cursorButton)||"up",penDetected:(w=c==null?void 0:c.penDetected)!==null&&w!==void 0?w:!!p.penMode&&(O=p.penDetected)!==null&&O!==void 0&&O,activeTool:be(be({},(0,R.Om)(C,_.activeTool.type&&we[_.activeTool.type]?_.activeTool:{type:"selection"})),{},{lastActiveTool:null,locked:($=_.activeTool.locked)!==null&&$!==void 0&&$}),zoom:typeof p.zoom=="number"?{value:p.zoom}:(I=p.zoom)!==null&&I!==void 0&&I.value?p.zoom:C.zoom,openSidebar:typeof p.openSidebar=="string"?{name:k.Cc.name}:_.openSidebar})},y=function(p,c,w,O){return{elements:A(p==null?void 0:p.elements,w,O),appState:h(p==null?void 0:p.appState,c||null),files:(p==null?void 0:p.files)||{}}},r=function(p){var c=A((0,f.Lm)(p.elements),null);return c.length?be(be({},p),{},{elements:c}):null},M=function(){var p,c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],w=arguments.length>1?arguments[1]:void 0,O=[],$=m(c);try{for($.s();!(p=$.n()).done;){var I=p.value;if(Array.isArray(I)){var C=r({status:w,elements:I,id:(0,v.kb)(),created:Date.now()});C&&O.push(C)}else{var _=I,N=r(be(be({},_),{},{id:_.id||(0,v.kb)(),status:_.status||w,created:_.created||Date.now()}));N&&O.push(N)}}}catch(q){$.e(q)}finally{$.f()}return O}},6199:function(fe,Q,t){t.d(Q,{w:function(){return z}});var T=t(2577),j=t(5169),f=t(8821),l=t(7169),v=t(9937),k=t(7651),g=t(9645),a=t(5742),P=t(4761),R=t(9827),K=t(5999),U=t(4643);function m(A,E){var L=typeof Symbol<"u"&&A[Symbol.iterator]||A["@@iterator"];if(!L){if(Array.isArray(A)||(L=function(c,w){if(c){if(typeof c=="string")return G(c,w);var O=Object.prototype.toString.call(c).slice(8,-1);if(O==="Object"&&c.constructor&&(O=c.constructor.name),O==="Map"||O==="Set")return Array.from(c);if(O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O))return G(c,w)}}(A))||E){L&&(A=L);var h=0,y=function(){};return{s:y,n:function(){return h>=A.length?{done:!0}:{done:!1,value:A[h++]}},e:function(c){throw c},f:y}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
116
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var r,M=!0,p=!1;return{s:function(){L=L.call(A)},n:function(){var c=L.next();return M=c.done,c},e:function(c){p=!0,r=c},f:function(){try{M||L.return==null||L.return()}finally{if(p)throw r}}}}function G(A,E){(E==null||E>A.length)&&(E=A.length);for(var L=0,h=new Array(E);L<E;L++)h[L]=A[L];return h}function he(A,E){var L=Object.keys(A);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(A);E&&(h=h.filter(function(y){return Object.getOwnPropertyDescriptor(A,y).enumerable})),L.push.apply(L,h)}return L}function be(A){for(var E=1;E<arguments.length;E++){var L=arguments[E]!=null?arguments[E]:{};E%2?he(Object(L),!0).forEach(function(h){(0,l.Z)(A,h,L[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(L)):he(Object(L)).forEach(function(h){Object.defineProperty(A,h,Object.getOwnPropertyDescriptor(L,h))})}return A}var we=100,xe=0,ce=100,D=function(A,E){var L=(0,a.VL)(be(be({x:0,y:0,textAlign:v.I8.CENTER,verticalAlign:v.oX.MIDDLE},E),{},{containerId:A.id,strokeColor:E.strokeColor||A.strokeColor}));return Object.assign(A,{boundElements:(A.boundElements||[]).concat({type:"text",id:L.id})}),(0,k.oN)(L,A),[A,L]},ne=function(A,E,L,h){var y,r;if(Object.assign(A,{startBinding:(A==null?void 0:A.startBinding)||null,endBinding:A.endBinding||null}),E){var M,p,c,w=(M=E==null?void 0:E.width)!==null&&M!==void 0?M:ce,O=(p=E==null?void 0:E.height)!==null&&p!==void 0?p:ce;E.id&&((c=h.getElement(E.id))||console.error("No element for start binding with id ".concat(E.id," found")));var $=E.x||A.x-w,I=E.y||A.y-O/2,C=c?c.type:E.type;if(C){if(C==="text"){var _="";c&&c.type==="text"?_=c.text:E.type==="text"&&(_=E.text),_||console.error("No text found for start binding text element for ".concat(A.id)),y=(0,a.VL)(be(be(be({x:$,y:I,type:"text"},c),E),{},{text:_})),Object.assign(y,{x:E.x||A.x-y.width,y:E.y||A.y-y.height/2})}else switch(C){case"rectangle":case"ellipse":case"diamond":y=(0,k.Up)(be(be(be({x:$,y:I,width:w,height:O},c),E),{},{type:C}));break;default:(0,R.vE)(A,'Unhandled element start type "'.concat(E.type,'"'),!0)}(0,g.UZ)(A,y,"start")}}if(L){var N,q,pe,te=(N=L==null?void 0:L.height)!==null&&N!==void 0?N:ce,ve=(q=L==null?void 0:L.width)!==null&&q!==void 0?q:ce;L.id&&((pe=h.getElement(L.id))||console.error("No element for end binding with id ".concat(L.id," found")));var ae=L.x||A.x+A.width,H=L.y||A.y-te/2,le=pe?pe.type:L.type;if(le){if(le==="text"){var ke="";pe&&pe.type==="text"?ke=pe.text:L.type==="text"&&(ke=L.text),ke||console.error("No text found for end binding text element for ".concat(A.id)),r=(0,a.VL)(be(be(be({x:ae,y:H,type:"text"},pe),L),{},{text:ke})),Object.assign(r,{y:L.y||A.y-r.height/2})}else switch(le){case"rectangle":case"ellipse":case"diamond":r=(0,k.Up)(be(be(be({x:ae,y:H,width:ve,height:te},pe),L),{},{type:le}));break;default:(0,R.vE)(A,'Unhandled element end type "'.concat(le,'"'),!0)}(0,g.UZ)(A,r,"end")}}var Le=A.points.length-1,Ge=.5,Ne=(0,R.xU)(A.points);return A.points[Le][0]>A.points[Le-1][0]&&(Ne[0][0]=Ge,Ne[Le][0]-=Ge),A.points[Le][0]<A.points[Le-1][0]&&(Ne[0][0]=-.5,Ne[Le][0]+=Ge),A.points[Le][1]>A.points[Le-1][1]&&(Ne[0][1]=Ge,Ne[Le][1]-=Ge),A.points[Le][1]<A.points[Le-1][1]&&(Ne[0][1]=-.5,Ne[Le][1]+=Ge),Object.assign(A,{points:Ne}),{linearElement:A,startBoundElement:y,endBoundElement:r}},S=(0,j.Z)(function A(){var E=this;(0,f.Z)(this,A),this.excalidrawElements=new Map,this.add=function(L){L&&E.excalidrawElements.set(L.id,L)},this.getElements=function(){return Array.from(E.excalidrawElements.values())},this.getElement=function(L){return E.excalidrawElements.get(L)}}),z=function(A,E){if(!A)return[];var L,h=(0,R.xU)(A),y=new S,r=new Map,M=new Map,p=m(h);try{for(p.s();!(L=p.n()).done;){var c=L.value,w=void 0,O=c.id;switch((E==null?void 0:E.regenerateIds)!==!1&&Object.assign(c,{id:(0,U.kb)()}),c.type){case"rectangle":case"ellipse":case"diamond":var $,I,C=c!=null&&($=c.label)!==null&&$!==void 0&&$.text&&c.width===void 0?0:(c==null?void 0:c.width)||ce,_=c!=null&&(I=c.label)!==null&&I!==void 0&&I.text&&c.height===void 0?0:(c==null?void 0:c.height)||ce;w=(0,k.Up)(be(be({},c),{},{width:C,height:_}));break;case"line":var N=c.width||we,q=c.height||xe;w=(0,k.y8)(be({width:N,height:q,points:[[0,0],[N,q]]},c));break;case"arrow":var pe=c.width||we,te=c.height||xe;w=(0,k.y8)(be({width:pe,height:te,endArrowhead:"arrow",points:[[0,0],[pe,te]]},c)),Object.assign(w,(0,K.k)(w.points));break;case"text":var ve,ae=(c==null?void 0:c.fontFamily)||v.rk,H=(c==null?void 0:c.fontSize)||v.n5,le=(c==null?void 0:c.lineHeight)||(0,P.PT)(ae),ke=(ve=c.text)!==null&&ve!==void 0?ve:"",Le=(0,P.bG)(ke),Ge=(0,P.X1)(Le,(0,R.mO)({fontFamily:ae,fontSize:H}),le);w=(0,a.VL)(be({width:Ge.width,height:Ge.height,fontFamily:ae,fontSize:H},c));break;case"image":w=(0,a.vw)(be({width:(c==null?void 0:c.width)||ce,height:(c==null?void 0:c.height)||ce},c));break;case"frame":w=(0,a.M3)(be({x:0,y:0},c));break;case"freedraw":case"embeddable":w=c;break;default:w=c,(0,R.vE)(c,'Unhandled element type "'.concat(c.type,'"'),!0)}y.getElement(w.id)?console.error("Duplicate id found for ".concat(w.id)):(y.add(w),r.set(w.id,c),O&&M.set(O,w.id))}}catch(it){p.e(it)}finally{p.f()}var Ne,Ce=m(r);try{for(Ce.s();!(Ne=Ce.n()).done;){var Oe=(0,T.Z)(Ne.value,2),De=Oe[0],Ae=Oe[1],ie=y.getElement(De);switch(Ae.type){case"rectangle":case"ellipse":case"diamond":case"arrow":var Ie;if((Ie=Ae.label)!==null&&Ie!==void 0&&Ie.text){var oe=D(ie,Ae==null?void 0:Ae.label),s=(0,T.Z)(oe,2),u=s[0],x=s[1];if(y.add(u),y.add(x),u.type==="arrow"){var V=Ae.type==="arrow"?Ae==null?void 0:Ae.start:void 0,W=Ae.type==="arrow"?Ae==null?void 0:Ae.end:void 0;if(V&&V.id){var re=M.get(V.id);re&&Object.assign(V,{id:re})}if(W&&W.id){var ee=M.get(W.id);ee&&Object.assign(W,{id:ee})}var se=ne(u,V,W,y),Ee=se.linearElement,_e=se.startBoundElement,Ue=se.endBoundElement;u=Ee,y.add(Ee),y.add(_e),y.add(Ue)}}else if(Ae.type==="arrow"){var We=Ae.start,Ye=Ae.end;if(We&&We.id){var Ze=M.get(We.id);Object.assign(We,{id:Ze})}if(Ye&&Ye.id){var Je=M.get(Ye.id);Object.assign(Ye,{id:Je})}var nt=ne(ie,We,Ye,y),dt=nt.linearElement,ge=nt.startBoundElement,Se=nt.endBoundElement;y.add(dt),y.add(ge),y.add(Se)}}}}catch(it){Ce.e(it)}finally{Ce.f()}var Be,Xe=m(r);try{var lt=function(){var it=(0,T.Z)(Be.value,2),yt=it[0],_t=it[1];if(_t.type!=="frame")return"continue";var ut=y.getElement(yt);if(!ut)throw new Error("Excalidraw element with id ".concat(yt," doesn't exist"));var Tt=[];_t.children.forEach(function(jt){var xt,Nt=M.get(jt);if(!Nt)throw new Error("Element with ".concat(jt," wasn't mapped correctly"));var Ut=y.getElement(Nt);if(!Ut)throw new Error("Frame element with id ".concat(Nt," doesn't exist"));Object.assign(Ut,{frameId:ut.id}),Ut==null||(xt=Ut.boundElements)===null||xt===void 0||xt.forEach(function(rn){var Ft=y.getElement(rn.id);if(!Ft)throw new Error("Bound element with id ".concat(rn.id," doesn't exist"));Object.assign(Ft,{frameId:ut.id}),Tt.push(Ft)}),Tt.push(Ut)});var Yt=(0,k.KP)(Tt),Zt=(0,T.Z)(Yt,4),Pt=Zt[0],en=Zt[1],tn=Zt[2],ot=Zt[3];Pt-=10,en-=10,tn+=10,ot+=10;var It=Math.max(ut==null?void 0:ut.width,tn-Pt),mt=Math.max(ut==null?void 0:ut.height,ot-en);Object.assign(ut,{x:Pt,y:en,width:It,height:mt})};for(Xe.s();!(Be=Xe.n()).done;)lt()}catch(it){Xe.e(it)}finally{Xe.f()}return y.getElements()}},8020:function(fe,Q,t){t.d(Q,{$u:function(){return f},q$:function(){return l},tO:function(){return j},ye:function(){return v}});var T=t(5779),j=function(k){return k.replace(/"/g,""")},f=function(k){return(k=k.trim())?(0,T.N)(j(k)):k},l=function(k){return!!(k!=null&&k.includes(location.origin)||k!=null&&k.startsWith("/"))},v=function(k){if((k=f(k)).startsWith("/"))return"".concat(location.origin).concat(k);try{new URL(k)}catch{return"about:blank"}return k}},5992:function(fe,Q,t){t.d(Q,{rj:function(){return te},nW:function(){return H},nz:function(){return ke},sw:function(){return Ge},lV:function(){return ie},Ni:function(){return Ce},wq:function(){return Ne},Pp:function(){return De}});var T=t(7169),j=t(2577),f=t(9827),l=t(761),v=t(583),k=t(2767),g=t(1512),a=t(8935),P=t(8227),R=t(9787),K=t(45),U=t(5491),m=t(9660),G=t(2361),he=t(9937),be=t(8925),we=t(4105),xe=t(3528),ce=t(7651),D=t(8020),ne=t(3379),S=t.n(ne),z=t(7795),A=t.n(z),E=t(569),L=t.n(E),h=t(3565),y=t.n(h),r=t(9216),M=t.n(r),p=t(4589),c=t.n(p),w=t(5260),O={};O.styleTagTransform=c(),O.setAttributes=y(),O.insert=L().bind(null,"head"),O.domAPI=A(),O.insertStyleElement=M(),S()(w.Z,O),w.Z&&w.Z.locals&&w.Z.locals;var $=t(3646),I=t(8242),C=t(4183),_=t(2921),N=t(4512);function q(oe,s){var u=Object.keys(oe);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(oe);s&&(x=x.filter(function(V){return Object.getOwnPropertyDescriptor(oe,V).enumerable})),u.push.apply(u,x)}return u}function pe(oe){for(var s=1;s<arguments.length;s++){var u=arguments[s]!=null?arguments[s]:{};s%2?q(Object(u),!0).forEach(function(x){(0,T.Z)(oe,x,u[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(oe,Object.getOwnPropertyDescriptors(u)):q(Object(u)).forEach(function(x){Object.defineProperty(oe,x,Object.getOwnPropertyDescriptor(u,x))})}return oe}var te=document.createElement("img");te.src="data:".concat(he.LO.svg,", ").concat(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#1971c2" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>'));var ve=!1,ae=new Map,H=function(oe){var s=oe.element,u=oe.setAppState,x=oe.onLinkOpen,V=oe.setToast,W=(0,I.gF)(),re=(0,I.hY)(),ee=s.link||"",se=(0,R.useState)(ee),Ee=(0,j.Z)(se,2),_e=Ee[0],Ue=Ee[1],We=(0,R.useRef)(null),Ye=W.showHyperlinkPopup==="editor",Ze=(0,R.useCallback)(function(){if(We.current){var Se=(0,D.$u)(We.current.value)||null;if(!s.link&&Se&&(0,$.L)("hyperlink","create"),(0,C.gs)(s)){var Be;if(((Be=W.activeEmbeddable)===null||Be===void 0?void 0:Be.element)===s&&u({activeEmbeddable:null}),!Se)return void(0,v.DR)(s,{validated:!1,link:null});if((0,l.xm)(Se,re.validateEmbeddable)){var Xe=s.width,lt=s.height,it=(0,l.LM)(Se);it!=null&&it.warning&&V({message:it.warning,closable:!0});var yt=it?it.aspectRatio.w/it.aspectRatio.h:1,_t=ae.get(s.id)!==s.link;(0,v.DR)(s,pe(pe({},_t?{width:(it==null?void 0:it.type)==="video"?Xe>lt?Xe:lt*yt:Xe,height:(it==null?void 0:it.type)==="video"&&Xe>lt?Xe/yt:lt}:{}),{},{validated:!0,link:Se})),_.R.delete(s),ae.has(s.id)&&ae.delete(s.id)}else Se&&V({message:(0,P.t)("toast.unableToEmbed"),closable:!0}),s.link&&ae.set(s.id,s.link),(0,v.DR)(s,{validated:!1,link:Se}),_.R.delete(s)}else(0,v.DR)(s,{link:Se})}},[s,V,re.validateEmbeddable,W.activeEmbeddable,u]);(0,R.useLayoutEffect)(function(){return function(){Ze()}},[Ze]),(0,R.useEffect)(function(){var Se=null,Be=function(Xe){Ye||(Se&&clearTimeout(Se),Ie(s,W,[Xe.clientX,Xe.clientY])&&(Se=window.setTimeout(function(){u({showHyperlinkPopup:!1})},500)))};return window.addEventListener(he.Ks.POINTER_MOVE,Be,!1),function(){window.removeEventListener(he.Ks.POINTER_MOVE,Be,!1),Se&&clearTimeout(Se)}},[W,s,Ye,u]);var Je=(0,R.useCallback)(function(){(0,$.L)("hyperlink","delete"),(0,v.DR)(s,{link:null}),Ye&&(We.current.value=""),u({showHyperlinkPopup:!1})},[u,s,Ye]),nt=le(s,W),dt=nt.x,ge=nt.y;return W.draggingElement||W.resizingElement||W.isRotating||W.openMenu||W.viewModeEnabled?null:(0,N.jsxs)("div",{className:"excalidraw-hyperlinkContainer",style:{top:"".concat(ge,"px"),left:"".concat(dt,"px"),width:320,padding:5},onClick:function(){s.link||Ye||u({showHyperlinkPopup:"editor"})},children:[Ye?(0,N.jsx)("input",{className:(0,K.Z)("excalidraw-hyperlinkContainer-input"),placeholder:"Type or paste your link here",ref:We,value:_e,onChange:function(Se){return Ue(Se.target.value)},autoFocus:!0,onKeyDown:function(Se){Se.stopPropagation(),Se[U.tW.CTRL_OR_CMD]&&Se.key===U.tW.K&&Se.preventDefault(),Se.key!==U.tW.ENTER&&Se.key!==U.tW.ESCAPE||(Ze(),u({showHyperlinkPopup:"info"}))}}):s.link?(0,N.jsx)("a",{href:(0,D.$u)(s.link||""),className:"excalidraw-hyperlinkContainer-link",target:(0,D.q$)(s.link)?"_self":"_blank",onClick:function(Se){if(s.link&&x){var Be=(0,f.ag)(he.Ks.EXCALIDRAW_LINK,Se.nativeEvent);x(pe(pe({},s),{},{link:(0,D.$u)(s.link)}),Be),Be.defaultPrevented&&Se.preventDefault()}},rel:"noopener noreferrer",children:s.link}):(0,N.jsx)("div",{className:"excalidraw-hyperlinkContainer-link",children:(0,P.t)("labels.link.empty")}),(0,N.jsxs)("div",{className:"excalidraw-hyperlinkContainer__buttons",children:[!Ye&&(0,N.jsx)(g.V,{type:"button",title:(0,P.t)("buttons.edit"),"aria-label":(0,P.t)("buttons.edit"),label:(0,P.t)("buttons.edit"),onClick:function(){(0,$.L)("hyperlink","edit","popup-ui"),u({showHyperlinkPopup:"editor"})},className:"excalidraw-hyperlinkContainer--edit",icon:a.Pm}),ee&&!(0,C.gs)(s)&&(0,N.jsx)(g.V,{type:"button",title:(0,P.t)("buttons.remove"),"aria-label":(0,P.t)("buttons.remove"),label:(0,P.t)("buttons.remove"),onClick:Je,className:"excalidraw-hyperlinkContainer--remove",icon:a.XH})]})]})},le=function(oe,s){var u=(0,ce.qf)(oe),x=(0,j.Z)(u,2),V=x[0],W=x[1],re=(0,f._i)({sceneX:V+oe.width/2,sceneY:W},s),ee=re.x,se=re.y;return{x:ee-s.offsetLeft-160,y:se-s.offsetTop-85}},ke=(0,k.z)({name:"hyperlink",perform:function(oe,s){return s.showHyperlinkPopup!=="editor"&&{elements:oe,appState:pe(pe({},s),{},{showHyperlinkPopup:"editor",openMenu:null}),commitToHistory:!0}},trackEvent:{category:"hyperlink",action:"click"},keyTest:function(oe){return oe[U.tW.CTRL_OR_CMD]&&oe.key===U.tW.K},contextItemLabel:function(oe,s){return Le(oe,s)},predicate:function(oe,s){return(0,we.eD)(oe,s).length===1},PanelComponent:function(oe){var s=oe.elements,u=oe.appState,x=oe.updateData,V=(0,we.eD)(s,u);return(0,N.jsx)(g.V,{type:"button",icon:a.xP,"aria-label":(0,P.t)(Le(s,u)),title:"".concat((0,C.gs)(s[0])?(0,P.t)("labels.link.labelEmbed"):(0,P.t)("labels.link.label")," - ").concat((0,f.uY)("CtrlOrCmd+K")),onClick:function(){return x(null)},selected:V.length===1&&!!V[0].link})}}),Le=function(oe,s){var u=(0,we.eD)(oe,s);return u[0].link?(0,C.gs)(u[0])?"labels.link.editEmbed":"labels.link.edit":(0,C.gs)(u[0])?"labels.link.createEmbed":"labels.link.create"},Ge=function(oe,s,u){var x=(0,j.Z)(oe,4),V=x[0],W=x[1],re=x[2],ee=x[3],se=m.Dn,Ee=se/u.zoom.value,_e=se/u.zoom.value,Ue=se/u.zoom.value,We=(V+re)/2,Ye=(W+ee)/2,Ze=(se-8)/(2*u.zoom.value),Je=4/u.zoom.value,nt=re+Je-Ze,dt=W-Je-Ue+Ze,ge=(0,G.U1)(nt+Ee/2,dt+_e/2,We,Ye,s),Se=(0,j.Z)(ge,2);return[Se[0]-Ee/2,Se[1]-_e/2,Ee,_e]},Ne=function(oe,s,u){var x=(0,j.Z)(u,2),V=x[0],W=x[1],re=4/s.zoom.value,ee=(0,ce.qf)(oe),se=(0,j.Z)(ee,4),Ee=se[0],_e=se[1],Ue=se[2],We=se[3],Ye=Ge([Ee,_e,Ue,We],oe.angle,s),Ze=(0,j.Z)(Ye,4),Je=Ze[0],nt=Ze[1],dt=Ze[2],ge=Ze[3];return V>Je-re&&V<Je+re+dt&&W>nt-re&&W<nt+ge+re},Ce=function(oe,s,u,x){var V=(0,j.Z)(u,2),W=V[0],re=V[1];if(!oe.link||s.selectedElementIds[oe.id])return!1;var ee=4/s.zoom.value;return!(x||!s.viewModeEnabled||!(0,xe.pX)(oe,[W,re],ee,null))||Ne(oe,s,[W,re])},Oe=null,De=function(oe,s){Oe&&clearTimeout(Oe),Oe=window.setTimeout(function(){return Ae(oe,s)},he.sA)},Ae=function(oe,s){if(oe.link){var u=(0,be.bK)();u.classList.add("excalidraw-tooltip--visible"),u.style.maxWidth="20rem",u.textContent=oe.link;var x=(0,ce.qf)(oe),V=(0,j.Z)(x,4),W=V[0],re=V[1],ee=V[2],se=V[3],Ee=Ge([W,re,ee,se],oe.angle,s),_e=(0,j.Z)(Ee,4),Ue=_e[0],We=_e[1],Ye=_e[2],Ze=_e[3],Je=(0,f._i)({sceneX:Ue,sceneY:We},s);(0,be.Js)(u,{left:Je.x,top:Je.y,width:Ye,height:Ze},"top"),(0,$.L)("hyperlink","tooltip","link-icon"),ve=!0}},ie=function(){Oe&&clearTimeout(Oe),ve&&(ve=!1,(0,be.bK)().classList.remove("excalidraw-tooltip--visible"))},Ie=function(oe,s,u){var x=(0,j.Z)(u,2),V=x[0],W=x[1],re=(0,f.dE)({clientX:V,clientY:W},s),ee=re.x,se=re.y,Ee=15/s.zoom.value;if((0,xe.pX)(oe,[ee,se],Ee,null))return!1;var _e=(0,ce.qf)(oe),Ue=(0,j.Z)(_e,3),We=Ue[0],Ye=Ue[1],Ze=Ue[2];if(ee>=We&&ee<=Ze&&se>=Ye-85&&se<=Ye)return!1;var Je=le(oe,s),nt=Je.x,dt=Je.y;return!(V>=nt-Ee&&V<=nt+320+10+Ee&&W>=dt-Ee&&W<=dt+Ee+10+42)}},9645:function(fe,Q,t){t.d(Q,{$q:function(){return pe},DK:function(){return z},H:function(){return A},HG:function(){return be},N1:function(){return G},R:function(){return D},UZ:function(){return ne},Ww:function(){return y},Y9:function(){return L},ZB:function(){return w},cz:function(){return m},ek:function(){return N},el:function(){return xe}});var T=t(7169),j=t(2577),f=t(4105),l=t(4183),v=t(3528),k=t(583),g=t(457),a=t(7422),P=t(9827),R=t(5491),K=t(4761);function U(ae,H){var le=Object.keys(ae);if(Object.getOwnPropertySymbols){var ke=Object.getOwnPropertySymbols(ae);H&&(ke=ke.filter(function(Le){return Object.getOwnPropertyDescriptor(ae,Le).enumerable})),le.push.apply(le,ke)}return le}var m=function(ae){return!ae[R.tW.CTRL_OR_CMD]},G=function(ae){return ae.isBindingEnabled},he=function(ae,H){var le=[];return H.forEach(function(ke){var Le=ae.getNonDeletedElement(ke);Le!=null&&le.push(Le)}),le},be=function(ae,H,le){var ke=new Set,Le=new Set;we(ae,H,le,"start",ke,Le),we(ae,le,H,"end",ke,Le);var Ge=Array.from(Le).filter(function(Ne){return!ke.has(Ne)});he(g.Z.getScene(ae),Ge).forEach(function(Ne){var Ce;(0,k.DR)(Ne,{boundElements:(Ce=Ne.boundElements)===null||Ce===void 0?void 0:Ce.filter(function(Oe){return Oe.type!=="arrow"||Oe.id!==ae.id})})})},we=function(ae,H,le,ke,Le,Ge){if(H!=="keep")if(H!=null)le!=null&&(le==="keep"?S(ae,H,ke):ke!=="start"&&le.id===H.id)||(ne(ae,H,ke),Le.add(H.id));else{var Ne=E(ae,ke);Ne!=null&&Ge.add(Ne)}},xe=function(ae){ae.forEach(function(H){(0,l.Mn)(H)?be(H,$(H,"start"),$(H,"end")):(0,l.f0)(H)&&ce(H)})},ce=function(ae){C(ae).forEach(function(H){var le=(0,j.Z)(H,2),ke=le[0],Le=le[1];return be(ke,Le==="end"?"keep":ae,Le==="start"?"keep":ae)})},D=function(ae,H,le,ke){H.startBoundElement!=null&&ne(ae,H.startBoundElement,"start");var Le=L(ke,le);Le==null||S(ae,Le,"end")||ne(ae,Le,"end")},ne=function(ae,H,le){(0,k.DR)(ae,(0,T.Z)({},le==="start"?"startBinding":"endBinding",function(ke){for(var Le=1;Le<arguments.length;Le++){var Ge=arguments[Le]!=null?arguments[Le]:{};Le%2?U(Object(Ge),!0).forEach(function(Ne){(0,T.Z)(ke,Ne,Ge[Ne])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ke,Object.getOwnPropertyDescriptors(Ge)):U(Object(Ge)).forEach(function(Ne){Object.defineProperty(ke,Ne,Object.getOwnPropertyDescriptor(Ge,Ne))})}return ke}({elementId:H.id},h(ae,H,le)))),(0,P.xn)(H.boundElements||[]).has(ae.id)||(0,k.DR)(H,{boundElements:(H.boundElements||[]).concat({id:ae.id,type:"arrow"})})},S=function(ae,H,le){var ke=ae[le==="start"?"endBinding":"startBinding"];return z(ae,ke==null?void 0:ke.elementId,H)},z=function(ae,H,le){return H===le.id&&ae.points.length<3},A=function(ae){ae.forEach(function(H){(0,l.Mn)(H)&&be(H,null,null)})},E=function(ae,H){var le=H==="start"?"startBinding":"endBinding",ke=ae[le];return ke==null?null:((0,k.DR)(ae,(0,T.Z)({},le,null)),ke.elementId)},L=function(ae,H){return(0,f.QG)(H.getNonDeletedElements(),function(le){return(0,l.f0)(le,!1)&&(0,v.uu)(le,ae)})},h=function(ae,H,le){var ke=le==="start"?-1:1,Le=ke===-1?0:ae.points.length-1,Ge=Le-ke,Ne=a._.getPointAtIndexGlobalCoordinates(ae,Le),Ce=a._.getPointAtIndexGlobalCoordinates(ae,Ge);return{focus:(0,v.T_)(H,Ce,Ne),gap:Math.max(1,(0,v.oT)(H,Ne))}},y=function(ae,H){var le,ke=((le=ae.boundElements)!==null&&le!==void 0?le:[]).filter(function(Oe){return Oe.type==="arrow"});if(ke.length!==0){var Le=H??{},Ge=Le.newSize,Ne=Le.simultaneouslyUpdated,Ce=M(Ne);he(g.Z.getScene(ae),ke.map(function(Oe){return Oe.id})).forEach(function(Oe){if((0,l.bt)(Oe)){var De=ae;if(r(Oe,De)){var Ae=c(De,Oe.startBinding,Ge),ie=c(De,Oe.endBinding,Ge);Ce.has(Oe.id)?(0,k.DR)(Oe,{startBinding:Ae,endBinding:ie}):(p(Oe,"start",Ae,ae),p(Oe,"end",ie,ae),(0,K.WJ)(Oe)&&(0,K.RB)(Oe,!1))}}})}},r=function(ae,H){var le,ke;return((le=ae.startBinding)===null||le===void 0?void 0:le.elementId)===H.id||((ke=ae.endBinding)===null||ke===void 0?void 0:ke.elementId)===H.id},M=function(ae){return new Set((ae||[]).map(function(H){return H.id}))},p=function(ae,H,le,ke){if(!(le==null||le.elementId!==ke.id&&ae.points.length>2)){var Le=g.Z.getScene(ae).getElement(le.elementId);if(Le!=null){var Ge,Ne=H==="start"?-1:1,Ce=Ne===-1?0:ae.points.length-1,Oe=Ce-Ne,De=a._.getPointAtIndexGlobalCoordinates(ae,Oe),Ae=(0,v.j_)(Le,le.focus,De);if(le.gap===0)Ge=Ae;else{var ie=(0,v.MZ)(Le,De,Ae,le.gap);Ge=ie.length===0?Ae:ie[0]}a._.movePoints(ae,[{index:Ce,point:a._.pointFromAbsoluteCoords(ae,Ge)}],(0,T.Z)({},H==="start"?"startBinding":"endBinding",le))}}},c=function(ae,H,le){if(H==null||le==null)return H;var ke=H.gap,Le=H.focus,Ge=H.elementId,Ne=le.width,Ce=le.height,Oe=ae.width,De=ae.height;return{elementId:Ge,gap:Math.max(1,Math.min((0,v.fb)(ae,Ne,Ce),ke*(Ne<Ce?Ne/Oe:Ce/De))),focus:Le}},w=function(ae){var H=new Set(ae.map(function(le){return le.id}));return ae.flatMap(function(le){return(0,l.Mn)(le,!1)?O(le).filter(function(ke){return!H.has(ke.id)}):(0,l.f0)(le,!1)?C(le).filter(function(ke){return!H.has(ke[0].id)}):[]})},O=function(ae){return[$(ae,"start"),$(ae,"end")].filter(function(H){return H!=null})},$=function(ae,H){return L(I(ae,H),g.Z.getScene(ae))},I=function(ae,H){var le=H==="start"?0:-1;return(0,P.AK)(a._.getPointAtIndexGlobalCoordinates(ae,le))},C=function(ae){return g.Z.getScene(ae).getNonDeletedElements().map(function(H){if(!(0,l.Mn)(H,!1))return null;var le=_(H,"start",ae),ke=_(H,"end",ae);return le||ke?[H,le&&ke?"both":le?"start":"end",ae]:null}).filter(function(H){return H!=null})},_=function(ae,H,le){return ae[H==="start"?"startBinding":"endBinding"]==null&&!S(ae,le,H)&&(0,v.uu)(le,I(ae,H))},N=function(ae,H,le,ke){var Le=new Set,Ge=new Set,Ne=ke==="duplicatesServeAsOld";H.forEach(function(Ce){var Oe=Ce.boundElements;if(Oe!=null&&Oe.length>0&&(Oe.forEach(function(ie){Ne&&!le.has(ie.id)&&Le.add(ie.id)}),Ge.add(le.get(Ce.id))),(0,l.Mn)(Ce)){if(Ce.startBinding!=null){var De=Ce.startBinding.elementId;Ne&&!le.has(De)&&Ge.add(De)}if(Ce.endBinding!=null){var Ae=Ce.endBinding.elementId;Ne&&!le.has(Ae)&&Ge.add(Ae)}Ce.startBinding==null&&Ce.endBinding==null||Le.add(le.get(Ce.id))}}),ae.filter(function(Ce){var Oe=Ce.id;return Le.has(Oe)}).forEach(function(Ce){var Oe=Ce.startBinding,De=Ce.endBinding;(0,k.DR)(Ce,{startBinding:q(Oe,le),endBinding:q(De,le)})}),ae.filter(function(Ce){var Oe=Ce.id;return Ge.has(Oe)}).forEach(function(Ce){var Oe=Ce.boundElements;Oe!=null&&Oe.length>0&&(0,k.DR)(Ce,{boundElements:Oe.map(function(De){return le.has(De.id)?{id:le.get(De.id),type:De.type}:De})})})},q=function(ae,H){var le;if(ae==null)return null;var ke=ae.elementId;return{focus:ae.focus,gap:ae.gap,elementId:(le=H.get(ke))!==null&&le!==void 0?le:ke}},pe=function(ae,H){var le=new Set(H.map(function(Le){return Le.id})),ke=new Set;H.forEach(function(Le){var Ge;(0,l.f0)(Le)?(Ge=Le.boundElements)===null||Ge===void 0||Ge.forEach(function(Ne){le.has(Ne.id)||ke.add(Ne.id)}):(0,l.Mn)(Le)&&(Le.startBinding&&ke.add(Le.startBinding.elementId),Le.endBinding&&ke.add(Le.endBinding.elementId))}),ae.filter(function(Le){var Ge=Le.id;return ke.has(Ge)}).forEach(function(Le){(0,l.f0)(Le)?(0,k.DR)(Le,{boundElements:ve(Le.boundElements,le)}):(0,l.Mn)(Le)&&(0,k.DR)(Le,{startBinding:te(Le.startBinding,le),endBinding:te(Le.endBinding,le)})})},te=function(ae,H){return ae==null||H.has(ae.elementId)?null:ae},ve=function(ae,H){return ae?ae.filter(function(le){return!H.has(le.id)}):null}},4949:function(fe,Q,t){t.d(Q,{CM:function(){return ne},GJ:function(){return xe},IX:function(){return A},KP:function(){return M},M$:function(){return ce},Pi:function(){return r},UC:function(){return D},Ut:function(){return w},Y5:function(){return h},hC:function(){return p},os:function(){return O},qf:function(){return we},v2:function(){return $},wC:function(){return c}});var T=t(1930),j=t(2577),f=t(8821),l=t(5169),v=t(2361),k=t(9845),g=t(6049),a=t(4183),P=t(5999),R=t(4761),K=t(7422),U=t(2921),m=t(457);function G(I,C){var _=typeof Symbol<"u"&&I[Symbol.iterator]||I["@@iterator"];if(!_){if(Array.isArray(I)||(_=function(ae,H){if(ae){if(typeof ae=="string")return he(ae,H);var le=Object.prototype.toString.call(ae).slice(8,-1);if(le==="Object"&&ae.constructor&&(le=ae.constructor.name),le==="Map"||le==="Set")return Array.from(ae);if(le==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(le))return he(ae,H)}}(I))||C){_&&(I=_);var N=0,q=function(){};return{s:q,n:function(){return N>=I.length?{done:!0}:{done:!1,value:I[N++]}},e:function(ae){throw ae},f:q}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
117
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var pe,te=!0,ve=!1;return{s:function(){_=_.call(I)},n:function(){var ae=_.next();return te=ae.done,ae},e:function(ae){ve=!0,pe=ae},f:function(){try{te||_.return==null||_.return()}finally{if(ve)throw pe}}}}function he(I,C){(C==null||C>I.length)&&(C=I.length);for(var _=0,N=new Array(C);_<C;_++)N[_]=I[_];return N}var be=function(){function I(){(0,f.Z)(this,I)}return(0,l.Z)(I,null,[{key:"getBounds",value:function(C){var _=I.boundsCache.get(C);if(_!=null&&_.version&&_.version===C.version&&!(0,a.Xh)(C))return _.bounds;var N=I.calculateBounds(C);return m.Z.getScene(C)&&I.boundsCache.set(C,{version:C.version,bounds:N}),N}},{key:"calculateBounds",value:function(C){var _,N=we(C),q=(0,j.Z)(N,6),pe=q[0],te=q[1],ve=q[2],ae=q[3],H=q[4],le=q[5];if((0,a.F9)(C)){var ke=E(C.points.map(function(It){var mt=(0,j.Z)(It,2),jt=mt[0],xt=mt[1];return(0,v.U1)(jt,xt,H-C.x,le-C.y,C.angle)})),Le=(0,j.Z)(ke,4),Ge=Le[0],Ne=Le[1],Ce=Le[2],Oe=Le[3];return[Ge+C.x,Ne+C.y,Ce+C.x,Oe+C.y]}if((0,a.bt)(C))_=y(C,H,le);else if(C.type==="diamond"){var De=(0,v.U1)(H,te,H,le,C.angle),Ae=(0,j.Z)(De,2),ie=Ae[0],Ie=Ae[1],oe=(0,v.U1)(H,ae,H,le,C.angle),s=(0,j.Z)(oe,2),u=s[0],x=s[1],V=(0,v.U1)(pe,le,H,le,C.angle),W=(0,j.Z)(V,2),re=W[0],ee=W[1],se=(0,v.U1)(ve,le,H,le,C.angle),Ee=(0,j.Z)(se,2),_e=Ee[0],Ue=Ee[1];_=[Math.min(ie,u,re,_e),Math.min(Ie,x,ee,Ue),Math.max(ie,u,re,_e),Math.max(Ie,x,ee,Ue)]}else if(C.type==="ellipse"){var We=(ve-pe)/2,Ye=(ae-te)/2,Ze=Math.cos(C.angle),Je=Math.sin(C.angle),nt=Math.hypot(We*Ze,Ye*Je),dt=Math.hypot(Ye*Ze,We*Je);_=[H-nt,le-dt,H+nt,le+dt]}else{var ge=(0,v.U1)(pe,te,H,le,C.angle),Se=(0,j.Z)(ge,2),Be=Se[0],Xe=Se[1],lt=(0,v.U1)(pe,ae,H,le,C.angle),it=(0,j.Z)(lt,2),yt=it[0],_t=it[1],ut=(0,v.U1)(ve,ae,H,le,C.angle),Tt=(0,j.Z)(ut,2),Yt=Tt[0],Zt=Tt[1],Pt=(0,v.U1)(ve,te,H,le,C.angle),en=(0,j.Z)(Pt,2),tn=en[0],ot=en[1];_=[Math.min(Be,yt,Yt,tn),Math.min(Xe,_t,Zt,ot),Math.max(Be,yt,Yt,tn),Math.max(Xe,_t,Zt,ot)]}return _}}]),I}();be.boundsCache=new WeakMap;var we=function(I){var C=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if((0,a.F9)(I))return L(I);if((0,a.bt)(I))return K._.getElementAbsoluteCoords(I,C);if((0,a.iB)(I)){var _=(0,R.tl)(I);if((0,a.Yv)(_)){var N=K._.getBoundTextElementPosition(_,I);return[N.x,N.y,N.x+I.width,N.y+I.height,N.x+I.width/2,N.y+I.height/2]}}return[I.x,I.y,I.x+I.width,I.y+I.height,I.x+I.width/2,I.y+I.height/2]},xe=function(I){var C=we(I),_=(0,j.Z)(C,6),N=_[0],q=_[1],pe=_[2],te=_[3],ve=_[4],ae=_[5],H=[ve,ae];if((0,a.bt)(I)||(0,a.F9)(I)){for(var le=[],ke=0;ke<I.points.length-1;)le.push([(0,v.xj)([I.points[ke][0]+I.x,I.points[ke][1]+I.y],H,I.angle),(0,v.xj)([I.points[ke+1][0]+I.x,I.points[ke+1][1]+I.y],H,I.angle)]),ke++;return le}var Le=[[N,q],[pe,q],[N,te],[pe,te],[ve,q],[ve,te],[N,ae],[pe,ae]].map(function(s){return(0,v.xj)(s,H,I.angle)}),Ge=(0,j.Z)(Le,8),Ne=Ge[0],Ce=Ge[1],Oe=Ge[2],De=Ge[3],Ae=Ge[4],ie=Ge[5],Ie=Ge[6],oe=Ge[7];return I.type==="diamond"?[[Ae,Ie],[Ae,oe],[ie,Ie],[ie,oe]]:I.type==="ellipse"?[[Ae,Ie],[Ae,oe],[ie,Ie],[ie,oe],[Ae,Ie],[Ae,oe],[ie,Ie],[ie,oe]]:[[Ne,Ce],[Oe,De],[Ne,Oe],[Ce,De],[Ne,oe],[Oe,oe],[Ce,Ie],[De,Ie]]},ce=function(I){return[I.x,I.y,I.x+I.width,I.y+I.height,I.x+I.width/2,I.y+I.height/2]},D=function(I){var C=Math.floor(I.width/2)+1,_=I.width,N=Math.floor(I.height/2)+1;return[C,0,_,N,C,I.height,0,N]},ne=function(I){var C,_=G(I.sets);try{for(_.s();!(C=_.n()).done;){var N=C.value;if(N.type==="path")return N.ops}}catch(q){_.e(q)}finally{_.f()}return I.sets[0].ops},S=function(I,C,_,N,q){var pe=1-I;return Math.pow(pe,3)*C+3*Math.pow(pe,2)*I*_+3*pe*Math.pow(I,2)*N+Math.pow(I,3)*q},z=function(I,C,_,N){var q=C-I,pe=_-C,te=3*q-6*pe+3*(N-_),ve=6*pe-6*q,ae=3*q,H=ve*ve-4*te*ae;if(!(H>=0))return!1;var le=null,ke=null,Le=1/0,Ge=1/0;return te===0?Le=Ge=-ae/ve:(Le=(-ve+Math.sqrt(H))/(2*te),Ge=(-ve-Math.sqrt(H))/(2*te)),Le>=0&&Le<=1&&(le=S(Le,I,C,_,N)),Ge>=0&&Ge<=1&&(ke=S(Ge,I,C,_,N)),[le,ke]},A=function(I,C){var _=[0,0],N=I.reduce(function(q,pe){var te=pe.op,ve=pe.data;if(te==="move")_=ve;else if(te==="bcurveTo"){var ae=[ve[0],ve[1]],H=[ve[2],ve[3]],le=[ve[4],ve[5]],ke=C?C.apply(void 0,ae):ae,Le=C?C.apply(void 0,H):H,Ge=C?C.apply(void 0,le):le,Ne=C?C.apply(void 0,(0,T.Z)(_)):_;_=le;var Ce=function(oe,s,u,x){var V=z(oe[0],s[0],u[0],x[0]),W=z(oe[1],s[1],u[1],x[1]),re=Math.min(oe[0],x[0]),ee=Math.max(oe[0],x[0]);if(V){var se=V.filter(function(We){return We!==null});re=Math.min.apply(Math,[re].concat((0,T.Z)(se))),ee=Math.max.apply(Math,[ee].concat((0,T.Z)(se)))}var Ee=Math.min(oe[1],x[1]),_e=Math.max(oe[1],x[1]);if(W){var Ue=W.filter(function(We){return We!==null});Ee=Math.min.apply(Math,[Ee].concat((0,T.Z)(Ue))),_e=Math.max.apply(Math,[_e].concat((0,T.Z)(Ue)))}return[re,Ee,ee,_e]}(Ne,ke,Le,Ge),Oe=(0,j.Z)(Ce,4),De=Oe[0],Ae=Oe[1],ie=Oe[2],Ie=Oe[3];q.minX=Math.min(q.minX,De),q.minY=Math.min(q.minY,Ae),q.maxX=Math.max(q.maxX,ie),q.maxY=Math.max(q.maxY,Ie)}return q},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[N.minX,N.minY,N.maxX,N.maxY]},E=function(I){var C,_=1/0,N=1/0,q=-1/0,pe=-1/0,te=G(I);try{for(te.s();!(C=te.n()).done;){var ve=(0,j.Z)(C.value,2),ae=ve[0],H=ve[1];_=Math.min(_,ae),N=Math.min(N,H),q=Math.max(q,ae),pe=Math.max(pe,H)}}catch(le){te.e(le)}finally{te.f()}return[_,N,q,pe]},L=function(I){var C=E(I.points),_=(0,j.Z)(C,4),N=_[0],q=_[1],pe=_[2],te=_[3],ve=N+I.x,ae=q+I.y,H=pe+I.x,le=te+I.y;return[ve,ae,H,le,(ve+H)/2,(ae+le)/2]},h=function(I,C,_,N){var q=ne(C[0]);if(q.length<1)return null;var pe=_==="start"?1:q.length-1,te=q[pe].data,ve=[te[4],te[5]],ae=[te[2],te[3]],H=[te[0],te[1]],le=q[pe-1],ke=[0,0];le.op==="move"?ke=le.data:le.op==="bcurveTo"&&(ke=[le.data[4],le.data[5]]);var Le=function(Zt,Pt){return Math.pow(1-Zt,3)*ve[Pt]+3*Zt*Math.pow(1-Zt,2)*ae[Pt]+3*Math.pow(Zt,2)*(1-Zt)*H[Pt]+ke[Pt]*Math.pow(Zt,3)},Ge=_==="start"?ke:ve,Ne=(0,j.Z)(Ge,2),Ce=Ne[0],Oe=Ne[1],De=[Le(.3,0),Le(.3,1)],Ae=De[0],ie=De[1],Ie=Math.hypot(Ce-Ae,Oe-ie),oe=(Ce-Ae)/Ie,s=(Oe-ie)/Ie,u={arrow:30,bar:15,dot:15,triangle:15}[N],x=0;if(N==="arrow"){var V=(0,j.Z)(I.points[I.points.length-1],2),W=V[0],re=V[1],ee=I.points.length>1?I.points[I.points.length-2]:[0,0],se=(0,j.Z)(ee,2),Ee=se[0],_e=se[1];x=Math.hypot(W-Ee,re-_e)}else for(var Ue=0;Ue<I.points.length;Ue++){var We=I.points[Ue-1]||[0,0],Ye=(0,j.Z)(We,2),Ze=Ye[0],Je=Ye[1],nt=(0,j.Z)(I.points[Ue],2),dt=nt[0],ge=nt[1];x+=Math.hypot(dt-Ze,ge-Je)}var Se=Math.min(u,x/2),Be=Ce-oe*Se,Xe=Oe-s*Se;if(N==="dot")return[Ce,Oe,Math.hypot(Xe-Oe,Be-Ce)+I.strokeWidth];var lt={arrow:20,bar:90,triangle:25}[N],it=(0,v.U1)(Be,Xe,Ce,Oe,-lt*Math.PI/180),yt=(0,j.Z)(it,2),_t=yt[0],ut=yt[1],Tt=(0,v.U1)(Be,Xe,Ce,Oe,lt*Math.PI/180),Yt=(0,j.Z)(Tt,2);return[Ce,Oe,_t,ut,Yt[0],Yt[1]]},y=function(I,C,_){var N;if(I.points.length<2){var q=(0,j.Z)(I.points[0],2),pe=q[0],te=q[1],ve=(0,v.U1)(I.x+pe,I.y+te,C,_,I.angle),ae=(0,j.Z)(ve,2),H=ae[0],le=ae[1],ke=[H,le,H,le],Le=(0,R.WJ)(I);if(Le){var Ge=K._.getMinMaxXYWithBoundText(I,[H,le,H,le],Le);ke=[Ge[0],Ge[1],Ge[2],Ge[3]]}return ke}var Ne=(N=U.R.get(I))===null||N===void 0?void 0:N[0],Ce=Ne??function(oe){var s=k.Z.generator(),u=(0,g.Z)(oe);return s[oe.roundness?"curve":u.fill?"polygon":"linearPath"](oe.points,u)}(I),Oe=ne(Ce),De=A(Oe,function(oe,s){return(0,v.U1)(I.x+oe,I.y+s,C,_,I.angle)}),Ae=[De[0],De[1],De[2],De[3]],ie=(0,R.WJ)(I);if(ie){var Ie=K._.getMinMaxXYWithBoundText(I,Ae,ie);Ae=[Ie[0],Ie[1],Ie[2],Ie[3]]}return Ae},r=function(I){return be.getBounds(I)},M=function(I){if(!I.length)return[0,0,0,0];var C=1/0,_=-1/0,N=1/0,q=-1/0;return I.forEach(function(pe){var te=r(pe),ve=(0,j.Z)(te,4),ae=ve[0],H=ve[1],le=ve[2],ke=ve[3];C=Math.min(C,ae),N=Math.min(N,H),_=Math.max(_,le),q=Math.max(q,ke)}),[C,N,_,q]},p=function(I,C){var _=M(I),N=(0,j.Z)(_,4),q=N[0],pe=N[1],te=N[2],ve=N[3];return[q+C.x,pe+C.y,te+C.x,ve+C.y]},c=function(I,C,_,N){if(!(0,a.bt)(I)&&!(0,a.F9)(I))return[I.x,I.y,I.x+C,I.y+_];var q,pe=(0,P.z)(0,C,(0,P.z)(1,_,I.points,N),N);if((0,a.F9)(I))q=E(pe);else{var te=k.Z.generator(),ve=I.roundness?te.curve(pe,(0,g.Z)(I)):te.linearPath(pe,(0,g.Z)(I)),ae=ne(ve);q=A(ae)}var H=q,le=(0,j.Z)(H,4),ke=le[0],Le=le[1],Ge=le[2],Ne=le[3];return[ke+I.x,Le+I.y,Ge+I.x,Ne+I.y]},w=function(I,C){var _=k.Z.generator(),N=I.roundness==null?_.linearPath(C,(0,g.Z)(I)):_.curve(C,(0,g.Z)(I)),q=ne(N),pe=A(q),te=(0,j.Z)(pe,4),ve=te[0],ae=te[1],H=te[2],le=te[3];return[ve+I.x,ae+I.y,H+I.x,le+I.y]},O=function(I,C){if(!I.length)return[0,0,0,0];var _=1/0,N=I[0];return I.forEach(function(q){var pe=r(q),te=(0,j.Z)(pe,4),ve=te[0],ae=te[1],H=te[2],le=te[3],ke=(0,v.LW)((ve+H)/2,(ae+le)/2,C.x,C.y);ke<_&&(_=ke,N=q)}),r(N)},$=function(I){var C=M(I),_=(0,j.Z)(C,4),N=_[0],q=_[1],pe=_[2],te=_[3];return{minX:N,minY:q,maxX:pe,maxY:te,width:pe-N,height:te-q,midX:(N+pe)/2,midY:(q+te)/2}}},3528:function(fe,Q,t){t.d(Q,{uu:function(){return ve},T_:function(){return W},j_:function(){return re},oT:function(){return le},wX:function(){return _},MZ:function(){return ee},wB:function(){return N},Qu:function(){return q},pX:function(){return te},fb:function(){return ae}});var T=t(2577),j=function(ge,Se){return[0,0,0,0,Se,ge,1,0]},f=function(ge,Se){return[0,0,0,0,Se,ge,0,0]},l=function(){var ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Be=[0,0,0,0,0,0,0,0];if(Se<0||Se>7)throw new Error("Expected `index` between 0 and 7, got `".concat(Se,"`"));return ge!==0&&(Be[Se]=ge),Be},v=function(ge){return[ge[0],ge[1],ge[2],ge[3],-ge[4],-ge[5],-ge[6],-ge[7]]},k=function(ge,Se){return G(Se)?[ge[0]-Se,ge[1],ge[2],ge[3],ge[4],ge[5],ge[6],ge[7]]:[ge[0]-Se[0],ge[1]-Se[1],ge[2]-Se[2],ge[3]-Se[3],ge[4]-Se[4],ge[5]-Se[5],ge[6]-Se[6],ge[7]-Se[7]]},g=function(ge,Se){return G(Se)?[ge[0]*Se,ge[1]*Se,ge[2]*Se,ge[3]*Se,ge[4]*Se,ge[5]*Se,ge[6]*Se,ge[7]*Se]:[a(ge,Se),Se[1]*ge[0]+Se[0]*ge[1]-Se[4]*ge[2]+Se[5]*ge[3]+Se[2]*ge[4]-Se[3]*ge[5]-Se[7]*ge[6]-Se[6]*ge[7],Se[2]*ge[0]+Se[0]*ge[2]-Se[6]*ge[3]+Se[3]*ge[6],Se[3]*ge[0]+Se[6]*ge[2]+Se[0]*ge[3]-Se[2]*ge[6],Se[4]*ge[0]+Se[2]*ge[1]-Se[1]*ge[2]+Se[7]*ge[3]+Se[0]*ge[4]+Se[6]*ge[5]-Se[5]*ge[6]+Se[3]*ge[7],Se[5]*ge[0]-Se[3]*ge[1]+Se[7]*ge[2]+Se[1]*ge[3]-Se[6]*ge[4]+Se[0]*ge[5]+Se[4]*ge[6]+Se[2]*ge[7],Se[6]*ge[0]+Se[3]*ge[2]-Se[2]*ge[3]+Se[0]*ge[6],Se[7]*ge[0]+Se[6]*ge[1]+Se[5]*ge[2]+Se[4]*ge[3]+Se[3]*ge[4]+Se[2]*ge[5]+Se[1]*ge[6]+Se[0]*ge[7]]},a=function(ge,Se){return Se[0]*ge[0]+Se[2]*ge[2]+Se[3]*ge[3]-Se[6]*ge[6]},P=function(ge,Se){return[R(ge,Se),ge[1]*Se[7]+ge[4]*Se[5]-ge[5]*Se[4]+ge[7]*Se[1],ge[2]*Se[7]-ge[4]*Se[6]+ge[6]*Se[4]+ge[7]*Se[2],ge[3]*Se[7]+ge[5]*Se[6]-ge[6]*Se[5]+ge[7]*Se[3],ge[4]*Se[7]+ge[7]*Se[4],ge[5]*Se[7]+ge[7]*Se[5],ge[6]*Se[7]+ge[7]*Se[6],ge[7]*Se[7]]},R=function(ge,Se){return ge[0]*Se[7]+ge[1]*Se[6]+ge[2]*Se[5]+ge[3]*Se[4]+ge[4]*Se[3]+ge[5]*Se[2]+ge[6]*Se[1]+ge[7]*Se[0]},K=function(ge){return Math.sqrt(Math.abs(ge[0]*ge[0]-ge[2]*ge[2]-ge[3]*ge[3]+ge[6]*ge[6]))},U=function(ge){var Se=K(ge);if(Se===0||Se===1)return ge;var Be=ge[6]<0?-1:1;return g(ge,Be/Se)},m=function(ge){var Se=function(Be){return Math.sqrt(Math.abs(Be[7]*Be[7]-Be[5]*Be[5]-Be[4]*Be[4]+Be[1]*Be[1]))}(ge);return Se===0||Se===1?ge:g(ge,1/Se)},G=function(ge){return typeof ge=="number"},he=(l(1,1),l(1,2),l(1,3),l(1,4),l(1,5),l(1,6),l(1,7),function(ge,Se,Be){return U([0,Be,ge,Se,0,0,0,0])}),be=function(ge,Se){return U(P(Se,ge))},we=function(ge,Se){return Be=ge,[(Xe=Se)[0]*Be[0]+Xe[2]*Be[2]+Xe[3]*Be[3]-Xe[6]*Be[6],Xe[1]*Be[0]+Xe[0]*Be[1]-Xe[4]*Be[2]+Xe[5]*Be[3]+Xe[2]*Be[4]-Xe[3]*Be[5]-Xe[7]*Be[6]-Xe[6]*Be[7],Xe[2]*Be[0]+Xe[0]*Be[2]-Xe[6]*Be[3]+Xe[3]*Be[6],Xe[3]*Be[0]+Xe[6]*Be[2]+Xe[0]*Be[3]-Xe[2]*Be[6],Xe[4]*Be[0]+Xe[7]*Be[3]+Xe[0]*Be[4]+Xe[3]*Be[7],Xe[5]*Be[0]+Xe[7]*Be[2]+Xe[0]*Be[5]+Xe[2]*Be[7],Xe[6]*Be[0]+Xe[0]*Be[6],Xe[7]*Be[0]+Xe[0]*Be[7]];var Be,Xe},xe=function(ge){var Se=(0,T.Z)(ge,2),Be=Se[0];return[0,0,0,0,Se[1],Be,1,0]},ce=function(ge){return[ge[5],ge[4]]},D=function(ge){return[0,0,0,0,Math.abs(ge[4]),Math.abs(ge[5]),1,0]},ne=function(ge,Se){return U((Be=ge,[(Xe=Se)[0]*Be[0],Xe[1]*Be[0]+Xe[0]*Be[1],Xe[2]*Be[0]+Xe[0]*Be[2],Xe[3]*Be[0]+Xe[0]*Be[3],Xe[4]*Be[0]+Xe[2]*Be[1]-Xe[1]*Be[2]+Xe[0]*Be[4],Xe[5]*Be[0]-Xe[3]*Be[1]+Xe[1]*Be[3]+Xe[0]*Be[5],Xe[6]*Be[0]+Xe[3]*Be[2]-Xe[2]*Be[3]+Xe[0]*Be[6],Xe[7]*Be[0]+Xe[6]*Be[1]+Xe[5]*Be[2]+Xe[4]*Be[3]+Xe[3]*Be[4]+Xe[2]*Be[5]+Xe[1]*Be[6]]));var Be,Xe},S=function(ge,Se){return K(P(ge,Se))},z=function(ge,Se){return R(ge,Se)},A=function(ge){return[0,0,0,0,ge[4],ge[5],0,0]},E=function(ge,Se){return Be=g(ge,Math.sin(Se/2)),Xe=Math.cos(Se/2),G(Xe)?[Be[0]+Xe,Be[1],Be[2],Be[3],Be[4],Be[5],Be[6],Be[7]]:[Be[0]+Xe[0],Be[1]+Xe[1],Be[2]+Xe[2],Be[3]+Xe[3],Be[4]+Xe[4],Be[5]+Xe[5],Be[6]+Xe[6],Be[7]+Xe[7]];var Be,Xe},L=function(ge,Se){return U(g(g(ge,Se),v(ge)))},h=t(2361),y=t(1493),r=t(4949),M=t(4183),p=t(7651),c=t(9827),w=t(4048),O=t(4761),$=t(2921);function I(ge,Se){var Be=typeof Symbol<"u"&&ge[Symbol.iterator]||ge["@@iterator"];if(!Be){if(Array.isArray(ge)||(Be=function(ut,Tt){if(ut){if(typeof ut=="string")return C(ut,Tt);var Yt=Object.prototype.toString.call(ut).slice(8,-1);if(Yt==="Object"&&ut.constructor&&(Yt=ut.constructor.name),Yt==="Map"||Yt==="Set")return Array.from(ut);if(Yt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Yt))return C(ut,Tt)}}(ge))||Se){Be&&(ge=Be);var Xe=0,lt=function(){};return{s:lt,n:function(){return Xe>=ge.length?{done:!0}:{done:!1,value:ge[Xe++]}},e:function(ut){throw ut},f:lt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
118
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var it,yt=!0,_t=!1;return{s:function(){Be=Be.call(ge)},n:function(){var ut=Be.next();return yt=ut.done,ut},e:function(ut){_t=!0,it=ut},f:function(){try{yt||Be.return==null||Be.return()}finally{if(_t)throw it}}}}function C(ge,Se){(Se==null||Se>ge.length)&&(Se=ge.length);for(var Be=0,Xe=new Array(Se);Be<Se;Be++)Xe[Be]=ge[Be];return Xe}var _=function ge(Se,Be,Xe,lt,it){var yt=10/Be.zoom.value,_t=[lt,it];if(pe(Be,Se)&&(0,w.oY)([Se],Be))return te(Se,_t,yt,Xe);var ut=(0,O.WJ)(Se);return ut&&ge(ut,Be,Xe,lt,it)?!0:q(Se,Be,Xe,_t)},N=function(ge,Se,Be,Xe,lt){var it=10/Se.zoom.value,yt=(0,O.WJ)(ge);return(!yt||!_(yt,Se,Be,Xe,lt))&&!q(ge,Se,Be,[Xe,lt])&&te(ge,[Xe,lt],it,Be)},q=function(ge,Se,Be,Xe){var lt=10/Se.zoom.value,it=(0,p.iB)(ge)?ke:function(yt){if(yt.type==="arrow")return!1;if(yt.type==="freedraw")return!0;var _t=!(0,c.Qm)(yt.backgroundColor)||(0,M.Xo)(yt)||(0,M.gs)(yt);return yt.type==="line"?_t&&(0,h.g6)(yt.points):_t||(0,M.pC)(yt)}(ge)?Le:Ge;return H({element:ge,point:Xe,threshold:lt,check:it,frameNameBoundsCache:Be})},pe=function(ge,Se){return ge.selectedElementIds[Se.id]},te=function(ge,Se,Be,Xe){var lt=(0,T.Z)(Se,2),it=lt[0],yt=lt[1];if(ge.type==="frame")return H({element:ge,point:[it,yt],threshold:Be,check:Le,frameNameBoundsCache:Xe});var _t=(0,r.qf)(ge),ut=(0,T.Z)(_t,4),Tt=ut[0],Yt=ut[1],Zt=ut[2],Pt=ut[3],en=(Tt+Zt)/2,tn=(Yt+Pt)/2,ot=(0,h.U1)(it,yt,en,tn,-ge.angle),It=(0,T.Z)(ot,2),mt=It[0],jt=It[1];return mt>Tt-Be&&mt<Zt+Be&&jt>Yt-Be&&jt<Pt+Be},ve=function(ge,Se){var Be=Se.x,Xe=Se.y,lt=ae(ge,ge.width,ge.height);return H({element:ge,point:[Be,Xe],threshold:lt,check:Ne,frameNameBoundsCache:null})},ae=function(ge,Se,Be){var Xe=(ge.type==="diamond"?1/Math.sqrt(2):1)*Math.min(Se,Be);return Math.max(16,Math.min(.25*Xe,32))},H=function(ge){switch(ge.element.type){case"rectangle":case"embeddable":case"image":case"text":case"diamond":case"ellipse":var Se=le(ge.element,ge.point);return ge.check(Se,ge.threshold);case"freedraw":return!!ge.check(Ce(ge.element,ge.point),ge.threshold)&&Ie(ge.element,ge.point,ge.threshold);case"arrow":case"line":return oe(ge);case"selection":return console.warn("This should not happen, we need to investigate why it does."),!1;case"frame":var Be;if(ge.check(le(ge.element,ge.point),ge.threshold))return!0;var Xe=(Be=ge.frameNameBoundsCache)===null||Be===void 0?void 0:Be.get(ge.element);return!!Xe&&ge.check(Oe(Xe,ge.point),ge.threshold)}},le=function(ge,Se){switch(ge.type){case"rectangle":case"image":case"text":case"embeddable":case"frame":return Ce(ge,Se);case"diamond":return De(ge,Se);case"ellipse":return Ae(ge,Se)}},ke=function(ge,Se){return ge<0},Le=function(ge,Se){return ge<Se},Ge=function(ge,Se){return Math.abs(ge)<Se},Ne=function(ge,Se){return 0<=ge&&ge<Se},Ce=function(ge,Se){var Be=s(ge,Se),Xe=(0,T.Z)(Be,4),lt=Xe[1],it=Xe[2],yt=Xe[3];return Math.max(z(lt,he(0,1,-yt)),z(lt,he(1,0,-it)))},Oe=function(ge,Se){var Be=u(Se,ge),Xe=(0,T.Z)(Be,4),lt=Xe[1],it=Xe[2],yt=Xe[3];return Math.max(z(lt,he(0,1,-yt)),z(lt,he(1,0,-it)))},De=function(ge,Se){var Be=s(ge,Se),Xe=(0,T.Z)(Be,4),lt=Xe[1],it=Xe[2],yt=Xe[3],_t=he(yt,it,-yt*it);return z(lt,_t)},Ae=function(ge,Se){var Be,Xe=ie(ge,Se),lt=(0,T.Z)(Xe,2),it=lt[0],yt=lt[1];return Be=yt,-Math.sign(Be[1])*z(it,yt)},ie=function(ge,Se){var Be=s(ge,Se),Xe=(0,T.Z)(Be,4),lt=Xe[1],it=Xe[2],yt=Xe[3],_t=ce(lt),ut=(0,T.Z)(_t,2),Tt=ut[0],Yt=ut[1],Zt=.707,Pt=.707,en=it,tn=yt;[0,1,2,3].forEach(function(mt){var jt=en*Zt,xt=tn*Pt,Nt=(en*en-tn*tn)*Math.pow(Zt,3)/en,Ut=(tn*tn-en*en)*Math.pow(Pt,3)/tn,rn=jt-Nt,Ft=xt-Ut,Sn=Tt-Nt,mn=Yt-Ut,Yn=Math.hypot(Ft,rn),ht=Math.hypot(mn,Sn);Zt=Math.min(1,Math.max(0,(Sn*Yn/ht+Nt)/en)),Pt=Math.min(1,Math.max(0,(mn*Yn/ht+Ut)/tn));var Xt=Math.hypot(Pt,Zt);Zt/=Xt,Pt/=Xt});var ot,It=j(en*Zt,tn*Pt);return[lt,we(be(lt,ot=It),ot)]},Ie=function(ge,Se,Be){var Xe,lt;if(ge.angle===0)Xe=Se[0]-ge.x,lt=Se[1]-ge.y;else{var it=(0,r.qf)(ge),yt=(0,T.Z)(it,4),_t=yt[0],ut=yt[1],Tt=yt[2],Yt=yt[3],Zt=(0,h.xj)(Se,[_t+(Tt-_t)/2,ut+(Yt-ut)/2],-ge.angle);Xe=Zt[0]-ge.x,lt=Zt[1]-ge.y}var Pt,en=(0,T.Z)(ge.points,2),tn=en[0],ot=en[1];if((0,h.LW)(tn[0],tn[1],Xe,lt)<Be||(0,h.LW)(ot[0],ot[1],Xe,lt)<Be)return!0;for(var It=0;It<ge.points.length;It++){var mt=[ot[0]-tn[0],ot[1]-tn[1]],jt=Math.hypot(mt[1],mt[0]),xt=[mt[0]/jt,mt[1]/jt],Nt=[Xe-tn[0],lt-tn[1]],Ut=(Nt[0]*xt[0]+Nt[1]*xt[1])/Math.hypot(xt[1],xt[0]);Pt=[tn[0]+xt[0]*Ut,tn[1]+xt[1]*Ut];var rn=(0,h.LW)(Pt[0],Pt[1],tn[0],tn[1]),Ft=(0,h.LW)(Pt[0],Pt[1],ot[0],ot[1]);if(Pt=Ft<rn&&rn>jt?ot:rn<Ft&&Ft>jt?tn:Pt,Math.hypot(lt-Pt[1],Xe-Pt[0])<Be)return!0;tn=ot,ot=ge.points[It+1]}var Sn=$.R.get(ge);return!(!Sn||!Sn.sets.length)&&(ge.fillStyle==="solid"?nt(Sn,Xe,lt,"round"):dt(Sn,Xe,lt,Be))},oe=function(ge){var Se=ge.element,Be=ge.threshold;if(!$.R.get(Se))return!1;var Xe=s(ge.element,ge.point),lt=(0,T.Z)(Xe,4),it=lt[0],yt=lt[1],_t=lt[2],ut=lt[3],Tt=he(0,1,-ut),Yt=he(1,0,-_t);if(!Le(z(yt,Tt),Be)||!Le(z(yt,Yt),Be))return!1;var Zt=ce(it),Pt=(0,T.Z)(Zt,2),en=Pt[0],tn=Pt[1],ot=$.R.get(Se);return ot?ge.check===Le&&ot.some(function(It){return nt(It,en,tn,Se.roundness?"round":"sharp")})?!0:ot.some(function(It){return dt(It,en,tn,Be)}):!1},s=function(ge,Se){var Be=xe(Se),Xe=(0,r.qf)(ge),lt=(0,T.Z)(Xe,4),it=lt[0],yt=lt[1],_t=lt[2],ut=lt[3],Tt=V(it,yt,_t,ut),Yt=E(Tt,ge.angle),Zt=L(Yt,Be),Pt=k(Zt,A(Tt)),en=D(Pt),tn=f(ge.x,ge.y);return[k(Zt,tn),en,(_t-it)/2,(ut-yt)/2]},u=function(ge,Se){var Be=xe(ge),Xe=(0,r.M$)(Se),lt=(0,T.Z)(Xe,4),it=lt[0],yt=lt[1],_t=lt[2],ut=lt[3],Tt=V(it,yt,_t,ut),Yt=E(Tt,Se.angle),Zt=L(Yt,Be),Pt=k(Zt,A(Tt)),en=D(Pt),tn=f(Se.x,Se.y);return[k(Zt,tn),en,(_t-it)/2,(ut-yt)/2]},x=function(ge){var Se=(0,r.qf)(ge),Be=(0,T.Z)(Se,4),Xe=Be[0],lt=Be[1],it=Be[2],yt=Be[3],_t=V(Xe,lt,it,yt),ut=E(_t,ge.angle),Tt=v(function(Yt){return[1,0,0,0,-.5*Yt[5],.5*Yt[4],0,0]}(A(_t)));return g(Tt,ut)},V=function(ge,Se,Be,Xe){return j((ge+Be)/2,(Se+Xe)/2)},W=function(ge,Se,Be){var Xe,lt=x(ge),it=L(lt,xe(Se)),yt=L(lt,xe(Be)),_t=be(it,yt),ut=ge.height/ge.width,Tt=ge.width/2,Yt=ge.height/2,Zt=_t[2],Pt=_t[3],en=_t[1],tn=Math.abs(Pt),ot=Math.abs(Zt);switch(ge.type){case"rectangle":case"image":case"text":case"embeddable":case"frame":Xe=en/(Tt*(ot+ut*tn));break;case"diamond":Xe=tn<ot?en/(ot*Tt):en/(tn*Yt);break;case"ellipse":Xe=en/(Tt*Math.sqrt(Math.pow(Zt,2)+Math.pow(ut,2)*Math.pow(Pt,2)))}return Xe||0},re=function(ge,Se,Be){if(Se===0){var Xe=(0,r.qf)(ge),lt=(0,T.Z)(Xe,4),it=lt[0],yt=lt[1],_t=lt[2],ut=lt[3],Tt=V(it,yt,_t,ut);return ce(Tt)}var Yt,Zt=x(ge),Pt=L(Zt,xe(Be)),en=v(Zt);switch(ge.type){case"rectangle":case"image":case"text":case"diamond":case"embeddable":case"frame":Yt=Je(ge,Se,Pt);break;case"ellipse":Yt=Ze(ge,Se,Pt)}return ce(L(en,Yt))},ee=function(ge,Se,Be){var Xe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,lt=x(ge),it=L(lt,xe(Se)),yt=L(lt,xe(Be)),_t=be(it,yt),ut=v(lt),Tt=se(ge,_t,it,Xe);return Tt.map(function(Yt){return ce(L(ut,Yt))})},se=function(ge,Se,Be){var Xe,lt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;switch(ge.type){case"rectangle":case"image":case"text":case"diamond":case"embeddable":case"frame":var it=Ee(ge);Xe=it.flatMap(function(_t,ut){var Tt=[_t,it[(ut+1)%4]];return _e(Se,Ue(Tt,lt))}).concat(it.flatMap(function(_t){return Ye(_t,lt,Se)}));break;case"ellipse":Xe=We(ge,lt,Se)}if(Xe.length<2)return[];var yt=Xe.sort(function(_t,ut){return S(_t,Be)-S(ut,Be)});return[yt[0],yt[yt.length-1]]},Ee=function(ge){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Be=Se*ge.width/2,Xe=Se*ge.height/2;switch(ge.type){case"rectangle":case"image":case"text":case"embeddable":case"frame":return[j(Be,Xe),j(Be,-Xe),j(-Be,-Xe),j(-Be,Xe)];case"diamond":return[j(0,Xe),j(Be,0),j(0,-Xe),j(-Be,0)]}},_e=function(ge,Se){var Be=(0,T.Z)(Se,2),Xe=Be[0],lt=Be[1];return z(Xe,ge)*z(lt,ge)>=0?[]:[ne(ge,be(Xe,lt))]},Ue=function(ge,Se){var Be=(0,T.Z)(ge,2),Xe=Be[0],lt=Be[1],it=function(yt,_t){var ut=.5*_t;return[1,0,0,0,ut*yt[4],ut*yt[5],0,0]}(function(yt,_t){return m([0,0,0,0,_t[4]-yt[4],_t[5]-yt[5],0,0])}(Xe,lt),Se);return[L(it,Xe),L(it,lt)]},We=function(ge,Se,Be){var Xe=ge.width/2+Se,lt=ge.height/2+Se,it=Be[2],yt=Be[3],_t=Be[1],ut=Xe*Xe*it*it+lt*lt*yt*yt,Tt=ut-_t*_t;if(ut===0||Tt<=0)return[];var Yt=Math.sqrt(Tt),Zt=-Xe*Xe*it*_t,Pt=-lt*lt*yt*_t;return[j((Zt+Xe*lt*yt*Yt)/ut,(Pt-Xe*lt*it*Yt)/ut),j((Zt-Xe*lt*yt*Yt)/ut,(Pt+Xe*lt*it*Yt)/ut)]},Ye=function(ge,Se,Be){if(Se===0)return z(Be,ge)===0?[ge]:[];var Xe=Be[2],lt=Be[3],it=Be[1],yt=ce(ge),_t=(0,T.Z)(yt,2),ut=_t[0],Tt=_t[1],Yt=Xe*Xe+lt*lt,Zt=Se*Se*Yt-Math.pow(Xe*ut+lt*Tt+it,2);if(Yt===0||Zt<=0)return[];var Pt=Math.sqrt(Zt),en=ut*lt*lt-Tt*Xe*lt-Xe*it,tn=Tt*Xe*Xe-ut*Xe*lt-lt*it;return[j((en+lt*Pt)/Yt,(tn-Xe*Pt)/Yt),j((en-lt*Pt)/Yt,(tn+Xe*Pt)/Yt)]},Ze=function(ge,Se,Be){var Xe=Math.abs(Se),lt=ge.width*Xe/2,it=ge.height*Xe/2,yt=Math.sign(Se),_t=ce(Be),ut=(0,T.Z)(_t,2),Tt=ut[0],Yt=ut[1],Zt=Yt===0?1e-4:Yt,Pt=Math.pow(Tt,2)*Math.pow(it,2)+Math.pow(Zt,2)*Math.pow(lt,2),en=(-Tt*Math.pow(it,2)+yt*Zt*Math.sqrt(Math.max(0,Pt-Math.pow(lt,2)*Math.pow(it,2))))/Pt,tn=(-en*Tt-1)/Zt;tn===0&&(tn=.01*(Object.is(tn,-0)?-1:1));var ot=-Math.pow(lt,2)*en/(Math.pow(tn,2)*Math.pow(it,2)+Math.pow(en,2)*Math.pow(lt,2));return j(ot,(-en*ot-1)/tn)},Je=function(ge,Se,Be){var Xe=Math.abs(Se),lt=Math.sign(Se),it=Ee(ge,Xe),yt=0,_t=null;return it.forEach(function(ut){var Tt=lt*be(Be,ut)[1];Tt>yt&&(yt=Tt,_t=ut)}),_t},nt=function(ge,Se,Be,Xe){var lt,it=[],yt=!1,_t=I((0,r.CM)(ge));try{for(_t.s();!(lt=_t.n()).done;){var ut=lt.value;ut.op==="move"?(yt=!yt)&&it.push([ut.data[0],ut.data[1]]):ut.op==="bcurveTo"?yt&&(it.push([ut.data[0],ut.data[1]]),it.push([ut.data[2],ut.data[3]]),it.push([ut.data[4],ut.data[5]])):ut.op==="lineTo"&&yt&&it.push([ut.data[0],ut.data[1]])}}catch(Yt){_t.e(Yt)}finally{_t.f()}if(it.length>=4){if(Xe==="sharp")return(0,h.c9)(it,Se,Be);var Tt=(0,y.sU)(it,10,5);return(0,h.c9)(Tt,Se,Be)}return!1},dt=function(ge,Se,Be,Xe){var lt=(0,r.CM)(ge),it=[0,0];return lt.some(function(yt,_t){var ut=yt.op,Tt=yt.data;if(ut==="move")it=Tt;else{if(ut==="bcurveTo"){var Yt=[Tt[0],Tt[1]],Zt=[Tt[2],Tt[3]],Pt=[Tt[4],Tt[5]],en=it;it=Pt;var tn=function(ot,It,mt,jt,xt,Nt){for(var Ut=(0,T.Z)(xt,2),rn=Ut[0],Ft=Ut[1],Sn=function(Xt,zt){return Math.pow(1-Xt,3)*jt[zt]+3*Xt*Math.pow(1-Xt,2)*mt[zt]+3*Math.pow(Xt,2)*(1-Xt)*It[zt]+ot[zt]*Math.pow(Xt,3)},mn=0;mn<=1;){var Yn=Sn(mn,0),ht=Sn(mn,1);if(Math.sqrt(Math.pow(Yn-rn,2)+Math.pow(ht-Ft,2))<Nt)return!0;mn+=.01}return!1}(en,Yt,Zt,Pt,[Se,Be],Xe);return tn}if(ut==="lineTo")return nt(ge,Se,Be,"sharp");ut==="qcurveTo"&&console.warn("qcurveTo is not implemented yet")}return!1})}},761:function(fe,Q,t){t.d(Q,{LM:function(){return M},eX:function(){return O},g0:function(){return c},uU:function(){return p},xm:function(){return $}});var T=t(7169),j=t(2577),f=t(2767),l=t(9937),v=t(8227),k=t(9827),g=t(7652),a=t(5742),P=t(4761),R=t(4183),K=t(8020);function U(I,C){var _=typeof Symbol<"u"&&I[Symbol.iterator]||I["@@iterator"];if(!_){if(Array.isArray(I)||(_=function(ae,H){if(ae){if(typeof ae=="string")return m(ae,H);var le=Object.prototype.toString.call(ae).slice(8,-1);if(le==="Object"&&ae.constructor&&(le=ae.constructor.name),le==="Map"||le==="Set")return Array.from(ae);if(le==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(le))return m(ae,H)}}(I))||C){_&&(I=_);var N=0,q=function(){};return{s:q,n:function(){return N>=I.length?{done:!0}:{done:!1,value:I[N++]}},e:function(ae){throw ae},f:q}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
119
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var pe,te=!0,ve=!1;return{s:function(){_=_.call(I)},n:function(){var ae=_.next();return te=ae.done,ae},e:function(ae){ve=!0,pe=ae},f:function(){try{te||_.return==null||_.return()}finally{if(ve)throw pe}}}}function m(I,C){(C==null||C>I.length)&&(C=I.length);for(var _=0,N=new Array(C);_<C;_++)N[_]=I[_];return N}function G(I,C){var _=Object.keys(I);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(I);C&&(N=N.filter(function(q){return Object.getOwnPropertyDescriptor(I,q).enumerable})),_.push.apply(_,N)}return _}function he(I){for(var C=1;C<arguments.length;C++){var _=arguments[C]!=null?arguments[C]:{};C%2?G(Object(_),!0).forEach(function(N){(0,T.Z)(I,N,_[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(_)):G(Object(_)).forEach(function(N){Object.defineProperty(I,N,Object.getOwnPropertyDescriptor(_,N))})}return I}var be=new Map,we=/^(?:http(?:s)?:\/\/)?(?:www\.)?youtu(?:be\.com|\.be)\/(embed\/|watch\?v=|shorts\/|playlist\?list=|embed\/videoseries\?list=)?([a-zA-Z0-9_-]+)(?:\?t=|&t=|\?start=|&start=)?([a-zA-Z0-9_-]+)?[^\s]*$/,xe=/^(?:http(?:s)?:\/\/)?(?:(?:w){3}\.)?(?:player\.)?vimeo\.com\/(?:video\/)?([^?\s]+)(?:\?.*)?$/,ce=/^https:\/\/(?:www\.)?figma\.com/,D=/^https:\/\/gist\.github\.com\/([\w_-]+)\/([\w_-]+)/,ne=/^<script[\s\S]*?\ssrc=["'](https:\/\/gist\.github\.com\/.*?)\.js["']/i,S=/(?:https?:\/\/)?(?:(?:w){3}\.)?(?:twitter|x)\.com\/[^/]+\/status\/(\d+)/,z=/^<blockquote[\s\S]*?\shref=["'](https?:\/\/(?:twitter|x)\.com\/[^"']*)/i,A=/^https:\/\/(?:www\.)?val\.town\/(v|embed)\/[a-zA-Z_$][0-9a-zA-Z_$]+\.[a-zA-Z_$][0-9a-zA-Z_$]+/,E=/^<(?:iframe|blockquote)[\s\S]*?\s(?:src|href)=["']([^"']*)["'][\s\S]*?>$/i,L=/giphy.com\/(?:clips|embed|gifs)\/[a-zA-Z0-9]*?-?([a-zA-Z0-9]+)(?:[^a-zA-Z0-9]|$)/,h=new Set(["youtube.com","youtu.be","vimeo.com","player.vimeo.com","figma.com","link.excalidraw.com","gist.github.com","twitter.com","*.simplepdf.eu","stackblitz.com","val.town","giphy.com"]),y=new Set(["youtube.com","youtu.be","vimeo.com","player.vimeo.com","figma.com","twitter.com","x.com","*.simplepdf.eu","stackblitz.com"]),r=function(I){return"<html><body>".concat(I,"</body></html>")},M=function(I){if(!I)return null;if(be.has(I))return be.get(I);var C=I,_=y.has(w(I,y)||""),N="generic",q={w:560,h:840},pe=I.match(we);if(pe!=null&&pe[2]){var te=pe[3]?"&start=".concat(pe[3]):"",ve=I.includes("shorts");switch(N="video",pe[1]){case"embed/":case"watch?v=":case"shorts/":default:I="https://www.youtube.com/embed/".concat(pe[2],"?enablejsapi=1").concat(te);break;case"playlist?list=":case"embed/videoseries?list=":I="https://www.youtube.com/embed/videoseries?list=".concat(pe[2],"&enablejsapi=1").concat(te)}return q=ve?{w:315,h:560}:{w:560,h:315},be.set(C,{link:I,aspectRatio:q,type:N,sandbox:{allowSameOrigin:_}}),{link:I,aspectRatio:q,type:N,sandbox:{allowSameOrigin:_}}}var ae=I.match(xe);if(ae!=null&&ae[1]){var H=ae==null?void 0:ae[1],le=/^\d+$/.test(H)?void 0:(0,v.t)("toast.unrecognizedLinkFormat");return N="video",I="https://player.vimeo.com/video/".concat(H,"?api=1"),q={w:560,h:315},be.set(C,{link:I,aspectRatio:q,type:N,sandbox:{allowSameOrigin:_}}),{link:I,aspectRatio:q,type:N,warning:le,sandbox:{allowSameOrigin:_}}}if(I.match(ce))return N="generic",I="https://www.figma.com/embed?embed_host=share&url=".concat(encodeURIComponent(I)),q={w:550,h:550},be.set(C,{link:I,aspectRatio:q,type:N,sandbox:{allowSameOrigin:_}}),{link:I,aspectRatio:q,type:N,sandbox:{allowSameOrigin:_}};var ke=I.match(A);if(ke)return I=ke[1]==="embed"?ke[0]:ke[0].replace("/v","/embed"),be.set(C,{link:I,aspectRatio:q,type:N,sandbox:{allowSameOrigin:_}}),{link:I,aspectRatio:q,type:N,sandbox:{allowSameOrigin:_}};if(S.test(I)){var Le=I.match(S)[1],Ge=(0,K.tO)("https://twitter.com/x/status/".concat(Le)),Ne={type:"document",srcdoc:function(oe){return r('<blockquote class="twitter-tweet" data-dnt="true" data-theme="'.concat(oe,'"><a href="').concat(Ge,'"></a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"><\/script>'))},aspectRatio:{w:480,h:480},sandbox:{allowSameOrigin:_}};return be.set(C,Ne),Ne}if(D.test(I)){var Ce=I.match(D),Oe=(0,j.Z)(Ce,3),De=Oe[1],Ae=Oe[2],ie=(0,K.tO)("https://gist.github.com/".concat(De,"/").concat(Ae)),Ie={type:"document",srcdoc:function(){return r(`
|
|
120
|
+
<script src="`.concat(ie,`.js"><\/script>
|
|
121
|
+
<style type="text/css">
|
|
122
|
+
* { margin: 0px; }
|
|
123
|
+
table, .gist { height: 100%; }
|
|
124
|
+
.gist .gist-file { height: calc(100vh - 2px); padding: 0px; display: grid; grid-template-rows: 1fr auto; }
|
|
125
|
+
</style>
|
|
126
|
+
`))},aspectRatio:{w:550,h:720},sandbox:{allowSameOrigin:_}};return be.set(I,Ie),Ie}return be.set(I,{link:I,aspectRatio:q,type:N,sandbox:{allowSameOrigin:_}}),{link:I,aspectRatio:q,type:N,sandbox:{allowSameOrigin:_}}},p=function(I){if((0,R.gs)(I))return!0;if(I.type==="text"){var C=(0,P.tl)(I);if(C&&(0,R.gs)(C))return!0}return!1},c=function(I){var C,_=I.link&&(I==null?void 0:I.link)!==""?I.link:"Empty Web-Embed",N=Math.max(Math.min(I.width/2,I.width/_.length),I.width/30),q=l.ut.Helvetica,pe=(0,k.mO)({fontSize:N,fontFamily:q});return(0,a.VL)({x:I.x+I.width/2,y:I.y+I.height/2,strokeColor:I.strokeColor!=="transparent"?I.strokeColor:"black",backgroundColor:"transparent",fontFamily:q,fontSize:N,text:(0,P.lD)(_,pe,I.width-20),textAlign:"center",verticalAlign:l.oX.MIDDLE,angle:(C=I.angle)!==null&&C!==void 0?C:0})},w=((0,f.z)({name:"setEmbeddableAsActiveTool",trackEvent:{category:"toolbar"},perform:function(I,C,_,N){var q=(0,k.Om)(C,{type:"embeddable"});return(0,g.Uk)(N.canvas,he(he({},C),{},{activeTool:q})),{elements:I,appState:he(he({},C),{},{activeTool:(0,k.Om)(C,{type:"embeddable"})}),commitToHistory:!1}}}),function(I,C){try{var _=new URL(I).hostname.replace(/^www\./,"");if(C instanceof Set){if(h.has(_))return _;var N=_.replace(/^([^.]+)/,"*");return h.has(N)?N:null}var q=C.replace(/^www\./,"");if(_===q)return q}catch{}return null}),O=function(I){var C=I.match(z);if(C&&C.length===2)return C[1];var _=I.match(ne);if(_&&_.length===2)return _[1];if(L.test(I))return"https://giphy.com/embed/".concat(L.exec(I)[1]);var N=I.match(E);return N&&N.length===2?N[1]:I},$=function(I,C){if(!I)return!1;if(C!=null)if(typeof C=="function"){var _=C(I);if(typeof _=="boolean")return _}else{if(typeof C=="boolean")return C;if(C instanceof RegExp)return C.test(I);if(Array.isArray(C)){var N,q=U(C);try{for(q.s();!(N=q.n()).done;){var pe=N.value;if(pe instanceof RegExp){if(I.match(pe))return!0}else if(w(I,pe))return!0}}catch(te){q.e(te)}finally{q.f()}return!1}}return!!w(I,h)}},4178:function(fe,Q,t){t.d(Q,{PK:function(){return K},Xx:function(){return U},bp:function(){return G},oA:function(){return m}});var T=t(2577),j=t(7169),f=t(8950),l=t(2975),v=t.n(l),k=t(9937),g=t(8227),a=t(4183);function P(he,be){var we=Object.keys(he);if(Object.getOwnPropertySymbols){var xe=Object.getOwnPropertySymbols(he);be&&(xe=xe.filter(function(ce){return Object.getOwnPropertyDescriptor(he,ce).enumerable})),we.push.apply(we,xe)}return we}function R(he){for(var be=1;be<arguments.length;be++){var we=arguments[be]!=null?arguments[be]:{};be%2?P(Object(we),!0).forEach(function(xe){(0,j.Z)(he,xe,we[xe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(he,Object.getOwnPropertyDescriptors(we)):P(Object(we)).forEach(function(xe){Object.defineProperty(he,xe,Object.getOwnPropertyDescriptor(we,xe))})}return he}var K=function(he){return new Promise(function(be,we){var xe=new Image;xe.onload=function(){be(xe)},xe.onerror=function(ce){we(ce)},xe.src=he})},U=function(){var he=(0,f.Z)(v().mark(function be(we){var xe,ce,D,ne,S;return v().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return xe=we.fileIds,ce=we.files,D=we.imageCache,ne=new Map,S=new Map,z.next=5,Promise.all(xe.reduce(function(A,E){var L=ce[E];return L&&!ne.has(E)?(ne.set(E,!0),A.concat((0,f.Z)(v().mark(function h(){var y,r,M;return v().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(p.prev=0,L.mimeType!==k.LO.binary){p.next=3;break}throw new Error("Only images can be added to ImageCache");case 3:return y=K(L.dataURL),r={image:y,mimeType:L.mimeType},D.set(E,r),p.next=8,y;case 8:M=p.sent,D.set(E,R(R({},r),{},{image:M})),p.next=15;break;case 12:p.prev=12,p.t0=p.catch(0),S.set(E,!0);case 15:case"end":return p.stop()}},h,null,[[0,12]])}))())):A},[]));case 5:return z.abrupt("return",{imageCache:D,updatedFiles:ne,erroredFiles:S});case 6:case"end":return z.stop()}},be)}));return function(be){return he.apply(this,arguments)}}(),m=function(he){return he.filter(function(be){return(0,a.wi)(be)})},G=function(){var he=(0,f.Z)(v().mark(function be(we){var xe,ce,D,ne,S,z,A;return v().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:if(xe=new DOMParser().parseFromString(we,k.LO.svg),ce=xe.querySelector("svg"),!xe.querySelector("parsererror")&&((L=ce)==null?void 0:L.nodeName.toLowerCase())==="svg"){E.next=7;break}throw new Error((0,g.t)("errors.invalidSVGString"));case 7:return ce.hasAttribute("xmlns")||ce.setAttribute("xmlns",k.hR),ce.hasAttribute("width")&&ce.hasAttribute("height")||(D=ce.getAttribute("viewBox"),ne=ce.getAttribute("width")||"50",S=ce.getAttribute("height")||"50",D&&(z=D.match(/\d+ +\d+ +(\d+) +(\d+)/))&&(A=(0,T.Z)(z,3),ne=A[1],S=A[2]),ce.setAttribute("width",ne),ce.setAttribute("height",S)),E.abrupt("return",ce.outerHTML);case 10:case"end":return E.stop()}var L},be)}));return function(be){return he.apply(this,arguments)}}()},7651:function(fe,Q,t){t.d(Q,{ox:function(){return k.ox},BQ:function(){return _},_M:function(){return N},EJ:function(){return L},o8:function(){return S},Sy:function(){return l.Sy},Y5:function(){return v.Y5},os:function(){return v.os},KP:function(){return v.KP},Un:function(){return he},UC:function(){return v.UC},$V:function(){return E},qf:function(){return v.qf},Pi:function(){return v.Pi},jt:function(){return U},o4:function(){return j.o4},Lm:function(){return O},Xf:function(){return $},Qp:function(){return j.Qp},T:function(){return be.T},xx:function(){return be.xx},Uo:function(){return c},n2:function(){return m},PC:function(){return k.PC},kK:function(){return k.kK},n_:function(){return w},wX:function(){return g.wX},r2:function(){return f.r2},He:function(){return f.He},wB:function(){return g.wB},QD:function(){return j.QD},qP:function(){return I},iB:function(){return f.iB},Up:function(){return l.Up},vw:function(){return l.vw},y8:function(){return l.y8},VL:function(){return l.VL},oN:function(){return ce.oN},JZ:function(){return l.JZ},RT:function(){return r},b_:function(){return h.b_},vY:function(){return be.vY},N_:function(){return l.N_}});var T=t(7169),j=t(7935),f=t(4183),l=t(5742),v=t(4949),k=t(4048),g=t(3528),a=t(2577),P=t(2726),R=["rotation"],K=function(q,pe,te){return pe>=q[0]&&pe<=q[0]+q[2]&&te>=q[1]&&te<=q[1]+q[3]},U=function(q,pe,te,ve,ae,H){return q.reduce(function(le,ke){if(le)return le;var Le=function(Ge,Ne,Ce,Oe,De,Ae){if(!Ne.selectedElementIds[Ge.id])return!1;var ie=(0,k.PC)(Ge,De,Ae),Ie=ie.rotation,oe=(0,P.Z)(ie,R);if(Ie&&K(Ie,Ce,Oe))return"rotation";var s=Object.keys(oe).filter(function(u){var x=oe[u];return!!x&&K(x,Ce,Oe)});return s.length>0&&s[0]}(ke,pe,te,ve,ae,H);return Le?{element:ke,transformHandleType:Le}:null},null)},m=function(q,pe,te,ve,ae){var H=(0,a.Z)(q,4),le=H[0],ke=H[1],Le=H[2],Ge=H[3],Ne=(0,k.kK)([le,ke,Le,Ge,(le+Le)/2,(ke+Ge)/2],0,ve,ae,k.ox);return Object.keys(Ne).find(function(Ce){var Oe=Ne[Ce];return Oe&&K(Oe,pe,te)})||!1},G=["ns","nesw","ew","nwse"],he=function(q){var pe=q.element,te=q.transformHandleType,ve=pe&&Math.sign(pe.height)*Math.sign(pe.width)==-1,ae=null;switch(te){case"n":case"s":ae="ns";break;case"w":case"e":ae="ew";break;case"nw":case"se":ae=ve?"nesw":"nwse";break;case"ne":case"sw":ae=ve?"nwse":"nesw";break;case"rotation":return"grab"}return ae&&pe&&(ae=function(H,le){var ke=G.indexOf(H);if(ke>=0){var Le=Math.round(le/(Math.PI/4));H=G[(ke+Le)%G.length]}return H}(ae,pe.angle)),ae?"".concat(ae,"-resize"):""},be=t(4381),we=t(9645),xe=t(583),ce=t(4761),D=t(9215),ne=t(2361),S=function(q,pe,te,ve,ae,H,le){var ke=new Set(pe),Le=pe.filter(function(Ce){return(0,f.He)(Ce)}).map(function(Ce){return Ce.id});Le.length>0&&ae.getNonDeletedElements().filter(function(Ce){return!(0,f.Xh)(Ce)}).filter(function(Ce){return Ce.frameId!==null}).filter(function(Ce){return Le.includes(Ce.frameId)}).forEach(function(Ce){return ke.add(Ce)});var Ge=(0,v.KP)(Array.from(ke).map(function(Ce){var Oe;return(Oe=q.originalElements.get(Ce.id))!==null&&Oe!==void 0?Oe:Ce})),Ne=z(Ge,te,H,le);ke.forEach(function(Ce){if(A(q,Ce,Ne),!(0,f.Yv)(Ce)&&(!Ce.groupIds.length||ve.editingGroupId&&!(0,D.zq)(ve,Ce))){var Oe=(0,ce.WJ)(Ce);Oe&&A(q,Oe,Ne)}(0,we.Ww)(Ce,{simultaneouslyUpdated:Array.from(ke)})})},z=function(q,pe,te,ve){var ae=(0,a.Z)(q,2),H=ae[0],le=ae[1],ke=H+pe.x+te.x,Le=le+pe.y+te.y;if(te.x===0||te.y===0){var Ge=(0,ne.wC)(H+pe.x,le+pe.y,ve),Ne=(0,a.Z)(Ge,2),Ce=Ne[0],Oe=Ne[1];te.x===0&&(ke=Ce),te.y===0&&(Le=Oe)}return{x:ke-H,y:Le-le}},A=function(q,pe,te){var ve,ae=(ve=q.originalElements.get(pe.id))!==null&&ve!==void 0?ve:pe,H=ae.x+te.x,le=ae.y+te.y;(0,xe.DR)(pe,{x:H,y:le})},E=function(q,pe,te){var ve=(0,v.KP)(q),ae=(0,a.Z)(ve,2);return[pe-ae[0],te-ae[1]]},L=function(q,pe,te,ve,ae,H,le,ke,Le,Ge,Ne){var Ce=arguments.length>11&&arguments[11]!==void 0?arguments[11]:null;if(Le&&q.type!=="selection")if(Ne)ke=le/Ne;else{if(Math.abs(H-ve)>Math.abs(ae-te)){var Oe=(0,j.uK)(pe,ke,ae<te?-le:le);le=Oe.width,ke=Oe.height}else{var De=(0,j.uK)(pe,le,H<ve?-ke:ke);le=De.width,ke=De.height}ke<0&&(ke=-ke)}var Ae,ie,Ie=ae<te?te-le:te,oe=H<ve?ve-ke:ve;Ge&&(Ie=te-(le+=le)/2,oe=ve-(ke+=ke)/2),le!==0&&ke!==0&&(0,xe.DR)(q,{x:Ie+((Ae=Ce==null?void 0:Ce.x)!==null&&Ae!==void 0?Ae:0),y:oe+((ie=Ce==null?void 0:Ce.y)!==null&&ie!==void 0?ie:0),width:le,height:ke})},h=t(3474),y=t(4105),r=function(q,pe){return!!(!q.viewModeEnabled&&(q.activeTool.type!=="custom"&&(q.editingElement||q.activeTool.type!=="selection"&&q.activeTool.type!=="eraser"&&q.activeTool.type!=="hand"&&q.activeTool.type!=="laser")||(0,y.eD)(pe,q).length))};function M(q,pe){var te=Object.keys(q);if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(q);pe&&(ve=ve.filter(function(ae){return Object.getOwnPropertyDescriptor(q,ae).enumerable})),te.push.apply(te,ve)}return te}function p(q){for(var pe=1;pe<arguments.length;pe++){var te=arguments[pe]!=null?arguments[pe]:{};pe%2?M(Object(te),!0).forEach(function(ve){(0,T.Z)(q,ve,te[ve])}):Object.getOwnPropertyDescriptors?Object.defineProperties(q,Object.getOwnPropertyDescriptors(te)):M(Object(te)).forEach(function(ve){Object.defineProperty(q,ve,Object.getOwnPropertyDescriptor(te,ve))})}return q}var c=function(q){return q.reduce(function(pe,te){return pe+te.version},0)},w=function(q){return q.filter(function(pe){return!pe.isDeleted&&!(0,j.QD)(pe)})},O=function(q){return q.filter(function(pe){return!pe.isDeleted})},$=function(q){return q.filter(function(pe){return!pe.isDeleted})},I=function(q){return!q.isDeleted},C=function(q){return O(q).map(function(pe){return(0,f.dt)(pe.type)?p(p({},pe),{},{lastCommittedPoint:null}):pe})},_=function(q){return C(q)},N=function(q){return C(q)}},7422:function(fe,Q,t){t.d(Q,{_:function(){return z}});var T=t(1930),j=t(7169),f=t(2577),l=t(8821),v=t(5169),k=t(2361),g=t(7651),a=t(4949),P=t(583),R=t(457),K=t(9645),U=t(9827),m=t(4183),G=t(5491),he=t(4761),be=t(9937),we=t(2921);function xe(E,L){var h=typeof Symbol<"u"&&E[Symbol.iterator]||E["@@iterator"];if(!h){if(Array.isArray(E)||(h=function(w,O){if(w){if(typeof w=="string")return ce(w,O);var $=Object.prototype.toString.call(w).slice(8,-1);if($==="Object"&&w.constructor&&($=w.constructor.name),$==="Map"||$==="Set")return Array.from(w);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return ce(w,O)}}(E))||L){h&&(E=h);var y=0,r=function(){};return{s:r,n:function(){return y>=E.length?{done:!0}:{done:!1,value:E[y++]}},e:function(w){throw w},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
127
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var M,p=!0,c=!1;return{s:function(){h=h.call(E)},n:function(){var w=h.next();return p=w.done,w},e:function(w){c=!0,M=w},f:function(){try{p||h.return==null||h.return()}finally{if(c)throw M}}}}function ce(E,L){(L==null||L>E.length)&&(L=E.length);for(var h=0,y=new Array(L);h<L;h++)y[h]=E[h];return y}function D(E,L){var h=Object.keys(E);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(E);L&&(y=y.filter(function(r){return Object.getOwnPropertyDescriptor(E,r).enumerable})),h.push.apply(h,y)}return h}function ne(E){for(var L=1;L<arguments.length;L++){var h=arguments[L]!=null?arguments[L]:{};L%2?D(Object(h),!0).forEach(function(y){(0,j.Z)(E,y,h[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(h)):D(Object(h)).forEach(function(y){Object.defineProperty(E,y,Object.getOwnPropertyDescriptor(h,y))})}return E}var S={version:null,points:[],zoom:null},z=function(){function E(L,h){(0,l.Z)(this,E),this.elementId=L.id,R.Z.mapElementToScene(this.elementId,h),E.normalizePoints(L),this.selectedPointsIndices=null,this.lastUncommittedPoint=null,this.isDragging=!1,this.pointerOffset={x:0,y:0},this.startBindingElement="keep",this.endBindingElement="keep",this.pointerDownState={prevSelectedPointsIndices:null,lastClickedPoint:-1,origin:null,segmentMidpoint:{value:null,index:null,added:!1}},this.hoverPointIndex=-1,this.segmentMidPointHoveredCoords=null}return(0,v.Z)(E,null,[{key:"getElement",value:function(L){var h,y=(h=R.Z.getScene(L))===null||h===void 0?void 0:h.getNonDeletedElement(L);return y||null}},{key:"handleBoxSelection",value:function(L,h,y){var r;if(!h.editingLinearElement||((r=h.draggingElement)===null||r===void 0?void 0:r.type)!=="selection")return!1;var M=h.editingLinearElement,p=M.selectedPointsIndices,c=M.elementId,w=E.getElement(c);if(!w)return!1;var O=(0,g.qf)(h.draggingElement),$=(0,f.Z)(O,4),I=$[0],C=$[1],_=$[2],N=$[3],q=E.getPointsGlobalCoordinates(w).reduce(function(pe,te,ve){return(te[0]>=I&&te[0]<=_&&te[1]>=C&&te[1]<=N||L.shiftKey&&p!=null&&p.includes(ve))&&pe.push(ve),pe},[]);y({editingLinearElement:ne(ne({},M),{},{selectedPointsIndices:q.length?q:null})})}},{key:"handlePointDragging",value:function(L,h,y,r,M,p){if(!p)return!1;var c=p.selectedPointsIndices,w=p.elementId,O=E.getElement(w);if(!O)return!1;var $=O.points[p.pointerDownState.lastClickedPoint];if(c&&$){if((0,G.Ge)(L)&&c.length===1&&O.points.length>1){var I=c[0],C=O.points[I===0?1:I-1],_=E._getShiftLockedDelta(O,C,[y,r],L[G.tW.CTRL_OR_CMD]?null:h.gridSize),N=(0,f.Z)(_,2),q=N[0],pe=N[1];E.movePoints(O,[{index:I,point:[q+C[0],pe+C[1]],isDragging:I===p.pointerDownState.lastClickedPoint}])}else{var te=E.createPointAt(O,y-p.pointerOffset.x,r-p.pointerOffset.y,L[G.tW.CTRL_OR_CMD]?null:h.gridSize),ve=te[0]-$[0],ae=te[1]-$[1];E.movePoints(O,c.map(function(ke){return{index:ke,point:ke===p.pointerDownState.lastClickedPoint?E.createPointAt(O,y-p.pointerOffset.x,r-p.pointerOffset.y,L[G.tW.CTRL_OR_CMD]?null:h.gridSize):[O.points[ke][0]+ve,O.points[ke][1]+ae],isDragging:ke===p.pointerDownState.lastClickedPoint}}))}if((0,he.WJ)(O)&&(0,he.RB)(O,!1),(0,m.Mn)(O,!1)){var H=[];c[0]===0&&H.push((0,U.AK)(E.getPointGlobalCoordinates(O,O.points[0])));var le=c[c.length-1];le===O.points.length-1&&H.push((0,U.AK)(E.getPointGlobalCoordinates(O,O.points[le]))),H.length&&M(O,H)}return!0}return!1}},{key:"handlePointerUp",value:function(L,h,y){var r,M=h.elementId,p=h.selectedPointsIndices,c=h.isDragging,w=h.pointerDownState,O=E.getElement(M);if(!O)return h;var $={};if(c&&p){var I,C=xe(p);try{for(C.s();!(I=C.n()).done;){var _=I.value;if(_===0||_===O.points.length-1){(0,k.g6)(O.points,y.zoom.value)&&E.movePoints(O,[{index:_,point:_===0?O.points[O.points.length-1]:O.points[0]}]);var N=(0,K.N1)(y)?(0,K.Y9)((0,U.AK)(E.getPointAtIndexGlobalCoordinates(O,_)),R.Z.getScene(O)):null;$[_===0?"startBindingElement":"endBindingElement"]=N}}}catch(q){C.e(q)}finally{C.f()}}return ne(ne(ne({},h),$),{},{selectedPointsIndices:c||L.shiftKey?!c&&L.shiftKey&&(r=w.prevSelectedPointsIndices)!==null&&r!==void 0&&r.includes(w.lastClickedPoint)?p&&p.filter(function(q){return q!==w.lastClickedPoint}):p:p!=null&&p.includes(w.lastClickedPoint)?[w.lastClickedPoint]:p,isDragging:!1,pointerOffset:{x:0,y:0}})}},{key:"isSegmentTooShort",value:function(L,h,y,r){var M=(0,k.LW)(h[0],h[1],y[0],y[1]);return L.points.length>2&&L.roundness&&(M=(0,k.eH)(L,y)),M*r.value<4*E.POINT_HANDLE_SIZE}},{key:"getSegmentMidPoint",value:function(L,h,y,r){var M=(0,k.H5)(h,y);if(L.points.length>2&&L.roundness){var p=(0,k.yB)(L,L.points[r]);if(p){var c=(0,k.lk)(L,L.points[r],.5),w=(0,k.N_)(p[0],p[1],p[2],p[3],c),O=(0,f.Z)(w,2),$=O[0],I=O[1];M=E.getPointGlobalCoordinates(L,[$,I])}}return M}},{key:"getSegmentMidPointIndex",value:function(L,h,y){var r=E.getElement(L.elementId);if(!r)return-1;for(var M=E.getEditorMidPoints(r,h),p=0;p<M.length;){if(E.arePointsEqual(y,M[p]))return p+1;p++}return-1}},{key:"handlePointerDown",value:function(L,h,y,r,M){var p,c={didAddPoint:!1,hitElement:null,linearElementEditor:null};if(!M)return c;var w=M.elementId,O=E.getElement(w);if(!O)return c;var $=E.getSegmentMidpointHitCoords(M,r,h),I=null;if($&&(I=E.getSegmentMidPointIndex(M,h,$)),L.altKey&&h.editingLinearElement)return M.lastUncommittedPoint==null&&((0,P.DR)(O,{points:[].concat((0,T.Z)(O.points),[E.createPointAt(O,r.x,r.y,L[G.tW.CTRL_OR_CMD]?null:h.gridSize)])}),c.didAddPoint=!0),y.resumeRecording(),c.linearElementEditor=ne(ne({},M),{},{pointerDownState:{prevSelectedPointsIndices:M.selectedPointsIndices,lastClickedPoint:-1,origin:{x:r.x,y:r.y},segmentMidpoint:{value:$,index:I,added:!1}},selectedPointsIndices:[O.points.length-1],lastUncommittedPoint:null,endBindingElement:(0,K.Y9)(r,R.Z.getScene(O))}),c.didAddPoint=!0,c;var C=E.getPointIndexUnderCursor(O,h.zoom,r.x,r.y);if(C>=0||$)c.hitElement=O;else{var _=M.startBindingElement,N=M.endBindingElement;(0,K.N1)(h)&&(0,m.Mn)(O)&&(0,K.HG)(O,_,N)}var q=(0,g.qf)(O),pe=(0,f.Z)(q,4),te=pe[0],ve=pe[1],ae=(te+pe[2])/2,H=(ve+pe[3])/2,le=C>-1&&(0,k.U1)(O.x+O.points[C][0],O.y+O.points[C][1],ae,H,O.angle),ke=C>-1||L.shiftKey?L.shiftKey||(p=M.selectedPointsIndices)!==null&&p!==void 0&&p.includes(C)?A([].concat((0,T.Z)(M.selectedPointsIndices||[]),[C])):[C]:null;return c.linearElementEditor=ne(ne({},M),{},{pointerDownState:{prevSelectedPointsIndices:M.selectedPointsIndices,lastClickedPoint:C,origin:{x:r.x,y:r.y},segmentMidpoint:{value:$,index:I,added:!1}},selectedPointsIndices:ke,pointerOffset:le?{x:r.x-le[0],y:r.y-le[1]}:{x:0,y:0}}),c}},{key:"arePointsEqual",value:function(L,h){return!L&&!h||!(!L||!h)&&(0,k.Jj)(L,h)}},{key:"handlePointerMove",value:function(L,h,y,r){if(!r.editingLinearElement)return null;var M=r.editingLinearElement,p=M.elementId,c=M.lastUncommittedPoint,w=E.getElement(p);if(!w)return r.editingLinearElement;var O,$=w.points,I=$[$.length-1];if(!L.altKey)return I===c&&E.deletePoints(w,[$.length-1]),ne(ne({},r.editingLinearElement),{},{lastUncommittedPoint:null});if((0,G.Ge)(L)&&$.length>=2){var C=$[$.length-2],_=E._getShiftLockedDelta(w,C,[h,y],L[G.tW.CTRL_OR_CMD]?null:r.gridSize),N=(0,f.Z)(_,2),q=N[0],pe=N[1];O=[q+C[0],pe+C[1]]}else O=E.createPointAt(w,h-r.editingLinearElement.pointerOffset.x,y-r.editingLinearElement.pointerOffset.y,L[G.tW.CTRL_OR_CMD]?null:r.gridSize);return I===c?E.movePoints(w,[{index:w.points.length-1,point:O}]):E.addPoints(w,r,[{point:O}]),ne(ne({},r.editingLinearElement),{},{lastUncommittedPoint:w.points[w.points.length-1]})}},{key:"getPointGlobalCoordinates",value:function(L,h){var y=(0,g.qf)(L),r=(0,f.Z)(y,4),M=r[0],p=r[1],c=(M+r[2])/2,w=(p+r[3])/2,O=L.x,$=L.y,I=(0,k.U1)(O+h[0],$+h[1],c,w,L.angle),C=(0,f.Z)(I,2);return[O=C[0],$=C[1]]}},{key:"getPointsGlobalCoordinates",value:function(L){var h=(0,g.qf)(L),y=(0,f.Z)(h,4),r=y[0],M=y[1],p=y[2],c=y[3],w=(r+p)/2,O=(M+c)/2;return L.points.map(function($){var I=L.x,C=L.y,_=(0,k.U1)(I+$[0],C+$[1],w,O,L.angle),N=(0,f.Z)(_,2);return[I=N[0],C=N[1]]})}},{key:"getPointAtIndexGlobalCoordinates",value:function(L,h){var y=h<0?L.points.length+h:h,r=(0,g.qf)(L),M=(0,f.Z)(r,4),p=M[0],c=M[1],w=(p+M[2])/2,O=(c+M[3])/2,$=L.points[y],I=L.x,C=L.y;return $?(0,k.U1)(I+$[0],C+$[1],w,O,L.angle):(0,k.U1)(I,C,w,O,L.angle)}},{key:"pointFromAbsoluteCoords",value:function(L,h){var y=(0,g.qf)(L),r=(0,f.Z)(y,4),M=r[0],p=r[1],c=(M+r[2])/2,w=(p+r[3])/2,O=(0,k.U1)(h[0],h[1],c,w,-L.angle),$=(0,f.Z)(O,2),I=$[0],C=$[1];return[I-L.x,C-L.y]}},{key:"getPointIndexUnderCursor",value:function(L,h,y,r){for(var M=E.getPointsGlobalCoordinates(L),p=M.length;--p>-1;){var c=M[p];if((0,k.LW)(y,r,c[0],c[1])*h.value<E.POINT_HANDLE_SIZE+1)return p}return-1}},{key:"createPointAt",value:function(L,h,y,r){var M=(0,k.wC)(h,y,r),p=(0,g.qf)(L),c=(0,f.Z)(p,4),w=c[0],O=c[1],$=(w+c[2])/2,I=(O+c[3])/2,C=(0,k.U1)(M[0],M[1],$,I,-L.angle),_=(0,f.Z)(C,2),N=_[0],q=_[1];return[N-L.x,q-L.y]}},{key:"getNormalizedPoints",value:function(L){var h=L.points,y=h[0][0],r=h[0][1];return{points:h.map(function(M,p){return[M[0]-y,M[1]-r]}),x:L.x+y,y:L.y+r}}},{key:"normalizePoints",value:function(L){(0,P.DR)(L,E.getNormalizedPoints(L))}},{key:"duplicateSelectedPoints",value:function(L){if(!L.editingLinearElement)return!1;var h=L.editingLinearElement,y=h.selectedPointsIndices,r=h.elementId,M=E.getElement(r);if(!M||y===null)return!1;var p=M.points,c=[],w=!1,O=-1,$=p.reduce(function(C,_,N){if(++O,C.push(_),y.includes(N)){var q=p[N+1];q||(w=!0),C.push(q?[(_[0]+q[0])/2,(_[1]+q[1])/2]:[_[0],_[1]]),c.push(O+1),++O}return C},[]);if((0,P.DR)(M,{points:$}),w){var I=M.points[M.points.length-1];E.movePoints(M,[{index:M.points.length-1,point:[I[0]+30,I[1]+30]}])}return{appState:ne(ne({},L),{},{editingLinearElement:ne(ne({},L.editingLinearElement),{},{selectedPointsIndices:c})})}}},{key:"deletePoints",value:function(L,h){var y=0,r=0;if(h.includes(0)){var M=L.points.find(function(c,w){return!h.includes(w)});M&&(y=M[0],r=M[1])}var p=L.points.reduce(function(c,w,O){return h.includes(O)||c.push(c.length?[w[0]-y,w[1]-r]:[0,0]),c},[]);E._updatePoints(L,p,y,r)}},{key:"addPoints",value:function(L,h,y){var r=[].concat((0,T.Z)(L.points),(0,T.Z)(y.map(function(M){return M.point})));E._updatePoints(L,r,0,0)}},{key:"movePoints",value:function(L,h,y){var r=L.points,M=0,p=0,c=h.find(function(O){return O.index===0});c&&(M=c.point[0]+r[c.index][0],p=c.point[1]+r[c.index][1]);var w=r.map(function(O,$){var I=h.find(function(N){return N.index===$});if(I){if(c)return O;var C=I.point[0]-r[I.index][0],_=I.point[1]-r[I.index][1];return[O[0]+C,O[1]+_]}return M||p?[O[0]-M,O[1]-p]:O});E._updatePoints(L,w,M,p,y)}},{key:"shouldAddMidpoint",value:function(L,h,y){if(!E.getElement(L.elementId))return!1;var r=L.pointerDownState.segmentMidpoint;if(r.added||r.value===null||r.index===null||L.pointerDownState.origin===null)return!1;var M=L.pointerDownState.origin,p=(0,k.LW)(M.x,M.y,h.x,h.y);return!(!y.editingLinearElement&&p<be.f/y.zoom.value)}},{key:"addMidpoint",value:function(L,h,y,r){var M=E.getElement(L.elementId);if(M){var p=L.pointerDownState.segmentMidpoint,c={pointerDownState:L.pointerDownState,selectedPointsIndices:L.selectedPointsIndices},w=E.createPointAt(M,h.x,h.y,r?y.gridSize:null),O=[].concat((0,T.Z)(M.points.slice(0,p.index)),[w],(0,T.Z)(M.points.slice(p.index)));return(0,P.DR)(M,{points:O}),c.pointerDownState=ne(ne({},L.pointerDownState),{},{segmentMidpoint:ne(ne({},L.pointerDownState.segmentMidpoint),{},{added:!0}),lastClickedPoint:p.index}),c.selectedPointsIndices=[p.index],c}}},{key:"_updatePoints",value:function(L,h,y,r,M){var p=(0,a.Ut)(L,h),c=(0,a.Ut)(L,L.points),w=(p[0]+p[2])/2,O=(p[1]+p[3])/2,$=(c[0]+c[2])/2-w,I=(c[1]+c[3])/2-O,C=(0,k.U1)(y,r,$,I,L.angle);(0,P.DR)(L,ne(ne({},M),{},{points:h,x:L.x+C[0],y:L.y+C[1]}))}},{key:"_getShiftLockedDelta",value:function(L,h,y,r){var M=E.getPointGlobalCoordinates(L,h),p=(0,k.wC)(y[0],y[1],r),c=(0,f.Z)(p,2),w=c[0],O=c[1],$=(0,g.o4)(M[0],M[1],w,O),I=$.width,C=$.height;return(0,k.xj)([I,C],[0,0],-L.angle)}}]),E}();z.POINT_HANDLE_SIZE=10,z.getEditorMidPoints=function(E,L){var h=(0,he.WJ)(E);return!L.editingLinearElement&&E.points.length>2&&!h?[]:(S.version===E.version&&S.zoom===L.zoom.value||z.updateEditorMidPointsCache(E,L),S.points)},z.updateEditorMidPointsCache=function(E,L){for(var h=z.getPointsGlobalCoordinates(E),y=0,r=[];y<h.length-1;)if(z.isSegmentTooShort(E,E.points[y],E.points[y+1],L.zoom))r.push(null),y++;else{var M=z.getSegmentMidPoint(E,h[y],h[y+1],y+1);r.push(M),y++}S.points=r,S.version=E.version,S.zoom=L.zoom.value},z.getSegmentMidpointHitCoords=function(E,L,h){var y=E.elementId,r=z.getElement(y);if(!r||z.getPointIndexUnderCursor(r,h.zoom,L.x,L.y)>=0||z.getPointsGlobalCoordinates(r).length>=3&&!h.editingLinearElement)return null;var M=z.POINT_HANDLE_SIZE/h.zoom.value,p=E.segmentMidPointHoveredCoords;if(p&&(0,k.LW)(p[0],p[1],L.x,L.y)<=M)return p;for(var c=0,w=z.getEditorMidPoints(r,h);c<w.length;){if(w[c]!==null&&(0,k.LW)(w[c][0],w[c][1],L.x,L.y)<=M)return w[c];c++}return null},z.getBoundTextElementPosition=function(E,L){var h=z.getPointsGlobalCoordinates(E);h.length<2&&(0,P.DR)(L,{isDeleted:!0});var y=0,r=0;if(E.points.length%2==1){var M=Math.floor(E.points.length/2),p=z.getPointGlobalCoordinates(E,E.points[M]);y=p[0]-L.width/2,r=p[1]-L.height/2}else{var c=E.points.length/2-1,w=S.points[c];E.points.length===2&&(w=(0,k.H5)(h[0],h[1])),w&&S.version===E.version||(w=z.getSegmentMidPoint(E,h[c],h[c+1],c+1)),y=w[0]-L.width/2,r=w[1]-L.height/2}return{x:y,y:r}},z.getMinMaxXYWithBoundText=function(E,L,h){var y=(0,f.Z)(L,4),r=y[0],M=y[1],p=y[2],c=y[3],w=(r+p)/2,O=(M+c)/2,$=z.getBoundTextElementPosition(E,h),I=$.x,C=$.y,_=I+h.width,N=C+h.height,q=(0,k.xj)([r,M],[w,O],E.angle),pe=(0,k.xj)([p,M],[w,O],E.angle),te=(0,k.xj)([I,C],[w,O],-E.angle),ve=(0,k.xj)([_,C],[w,O],-E.angle),ae=(0,k.xj)([I,N],[w,O],-E.angle),H=(0,k.xj)([_,N],[w,O],-E.angle);return q[0]<pe[0]&&q[1]>=pe[1]?(r=Math.min(r,ae[0]),p=Math.max(p,Math.max(ve[0],H[0])),M=Math.min(M,te[1]),c=Math.max(c,H[1])):q[0]>=pe[0]&&q[1]>pe[1]?(r=Math.min(r,H[0]),p=Math.max(p,Math.max(te[0],ve[0])),M=Math.min(M,ae[1]),c=Math.max(c,ve[1])):q[0]>=pe[0]?(r=Math.min(r,ve[0]),p=Math.max(p,ae[0]),M=Math.min(M,H[1]),c=Math.max(c,te[1])):q[1]<=pe[1]&&(r=Math.min(r,Math.min(ve[0],te[0])),p=Math.max(p,H[0]),M=Math.min(M,ve[1]),c=Math.max(c,ae[1])),[r,M,p,c,w,O]},z.getElementAbsoluteCoords=function(E){var L,h,y,r,M,p=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(E.points.length<2||!we.R.get(E)){var c=E.points.reduce(function(Le,Ge){var Ne=(0,f.Z)(Ge,2),Ce=Ne[0],Oe=Ne[1];return Le.minY=Math.min(Le.minY,Oe),Le.minX=Math.min(Le.minX,Ce),Le.maxX=Math.max(Le.maxX,Ce),Le.maxY=Math.max(Le.maxY,Oe),Le},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}),w=c.minX,O=c.minY,$=c.maxX,I=c.maxY;h=w+E.x,y=O+E.y,r=$+E.x,M=I+E.y}else{var C=we.R.generateElementShape(E),_=(0,a.CM)(C[0]),N=(0,a.IX)(_),q=(0,f.Z)(N,4),pe=q[0],te=q[1],ve=q[2],ae=q[3];h=pe+E.x,y=te+E.y,r=ve+E.x,M=ae+E.y}var H=(h+r)/2,le=(y+M)/2;if(L=[h,y,r,M,H,le],!p)return L;var ke=(0,he.WJ)(E);return ke&&(L=z.getMinMaxXYWithBoundText(E,[h,y,r,M],ke)),L};var A=function(E){var L=(0,T.Z)(new Set(E.filter(function(h){return h!==null&&h!==-1})));return(L=L.sort(function(h,y){return h-y})).length?L:null}},583:function(fe,Q,t){t.d(Q,{BE:function(){return K},DR:function(){return R},ZP:function(){return U}});var T=t(6655),j=t(7169),f=t(457),l=t(5999),v=t(4643),k=t(9827),g=t(2921);function a(m,G){var he=Object.keys(m);if(Object.getOwnPropertySymbols){var be=Object.getOwnPropertySymbols(m);G&&(be=be.filter(function(we){return Object.getOwnPropertyDescriptor(m,we).enumerable})),he.push.apply(he,be)}return he}function P(m){for(var G=1;G<arguments.length;G++){var he=arguments[G]!=null?arguments[G]:{};G%2?a(Object(he),!0).forEach(function(be){(0,j.Z)(m,be,he[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(he)):a(Object(he)).forEach(function(be){Object.defineProperty(m,be,Object.getOwnPropertyDescriptor(he,be))})}return m}var R=function(m,G){var he,be=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],we=!1,xe=G,ce=xe.points,D=xe.fileId;for(var ne in ce!==void 0&&(G=P(P({},(0,l.k)(ce)),G)),G){var S=G[ne];if(S!==void 0){if(m[ne]===S&&((0,T.Z)(S)!=="object"||S===null||ne==="groupIds"||ne==="scale"))continue;if(ne==="scale"){var z=m[ne],A=S;if(z[0]===A[0]&&z[1]===A[1])continue}else if(ne==="points"){var E=m[ne],L=S;if(E.length===L.length){for(var h=!1,y=E.length;--y;){var r=E[y],M=L[y];if(r[0]!==M[0]||r[1]!==M[1]){h=!0;break}}if(!h)continue}}m[ne]=S,we=!0}}return we&&(G.height===void 0&&G.width===void 0&&D===void 0&&ce===void 0||g.R.delete(m),m.version++,m.versionNonce=(0,v.LU)(),m.updated=(0,k.C3)(),be&&((he=f.Z.getScene(m))===null||he===void 0||he.informMutation())),m},K=function(m,G){var he=!1;for(var be in G){var we=G[be];if(we!==void 0){if(m[be]===we&&((0,T.Z)(we)!=="object"||we===null))continue;he=!0}}return he?P(P(P({},m),G),{},{updated:(0,k.C3)(),version:m.version+1,versionNonce:(0,v.LU)()}):m},U=function(m,G){return m.version=(G??m.version)+1,m.versionNonce=(0,v.LU)(),m.updated=(0,k.C3)(),m}},5742:function(fe,Q,t){t.d(Q,{JZ:function(){return L},KE:function(){return y},M:function(){return ne},M3:function(){return S},N_:function(){return h},OL:function(){return c},Sy:function(){return O},Up:function(){return D},VL:function(){return A},_N:function(){return $},vw:function(){return M},y8:function(){return r}});var T=t(6655),j=t(2577),f=t(7169),l=t(2726),v=t(9827),k=t(4643),g=t(583),a=t(9215),P=t(7651),R=t(2361),K=t(4949),U=t(4761),m=t(9937),G=["x","y","strokeColor","backgroundColor","fillStyle","strokeWidth","strokeStyle","roughness","opacity","width","height","angle","groupIds","frameId","roundness","boundElements","link","locked"];function he(I,C){var _=typeof Symbol<"u"&&I[Symbol.iterator]||I["@@iterator"];if(!_){if(Array.isArray(I)||(_=function(ae,H){if(ae){if(typeof ae=="string")return be(ae,H);var le=Object.prototype.toString.call(ae).slice(8,-1);if(le==="Object"&&ae.constructor&&(le=ae.constructor.name),le==="Map"||le==="Set")return Array.from(ae);if(le==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(le))return be(ae,H)}}(I))||C){_&&(I=_);var N=0,q=function(){};return{s:q,n:function(){return N>=I.length?{done:!0}:{done:!1,value:I[N++]}},e:function(ae){throw ae},f:q}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
128
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var pe,te=!0,ve=!1;return{s:function(){_=_.call(I)},n:function(){var ae=_.next();return te=ae.done,ae},e:function(ae){ve=!0,pe=ae},f:function(){try{te||_.return==null||_.return()}finally{if(ve)throw pe}}}}function be(I,C){(C==null||C>I.length)&&(C=I.length);for(var _=0,N=new Array(C);_<C;_++)N[_]=I[_];return N}function we(I,C){var _=Object.keys(I);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(I);C&&(N=N.filter(function(q){return Object.getOwnPropertyDescriptor(I,q).enumerable})),_.push.apply(_,N)}return _}function xe(I){for(var C=1;C<arguments.length;C++){var _=arguments[C]!=null?arguments[C]:{};C%2?we(Object(_),!0).forEach(function(N){(0,f.Z)(I,N,_[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(_)):we(Object(_)).forEach(function(N){Object.defineProperty(I,N,Object.getOwnPropertyDescriptor(_,N))})}return I}var ce=function(I,C){var _,N,q=C.x,pe=C.y,te=C.strokeColor,ve=te===void 0?m.HN.strokeColor:te,ae=C.backgroundColor,H=ae===void 0?m.HN.backgroundColor:ae,le=C.fillStyle,ke=le===void 0?m.HN.fillStyle:le,Le=C.strokeWidth,Ge=Le===void 0?m.HN.strokeWidth:Le,Ne=C.strokeStyle,Ce=Ne===void 0?m.HN.strokeStyle:Ne,Oe=C.roughness,De=Oe===void 0?m.HN.roughness:Oe,Ae=C.opacity,ie=Ae===void 0?m.HN.opacity:Ae,Ie=C.width,oe=Ie===void 0?0:Ie,s=C.height,u=s===void 0?0:s,x=C.angle,V=x===void 0?0:x,W=C.groupIds,re=W===void 0?[]:W,ee=C.frameId,se=ee===void 0?null:ee,Ee=C.roundness,_e=Ee===void 0?null:Ee,Ue=C.boundElements,We=Ue===void 0?null:Ue,Ye=C.link,Ze=Ye===void 0?null:Ye,Je=C.locked,nt=Je===void 0?m.HN.locked:Je,dt=(0,l.Z)(C,G);return{id:dt.id||(0,k.kb)(),type:I,x:q,y:pe,width:oe,height:u,angle:V,strokeColor:ve,backgroundColor:H,fillStyle:ke,strokeWidth:Ge,strokeStyle:Ce,roughness:De,opacity:ie,groupIds:re,frameId:se,roundness:_e,seed:(_=dt.seed)!==null&&_!==void 0?_:(0,k.LU)(),version:dt.version||1,versionNonce:(N=dt.versionNonce)!==null&&N!==void 0?N:0,isDeleted:!1,boundElements:We,updated:(0,v.C3)(),link:Ze,locked:nt,customData:dt.customData}},D=function(I){return ce(I.type,I)},ne=function(I){return xe(xe({},ce("embeddable",I)),{},{validated:I.validated})},S=function(I){return(0,g.BE)(xe(xe({},ce("frame",I)),{},{type:"frame",name:(I==null?void 0:I.name)||null}),{})},z=function(I,C){return{x:I.textAlign==="center"?C.width/2:I.textAlign==="right"?C.width:0,y:I.verticalAlign==="middle"?C.height/2:0}},A=function(I){var C=I.fontFamily||m.rk,_=I.fontSize||m.n5,N=I.lineHeight||(0,U.PT)(C),q=(0,U.bG)(I.text),pe=(0,U.X1)(q,(0,v.mO)({fontFamily:C,fontSize:_}),N),te=I.textAlign||m.Hg,ve=I.verticalAlign||m.hs,ae=z({textAlign:te,verticalAlign:ve},pe);return(0,g.BE)(xe(xe({},ce("text",I)),{},{text:q,fontSize:_,fontFamily:C,textAlign:te,verticalAlign:ve,x:I.x-ae.x,y:I.y-ae.y,width:pe.width,height:pe.height,baseline:pe.baseline,containerId:I.containerId||null,originalText:q,lineHeight:N}),{})},E=function(I,C){var _,N,q=(0,U.X1)(C,(0,v.mO)(I),I.lineHeight),pe=q.width,te=q.height,ve=q.baseline,ae=I.textAlign,H=I.verticalAlign;if(ae!=="center"||H!==m.oX.MIDDLE||I.containerId){var le=(0,P.qf)(I),ke=(0,j.Z)(le,4),Le=ke[0],Ge=ke[1],Ne=ke[2],Ce=ke[3],Oe=(0,K.wC)(I,pe,te,!1),De=(0,j.Z)(Oe,4),Ae=(Le-De[0])/2,ie=(Ge-De[1])/2,Ie=(Ne-De[2])/2,oe=(Ce-De[3])/2,s=(0,R.yq)({s:!0,e:ae==="center"||ae==="left",w:ae==="center"||ae==="right"},I.x,I.y,I.angle,Ae,ie,Ie,oe),u=(0,j.Z)(s,2);_=u[0],N=u[1]}else{var x=(0,U.X1)(I.text,(0,v.mO)(I),I.lineHeight),V=z(I,{width:pe-x.width,height:te-x.height});_=I.x-V.x,N=I.y-V.y}return{width:pe,height:te,baseline:ve,x:Number.isFinite(_)?_:I.x,y:Number.isFinite(N)?N:I.y}},L=function(I){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I.text;if(!I.isDeleted){var _=(0,U.tl)(I);_&&(C=(0,U.lD)(C,(0,v.mO)(I),(0,U.iZ)(_)));var N=E(I,C);return xe({text:C},N)}},h=function(I,C){C.text;var _=C.isDeleted,N=C.originalText;return(0,g.BE)(I,xe({originalText:N,isDeleted:_??I.isDeleted},L(I,N)))},y=function(I){return xe(xe({},ce(I.type,I)),{},{points:I.points||[],pressures:[],simulatePressure:I.simulatePressure,lastCommittedPoint:null})},r=function(I){return xe(xe({},ce(I.type,I)),{},{points:I.points||[],lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:I.startArrowhead||null,endArrowhead:I.endArrowhead||null})},M=function(I){var C,_,N;return xe(xe({},ce("image",I)),{},{strokeColor:"transparent",status:(C=I.status)!==null&&C!==void 0?C:"pending",fileId:(_=I.fileId)!==null&&_!==void 0?_:null,scale:(N=I.scale)!==null&&N!==void 0?N:[1,1]})},p=function I(C){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(C==null||(0,T.Z)(C)!=="object")return C;var N=Object.prototype.toString.call(C);if(N==="[object Object]"){var q=typeof C.constructor=="function"?Object.create(Object.getPrototypeOf(C)):{};for(var pe in C)if(C.hasOwnProperty(pe)){if(_===0&&(pe==="shape"||pe==="canvas"))continue;q[pe]=I(C[pe],_+1)}return q}if(Array.isArray(C)){for(var te=C.length,ve=new Array(te);te--;)ve[te]=I(C[te],_+1);return ve}return C},c=function(I){return p(I)},w=function(I){if((0,v.h2)()&&I){var C,_,N="".concat(I,"_copy");return(C=window.h)!==null&&C!==void 0&&(_=C.app)!==null&&_!==void 0&&_.getSceneElementsIncludingDeleted().find(function(q){return q.id===N})&&(N+="_copy"),N}return(0,k.kb)()},O=function(I,C,_,N){var q=c(_);return q.id=w(q.id),q.boundElements=null,q.updated=(0,v.C3)(),q.seed=(0,k.LU)(),q.groupIds=(0,a.Qy)(q.groupIds,I,function(pe){return C.has(pe)||C.set(pe,w(pe)),C.get(pe)}),N&&(q=Object.assign(q,N)),q},$=function(I,C){var _,N=[],q=(0,v.xn)(I),pe=new Map,te=function(Ne){if(pe.has(Ne))return pe.get(Ne);if(q.has(Ne)){var Ce=w(Ne);return pe.set(Ne,Ce),Ce}return null},ve=new Map,ae=he(I);try{for(ae.s();!(_=ae.n()).done;){var H=_.value,le=p(H);if(le.id=te(H.id),C!=null&&C.randomizeSeed&&(le.seed=(0,k.LU)(),(0,g.ZP)(le)),le.groupIds&&(le.groupIds=le.groupIds.map(function(Ne){return ve.has(Ne)||ve.set(Ne,w(Ne)),ve.get(Ne)})),"containerId"in le&&le.containerId){var ke=te(le.containerId);le.containerId=ke}if("boundElements"in le&&le.boundElements&&(le.boundElements=le.boundElements.reduce(function(Ne,Ce){var Oe=te(Ce.id);return Oe&&Ne.push(xe(xe({},Ce),{},{id:Oe})),Ne},[])),"endBinding"in le&&le.endBinding){var Le=te(le.endBinding.elementId);le.endBinding=Le?xe(xe({},le.endBinding),{},{elementId:Le}):null}if("startBinding"in le&&le.startBinding){var Ge=te(le.startBinding.elementId);le.startBinding=Ge?xe(xe({},le.startBinding),{},{elementId:Ge}):null}le.frameId&&(le.frameId=te(le.frameId)),N.push(le)}}catch(Ne){ae.e(Ne)}finally{ae.f()}return N}},4381:function(fe,Q,t){t.d(Q,{LM:function(){return y},T:function(){return p},vY:function(){return S},xx:function(){return M}});var T=t(2726),j=t(1930),f=t(7169),l=t(2577),v=t(9937),k=t(5999),g=t(2361),a=t(4949),P=t(4183),R=t(583),K=t(9827),U=t(9645),m=t(457),G=t(4761),he=t(7422),be=["boundTextFontSize"];function we(c,w){var O=typeof Symbol<"u"&&c[Symbol.iterator]||c["@@iterator"];if(!O){if(Array.isArray(c)||(O=function(q,pe){if(q){if(typeof q=="string")return xe(q,pe);var te=Object.prototype.toString.call(q).slice(8,-1);if(te==="Object"&&q.constructor&&(te=q.constructor.name),te==="Map"||te==="Set")return Array.from(q);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return xe(q,pe)}}(c))||w){O&&(c=O);var $=0,I=function(){};return{s:I,n:function(){return $>=c.length?{done:!0}:{done:!1,value:c[$++]}},e:function(q){throw q},f:I}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
129
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var C,_=!0,N=!1;return{s:function(){O=O.call(c)},n:function(){var q=O.next();return _=q.done,q},e:function(q){N=!0,C=q},f:function(){try{_||O.return==null||O.return()}finally{if(N)throw C}}}}function xe(c,w){(w==null||w>c.length)&&(w=c.length);for(var O=0,$=new Array(w);O<w;O++)$[O]=c[O];return $}function ce(c,w){var O=Object.keys(c);if(Object.getOwnPropertySymbols){var $=Object.getOwnPropertySymbols(c);w&&($=$.filter(function(I){return Object.getOwnPropertyDescriptor(c,I).enumerable})),O.push.apply(O,$)}return O}function D(c){for(var w=1;w<arguments.length;w++){var O=arguments[w]!=null?arguments[w]:{};w%2?ce(Object(O),!0).forEach(function($){(0,f.Z)(c,$,O[$])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(O)):ce(Object(O)).forEach(function($){Object.defineProperty(c,$,Object.getOwnPropertyDescriptor(O,$))})}return c}var ne=function(c){return c<0?c+2*Math.PI:c>=2*Math.PI?c-2*Math.PI:c},S=function(c,w,O,$,I,C,_,N,q,pe,te,ve){if(O.length===1){var ae=(0,l.Z)(O,1)[0];return w==="rotation"?(z(ae,N,q,I,c.originalElements),(0,U.Ww)(ae)):!(0,P.iB)(ae)||w!=="nw"&&w!=="ne"&&w!=="sw"&&w!=="se"?w&&h(c.originalElements,_,ae,w,C,N,q):(L(ae,w,C,N,q),(0,U.Ww)(ae)),!0}if(O.length>1){if(w==="rotation")return r(c,O,N,q,I,pe,te),!0;if(w==="nw"||w==="ne"||w==="sw"||w==="se")return y(c,O,w,C,N,q),!0}return!1},z=function(c,w,O,$,I){var C,_=(0,a.qf)(c),N=(0,l.Z)(_,4),q=N[0],pe=N[1],te=(q+N[2])/2,ve=(pe+N[3])/2;(0,P.He)(c)?C=0:(C=5*Math.PI/2+Math.atan2(O-ve,w-te),$&&(C+=v.ay/2,C-=C%v.ay),C=ne(C));var ae=(0,G.xB)(c);if((0,R.DR)(c,{angle:C}),ae){var H,le=(H=m.Z.getScene(c))===null||H===void 0?void 0:H.getElement(ae);le&&!(0,P.Yv)(c)&&(0,R.DR)(le,{angle:C})}},A=function(c,w,O,$){return(0,P.bt)(c)||(0,P.F9)(c)?{points:(0,k.z)(0,w,(0,k.z)(1,O,c.points,$),$)}:{}},E=function(c,w,O){var $=c.width;if((0,P.Xh)(c)){var I=(0,G.tl)(c);I&&($=(0,G.iZ)(I))}var C=c.fontSize*(w/$);if(C<v.CP)return null;var _=(0,G.X1)(c.text,(0,K.mO)({fontSize:C,fontFamily:c.fontFamily}),c.lineHeight);return{size:C,baseline:_.baseline+(O-_.height)}},L=function(c,w,O,$,I){var C,_=(0,a.qf)(c),N=(0,l.Z)(_,4),q=N[0],pe=N[1],te=N[2],ve=N[3],ae=(q+te)/2,H=(pe+ve)/2,le=(0,g.U1)($,I,ae,H,-c.angle),ke=(0,l.Z)(le,2),Le=ke[0],Ge=ke[1];switch(w){case"se":C=Math.max((Le-q)/(te-q),(Ge-pe)/(ve-pe));break;case"nw":C=Math.max((te-Le)/(te-q),(ve-Ge)/(ve-pe));break;case"ne":C=Math.max((Le-q)/(te-q),(ve-Ge)/(ve-pe));break;case"sw":C=Math.max((te-Le)/(te-q),(Ge-pe)/(ve-pe))}if(C>0){var Ne=c.width*C,Ce=c.height*C,Oe=E(c,Ne,Ce);if(Oe===null)return;var De=(0,a.wC)(c,Ne,Ce,!1),Ae=(0,l.Z)(De,4),ie=(q-Ae[0])/2,Ie=(pe-Ae[1])/2,oe=(te-Ae[2])/2,s=(ve-Ae[3])/2,u=(0,g.yq)(function(re,ee){return{n:/^(n|ne|nw)$/.test(re)||ee&&/^(s|se|sw)$/.test(re),s:/^(s|se|sw)$/.test(re)||ee&&/^(n|ne|nw)$/.test(re),w:/^(w|nw|sw)$/.test(re)||ee&&/^(e|ne|se)$/.test(re),e:/^(e|ne|se)$/.test(re)||ee&&/^(w|nw|sw)$/.test(re)}}(w,O),c.x,c.y,c.angle,ie,Ie,oe,s),x=(0,l.Z)(u,2),V=x[0],W=x[1];(0,R.DR)(c,{fontSize:Oe.size,width:Ne,height:Ce,baseline:Oe.baseline,x:V,y:W})}},h=function(c,w,O,$,I,C,_){var N=c.get(O.id),q=(0,a.wC)(N,N.width,N.height,!0),pe=(0,l.Z)(q,4),te=[pe[0],pe[1]],ve=[pe[2],pe[3]],ae=(0,g.H5)(te,ve),H=(0,g.xj)([C,_],ae,-N.angle),le=(0,a.wC)(O,O.width,O.height,!0),ke=(0,l.Z)(le,4),Le=ke[0],Ge=ke[1],Ne=ke[2]-Le,Ce=ke[3]-Ge,Oe=(ve[0]-te[0])/Ne,De=(ve[1]-te[1])/Ce,Ae={},ie=(0,G.WJ)(O);$.includes("e")&&(Oe=(H[0]-te[0])/Ne),$.includes("s")&&(De=(H[1]-te[1])/Ce),$.includes("w")&&(Oe=(ve[0]-H[0])/Ne),$.includes("n")&&(De=(ve[1]-H[1])/Ce);var Ie=N.width,oe=N.height,s=O.width*Oe,u=O.height*De;if(I&&(s=2*s-Ie,u=2*u-oe),w){var x=Math.abs(s)/Ie,V=Math.abs(u)/oe;if($.length===1&&(u*=x,s*=V),$.length===2){var W=Math.max(x,V);s=Ie*W*Math.sign(s),u=oe*W*Math.sign(u)}}if(ie){var re=c.get(ie.id);if(re&&(Ae={fontSize:re.fontSize,baseline:re.baseline}),w){var ee=D(D({},O),{},{width:s,height:u}),se=E(ie,(0,G.iZ)(ee),(0,G.D9)(ee,ie));if(se===null)return;Ae={fontSize:se.size,baseline:se.baseline}}else{var Ee=(0,G.AT)((0,K.mO)(ie),ie.lineHeight),_e=(0,G.w_)(ie.fontSize,ie.lineHeight);s=Math.max(s,Ee),u=Math.max(u,_e)}}var Ue=(0,a.wC)(N,s,u,!0),We=(0,l.Z)(Ue,4),Ye=We[0],Ze=We[1],Je=We[2],nt=We[3],dt=Je-Ye,ge=nt-Ze,Se=[].concat(te);if(["n","w","nw"].includes($)&&(Se=[ve[0]-Math.abs(dt),ve[1]-Math.abs(ge)]),$==="ne"){var Be=[te[0],ve[1]];Se=[Be[0],Be[1]-Math.abs(ge)]}if($==="sw"){var Xe=[ve[0],te[1]];Se=[Xe[0]-Math.abs(dt),Xe[1]]}w&&(["s","n"].includes($)&&(Se[0]=ae[0]-dt/2),["e","w"].includes($)&&(Se[1]=ae[1]-ge/2));var lt=u<0;s<0&&($.includes("e")&&(Se[0]-=Math.abs(dt)),$.includes("w")&&(Se[0]+=Math.abs(dt))),lt&&($.includes("s")&&(Se[1]-=Math.abs(ge)),$.includes("n")&&(Se[1]+=Math.abs(ge))),I&&(Se[0]=ae[0]-Math.abs(dt)/2,Se[1]=ae[1]-Math.abs(ge)/2);var it=N.angle,yt=(0,g.xj)(Se,ae,it),_t=[Se[0]+Math.abs(dt)/2,Se[1]+Math.abs(ge)/2],ut=(0,g.xj)(_t,ae,it);Se=(0,g.xj)(yt,ut,-it);var Tt=(0,j.Z)(Se),Yt=N.x-Ye,Zt=N.y-Ze;Tt[0]+=Yt,Tt[1]+=Zt;var Pt,en,tn=Tt[0],ot=Tt[1];((0,P.bt)(O)||(0,P.F9)(O))&&(Pt=(0,k.z)(1,u,N.points,!0),en=(0,k.z)(0,s,Pt,!0));var It={width:Math.abs(s),height:Math.abs(u),x:tn,y:ot,points:en};if("scale"in O&&"scale"in N&&(0,R.DR)(O,{scale:[(Math.sign(Je-N.x)||N.scale[0])*N.scale[0],(Math.sign(nt-N.y)||N.scale[1])*N.scale[1]]}),(0,P.Yv)(O)&&ie&&w){var mt=It.width/O.width*ie.fontSize;if(mt<v.CP)return;Ae.fontSize=mt}It.width!==0&&It.height!==0&&Number.isFinite(It.x)&&Number.isFinite(It.y)&&((0,R.DR)(O,It),(0,U.Ww)(O,{newSize:{width:It.width,height:It.height}}),ie&&Ae!=null&&(0,R.DR)(ie,{fontSize:Ae.fontSize,baseline:Ae.baseline}),(0,G.RB)(O,$,w))},y=function(c,w,O,$,I,C){var _,N=w.reduce(function(mt,jt){var xt=c.originalElements.get(jt.id);return xt&&mt.push({orig:xt,latest:jt}),mt},[]),q=N.reduce(function(mt,jt){var xt,Nt=jt.orig;if(!(0,P.bt)(Nt))return mt;var Ut=(0,G.xB)(Nt);if(!Ut)return mt;var rn=(xt=c.originalElements.get(Ut))!==null&&xt!==void 0?xt:null;if(!(0,P.Xh)(rn))return mt;var Ft=he._.getBoundTextElementPosition(Nt,rn);return[].concat((0,j.Z)(mt),[D(D({},rn),Ft)])},[]),pe=(0,a.v2)(N.map(function(mt){return mt.orig}).concat(q)),te=pe.minX,ve=pe.minY,ae=pe.maxX,H=pe.maxY,le=pe.midX,ke=pe.midY,Le=O,Ge=$?[le,ke]:{ne:[te,H],se:[te,ve],sw:[ae,ve],nw:[ae,H]}[Le],Ne=(0,l.Z)(Ge,2),Ce=Ne[0],Oe=Ne[1],De=Math.max(Math.abs(I-Ce)/(ae-te)||0,Math.abs(C-Oe)/(H-ve)||0)*($?2:1);if(De!==0){var Ae,ie={ne:[I>=Ce,C<=Oe],se:[I>=Ce,C>=Oe],sw:[I<=Ce,C>=Oe],nw:[I<=Ce,C<=Oe]}[Le].map(function(mt){return mt?1:-1}),Ie=(0,l.Z)(ie,2),oe=Ie[0],s=Ie[1],u=oe<0,x=s<0,V=[],W=we(N);try{for(W.s();!(Ae=W.n()).done;){var re,ee=Ae.value,se=ee.orig,Ee=ee.latest;if(!(0,P.iB)(se)||!(0,P.Xh)(se)){var _e=se.width*De,Ue=se.height*De,We=ne(se.angle*oe*s),Ye=(0,P.bt)(se)||(0,P.F9)(se),Ze=se.x-Ce,Je=se.y-Oe,nt=Ce+oe*(Ze*De+(u&&!Ye?_e:0)),dt=Oe+s*(Je*De+(x&&!Ye?Ue:0)),ge=A(se,_e*oe,Ue*s,!1),Se=D({x:nt,y:dt,width:_e,height:Ue,angle:We},ge);if((0,P.pC)(se)&&N.length===1&&(Se.scale=[se.scale[0]*oe,se.scale[1]*s]),(0,P.bt)(se)&&(u||x)&&function(){var mt=(0,a.Ut)(se,se.points),jt=(0,a.Ut)(D(D({},se),{},{x:nt,y:dt}),ge.points),xt=[se.x,se.y],Nt=[nt,dt],Ut=function(rn){var Ft=rn==="x"?0:1;return(jt[Ft+2]-Nt[Ft]-(xt[Ft]-mt[Ft])*De+(mt[Ft+2]-xt[Ft])*De-(Nt[Ft]-jt[Ft]))/2};u&&(Se.x-=Ut("x")),x&&(Se.y-=Ut("y"))}(),(0,P.iB)(se)){var Be=E(se,_e,Ue);if(!Be)return;Se.fontSize=Be.size,Se.baseline=Be.baseline}var Xe=c.originalElements.get((re=(0,G.xB)(se))!==null&&re!==void 0?re:"");if(Xe){var lt=Xe.fontSize*De;if(lt<v.CP)return;Se.boundTextFontSize=lt}V.push({element:Ee,update:Se})}}}catch(mt){W.e(mt)}finally{W.f()}for(var it=V.map(function(mt){return mt.element}),yt=0,_t=V;yt<_t.length;yt++){var ut=_t[yt],Tt=ut.element,Yt=ut.update,Zt=Yt.boundTextFontSize,Pt=(0,T.Z)(Yt,be),en=Pt.width,tn=Pt.height,ot=Pt.angle;(0,R.DR)(Tt,Pt,!1),(0,U.Ww)(Tt,{simultaneouslyUpdated:it,newSize:{width:en,height:tn}});var It=(0,G.WJ)(Tt);It&&Zt&&((0,R.DR)(It,{fontSize:Zt,angle:(0,P.bt)(Tt)?void 0:ot},!1),(0,G.RB)(Tt,O,!0))}(_=m.Z.getScene(V[0].element))===null||_===void 0||_.informMutation()}},r=function(c,w,O,$,I,C,_){var N,q=5*Math.PI/2+Math.atan2($-_,O-C);I&&(q+=v.ay/2,q-=q%v.ay),w.filter(function(pe){return pe.type!=="frame"}).forEach(function(pe){var te,ve,ae=(0,a.qf)(pe),H=(0,l.Z)(ae,4),le=H[0],ke=H[1],Le=(le+H[2])/2,Ge=(ke+H[3])/2,Ne=(te=(ve=c.originalElements.get(pe.id))===null||ve===void 0?void 0:ve.angle)!==null&&te!==void 0?te:pe.angle,Ce=(0,g.U1)(Le,Ge,C,_,q+Ne-pe.angle),Oe=(0,l.Z)(Ce,2),De=Oe[0],Ae=Oe[1];(0,R.DR)(pe,{x:pe.x+(De-Le),y:pe.y+(Ae-Ge),angle:ne(q+Ne)},!1),(0,U.Ww)(pe,{simultaneouslyUpdated:w});var ie=(0,G.WJ)(pe);ie&&!(0,P.Yv)(pe)&&(0,R.DR)(ie,{x:ie.x+(De-Le),y:ie.y+(Ae-Ge),angle:ne(q+Ne)},!1)}),(N=m.Z.getScene(w[0]))===null||N===void 0||N.informMutation()},M=function(c,w,O,$){var I=w.length===1?(0,a.qf)(w[0]):(0,a.KP)(w),C=(0,l.Z)(I,4),_=C[0],N=C[1],q=C[2],pe=C[3],te=(_+q)/2,ve=(N+pe)/2,ae=w.length===1?w[0].angle:0,H=(0,g.U1)(O,$,te,ve,-ae),le=(0,l.Z)(H,2);switch(O=le[0],$=le[1],c){case"n":return(0,g.U1)(O-(_+q)/2,$-N,0,0,ae);case"s":return(0,g.U1)(O-(_+q)/2,$-pe,0,0,ae);case"w":return(0,g.U1)(O-_,$-(N+pe)/2,0,0,ae);case"e":return(0,g.U1)(O-q,$-(N+pe)/2,0,0,ae);case"nw":return(0,g.U1)(O-_,$-N,0,0,ae);case"ne":return(0,g.U1)(O-q,$-N,0,0,ae);case"sw":return(0,g.U1)(O-_,$-pe,0,0,ae);case"se":return(0,g.U1)(O-q,$-pe,0,0,ae);default:return[0,0]}},p=function(c,w){var O=(0,l.Z)(w.points,2),$=(0,l.Z)(O[1],2),I=$[0],C=$[1];return c==="nw"&&(I<0||C<0)||c==="ne"&&I>=0||c==="sw"&&I<=0||c==="se"&&(I>0||C>0)?"end":"origin"}},7935:function(fe,Q,t){t.d(Q,{PZ:function(){return g},QD:function(){return k},Qp:function(){return R},o4:function(){return P},uK:function(){return a}});var T=t(2577),j=(t(583),t(4183)),f=t(9937),l=t(4949),v=t(9827),k=function(K){return(0,j.bt)(K)||(0,j.F9)(K)?K.points.length<2:K.width===0&&K.height===0},g=function(K,U,m,G){var he=(0,l.Pi)(K),be=(0,T.Z)(he,4),we=be[0],xe=be[1],ce=be[2],D=be[3],ne=(0,v.dE)({clientX:G.offsetLeft,clientY:G.offsetTop},G),S=(0,v.dE)({clientX:G.offsetLeft+U,clientY:G.offsetTop+m},G);return ne.x<=ce&&ne.y<=D&&S.x>=we&&S.y>=xe},a=function(K,U,m){var G=Math.abs(U),he=Math.abs(m);if(K==="line"||K==="arrow"||K==="freedraw"){var be=Math.round(Math.atan(he/G)/f.ay)*f.ay;be===0?m=0:be===Math.PI/2?U=0:m=G*Math.tan(be)*Math.sign(m)||m}else K!=="selection"&&(m=G*Math.sign(m));return{width:U,height:m}},P=function(K,U,m,G){var he=m-K,be=G-U,we=Math.round(Math.atan(be/he)/f.ay)*f.ay;if(we===0)be=0;else if(we===Math.PI/2)he=0;else{var xe=Math.tan(we),ce=U-xe*K,D=-1/xe,ne=G-D*m;he=(-1*ne- -1*ce)/(-1*xe- -1*D)-K,be=(ce*D-ne*xe)/(-1*xe- -1*D)-U}return{width:he,height:be}},R=function(K){var U={width:K.width,height:K.height,x:K.x,y:K.y};if(K.width<0){var m=Math.abs(K.width);U.width=m,U.x=K.x-m}if(K.height<0){var G=Math.abs(K.height);U.height=G,U.y=K.y-G}return U}},4761:function(fe,Q,t){t.d(Q,{$2:function(){return h},AT:function(){return I},D9:function(){return Ce},FE:function(){return A},H_:function(){return ve},NS:function(){return Ge},OW:function(){return le},P7:function(){return S},PT:function(){return Ae},R8:function(){return L},RB:function(){return z},Rg:function(){return y},TP:function(){return pe},WJ:function(){return N},X1:function(){return E},Zr:function(){return Le},aV:function(){return H},bG:function(){return ce},cn:function(){return ae},cw:function(){return te},eB:function(){return Oe},iZ:function(){return Ne},lD:function(){return w},mY:function(){return p},oN:function(){return ne},tl:function(){return q},w_:function(){return r},xB:function(){return _}});var T,j=t(2577),f=t(1930),l=t(7169),v=t(9827),k=t(583),g=t(9937),a=t(457),P=t(7651),R=t(4183),K=t(7422),U=t(4105),m=t(3528),G=t(3474);function he(ie,Ie){var oe=Object.keys(ie);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(ie);Ie&&(s=s.filter(function(u){return Object.getOwnPropertyDescriptor(ie,u).enumerable})),oe.push.apply(oe,s)}return oe}function be(ie){for(var Ie=1;Ie<arguments.length;Ie++){var oe=arguments[Ie]!=null?arguments[Ie]:{};Ie%2?he(Object(oe),!0).forEach(function(s){(0,l.Z)(ie,s,oe[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ie,Object.getOwnPropertyDescriptors(oe)):he(Object(oe)).forEach(function(s){Object.defineProperty(ie,s,Object.getOwnPropertyDescriptor(oe,s))})}return ie}var we,xe,ce=function(ie){return ie.replace(/\t/g," ").replace(/\r?\n|\r/g,`
|
|
130
|
+
`)},D=function(ie){return ce(ie).split(`
|
|
131
|
+
`)},ne=function(ie,Ie){var oe=void 0,s={x:ie.x,y:ie.y,text:ie.text,width:ie.width,height:ie.height,baseline:ie.baseline};s.text=ie.text,Ie&&(oe=Ne(Ie,ie),s.text=w(ie.originalText,(0,v.mO)(ie),oe));var u=E(s.text,(0,v.mO)(ie),ie.lineHeight);if(s.width=u.width,s.height=u.height,s.baseline=u.baseline,Ie){var x=Ce(Ie,ie),V=Ne(Ie);if(!(0,R.Yv)(Ie)&&u.height>x){var W=Ge(u.height,Ie.type);(0,k.DR)(Ie,{height:W}),(0,G.h_)(Ie.id,W)}if(u.width>V){var re=Ge(u.width,Ie.type);(0,k.DR)(Ie,{width:re})}var ee=be(be({},ie),s),se=A(Ie,ee),Ee=se.x,_e=se.y;s.x=Ee,s.y=_e}(0,k.DR)(ie,s)},S=function(ie,Ie,oe){var s=(0,v.xn)(ie);Ie.forEach(function(u){var x=oe.get(u.id),V=_(u);if(V){var W=oe.get(V);if(W){var re=s.get(x);re&&(0,k.DR)(re,{boundElements:(u.boundElements||[]).filter(function(se){return se.id!==W&&se.id!==V}).concat({type:"text",id:W})});var ee=s.get(W);ee&&(0,P.iB)(ee)&&(0,k.DR)(ee,{containerId:re?x:null})}}})},z=function(ie,Ie){var oe=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=_(ie);if(s){(0,G.kT)(ie.id);var u=a.Z.getScene(ie).getElement(s);if(u&&u.text){if(!ie)return;var x=(u=a.Z.getScene(ie).getElement(s)).text,V=u.height,W=u.width,re=Ne(ie),ee=Ce(ie,u),se=ie.height,Ee=u.baseline;if(oe||Ie!=="n"&&Ie!=="s"){x&&(x=w(u.originalText,(0,v.mO)(u),re));var _e=E(x,(0,v.mO)(u),u.lineHeight);V=_e.height,W=_e.width,Ee=_e.baseline}if(V>ee){var Ue=(se=Ge(V,ie.type))-ie.height,We=(0,R.Yv)(ie)||Ie!=="ne"&&Ie!=="nw"&&Ie!=="n"?ie.y:ie.y-Ue;(0,k.DR)(ie,{height:se,y:We})}(0,k.DR)(u,{text:x,width:W,height:V,baseline:Ee}),(0,R.Yv)(ie)||(0,k.DR)(u,A(ie,u))}}},A=function(ie,Ie){if((0,R.Yv)(ie))return K._.getBoundTextElementPosition(ie,Ie);var oe,s=te(ie),u=Ce(ie,Ie),x=Ne(ie);return oe=Ie.verticalAlign===g.oX.TOP?s.y:Ie.verticalAlign===g.oX.BOTTOM?s.y+(u-Ie.height):s.y+(u/2-Ie.height/2),{x:Ie.textAlign===g.I8.LEFT?s.x:Ie.textAlign===g.I8.RIGHT?s.x+(x-Ie.width):s.x+(x/2-Ie.width/2),y:oe}},E=function(ie,Ie,oe){ie=ie.split(`
|
|
132
|
+
`).map(function(x){return x||" "}).join(`
|
|
133
|
+
`);var s=parseFloat(Ie),u=c(ie,s,oe);return{width:p(ie,Ie),height:u,baseline:L(ie,Ie,oe)}},L=function(ie,Ie,oe,s){var u=document.createElement("div");u.style.position="absolute",u.style.whiteSpace="pre",u.style.font=Ie,u.style.minHeight="1em",s&&(u.style.overflow="hidden",u.style.wordBreak="break-word",u.style.whiteSpace="pre-wrap"),u.style.lineHeight=String(oe),u.innerText=ie,document.body.appendChild(u);var x=document.createElement("span");x.style.display="inline-block",x.style.overflow="hidden",x.style.width="1px",x.style.height="1px",u.appendChild(x);var V=x.offsetTop+x.offsetHeight,W=u.offsetHeight;if(g.G6){var re=c(ie,parseFloat(Ie),oe),ee=parseFloat(Ie),se=c(ie,Math.round(ee),oe);re>W&&(V+=re-se),W>re&&(V-=se-re)}return document.body.removeChild(u),V},h=function(ie){var Ie=D(ie.text).length;return ie.height/Ie/ie.fontSize},y=function(ie,Ie){return ie*Ie},r=function(ie,Ie){return y(ie,Ie)+2*g.gK},M=function(ie,Ie){we||(we=document.createElement("canvas"));var oe=we.getContext("2d");oe.font=Ie;var s=oe.measureText(ie).width;return(0,v.h2)()?10*s:s},p=function(ie,Ie){var oe=D(ie),s=0;return oe.forEach(function(u){s=Math.max(s,M(u,Ie))}),s},c=function(ie,Ie,oe){var s=D(ie).length;return y(Ie,oe)*s},w=function(ie,Ie,oe){if(!Number.isFinite(oe)||oe<0)return ie;var s=[],u=ie.split(`
|
|
134
|
+
`),x=M(" ",Ie),V="",W=0,re=function(se){se.trim()&&s.push(se)},ee=function(){V="",W=0};return u.forEach(function(se){if(p(se,Ie)<=oe)s.push(se);else{var Ee=function(nt){var dt=nt.split("-");return dt.length>1&&dt.forEach(function(ge,Se){Se!==dt.length-1&&(dt[Se]=ge+="-")}),dt.join(" ").split(" ")}(se);ee();for(var _e=0;_e<Ee.length;){var Ue=M(Ee[_e],Ie);if(Ue===oe)re(Ee[_e]),_e++;else if(Ue>oe){for(re(V),ee();Ee[_e].length>0;){var We=String.fromCodePoint(Ee[_e].codePointAt(0)),Ye=O.calculate(We,Ie);W+=Ye,Ee[_e]=Ee[_e].slice(We.length),W>=oe?(re(V),V=We,W=Ye):V+=We}W+x>=oe?(re(V),ee()):V.endsWith("-")||(V+=" ",W+=x),_e++}else for(;W<oe&&_e<Ee.length;){var Ze=Ee[_e];if((W=M(V+Ze,Ie))>oe){re(V),ee();break}_e++;var Je=!Ze.endsWith("-");if(V+=Ze,Je&&(V+=" "),W+x>=oe){Je?s.push(V.slice(0,-1)):s.push(V),ee();break}}}V.slice(-1)===" "&&(V=V.slice(0,-1),re(V))}}),s.join(`
|
|
135
|
+
`)},O=(xe={},{calculate:function(ie,Ie){var oe=ie.charCodeAt(0);if(xe[Ie]||(xe[Ie]=[]),!xe[Ie][oe]){var s=M(ie,Ie);xe[Ie][oe]=s}return xe[Ie][oe]},getCache:function(ie){return xe[ie]}}),$="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase(),I=function(ie,Ie){var oe=C(ie);return oe===0?E($.split("").join(`
|
|
136
|
+
`),ie,Ie).width+2*g.gK:oe+2*g.gK},C=function(ie){var Ie=O.getCache(ie);if(!Ie)return 0;var oe=Ie.filter(function(s){return s!==void 0});return Math.max.apply(Math,(0,f.Z)(oe))},_=function(ie){var Ie,oe,s;return ie!=null&&(Ie=ie.boundElements)!==null&&Ie!==void 0&&Ie.length&&(ie==null||(oe=ie.boundElements)===null||oe===void 0||(s=oe.filter(function(u){return u.type==="text"})[0])===null||s===void 0?void 0:s.id)||null},N=function(ie){if(!ie)return null;var Ie,oe=_(ie);return oe&&((Ie=a.Z.getScene(ie))===null||Ie===void 0?void 0:Ie.getElement(oe))||null},q=function(ie){return ie&&ie.containerId&&((Ie=a.Z.getScene(ie))===null||Ie===void 0?void 0:Ie.getElement(ie.containerId))||null;var Ie},pe=function(ie,Ie){if(!(0,R.Yv)(ie))return{x:ie.x+ie.width/2,y:ie.y+ie.height/2};var oe=K._.getPointsGlobalCoordinates(ie);if(oe.length%2==1){var s=Math.floor(ie.points.length/2),u=K._.getPointGlobalCoordinates(ie,ie.points[s]);return{x:u[0],y:u[1]}}var x=ie.points.length/2-1,V=K._.getEditorMidPoints(ie,Ie)[x];return V||(V=K._.getSegmentMidPoint(ie,oe[x],oe[x+1],x+1)),{x:V[0],y:V[1]}},te=function(ie){var Ie=g.gK,oe=g.gK;return ie.type==="ellipse"&&(Ie+=ie.width/2*(1-Math.sqrt(2)/2),oe+=ie.height/2*(1-Math.sqrt(2)/2)),ie.type==="diamond"&&(Ie+=ie.width/4,oe+=ie.height/4),{x:ie.x+Ie,y:ie.y+oe}},ve=function(ie){var Ie=q(ie);return!Ie||(0,R.Yv)(Ie)?ie.angle:Ie.angle},ae=function(ie){return ie.some(function(Ie){if((0,R.Xh)(Ie)){var oe=q(Ie);return!(0,P.iB)(Ie)||!(0,R.Yv)(oe)}return!1})},H=function(ie){return ie.some(function(Ie){if((0,R.Xh)(Ie)){var oe=q(Ie);return!(0,P.iB)(Ie)||!(0,R.Yv)(oe)}return(0,P.iB)(Ie)})},le=function(ie,Ie,oe,s){var u=(0,U.eD)(ie,Ie);if(u.length===1)return(0,R.mG)(u[0],!1)?u[0]:null;for(var x=null,V=ie.length-1;V>=0;--V)if(!ie[V].isDeleted){var W=(0,P.qf)(ie[V]),re=(0,j.Z)(W,4),ee=re[0],se=re[1],Ee=re[2],_e=re[3];if((0,R.Yv)(ie[V])&&(0,m.Qu)(ie[V],Ie,null,[oe,s])){x=ie[V];break}if(ee<oe&&oe<Ee&&se<s&&s<_e){x=ie[V];break}}return(0,R.mG)(x,!1)?x:null},ke=new Set(["rectangle","ellipse","diamond","arrow"]),Le=function(ie){return ke.has(ie.type)},Ge=function(ie,Ie){ie=Math.ceil(ie);var oe=2*g.gK;return Ie==="ellipse"?Math.round((ie+oe)/Math.sqrt(2)*2):Ie==="arrow"?ie+8*oe:Ie==="diamond"?2*(ie+oe):ie+oe},Ne=function(ie){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N(ie),oe=ie.width;if((0,R.Yv)(ie)){var s,u=((s=Ie==null?void 0:Ie.fontSize)!==null&&s!==void 0?s:g.n5)*g.vL;return Math.max(g.bY*oe,u)}return ie.type==="ellipse"?Math.round(oe/2*Math.sqrt(2))-2*g.gK:ie.type==="diamond"?Math.round(oe/2)-2*g.gK:oe-2*g.gK},Ce=function(ie,Ie){var oe=ie.height;return(0,R.Yv)(ie)?oe-8*g.gK*2<=0?Ie.height:oe:ie.type==="ellipse"?Math.round(oe/2*Math.sqrt(2))-2*g.gK:ie.type==="diamond"?Math.round(oe/2)-2*g.gK:oe-2*g.gK},Oe=function(){return p($,(0,v.mO)({fontSize:g.n5,fontFamily:g.rk}))>0},De=(T={},(0,l.Z)(T,g.ut.Virgil,1.25),(0,l.Z)(T,g.ut.Helvetica,1.15),(0,l.Z)(T,g.ut.Cascadia,1.2),T),Ae=function(ie){return ie in De?De[ie]:De[g.rk]}},3474:function(fe,Q,t){t.d(Q,{b_:function(){return A},eR:function(){return z},h_:function(){return ne},kT:function(){return S}});var T=t(8950),j=t(7169),f=t(2577),l=t(2975),v=t.n(l),k=t(5491),g=t(9827),a=t(457),P=t(4183),R=t(9937),K=t(583),U=t(4761),m=t(3361),G=t(6006),he=t(7422),be=t(4694);function we(E,L){var h=Object.keys(E);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(E);L&&(y=y.filter(function(r){return Object.getOwnPropertyDescriptor(E,r).enumerable})),h.push.apply(h,y)}return h}function xe(E){for(var L=1;L<arguments.length;L++){var h=arguments[L]!=null?arguments[L]:{};L%2?we(Object(h),!0).forEach(function(y){(0,j.Z)(E,y,h[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(h)):we(Object(h)).forEach(function(y){Object.defineProperty(E,y,Object.getOwnPropertyDescriptor(h,y))})}return E}var ce=function(E,L,h,y,r,M){var p=y.zoom,c=180*h/Math.PI,w=E*(p.value-1)/2,O=L*(p.value-1)/2;return E>r&&p.value!==1&&(w=r*(p.value-1)/2),L>M&&p.value!==1&&(O=M*(p.value-1)/2),"translate(".concat(w,"px, ").concat(O,"px) scale(").concat(p.value,") rotate(").concat(c,"deg)")},D={},ne=function(E,L){var h=D[E]||(D[E]={height:L});return h.height=L,h},S=function(E){D[E]&&delete D[E]},z=function(E){var L,h;return(L=(h=D[E])===null||h===void 0?void 0:h.height)!==null&&L!==void 0?L:null},A=function(E){var L=E.id,h=E.onChange,y=E.onSubmit,r=E.getViewportCoords,M=E.element,p=E.canvas,c=E.excalidrawContainer,w=E.app,O=function(){var Oe,De=w.state,Ae=(Oe=a.Z.getScene(M))===null||Oe===void 0?void 0:Oe.getElement(L);if(Ae){var ie=Ae.textAlign,Ie=Ae.verticalAlign;if(Ae&&(0,P.iB)(Ae)){var oe=Ae.x,s=Ae.y,u=(0,U.tl)(Ae),x=Ae.width,V=Ae.height,W=Ae.width,re=Ae.height;if(u&&Ae.containerId){if((0,P.Yv)(u)){var ee=he._.getBoundTextElementPosition(u,Ae);oe=ee.x,s=ee.y}var se,Ee=function(lt,it){if(!it.style.fontFamily||!it.style.fontSize)return!1;var yt=it.style.fontFamily.replace(/"/g,"");return(0,g.$g)({fontFamily:lt.fontFamily})!==yt||"".concat(lt.fontSize,"px")!==it.style.fontSize}(Ae,$);if(Ee?se=ne(u.id,u.height):(se=D[u.id])||(se=ne(u.id,u.height)),x=(0,U.iZ)(u),V=(0,U.D9)(u,Ae),!(0,P.Yv)(u)&&re>V){var _e=(0,U.NS)(re,u.type);return void(0,K.DR)(u,{height:_e})}if(!(0,P.Yv)(u)&&u.height>se.height&&re<V){var Ue=(0,U.NS)(re,u.type);(0,K.DR)(u,{height:Ue})}else s=(0,U.FE)(u,Ae).y}var We=r(oe,s),Ye=(0,f.Z)(We,2),Ze=Ye[0],Je=Ye[1],nt=$.selectionStart,dt=$.selectionEnd,ge=$.value.length;if(nt===dt&&dt!==ge){var Se=ge-dt;$.selectionStart=$.value.length-Se,$.selectionEnd=$.value.length-Se}u?W+=.5:(x=(De.width-8-Ze)/De.zoom.value,W=Math.min(W,x));var Be=Ae.lineHeight;R.G6&&(Be=(0,U.$2)(xe(xe({},Ae),{},{fontSize:Math.round(Ae.fontSize)})));var Xe=(De.height-Je)/De.zoom.value;Object.assign($.style,{font:(0,g.mO)(Ae),lineHeight:Be,width:"".concat(W,"px"),height:"".concat(re,"px"),left:"".concat(Ze,"px"),top:"".concat(Je,"px"),transform:ce(W,re,(0,U.H_)(Ae),De,x,Xe),textAlign:ie,verticalAlign:Ie,color:Ae.strokeColor,opacity:Ae.opacity/100,filter:"var(--theme-filter)",maxHeight:"".concat(Xe,"px")}),$.scrollTop=0,(0,g.h2)()&&($.style.fontFamily=(0,g.$g)(Ae)),(0,K.DR)(Ae,{x:oe,y:s})}}},$=document.createElement("textarea");$.dir="auto",$.tabIndex=0,$.dataset.type="wysiwyg",$.wrap="off",$.classList.add("excalidraw-wysiwyg");var I="pre",C="normal";(0,P.Xh)(M)&&(I="pre-wrap",C="break-word"),Object.assign($.style,{position:"absolute",display:"inline-block",minHeight:"1em",backfaceVisibility:"hidden",margin:0,padding:0,border:0,outline:0,resize:"none",background:"transparent",overflow:"hidden",zIndex:"var(--zIndex-wysiwyg)",wordBreak:C,whiteSpace:I,overflowWrap:"break-word",boxSizing:"content-box"}),$.value=M.originalText,O(),h&&($.onpaste=function(){var Oe=(0,T.Z)(v().mark(function De(Ae){var ie,Ie,oe,s,u,x;return v().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return V.next=2,(0,be.mQ)(Ae,!0);case 2:if((ie=V.sent).text){V.next=5;break}return V.abrupt("return");case 5:if(Ie=(0,U.bG)(ie.text)){V.next=8;break}return V.abrupt("return");case 8:oe=(0,U.tl)(M),s=(0,g.mO)({fontSize:w.state.currentItemFontSize,fontFamily:w.state.currentItemFontFamily}),oe&&(u=(0,U.lD)("".concat($.value).concat(Ie),s,(0,U.iZ)(oe)),x=(0,U.mY)(u,s),$.style.width="".concat(x,"px"));case 11:case"end":return V.stop()}},De)}));return function(De){return Oe.apply(this,arguments)}}(),$.oninput=function(){h((0,U.bG)($.value))}),$.onkeydown=function(Oe){if(!Oe.shiftKey&&G.Lo.keyTest(Oe))Oe.preventDefault(),w.actionManager.executeAction(G.Lo),O();else if(!Oe.shiftKey&&G.CZ.keyTest(Oe))Oe.preventDefault(),w.actionManager.executeAction(G.CZ),O();else if(m.Tu.keyTest(Oe))w.actionManager.executeAction(m.Tu);else if(m.Zq.keyTest(Oe))w.actionManager.executeAction(m.Zq);else if(Oe.key===k.tW.ESCAPE)Oe.preventDefault(),ae=!0,H();else if(Oe.key===k.tW.ENTER&&Oe[k.tW.CTRL_OR_CMD]){if(Oe.preventDefault(),Oe.isComposing||Oe.keyCode===229)return;ae=!0,H()}else if(Oe.key===k.tW.TAB||Oe[k.tW.CTRL_OR_CMD]&&(Oe.code===k.aU.BRACKET_LEFT||Oe.code===k.aU.BRACKET_RIGHT)){if(Oe.preventDefault(),Oe.isComposing)return;Oe.shiftKey||Oe.code===k.aU.BRACKET_LEFT?pe():q(),$.dispatchEvent(new Event("input"))}};var _=" ".repeat(4),N=new RegExp("^ {1,".concat(4,"}")),q=function(){var Oe=$.selectionStart,De=$.selectionEnd,Ae=te(),ie=$.value;Ae.forEach(function(Ie){var oe=ie.slice(0,Ie),s=ie.slice(Ie);ie="".concat(oe).concat(_).concat(s)}),$.value=ie,$.selectionStart=Oe+4,$.selectionEnd=De+4*Ae.length},pe=function(){var Oe=$.selectionStart,De=$.selectionEnd,Ae=te(),ie=[],Ie=$.value;Ae.forEach(function(oe){var s=Ie.slice(oe,oe+4).match(N);if(s){var u=Ie.slice(0,oe),x=Ie.slice(oe+s[0].length);Ie="".concat(u).concat(x),ie.push(oe)}}),$.value=Ie,ie.length&&(Oe>ie[ie.length-1]?$.selectionStart=Math.max(Oe-4,ie[ie.length-1]):$.selectionStart=Oe,$.selectionEnd=Math.max($.selectionStart,De-4*ie.length))},te=function(){var Oe=$.selectionStart,De=$.selectionEnd,Ae=$.value,ie=Ae.slice(0,Oe).match(/[^\n]*$/)[0].length;return Oe-=ie,Ae.slice(Oe,De).split(`
|
|
137
|
+
`).reduce(function(Ie,oe,s,u){return Ie.concat(s?Ie[s-1]+u[s-1].length+1:Oe)},[]).reverse()},ve=function(Oe){Oe.preventDefault(),Oe.stopPropagation()},ae=!1,H=function(){var Oe;le();var De=(Oe=a.Z.getScene(M))===null||Oe===void 0?void 0:Oe.getElement(M.id);if(De){var Ae=$.value,ie=(0,U.tl)(De);if(ie){if(Ae=De.text,$.value.trim()){var Ie=(0,U.xB)(ie);Ie&&Ie===M.id?(0,P.Yv)(ie)&&(0,K.ZP)(ie):(0,K.DR)(ie,{boundElements:(ie.boundElements||[]).concat({type:"text",id:M.id})})}else{var oe;(0,K.DR)(ie,{boundElements:(oe=ie.boundElements)===null||oe===void 0?void 0:oe.filter(function(s){return!(0,P.iB)(s)})})}(0,U.oN)(De,ie)}y({text:Ae,viaKeyboard:ae,originalText:$.value})}},le=function(){Ne||(Ne=!0,$.onblur=null,$.oninput=null,$.onkeydown=null,Ce&&Ce.disconnect(),window.removeEventListener("resize",O),window.removeEventListener("wheel",ve,!0),window.removeEventListener("pointerdown",Le),window.removeEventListener("pointerup",ke),window.removeEventListener("blur",H),window.removeEventListener("beforeunload",H),Ge(),$.remove())},ke=function Oe(De){window.removeEventListener("pointerup",Oe);var Ae=De==null?void 0:De.target,ie=Ae instanceof HTMLElement&&Ae.classList.contains("active-color");setTimeout(function(){if($.onblur=H,ie){var Ie=new MutationObserver(function(oe,s){oe.find(function(u){var x;return u.removedNodes.length>0&&((x=u.removedNodes[0].dataset)===null||x===void 0?void 0:x.radixPopperContentWrapper)!==void 0})&&(setTimeout(function(){$.focus()}),s.disconnect())});Ie.observe(document.querySelector(".excalidraw-container"),{childList:!0})}ie||$.focus()})},Le=function(Oe){var De=Oe.target instanceof HTMLElement&&Oe.target.classList.contains("active-color");((Oe.target instanceof HTMLElement||Oe.target instanceof SVGElement)&&Oe.target.closest(".".concat(R.$C.SHAPE_ACTIONS_MENU))&&!(0,g.s)(Oe.target)||De)&&($.onblur=null,window.addEventListener("pointerup",ke),window.addEventListener("blur",H))},Ge=a.Z.getScene(M).addCallback(function(){var Oe;O(),!((Oe=document.activeElement)===null||Oe===void 0||!Oe.closest(".color-picker-content"))||$.focus()}),Ne=!1;$.select(),ke();var Ce=null;p&&"ResizeObserver"in window?(Ce=new window.ResizeObserver(function(){O()})).observe(p):window.addEventListener("resize",O),window.addEventListener("pointerdown",Le),window.addEventListener("wheel",ve,{passive:!1,capture:!0}),window.addEventListener("beforeunload",H),c==null||c.querySelector(".excalidraw-textEditorContainer").appendChild($)}},4048:function(fe,Q,t){t.d(Q,{Fn:function(){return P},PC:function(){return he},kK:function(){return G},oY:function(){return be},ox:function(){return a}});var T=t(2577),j=t(4949),f=t(2361),l=t(7651),v=t(4183),k=t(7766),g={mouse:8,pen:16,touch:28},a={e:!0,s:!0,n:!0,w:!0},P={e:!0,s:!0,n:!0,w:!0,rotation:!0},R={e:!0,s:!0,n:!0,w:!0},K={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},U={e:!0,s:!0,n:!0,w:!0},m=function(we,xe,ce,D,ne,S,z){var A=(0,f.U1)(we+ce/2,xe+D/2,ne,S,z),E=(0,T.Z)(A,2);return[E[0]-ce/2,E[1]-D/2,ce,D]},G=function(we,xe,ce,D){var ne=(0,T.Z)(we,6),S=ne[0],z=ne[1],A=ne[2],E=ne[3],L=ne[4],h=ne[5],y=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{},r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:4,M=g[D],p=M/ce.value,c=M/ce.value,w=M/ce.value,O=M/ce.value,$=A-S,I=E-z,C=r/ce.value,_=(M-2*k.Lu)/(2*ce.value),N={nw:y.nw?void 0:m(S-C-w+_,z-C-O+_,p,c,L,h,xe),ne:y.ne?void 0:m(A+C-_,z-C-O+_,p,c,L,h,xe),sw:y.sw?void 0:m(S-C-w+_,E+C-_,p,c,L,h,xe),se:y.se?void 0:m(A+C-_,E+C-_,p,c,L,h,xe),rotation:y.rotation?void 0:m(S+$/2-p/2,z-C-O+_-16/ce.value,p,c,L,h,xe)},q=5*g.mouse/ce.value;return Math.abs($)>q&&(y.n||(N.n=m(S+$/2-p/2,z-C-O+_,p,c,L,h,xe)),y.s||(N.s=m(S+$/2-p/2,E+C-_,p,c,L,h,xe))),Math.abs(I)>q&&(y.w||(N.w=m(S-C-w+_,z+I/2-c/2,p,c,L,h,xe)),y.e||(N.e=m(A+C-_,z+I/2-c/2,p,c,L,h,xe))),N},he=function(we,xe){var ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"mouse";if(we.locked)return{};var D={};if(we.type==="freedraw"||(0,v.bt)(we)){if(we.points.length===2){var ne=(0,T.Z)(we.points,2),S=ne[1];S[0]===0||S[1]===0?D=U:S[0]>0&&S[1]<0?D=K:S[0]>0&&S[1]>0?D=U:S[0]<0&&S[1]>0?D=K:S[0]<0&&S[1]<0&&(D=U)}}else(0,l.iB)(we)?D=R:(0,v.He)(we)&&(D={rotation:!0});var z=(0,v.bt)(we)?k.Lu+8:k.Lu;return G((0,j.qf)(we,!0),we.angle,xe,ce,D,z)},be=function(we,xe){if(xe.editingLinearElement)return!1;if(we.length>1)return!0;var ce=we[0];return!(0,v.bt)(ce)||ce.points.length>2}},4183:function(fe,Q,t){t.d(Q,{F9:function(){return a},He:function(){return g},Lx:function(){return G},Mn:function(){return m},QI:function(){return D},UQ:function(){return z},Xh:function(){return ce},Xo:function(){return xe},Yv:function(){return K},bt:function(){return R},dt:function(){return U},eK:function(){return S},f0:function(){return he},gs:function(){return v},iB:function(){return k},mG:function(){return be},pC:function(){return l},r2:function(){return we},wi:function(){return f}});var T=t(9937),j=t(9827),f=function(A){return!!A&&A.type==="image"&&!!A.fileId},l=function(A){return!!A&&A.type==="image"},v=function(A){return!!A&&A.type==="embeddable"},k=function(A){return A!=null&&A.type==="text"},g=function(A){return A!=null&&A.type==="frame"},a=function(A){return A!=null&&P(A.type)},P=function(A){return A==="freedraw"},R=function(A){return A!=null&&U(A.type)},K=function(A){return A!=null&&A.type==="arrow"},U=function(A){return A==="arrow"||A==="line"},m=function(A){var E=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return A!=null&&(!A.locked||E===!0)&&G(A.type)},G=function(A){return A==="arrow"},he=function(A){var E=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return!(A==null||A.locked&&E!==!0||A.type!=="rectangle"&&A.type!=="diamond"&&A.type!=="ellipse"&&A.type!=="image"&&A.type!=="embeddable"&&A.type!=="frame"&&(A.type!=="text"||A.containerId))},be=function(A){var E=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return A!=null&&(!A.locked||E===!0)&&(A.type==="rectangle"||A.type==="diamond"||A.type==="ellipse"||K(A))},we=function(A){var E=A==null?void 0:A.type;if(!E)return!1;switch(E){case"text":case"diamond":case"rectangle":case"embeddable":case"ellipse":case"arrow":case"freedraw":case"line":case"frame":case"image":case"selection":return!0;default:return(0,j.vE)(E,null),!1}},xe=function(A){var E;return be(A)&&!((E=A.boundElements)===null||E===void 0||!E.some(function(L){return L.type==="text"}))},ce=function(A){return A!==null&&"containerId"in A&&A.containerId!==null&&k(A)},D=function(A){return A==="rectangle"||A==="embeddable"},ne=function(A){return A==="line"||A==="arrow"||A==="diamond"},S=function(A,E){return!(A!==T.a6.ADAPTIVE_RADIUS&&A!==T.a6.LEGACY||!D(E.type))||!(A!==T.a6.PROPORTIONAL_RADIUS||!ne(E.type))},z=function(A){return ne(A.type)?{type:T.a6.PROPORTIONAL_RADIUS}:D(A.type)?{type:T.a6.ADAPTIVE_RADIUS}:null}},3506:function(fe,Q,t){t.d(Q,{_L:function(){return U},lp:function(){return K},jk:function(){return m}});var T=t(5169),j=t(8821),f=t(2248),l=t(7245),v=t(2312),k=t(5901);function g(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function a(G,he,be){return a=g()?Reflect.construct.bind():function(we,xe,ce){var D=[null];D.push.apply(D,xe);var ne=new(Function.bind.apply(we,D));return ce&&(0,k.Z)(ne,ce.prototype),ne},a.apply(null,arguments)}function P(G){var he=typeof Map=="function"?new Map:void 0;return P=function(be){if(be===null||(we=be,Function.toString.call(we).indexOf("[native code]")===-1))return be;var we;if(typeof be!="function")throw new TypeError("Super expression must either be null or a function");if(he!==void 0){if(he.has(be))return he.get(be);he.set(be,xe)}function xe(){return a(be,arguments,(0,v.Z)(this).constructor)}return xe.prototype=Object.create(be.prototype,{constructor:{value:xe,enumerable:!1,writable:!0,configurable:!0}}),(0,k.Z)(xe,be)},P(G)}function R(G){var he=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var be,we=(0,v.Z)(G);if(he){var xe=(0,v.Z)(this).constructor;be=Reflect.construct(we,arguments,xe)}else be=we.apply(this,arguments);return(0,l.Z)(this,be)}}var K=function(G){(0,f.Z)(be,G);var he=R(be);function be(){var we,xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"Couldn't export canvas.",ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"CANVAS_ERROR";return(0,j.Z)(this,be),(we=he.call(this)).name=ce,we.message=xe,we}return(0,T.Z)(be)}(P(Error)),U=function(G){(0,f.Z)(be,G);var he=R(be);function be(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"Request Aborted";return(0,j.Z)(this,be),he.call(this,we,"AbortError")}return(0,T.Z)(be)}(P(DOMException)),m=function(G){(0,f.Z)(be,G);var he=R(be);function be(){var we,xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"Image Scene Data Error",ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"IMAGE_SCENE_DATA_ERROR";return(0,j.Z)(this,be),(we=he.call(this,xe)).name="EncodingError",we.code=ce,we}return(0,T.Z)(be)}(P(Error))},4682:function(fe,Q,t){t.d(Q,{$Z:function(){return y},A_:function(){return r},Dn:function(){return ne},Qs:function(){return I},SH:function(){return S},Tq:function(){return w},_h:function(){return E},cH:function(){return $},cO:function(){return D},fj:function(){return h},lz:function(){return M},ni:function(){return L},pr:function(){return c},wO:function(){return A},xr:function(){return he},yZ:function(){return p},zD:function(){return z}});var T=t(1930),j=t(2577),f=t(7651),l=t(2361),v=t(4761),k=t(9827),g=t(583),a=t(4105),P=t(9215),R=t(457),K=t(4949),U=t(507);function m(C,_){var N=typeof Symbol<"u"&&C[Symbol.iterator]||C["@@iterator"];if(!N){if(Array.isArray(C)||(N=function(H,le){if(H){if(typeof H=="string")return G(H,le);var ke=Object.prototype.toString.call(H).slice(8,-1);if(ke==="Object"&&H.constructor&&(ke=H.constructor.name),ke==="Map"||ke==="Set")return Array.from(H);if(ke==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ke))return G(H,le)}}(C))||_){N&&(C=N);var q=0,pe=function(){};return{s:pe,n:function(){return q>=C.length?{done:!0}:{done:!1,value:C[q++]}},e:function(H){throw H},f:pe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
138
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var te,ve=!0,ae=!1;return{s:function(){N=N.call(C)},n:function(){var H=N.next();return ve=H.done,H},e:function(H){ae=!0,te=H},f:function(){try{ve||N.return==null||N.return()}finally{if(ae)throw te}}}}function G(C,_){(_==null||_>C.length)&&(_=C.length);for(var N=0,q=new Array(_);N<_;N++)q[N]=C[N];return q}var he=function(C,_,N){var q,pe=(0,k.xn)(C),te=m(_);try{for(te.s();!(q=te.n()).done;){var ve=q.value;if(ve.frameId){var ae=N.get(ve.id),H=N.get(ve.frameId);if(ae){var le=pe.get(ae);le&&(0,g.DR)(le,{frameId:H??ve.frameId},!1)}}}}catch(ke){te.e(ke)}finally{te.f()}};function be(C,_){var N=(0,K.GJ)(_),q=(0,K.GJ)(C);return N.some(function(pe){return q.some(function(te){return(0,U.y8)(pe,te)})})}var we=function(C,_){return O((0,a.Yp)(C,_,!1)).filter(function(N){return N.type!=="frame"&&!N.frameId||N.frameId===_.id})},xe=function(C,_,N){return(0,a.Yp)(C,_).some(function(q){return q.id===N.id})},ce=function(C,_){var N=(0,f.qf)(_),q=(0,j.Z)(N,4),pe=q[0],te=q[1],ve=q[2],ae=q[3],H=(0,f.KP)(C),le=(0,j.Z)(H,4),ke=le[0],Le=le[1],Ge=le[2],Ne=le[3];return pe<=ke&&te<=Le&&ve>=Ge&&ae>=Ne},D=function(C,_){return ce([C],_)||be(C,_)||xe([_],C,_)},ne=function(C,_){var N=(0,f.qf)(_),q=(0,j.Z)(N,4),pe=q[0],te=q[1],ve=q[2],ae=q[3];return(0,l.Ni)([pe,te],[C.x,C.y],[ve,ae])},S=function(C){var _,N=new Map,q=m(C);try{for(q.s();!(_=q.n()).done;){var pe=_.value,te=(0,f.He)(pe)?pe.id:pe.frameId;te&&!N.has(te)&&N.set(te,z(C,te))}}catch(ve){q.e(ve)}finally{q.f()}return N},z=function(C,_){return C.filter(function(N){return N.frameId===_})},A=function(C){return C.filter(function(_){return(0,f.He)(_)})},E=function(C){var _=(0,k.xn)(A(C));return C.filter(function(N){return _.has(N.id)||!N.frameId||!_.has(N.frameId)})},L=function(C,_,N){var q,pe=z(C,_.id),te=new Set(pe),ve=new Set([].concat((0,T.Z)(we(C,_)),(0,T.Z)(pe.filter(function(Je){return xe(C,Je,_)})))),ae=pe.filter(function(Je){return!ve.has(Je)}),H=new Set(Array.from(ve).flatMap(function(Je){return Je.groupIds})),le=m(ae);try{for(le.s();!(q=le.n()).done;){var ke=q.value;if(be(ke,_)){if(ke.groupIds.length>0){var Le,Ge=m(ke.groupIds);try{for(Ge.s();!(Le=Ge.n()).done;){var Ne=Le.value;H.add(Ne)}}catch(Je){Ge.e(Je)}finally{Ge.f()}}}else ke.groupIds.length===0&&te.delete(ke)}}catch(Je){le.e(Je)}finally{le.f()}var Ce,Oe=m(ae);try{for(Oe.s();!(Ce=Oe.n()).done;){var De=Ce.value;if(De.groupIds.length>0){var Ae,ie=!0,Ie=m(De.groupIds);try{for(Ie.s();!(Ae=Ie.n()).done;){var oe=Ae.value;H.has(oe)&&(ie=!1)}}catch(Je){Ie.e(Je)}finally{Ie.f()}ie&&te.delete(De)}}}catch(Je){Oe.e(Je)}finally{Oe.f()}var s,u=Array.from(ve).filter(function(Je){return Je.groupIds.length===0}),x=m(u);try{for(x.s();!(s=x.n()).done;){var V=s.value;te.add(V)}}catch(Je){x.e(Je)}finally{x.f()}for(var W=Array.from(ve).filter(function(Je){return Je.groupIds.length>0}),re=(0,P.yR)(W,N),ee=0,se=Object.entries(re);ee<se.length;ee++){var Ee=(0,j.Z)(se[ee],2),_e=Ee[0];if(Ee[1]){var Ue=(0,P.Fb)(C,_e);if(ce(Ue,_)){var We,Ye=m(Ue);try{for(Ye.s();!(We=Ye.n()).done;){var Ze=We.value;te.add(Ze)}}catch(Je){Ye.e(Je)}finally{Ye.f()}}}}return(0,T.Z)(te).filter(function(Je){return!((0,f.iB)(Je)&&Je.containerId)})},h=function(C,_){return O(C,we(C,_))},y=function(C,_){var N;return C.frameId?_?_.get(C.frameId)||null:((N=R.Z.getScene(C))===null||N===void 0?void 0:N.getElement(C.frameId))||null:null},r=function(C,_,N){var q,pe=C.reduce(function(Ce,Oe,De){return Oe.frameId===N.id&&Ce.currTargetFrameChildrenMap.set(Oe.id,!0),Ce},{currTargetFrameChildrenMap:new Map}),te=pe.currTargetFrameChildrenMap,ve=new Set(_.map(function(Ce){return Ce.id})),ae=[],H=m(O(C,_));try{for(H.s();!(q=H.n()).done;){var le=q.value;te.has(le.id)||ae.push(le);var ke=(0,v.WJ)(le);!ke||ve.has(ke.id)||te.has(ke.id)||ae.push(ke)}}catch(Ce){H.e(Ce)}finally{H.f()}for(var Le=0,Ge=ae;Le<Ge.length;Le++){var Ne=Ge[Le];(0,g.DR)(Ne,{frameId:N.id},!1)}return C.slice()},M=function(C,_,N){var q,pe=new Map,te=new Map,ve=m(_);try{for(ve.s();!(q=ve.n()).done;){var ae=q.value;if(ae.frameId){pe.set(ae.id,ae);var H=te.get(ae.frameId)||[];H.push(ae);var le=(0,v.WJ)(ae);le&&(pe.set(le.id,le),H.push(le)),te.set(ae.frameId,H)}}}catch(Ne){ve.e(Ne)}finally{ve.f()}var ke,Le=m(pe);try{for(Le.s();!(ke=Le.n()).done;){var Ge=(0,j.Z)(ke.value,2)[1];(0,g.DR)(Ge,{frameId:null},!1)}}catch(Ne){Le.e(Ne)}finally{Le.f()}return C.slice()},p=function(C,_,N){var q=z(C,_.id);return M(C,q)},c=function(C,_,N,q){return r(p(C,N),_,N)},w=function(C,_,N){var q=N.scene.getSelectedElements({selectedElementIds:_.selectedElementIds,elements:C}),pe=new Set(q);if(_.editingGroupId){var te,ve=m(q);try{for(ve.s();!(te=ve.n()).done;){var ae=te.value;ae.groupIds.length===0?pe.add(ae):ae.groupIds.flatMap(function(le){return(0,P.Fb)(C,le)}).forEach(function(le){return pe.add(le)})}}catch(le){ve.e(le)}finally{ve.f()}}var H=new Set;return pe.forEach(function(le){!le.frameId||(0,f.He)(le)||I(le,C,_)||H.add(le)}),H.size>0?M(C,(0,T.Z)(H)):C},O=function(C,_){var N,q=new Set,pe=m(_||C);try{for(pe.s();!(N=pe.n()).done;){var te=N.value,ve=te.groupIds[te.groupIds.length-1];ve&&q.add(ve)}}catch(Le){pe.e(Le)}finally{pe.f()}var ae,H=new Set,le=m(q);try{for(le.s();!(ae=le.n()).done;){var ke=ae.value;(0,P.Fb)(C,ke).some(function(Le){return(0,f.He)(Le)})&&H.add(ke)}}catch(Le){le.e(Le)}finally{le.f()}return(_||C).filter(function(Le){return!H.has(Le.groupIds[Le.groupIds.length-1])})},$=function(C,_){var N=(0,f.iB)(C)&&(0,v.tl)(C)||C;return _.selectedElementIds[N.id]&&_.selectedElementsAreBeingDragged?_.frameToHighlight:y(N)},I=function(C,_,N){var q=$(C,N),pe=(0,f.iB)(C)&&(0,v.tl)(C)||C;if(q){if(!N.selectedElementIds[C.id]||!N.selectedElementsAreBeingDragged)return!0;if(pe.groupIds.length===0)return D(pe,q);var te=new Set(pe.groupIds.flatMap(function(Ne){return(0,P.Fb)(_,Ne)}));if(N.editingGroupId&&N.selectedElementsAreBeingDragged){var ve=new Set((0,a.eD)(_,N));if(N.frameToHighlight!==null)return!0;ve.forEach(function(Ne){te.delete(Ne)})}var ae,H=m(te);try{for(H.s();!(ae=H.n()).done;){var le=ae.value;if((0,f.He)(le))return!1}}catch(Ne){H.e(Ne)}finally{H.f()}var ke,Le=m(te);try{for(Le.s();!(ke=Le.n()).done;){var Ge=ke.value;if(D(Ge,q))return!0}}catch(Ne){Le.e(Ne)}finally{Le.f()}}return!1}},9215:function(fe,Q,t){t.d(Q,{AI:function(){return A},F$:function(){return K},Fb:function(){return ce},Nd:function(){return xe},Qy:function(){return ne},S_:function(){return S},YS:function(){return D},bO:function(){return U},h6:function(){return z},iE:function(){return we},iJ:function(){return he},yO:function(){return G},yR:function(){return be},zq:function(){return m}});var T=t(1930),j=t(2577),f=t(7169),l=t(4105),v=t(4761),k=t(6264);function g(E,L){var h=typeof Symbol<"u"&&E[Symbol.iterator]||E["@@iterator"];if(!h){if(Array.isArray(E)||(h=function(w,O){if(w){if(typeof w=="string")return a(w,O);var $=Object.prototype.toString.call(w).slice(8,-1);if($==="Object"&&w.constructor&&($=w.constructor.name),$==="Map"||$==="Set")return Array.from(w);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return a(w,O)}}(E))||L){h&&(E=h);var y=0,r=function(){};return{s:r,n:function(){return y>=E.length?{done:!0}:{done:!1,value:E[y++]}},e:function(w){throw w},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
139
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var M,p=!0,c=!1;return{s:function(){h=h.call(E)},n:function(){var w=h.next();return p=w.done,w},e:function(w){c=!0,M=w},f:function(){try{p||h.return==null||h.return()}finally{if(c)throw M}}}}function a(E,L){(L==null||L>E.length)&&(L=E.length);for(var h=0,y=new Array(L);h<L;h++)y[h]=E[h];return y}function P(E,L){var h=Object.keys(E);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(E);L&&(y=y.filter(function(r){return Object.getOwnPropertyDescriptor(E,r).enumerable})),h.push.apply(h,y)}return h}function R(E){for(var L=1;L<arguments.length;L++){var h=arguments[L]!=null?arguments[L]:{};L%2?P(Object(h),!0).forEach(function(y){(0,f.Z)(E,y,h[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(E,Object.getOwnPropertyDescriptors(h)):P(Object(h)).forEach(function(y){Object.defineProperty(E,y,Object.getOwnPropertyDescriptor(h,y))})}return E}var K=function(E,L,h){var y=h.reduce(function(r,M){return M.groupIds.includes(E)&&(r[M.id]=!0),r},{});return Object.keys(y).length<2?L.selectedGroupIds[E]||L.editingGroupId===E?{selectedElementIds:L.selectedElementIds,selectedGroupIds:R(R({},L.selectedGroupIds),{},(0,f.Z)({},E,!1)),editingGroupId:null}:L:{editingGroupId:L.editingGroupId,selectedGroupIds:R(R({},L.selectedGroupIds),{},(0,f.Z)({},E,!0)),selectedElementIds:R(R({},L.selectedElementIds),y)}},U=function(){var E=null,L=null,h=null,y=function(r,M,p,c){var w=c?c.scene.getSelectedElements({selectedElementIds:r.selectedElementIds,elements:M}):(0,l.eD)(M,r);return w.length?function(O,$,I,C){var _;if(h!==void 0&&$===L&&O===E&&I.editingGroupId===((_=h)===null||_===void 0?void 0:_.editingGroupId))return h;var N,q={},pe=g(O);try{for(pe.s();!(N=pe.n()).done;){var te=N.value.groupIds;if(I.editingGroupId){var ve=te.indexOf(I.editingGroupId);ve>-1&&(te=te.slice(0,ve))}if(te.length>0){var ae=te[te.length-1];q[ae]=!0}}}catch(Ne){pe.e(Ne)}finally{pe.f()}for(var H={},le=$.reduce(function(Ne,Ce){var Oe=Ce.groupIds.find(function(De){return q[De]});return Oe&&(Ne[Ce.id]=!0,Array.isArray(H[Oe])?H[Oe].push(Ce.id):H[Oe]=[Ce.id]),Ne},{}),ke=0,Le=Object.keys(H);ke<Le.length;ke++){var Ge=Le[ke];H[Ge].length<2&&q[Ge]&&(q[Ge]=!1)}return L=$,E=O,h={editingGroupId:I.editingGroupId,selectedGroupIds:q,selectedElementIds:(0,k.Oh)(R(R({},I.selectedElementIds),le),C)}}(w,M,r,p):{selectedGroupIds:{},editingGroupId:null,selectedElementIds:(0,k.Oh)(r.selectedElementIds,p)}};return y.clearCache=function(){L=null,E=null,h=null},y}(),m=function(E,L){return G(E,L)!=null},G=function(E,L){return L.groupIds.filter(function(h){return h!==E.editingGroupId}).find(function(h){return E.selectedGroupIds[h]})},he=function(E){return Object.entries(E.selectedGroupIds).filter(function(L){var h=(0,j.Z)(L,2);return h[0],h[1]}).map(function(L){var h=(0,j.Z)(L,2),y=h[0];return h[1],y})},be=function(E,L){var h,y=R(R({},L),{},{selectedGroupIds:{}}),r=g(E);try{for(r.s();!(h=r.n()).done;){var M=h.value.groupIds;if(L.editingGroupId){var p=M.indexOf(L.editingGroupId);p>-1&&(M=M.slice(0,p))}if(M.length>0){var c=M[M.length-1];y=R(R({},y),K(c,y,E))}}}catch(w){r.e(w)}finally{r.f()}return y.selectedGroupIds},we=function(E,L){return R(R({},E),{},{editingGroupId:L.groupIds.length?L.groupIds[0]:null,selectedGroupIds:{},selectedElementIds:(0,f.Z)({},L.id,!0)})},xe=function(E,L){return E.groupIds.includes(L)},ce=function(E,L){return E.filter(function(h){return xe(h,L)})},D=function(E,L){return E.groupIds.find(function(h){return L[h]})},ne=function(E,L,h){for(var y=(0,T.Z)(E),r=L?E.indexOf(L):-1,M=r>-1?r:E.length,p=0;p<M;p++)y[p]=h(y[p]);return y},S=function(E,L,h){var y=(0,T.Z)(E),r=h?y.indexOf(h):-1,M=r>-1?r:y.length;return y.splice(M,0,L),y},z=function(E,L){return E.filter(function(h){return!L[h]})},A=function(E){var L=new Map;return E.forEach(function(h){var y=h.groupIds.length===0?h.id:h.groupIds[h.groupIds.length-1],r=L.get(y)||[],M=(0,v.WJ)(h);M&&r.push(M),L.set(y,[].concat((0,T.Z)(r),[h]))}),Array.from(L.values())}},334:function(fe,Q,t){t.d(Q,{F:function(){return k}});var T=t(1930),j=t(2577),f=t(9787),l=t(8242),v=t(100),k=function(g){var a=(0,f.useState)(null),P=(0,j.Z)(a,2),R=P[0],K=P[1],U=(0,l.Fy)(),m=(0,v.I)().theme,G=(0,l.J0)().container;return(0,f.useLayoutEffect)(function(){var he,be;R&&(R.className="",(he=R.classList).add.apply(he,["excalidraw"].concat((0,T.Z)((g==null||(be=g.className)===null||be===void 0?void 0:be.split(/\s+/))||[]))),R.classList.toggle("excalidraw--mobile",U.editor.isMobile),R.classList.toggle("theme--dark",m==="dark"))},[R,m,U.editor.isMobile,g==null?void 0:g.className]),(0,f.useLayoutEffect)(function(){var he=g!=null&&g.parentSelector?G==null?void 0:G.querySelector(g.parentSelector):document.body;if(he){var be=document.createElement("div");return he.appendChild(be),K(be),function(){he.removeChild(be)}}},[G,g==null?void 0:g.parentSelector]),R}},5832:function(fe,Q,t){t.d(Q,{YX:function(){return R},mF:function(){return U},yT:function(){return m}});var T=t(2577),j=t(8950),f=t(2975),l=t.n(f),v=t(3607),k=t(9787),g=t(9240),a=t(453),P=t(507),R=(0,v.cn)(new Map),K=function(){var G=(0,j.Z)(l().mark(function he(be){return l().wrap(function(we){for(;;)switch(we.prev=we.next){case 0:return we.next=2,(0,P.$D)({elements:be,appState:{exportBackground:!1,viewBackgroundColor:g.HO.white},files:null,renderEmbeddables:!1});case 2:return we.abrupt("return",we.sent);case 3:case"end":return we.stop()}},he)}));return function(he){return G.apply(this,arguments)}}(),U=function(G,he,be){var we=(0,k.useState)(),xe=(0,T.Z)(we,2),ce=xe[0],D=xe[1];return(0,k.useEffect)(function(){if(he)if(G){var ne=be.get(G);ne?D(ne):(0,j.Z)(l().mark(function S(){var z,A;return l().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,K(he);case 2:A=E.sent,(z=A.querySelector(".style-fonts"))===null||z===void 0||z.remove(),A&&(be.set(G,A),D(A));case 5:case"end":return E.stop()}},S)}))()}else(0,j.Z)(l().mark(function S(){var z;return l().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.next=2,K(he);case 2:z=A.sent,D(z);case 4:case"end":return A.stop()}},S)}))()},[G,he,be,D]),ce},m=function(){var G=(0,v.KO)(R,a.yE),he=(0,T.Z)(G,1)[0];return{clearLibraryCache:function(){return he.clear()},deleteItemsFromLibraryCache:function(be){be.forEach(function(we){return he.delete(we)})},svgCache:he}}},1901:function(fe,Q,t){t.d(Q,{O:function(){return f}});var T=t(9787),j=t(9937);function f(l,v,k){(0,T.useEffect)(function(){function g(a){var P=a;if(l.current){var R=k==null?void 0:k(P,l.current);if(R!==!0){if(R===!1)return v(P);!l.current.contains(P.target)&&document.documentElement.contains(P.target)&&(P.target.closest("[data-radix-portal]")||P.target===document.documentElement&&document.body.style.pointerEvents==="none"||P.target.closest("[data-prevent-outside-click]")||v(P))}}}return document.addEventListener(j.Ks.POINTER_DOWN,g),document.addEventListener(j.Ks.TOUCH_START,g),function(){document.removeEventListener(j.Ks.POINTER_DOWN,g),document.removeEventListener(j.Ks.TOUCH_START,g)}},[l,v,k])}},8227:function(fe,Q,t){t.d(Q,{Fp:function(){return P},G3:function(){return he},Mj:function(){return R},QT:function(){return ce},m0:function(){return G},t:function(){return we}});var T=t(8950),j=t(1930),f=t(2975),l=t.n(f),v=t(1463),k=t(4451),g=t(453),a=t(3607),P={code:"en",label:"English"},R=[P].concat((0,j.Z)([{code:"ar-SA",label:"العربية",rtl:!0},{code:"bg-BG",label:"Български"},{code:"ca-ES",label:"Català"},{code:"cs-CZ",label:"Česky"},{code:"de-DE",label:"Deutsch"},{code:"el-GR",label:"Ελληνικά"},{code:"es-ES",label:"Español"},{code:"eu-ES",label:"Euskara"},{code:"fa-IR",label:"فارسی",rtl:!0},{code:"fi-FI",label:"Suomi"},{code:"fr-FR",label:"Français"},{code:"gl-ES",label:"Galego"},{code:"he-IL",label:"עברית",rtl:!0},{code:"hi-IN",label:"हिन्दी"},{code:"hu-HU",label:"Magyar"},{code:"id-ID",label:"Bahasa Indonesia"},{code:"it-IT",label:"Italiano"},{code:"ja-JP",label:"日本語"},{code:"kab-KAB",label:"Taqbaylit"},{code:"kk-KZ",label:"Қазақ тілі"},{code:"ko-KR",label:"한국어"},{code:"ku-TR",label:"Kurdî"},{code:"lt-LT",label:"Lietuvių"},{code:"lv-LV",label:"Latviešu"},{code:"my-MM",label:"Burmese"},{code:"nb-NO",label:"Norsk bokmål"},{code:"nl-NL",label:"Nederlands"},{code:"nn-NO",label:"Norsk nynorsk"},{code:"oc-FR",label:"Occitan"},{code:"pa-IN",label:"ਪੰਜਾਬੀ"},{code:"pl-PL",label:"Polski"},{code:"pt-BR",label:"Português Brasileiro"},{code:"pt-PT",label:"Português"},{code:"ro-RO",label:"Română"},{code:"ru-RU",label:"Русский"},{code:"sk-SK",label:"Slovenčina"},{code:"sv-SE",label:"Svenska"},{code:"sl-SI",label:"Slovenščina"},{code:"tr-TR",label:"Türkçe"},{code:"uk-UA",label:"Українська"},{code:"zh-CN",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"vi-VN",label:"Tiếng Việt"},{code:"mr-IN",label:"मराठी"}].filter(function(D){return k[D.code]>=85}).sort(function(D,ne){return D.label>ne.label?1:-1}))),K="__test__",U=P,m={},G=function(){var D=(0,T.Z)(l().mark(function ne(S){return l().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if(U=S,document.documentElement.dir=U.rtl?"rtl":"ltr",document.documentElement.lang=U.code,!S.code.startsWith(K)){z.next=7;break}m={},z.next=17;break;case 7:return z.prev=7,z.next=10,t(940)("./".concat(U.code,".json"));case 10:m=z.sent,z.next=17;break;case 13:z.prev=13,z.t0=z.catch(7),console.error("Failed to load language ".concat(S.code,":"),z.t0.message),m=v;case 17:g.e_.set(xe,S.code);case 18:case"end":return z.stop()}},ne,null,[[7,13]])}));return function(ne){return D.apply(this,arguments)}}(),he=function(){return U},be=function(D,ne){for(var S=0;S<ne.length;++S){var z=ne[S];if(D[z]===void 0)return;D=D[z]}if(typeof D=="string")return D},we=function(D,ne,S){if(U.code.startsWith(K)){var z=ne?"".concat(D,"(").concat(JSON.stringify(ne).slice(1,-1),")"):D;return"[[".concat(z,"]]")}var A=D.split("."),E=be(m,A)||be(v,A)||S;if(E===void 0){var L="Can't find translation for ".concat(D);return console.warn(L),""}if(ne)for(var h in ne)E=E.replace("{{".concat(h,"}}"),String(ne[h]));return E},xe=(0,a.cn)(P.code),ce=function(){var D=(0,a.Dv)(xe,g.yE);return{t:we,langCode:D}}},453:function(fe,Q,t){t.d(Q,{e_:function(){return f},yE:function(){return j}});var T=t(3607),j=(t(9787),Symbol()),f=(0,T.Vv)()},5491:function(fe,Q,t){t.d(Q,{E0:function(){return k},Ge:function(){return g},OA:function(){return v},Wl:function(){return l},aU:function(){return j},tW:function(){return f}});var T=t(9937),j={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",THREE:"Digit3",NINE:"Digit9",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",H:"KeyH",V:"KeyV",Z:"KeyZ",R:"KeyR",S:"KeyS"},f={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:T.Um?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SUBTRACT:"-",A:"a",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",W:"w",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},l=function(a){return a===f.ARROW_LEFT||a===f.ARROW_RIGHT||a===f.ARROW_DOWN||a===f.ARROW_UP},v=function(a){return a.altKey},k=function(a){return a.shiftKey},g=function(a){return a.shiftKey}},2361:function(fe,Q,t){t.d(Q,{EK:function(){return z},H5:function(){return P},Jj:function(){return S},LW:function(){return a},N_:function(){return xe},Ni:function(){return U},U1:function(){return v},Xt:function(){return L},c9:function(){return K},eH:function(){return D},ep:function(){return A},g6:function(){return R},lk:function(){return ne},mW:function(){return E},wC:function(){return he},xj:function(){return k},yB:function(){return we},yW:function(){return be},yq:function(){return g}});var T=t(2577),j=t(9937),f=t(4949),l=t(2921),v=function(h,y,r,M,p){return[(h-r)*Math.cos(p)-(y-M)*Math.sin(p)+r,(h-r)*Math.sin(p)+(y-M)*Math.cos(p)+M]},k=function(h,y,r){return v(h[0],h[1],y[0],y[1],r)},g=function(h,y,r,M,p,c,w,O){var $=Math.cos(M),I=Math.sin(M);return h.e&&h.w?y+=p+w:h.e?(y+=p*(1+$),r+=p*I,y+=w*(1-$),r+=w*-I):h.w&&(y+=p*(1-$),r+=p*-I,y+=w*(1+$),r+=w*I),h.n&&h.s?r+=c+O:h.n?(y+=c*I,r+=c*(1-$),y+=O*-I,r+=O*(1+$)):h.s&&(y+=c*-I,r+=c*(1+$),y+=O*I,r+=O*(1-$)),[y,r]},a=function(h,y,r,M){var p=r-h,c=M-y;return Math.hypot(p,c)},P=function(h,y){return[(h[0]+y[0])/2,(h[1]+y[1])/2]},R=function(h){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;if(h.length>=3){var r=[h[0],h[h.length-1]],M=r[0],p=r[1],c=a(M[0],M[1],p[0],p[1]);return c<=j.qx/y}return!1},K=function(h,y,r){var M=h.length;if(M<3)return!1;for(var p=[Number.MAX_SAFE_INTEGER,r],c=[y,r],w=0,O=0;O<M;O++){var $=h[O],I=h[(O+1)%M];if(G($,I,c,p)){if(m($,c,I)===0)return U($,c,I);w++}}return w%2==1},U=function(h,y,r){return y[0]<=Math.max(h[0],r[0])&&y[0]>=Math.min(h[0],r[0])&&y[1]<=Math.max(h[1],r[1])&&y[1]>=Math.min(h[1],r[1])},m=function(h,y,r){var M=(y[1]-h[1])*(r[0]-y[0])-(y[0]-h[0])*(r[1]-y[1]);return M===0?0:M>0?1:2},G=function(h,y,r,M){var p=m(h,y,r),c=m(h,y,M),w=m(r,M,h),O=m(r,M,y);return p!==c&&w!==O||!(p!==0||!U(h,r,y))||!(c!==0||!U(h,M,y))||!(w!==0||!U(r,h,M))||!(O!==0||!U(r,y,M))},he=function(h,y,r){return r?[Math.round(h/r)*r,Math.round(y/r)*r]:[h,y]},be=function(h,y){var r,M,p;if(((r=y.roundness)===null||r===void 0?void 0:r.type)===j.a6.PROPORTIONAL_RADIUS||((M=y.roundness)===null||M===void 0?void 0:M.type)===j.a6.LEGACY)return h*j.Rx;if(((p=y.roundness)===null||p===void 0?void 0:p.type)===j.a6.ADAPTIVE_RADIUS){var c,w,O=(c=(w=y.roundness)===null||w===void 0?void 0:w.value)!==null&&c!==void 0?c:j._9;return h<=O/j.Rx?h*j.Rx:O}return 0},we=function(h,y){var r=l.R.generateElementShape(h);if(!r)return null;for(var M=(0,f.CM)(r[0]),p=[0,0],c=0,w=1/0,O=null;c<M.length;){var $=M[c],I=$.op,C=$.data;if(I==="move"&&(p=C),I==="bcurveTo"){var _=p,N=[C[0],C[1]],q=[C[2],C[3]],pe=[C[4],C[5]],te=a(pe[0],pe[1],y[0],y[1]);te<w&&(w=te,O=[_,N,q,pe]),p=pe}c++}return O},xe=function(h,y,r,M,p){var c=function(w,O){return Math.pow(1-w,3)*M[O]+3*w*Math.pow(1-w,2)*r[O]+3*Math.pow(w,2)*(1-w)*y[O]+h[O]*Math.pow(w,3)};return[c(p,0),c(p,1)]},ce=function(h,y){var r=[];r[0]=0;for(var M=function(w,O){var $=we(w,O);if(!$)return[];for(var I=[],C=1;C>0;){var _=xe($[0],$[1],$[2],$[3],C);I.push([_[0],_[1]]),C-=.05}return I.length&&S(I.at(-1),O)&&I.push([O[0],O[1]]),I}(h,y),p=0,c=0;p<M.length-1;)c+=a(M[p][0],M[p][1],M[p+1][0],M[p+1][1]),r.push(c),p++;return r},D=function(h,y){return ce(h,y).at(-1)},ne=function(h,y,r){for(var M=ce(h,y),p=M.length-1,c=r*M.at(-1),w=0,O=p,$=0;w<O;)M[$=Math.floor(w+(O-w)/2)]<c?w=$+1:O=$;return M[$]>c&&$--,M[$]===c?$/p:1-($+(c-M[$])/(M[$+1]-M[$]))/p},S=function(h,y){return h[0]===y[0]&&h[1]===y[1]},z=function(h){return Math.round(h/Math.PI*1e4)%5e3==0},A=function(h,y){var r=(0,T.Z)(h,2),M=r[0],p=r[1],c=(0,T.Z)(y,2),w=c[0],O=c[1];return M<=w?p>=w:M>=w&&O>=M},E=function(h,y){var r=Math.max(h[0],y[0]),M=Math.min(h[1],y[1]);return r<=M?[r,M]:null},L=function(h,y,r){return h>=y&&h<=r}},4864:function(fe,Q,t){t.d(Q,{zx:function(){return ge.z},Or:function(){return ot.O},Eb:function(){return Yn},ut:function(){return w.ut},$_:function(){return te},vO:function(){return _t},LO:function(){return w.LO},lb:function(){return ve.Z},YE:function(){return tn.YE},C6:function(){return w.C6},B4:function(){return dt},ZP:function(){return Pt.ZP},wc:function(){return mt.w},Fp:function(){return U.Fp},sQ:function(){return xt.sQ},Xs:function(){return xt.Xs},Fl:function(){return Yt.Fl},NL:function(){return Yt.NL},i1:function(){return Yt.i1},$D:function(){return Yt.$D},KP:function(){return jt.KP},N7:function(){return Yt.N7},Lm:function(){return ut.Lm},Uo:function(){return ut.Uo},Ne:function(){return xt.Ne},QD:function(){return ut.QD},bt:function(){return Zt.bt},Mj:function(){return U.Mj},cT:function(){return Yt.cT},lV:function(){return Yt.lV},ZY:function(){return Yt.ZY},zh:function(){return Yt.zh},DR:function(){return Pt.DR},BE:function(){return Pt.BE},$u:function(){return It.$u},Di:function(){return en.Di},nu:function(){return Tt.nu},lY:function(){return Tt.lY},ET:function(){return Tt.ET},wJ:function(){return Tt.wJ},_i:function(){return be._i},I_:function(){return Yt.I_},NI:function(){return Yt.NI},Fy:function(){return he.Fy},xS:function(){return en.xS},QT:function(){return U.QT},dE:function(){return be.dE}});var T=t(6479),j=t.n(T),f=t(9713),l=t.n(f),v=t(9787),k=t.n(v),g=t(8950),a=t(2577),P=t(2975),R=t.n(P),K=t(7165),U=t(8227),m=t(4512),G=function(ht){var Xt=(0,v.useState)(!0),zt=(0,a.Z)(Xt,2),Vt=zt[0],Tn=zt[1];return(0,v.useEffect)(function(){var Dn=function(){var Xn=(0,g.Z)(R().mark(function jn(){return R().wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:return wt.next=2,(0,U.m0)(Nn);case 2:Tn(!1);case 3:case"end":return wt.stop()}},jn)}));return function(){return Xn.apply(this,arguments)}}(),Nn=U.Mj.find(function(Xn){return Xn.code===ht.langCode})||U.Fp;Dn()},[ht.langCode]),Vt?(0,m.jsx)(K.z,{theme:ht.theme}):ht.children},he=t(8242),be=t(9827),we=t(3379),xe=t.n(we),ce=t(7795),D=t.n(ce),ne=t(569),S=t.n(ne),z=t(3565),A=t.n(z),E=t(9216),L=t.n(E),h=t(4589),y=t.n(h),r=t(9915),M={};M.styleTagTransform=y(),M.setAttributes=A(),M.insert=S().bind(null,"head"),M.domAPI=D(),M.insertStyleElement=L(),xe()(r.Z,M),r.Z&&r.Z.locals&&r.Z.locals;var p=t(9310),c={};c.styleTagTransform=y(),c.setAttributes=A(),c.insert=S().bind(null,"head"),c.domAPI=D(),c.insertStyleElement=L(),xe()(p.Z,c),p.Z&&p.Z.locals&&p.Z.locals;var w=t(9937),O=t(3607),$=t(453),I=t(45),C=t(4572),_=t(8793),N={};N.styleTagTransform=y(),N.setAttributes=A(),N.insert=S().bind(null,"head"),N.domAPI=D(),N.insertStyleElement=L(),xe()(_.Z,N),_.Z&&_.Z.locals&&_.Z.locals;var q=t(100),pe=function(ht){var Xt=ht.children,zt=(0,C.R6)().FooterCenterTunnel,Vt=(0,q.I)();return(0,m.jsx)(zt.In,{children:(0,m.jsx)("div",{className:(0,I.Z)("footer-center zen-mode-transition",{"layer-ui__wrapper__footer-left--transition-bottom":Vt.zenModeEnabled}),children:Xt})})},te=pe;pe.displayName="FooterCenter";var ve=t(7021),ae=t(7169),H=t(2726),le=t(5463),ke=t(2529),Le=t(8935),Ge=t(5744),Ne={};Ne.styleTagTransform=y(),Ne.setAttributes=A(),Ne.insert=S().bind(null,"head"),Ne.domAPI=D(),Ne.insertStyleElement=L(),xe()(Ge.Z,Ne),Ge.Z&&Ge.Z.locals&&Ge.Z.locals;var Ce=function(){return(0,m.jsx)("svg",{viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"ExcalidrawLogo-icon",children:(0,m.jsx)("path",{d:"M39.9 32.889a.326.326 0 0 0-.279-.056c-2.094-3.083-4.774-6-7.343-8.833l-.419-.472a.212.212 0 0 0-.056-.139.586.586 0 0 0-.167-.111l-.084-.083-.056-.056c-.084-.167-.28-.278-.475-.167-.782.39-1.507.973-2.206 1.528-.92.722-1.842 1.445-2.708 2.25a8.405 8.405 0 0 0-.977 1.028c-.14.194-.028.361.14.444-.615.611-1.23 1.223-1.843 1.861a.315.315 0 0 0-.084.223c0 .083.056.166.111.194l1.09.833v.028c1.535 1.528 4.244 3.611 7.12 5.861.418.334.865.667 1.284 1 .195.223.39.473.558.695.084.11.28.139.391.055.056.056.14.111.196.167a.398.398 0 0 0 .167.056.255.255 0 0 0 .224-.111.394.394 0 0 0 .055-.167c.029 0 .028.028.056.028a.318.318 0 0 0 .224-.084l5.082-5.528a.309.309 0 0 0 0-.444Zm-14.63-1.917a.485.485 0 0 0 .111.14c.586.5 1.2 1 1.843 1.555l-2.569-1.945-.251-.166c-.056-.028-.112-.084-.168-.111l-.195-.167.056-.056.055-.055.112-.111c.866-.861 2.346-2.306 3.1-3.028-.81.805-2.43 3.167-2.095 3.944Zm8.767 6.89-2.122-1.612a44.713 44.713 0 0 0-2.625-2.5c1.145.861 2.122 1.611 2.262 1.75 1.117.972 1.06.806 1.815 1.445l.921.666a1.06 1.06 0 0 1-.251.25Zm.558.416-.056-.028c.084-.055.168-.111.252-.194l-.196.222ZM1.089 5.75c.055.361.14.722.195 1.056.335 1.833.67 3.5 1.284 4.75l.252.944c.084.361.223.806.363.917 1.424 1.25 3.602 3.11 5.947 4.889a.295.295 0 0 0 .363 0s0 .027.028.027a.254.254 0 0 0 .196.084.318.318 0 0 0 .223-.084c2.988-3.305 5.221-6.027 6.813-8.305.112-.111.14-.278.14-.417.111-.111.195-.25.307-.333.111-.111.111-.306 0-.39l-.028-.027c0-.055-.028-.139-.084-.167-.698-.666-1.2-1.138-1.731-1.638-.922-.862-1.871-1.75-3.881-3.75l-.028-.028c-.028-.028-.056-.056-.112-.056-.558-.194-1.703-.389-3.127-.639C6.087 2.223 3.21 1.723.614.944c0 0-.168 0-.196.028l-.083.084c-.028.027-.056.055-.224.11h.056-.056c.028.167.028.278.084.473 0 .055.112.5.112.555l.782 3.556Zm15.496 3.278-.335-.334c.084.112.196.195.335.334Zm-3.546 4.666-.056.056c0-.028.028-.056.056-.056Zm-2.038-10c.168.167.866.834 1.033.973-.726-.334-2.54-1.167-3.379-1.445.838.167 1.983.334 2.346.472ZM1.424 2.306c.419.722.754 3.222 1.089 5.666-.196-.778-.335-1.555-.503-2.278-.251-1.277-.503-2.416-.838-3.416.056 0 .14 0 .252.028Zm-.168-.584c-.112 0-.223-.028-.307-.028 0-.027 0-.055-.028-.055.14 0 .223.028.335.083Zm-1.089.222c0-.027 0-.027 0 0ZM39.453 1.333c.028-.11-.558-.61-.363-.639.42-.027.42-.666 0-.666-.558.028-1.144.166-1.675.25-.977.194-1.982.389-2.96.61-2.205.473-4.383.973-6.561 1.557-.67.194-1.424.333-2.066.666-.224.111-.196.333-.084.472-.056.028-.084.028-.14.056-.195.028-.363.056-.558.083-.168.028-.252.167-.224.334 0 .027.028.083.028.11-1.173 1.556-2.485 3.195-3.909 4.945-1.396 1.611-2.876 3.306-4.356 5.056-4.719 5.5-10.052 11.75-15.943 17.25a.268.268 0 0 0 0 .389c.028.027.056.055.084.055-.084.084-.168.14-.252.222-.056.056-.084.111-.084.167a.605.605 0 0 0-.111.139c-.112.111-.112.305.028.389.111.11.307.11.39-.028.029-.028.029-.056.056-.056a.44.44 0 0 1 .615 0c.335.362.67.723.977 1.028l-.698-.583c-.112-.111-.307-.083-.39.028-.113.11-.085.305.027.389l7.427 6.194c.056.056.112.056.196.056s.14-.028.195-.084l.168-.166c.028.027.083.027.111.027.084 0 .14-.027.196-.083 10.052-10.055 18.15-17.639 27.42-24.417.083-.055.111-.166.111-.25.112 0 .196-.083.251-.194 1.704-5.194 2.039-9.806 2.15-12.083v-.028c0-.028.028-.056.028-.083.028-.056.028-.084.028-.084a1.626 1.626 0 0 0-.111-1.028ZM21.472 9.5c.446-.5.893-1.028 1.34-1.5-2.876 3.778-7.65 9.583-14.408 16.5 4.607-5.083 9.242-10.333 13.068-15ZM5.193 35.778h.084-.084Zm3.462 3.194c-.027-.028-.027-.028 0-.028v.028Zm4.16-3.583c.224-.25.448-.472.699-.722 0 0 0 .027.028.027-.252.223-.475.445-.726.695Zm1.146-1.111c.14-.14.279-.334.446-.5l.028-.028c1.648-1.694 3.351-3.389 5.082-5.111l.028-.028c.419-.333.921-.694 1.368-1.028a379.003 379.003 0 0 0-6.952 6.695ZM24.794 6.472c-.921 1.195-1.954 2.778-2.82 4.028-2.736 3.944-11.532 13.583-11.727 13.75a1976.983 1976.983 0 0 1-8.042 7.639l-.167.167c-.14-.167-.14-.417.028-.556C14.49 19.861 22.03 10.167 25.074 5.917c-.084.194-.14.36-.28.555Zm4.83 5.695c-1.116-.64-1.646-1.64-1.34-2.611l.084-.334c.028-.083.084-.194.14-.277.307-.5.754-.917 1.257-1.167.027 0 .055 0 .083-.028-.028-.056-.028-.139-.028-.222.028-.167.14-.278.335-.278.335 0 1.369.306 1.76.639.111.083.223.194.335.305.14.167.363.445.474.667.056.028.112.306.196.445.056.222.111.472.084.694-.028.028 0 .194-.028.194a2.668 2.668 0 0 1-.363 1.028c-.028.028-.028.056-.056.084l-.028.027c-.14.223-.335.417-.53.556-.643.444-1.369.583-2.095.389 0 0-.195-.084-.28-.111Zm8.154-.834a39.098 39.098 0 0 1-.893 3.167c0 .028-.028.083 0 .111-.056 0-.084.028-.14.056-2.206 1.61-4.356 3.305-6.506 5.028 1.843-1.64 3.686-3.306 5.613-4.945.558-.5.949-1.139 1.06-1.861l.28-1.667v-.055c.14-.334.67-.195.586.166Z",fill:"currentColor"})})},Oe=function(){return(0,m.jsxs)("svg",{viewBox:"0 0 450 55",xmlns:"http://www.w3.org/2000/svg",fill:"none",className:"ExcalidrawLogo-text",children:[(0,m.jsx)("path",{d:"M429.27 96.74c2.47-1.39 4.78-3.02 6.83-4.95 1.43-1.35 2.73-2.86 3.81-4.51-.66.9-1.4 1.77-2.23 2.59-2.91 2.84-5.72 5.09-8.42 6.87h.01ZM343.6 69.36c.33 3.13.58 6.27.79 9.4.09 1.37.18 2.75.25 4.12-.12-4.46-.27-8.93-.5-13.39-.11-2.08-.24-4.16-.4-6.24-.06 1.79-.11 3.85-.13 6.11h-.01ZM378.47 98.34c.01-.37.07-1.13.01-6.51-.11 1.9-.22 3.81-.31 5.71-.07 1.42-.22 2.91-.16 4.35.39.03.78.07 1.17.1-.92-.85-.76-2.01-.72-3.66l.01.01ZM344.09 86.12c-.09-2.41-.22-4.83-.39-7.24v12.21c.15-.05.32-.09.47-.14.05-1.61-.03-3.23-.09-4.83h.01ZM440.69 66.79c-.22-.34-.45-.67-.69-.99-3.71-4.87-9.91-7.14-15.65-8.55-1.05-.26-2.12-.49-3.18-.71 2.29.59 4.48 1.26 6.64 2.02 7.19 2.54 10.57 5.41 12.88 8.23ZM305.09 72.46l1.2 3.6c.84 2.53 1.67 5.06 2.46 7.61.24.78.5 1.57.73 2.36.22-.04.44-.08.67-.12a776.9 776.9 0 0 1-5.01-13.57c-.02.04-.03.09-.05.13v-.01ZM345.49 90.25v.31c1.48-.42 3.05-.83 4.66-1.2-1.56.25-3.12.52-4.66.89ZM371.02 90.22c0-.57-.04-1.14-.11-1.71-.06-.02-.12-.04-.19-.05-.21-.05-.43-.08-.65-.11.42.16.74.88.95 1.87ZM398.93 54.23c-.13 0-.27-.01-.4-.02l.03.4c.11-.15.23-.27.37-.38ZM401.57 62.28v-.15c-1.22-.24-2.86-.61-3.23-1.25-.09-.15-.18-.51-.27-.98-.09.37-.2.73-.33 1.09 1.24.56 2.52.98 3.83 1.29ZM421.73 88.68c-2.97 1.65-6.28 3.12-9.69 3.68v.18c4.72-.14 11.63-3.85 16.33-8.38-2.04 1.75-4.33 3.24-6.63 4.53l-.01-.01ZM411.28 80.92c-.05-1.2-.09-2.4-.15-3.6-.21 5.66-.46 11.38-.47 14.51.24-.02.48-.04.71-.07.15-3.61.05-7.23-.09-10.83v-.01Z",transform:"translate(-144.023 -51.76)"}),(0,m.jsx)("path",{d:"M425.38 67.41c-3.5-1.45-7.19-2.57-14.06-3.62.09 1.97.06 4.88-.03 8.12.03.04.06.09.06.15.19 1.36.28 2.73.37 4.1.25 3.77.39 7.55.41 11.33 0 1.38-.01 2.76-.07 4.13 1.4-.25 2.78-.65 4.12-1.15 4.07-1.5 7.94-3.78 11.28-6.54 2.33-1.92 5.13-4.49 5.88-7.58.63-3.53-2.45-6.68-7.97-8.96l.01.02ZM411.35 92.53v-.06l-.34.03c.11.01.22.03.34.03ZM314.26 64.06c-.23-.59-.47-1.17-.7-1.75.57 1.62 1.11 3.25 1.6 4.9l.15.54 2.35 6.05c.32.82.66 1.64.98 2.46-1.38-4.1-2.83-8.17-4.39-12.2h.01ZM156.82 103.07c-.18.13-.38.23-.58.33 1.32-.03 2.66-.2 3.93-.34.86-.09 1.72-.22 2.58-.33-2.12.1-4.12.17-5.94.34h.01ZM210.14 68.88s.03.04.05.07c.18-.31.39-.64.58-.96-.21.3-.42.6-.64.89h.01ZM201.65 82.8c-.5.77-1.02 1.56-1.49 2.37 1.11-1.55 2.21-3.1 3.2-4.59-.23.23-.49.51-.75.79-.32.47-.65.95-.96 1.43ZM194.03 98.66c-.33-.4-.65-.84-1.05-1.17-.24-.2-.07-.49.17-.56-.23-.26-.42-.5-.63-.75 1.51-2.55 3.93-5.87 6.4-9.28-.17-.08-.29-.28-.2-.49.04-.09.09-.17.13-.26-1.21 1.78-2.42 3.55-3.61 5.33-.87 1.31-1.74 2.64-2.54 4-.29.5-.63 1.04-.87 1.61.81.65 1.63 1.27 2.47 1.88-.09-.11-.18-.21-.27-.32v.01ZM307.79 82.93c-1-3.17-2.05-6.32-3.1-9.48-1.62 4.08-3.69 9.17-6.16 15.19 3.32-1.04 6.77-1.87 10.27-2.5-.32-1.08-.67-2.15-1.01-3.21ZM149.5 80.7c.05-1.71.04-3.43 0-5.14-.1 2.26-.16 4.51-.22 6.77-.02.73-.03 1.46-.04 2.19.14-1.27.2-2.55.24-3.82h.02ZM228.98 98.3c.39 1.25.91 3.03.94 3.91.06-.03.12-.07.17-.1.08-1.29-.55-2.65-1.11-3.81ZM307.72 53.36c.81.5 1.53 1.04 2.07 1.49-.38-.8-.78-1.58-1.21-2.35-.17.03-.34.06-.51.11-.43.12-.86.26-1.29.41.35-.01.53.1.94.34ZM283.69 96.14c3.91-7.25 6.89-13.35 8.88-18.15l1.1-2.66c-1.27 2.64-2.56 5.27-3.83 7.9-1.53 3.15-3.06 6.31-4.58 9.47-.87 1.81-1.76 3.62-2.54 5.47.04.02.07.04.11.07.05.05.1.09.15.14.05-.73.27-1.48.71-2.24ZM289.92 103.23s-.04.01-.05.03c0-.02.04-.03.05-.04.05-.05.11-.1.16-.15l.21-.21c-.55 0-1.5-.27-2.55-.72.4.26.8.51 1.22.74.24.13.48.26.73.37.05.02.1.03.14.05a.27.27 0 0 1 .08-.07h.01ZM269.23 68.49c-.39-.19-.82-.48-1.33-.87-3.06-1.56-6.31-2.78-9.36-2.35-3.5.49-5.7 1.11-7.74 2.44 5.71-2.6 12.82-2.07 18.44.79l-.01-.01ZM177.87 53.69l1.06.03c-.96-.22-2-.25-2.89-.3-4.95-.26-9.99.33-14.86 1.19-2.44.43-4.88.95-7.28 1.59 9.09-1.76 15.69-2.77 23.97-2.51ZM219.85 55.51c-.18.12-.36.27-.56.45-.45.53-.86 1.11-1.26 1.66-1.91 2.61-3.71 5.31-5.57 7.95l-.12.18 8.05-10.11c-.18-.05-.36-.1-.55-.13h.01ZM510.71 54.1c.12-.15.29-.3.53-.45.69-.4 3.72-.63 5.87-.74-.36-.02-.73-.04-1.09-.05-1.84-.03-3.67.09-5.49.35.05.3.12.59.18.88v.01ZM510.76 86.02c1.37-3.07 2.49-6.27 3.57-9.46.55-1.64 1.12-3.3 1.6-4.97-1.59 4.01-3.67 9.14-6.2 15.3.24-.08.5-.14.74-.22.1-.22.19-.44.29-.65ZM566.95 75.76c.11-.02.23.03.31.11-.05-.13-.09-.26-.14-.39-.05.09-.11.18-.17.28ZM511.33 86.41c3.08-.89 6.24-1.62 9.46-2.14-1.51-3.98-2.98-7.96-4.39-11.87-.05.15-.09.31-.14.46-1.02 3.32-2.15 6.61-3.39 9.85-.48 1.25-.98 2.49-1.53 3.7h-.01ZM578.24 74.45c.11-.44.23-.87.35-1.31-.31.7-.64 1.39-.97 2.08.09.21.19.4.28.61.12-.46.23-.92.35-1.38h-.01ZM520.62 53.11c-.09 0-.18-.01-.28-.02.38.34.29 1.08.93 2.53l6.65 17.15c2.2 5.68 4.69 11.36 7.41 16.87l1.06 2.17c-2.95-7.05-5.92-14.08-8.87-21.13-1.58-3.79-3.16-7.59-4.7-11.4-.78-1.92-1.73-3.89-2.25-5.91-.03-.1 0-.19.04-.26h.01ZM578.78 77.87c1.45-5.77 3.07-10.43 3.58-13.36.05-.34.16-.88.31-1.55-.67 1.79-1.37 3.56-2.08 5.33-.12.43-.23.86-.35 1.29-.65 2.43-1.29 4.86-1.9 7.3.14.33.29.65.43 1l.01-.01ZM545.3 94.66c.02-.44.03-.83.05-1.12.02-1.01.05-2.02.11-3.02.03-6.66-.46-14.33-1.46-22.8-.13-.42-.27-1.24-.56-2.89 0-.02 0-.04-.01-.06.62 6.61.95 13.25 1.32 19.87.17 3.08.33 6.16.52 9.23.02.25.03.52.04.78l-.01.01ZM580.77 102.81c.13.2.27.38.37.49.27-.11.53-.22.8-.32-.43.09-.82.05-1.17-.16v-.01ZM530.48 104.07h.33c-.36-.13-.71-.32-1.04-.56.14.24.3.47.45.7.06-.08.14-.13.26-.13v-.01ZM542.63 58.82c.06.23.11.47.15.71.14-.33.36-.62.7-.86-.28.05-.57.11-.85.15ZM583.81 57.87c.15-.7.29-1.41.42-2.11-.14.45-.28.9-.42 1.34-.46 1.44-.89 2.89-1.31 4.34.44-1.19.88-2.37 1.31-3.57ZM523.62 91.48c-4.66 1.17-9.05 2.89-14.02 5.27 4.65-1.84 9.48-3.29 14.28-4.63-.09-.22-.17-.41-.26-.64ZM460.64 78.3c-.04-2.9-.11-5.81-.28-8.71-.1-1.68-.17-3.43-.5-5.09-.07.02-.14.03-.2.05.3 6.54.45 12.17.51 17.12.17-.07.34-.14.51-.2 0-1.06-.01-2.11-.03-3.17h-.01ZM470.63 63.24c-3.38-.26-6.81.32-10.1 1.1.41 2.01.47 4.14.57 6.18.18 3.55.25 7.11.27 10.67 3.31-1.38 6.5-3.12 9.3-5.35 1.96-1.56 3.86-3.41 5.02-5.66.73-1.41 1.19-3.22.26-4.65-1.09-1.7-3.46-2.14-5.32-2.29ZM460.29 63.68c1-.24 2.01-.46 3.04-.65-1.15.16-2.37.38-3.71.69v.13c.07-.02.15-.04.22-.05.11-.13.3-.18.45-.11v-.01ZM457.24 100.96c.43-.03.86-.07 1.29-.11.14-.49.27-.99.38-1.49-.44.7-1 1.23-1.67 1.6ZM482.88 104.98c-.18.23-.36.38-.55.47.14.09.27.19.4.28a70.76 70.76 0 0 0 4.37-4.63c.76-.89 1.52-1.81 2.19-2.77-.3-.27-.61-.53-.92-.79-.07 1.94-4.62 6.32-5.49 7.45v-.01Z",transform:"translate(-144.023 -51.76)"}),(0,m.jsx)("path",{d:"M474.36 63.31c-.4-.16-.84-.27-1.29-.37 1.56.42 3.08 1.22 3.76 2.74.62 1.4.32 2.95-.28 4.32.7-1.22.94-2.34.74-3.47-.24-1.33-1.19-2.54-2.93-3.21v-.01ZM477.34 89.18c-1.2-.81-2.4-1.62-3.6-2.42-.14.1-.26.19-.4.29 1.4.67 2.73 1.39 4 2.13ZM465.88 93.85c.37.25.74.5 1.1.75.46.32.92.65 1.38.97-1.57-1.2-2.01-1.61-2.49-1.72h.01ZM574.92 90.06c-2.28-5.21-4.93-11.13-5.67-12.26-.1-.15-1.57-3.01-1.63-3.08 0 0-.01.02-.02.02.4 1.37 1.09 2.69 1.65 3.99 2.14 4.95 4.36 9.86 6.67 14.73.6 1.26 1.21 2.52 1.83 3.78-.75-2.01-1.64-4.45-2.83-7.18ZM448.73 65.29c.1.2.22.38.34.57.22-.02.43-.06.65-.08v-.08c-.14-.05-.25 0-.99-.41ZM460.16 94.81c-.02.31-.06.59-.1.89-.03 1.71-.33 3.43-.79 5.07.15-.02.3-.03.45-.05.01-.04.02-.08.03-.11.09-.34.15-.69.2-1.03.17-1.07.25-2.16.33-3.24.05-.69.08-1.39.12-2.08-.27.1-.27.26-.24.57v-.02Z",transform:"translate(-144.023 -51.76)"}),(0,m.jsx)("path",{d:"m328.67 98.12-3.22-6.58c-1.29-2.63-2.53-5.29-3.72-7.97-.25-.85-.52-1.69-.79-2.53-.81-2.57-1.67-5.12-2.55-7.67-1.92-5.53-3.9-11.08-6.32-16.41-.72-1.58-1.46-3.44-2.63-4.79-.03-.17-.16-.29-.34-.36a.282.282 0 0 0-.23-.04c-.06-.01-.12 0-.18.01-.74.06-1.5.38-2.19.61-2.22.77-4.4 1.64-6.63 2.38-.03-.08-.06-.16-.09-.25-.15-.42-.82-.24-.67.19.03.09.07.19.1.28l-.18.06c-.36.11-.28.6 0 .68.18 1.18.63 2.36.98 3.49.03.09.06.17.08.26-.08.23-.17.46-.24.64-.37.98-.79 1.94-1.21 2.9-1.27 2.89-2.62 5.75-3.98 8.6-3.18 6.67-6.44 13.31-9.64 19.97-1.08 2.25-2.2 4.5-3.15 6.81-.13.32.24.5.5.37 1.34 1.33 2.84 2.5 4.4 3.57.65.44 1.31.87 2.01 1.24.4.22.86.48 1.33.5.24.01.35-.19.33-.37.11-.1.21-.21.28-.28.41-.41.81-.84 1.2-1.26.85-.92 1.69-1.87 2.5-2.84 6.31-2.34 12.6-4.31 18.71-5.84 2.14 5.3 3.43 8.43 3.97 9.58.55 1.05 1.15 1.88 1.82 2.52 1.32.56 6.96-.03 9.23-1.96.87-1.28 1.19-2.67.93-4.15-.09-.5-.22-.95-.4-1.33l-.01-.03Zm-20.09-45.61c.43.77.83 1.56 1.21 2.35-.54-.45-1.27-.99-2.07-1.49-.42-.24-.6-.35-.94-.34.43-.15.85-.29 1.29-.41.17-.05.34-.08.51-.11Zm-25.86 45.66c.78-1.85 1.67-3.66 2.54-5.47 1.51-3.16 3.05-6.31 4.58-9.47 1.28-2.63 2.56-5.26 3.83-7.9l-1.1 2.66c-1.99 4.79-4.97 10.9-8.88 18.15-.43.76-.66 1.51-.71 2.24-.05-.05-.1-.09-.15-.14a.259.259 0 0 0-.11-.07Zm6.24 4.71c-.42-.23-.82-.48-1.22-.74 1.05.45 2 .72 2.55.72l-.21.21c-.05.05-.11.1-.16.15-.01.01-.04.03-.05.04 0-.02.03-.02.05-.03a.27.27 0 0 0-.08.07c-.05-.02-.1-.03-.14-.05-.25-.1-.49-.24-.73-.37h-.01Zm15.73-29.43c1.05 3.15 2.1 6.31 3.1 9.48.34 1.06.69 2.13 1.01 3.21-3.5.63-6.95 1.46-10.27 2.5 2.48-6.03 4.54-11.11 6.16-15.19Zm4.79 12.57c-.23-.79-.49-1.58-.73-2.36-.79-2.54-1.63-5.08-2.46-7.61l-1.2-3.6c.02-.04.04-.09.05-.13 1.6 4.45 3.28 9 5.01 13.57l-.67.12v.01Zm5.83-18.27-.15-.54c-.49-1.64-1.03-3.28-1.6-4.9.23.58.47 1.17.7 1.75 1.56 4.03 3.01 8.1 4.39 12.2-.33-.82-.67-1.64-.98-2.46l-2.35-6.05h-.01ZM390.43 79.37c-.13-10.43-.22-17.5-.24-19.97-.24-1.6.21-2.88-.65-3.65-.14-.13-.32-.23-.52-.32h.03c.45 0 .45-.69 0-.7-1.75-.03-3.5-.04-5.25-.14-1.38-.08-2.76-.21-4.15-.31-.07 0-.12.01-.17.04-.21-.07-.47.03-.45.31l.03.45c-.11.14-.19.3-.22.5-.21 1.26-.32 13.67-.36 23.59-.32 5.79-.67 11.57-.97 17.36-.09 1.73-.29 3.54-.21 5.3-.39.02-.38.64.04.69v.12c.05.44.74.45.7 0v-.06c1.1.09 2.2.21 3.3.3 1.14.19 2.44.2 3.29.17 1.73-.05 2.92-.05 3.8-.37.45-.05.9-.11 1.35-.17.44-.06.25-.73-.19-.67h-.01c.24-.32.45-.72.62-1.25.66-1.84.41-6.36.34-11.33l-.13-9.9.02.01Zm-12.26 18.17c.09-1.91.2-3.81.31-5.71.06 5.38 0 6.14-.01 6.51-.05 1.65-.21 2.81.72 3.66-.39-.04-.78-.07-1.17-.1-.06-1.44.09-2.93.16-4.35l-.01-.01ZM588.97 53.85c-2.06-.25-3.17-.51-3.76-.6a.3.3 0 0 1 .04-.08c.22-.39-.39-.75-.6-.35-.56 1.02-.9 2.19-1.26 3.29-.61 1.88-1.17 3.78-1.72 5.68-.63 2.19-1.24 4.39-1.83 6.59-.81 2.03-1.67 4.05-2.61 6.03-1.7-3.64-3.11-6.04-4.03-7.57-2.26-3.74-2.85-5.48-3.57-6.08l.31-.09c.43-.12.25-.8-.19-.67-1.06.3-2.12.6-3.17.95-.93.32-1.85.69-2.76 1.07-.13.05-.19.16-.22.27-.04.02-.08.05-.11.07-.04-.06-.07-.12-.11-.18a.354.354 0 0 0-.48-.12c-.16.09-.22.32-.13.48l.33.54c0 .09.02.18.06.28.51 1.16.78 1.38.72 1.47-2.42 3.44-5.41 7.86-6.2 9.1-1.27 1.97-2.01 3.14-2.45 3.84l-.91-6.56-.43-4.1c-.19-1.85-.37-3.23-.53-4.13-.19-1.1-.3-2.15-.45-3.16-.2-1.36-.29-2.06-.47-2.42h.04c.45.02.45-.68 0-.7-3.43-.16-6.81.94-10.17 1.48-.24-.22-.73-.04-.58.32.24.59.33 1.25.43 1.87.17 1.06.29 2.13.4 3.2.32 3.09.53 6.2.74 9.3.44 6.75.77 13.51 1.17 20.26.11 1.95.13 3.96.46 5.89.05.3.37.31.55.14.74 1.71 2.87 1.27 6.13 1.27 1.34 0 2.39.04 2.99-.11.02.32.48.53.63.18 3.61-8.26 7.41-16.46 12.05-24.2.03-.05.04-.1.05-.15.3.73.64 1.45.94 2.16.97 2.26 1.97 4.52 2.98 6.76 2.26 5.03 4.54 10.07 7.09 14.96.47.9.94 1.79 1.47 2.65.2.32.4.67.66.96-.18.25 0 .68.34.54.91-.38 1.82-.75 2.76-1.07 1.04-.35 2.11-.65 3.17-.95.39-.11.28-.66-.07-.68.62-.4.95-.96.87-1.91-.3-3.34.72-7.47.86-8.52l2.14-11.43c1.75-10.74 3.13-17.51 3.23-20.86.02-.49.08-2.84.13-3.24.17-1.25.48-1-4.96-1.65l.03-.02Zm-46.19 5.67c-.04-.24-.09-.48-.15-.71l.85-.15c-.34.24-.56.53-.7.86Zm1.95 25.12c-.36-6.63-.7-13.26-1.32-19.87 0 .02 0 .04.01.06.29 1.65.44 2.47.56 2.89 1 8.46 1.5 16.14 1.46 22.8-.06.99-.1 2-.11 3.02-.01.29-.03.68-.05 1.12-.01-.26-.03-.53-.04-.78-.19-3.08-.35-6.16-.52-9.23l.01-.01Zm36.4 18.66c-.11-.11-.24-.29-.37-.49.35.21.74.26 1.17.16-.27.11-.53.22-.8.32v.01Zm-.89-33.72c.12-.43.23-.86.35-1.29.71-1.77 1.41-3.55 2.08-5.33-.15.68-.26 1.22-.31 1.55-.5 2.94-2.13 7.59-3.58 13.36-.15-.35-.29-.66-.43-1 .61-2.44 1.25-4.87 1.9-7.3l-.01.01Zm3.56-12.48c.14-.44.28-.89.42-1.34-.13.7-.27 1.41-.42 2.11-.43 1.19-.86 2.38-1.31 3.57.42-1.45.85-2.9 1.31-4.34Zm-5.22 16.05c-.11.44-.23.87-.35 1.31-.12.46-.23.92-.35 1.38-.1-.22-.19-.4-.28-.61.34-.69.66-1.38.97-2.08h.01Zm-11.64 2.62c.06-.1.12-.19.17-.28.05.13.09.26.14.39a.398.398 0 0 0-.31-.11Zm2.3 2.98c-.56-1.3-1.25-2.63-1.65-3.99 0 0 .01-.02.02-.02.06.08 1.52 2.93 1.63 3.08.73 1.13 3.38 7.04 5.67 12.26 1.2 2.73 2.08 5.17 2.83 7.18-.62-1.25-1.23-2.51-1.83-3.78-2.31-4.87-4.53-9.78-6.67-14.73ZM275.92 87.03c-1.06-2.18-1.13-3.45-2.44-2.93-1.52.57-2.94 1.3-4.5 2.1-1.4.72-2.68 1.44-3.92 2.12.01-.25-.24-.5-.51-.34-4.8 2.93-12.41 4.7-17.28 1.31-1.98-1.77-3.32-4.15-3.97-5.78-.29-.95-.49-1.94-.63-2.93-.14-3.34 1.58-6.53 3.9-9.12.8-.79 1.68-1.51 2.66-2.12 3.7-2.3 8.22-3.07 12.51-2.51 2.71.35 5.32 1.24 7.71 2.55.39.22.75-.39.35-.6-.18-.1-.37-.18-.55-.27.56.27 1.03.33 1.51.19l-.48.39c-.15.11-.23.3-.13.48.09.15.33.24.48.13 1.3-.97 2.46-2.09 3.45-3.37.37-.29.64-.6.65-.97v-.02c.08-.33-.03-.7-.21-1.08-.31-.87-.98-2.01-2.19-3.26-2.43-2.52-3.79-3.45-5.68-4.26-1.14-.49-3.12-1.06-4.42-1.23-3.28-.42-10.64-1.21-18.18 4.11-7.74 5.46-11.94 12.3-12.23 20.61-.08 2.06.04 3.98.34 5.71.74 4.18 2.57 8 5.44 11.34 4.26 4.99 9.76 7.52 16.34 7.52 4.85 0 9.69-1.77 14.89-4.62.23-.12.45-.23.68-.35 2.19-1.1 4.37-2.23 6.46-3.5.49-.3 1.03-.61 1.5-.98 1.47-.87 1.11-1.12.49-2.95-.39-1.14-.76-2.7-2.06-5.36l.02-.01Zm-17.38-21.76c3.05-.42 6.31.79 9.36 2.35.51.39.94.68 1.33.87-5.61-2.86-12.72-3.39-18.44-.79 2.05-1.33 4.24-1.95 7.74-2.44l.01.01ZM443.67 72.67c-.4-2.2-1.15-4.33-2.37-6.22-1.49-2.32-3.58-4.19-5.91-5.64-6.17-3.81-13.75-5.11-20.83-6.01-3.23-.41-6.47-.69-9.72-.92l-1.39-.12c-.85-.07-1.52-.1-2.05-.1-1.08-.06-2.17-.12-3.25-.17-.08 0-.14.02-.19.05-.1.05-.18.14-.16.3.27 2.55-.01 5.12-.92 7.52-.15.38.4.56.62.28 1.32.59 2.68 1.05 4.08 1.37 0 2.78-.14 7.58-.33 12.91 0 0 0 .02-.01.03-.61 3.66-.79 7.42-1 11.12-.23 4.01-.43 8.03-.44 12.05 0 .64 0 1.28.03 1.93.02.31 0 .68.15.96.06.11.14.16.24.17-.2.17-.21.54.11.59 3.83.67 7.78.71 11.68.25 2.3-.19 4.87-.65 7.65-1.56 1.85-.54 3.67-1.18 5.43-1.91 7.2-3.02 14.31-8.07 17.35-15.53.76-1.86 1.17-3.8 1.31-5.75.3-1.93.28-3.82-.09-5.58l.01-.02Zm-19.32-15.42c5.74 1.41 11.94 3.68 15.65 8.55.25.32.47.65.69.99-2.3-2.82-5.68-5.69-12.88-8.23-2.16-.76-4.35-1.43-6.64-2.02 1.06.21 2.13.45 3.18.71Zm-25.82-3.04c.13 0 .27.01.4.02-.14.1-.26.23-.37.38 0-.13-.02-.26-.03-.4Zm34.82 22.17c-.75 3.09-3.55 5.66-5.88 7.58-3.35 2.76-7.21 5.03-11.28 6.54-1.33.49-2.71.9-4.12 1.15.06-1.38.08-2.76.07-4.13-.02-3.78-.16-7.56-.41-11.33-.09-1.37-.18-2.74-.37-4.1 0-.06-.03-.11-.06-.15.09-3.25.12-6.16.03-8.12 6.86 1.05 10.56 2.17 14.06 3.62 5.52 2.28 8.59 5.44 7.97 8.96l-.01-.02Zm-22 16.15c-.12 0-.23-.02-.34-.03l.34-.03v.06Zm-.69-.7c0-3.13.26-8.84.47-14.51.06 1.2.11 2.41.15 3.6.15 3.6.25 7.23.09 10.83-.24.03-.48.05-.71.07v.01Zm-12.33-30.94c.37.63 2.01 1.01 3.23 1.25v.15c-1.31-.31-2.59-.73-3.83-1.29.12-.36.23-.72.33-1.09.08.48.18.84.27.98Zm13.7 31.65v-.18c3.41-.56 6.71-2.02 9.69-3.68 2.31-1.28 4.59-2.78 6.63-4.53-4.69 4.53-11.61 8.24-16.33 8.38l.01.01Zm24.07-.75c-2.05 1.93-4.37 3.56-6.83 4.95 2.7-1.78 5.52-4.03 8.42-6.87.82-.82 1.56-1.69 2.23-2.59-1.08 1.65-2.38 3.16-3.81 4.51h-.01ZM187.16 92.14c-.79-2.47-2.1-7.12-3.1-6.87-.19-.01-2.09.77-4.08 1.54-3.06 1.18-5.91 2.13-10.09 2.82-2.74.42-5.87 1.01-10.61 1.06.04-3.34.05-6.01.05-7.99 7.97-.65 12.33-2.11 16.37-3.55 1.11-.39 2.69-1.01 2.63-1.8-.08-.35-.55-1.39-1.17-2.61-.47-1.16-.98-2.31-1.61-3.38-.42-.71-1.04-1.69-1.86-2.06-.11-.08-.22-.13-.29-.12-.02 0-.04 0-.07.01-.19-.04-.39-.05-.6-.01-.17.03-.24.15-.25.28-.04.02-.09.04-.14.05-4.33 1.48-8.85 2.33-13.24 3.61a499.1 499.1 0 0 0-.31-8.19c4.51-.99 8.88-1.38 13.11-1.82 3.68-.38 6.28.12 7.47.34.59.11.9.16 1.16.18h.1c-.1.37.44.66.62.28.02-.04.03-.08.05-.13.15.2.53.22.62-.1.17-.58.19-1.21.21-1.81v-.36c.03-.15.05-.3.07-.45.52-2.47.33-5.09-.64-7.44-.11-.27-.44-.28-.6-.14-.08-.21-.15-.42-.24-.62-.19-.41-.79-.05-.6.35.03.07.05.15.09.22-.98-.42-2.15-.54-3.17-.63-2.17-.19-4.37-.14-6.54 0-5.7.35-11.4 1.3-16.91 2.79-2.08.56-4.13 1.22-6.14 2-4.54 1.05-3.79 1.51-2.17 6.07.18.51.46 1.68.54 1.94.82 2.47 1.08 2.13 3.1 2.13s0 .05 0 .08h.52c-.48 2.66-.51 5.45-.62 8.13-.15 3.48-.22 6.96-.28 10.45 0 .41-.01.82-.02 1.23-.16.29-.33.57-.51.85-.05.38-.09.77-.14 1.18-.42 3.52-.59 6.48-.52 8.8v.34c.02.47.05.76.06.87.16 1.57-.26 3.47 1.35 3.79 1.61.32 3.5.55 4.85.55.11 0 .22-.02.33-.02 1.79.24 3.67.05 5.45-.12 2.85-.28 5.69-.7 8.51-1.19 3.03-.53 6.05-1.14 9.04-1.86 2.4-.58 4.82-1.19 7.13-2.06.51-.19 1.73-.57 2.46-1.14 1.81-.68 2.18-1 1.57-2.67-.23-.62-.48-1.49-.91-2.78l-.03-.02Zm-11.12-38.71c.89.05 1.93.08 2.89.3-.33 0-.68-.02-1.06-.03-8.28-.26-14.88.75-23.97 2.51 2.41-.64 4.85-1.16 7.28-1.59 4.87-.86 9.91-1.45 14.86-1.19Zm-26.53 22.13c.03 1.71.04 3.43 0 5.14-.04 1.27-.11 2.55-.24 3.82 0-.73.02-1.46.04-2.19.05-2.26.12-4.51.22-6.77h-.02Zm6.73 27.85c.2-.1.4-.21.58-.33 1.82-.17 3.82-.24 5.94-.34-.86.11-1.72.24-2.58.33-1.27.14-2.61.31-3.93.34h-.01ZM534.48 85.44c-3.52-8.38-7.07-16.75-10.5-25.17-.63-1.54-1.25-3.09-1.86-4.65-.31-.8-.65-1.6-.87-2.43-.04-.17-.17-.24-.31-.25.1-.2 0-.51-.29-.53-1.59-.08-3.18-.22-4.78-.25-1.96-.03-3.91.13-5.84.42-.31.05-.31.38-.13.56-.03.06-.05.14-.04.22.23 1.54.63 3.06 1.16 4.53.13.35.27.7.41 1.06l-2.68 6.18c-.11.03-.2.09-.25.22-.67 1.9-1.52 3.73-2.34 5.56a536.85 536.85 0 0 1-3.9 8.45c-2.64 5.64-5.34 11.25-7.91 16.93-.44.97-.88 1.94-1.29 2.93-.2.48-.47 1-.55 1.52v.05c-.02.12.02.26.16.34 1.19.73 2.41 1.41 3.66 2.05 1.2.62 2.45 1.25 3.76 1.61.43.12.62-.55.19-.67-1.13-.31-2.2-.83-3.24-1.36 1.09.36 2.1.69 2.75.93 2.82 1.01 2.38 1.1 4.3-3.75 2.1-1.09 4.34-1.96 6.53-2.79 4.35-1.64 8.8-3.03 13.27-4.29.82 2.01 1.77 3.97 2.72 5.92.35.83.62 1.45.79 1.82.22.42.45.8.69 1.15.17.33.33.67.5 1 .42.8.84 1.63 1.4 2.35.23.29.6 0 .55-.31 1.53-.02 3.06-.07 4.58-.27.92-.12 1.82-.32 2.71-.54 1.39-.27 3.85-1.11 3.74-1.42-.67-1.96-1.55-3.87-2.34-5.78-1.57-3.78-3.16-7.56-4.75-11.33v-.01Zm-11.65-26.16c1.54 3.81 3.12 7.6 4.7 11.4 2.94 7.05 5.91 14.09 8.87 21.13l-1.06-2.17c-2.71-5.51-5.2-11.19-7.41-16.87l-6.65-17.15c-.65-1.45-.55-2.19-.93-2.53.09 0 .18.01.28.02a.29.29 0 0 0-.04.26c.52 2.02 1.47 3.98 2.25 5.91h-.01Zm-6.58 13.58c.05-.15.09-.31.14-.46 1.41 3.92 2.88 7.9 4.39 11.87-3.22.52-6.38 1.25-9.46 2.14.55-1.22 1.05-2.46 1.53-3.7 1.24-3.24 2.37-6.53 3.39-9.85h.01Zm-.23-20c.36 0 .73.03 1.09.05-2.15.1-5.18.33-5.87.74-.24.15-.41.3-.53.45-.06-.29-.13-.58-.18-.88 1.82-.26 3.65-.39 5.49-.35v-.01Zm-.09 18.72c-.49 1.67-1.05 3.33-1.6 4.97-1.07 3.19-2.19 6.38-3.57 9.46-.09.21-.19.43-.29.65-.25.07-.5.14-.74.22 2.53-6.16 4.61-11.29 6.2-15.3Zm-6.34 25.16c4.97-2.38 9.37-4.1 14.02-5.27l.26.64c-4.8 1.35-9.63 2.8-14.28 4.63Zm20.17 6.76c.33.23.68.42 1.04.56h-.33c-.12 0-.21.06-.26.13-.15-.23-.31-.45-.45-.7v.01ZM226.57 91.75c-3.55-4.74-6.68-9.11-9.31-12.99 9.2-15.25 10.05-17.81 10.35-18.38.17-.34 1.09-2.27.64-2.53-1.13-.65-1.03-.65-2.97-1.71-1.19-.65-3.04-1.61-4.53-2.12-1.71-.59-1.24-.36-3 2.77-.06.1-.11.2-.17.3-.75 1.02-1.48 2.05-2.2 3.09-1.88 2.71-3.73 5.45-5.69 8.1-3.68-4.91-6.88-8.76-9.51-11.43-.15-.15-.3-.29-.46-.42-1.27-1.28-7.24 3.53-7.93 5.58-.09.09-.19.16-.28.25-.27.26.03.64.33.58.19.65.5 1.29.94 1.91 3.85 5.06 7.19 9.76 9.94 14-1.23 2.61-3.06 5-4.67 7.38l-2.28 3.33c-.5.66-.93 1.23-1.29 1.69-.67.93-2.09 2.61-2.3 3.87-.51.85-1.16 1.84-1.29 2.83-.06.44.61.63.67.19.01-.08.04-.15.06-.22 1.36 1.08 2.76 2.11 4.19 3.11 1.3.91 2.62 1.85 4.04 2.56.21.1.4 0 .48-.17.24.07.48.14.72.2.44.1.62-.57.19-.67-2.02-.48-3.77-1.57-5.23-3.02-.47-.46-.9-.96-1.32-1.46 1.74 1.35 4.2 2.89 5.89 4.14 1.39 1.03 2.85-2.27 4.22-4.2 1.86-2.64 3.96-5.86 5.52-8.29l10.39 14.51c.67.81 1.14 1.21 1.57 1.36-.05.24.12.51.41.4 1.53-.58 3.05-1.19 4.54-1.87 1.52-.69 3.06-1.45 4.36-2.5a.28.28 0 0 0 .12-.23c1.66-1.1.81-1.74-1.41-4.91-1.13-1.58-1.71-2.36-3.7-5.01l-.03-.02Zm2.41 6.54c.56 1.15 1.19 2.52 1.11 3.81-.06.04-.12.07-.17.1-.03-.88-.55-2.66-.94-3.91Zm-16.51-32.73c1.86-2.65 3.65-5.35 5.57-7.95.4-.55.81-1.13 1.26-1.66.19-.18.38-.33.56-.45.18.03.36.08.55.13l-8.05 10.11.12-.18h-.01ZM192.7 95.48c.79-1.37 1.66-2.69 2.54-4 1.19-1.79 2.4-3.56 3.61-5.33-.04.09-.09.17-.13.26-.1.22.03.41.2.49-2.47 3.42-4.89 6.73-6.4 9.28.21.24.4.48.63.75-.24.07-.4.36-.17.56.4.33.72.77 1.05 1.17.09.11.18.21.27.32-.84-.61-1.66-1.24-2.47-1.88.24-.57.58-1.11.87-1.61v-.01Zm7.46-10.32c.47-.81.98-1.59 1.49-2.37.31-.48.64-.95.96-1.43.26-.29.52-.56.75-.79-.99 1.48-2.09 3.03-3.2 4.59Zm10.03-16.22s-.03-.05-.05-.07c.22-.29.43-.59.64-.89-.2.32-.4.65-.58.96h-.01ZM371.54 87.96c-.01-.08-.01-.16-.03-.23-.06-.38-.58-.29-.66.03-.3-.05-.6-.08-.81-.11-1.14-.15-2.29-.19-3.44-.2 1.04-.09 2.09-.18 3.14-.23.45-.02.45-.72 0-.7-6.57.35-13.14 1.23-19.65 2.11-1.53.21-3.05.42-4.57.68-.01 0-.02.01-.04.01-.04-3.33-.13-6.66-.24-9.99-.19-5.7-.4-11.41-.88-17.1-.13-1.51-.23-3.07-.49-4.58 0-.25 0-.48-.02-.68-.06-1.19-.04-2.61-.68-2.78-.16-.07-.72-.16-1.5-.24.22-.17.16-.62-.2-.63-1.19-.04-2.39.09-3.57.23-1.2.14-2.41.32-3.59.6-.16-.1-.41-.06-.5.12-.06.02-.13.03-.19.05-.35.1-.29.55-.03.66-.26.6-.19 2.27-.21 3-.02.66-.66 33.73-.9 40.3-.03.65.06 1.12.04 1.45-.16 3.05.87 4.96 6.34 3.93 1.09-.08 2.75-.77 5.36-1.43 4.13-1.04 5.78-1.52 6.2-1.65 6.43-1.69 6.78-1.97 11.72-2.43.55-.05 4.8-.38 6.03-.3.64.04 1.19.07 1.65.1.09 0 .16-.03.24-.05.1.27.56.33.66-.02.39-1.32.61-2.71.78-4.08.2-1.61.29-3.24.15-4.86.24.03.52-.23.38-.53-.09-.2-.27-.33-.49-.43v-.02Zm-.63.56c.07.57.11 1.14.11 1.71-.21-.99-.53-1.71-.95-1.87.22.03.44.06.65.11.06.01.12.04.19.05Zm-25.41 1.73c1.54-.36 3.1-.64 4.66-.89-1.61.37-3.18.77-4.66 1.2v-.31Zm-.86-7.37c-.07-1.37-.16-2.75-.25-4.12-.21-3.13-.45-6.27-.79-9.4.02-2.25.08-4.31.13-6.11.16 2.08.29 4.16.4 6.24.23 4.46.38 8.93.5 13.39h.01Zm-.94-4c.16 2.41.29 4.83.39 7.24.06 1.6.14 3.22.09 4.83-.15.05-.32.09-.47.14V78.88h-.01ZM483.72 92.83c-3.05-2.28-6.22-4.4-9.38-6.51 8.86-6.49 13.49-12.95 13.73-19.23.04-.76 0-1.5-.13-2.2-.67-3.82-3.5-6.68-8.39-8.48.13.04.27.08.4.13 3.92 1.39 7.74 4.23 8.5 8.56.34 1.95-.05 3.96-.98 5.69-.21.4.39.75.6.35 1.86-3.46 1.46-7.55-.97-10.63-3.53-4.47-9.76-5.88-15.16-6.16-2.32-.12-4.64-.04-6.95.19-6 .32-12.71 1.68-17.63 3.21-.37.11-.67.23-.92.35-.2-.17-.62.02-.57.37v.03c-.64.68-.18 1.64.48 3.21.38.91.67 1.89 1.15 2.58.32.76.68 1.51 1.13 2.19.14.21.38.19.53.07.19-.02.38-.05.57-.08v1.57c-.06.06-.1.13-.11.23-.27 4.18-.34 8.38-.48 12.57l-.3 9.03c-.24 3.91-.44 6.77-.46 7.26-.05.88-.11 1.95.07 2.81-.01.22-.02.43-.04.65 0 .11-.02.23-.03.35 0 .05-.03.27-.01.16-.05.4.5.59.64.28.05.04.12.08.2.08 1.75.13 3.5.28 5.25.3 1.69.02 3.38-.12 5.06-.32.08.23.36.39.55.15.06-.08.11-.17.16-.26.18-.09.24-.32.18-.48.05-.2.1-.4.13-.6.16-.86.25-1.74.33-2.62.11-1.17.17-2.34.23-3.51.15-.01.32-.03.52-.04.36-.03 1.73-.15 2.06-.15.39 0 .7-.02.95-.04 1.76 1.11 3.45 2.35 5.14 3.55 2.83 2.01 5.64 4.04 8.47 6.04 1.42 1 2.85 2 4.29 2.97.1.06.19.07.27.04.08 0 .17-.02.25-.1 1.61-1.56 3.15-3.18 4.6-4.88.75-.88 1.49-1.78 2.15-2.73.01.01.03.02.04.03.34.3.83-.2.49-.49-2.16-1.9-4.34-3.76-6.64-5.48l.03-.01Zm-6.38-3.65a55.72 55.72 0 0 0-4-2.13c.14-.1.26-.19.4-.29 1.2.81 2.4 1.61 3.6 2.42Zm-20.1 11.78c.67-.37 1.23-.91 1.67-1.6-.11.5-.24 1-.38 1.49-.43.04-.86.08-1.29.11Zm2.38-37.24c1.34-.31 2.56-.52 3.71-.69-1.03.19-2.04.41-3.04.65-.14-.07-.34-.02-.45.11-.07.02-.15.04-.22.05v-.13.01Zm.04.84c.07-.02.14-.03.2-.05.34 1.66.41 3.41.5 5.09.17 2.9.24 5.81.28 8.71l.03 3.17c-.17.07-.34.14-.51.2-.06-4.96-.21-10.58-.51-17.12h.01Zm16.04 5.62c-1.16 2.25-3.06 4.1-5.02 5.66-2.8 2.23-5.99 3.97-9.3 5.35-.01-3.56-.09-7.12-.27-10.67-.1-2.04-.16-4.16-.57-6.18 3.3-.78 6.72-1.36 10.1-1.1 1.85.14 4.23.59 5.32 2.29.92 1.43.46 3.24-.26 4.65Zm.85-.18c.6-1.37.9-2.92.28-4.32-.67-1.52-2.2-2.32-3.76-2.74.46.1.89.21 1.29.37 1.74.67 2.69 1.88 2.93 3.21.2 1.13-.05 2.25-.74 3.47V70Zm-27.47-4.14c-.12-.19-.23-.38-.34-.57.74.42.85.36.99.41v.08c-.22.03-.43.06-.65.08Zm11.21 30.46c-.08 1.08-.16 2.17-.33 3.24-.05.35-.11.69-.2 1.03 0 .04-.02.07-.03.11-.15.02-.3.04-.45.05.45-1.64.76-3.36.79-5.07.03-.29.08-.57.1-.89-.03-.31-.03-.47.24-.57-.04.69-.07 1.39-.12 2.08v.02Zm5.6-2.47c.48.11.92.52 2.49 1.72-.46-.32-.92-.65-1.38-.97-.37-.25-.73-.5-1.1-.75h-.01Zm21.23 7.24a70.76 70.76 0 0 1-4.37 4.63c-.14-.09-.27-.19-.4-.28.19-.09.37-.24.55-.47.87-1.14 5.43-5.51 5.49-7.45.31.26.62.53.92.79-.67.97-1.42 1.88-2.19 2.77v.01Z",fill:"currentColor",transform:"translate(-144.023 -51.76)"})]})},De=function(ht){var Xt=ht.style,zt=ht.size,Vt=zt===void 0?"small":zt,Tn=ht.withText;return(0,m.jsxs)("div",{className:"ExcalidrawLogo is-".concat(Vt),style:Xt,children:[(0,m.jsx)(Ce,{}),Tn&&(0,m.jsx)(Oe,{})]})},Ae=["onSelect","children","icon","shortcut","className"],ie=["children","href","icon","shortcut","className"];function Ie(ht,Xt){var zt=Object.keys(ht);if(Object.getOwnPropertySymbols){var Vt=Object.getOwnPropertySymbols(ht);Xt&&(Vt=Vt.filter(function(Tn){return Object.getOwnPropertyDescriptor(ht,Tn).enumerable})),zt.push.apply(zt,Vt)}return zt}function oe(ht){for(var Xt=1;Xt<arguments.length;Xt++){var zt=arguments[Xt]!=null?arguments[Xt]:{};Xt%2?Ie(Object(zt),!0).forEach(function(Vt){(0,ae.Z)(ht,Vt,zt[Vt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ht,Object.getOwnPropertyDescriptors(zt)):Ie(Object(zt)).forEach(function(Vt){Object.defineProperty(ht,Vt,Object.getOwnPropertyDescriptor(zt,Vt))})}return ht}var s=function(ht){var Xt=ht.icon,zt=ht.shortcut,Vt=ht.children,Tn=(0,he.Fy)();return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{className:"welcome-screen-menu-item__icon",children:Xt}),(0,m.jsx)("div",{className:"welcome-screen-menu-item__text",children:Vt}),zt&&!Tn.editor.isMobile&&(0,m.jsx)("div",{className:"welcome-screen-menu-item__shortcut",children:zt})]})};s.displayName="WelcomeScreenMenuItemContent";var u=function(ht){var Xt=ht.onSelect,zt=ht.children,Vt=ht.icon,Tn=ht.shortcut,Dn=ht.className,Nn=Dn===void 0?"":Dn,Xn=(0,H.Z)(ht,Ae);return(0,m.jsx)("button",oe(oe({},Xn),{},{type:"button",className:"welcome-screen-menu-item ".concat(Nn),onClick:Xt,children:(0,m.jsx)(s,{icon:Vt,shortcut:Tn,children:zt})}))};u.displayName="WelcomeScreenMenuItem";var x=function(ht){var Xt=ht.children,zt=ht.href,Vt=ht.icon,Tn=ht.shortcut,Dn=ht.className,Nn=Dn===void 0?"":Dn,Xn=(0,H.Z)(ht,ie);return(0,m.jsx)("a",oe(oe({},Xn),{},{className:"welcome-screen-menu-item ".concat(Nn),href:zt,target:"_blank",rel:"noreferrer",children:(0,m.jsx)(s,{icon:Vt,shortcut:Tn,children:Xt})}))};x.displayName="WelcomeScreenMenuItemLink";var V=function(ht){var Xt=ht.children,zt=(0,C.R6)().WelcomeScreenCenterTunnel;return(0,m.jsx)(zt.In,{children:(0,m.jsx)("div",{className:"welcome-screen-center",children:Xt||(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(W,{}),(0,m.jsx)(re,{children:(0,U.t)("welcomeScreen.defaults.center_heading")}),(0,m.jsxs)(ee,{children:[(0,m.jsx)(Ee,{}),(0,m.jsx)(se,{})]})]})})})};V.displayName="Center";var W=function(ht){var Xt=ht.children;return(0,m.jsx)("div",{className:"welcome-screen-center__logo virgil welcome-screen-decor",children:Xt||(0,m.jsx)(De,{withText:!0})})};W.displayName="Logo";var re=function(ht){var Xt=ht.children;return(0,m.jsx)("div",{className:"welcome-screen-center__heading welcome-screen-decor virgil",children:Xt})};re.displayName="Heading";var ee=function(ht){var Xt=ht.children;return(0,m.jsx)("div",{className:"welcome-screen-menu",children:Xt})};ee.displayName="Menu";var se=function(){var ht=(0,he.eh)();return(0,m.jsx)(u,{onSelect:function(){return ht.executeAction(le.jY)},shortcut:"?",icon:Le.by,children:(0,U.t)("helpDialog.title")})};se.displayName="MenuItemHelp";var Ee=function(){var ht=(0,q.I)(),Xt=(0,he.eh)();return ht.viewModeEnabled?null:(0,m.jsx)(u,{onSelect:function(){return Xt.executeAction(le._d)},shortcut:(0,ke.C)("loadScene"),icon:Le.Tl,children:(0,U.t)("buttons.load")})};Ee.displayName="MenuItemLoadScene";var _e=function(ht){var Xt=ht.onSelect,zt=(0,U.QT)().t;return(0,m.jsx)(u,{shortcut:null,onSelect:Xt,icon:Le.jn,children:zt("labels.liveCollaboration")})};_e.displayName="MenuItemLiveCollaborationTrigger",V.Logo=W,V.Heading=re,V.Menu=ee,V.MenuItem=u,V.MenuItemLink=x,V.MenuItemHelp=se,V.MenuItemLoadScene=Ee,V.MenuItemLiveCollaborationTrigger=_e;var Ue=function(ht){var Xt=ht.children,zt=(0,C.R6)().WelcomeScreenMenuHintTunnel;return(0,m.jsx)(zt.In,{children:(0,m.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--menu",children:[Le.oQ,(0,m.jsx)("div",{className:"welcome-screen-decor-hint__label",children:Xt||(0,U.t)("welcomeScreen.defaults.menuHint")})]})})};Ue.displayName="MenuHint";var We=function(ht){var Xt=ht.children,zt=(0,C.R6)().WelcomeScreenToolbarHintTunnel;return(0,m.jsx)(zt.In,{children:(0,m.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--toolbar",children:[(0,m.jsx)("div",{className:"welcome-screen-decor-hint__label",children:Xt||(0,U.t)("welcomeScreen.defaults.toolbarHint")}),Le.DJ]})})};We.displayName="ToolbarHint";var Ye=function(ht){var Xt=ht.children,zt=(0,C.R6)().WelcomeScreenHelpHintTunnel;return(0,m.jsx)(zt.In,{children:(0,m.jsxs)("div",{className:"virgil welcome-screen-decor welcome-screen-decor-hint welcome-screen-decor-hint--help",children:[(0,m.jsx)("div",{children:Xt||(0,U.t)("welcomeScreen.defaults.helpHint")}),Le._U]})})};Ye.displayName="HelpHint";var Ze=t(1569),Je={};Je.styleTagTransform=y(),Je.setAttributes=A(),Je.insert=S().bind(null,"head"),Je.domAPI=D(),Je.insertStyleElement=L(),xe()(Ze.Z,Je),Ze.Z&&Ze.Z.locals&&Ze.Z.locals;var nt=function(ht){return(0,m.jsx)(m.Fragment,{children:ht.children||(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(V,{}),(0,m.jsx)(Ue,{}),(0,m.jsx)(We,{}),(0,m.jsx)(Ye,{})]})})};nt.displayName="WelcomeScreen",nt.Center=V,nt.Hints={MenuHint:Ue,ToolbarHint:We,HelpHint:Ye};var dt=nt,ge=t(8806),Se=t(3397),Be={};Be.styleTagTransform=y(),Be.setAttributes=A(),Be.insert=S().bind(null,"head"),Be.domAPI=D(),Be.insertStyleElement=L(),xe()(Se.Z,Be),Se.Z&&Se.Z.locals&&Se.Z.locals;var Xe=["isCollaborating","onSelect"];function lt(ht,Xt){var zt=Object.keys(ht);if(Object.getOwnPropertySymbols){var Vt=Object.getOwnPropertySymbols(ht);Xt&&(Vt=Vt.filter(function(Tn){return Object.getOwnPropertyDescriptor(ht,Tn).enumerable})),zt.push.apply(zt,Vt)}return zt}function it(ht){for(var Xt=1;Xt<arguments.length;Xt++){var zt=arguments[Xt]!=null?arguments[Xt]:{};Xt%2?lt(Object(zt),!0).forEach(function(Vt){(0,ae.Z)(ht,Vt,zt[Vt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ht,Object.getOwnPropertyDescriptors(zt)):lt(Object(zt)).forEach(function(Vt){Object.defineProperty(ht,Vt,Object.getOwnPropertyDescriptor(zt,Vt))})}return ht}var yt=function(ht){var Xt=ht.isCollaborating,zt=ht.onSelect,Vt=(0,H.Z)(ht,Xe),Tn=(0,q.I)();return(0,m.jsxs)(ge.z,it(it({},Vt),{},{className:(0,I.Z)("collab-button",{active:Xt}),type:"button",onSelect:zt,style:{position:"relative"},title:(0,U.t)("labels.liveCollaboration"),children:[Le.jn,Tn.collaborators.size>0&&(0,m.jsx)("div",{className:"CollabButton-collaborators",children:Tn.collaborators.size})]}))},_t=yt;yt.displayName="LiveCollaborationTrigger";var ut=t(7651),Tt=t(7994),Yt=t(507),Zt=t(4183),Pt=t(583),en=t(9326),tn=t(5902),ot=t(1925),It=t(8020),mt=t(6199),jt=t(4949),xt=t(6013),Nt=["initialData","UIOptions"],Ut=["initialData","UIOptions"];function rn(ht,Xt){var zt=Object.keys(ht);if(Object.getOwnPropertySymbols){var Vt=Object.getOwnPropertySymbols(ht);Xt&&(Vt=Vt.filter(function(Tn){return Object.getOwnPropertyDescriptor(ht,Tn).enumerable})),zt.push.apply(zt,Vt)}return zt}function Ft(ht){for(var Xt=1;Xt<arguments.length;Xt++){var zt=arguments[Xt]!=null?arguments[Xt]:{};Xt%2?rn(Object(zt),!0).forEach(function(Vt){l()(ht,Vt,zt[Vt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ht,Object.getOwnPropertyDescriptors(zt)):rn(Object(zt)).forEach(function(Vt){Object.defineProperty(ht,Vt,Object.getOwnPropertyDescriptor(zt,Vt))})}return ht}var Sn=function(ht){var Xt,zt,Vt,Tn,Dn,Nn,Xn=ht.onChange,jn=ht.initialData,wt=ht.excalidrawAPI,Et=ht.isCollaborating,Ct=Et!==void 0&&Et,Lt=ht.onPointerUpdate,hn=ht.renderTopRightUI,yn=ht.langCode,fn=yn===void 0?U.Fp.code:yn,Bn=ht.viewModeEnabled,En=ht.zenModeEnabled,Cn=ht.gridModeEnabled,qn=ht.libraryReturnUrl,vn=ht.theme,wn=ht.name,In=ht.renderCustomStats,kn=ht.onPaste,nr=ht.detectScroll,Pn=nr===void 0||nr,Jn=ht.handleKeyboardGlobally,xr=Jn!==void 0&&Jn,Nr=ht.onLibraryChange,$r=ht.autoFocus,ao=$r!==void 0&&$r,lo=ht.generateIdForFile,Dr=ht.onLinkOpen,Ar=ht.onPointerDown,wo=ht.onScrollChange,de=ht.children,Pe=ht.validateEmbeddable,ze=ht.renderEmbeddable,Ke=(Xt=ht.UIOptions)===null||Xt===void 0?void 0:Xt.canvasActions,St=Ft(Ft({},ht.UIOptions),{},{canvasActions:Ft(Ft({},w.cW.canvasActions),Ke),tools:{image:(zt=(Vt=ht.UIOptions)===null||Vt===void 0||(Tn=Vt.tools)===null||Tn===void 0?void 0:Tn.image)===null||zt===void 0||zt}});return Ke!=null&&Ke.export&&(St.canvasActions.export.saveFileToDisk=(Dn=(Nn=Ke.export)===null||Nn===void 0?void 0:Nn.saveFileToDisk)!==null&&Dn!==void 0?Dn:w.cW.canvasActions.export.saveFileToDisk),St.canvasActions.toggleTheme===null&&vn===void 0&&(St.canvasActions.toggleTheme=!0),(0,v.useEffect)(function(){var nn=function($t){typeof $t.scale=="number"&&$t.scale!==1&&$t.preventDefault()};return document.addEventListener("touchmove",nn,{passive:!1}),function(){document.removeEventListener("touchmove",nn)}},[]),(0,m.jsx)(O.zt,{unstable_createStore:function(){return $.e_},scope:$.yE,children:(0,m.jsx)(G,{langCode:fn,theme:vn,children:(0,m.jsx)(he.ZP,{onChange:Xn,initialData:jn,excalidrawAPI:wt,isCollaborating:Ct,onPointerUpdate:Lt,renderTopRightUI:hn,langCode:fn,viewModeEnabled:Bn,zenModeEnabled:En,gridModeEnabled:Cn,libraryReturnUrl:qn,theme:vn,name:wn,renderCustomStats:In,UIOptions:St,onPaste:kn,detectScroll:Pn,handleKeyboardGlobally:xr,onLibraryChange:Nr,autoFocus:ao,generateIdForFile:lo,onLinkOpen:Dr,onPointerDown:Ar,onScrollChange:wo,validateEmbeddable:Pe,renderEmbeddable:ze,children:de})})})},mn=function(ht,Xt){if(ht.children!==Xt.children)return!1;ht.initialData;var zt=ht.UIOptions,Vt=zt===void 0?{}:zt,Tn=j()(ht,Nt),Dn=(Xt.initialData,Xt.UIOptions),Nn=Dn===void 0?{}:Dn,Xn=j()(Xt,Ut),jn=Object.keys(Vt),wt=Object.keys(Nn);return jn.length===wt.length&&jn.every(function(Et){return Et==="canvasActions"?Object.keys(Vt.canvasActions).every(function(Ct){var Lt,hn,yn,fn;return Ct==="export"&&Vt!=null&&(Lt=Vt.canvasActions)!==null&&Lt!==void 0&&Lt.export&&Nn!=null&&(hn=Nn.canvasActions)!==null&&hn!==void 0&&hn.export?Vt.canvasActions.export.saveFileToDisk===Nn.canvasActions.export.saveFileToDisk:(Vt==null||(yn=Vt.canvasActions)===null||yn===void 0?void 0:yn[Ct])===(Nn==null||(fn=Nn.canvasActions)===null||fn===void 0?void 0:fn[Ct])}):Vt[Et]===Nn[Et]})&&(0,be.w8)(Tn,Xn)},Yn=k().memo(Sn,mn);Yn.displayName="Excalidraw"},507:function(fe,Q,t){t.d(Q,{y8:function(){return xe},Fl:function(){return E},NL:function(){return A},i1:function(){return h},$D:function(){return L},N7:function(){return D.N7},cT:function(){return ce.cT},lV:function(){return ce.lV},ZY:function(){return ce.ZY},zh:function(){return ne.zh},I_:function(){return R.I_},NI:function(){return R.NI}});var T=t(8950),j=t(7169),f=t(2975),l=t.n(f),v=t(3668),k=t(6853),g=t(7994),a=t(9937),P=t(250),R=t(4419),K=t(4694);function U(y){return[Math.min(y[0][0],y[1][0]),Math.min(y[0][1],y[1][1]),Math.max(y[0][0],y[1][0]),Math.max(y[0][1],y[1][1])]}function m(y,r){return y[0]*r[1]-r[0]*y[1]}function G(y,r){return[y[0]-r[0],y[1]-r[1]]}function he(y,r){var M=m(G(y[1],y[0]),G(r,y[0]));return Math.abs(M)<1e-6}function be(y,r){return m(G(y[1],y[0]),G(r,y[0]))<0}function we(y,r){return he(y,r[0])||he(y,r[1])||(be(y,r[0])?!be(y,r[1]):be(y,r[1]))}function xe(y,r){return function(M,p){return M[0]<=p[2]&&M[2]>=p[0]&&M[1]<=p[3]&&M[3]>=p[1]}(U(y),U(r))&&we(y,r)&&we(r,y)}t(6013);var ce=t(5796),D=t(9660),ne=t(9326);function S(y,r){var M=Object.keys(y);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(y);r&&(p=p.filter(function(c){return Object.getOwnPropertyDescriptor(y,c).enumerable})),M.push.apply(M,p)}return M}function z(y){for(var r=1;r<arguments.length;r++){var M=arguments[r]!=null?arguments[r]:{};r%2?S(Object(M),!0).forEach(function(p){(0,j.Z)(y,p,M[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(M)):S(Object(M)).forEach(function(p){Object.defineProperty(y,p,Object.getOwnPropertyDescriptor(M,p))})}return y}var A=function(y){var r=y.elements,M=y.appState,p=y.files,c=y.maxWidthOrHeight,w=y.getDimensions,O=y.exportPadding,$=y.exportingFrame,I=(0,g.nu)({elements:r,appState:M},null,null),C=I.elements,_=I.appState,N=_.exportBackground,q=_.viewBackgroundColor;return(0,v.NL)(C,z(z({},_),{},{offsetTop:0,offsetLeft:0,width:0,height:0}),p||{},{exportBackground:N,exportPadding:O,viewBackgroundColor:q,exportingFrame:$},function(pe,te){var ve,ae=document.createElement("canvas");if(c){var H;typeof w=="function"&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");var le=Math.max(pe,te),ke=c<le?c/le:(H=M==null?void 0:M.exportScale)!==null&&H!==void 0?H:1;return ae.width=pe*ke,ae.height=te*ke,{canvas:ae,scale:ke}}var Le=(w==null?void 0:w(pe,te))||{width:pe,height:te};return ae.width=Le.width,ae.height=Le.height,{canvas:ae,scale:(ve=Le.scale)!==null&&ve!==void 0?ve:1}})},E=function(){var y=(0,T.Z)(l().mark(function r(M){var p,c,w,O,$,I;return l().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return w=(c=M).mimeType,O=w===void 0?a.LO.png:w,$=c.quality,O===a.LO.png&&typeof $=="number"&&console.warn('"quality" will be ignored for "'.concat(a.LO.png,'" mimeType')),O==="image/jpg"&&(O=a.LO.jpg),O!==a.LO.jpg||(p=M.appState)!==null&&p!==void 0&&p.exportBackground||(console.warn('Defaulting "exportBackground" to "true" for "'.concat(a.LO.jpg,'" mimeType')),M=z(z({},M),{},{appState:z(z({},M.appState),{},{exportBackground:!0})})),C.next=6,A(M);case 6:return I=C.sent,$=$||(/image\/jpe?g/.test(O)?.92:.8),C.abrupt("return",new Promise(function(_,N){I.toBlob(function(){var q=(0,T.Z)(l().mark(function pe(te){var ve;return l().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(te){ae.next=2;break}return ae.abrupt("return",N(new Error("couldn't export to blob")));case 2:if(!te||O!==a.LO.png||(ve=M.appState)===null||ve===void 0||!ve.exportEmbedScene){ae.next=6;break}return ae.next=5,(0,P.encodePngMetadata)({blob:te,metadata:(0,R.I_)(M.elements,M.appState,M.files||{},"local")});case 5:te=ae.sent;case 6:_(te);case 7:case"end":return ae.stop()}},pe)}));return function(pe){return q.apply(this,arguments)}}(),O,$)}));case 9:case"end":return C.stop()}},r)}));return function(r){return y.apply(this,arguments)}}(),L=function(){var y=(0,T.Z)(l().mark(function r(M){var p,c,w,O,$,I,C,_,N,q,pe,te;return l().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return p=M.elements,c=M.appState,w=c===void 0?(0,k.im)():c,O=M.files,$=O===void 0?{}:O,I=M.exportPadding,C=M.renderEmbeddables,_=M.exportingFrame,N=(0,g.nu)({elements:p,appState:w},null,null),q=N.elements,pe=N.appState,te=z(z({},pe),{},{exportPadding:I}),ve.abrupt("return",(0,v.$D)(q,te,$,{exportingFrame:_,renderEmbeddables:C}));case 4:case"end":return ve.stop()}},r)}));return function(r){return y.apply(this,arguments)}}(),h=function(){var y=(0,T.Z)(l().mark(function r(M){var p;return l().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(M.type!=="svg"){c.next=8;break}return c.next=3,L(M);case 3:return p=c.sent,c.next=6,(0,K.dd)(p.outerHTML);case 6:case 11:case 16:c.next=19;break;case 8:if(M.type!=="png"){c.next=13;break}return c.next=11,(0,K.uR)(E(M));case 13:if(M.type!=="json"){c.next=18;break}return c.next=16,(0,K.vQ)(M.elements,M.files);case 18:throw new Error("Invalid export type");case 19:case"end":return c.stop()}},r)}));return function(r){return y.apply(this,arguments)}}()},6013:function(fe,Q,t){t.d(Q,{Ne:function(){return P},Xs:function(){return K},sQ:function(){return R}});var T=t(2577),j=t(4183),f=t(2361),l=t(4949);function v(U,m){var G=typeof Symbol<"u"&&U[Symbol.iterator]||U["@@iterator"];if(!G){if(Array.isArray(U)||(G=function(D,ne){if(D){if(typeof D=="string")return k(D,ne);var S=Object.prototype.toString.call(D).slice(8,-1);if(S==="Object"&&D.constructor&&(S=D.constructor.name),S==="Map"||S==="Set")return Array.from(D);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return k(D,ne)}}(U))||m){G&&(U=G);var he=0,be=function(){};return{s:be,n:function(){return he>=U.length?{done:!0}:{done:!1,value:U[he++]}},e:function(D){throw D},f:be}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
140
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var we,xe=!0,ce=!1;return{s:function(){G=G.call(U)},n:function(){var D=G.next();return xe=D.done,D},e:function(D){ce=!0,we=D},f:function(){try{xe||G.return==null||G.return()}finally{if(ce)throw we}}}}function k(U,m){(m==null||m>U.length)&&(m=U.length);for(var G=0,he=new Array(m);G<m;G++)he[G]=U[G];return he}var g=function(U){var m=U.reduce(function(G,he){var be=(0,T.Z)(he,2),we=be[0],xe=be[1];return G.minY=Math.min(G.minY,xe),G.minX=Math.min(G.minX,we),G.maxX=Math.max(G.maxX,we),G.maxY=Math.max(G.maxY,xe),G},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,cx:0,cy:0});return m.cx=(m.maxX+m.minX)/2,m.cy=(m.maxY+m.minY)/2,m},a=function(U){var m=function(S){return(0,j.bt)(S)||(0,j.F9)(S)?S.points:function(z){return z.type==="diamond"?[[z.width/2,0],[z.width,z.height/2],[z.width/2,z.height],[0,z.height/2]]:[[0,0],[0+z.width,0],[0+z.width,z.height],[0,z.height]]}(S)}(U),G=g(m),he=[G.cx,G.cy],be=m.map(function(S){return(0,f.xj)([S[0],S[1]],he,U.angle)}),we=g(be),xe=we.minX,ce=we.minY,D=we.maxX,ne=we.maxY;return[xe+U.x,ce+U.y,D+U.x,ne+U.y]},P=function(U,m){var G=arguments.length>2&&arguments[2]!==void 0&&arguments[2],he=a(U),be=m[0]<=he[0]&&m[2]>=he[2]&&m[1]<=he[1]&&m[3]>=he[3];return G?!!be||he[0]<=m[0]&&he[2]>=m[2]&&he[1]<=m[1]&&he[3]>=m[3]:be},R=function(U,m){var G=a(U);return((0,f.Xt)(G[0],m[0],m[2])||(0,f.Xt)(m[0],G[0],G[2]))&&((0,f.Xt)(G[1],m[1],m[3])||(0,f.Xt)(m[1],G[1],G[3]))},K=function(U){var m=U.elements,G=U.bounds,he=U.type,be=U.errorMargin,we=be===void 0?0:be;(0,j.r2)(G)&&(G=(0,l.Pi)(G));var xe,ce=[G[0]-we,G[1]-we,G[2]+we,G[3]+we],D=new Set,ne=v(m);try{for(ne.s();!(xe=ne.n()).done;){var S=xe.value;if(!D.has(S.id)&&(he==="overlap"?R(S,ce):he==="inside"?P(S,ce):P(S,ce,!0))){if(D.add(S.id),S.boundElements){var z,A=v(S.boundElements);try{for(A.s();!(z=A.n()).done;){var E=z.value;D.add(E.id)}}catch(h){A.e(h)}finally{A.f()}}var L;(0,j.iB)(S)&&S.containerId&&D.add(S.containerId),(0,j.Yv)(S)&&(S.startBinding&&D.add(S.startBinding.elementId),S.endBinding&&D.add((L=S.endBinding)===null||L===void 0?void 0:L.elementId))}}}catch(h){ne.e(h)}finally{ne.f()}return m.filter(function(h){return D.has(h.id)})}},5999:function(fe,Q,t){t.d(Q,{k:function(){return j},z:function(){return f}});var T=t(1930),j=function(l){var v=l.map(function(g){return g[0]}),k=l.map(function(g){return g[1]});return{width:Math.max.apply(Math,(0,T.Z)(v))-Math.min.apply(Math,(0,T.Z)(v)),height:Math.max.apply(Math,(0,T.Z)(k))-Math.min.apply(Math,(0,T.Z)(k))}},f=function(l,v,k,g){var a=k.map(function(be){return be[l]}),P=Math.max.apply(Math,(0,T.Z)(a)),R=Math.min.apply(Math,(0,T.Z)(a)),K=P-R,U=K===0?1:v/K,m=1/0,G=k.map(function(be){var we=be[l]*U,xe=(0,T.Z)(be);return xe[l]=we,we<m&&(m=we),xe});if(!g||G.length===2)return G;var he=R-m;return G.map(function(be){return be.map(function(we,xe){return xe===l?we+he:we})})}},4643:function(fe,Q,t){t.d(Q,{LU:function(){return k},kb:function(){return g}});var T=t(8152),j=t(5605),f=t(9827),l=new T.k(Date.now()),v=0,k=function(){return Math.floor(l.next()*Math.pow(2,31))},g=function(){return(0,f.h2)()?"id".concat(v++):(0,j.x0)()}},9660:function(fe,Q,t){t.d(Q,{Dn:function(){return pe},Xx:function(){return H},Lc:function(){return Ae},N7:function(){return ie},lw:function(){return Ge},Rg:function(){return Oe},uI:function(){return Le}});var T=t(7169),j=t(2577),f=t(4183),l=t(4949),v=t(9827),k=t(2361),g=t(9845),a=t(6853),P=t(9937);function R(s,u,x,V=W=>W){return s*V(.5-u*(.5-x))}function K(s,u){return[s[0]+u[0],s[1]+u[1]]}function U(s,u){return[s[0]-u[0],s[1]-u[1]]}function m(s,u){return[s[0]*u,s[1]*u]}function G(s){return[s[1],-s[0]]}function he(s,u){return s[0]*u[0]+s[1]*u[1]}function be(s,u){return s[0]===u[0]&&s[1]===u[1]}function we(s,u){return function(x){return x[0]*x[0]+x[1]*x[1]}(U(s,u))}function xe(s){return function(u,x){return[u[0]/x,u[1]/x]}(s,function(u){return Math.hypot(u[0],u[1])}(s))}function ce(s,u){return Math.hypot(s[1]-u[1],s[0]-u[0])}function D(s,u,x){let V=Math.sin(x),W=Math.cos(x),re=s[0]-u[0],ee=s[1]-u[1],se=re*V+ee*W;return[re*W-ee*V+u[0],se+u[1]]}function ne(s,u,x){return K(s,m(U(u,s),x))}function S(s,u,x){return K(s,m(u,x))}var{min:z,PI:A}=Math,E=A+1e-4;function L(s,u={}){return function(x,V={}){let{size:W=16,smoothing:re=.5,thinning:ee=.5,simulatePressure:se=!0,easing:Ee=jt=>jt,start:_e={},end:Ue={},last:We=!1}=V,{cap:Ye=!0,easing:Ze=jt=>jt*(2-jt)}=_e,{cap:Je=!0,easing:nt=jt=>--jt*jt*jt+1}=Ue;if(x.length===0||W<=0)return[];let dt,ge=x[x.length-1].runningLength,Se=_e.taper===!1?0:_e.taper===!0?Math.max(W,ge):_e.taper,Be=Ue.taper===!1?0:Ue.taper===!0?Math.max(W,ge):Ue.taper,Xe=Math.pow(W*re,2),lt=[],it=[],yt=x.slice(0,10).reduce((jt,xt)=>{let Nt=xt.pressure;if(se){let Ut=z(1,xt.distance/W),rn=z(1,1-Ut);Nt=z(1,jt+.275*Ut*(rn-jt))}return(jt+Nt)/2},x[0].pressure),_t=R(W,ee,x[x.length-1].pressure,Ee),ut=x[0].vector,Tt=x[0].point,Yt=Tt,Zt=Tt,Pt=Yt,en=!1;for(let jt=0;jt<x.length;jt++){let{pressure:xt}=x[jt],{point:Nt,vector:Ut,distance:rn,runningLength:Ft}=x[jt];if(jt<x.length-1&&ge-Ft<3)continue;if(ee){if(se){let Vt=z(1,rn/W),Tn=z(1,1-Vt);xt=z(1,yt+.275*Vt*(Tn-yt))}_t=R(W,ee,xt,Ee)}else _t=W/2;dt===void 0&&(dt=_t);let Sn=Ft<Se?Ze(Ft/Se):1,mn=ge-Ft<Be?nt((ge-Ft)/Be):1;_t=Math.max(.01,_t*Math.min(Sn,mn));let Yn=(jt<x.length-1?x[jt+1]:x[jt]).vector,ht=jt<x.length-1?he(Ut,Yn):1,Xt=ht!==null&&ht<0;if(he(Ut,ut)<0&&!en||Xt){let Vt=m(G(ut),_t);for(let Tn=.07692307692307693,Dn=0;Dn<=1;Dn+=Tn)Zt=D(U(Nt,Vt),Nt,E*Dn),lt.push(Zt),Pt=D(K(Nt,Vt),Nt,E*-Dn),it.push(Pt);Tt=Zt,Yt=Pt,Xt&&(en=!0);continue}if(en=!1,jt===x.length-1){let Vt=m(G(Ut),_t);lt.push(U(Nt,Vt)),it.push(K(Nt,Vt));continue}let zt=m(G(ne(Yn,Ut,ht)),_t);Zt=U(Nt,zt),(jt<=1||we(Tt,Zt)>Xe)&&(lt.push(Zt),Tt=Zt),Pt=K(Nt,zt),(jt<=1||we(Yt,Pt)>Xe)&&(it.push(Pt),Yt=Pt),yt=xt,ut=Ut}let tn=x[0].point.slice(0,2),ot=x.length>1?x[x.length-1].point.slice(0,2):K(x[0].point,[1,1]),It=[],mt=[];if(x.length===1){if(!Se&&!Be||We){let jt=S(tn,xe(G(U(tn,ot))),-(dt||_t)),xt=[];for(let Nt=.07692307692307693,Ut=Nt;Ut<=1;Ut+=Nt)xt.push(D(jt,tn,2*E*Ut));return xt}}else{if(!(Se||Be&&x.length===1))if(Ye)for(let xt=.07692307692307693,Nt=xt;Nt<=1;Nt+=xt){let Ut=D(it[0],tn,E*Nt);It.push(Ut)}else{let xt=U(lt[0],it[0]),Nt=m(xt,.5),Ut=m(xt,.51);It.push(U(tn,Nt),U(tn,Ut),K(tn,Ut),K(tn,Nt))}let jt=G(function(xt){return[-xt[0],-xt[1]]}(x[x.length-1].vector));if(Be||Se&&x.length===1)mt.push(ot);else if(Je){let xt=S(ot,jt,_t);for(let Nt=.034482758620689655,Ut=Nt;Ut<1;Ut+=Nt)mt.push(D(xt,ot,3*E*Ut))}else mt.push(K(ot,m(jt,_t)),K(ot,m(jt,.99*_t)),U(ot,m(jt,.99*_t)),U(ot,m(jt,_t)))}return lt.concat(mt,it.reverse(),It)}(function(x,V={}){var W;let{streamline:re=.5,size:ee=16,last:se=!1}=V;if(x.length===0)return[];let Ee=.15+.85*(1-re),_e=Array.isArray(x[0])?x:x.map(({x:nt,y:dt,pressure:ge=.5})=>[nt,dt,ge]);if(_e.length===2){let nt=_e[1];_e=_e.slice(0,-1);for(let dt=1;dt<5;dt++)_e.push(ne(_e[0],nt,dt/4))}_e.length===1&&(_e=[..._e,[...K(_e[0],[1,1]),..._e[0].slice(2)]]);let Ue=[{point:[_e[0][0],_e[0][1]],pressure:_e[0][2]>=0?_e[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],We=!1,Ye=0,Ze=Ue[0],Je=_e.length-1;for(let nt=1;nt<_e.length;nt++){let dt=se&&nt===Je?_e[nt].slice(0,2):ne(Ze.point,_e[nt],Ee);if(be(Ze.point,dt))continue;let ge=ce(dt,Ze.point);if(Ye+=ge,nt<Je&&!We){if(Ye<ee)continue;We=!0}Ze={point:dt,pressure:_e[nt][2]>=0?_e[nt][2]:.5,vector:xe(U(Ze.point,dt)),distance:ge,runningLength:Ye},Ue.push(Ze)}return Ue[0].vector=((W=Ue[1])==null?void 0:W.vector)||[0,0],Ue}(s,u),u)}var h=t(4761),y=t(7422),r=t(761),M=t(4682),p=t(8020),c=t(2921);function w(s,u){var x=Object.keys(s);if(Object.getOwnPropertySymbols){var V=Object.getOwnPropertySymbols(s);u&&(V=V.filter(function(W){return Object.getOwnPropertyDescriptor(s,W).enumerable})),x.push.apply(x,V)}return x}function O(s){for(var u=1;u<arguments.length;u++){var x=arguments[u]!=null?arguments[u]:{};u%2?w(Object(x),!0).forEach(function(V){(0,T.Z)(s,V,x[V])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(x)):w(Object(x)).forEach(function(V){Object.defineProperty(s,V,Object.getOwnPropertyDescriptor(x,V))})}return s}var $="invert(100%) hue-rotate(180deg) saturate(1.25)",I=(0,a.im)(),C=function(s,u){return(0,f.wi)(s)&&!u.imageCache.has(s.fileId)},_=function(s,u,x){var V;return x.theme==="dark"&&(0,f.wi)(s)&&!C(s,u)&&((V=u.imageCache.get(s.fileId))===null||V===void 0?void 0:V.mimeType)!==P.LO.svg},N=function(s){return s.type==="freedraw"?12*s.strokeWidth:20},q=function(s,u,x,V){var W,re,ee=document.createElement("canvas"),se=ee.getContext("2d"),Ee=N(s),_e=function(Xe,lt){var it=16777216,yt=32767,_t=N(Xe),ut=(0,l.qf)(Xe),Tt=(0,j.Z)(ut,4),Yt=Tt[0],Zt=Tt[1],Pt=Tt[2],en=Tt[3],tn=(0,f.bt)(Xe)||(0,f.F9)(Xe)?(0,v.TE)(Yt,Pt):Xe.width,ot=(0,f.bt)(Xe)||(0,f.F9)(Xe)?(0,v.TE)(Zt,en):Xe.height,It=tn*window.devicePixelRatio+2*_t,mt=ot*window.devicePixelRatio+2*_t,jt=lt.value;return(It*jt>yt||mt*jt>yt)&&(jt=Math.min(yt/It,yt/mt)),It*mt*jt*jt>it&&(jt=Math.sqrt(it/(It*mt))),{width:It=Math.floor(It*jt),height:mt=Math.floor(mt*jt),scale:jt}}(s,u),Ue=_e.width,We=_e.height,Ye=_e.scale;ee.width=Ue,ee.height=We;var Ze=0,Je=0;if((0,f.bt)(s)||(0,f.F9)(s)){var nt=(0,l.qf)(s),dt=(0,j.Z)(nt,2),ge=dt[0],Se=dt[1];Ze=s.x>ge?(0,v.TE)(s.x,ge)*window.devicePixelRatio*Ye:0,Je=s.y>Se?(0,v.TE)(s.y,Se)*window.devicePixelRatio*Ye:0,se.translate(Ze,Je)}se.save(),se.translate(Ee*Ye,Ee*Ye),se.scale(window.devicePixelRatio*Ye,window.devicePixelRatio*Ye);var Be=g.Z.canvas(ee);return _(s,x,V)&&(se.filter=$),ae(s,Be,se,x,V),se.restore(),{element:s,canvas:ee,theme:V.theme,scale:Ye,zoomValue:u.value,canvasOffsetX:Ze,canvasOffsetY:Je,boundTextElementVersion:((W=(0,h.WJ)(s))===null||W===void 0?void 0:W.version)||null,containingFrameOpacity:((re=(0,M.$Z)(s))===null||re===void 0?void 0:re.opacity)||100}},pe=14,te=document.createElement("img");te.src="data:".concat(P.LO.svg,",").concat(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 ve=document.createElement("img");ve.src="data:".concat(P.LO.svg,",").concat(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 ae=function(s,u,x,V,W){var re,ee;switch(x.globalAlpha=((re=(ee=(0,M.$Z)(s))===null||ee===void 0?void 0:ee.opacity)!==null&&re!==void 0?re:100)*s.opacity/1e4,s.type){case"rectangle":case"embeddable":case"diamond":case"ellipse":x.lineJoin="round",x.lineCap="round",u.draw(c.R.get(s));break;case"arrow":case"line":x.lineJoin="round",x.lineCap="round",c.R.get(s).forEach(function(Se){u.draw(Se)});break;case"freedraw":x.save(),x.fillStyle=s.strokeColor;var se=function(Se){return De.get(Se)}(s),Ee=c.R.get(s);Ee&&u.draw(Ee),x.fillStyle=s.strokeColor,x.fill(se),x.restore();break;case"image":var _e,Ue=(0,f.wi)(s)?(_e=V.imageCache.get(s.fileId))===null||_e===void 0?void 0:_e.image:void 0;Ue==null||Ue instanceof Promise?function(Se,Be,Xe){Be.fillStyle="#E7E7E7",Be.fillRect(0,0,Se.width,Se.height);var lt=Math.min(Se.width,Se.height),it=Math.min(lt,Math.min(.4*lt,100));Be.drawImage(Se.status==="error"?ve:te,Se.width/2-it/2,Se.height/2-it/2,it,it)}(s,x,W.zoom.value):x.drawImage(Ue,0,0,s.width,s.height);break;default:if(!(0,f.iB)(s))throw new Error("Unimplemented type ".concat(s.type));var We=(0,v.dZ)(s.text),Ye=We&&!x.canvas.isConnected;Ye&&document.body.appendChild(x.canvas),x.canvas.setAttribute("dir",We?"rtl":"ltr"),x.save(),x.font=(0,v.mO)(s),x.fillStyle=s.strokeColor,x.textAlign=s.textAlign;for(var Ze=s.text.replace(/\r\n?/g,`
|
|
141
|
+
`).split(`
|
|
142
|
+
`),Je=s.textAlign==="center"?s.width/2:s.textAlign==="right"?s.width:0,nt=(0,h.Rg)(s.fontSize,s.lineHeight),dt=s.height-s.baseline,ge=0;ge<Ze.length;ge++)x.fillText(Ze[ge],Je,(ge+1)*nt-dt);x.restore(),Ye&&x.canvas.remove()}x.globalAlpha=1},H=new WeakMap,le=function(s,u,x){var V,W,re=u?x.zoom:I.zoom,ee=H.get(s),se=ee&&ee.zoomValue!==re.value&&!(x!=null&&x.shouldCacheIgnoreZoom),Ee=((V=(0,h.WJ)(s))===null||V===void 0?void 0:V.version)||null,_e=((W=(0,M.$Z)(s))===null||W===void 0?void 0:W.opacity)||100;if(!ee||se||ee.theme!==x.theme||ee.boundTextElementVersion!==Ee||ee.containingFrameOpacity!==_e){var Ue=q(s,re,u,x);return H.set(s,Ue),Ue}return ee},ke=function(s,u,x,V){var W=s.element,re=N(W),ee=s.scale,se=(0,l.qf)(W),Ee=(0,j.Z)(se,4),_e=Ee[0],Ue=Ee[1],We=Ee[2],Ye=Ee[3];(0,f.F9)(W)&&(_e=Math.floor(_e),We=Math.ceil(We),Ue=Math.floor(Ue),Ye=Math.ceil(Ye));var Ze=((_e+We)/2+V.scrollX)*window.devicePixelRatio,Je=((Ue+Ye)/2+V.scrollY)*window.devicePixelRatio;u.save(),u.scale(1/window.devicePixelRatio,1/window.devicePixelRatio);var nt=(0,h.WJ)(W);if((0,f.Yv)(W)&&nt){var dt=document.createElement("canvas"),ge=dt.getContext("2d"),Se=Math.max((0,v.TE)(_e,We),(0,v.TE)(Ue,Ye));dt.width=Se*window.devicePixelRatio*ee+re*s.scale*10,dt.height=Se*window.devicePixelRatio*ee+re*s.scale*10;var Be=(dt.width-s.canvas.width)/2,Xe=(dt.height-s.canvas.height)/2;ge.translate(dt.width/2,dt.height/2),ge.rotate(W.angle),ge.drawImage(s.canvas,-s.canvas.width/2,-s.canvas.height/2,s.canvas.width,s.canvas.height);var lt=(0,l.qf)(nt),it=(0,j.Z)(lt,6),yt=it[4],_t=it[5];ge.rotate(-W.angle);var ut=dt.width/2-(yt-_e)*window.devicePixelRatio*ee-Be-re*ee,Tt=dt.height/2-(_t-Ue)*window.devicePixelRatio*ee-Xe-re*ee;ge.translate(-ut,-Tt),ge.clearRect(-(nt.width/2+P.gK)*window.devicePixelRatio*ee,-(nt.height/2+P.gK)*window.devicePixelRatio*ee,(nt.width+2*P.gK)*window.devicePixelRatio*ee,(nt.height+2*P.gK)*window.devicePixelRatio*ee),u.translate(Ze,Je),u.drawImage(dt,-(We-_e)/2*window.devicePixelRatio-Be/ee-re,-(Ye-Ue)/2*window.devicePixelRatio-Xe/ee-re,dt.width/ee,dt.height/ee)}else if(u.translate(Ze,Je),u.rotate(W.angle),"scale"in s.element&&!C(W,x)&&u.scale(s.element.scale[0],s.element.scale[1]),u.translate(-Ze,-Je),u.drawImage(s.canvas,(_e+V.scrollX)*window.devicePixelRatio-re*s.scale/s.scale,(Ue+V.scrollY)*window.devicePixelRatio-re*s.scale/s.scale,s.canvas.width/s.scale,s.canvas.height/s.scale),{VITE_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",VITE_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",VITE_APP_LIBRARY_URL:"https://libraries.excalidraw.com",VITE_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",VITE_APP_PORTAL_URL:"https://portal.excalidraw.com",VITE_APP_PLUS_LP:"https://plus.excalidraw.com",VITE_APP_PLUS_APP:"https://app.excalidraw.com",VITE_APP_WS_SERVER_URL:"",VITE_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',VITE_APP_DISABLE_TRACKING:"",VITE_PKG_NAME:"@excalidraw/excalidraw",VITE_PKG_VERSION:"0.17.6",VITE_IS_EXCALIDRAW_NPM_PACKAGE:!0}.VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX==="true"&&(0,f.Xo)(W)){var Yt=(0,h.WJ)(W),Zt=(0,h.cw)(W);u.strokeStyle="#c92a2a",u.lineWidth=3,u.strokeRect((Zt.x+V.scrollX)*window.devicePixelRatio,(Zt.y+V.scrollY)*window.devicePixelRatio,(0,h.iZ)(W)*window.devicePixelRatio,(0,h.D9)(W,Yt)*window.devicePixelRatio)}u.restore()},Le=function(s,u,x){u.save(),u.translate(s.x+x.scrollX,s.y+x.scrollY),u.fillStyle="rgba(0, 0, 200, 0.04)";var V=.5/x.zoom.value;u.fillRect(V,V,s.width,s.height),u.lineWidth=1/x.zoom.value,u.strokeStyle=" rgb(105, 101, 219)",u.strokeRect(V,V,s.width,s.height),u.restore()},Ge=function(s,u,x,V,W){switch(s.type){case"frame":W.frameRendering.enabled&&W.frameRendering.outline&&(x.save(),x.translate(s.x+W.scrollX,s.y+W.scrollY),x.fillStyle="rgba(0, 0, 200, 0.04)",x.lineWidth=P.iG.strokeWidth/W.zoom.value,x.strokeStyle=P.iG.strokeColor,P.iG.radius&&x.roundRect?(x.beginPath(),x.roundRect(0,0,s.width,s.height,P.iG.radius/W.zoom.value),x.stroke(),x.closePath()):x.strokeRect(0,0,s.width,s.height),x.restore());break;case"freedraw":if(c.R.generateElementShape(s),V.isExporting){var re=(0,l.qf)(s),ee=(0,j.Z)(re,4),se=ee[0],Ee=ee[1],_e=ee[2],Ue=ee[3],We=(se+_e)/2+W.scrollX,Ye=(Ee+Ue)/2+W.scrollY,Ze=(_e-se)/2-(s.x-se),Je=(Ue-Ee)/2-(s.y-Ee);x.save(),x.translate(We,Ye),x.rotate(s.angle),x.translate(-Ze,-Je),ae(s,u,x,V,W),x.restore()}else{var nt=le(s,V,W);ke(nt,x,V,W)}break;case"rectangle":case"diamond":case"ellipse":case"line":case"arrow":case"image":case"text":case"embeddable":if(c.R.generateElementShape(s,V.isExporting),V.isExporting){var dt=(0,l.qf)(s),ge=(0,j.Z)(dt,4),Se=ge[0],Be=ge[1],Xe=ge[2],lt=ge[3],it=(Se+Xe)/2+W.scrollX,yt=(Be+lt)/2+W.scrollY,_t=(Xe-Se)/2-(s.x-Se),ut=(lt-Be)/2-(s.y-Be);if((0,f.iB)(s)){var Tt=(0,h.tl)(s);if((0,f.Yv)(Tt)){var Yt=y._.getBoundTextElementPosition(Tt,s);_t=(Xe-Se)/2-(Yt.x-Se),ut=(lt-Be)/2-(Yt.y-Be)}}x.save(),x.translate(it,yt),_(s,V,W)&&(x.filter="none");var Zt=(0,h.WJ)(s);if((0,f.Yv)(s)&&Zt){var Pt=document.createElement("canvas"),en=Pt.getContext("2d"),tn=Math.max((0,v.TE)(Se,Xe),(0,v.TE)(Be,lt)),ot=N(s);Pt.width=tn*W.exportScale+10*ot*W.exportScale,Pt.height=tn*W.exportScale+10*ot*W.exportScale,en.translate(Pt.width/2,Pt.height/2),en.scale(W.exportScale,W.exportScale),_t=s.width/2-(s.x-Se),ut=s.height/2-(s.y-Be),en.rotate(s.angle);var It=g.Z.canvas(Pt);en.translate(-_t,-ut),ae(s,It,en,V,W),en.translate(_t,ut),en.rotate(-s.angle);var mt=(0,l.qf)(Zt),jt=(0,j.Z)(mt,6),xt=(Se+Xe)/2-jt[4],Nt=(Be+lt)/2-jt[5];en.translate(-xt,-Nt),en.clearRect(-Zt.width/2,-Zt.height/2,Zt.width,Zt.height),x.scale(1/W.exportScale,1/W.exportScale),x.drawImage(Pt,-Pt.width/2,-Pt.height/2,Pt.width,Pt.height)}else x.rotate(s.angle),s.type==="image"&&x.scale(s.scale[0],s.scale[1]),x.translate(-_t,-ut),ae(s,u,x,V,W);x.restore()}else{var Ut=le(s,V,W),rn=x.imageSmoothingEnabled;W!=null&&W.shouldCacheIgnoreZoom||s.angle&&!(0,k.EK)(s.angle)||(x.imageSmoothingEnabled=!1),ke(Ut,x,V,W),x.imageSmoothingEnabled=rn}break;default:throw new Error("Unimplemented type ".concat(s.type))}},Ne=function(s,u,x){if(x===void 0)return s.draw(u);var V={sets:u.sets,shape:u.shape,options:O(O({},u.options),{},{fixedDecimalPlaceDigits:x})};return s.draw(V)},Ce=function(s,u,x,V){if(!V.enabled||!V.clip)return null;var W=(0,M.$Z)(s);if(W){var re=u.ownerDocument.createElementNS(P.hR,"g");return re.setAttributeNS(P.hR,"clip-path","url(#".concat(W.id,")")),x.forEach(function(ee){return re.appendChild(ee)}),re}return null},Oe=function s(u,x,V,W,re,ee,se){var Ee,_e,Ue=re,We=ee,Ye=(0,l.qf)(u),Ze=(0,j.Z)(Ye,4),Je=Ze[0],nt=Ze[1],dt=Ze[2],ge=Ze[3],Se=(dt-Je)/2-(u.x-Je),Be=(ge-nt)/2-(u.y-nt);if((0,f.iB)(u)){var Xe=(0,h.tl)(u);if((0,f.Yv)(Xe)){var lt=(0,l.qf)(Xe),it=(0,j.Z)(lt,4),yt=it[0],_t=it[1],ut=it[2],Tt=it[3],Yt=y._.getBoundTextElementPosition(Xe,u);Se=(ut-yt)/2-(Yt.x-yt),Be=(Tt-_t)/2-(Yt.y-_t),re=re+Yt.x-u.x,ee=ee+Yt.y-u.y}}var Zt=180*u.angle/Math.PI,Pt=V;if(u.link){var en=V.ownerDocument.createElementNS(P.hR,"a");en.setAttribute("href",(0,p.$u)(u.link)),Pt.appendChild(en),Pt=en}var tn=function(wo,de){(0,v.h2)()&&wo.setAttribute("data-id",de.id),Pt.appendChild(wo)},ot=((Ee=(_e=(0,M.$Z)(u))===null||_e===void 0?void 0:_e.opacity)!==null&&Ee!==void 0?Ee:100)*u.opacity/1e4;switch(u.type){case"selection":throw new Error("Selection rendering is not supported for SVG");case"rectangle":case"diamond":case"ellipse":var It=c.R.generateElementShape(u),mt=Ne(x,It,P.zK);ot!==1&&(mt.setAttribute("stroke-opacity","".concat(ot)),mt.setAttribute("fill-opacity","".concat(ot))),mt.setAttribute("stroke-linecap","round"),mt.setAttribute("transform","translate(".concat(re||0," ").concat(ee||0,") rotate(").concat(Zt," ").concat(Se," ").concat(Be,")")),tn(Ce(u,Pt,[mt],se.frameRendering)||mt,u);break;case"embeddable":var jt=c.R.generateElementShape(u,!0),xt=Ne(x,jt,P.zK),Nt=u.opacity/100;Nt!==1&&(xt.setAttribute("stroke-opacity","".concat(Nt)),xt.setAttribute("fill-opacity","".concat(Nt))),xt.setAttribute("stroke-linecap","round"),xt.setAttribute("transform","translate(".concat(re||0," ").concat(ee||0,") rotate(").concat(Zt," ").concat(Se," ").concat(Be,")")),tn(xt,u);var Ut=(0,r.g0)(u);s(Ut,x,Pt,W,Ut.x+Ue-u.x,Ut.y+We-u.y,se);var rn=Ne(x,jt,P.zK);for(rn.setAttribute("stroke-linecap","round"),rn.setAttribute("transform","translate(".concat(re||0," ").concat(ee||0,") rotate(").concat(Zt," ").concat(Se," ").concat(Be,")"));rn.firstChild;)rn.removeChild(rn.firstChild);var Ft=(0,k.yW)(Math.min(u.width,u.height),u),Sn=(0,r.LM)((0,p.ye)(u.link||""));if(se.renderEmbeddables===!1||(Sn==null?void 0:Sn.type)==="document"){var mn=V.ownerDocument.createElementNS(P.hR,"a");mn.setAttribute("href",(0,p.$u)(u.link||"")),mn.setAttribute("target","_blank"),mn.setAttribute("rel","noopener noreferrer"),mn.style.borderRadius="".concat(Ft,"px"),rn.appendChild(mn)}else{var Yn,ht=V.ownerDocument.createElementNS(P.hR,"foreignObject");ht.style.width="".concat(u.width,"px"),ht.style.height="".concat(u.height,"px"),ht.style.border="none";var Xt=ht.ownerDocument.createElementNS(P.hR,"div");Xt.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),Xt.style.width="100%",Xt.style.height="100%";var zt=Xt.ownerDocument.createElement("iframe");zt.src=(Yn=Sn==null?void 0:Sn.link)!==null&&Yn!==void 0?Yn:"",zt.style.width="100%",zt.style.height="100%",zt.style.border="none",zt.style.borderRadius="".concat(Ft,"px"),zt.style.top="0",zt.style.left="0",zt.allowFullscreen=!0,Xt.appendChild(zt),ht.appendChild(Xt),rn.appendChild(ht)}tn(rn,u);break;case"line":case"arrow":var Vt=(0,h.WJ)(u),Tn=V.ownerDocument.createElementNS(P.hR,"mask");if(Vt){Tn.setAttribute("id","mask-".concat(u.id));var Dn=V.ownerDocument.createElementNS(P.hR,"rect");re=re||0,ee=ee||0,Dn.setAttribute("x","0"),Dn.setAttribute("y","0"),Dn.setAttribute("fill","#fff"),Dn.setAttribute("width","".concat(u.width+100+re)),Dn.setAttribute("height","".concat(u.height+100+ee)),Tn.appendChild(Dn);var Nn=V.ownerDocument.createElementNS(P.hR,"rect"),Xn=y._.getBoundTextElementPosition(u,Vt),jn=re+Xn.x-u.x,wt=ee+Xn.y-u.y;Nn.setAttribute("x",jn.toString()),Nn.setAttribute("y",wt.toString()),Nn.setAttribute("fill","#000"),Nn.setAttribute("width","".concat(Vt.width)),Nn.setAttribute("height","".concat(Vt.height)),Nn.setAttribute("opacity","1"),Tn.appendChild(Nn)}var Et=V.ownerDocument.createElementNS(P.hR,"g");Vt&&Et.setAttribute("mask","url(#mask-".concat(u.id,")")),Et.setAttribute("stroke-linecap","round"),c.R.generateElementShape(u).forEach(function(wo){var de=Ne(x,wo,P.zK);ot!==1&&(de.setAttribute("stroke-opacity","".concat(ot)),de.setAttribute("fill-opacity","".concat(ot))),de.setAttribute("transform","translate(".concat(re||0," ").concat(ee||0,") rotate(").concat(Zt," ").concat(Se," ").concat(Be,")")),u.type==="line"&&(0,k.g6)(u.points)&&u.backgroundColor!=="transparent"&&de.setAttribute("fill-rule","evenodd"),Et.appendChild(de)});var Ct=Ce(u,Pt,[Et,Tn],se.frameRendering);Ct?(tn(Ct,u),Pt.appendChild(Ct)):(tn(Et,u),Pt.append(Tn));break;case"freedraw":var Lt=c.R.generateElementShape(u),hn=Lt?Ne(x,Lt,P.zK):V.ownerDocument.createElementNS(P.hR,"g");ot!==1&&(hn.setAttribute("stroke-opacity","".concat(ot)),hn.setAttribute("fill-opacity","".concat(ot))),hn.setAttribute("transform","translate(".concat(re||0," ").concat(ee||0,") rotate(").concat(Zt," ").concat(Se," ").concat(Be,")")),hn.setAttribute("stroke","none");var yn=V.ownerDocument.createElementNS(P.hR,"path");yn.setAttribute("fill",u.strokeColor),yn.setAttribute("d",ie(u)),hn.appendChild(yn),tn(Ce(u,Pt,[hn],se.frameRendering)||hn,u);break;case"image":var fn=Math.round(u.width),Bn=Math.round(u.height),En=(0,f.wi)(u)&&W[u.fileId];if(En){var Cn="image-".concat(En.id),qn=V.querySelector("#".concat(Cn));if(!qn){(qn=V.ownerDocument.createElementNS(P.hR,"symbol")).id=Cn;var vn=V.ownerDocument.createElementNS(P.hR,"image");vn.setAttribute("width","100%"),vn.setAttribute("height","100%"),vn.setAttribute("href",En.dataURL),qn.appendChild(vn),Pt.prepend(qn)}var wn=V.ownerDocument.createElementNS(P.hR,"use");if(wn.setAttribute("href","#".concat(Cn)),se.exportWithDarkMode&&En.mimeType!==P.LO.svg&&wn.setAttribute("filter",$),wn.setAttribute("width","".concat(fn)),wn.setAttribute("height","".concat(Bn)),wn.setAttribute("opacity","".concat(ot)),u.scale[0]!==1||u.scale[1]!==1){var In=u.scale[0]!==1?-fn:0,kn=u.scale[1]!==1?-Bn:0;wn.setAttribute("transform","scale(".concat(u.scale[0],", ").concat(u.scale[1],") translate(").concat(In," ").concat(kn,")"))}var nr=V.ownerDocument.createElementNS(P.hR,"g");nr.appendChild(wn),nr.setAttribute("transform","translate(".concat(re||0," ").concat(ee||0,") rotate(").concat(Zt," ").concat(Se," ").concat(Be,")")),tn(Ce(u,Pt,[nr],se.frameRendering)||nr,u)}break;case"frame":if(se.frameRendering.enabled&&se.frameRendering.outline){var Pn=document.createElementNS(P.hR,"rect");Pn.setAttribute("transform","translate(".concat(re||0," ").concat(ee||0,") rotate(").concat(Zt," ").concat(Se," ").concat(Be,")")),Pn.setAttribute("width","".concat(u.width,"px")),Pn.setAttribute("height","".concat(u.height,"px")),Pn.setAttribute("rx",P.iG.radius.toString()),Pn.setAttribute("ry",P.iG.radius.toString()),Pn.setAttribute("fill","none"),Pn.setAttribute("stroke",P.iG.strokeColor),Pn.setAttribute("stroke-width",P.iG.strokeWidth.toString()),tn(Pn,u)}break;default:if(!(0,f.iB)(u))throw new Error("Unimplemented type ".concat(u.type));var Jn=V.ownerDocument.createElementNS(P.hR,"g");ot!==1&&(Jn.setAttribute("stroke-opacity","".concat(ot)),Jn.setAttribute("fill-opacity","".concat(ot))),Jn.setAttribute("transform","translate(".concat(re||0," ").concat(ee||0,") rotate(").concat(Zt," ").concat(Se," ").concat(Be,")"));for(var xr=u.text.replace(/\r\n?/g,`
|
|
143
|
+
`).split(`
|
|
144
|
+
`),Nr=(0,h.Rg)(u.fontSize,u.lineHeight),$r=u.textAlign==="center"?u.width/2:u.textAlign==="right"?u.width:0,ao=(0,v.dZ)(u.text)?"rtl":"ltr",lo=u.textAlign==="center"?"middle":u.textAlign==="right"||ao==="rtl"?"end":"start",Dr=0;Dr<xr.length;Dr++){var Ar=V.ownerDocument.createElementNS(P.hR,"text");Ar.textContent=xr[Dr],Ar.setAttribute("x","".concat($r)),Ar.setAttribute("y","".concat(Dr*Nr)),Ar.setAttribute("font-family",(0,v.$g)(u)),Ar.setAttribute("font-size","".concat(u.fontSize,"px")),Ar.setAttribute("fill",u.strokeColor),Ar.setAttribute("text-anchor",lo),Ar.setAttribute("style","white-space: pre;"),Ar.setAttribute("direction",ao),Ar.setAttribute("dominant-baseline","text-before-edge"),Jn.appendChild(Ar)}tn(Ce(u,Pt,[Jn],se.frameRendering)||Jn,u)}},De=new WeakMap([]);function Ae(s){var u=ie(s),x=new Path2D(u);return De.set(s,x),x}function ie(s){return function(u){if(!u.length)return"";var x=u.length-1;return u.reduce(function(V,W,re,ee){return re===x?V.push(W,Ie(W,ee[0]),"L",ee[0],"Z"):V.push(W,Ie(W,ee[re+1])),V},["M",u[0],"Q"]).join(" ").replace(oe,"$1")}(L(s.simulatePressure?s.points:s.points.length?s.points.map(function(u,x){var V=(0,j.Z)(u,2);return[V[0],V[1],s.pressures[x]]}):[[0,0,.5]],{simulatePressure:s.simulatePressure,size:4.25*s.strokeWidth,thinning:.6,smoothing:.5,streamline:.5,easing:function(u){return Math.sin(u*Math.PI/2)},last:!!s.lastCommittedPoint}))}function Ie(s,u){return[(s[0]+u[0])/2,(s[1]+u[1])/2]}var oe=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g},7766:function(fe,Q,t){t.d(Q,{Lu:function(){return w},n_:function(){return Le},tp:function(){return H},M_:function(){return oe},AW:function(){return ke}});var T,j=t(1930),f=t(2577),l=t(5284),v=t(7651),k=function(s,u,x,V,W,re,ee){s.beginPath(),s.moveTo(u+re,x),s.lineTo(u+V-re,x),s.quadraticCurveTo(u+V,x,u+V,x+re),s.lineTo(u+V,x+W-re),s.quadraticCurveTo(u+V,x+W,u+V-re,x+W),s.lineTo(u+re,x+W),s.quadraticCurveTo(u,x+W,u,x+W-re),s.lineTo(u,x+re),s.quadraticCurveTo(u,x,u+re,x),s.closePath(),s.fill(),ee&&(s.strokeStyle=ee),s.stroke()},g=t(4726),a=t(9660),P=t(957),R=t(7422),K=t(9215),U=t(3528),m=t(4048),G=t(9827);(function(s){s.ACTIVE="active",s.AWAY="away",s.IDLE="idle"})(T||(T={}));var he=t(9937),be=t(5992);function we(s,u){var x=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(!x){if(Array.isArray(s)||(x=function(Ee,_e){if(Ee){if(typeof Ee=="string")return xe(Ee,_e);var Ue=Object.prototype.toString.call(Ee).slice(8,-1);if(Ue==="Object"&&Ee.constructor&&(Ue=Ee.constructor.name),Ue==="Map"||Ue==="Set")return Array.from(Ee);if(Ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ue))return xe(Ee,_e)}}(s))||u){x&&(s=x);var V=0,W=function(){};return{s:W,n:function(){return V>=s.length?{done:!0}:{done:!1,value:s[V++]}},e:function(Ee){throw Ee},f:W}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
145
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var re,ee=!0,se=!1;return{s:function(){x=x.call(s)},n:function(){var Ee=x.next();return ee=Ee.done,Ee},e:function(Ee){se=!0,re=Ee},f:function(){try{ee||x.return==null||x.return()}finally{if(se)throw re}}}}function xe(s,u){(u==null||u>s.length)&&(u=s.length);for(var x=0,V=new Array(u);x<u;x++)V[x]=s[x];return V}var ce=function(s,u,x){if(!x.zenModeEnabled){var V=s.points[0],W=s.points[s.points.length-1];S(V,W,u)}var re,ee=we(s.points);try{for(ee.s();!(re=ee.n()).done;){var se=re.value;ne(se,x,u)}}catch(Ee){ee.e(Ee)}finally{ee.f()}},D=function(s,u,x){ne(s.points[0],x,u),x.zenModeEnabled||S(s.points[0],s.points[1],u)},ne=function(s,u,x){var V=(0,f.Z)(s,2),W=V[0],re=V[1];x.save();var ee=(u.zenModeEnabled?3:2)/u.zoom.value;x.beginPath(),x.moveTo(W-ee,re-ee),x.lineTo(W+ee,re+ee),x.moveTo(W+ee,re-ee),x.lineTo(W-ee,re+ee),x.stroke(),x.restore()},S=function(s,u,x){x.beginPath(),x.lineTo.apply(x,(0,j.Z)(s)),x.lineTo.apply(x,(0,j.Z)(u)),x.stroke()},z=function(s,u,x,V,W){var re=8/V.zoom.value,ee=re/2,se=re/4;if(x==="horizontal"){var Ee=[(s[0]+u[0])/2,s[1]];V.zenModeEnabled||S([s[0],s[1]-re],[s[0],s[1]+re],W),S([Ee[0]-se,Ee[1]-ee],[Ee[0]-se,Ee[1]+ee],W),S([Ee[0]+se,Ee[1]-ee],[Ee[0]+se,Ee[1]+ee],W),V.zenModeEnabled||(S([u[0],u[1]-re],[u[0],u[1]+re],W),S(s,u,W))}else{var _e=[s[0],(s[1]+u[1])/2];V.zenModeEnabled||S([s[0]-re,s[1]],[s[0]+re,s[1]],W),S([_e[0]-ee,_e[1]-se],[_e[0]+ee,_e[1]-se],W),S([_e[0]-ee,_e[1]+se],[_e[0]+ee,_e[1]+se],W),V.zenModeEnabled||(S([u[0]-re,u[1]],[u[0]+re,u[1]],W),S(s,u,W))}},A=t(4183),E=t(761),L=t(4682),h=t(6655);function y(s,u){var x=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(!x){if(Array.isArray(s)||(x=function(Ee,_e){if(Ee){if(typeof Ee=="string")return r(Ee,_e);var Ue=Object.prototype.toString.call(Ee).slice(8,-1);if(Ue==="Object"&&Ee.constructor&&(Ue=Ee.constructor.name),Ue==="Map"||Ue==="Set")return Array.from(Ee);if(Ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ue))return r(Ee,_e)}}(s))||u){x&&(s=x);var V=0,W=function(){};return{s:W,n:function(){return V>=s.length?{done:!0}:{done:!1,value:s[V++]}},e:function(Ee){throw Ee},f:W}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
146
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var re,ee=!0,se=!1;return{s:function(){x=x.call(s)},n:function(){var Ee=x.next();return ee=Ee.done,Ee},e:function(Ee){se=!0,re=Ee},f:function(){try{ee||x.return==null||x.return()}finally{if(se)throw re}}}}function r(s,u){(u==null||u>s.length)&&(u=s.length);for(var x=0,V=new Array(u);x<u;x++)V[x]=s[x];return V}function M(s,u){var x=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(!x){if(Array.isArray(s)||(x=function(Ee,_e){if(Ee){if(typeof Ee=="string")return p(Ee,_e);var Ue=Object.prototype.toString.call(Ee).slice(8,-1);if(Ue==="Object"&&Ee.constructor&&(Ue=Ee.constructor.name),Ue==="Map"||Ue==="Set")return Array.from(Ee);if(Ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ue))return p(Ee,_e)}}(s))||u){x&&(s=x);var V=0,W=function(){};return{s:W,n:function(){return V>=s.length?{done:!0}:{done:!1,value:s[V++]}},e:function(Ee){throw Ee},f:W}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
147
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var re,ee=!0,se=!1;return{s:function(){x=x.call(s)},n:function(){var Ee=x.next();return ee=Ee.done,Ee},e:function(Ee){se=!0,re=Ee},f:function(){try{ee||x.return==null||x.return()}finally{if(se)throw re}}}}function p(s,u){(u==null||u>s.length)&&(u=s.length);for(var x=0,V=new Array(u);x<u;x++)V[x]=s[x];return V}(function(){var s,u,x,V,W,re;(u=(s=Path2D.prototype).roundRect)!==null&&u!==void 0||(s.roundRect=ee),globalThis.CanvasRenderingContext2D&&((V=(x=globalThis.CanvasRenderingContext2D.prototype).roundRect)!==null&&V!==void 0||(x.roundRect=ee)),globalThis.OffscreenCanvasRenderingContext2D&&((re=(W=globalThis.OffscreenCanvasRenderingContext2D.prototype).roundRect)!==null&&re!==void 0||(W.roundRect=ee));function ee(Ee,_e,Ue,We,Ye){if([Ee,_e,Ue,We].every(function(it){return Number.isFinite(it)})){var Ze,Je,nt,dt;if((Ye=function(it){var yt=(0,h.Z)(it);return yt==="undefined"||it===null?[0]:yt==="function"?[NaN]:yt==="object"?typeof it[Symbol.iterator]=="function"?(0,j.Z)(it).map(function(_t){var ut=(0,h.Z)(_t);return ut==="undefined"||_t===null?0:ut==="function"?NaN:ut==="object"?Be(_t):Xe(_t)}):[Be(it)]:[Xe(it)]}(Ye)).length===4)Ze=lt(Ye[0]),Je=lt(Ye[1]),nt=lt(Ye[2]),dt=lt(Ye[3]);else if(Ye.length===3)Ze=lt(Ye[0]),Je=lt(Ye[1]),dt=lt(Ye[1]),nt=lt(Ye[2]);else if(Ye.length===2)Ze=lt(Ye[0]),nt=lt(Ye[0]),Je=lt(Ye[1]),dt=lt(Ye[1]);else{if(Ye.length!==1)throw new RangeError("".concat(se(this)," ").concat(Ye.length," is not a valid size for radii sequence."));Ze=lt(Ye[0]),Je=lt(Ye[0]),nt=lt(Ye[0]),dt=lt(Ye[0])}var ge=[Ze,Je,nt,dt],Se=ge.find(function(it){var yt=it.x,_t=it.y;return yt<0||_t<0});if((Se==null?void 0:Se.x)<0?Se.x:Se==null||Se.y,!ge.some(function(it){var yt=it.x,_t=it.y;return!Number.isFinite(yt)||!Number.isFinite(_t)})){if(Se)throw new RangeError("".concat(se(this)," Radius value ").concat(Se," is negative."));(function(it){var yt=(0,f.Z)(it,4),_t=yt[0],ut=yt[1],Tt=yt[2],Yt=yt[3],Zt=[Math.abs(Ue)/(_t.x+ut.x),Math.abs(We)/(ut.y+Tt.y),Math.abs(Ue)/(Tt.x+Yt.x),Math.abs(We)/(_t.y+Yt.y)],Pt=Math.min.apply(Math,Zt);if(Pt<=1){var en,tn=y(it);try{for(tn.s();!(en=tn.n()).done;){var ot=en.value;ot.x*=Pt,ot.y*=Pt}}catch(It){tn.e(It)}finally{tn.f()}}})(ge),Ue<0&&We<0?(this.moveTo(Ee-Ze.x,_e),this.ellipse(Ee+Ue+Je.x,_e-Je.y,Je.x,Je.y,0,1.5*-Math.PI,-Math.PI),this.ellipse(Ee+Ue+nt.x,_e+We+nt.y,nt.x,nt.y,0,-Math.PI,-Math.PI/2),this.ellipse(Ee-dt.x,_e+We+dt.y,dt.x,dt.y,0,-Math.PI/2,0),this.ellipse(Ee-Ze.x,_e-Ze.y,Ze.x,Ze.y,0,0,-Math.PI/2)):Ue<0?(this.moveTo(Ee-Ze.x,_e),this.ellipse(Ee+Ue+Je.x,_e+Je.y,Je.x,Je.y,0,-Math.PI/2,-Math.PI,1),this.ellipse(Ee+Ue+nt.x,_e+We-nt.y,nt.x,nt.y,0,-Math.PI,1.5*-Math.PI,1),this.ellipse(Ee-dt.x,_e+We-dt.y,dt.x,dt.y,0,Math.PI/2,0,1),this.ellipse(Ee-Ze.x,_e+Ze.y,Ze.x,Ze.y,0,0,-Math.PI/2,1)):We<0?(this.moveTo(Ee+Ze.x,_e),this.ellipse(Ee+Ue-Je.x,_e-Je.y,Je.x,Je.y,0,Math.PI/2,0,1),this.ellipse(Ee+Ue-nt.x,_e+We+nt.y,nt.x,nt.y,0,0,-Math.PI/2,1),this.ellipse(Ee+dt.x,_e+We+dt.y,dt.x,dt.y,0,-Math.PI/2,-Math.PI,1),this.ellipse(Ee+Ze.x,_e-Ze.y,Ze.x,Ze.y,0,-Math.PI,1.5*-Math.PI,1)):(this.moveTo(Ee+Ze.x,_e),this.ellipse(Ee+Ue-Je.x,_e+Je.y,Je.x,Je.y,0,-Math.PI/2,0),this.ellipse(Ee+Ue-nt.x,_e+We-nt.y,nt.x,nt.y,0,0,Math.PI/2),this.ellipse(Ee+dt.x,_e+We-dt.y,dt.x,dt.y,0,Math.PI/2,Math.PI),this.ellipse(Ee+Ze.x,_e+Ze.y,Ze.x,Ze.y,0,Math.PI,1.5*Math.PI)),this.closePath(),this.moveTo(Ee,_e)}}function Be(it){return{x:it.x,y:it.y,z:it.z,w:it.w}}function Xe(it){return+it}function lt(it){var yt,_t,ut=Xe(it);return Number.isFinite(ut)?{x:ut,y:ut}:Object(it)===it?{x:Xe((yt=it.x)!==null&&yt!==void 0?yt:0),y:Xe((_t=it.y)!==null&&_t!==void 0?_t:0)}:{x:NaN,y:NaN}}}function se(Ee){return"Failed to execute 'roundRect' on '".concat(function(_e){return Object(_e)===_e&&_e instanceof Path2D?"Path2D":_e instanceof(globalThis==null?void 0:globalThis.CanvasRenderingContext2D)?"CanvasRenderingContext2D":_e instanceof(globalThis==null?void 0:globalThis.OffscreenCanvasRenderingContext2D)?"OffscreenCanvasRenderingContext2D":(_e==null?void 0:_e.constructor.name)||_e}(Ee),"':")}})();var c,w=2,O=function(s,u,x,V,W,re,ee,se){var Ee=arguments.length>8&&arguments[8]!==void 0&&arguments[8],_e=arguments.length>9&&arguments[9]!==void 0?arguments[9]:0;s.save(),s.translate(re,ee),s.rotate(se),Ee&&s.fillRect(u-re,x-ee,V,W),_e&&s.roundRect?(s.beginPath(),s.roundRect(u-re,x-ee,V,W,_e),s.stroke(),s.closePath()):s.strokeRect(u-re,x-ee,V,W),s.restore()},$=function(s,u,x,V){var W=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];s.beginPath(),s.arc(u,x,V,0,2*Math.PI),s.fill(),W&&s.stroke()},I=function(s,u,x,V,W){var re=arguments.length>5&&arguments[5]!==void 0&&arguments[5];s.strokeStyle="#5e5ad8",s.setLineDash([]),s.fillStyle="rgba(255, 255, 255, 0.9)",W?s.fillStyle="rgba(134, 131, 226, 0.9)":re&&(s.fillStyle="rgba(177, 151, 252, 0.7)"),$(s,x[0],x[1],V/u.zoom.value,!re)},C=function(s,u,x){if(u.selectedLinearElement){s.save(),s.translate(u.scrollX,u.scrollY),s.lineWidth=1/u.zoom.value;var V=R._.getPointsGlobalCoordinates(x),W=R._.POINT_HANDLE_SIZE,re=u.editingLinearElement?W:W/2;V.forEach(function(ee,se){var Ee,_e,Ue=!((Ee=u.editingLinearElement)===null||Ee===void 0||(_e=Ee.selectedPointsIndices)===null||_e===void 0||!_e.includes(se));I(s,u,ee,re,Ue)}),R._.getEditorMidPoints(x,u).filter(function(ee){return ee!==null}).forEach(function(ee){var se;u!=null&&(se=u.selectedLinearElement)!==null&&se!==void 0&&se.segmentMidPointHoveredCoords&&R._.arePointsEqual(ee,u.selectedLinearElement.segmentMidPointHoveredCoords)?u.editingLinearElement?(I(s,u,ee,re,!1),_(ee,s,u)):(_(ee,s,u),I(s,u,ee,re,!1)):(u.editingLinearElement||V.length===2)&&I(s,u,ee,W/2,!1,!0)}),s.restore()}},_=function(s,u,x){u.fillStyle="rgba(105, 101, 219, 0.4)",$(u,s[0],s[1],R._.POINT_HANDLE_SIZE/x.zoom.value,!1)},N=function(s,u,x,V){u.translate(s.x+V.scrollX,s.y+V.scrollY),u.beginPath(),u.roundRect?u.roundRect(0,0,s.width,s.height,he.iG.radius/V.zoom.value):u.rect(0,0,s.width,s.height),u.clip(),u.translate(-(s.x+V.scrollX),-(s.y+V.scrollY))},q=function(s,u){return[s.width/u,s.height/u]},pe=function(s){var u=s.canvas,x=s.scale,V=s.normalizedWidth,W=s.normalizedHeight,re=s.theme,ee=s.isExporting,se=s.viewBackgroundColor,Ee=u.getContext("2d");return Ee.setTransform(1,0,0,1,0,0),Ee.scale(x,x),ee&&re==="dark"&&(Ee.filter=he.ZF),typeof se=="string"?((se==="transparent"||se.length===5||se.length===9||/(hsla|rgba)\(/.test(se))&&Ee.clearRect(0,0,V,W),Ee.save(),Ee.fillStyle=se,Ee.fillRect(0,0,V,W),Ee.restore()):Ee.clearRect(0,0,V,W),Ee},te=function(s){var u,x=s.canvas,V=s.elements,W=s.visibleElements,re=s.selectedElements,ee=s.scale,se=s.appState,Ee=s.renderConfig;if(x===null)return{atLeastOneVisibleElement:!1,elements:V};var _e=q(x,ee),Ue=(0,f.Z)(_e,2),We=Ue[0],Ye=Ue[1],Ze=pe({canvas:x,scale:ee,normalizedWidth:We,normalizedHeight:Ye});Ze.save(),Ze.scale(se.zoom.value,se.zoom.value);var Je=void 0;if(W.forEach(function(Et){var Ct;((Ct=se.editingLinearElement)===null||Ct===void 0?void 0:Ct.elementId)===Et.id&&Et&&(Je=Et)}),Je&&C(Ze,se,Je),se.selectionElement)try{(0,a.uI)(se.selectionElement,Ze,se)}catch(Et){console.error(Et)}se.isBindingEnabled&&se.suggestedBindings.filter(function(Et){return Et!=null}).forEach(function(Et){Ce(Ze,se,Et)}),se.frameToHighlight&&De(Ze,se,se.frameToHighlight),se.elementsToHighlight&&Ae(Ze,se,se.elementsToHighlight);var nt,dt=re.some(function(Et){return(0,A.He)(Et)});if(re.length===1&&((u=se.editingLinearElement)===null||u===void 0?void 0:u.elementId)===re[0].id&&C(Ze,se,re[0]),se.selectedLinearElement&&se.selectedLinearElement.hoverPointIndex>=0&&function(Et,Ct){var Lt,hn,yn=Ct.selectedLinearElement,fn=yn.elementId,Bn=yn.hoverPointIndex;if((Lt=Ct.editingLinearElement)===null||Lt===void 0||(hn=Lt.selectedPointsIndices)===null||hn===void 0||!hn.includes(Bn)){var En=R._.getElement(fn);if(En){var Cn=R._.getPointAtIndexGlobalCoordinates(En,Bn);Et.save(),Et.translate(Ct.scrollX,Ct.scrollY),_(Cn,Et,Ct),Et.restore()}}}(Ze,se),!se.multiElement&&!se.editingLinearElement){var ge,Se=(0,m.oY)(re,se);re.length===1&&(0,A.bt)(re[0])&&((ge=se.selectedLinearElement)===null||ge===void 0?void 0:ge.elementId)===re[0].id&&!re[0].locked&&C(Ze,se,re[0]);var Be=Ee.selectionColor||l.black;if(Se){var Xe,lt=re.reduce(function(Et,Ct){return Et[Ct.id]=!0,Et},{}),it=V.reduce(function(Et,Ct){var Lt=[];if(lt[Ct.id]&&!(0,K.zq)(se,Ct)&&Lt.push(Be),Ee.remoteSelectedElementIds[Ct.id]&&Lt.push.apply(Lt,(0,j.Z)(Ee.remoteSelectedElementIds[Ct.id].map(function(In){return(0,P.G)(In)}))),Lt.length){var hn,yn=(0,v.qf)(Ct,!0),fn=(0,f.Z)(yn,6),Bn=fn[0],En=fn[1],Cn=fn[2],qn=fn[3],vn=fn[4],wn=fn[5];Et.push({angle:Ct.angle,elementX1:Bn,elementY1:En,elementX2:Cn,elementY2:qn,selectionColors:Lt,dashed:!!Ee.remoteSelectedElementIds[Ct.id],cx:vn,cy:wn,activeEmbeddable:((hn=se.activeEmbeddable)===null||hn===void 0?void 0:hn.element)===Ct&&se.activeEmbeddable.state==="active"})}return Et},[]),yt=function(Et){var Ct=(0,K.Fb)(V,Et),Lt=(0,v.KP)(Ct),hn=(0,f.Z)(Lt,4),yn=hn[0],fn=hn[1],Bn=hn[2],En=hn[3];it.push({angle:0,elementX1:yn,elementX2:Bn,elementY1:fn,elementY2:En,selectionColors:[l.black],dashed:!0,cx:yn+(Bn-yn)/2,cy:fn+(En-fn)/2,activeEmbeddable:!1})},_t=M((0,K.iJ)(se));try{for(_t.s();!(Xe=_t.n()).done;)yt(Xe.value)}catch(Et){_t.e(Et)}finally{_t.f()}se.editingGroupId&&yt(se.editingGroupId),it.forEach(function(Et){return Ne(Ze,se,Et)})}if(Ze.save(),Ze.translate(se.scrollX,se.scrollY),re.length===1){Ze.fillStyle=l.white;var ut=(0,v.PC)(re[0],se.zoom,"mouse");!se.viewModeEnabled&&Se&&Ge(Ze,Ee,se,ut,re[0].angle)}else if(re.length>1&&!se.isRotating){var Tt=2*w/se.zoom.value;Ze.fillStyle=l.white;var Yt=(0,v.KP)(re),Zt=(0,f.Z)(Yt,4),Pt=Zt[0],en=Zt[1],tn=Zt[2],ot=Zt[3],It=Ze.getLineDash();Ze.setLineDash([2/se.zoom.value]);var mt=Ze.lineWidth;Ze.lineWidth=1/se.zoom.value,Ze.strokeStyle=Be,O(Ze,Pt-Tt,en-Tt,tn-Pt+2*Tt,ot-en+2*Tt,(Pt+tn)/2,(en+ot)/2,0),Ze.lineWidth=mt,Ze.setLineDash(It);var jt=(0,v.kK)([Pt,en,tn,ot,(Pt+tn)/2,(en+ot)/2],0,se.zoom,"mouse",dt?m.Fn:v.ox);re.some(function(Et){return!Et.locked})&&Ge(Ze,Ee,se,jt,0)}Ze.restore()}for(var xt in function(Et,Ct){if(Ct.snapLines.length){var Lt=Ct.theme==="light"||Ct.zenModeEnabled?"#ff6b6b":"#ff0000",hn=(Ct.zenModeEnabled?1.5:1)/Ct.zoom.value;Et.save(),Et.translate(Ct.scrollX,Ct.scrollY);var yn,fn=we(Ct.snapLines);try{for(fn.s();!(yn=fn.n()).done;){var Bn=yn.value;Bn.type==="pointer"?(Et.lineWidth=hn,Et.strokeStyle=Lt,D(Bn,Et,Ct)):Bn.type==="gap"?(Et.lineWidth=hn,Et.strokeStyle=Lt,z(Bn.points[0],Bn.points[1],Bn.direction,Ct,Et)):Bn.type==="points"&&(Et.lineWidth=hn,Et.strokeStyle=Lt,ce(Bn,Et,Ct))}}catch(En){fn.e(En)}finally{fn.f()}Et.restore()}}(Ze,se),Ze.restore(),Ee.remotePointerViewportCoords){var Nt=Ee.remotePointerViewportCoords[xt],Ut=Nt.x,rn=Nt.y;Ut-=se.offsetLeft,rn-=se.offsetTop;var Ft=Ut<0||Ut>We-11||rn<0||rn>Ye-14;Ut=Math.max(Ut,0),Ut=Math.min(Ut,We-11),rn=Math.max(rn,0),rn=Math.min(rn,Ye-14);var Sn=(0,P.G)(xt);Ze.save(),Ze.strokeStyle=Sn,Ze.fillStyle=Sn;var mn=Ee.remotePointerUserStates[xt],Yn=Ft||mn===T.IDLE||mn===T.AWAY;Yn&&(Ze.globalAlpha=.3),Ee.remotePointerButton&&Ee.remotePointerButton[xt]==="down"&&(Ze.beginPath(),Ze.arc(Ut,rn,15,0,2*Math.PI,!1),Ze.lineWidth=3,Ze.strokeStyle="#ffffff88",Ze.stroke(),Ze.closePath(),Ze.beginPath(),Ze.arc(Ut,rn,15,0,2*Math.PI,!1),Ze.lineWidth=1,Ze.strokeStyle=Sn,Ze.stroke(),Ze.closePath()),Ze.fillStyle=l.white,Ze.strokeStyle=l.white,Ze.lineWidth=6,Ze.lineJoin="round",Ze.beginPath(),Ze.moveTo(Ut,rn),Ze.lineTo(Ut+0,rn+14),Ze.lineTo(Ut+4,rn+9),Ze.lineTo(Ut+11,rn+8),Ze.closePath(),Ze.stroke(),Ze.fill(),Ze.fillStyle=Sn,Ze.strokeStyle=Sn,Ze.lineWidth=2,Ze.lineJoin="round",Ze.beginPath(),Yn?(Ze.moveTo(Ut-1,rn-1),Ze.lineTo(Ut-1,rn+15),Ze.lineTo(Ut+5,rn+10),Ze.lineTo(Ut+12,rn+9),Ze.closePath(),Ze.fill()):(Ze.moveTo(Ut,rn),Ze.lineTo(Ut+0,rn+14),Ze.lineTo(Ut+4,rn+9),Ze.lineTo(Ut+11,rn+8),Ze.closePath(),Ze.fill(),Ze.stroke());var ht=Ee.remotePointerUsernames[xt]||"";if(!Ft&&ht){Ze.font="600 12px sans-serif";var Xt=Ut+5.5,zt=rn+14+2,Vt=Ze.measureText(ht),Tn=Vt.actualBoundingBoxDescent+Vt.actualBoundingBoxAscent,Dn=Math.max(Tn,12),Nn=Xt-1,Xn=zt-1,jn=Vt.width+2+10+2,wt=Dn+2+6+2;Ze.roundRect?(Ze.beginPath(),Ze.roundRect(Nn,Xn,jn,wt,8),Ze.fillStyle=Sn,Ze.fill(),Ze.strokeStyle=l.white,Ze.stroke()):k(Ze,Nn,Xn,jn,wt,8,l.white),Ze.fillStyle=l.black,Ze.fillText(ht,Xt+5+1,zt+3+Vt.actualBoundingBoxAscent+Math.floor((Dn-Tn)/2)+2)}Ze.restore(),Ze.closePath()}return Ee.renderScrollbars&&(nt=(0,g.tJ)(V,We,Ye,se),Ze.save(),Ze.fillStyle=g.w1,Ze.strokeStyle="rgba(255,255,255,0.8)",[nt.horizontal,nt.vertical].forEach(function(Et){Et&&k(Ze,Et.x,Et.y,Et.width,Et.height,g.nn/2)}),Ze.restore()),{scrollBars:nt,atLeastOneVisibleElement:W.length>0,elements:V}},ve=function(s){var u=s.canvas,x=s.rc,V=s.elements,W=s.visibleElements,re=s.scale,ee=s.appState,se=s.renderConfig;if(u!==null){var Ee=se.renderGrid,_e=Ee===void 0||Ee,Ue=se.isExporting,We=q(u,re),Ye=(0,f.Z)(We,2),Ze=Ye[0],Je=Ye[1],nt=pe({canvas:u,scale:re,normalizedWidth:Ze,normalizedHeight:Je,theme:ee.theme,isExporting:Ue,viewBackgroundColor:ee.viewBackgroundColor});nt.scale(ee.zoom.value,ee.zoom.value),_e&&ee.gridSize&&function(ge,Se,Be,Xe,lt,it,yt){var _t;(function(mt){mt.Bold="#cccccc",mt.Regular="#e5e5e5"})(_t||(_t={}));var ut=-Math.round(lt.value/Se)*Se+Be%Se,Tt=-Math.round(lt.value/Se)*Se+Xe%Se,Yt=Math.min(1/lt.value,1),Zt=1/lt.value,Pt=[3*Yt,Zt+(Yt+Zt)];ge.save(),ge.lineWidth=Yt;for(var en=ut;en<ut+it+2*Se;en+=Se){var tn=Math.round(en-Be)%(5*Se)==0;ge.beginPath(),ge.setLineDash(tn?[]:Pt),ge.strokeStyle=tn?_t.Bold:_t.Regular,ge.moveTo(en,Tt-Se),ge.lineTo(en,Tt+yt+2*Se),ge.stroke()}for(var ot=Tt;ot<Tt+yt+2*Se;ot+=Se){var It=Math.round(ot-Xe)%(5*Se)==0;ge.beginPath(),ge.setLineDash(It?[]:Pt),ge.strokeStyle=It?_t.Bold:_t.Regular,ge.moveTo(ut-Se,ot),ge.lineTo(ut+it+2*Se,ot),ge.stroke()}ge.restore()}(nt,ee.gridSize,ee.scrollX,ee.scrollY,ee.zoom,Ze/ee.zoom.value,Je/ee.zoom.value);var dt=new Set;W.forEach(function(ge){ge.groupIds.length>0&&ee.frameToHighlight&&ee.selectedElementIds[ge.id]&&((0,L.cO)(ge,ee.frameToHighlight)||ge.groupIds.find(function(Se){return dt.has(Se)}))&&ge.groupIds.forEach(function(Se){return dt.add(Se)})}),W.filter(function(ge){return!(0,E.uU)(ge)}).forEach(function(ge){try{var Se;if((ge.frameId||!((Se=ee.frameToHighlight)===null||Se===void 0)&&Se.id)&&ee.frameRendering.enabled&&ee.frameRendering.clip){nt.save();var Be=(0,L.cH)(ge,ee);Be&&(0,L.Qs)(ge,V,ee)&&N(Be,nt,0,ee),(0,a.lw)(ge,x,nt,se,ee),nt.restore()}else(0,a.lw)(ge,x,nt,se,ee);Ue||Ie(ge,nt,ee)}catch(Xe){console.error(Xe)}}),W.filter(function(ge){return(0,E.uU)(ge)}).forEach(function(ge){try{var Se,Be=function(){if((0,a.lw)(ge,x,nt,se,ee),(0,A.gs)(ge)&&(Ue||!ge.validated)&&ge.width&&ge.height){var lt=(0,E.g0)(ge);(0,a.lw)(lt,x,nt,se,ee)}Ue||Ie(ge,nt,ee)};if((ge.frameId||!((Se=ee.frameToHighlight)===null||Se===void 0)&&Se.id)&&ee.frameRendering.enabled&&ee.frameRendering.clip){nt.save();var Xe=(0,L.cH)(ge,ee);Xe&&(0,L.Qs)(ge,V,ee)&&N(Xe,nt,0,ee),Be(),nt.restore()}else Be()}catch(lt){console.error(lt)}})}},ae=(0,G.hR)(function(s){var u,x=te(s);(u=s.callback)===null||u===void 0||u.call(s,x)},{trailing:!0}),H=function(s,u){if(!u){var x=te(s);return s.callback(x),x}ae(s)},le=(0,G.hR)(function(s){ve(s)},{trailing:!0}),ke=function(s,u){u?le(s):ve(s)},Le=function(){ae.cancel(),le.cancel()},Ge=function(s,u,x,V,W){Object.keys(V).forEach(function(re){var ee=V[re];if(ee!==void 0){var se=(0,f.Z)(ee,4),Ee=se[0],_e=se[1],Ue=se[2],We=se[3];s.save(),s.lineWidth=1/x.zoom.value,u.selectionColor&&(s.strokeStyle=u.selectionColor),re==="rotation"?$(s,Ee+Ue/2,_e+We/2,Ue/2):s.roundRect?(s.beginPath(),s.roundRect(Ee,_e,Ue,We,2/x.zoom.value),s.fill(),s.stroke()):O(s,Ee,_e,Ue,We,Ee+Ue/2,_e+We/2,W,!0),s.restore()}})},Ne=function(s,u,x){var V=arguments.length>3&&arguments[3]!==void 0?arguments[3]:2*w,W=x.angle,re=x.elementX1,ee=x.elementY1,se=x.elementX2,Ee=x.elementY2,_e=x.selectionColors,Ue=x.cx,We=x.cy,Ye=x.dashed,Ze=x.activeEmbeddable,Je=se-re,nt=Ee-ee,dt=V/u.zoom.value,ge=8/u.zoom.value,Se=4/u.zoom.value;s.save(),s.translate(u.scrollX,u.scrollY),s.lineWidth=(Ze?4:1)/u.zoom.value;for(var Be=_e.length,Xe=0;Xe<Be;++Xe)s.strokeStyle=_e[Xe],Ye&&s.setLineDash([ge,Se+(ge+Se)*(Be-1)]),s.lineDashOffset=(ge+Se)*Xe,O(s,re-dt,ee-dt,Je+2*dt,nt+2*dt,Ue,We,W);s.restore()},Ce=function(s,u,x){var V=Array.isArray(x)?ie:Oe;s.save(),s.translate(u.scrollX,u.scrollY),V(s,x),s.restore()},Oe=function(s,u){var x=(0,v.qf)(u),V=(0,f.Z)(x,4),W=V[0],re=V[1],ee=V[2]-W,se=V[3]-re,Ee=(0,U.fb)(u,ee,se);s.strokeStyle="rgba(0,0,0,.05)",s.lineWidth=Ee-4;var _e=2+Ee/2;switch(u.type){case"rectangle":case"text":case"image":case"embeddable":case"frame":O(s,W-_e,re-_e,ee+2*_e,se+2*_e,W+ee/2,re+se/2,u.angle);break;case"diamond":var Ue=Math.hypot(ee,se);(function(We,Ye,Ze,Je,nt,dt){We.save(),We.translate(Je,nt),We.rotate(dt),We.beginPath(),We.moveTo(0,Ze/2),We.lineTo(Ye/2,0),We.lineTo(0,-Ze/2),We.lineTo(-Ye/2,0),We.closePath(),We.stroke(),We.restore()})(s,ee+2*(_e*Ue/se),se+2*(_e*Ue/ee),W+ee/2,re+se/2,u.angle);break;case"ellipse":(function(We,Ye,Ze,Je,nt,dt){We.beginPath(),We.ellipse(Je,nt,Ye/2,Ze/2,dt,0,2*Math.PI),We.stroke()})(s,ee+2*_e,se+2*_e,W+ee/2,re+se/2,u.angle)}},De=function(s,u,x){var V=(0,v.qf)(x),W=(0,f.Z)(V,4),re=W[0],ee=W[1],se=W[2]-re,Ee=W[3]-ee;s.strokeStyle="rgb(0,118,255)",s.lineWidth=he.iG.strokeWidth/u.zoom.value,s.save(),s.translate(u.scrollX,u.scrollY),O(s,re,ee,se,Ee,re+se/2,ee+Ee/2,x.angle,!1,he.iG.radius/u.zoom.value),s.restore()},Ae=function(s,u,x){var V=x.filter(function(ee){return ee.groupIds.length===0}),W=x.filter(function(ee){return ee.groupIds.length>0}),re=function(ee){var se=(0,v.KP)(ee),Ee=(0,f.Z)(se,4),_e=Ee[0],Ue=Ee[1],We=Ee[2],Ye=Ee[3];return{angle:0,elementX1:_e,elementX2:We,elementY1:Ue,elementY2:Ye,selectionColors:["rgb(0,118,255)"],dashed:!1,cx:_e+(We-_e)/2,cy:Ue+(Ye-Ue)/2,activeEmbeddable:!1}};Object.entries((0,K.yR)(W,u)).filter(function(ee){var se=(0,f.Z)(ee,2);return se[0],se[1]}).map(function(ee){var se=(0,f.Z)(ee,2),Ee=se[0];return se[1],Ee}).map(function(ee){return function(se){var Ee=(0,K.Fb)(x,se);return re(Ee)}(ee)}).concat(V.map(function(ee){return re([ee])})).forEach(function(ee){return Ne(s,u,ee)})},ie=function(s,u){var x=(0,f.Z)(u,3),V=x[0],W=x[1],re=x[2],ee=(0,U.fb)(re,re.width,re.height);s.strokeStyle="rgba(0,0,0,0)",s.fillStyle="rgba(0,0,0,.05)",(W==="both"?[0,-1]:W==="start"?[0]:[-1]).forEach(function(se){var Ee=R._.getPointAtIndexGlobalCoordinates(V,se),_e=(0,f.Z)(Ee,2),Ue=_e[0],We=_e[1];$(s,Ue,We,ee)})},Ie=function(s,u,x){if(s.link&&!x.selectedElementIds[s.id]){var V=(0,v.qf)(s),W=(0,f.Z)(V,4),re=W[0],ee=W[1],se=W[2],Ee=W[3],_e=(0,be.sw)([re,ee,se,Ee],s.angle,x),Ue=(0,f.Z)(_e,4),We=Ue[0],Ye=Ue[1],Ze=Ue[2],Je=Ue[3],nt=We+Ze/2,dt=Ye+Je/2;if(u.save(),u.translate(x.scrollX+nt,x.scrollY+dt),u.rotate(s.angle),c&&c.zoom===x.zoom.value)u.drawImage(c,We-nt,Ye-dt,Ze,Je);else{(c=document.createElement("canvas")).zoom=x.zoom.value,c.width=Ze*window.devicePixelRatio*x.zoom.value,c.height=Je*window.devicePixelRatio*x.zoom.value;var ge=c.getContext("2d");ge.scale(window.devicePixelRatio*x.zoom.value,window.devicePixelRatio*x.zoom.value),ge.fillStyle="#fff",ge.fillRect(0,0,Ze,Je),ge.drawImage(be.rj,0,0,Ze,Je),ge.restore(),u.drawImage(c,We-nt,Ye-dt,Ze,Je)}u.restore()}},oe=function(s,u,x,V,W){var re=W.offsetX,ee=re===void 0?0:re,se=W.offsetY,Ee=se===void 0?0:se,_e=W.exportWithDarkMode,Ue=W.renderEmbeddables,We=W.frameRendering;if(x){var Ye={exportWithDarkMode:_e,renderEmbeddables:Ue,frameRendering:We};s.filter(function(Ze){return!(0,E.uU)(Ze)}).forEach(function(Ze){if(!Ze.isDeleted)try{(0,a.Rg)(Ze,u,x,V,Ze.x+ee,Ze.y+Ee,Ye)}catch(Je){console.error(Je)}}),s.filter(function(Ze){return(0,A.gs)(Ze)}).forEach(function(Ze){if(!Ze.isDeleted)try{(0,a.Rg)(Ze,u,x,V,Ze.x+ee,Ze.y+Ee,Ye)}catch(Je){console.error(Je)}})}}},457:function(fe,Q,t){var T=t(1930),j=t(8821),f=t(5169),l=t(7651),v=t(4183),k=t(6264),g=t(4643),a=function(R){return typeof R=="string"},P=function(){function R(){var K=this;(0,j.Z)(this,R),this.callbacks=new Set,this.nonDeletedElements=[],this.elements=[],this.nonDeletedFrames=[],this.frames=[],this.elementsMap=new Map,this.selectedElementsCache={selectedElementIds:null,elements:null,cache:new Map},this.addNewElement=function(U){U.frameId?K.insertElementAtIndex(U,K.getElementIndex(U.frameId)):K.replaceAllElements([].concat((0,T.Z)(K.elements),[U]))}}return(0,f.Z)(R,[{key:"getElementsIncludingDeleted",value:function(){return this.elements}},{key:"getNonDeletedElements",value:function(){return this.nonDeletedElements}},{key:"getFramesIncludingDeleted",value:function(){return this.frames}},{key:"getSelectedElements",value:function(K){var U=function(be){for(var we="",xe=0,ce=["includeBoundTextElement","includeElementsInFrames"];xe<ce.length;xe++){var D=ce[xe];we+="".concat(D,":").concat(be[D]?"1":"0")}return we}(K),m=(K==null?void 0:K.elements)||this.nonDeletedElements;if(this.selectedElementsCache.elements===m&&this.selectedElementsCache.selectedElementIds===K.selectedElementIds){var G=this.selectedElementsCache.cache.get(U);if(G)return G}else(K==null?void 0:K.elements)==null&&this.selectedElementsCache.cache.clear();var he=(0,k.eD)(m,{selectedElementIds:K.selectedElementIds},K);return(K==null?void 0:K.elements)==null&&(this.selectedElementsCache.selectedElementIds=K.selectedElementIds,this.selectedElementsCache.elements=this.nonDeletedElements,this.selectedElementsCache.cache.set(U,he)),he}},{key:"getNonDeletedFrames",value:function(){return this.nonDeletedFrames}},{key:"getElement",value:function(K){return this.elementsMap.get(K)||null}},{key:"getVersionNonce",value:function(){return this.versionNonce}},{key:"getNonDeletedElement",value:function(K){var U=this.getElement(K);return U&&(0,l.qP)(U)?U:null}},{key:"mapElements",value:function(K){var U=!1,m=this.elements.map(function(G){var he=K(G);return he!==G&&(U=!0),he});return U&&this.replaceAllElements(m),U}},{key:"replaceAllElements",value:function(K){var U=this;this.elements=K;var m=[];this.elementsMap.clear(),K.forEach(function(G){(0,v.He)(G)&&m.push(G),U.elementsMap.set(G.id,G),R.mapElementToScene(G,U)}),this.nonDeletedElements=(0,l.Lm)(this.elements),this.frames=m,this.nonDeletedFrames=(0,l.Xf)(this.frames),this.informMutation()}},{key:"informMutation",value:function(){this.versionNonce=(0,g.LU)();for(var K=0,U=Array.from(this.callbacks);K<U.length;K++)(0,U[K])()}},{key:"addCallback",value:function(K){var U=this;if(this.callbacks.has(K))throw new Error;return this.callbacks.add(K),function(){if(!U.callbacks.has(K))throw new Error;U.callbacks.delete(K)}}},{key:"destroy",value:function(){var K=this;this.nonDeletedElements=[],this.elements=[],this.nonDeletedFrames=[],this.frames=[],this.elementsMap.clear(),this.selectedElementsCache.selectedElementIds=null,this.selectedElementsCache.elements=null,this.selectedElementsCache.cache.clear(),R.sceneMapById.forEach(function(U,m){U===K&&R.sceneMapById.delete(m)}),this.callbacks.clear()}},{key:"insertElementAtIndex",value:function(K,U){if(!Number.isFinite(U)||U<0)throw new Error("insertElementAtIndex can only be called with index >= 0");var m=[].concat((0,T.Z)(this.elements.slice(0,U)),[K],(0,T.Z)(this.elements.slice(U)));this.replaceAllElements(m)}},{key:"insertElementsAtIndex",value:function(K,U){if(!Number.isFinite(U)||U<0)throw new Error("insertElementAtIndex can only be called with index >= 0");var m=[].concat((0,T.Z)(this.elements.slice(0,U)),(0,T.Z)(K),(0,T.Z)(this.elements.slice(U)));this.replaceAllElements(m)}},{key:"getElementIndex",value:function(K){return this.elements.findIndex(function(U){return U.id===K})}}],[{key:"mapElementToScene",value:function(K,U){var m=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(a(K)){if(!m)return;this.sceneMapById.set(K,U)}else this.sceneMapByElement.set(K,U),m||this.sceneMapById.set(K.id,U)}},{key:"getScene",value:function(K){return a(K)?this.sceneMapById.get(K)||null:this.sceneMapByElement.get(K)||null}}]),R}();P.sceneMapByElement=new WeakMap,P.sceneMapById=new Map,Q.Z=P},6049:function(fe,Q,t){t.d(Q,{Z:function(){return we},i:function(){return ce}});var T=t(1930),j=t(2577),f=t(7169),l=t(7651),v=t(2361),k=t(9660),g=t(9827),a=t(1493),P=t(9937),R=t(4183),K=t(1648);function U(D,ne){var S=Object.keys(D);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(D);ne&&(z=z.filter(function(A){return Object.getOwnPropertyDescriptor(D,A).enumerable})),S.push.apply(S,z)}return S}function m(D){for(var ne=1;ne<arguments.length;ne++){var S=arguments[ne]!=null?arguments[ne]:{};ne%2?U(Object(S),!0).forEach(function(z){(0,f.Z)(D,z,S[z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(D,Object.getOwnPropertyDescriptors(S)):U(Object(S)).forEach(function(z){Object.defineProperty(D,z,Object.getOwnPropertyDescriptor(S,z))})}return D}var G=function(D){return[8,8+D]},he=function(D){return[1.5,6+D]};function be(D){var ne=D.roughness,S=Math.max(D.width,D.height),z=Math.min(D.width,D.height);return z>=20&&S>=50||z>=15&&D.roundness&&(0,K.sh)(D.type)||(0,R.bt)(D)&&S>=50?ne:Math.min(ne/(S<10?3:2),2.5)}var we=function(D){var ne=arguments.length>1&&arguments[1]!==void 0&&arguments[1],S={seed:D.seed,strokeLineDash:D.strokeStyle==="dashed"?G(D.strokeWidth):D.strokeStyle==="dotted"?he(D.strokeWidth):void 0,disableMultiStroke:D.strokeStyle!=="solid",strokeWidth:D.strokeStyle!=="solid"?D.strokeWidth+.5:D.strokeWidth,fillWeight:D.strokeWidth/2,hachureGap:4*D.strokeWidth,roughness:be(D),stroke:D.strokeColor,preserveVertices:ne||D.roughness<P.$h.cartoonist};switch(D.type){case"rectangle":case"embeddable":case"diamond":case"ellipse":return S.fillStyle=D.fillStyle,S.fill=(0,g.Qm)(D.backgroundColor)?void 0:D.backgroundColor,D.type==="ellipse"&&(S.curveFitting=1),S;case"line":case"freedraw":return(0,v.g6)(D.points)&&(S.fillStyle=D.fillStyle,S.fill=D.backgroundColor==="transparent"?void 0:D.backgroundColor),S;case"arrow":return S;default:throw new Error("Unimplemented type ".concat(D.type))}},xe=function(D,ne){return D.type==="embeddable"&&(ne||!D.validated)&&(0,g.Qm)(D.backgroundColor)&&(0,g.Qm)(D.strokeColor)?m(m({},D),{},{roughness:0,backgroundColor:"#d3d3d3",fillStyle:"solid"}):D},ce=function(D,ne){var S=arguments.length>2&&arguments[2]!==void 0&&arguments[2];switch(D.type){case"rectangle":case"embeddable":var z;if(D.roundness){var A=D.width,E=D.height,L=(0,v.yW)(Math.min(A,E),D);z=ne.path("M ".concat(L," 0 L ").concat(A-L," 0 Q ").concat(A," 0, ").concat(A," ").concat(L," L ").concat(A," ").concat(E-L," Q ").concat(A," ").concat(E,", ").concat(A-L," ").concat(E," L ").concat(L," ").concat(E," Q 0 ").concat(E,", 0 ").concat(E-L," L 0 ").concat(L," Q 0 0, ").concat(L," 0"),we(xe(D,S),!0))}else z=ne.rectangle(0,0,D.width,D.height,we(xe(D,S),!1));return z;case"diamond":var h,y=(0,l.UC)(D),r=(0,j.Z)(y,8),M=r[0],p=r[1],c=r[2],w=r[3],O=r[4],$=r[5],I=r[6],C=r[7];if(D.roundness){var _=(0,v.yW)(Math.abs(M-I),D),N=(0,v.yW)(Math.abs(w-p),D);h=ne.path("M ".concat(M+_," ").concat(p+N," L ").concat(c-_," ").concat(w-N,`
|
|
148
|
+
C `).concat(c," ").concat(w,", ").concat(c," ").concat(w,", ").concat(c-_," ").concat(w+N,`
|
|
149
|
+
L `).concat(O+_," ").concat($-N,`
|
|
150
|
+
C `).concat(O," ").concat($,", ").concat(O," ").concat($,", ").concat(O-_," ").concat($-N,`
|
|
151
|
+
L `).concat(I+_," ").concat(C+N,`
|
|
152
|
+
C `).concat(I," ").concat(C,", ").concat(I," ").concat(C,", ").concat(I+_," ").concat(C-N,`
|
|
153
|
+
L `).concat(M-_," ").concat(p+N,`
|
|
154
|
+
C `).concat(M," ").concat(p,", ").concat(M," ").concat(p,", ").concat(M+_," ").concat(p+N),we(D,!0))}else h=ne.polygon([[M,p],[c,w],[O,$],[I,C]],we(D));return h;case"ellipse":var q=ne.ellipse(D.width/2,D.height/2,D.width,D.height,we(D));return q;case"line":case"arrow":var pe,te=we(D),ve=D.points.length?D.points:[[0,0]];if(pe=D.roundness?[ne.curve(ve,te)]:te.fill?[ne.polygon(ve,te)]:[ne.linearPath(ve,te)],D.type==="arrow"){var ae=D.startArrowhead,H=ae===void 0?null:ae,le=D.endArrowhead,ke=le===void 0?"arrow":le,Le=function(Ie,oe,s,u){var x=(0,l.Y5)(Ie,oe,s,u);if(x===null)return[];if(u==="dot"){var V=(0,j.Z)(x,3),W=V[0],re=V[1],ee=V[2];return[ne.circle(W,re,ee,m(m({},te),{},{fill:Ie.strokeColor,fillStyle:"solid",stroke:"none"}))]}if(u==="triangle"){var se=(0,j.Z)(x,6),Ee=se[0],_e=se[1],Ue=se[2],We=se[3],Ye=se[4],Ze=se[5];return delete te.strokeLineDash,[ne.polygon([[Ee,_e],[Ue,We],[Ye,Ze],[Ee,_e]],m(m({},te),{},{fill:Ie.strokeColor,fillStyle:"solid"}))]}var Je=(0,j.Z)(x,6),nt=Je[0],dt=Je[1],ge=Je[2],Se=Je[3],Be=Je[4],Xe=Je[5];if(Ie.strokeStyle==="dotted"){var lt=he(Ie.strokeWidth-1);te.strokeLineDash=[lt[0],lt[1]-1]}else delete te.strokeLineDash;return[ne.line(ge,Se,nt,dt,te),ne.line(Be,Xe,nt,dt,te)]};if(H!==null){var Ge,Ne=Le(D,pe,"start",H);(Ge=pe).push.apply(Ge,(0,T.Z)(Ne))}if(ke!==null){var Ce,Oe=Le(D,pe,"end",ke);(Ce=pe).push.apply(Ce,(0,T.Z)(Oe))}}return pe;case"freedraw":var De;if((0,k.Lc)(D),(0,v.g6)(D.points)){var Ae=(0,a.og)(D.points,.75);De=ne.curve(Ae,m(m({},we(D)),{},{stroke:"none"}))}else De=null;return De;case"frame":case"text":case"image":var ie=null;return ie;default:return(0,g.vE)(D,"generateElementShape(): Unimplemented type ".concat(D==null?void 0:D.type)),null}}},2921:function(fe,Q,t){t.d(Q,{R:function(){return k}});var T=t(5169),j=t(8821),f=t(8128),l=t(9660),v=t(6049),k=(0,T.Z)(function g(){(0,j.Z)(this,g)});k.rg=new f.V,k.cache=new WeakMap,k.get=function(g){return k.cache.get(g)},k.set=function(g,a){return k.cache.set(g,a)},k.delete=function(g){return k.cache.delete(g)},k.destroy=function(){k.cache=new WeakMap},k.generateElementShape=function(g){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1],P=a?void 0:k.get(g);if(P!==void 0)return P;l.Xx.delete(g);var R=(0,v.i)(g,k.rg,a);return k.cache.set(g,R),R}},1648:function(fe,Q,t){t.d(Q,{$b:function(){return j},CJ:function(){return P},M9:function(){return v},PD:function(){return f},QG:function(){return a},Un:function(){return g},Zd:function(){return l},sh:function(){return k}});var T=t(4183),j=function(R){return R==="rectangle"||R==="embeddable"||R==="ellipse"||R==="diamond"||R==="line"||R==="freedraw"},f=function(R){return R!=="image"&&R!=="frame"},l=function(R){return R==="rectangle"||R==="embeddable"||R==="ellipse"||R==="diamond"||R==="freedraw"||R==="arrow"||R==="line"},v=function(R){return R==="rectangle"||R==="embeddable"||R==="ellipse"||R==="diamond"||R==="arrow"||R==="line"},k=function(R){return R==="rectangle"||R==="embeddable"||R==="arrow"||R==="line"||R==="diamond"},g=function(R){return R==="arrow"},a=function(R,K){for(var U=null,m=R.length-1;m>=0;--m){var G=R[m];if(!G.isDeleted&&K(G)){U=G;break}}return U},P=function(R,K){var U=[];return R.filter(function(m){return!(m.isDeleted||!K(m))&&(!(0,T.gs)(m)||(U.push(m),!1))}).concat(U)}},3668:function(fe,Q,t){t.d(Q,{$D:function(){return y},Cg:function(){return M},NL:function(){return h}});var T=t(7169),j=t(2577),f=t(8950),l=t(2975),v=t.n(l),k=t(9845),g=t(4949),a=t(7766),P=t(9827),R=t(9937),K=t(6853),U=t(4419),m=t(4178),G=t(6013),he=t(4682),be=t(7651),we=t(583),xe=t(457);function ce(p,c){var w=Object.keys(p);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(p);c&&(O=O.filter(function($){return Object.getOwnPropertyDescriptor(p,$).enumerable})),w.push.apply(w,O)}return w}function D(p){for(var c=1;c<arguments.length;c++){var w=arguments[c]!=null?arguments[c]:{};c%2?ce(Object(w),!0).forEach(function(O){(0,T.Z)(p,O,w[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(w)):ce(Object(w)).forEach(function(O){Object.defineProperty(p,O,Object.getOwnPropertyDescriptor(w,O))})}return p}function ne(p,c){var w=typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(!w){if(Array.isArray(p)||(w=function(N,q){if(N){if(typeof N=="string")return S(N,q);var pe=Object.prototype.toString.call(N).slice(8,-1);if(pe==="Object"&&N.constructor&&(pe=N.constructor.name),pe==="Map"||pe==="Set")return Array.from(N);if(pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(pe))return S(N,q)}}(p))||c){w&&(p=w);var O=0,$=function(){};return{s:$,n:function(){return O>=p.length?{done:!0}:{done:!1,value:p[O++]}},e:function(N){throw N},f:$}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
155
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var I,C=!0,_=!1;return{s:function(){w=w.call(p)},n:function(){var N=w.next();return C=N.done,N},e:function(N){_=!0,I=N},f:function(){try{C||w.return==null||w.return()}finally{if(_)throw I}}}}function S(p,c){(c==null||c>p.length)&&(c=p.length);for(var w=0,O=new Array(c);w<c;w++)O[w]=p[w];return O}var z=function(p){var c=new xe.Z;return c.replaceAllElements((0,P.xU)(p),!1),c},A=function(p,c){if(p.width<=c)return p;var w=document.createElement("canvas").getContext("2d");w.font=(0,P.mO)({fontFamily:p.fontFamily,fontSize:p.fontSize});var O=p.text;if(w.measureText(O).width>c)for(var $=O.length;$>0;$--){var I="".concat(O.slice(0,$),"...");if(w.measureText(I).width<=c){O=I;break}}return(0,we.BE)(p,{text:O,width:c})},E=function(p,c){return c=c||(0,K.im)().frameRendering,{enabled:!!p||c.enabled,outline:!p&&c.outline,name:!p&&c.name,clip:!!p||c.clip}},L=function(p){var c=p.elements,w=p.exportingFrame,O=p.frameRendering,$=p.exportWithDarkMode;return w?(0,G.Xs)({elements:c,bounds:w,type:"overlap"}):O.enabled&&O.name?function(I,C){var _,N=[],q=0,pe=ne(I);try{for(pe.s();!(_=pe.n()).done;){var te=_.value;if((0,be.He)(te)){q++;var ve=(0,be.VL)({x:te.x,y:te.y-R.iG.nameOffsetY,fontFamily:R.ut.Assistant,fontSize:R.iG.nameFontSize,lineHeight:R.iG.nameLineHeight,strokeColor:C.exportWithDarkMode?R.iG.nameColorDarkTheme:R.iG.nameColorLightTheme,text:te.name||"Frame ".concat(q)});ve.y-=ve.height,ve=A(ve,te.width),N.push(ve)}N.push(te)}}catch(ae){pe.e(ae)}finally{pe.f()}return N}(c,{exportWithDarkMode:$}):c},h=function(){var p=(0,f.Z)(v().mark(function c(w,O,$,I){var C,_,N,q,pe,te,ve,ae,H,le,ke,Le,Ge,Ne,Ce,Oe,De,Ae,ie,Ie,oe,s,u,x=arguments;return v().wrap(function(V){for(;;)switch(V.prev=V.next){case 0:return _=I.exportBackground,N=I.exportPadding,q=N===void 0?R.qy:N,pe=I.viewBackgroundColor,te=I.exportingFrame,ve=x.length>4&&x[4]!==void 0?x[4]:function(W,re){var ee=document.createElement("canvas");return ee.width=W*O.exportScale,ee.height=re*O.exportScale,{canvas:ee,scale:O.exportScale}},ae=z(w),w=ae.getNonDeletedElements(),H=E(te??null,(C=O.frameRendering)!==null&&C!==void 0?C:null),le=L({elements:w,exportingFrame:te,exportWithDarkMode:O.exportWithDarkMode,frameRendering:H}),te&&(q=0),ke=r(te?[te]:(0,he._h)(le),q),Le=(0,j.Z)(ke,4),Ge=Le[0],Ne=Le[1],Ce=Le[2],Oe=Le[3],De=ve(Ce,Oe),Ae=De.canvas,ie=De.scale,Ie=ie===void 0?1:ie,oe=(0,K.im)(),V.next=12,(0,m.Xx)({imageCache:new Map,fileIds:(0,m.oA)(le).map(function(W){return W.fileId}),files:$});case 12:return s=V.sent,u=s.imageCache,(0,a.AW)({canvas:Ae,rc:k.Z.canvas(Ae),elements:le,visibleElements:le,scale:Ie,appState:D(D({},O),{},{frameRendering:H,viewBackgroundColor:_?pe:null,scrollX:-Ge+q,scrollY:-Ne+q,zoom:oe.zoom,shouldCacheIgnoreZoom:!1,theme:O.exportWithDarkMode?"dark":"light"}),renderConfig:{imageCache:u,renderGrid:!1,isExporting:!0}}),ae.destroy(),V.abrupt("return",Ae);case 17:case"end":return V.stop()}},c)}));return function(c,w,O,$){return p.apply(this,arguments)}}(),y=function(){var p=(0,f.Z)(v().mark(function c(w,O,$,I){var C,_,N,q,pe,te,ve,ae,H,le,ke,Le,Ge,Ne,Ce,Oe,De,Ae,ie,Ie,oe,s,u,x,V,W,re,ee,se,Ee,_e,Ue,We,Ye,Ze,Je,nt,dt,ge,Se,Be,Xe,lt;return v().wrap(function(it){for(;;)switch(it.prev=it.next){case 0:if(q=z(w),w=q.getNonDeletedElements(),pe=E((C=I==null?void 0:I.exportingFrame)!==null&&C!==void 0?C:null,(_=O.frameRendering)!==null&&_!==void 0?_:null),te=O.exportPadding,ve=te===void 0?R.qy:te,ae=O.exportWithDarkMode,H=ae!==void 0&&ae,le=O.viewBackgroundColor,ke=O.exportScale,Le=ke===void 0?1:ke,Ge=O.exportEmbedScene,Ne=(I||{}).exportingFrame,Oe=L({elements:w,exportingFrame:Ce=Ne===void 0?null:Ne,exportWithDarkMode:H,frameRendering:pe}),Ce&&(ve=0),De="",!Ge){it.next=20;break}return it.prev=9,it.next=12,Promise.resolve().then(t.bind(t,250));case 12:return it.next=14,it.sent.encodeSvgMetadata({text:(0,U.I_)(w,O,$||{},"local")});case 14:De=it.sent,it.next=20;break;case 17:it.prev=17,it.t0=it.catch(9),console.error(it.t0);case 20:Ae=r(Ce?[Ce]:(0,he._h)(Oe),ve),ie=(0,j.Z)(Ae,4),Ie=ie[0],oe=ie[1],s=ie[2],u=ie[3],(x=document.createElementNS(R.hR,"svg")).setAttribute("version","1.1"),x.setAttribute("xmlns",R.hR),x.setAttribute("viewBox","0 0 ".concat(s," ").concat(u)),x.setAttribute("width","".concat(s*Le)),x.setAttribute("height","".concat(u*Le)),H&&x.setAttribute("filter",R.ZF),V="https://excalidraw.com/",V=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat({VITE_APP_BACKEND_V2_GET_URL:"https://json.excalidraw.com/api/v2/",VITE_APP_BACKEND_V2_POST_URL:"https://json.excalidraw.com/api/v2/post/",VITE_APP_LIBRARY_URL:"https://libraries.excalidraw.com",VITE_APP_LIBRARY_BACKEND:"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries",VITE_APP_PORTAL_URL:"https://portal.excalidraw.com",VITE_APP_PLUS_LP:"https://plus.excalidraw.com",VITE_APP_PLUS_APP:"https://app.excalidraw.com",VITE_APP_WS_SERVER_URL:"",VITE_APP_FIREBASE_CONFIG:'{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}',VITE_APP_DISABLE_TRACKING:"",VITE_PKG_NAME:"@excalidraw/excalidraw",VITE_PKG_VERSION:"0.17.6",VITE_IS_EXCALIDRAW_NPM_PACKAGE:!0}.PKG_VERSION),(W=V)!==null&&W!==void 0&&W.startsWith("/")&&(V=V.replace("/","".concat(window.location.origin,"/"))),V="".concat(V,"/dist/excalidraw-assets/"),re=-Ie+ve,ee=-oe+ve,se=(0,he.wO)(w),Ee="",_e=ne(se);try{for(_e.s();!(Ue=_e.n()).done;)We=Ue.value,Ye=(0,g.qf)(We),Ze=(0,j.Z)(Ye,4),Je=Ze[0],nt=Ze[1],dt=Ze[2],ge=Ze[3],Se=(dt-Je)/2-(We.x-Je),Be=(ge-nt)/2-(We.y-nt),Ee+="<clipPath id=".concat(We.id,`>
|
|
156
|
+
<rect transform="translate(`).concat(We.x+re," ").concat(We.y+ee,") rotate(").concat(We.angle," ").concat(Se," ").concat(Be,`)"
|
|
157
|
+
width="`).concat(We.width,`"
|
|
158
|
+
height="`).concat(We.height,`"
|
|
159
|
+
>
|
|
160
|
+
</rect>
|
|
161
|
+
</clipPath>`)}catch(yt){_e.e(yt)}finally{_e.f()}return x.innerHTML=`
|
|
162
|
+
`.concat("<!-- svg-source:excalidraw -->",`
|
|
163
|
+
`).concat(De,`
|
|
164
|
+
<defs>
|
|
165
|
+
<style class="style-fonts">
|
|
166
|
+
@font-face {
|
|
167
|
+
font-family: "Virgil";
|
|
168
|
+
src: url("`).concat(V,`Virgil.woff2");
|
|
169
|
+
}
|
|
170
|
+
@font-face {
|
|
171
|
+
font-family: "Cascadia";
|
|
172
|
+
src: url("`).concat(V,`Cascadia.woff2");
|
|
173
|
+
}
|
|
174
|
+
@font-face {
|
|
175
|
+
font-family: "Assistant";
|
|
176
|
+
src: url("`).concat(V,`Assistant-Regular.woff2");
|
|
177
|
+
}
|
|
178
|
+
</style>
|
|
179
|
+
`).concat(Ee,`
|
|
180
|
+
</defs>
|
|
181
|
+
`),O.exportBackground&&le&&((Xe=x.ownerDocument.createElementNS(R.hR,"rect")).setAttribute("x","0"),Xe.setAttribute("y","0"),Xe.setAttribute("width","".concat(s)),Xe.setAttribute("height","".concat(u)),Xe.setAttribute("fill",le),x.appendChild(Xe)),lt=k.Z.svg(x),(0,a.M_)(Oe,lt,x,$||{},{offsetX:re,offsetY:ee,exportWithDarkMode:H,renderEmbeddables:(N=I==null?void 0:I.renderEmbeddables)!==null&&N!==void 0&&N,frameRendering:pe}),q.destroy(),it.abrupt("return",x);case 42:case"end":return it.stop()}},c,null,[[9,17]])}));return function(c,w,O,$){return p.apply(this,arguments)}}(),r=function(p,c){var w=(0,g.KP)(p),O=(0,j.Z)(w,4),$=O[0],I=O[1],C=O[2],_=O[3];return[$,I,(0,P.TE)($,C)+2*c,(0,P.TE)(I,_)+2*c]},M=function(p,c,w){var O=r(p,c).map(function(I){return Math.trunc(I*w)}),$=(0,j.Z)(O,4);return[$[2],$[3]]}},4105:function(fe,Q,t){t.d(Q,{$b:function(){return l.$b},CJ:function(){return l.CJ},M9:function(){return l.M9},N:function(){return j.N},PR:function(){return j.PR},QG:function(){return l.QG},Un:function(){return l.Un},W:function(){return f.W},Yp:function(){return j.Yp},Zd:function(){return l.Zd},Zs:function(){return j.Zs},_4:function(){return T._4},eD:function(){return j.eD},j:function(){return v.j},sh:function(){return l.sh}});var T=t(4726),j=t(6264),f=t(2382),l=t(1648),v=t(4116)},2382:function(fe,Q,t){t.d(Q,{W:function(){return v},s:function(){return l}});var T=t(2577),j=t(7651),f=t(9827),l=function(k){var g=k.scenePoint,a=k.viewportDimensions,P=k.zoom;return{scrollX:a.width/2/P.value-g.x,scrollY:a.height/2/P.value-g.y}},v=function(k,g){if(!(k=(0,j.n_)(k)).length)return{scrollX:0,scrollY:0};var a=(0,j.KP)(k),P=(0,T.Z)(a,4),R=P[0],K=P[1],U=P[2],m=P[3];if(function(be,we){var xe=(0,T.Z)(we,4),ce=xe[0],D=xe[1],ne=xe[2],S=xe[3],z=(0,f._i)({sceneX:ce,sceneY:D},be),A=z.x,E=z.y,L=(0,f._i)({sceneX:ne,sceneY:S},be),h=L.x,y=L.y;return h-A>be.width||y-E>be.height}(g,[R,K,U,m])){var G=(0,j.os)(k,(0,f.dE)({clientX:g.scrollX,clientY:g.scrollY},g)),he=(0,T.Z)(G,4);R=he[0],K=he[1],U=he[2],m=he[3]}return l({scenePoint:{x:(R+U)/2,y:(K+m)/2},viewportDimensions:{width:g.width,height:g.height},zoom:g.zoom})}},4726:function(fe,Q,t){t.d(Q,{WM:function(){return v},_4:function(){return P},nn:function(){return k},tJ:function(){return a},w1:function(){return g}});var T=t(2577),j=t(7651),f=t(9827),l=t(8227),v=4,k=6,g="rgba(0,0,0,0.3)",a=function(R,K,U,m){if(R.length===0)return{horizontal:null,vertical:null};var G=(0,j.KP)(R),he=(0,T.Z)(G,4),be=he[0],we=he[1],xe=he[2],ce=he[3],D=K/m.zoom.value,ne=U/m.zoom.value,S=K-D,z=U-ne,A={top:parseInt((0,f.IH)("sat"))||0,bottom:parseInt((0,f.IH)("sab"))||0,left:parseInt((0,f.IH)("sal"))||0,right:parseInt((0,f.IH)("sar"))||0},E=(0,l.G3)().rtl,L=-m.scrollX+S/2+A.left,h=-m.scrollY+z/2+A.top,y=L+D-A.right,r=h+ne-A.bottom,M=Math.min(be,L),p=Math.min(we,h),c=Math.max(xe,y),w=Math.max(ce,r);return{horizontal:L===M&&y===c?null:{x:Math.max(A.left,v)+(L-M)/(c-M)*K,y:U-k-Math.max(v,A.bottom),width:(y-L)/(c-M)*K-Math.max(2*v,A.left+A.right),height:k},vertical:h===p&&r===w?null:{x:E?Math.max(A.left,v):K-k-Math.max(A.right,v),y:(h-p)/(w-p)*U+Math.max(A.top,v),width:k,height:(r-h)/(w-p)*U-Math.max(2*v,A.top+A.bottom)}}},P=function(R,K,U){var m=[R.horizontal,R.vertical].map(function(we){return we!=null&&we.x<=K&&K<=we.x+we.width&&we.y<=U&&U<=we.y+we.height}),G=(0,T.Z)(m,2),he=G[0],be=G[1];return{isOverEither:he||be,isOverHorizontal:he,isOverVertical:be}}},6264:function(fe,Q,t){t.d(Q,{CF:function(){return m},N:function(){return G},Oh:function(){return xe},PR:function(){return he},Yp:function(){return U},Zs:function(){return we},aI:function(){return K},eD:function(){return be}});var T,j,f,l,v=t(2577),k=t(7651),g=t(4183),a=t(4682),P=t(9827),R=t(7935),K=function(ce){var D=new Set;return ce.forEach(function(ne){ne.type==="frame"&&D.add(ne.id)}),ce.filter(function(ne){return!ne.frameId||!D.has(ne.frameId)})},U=function(ce,D){var ne=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],S=(0,k.qf)(D),z=(0,v.Z)(S,4),A=z[0],E=z[1],L=z[2],h=z[3],y=ce.filter(function(r){var M=(0,k.Pi)(r),p=(0,v.Z)(M,4),c=p[0],w=p[1],O=p[2],$=p[3],I=(0,a.$Z)(r);if(I){var C=(0,k.Pi)(I),_=(0,v.Z)(C,4),N=_[0],q=_[1],pe=_[2],te=_[3];c=Math.max(N,c),w=Math.max(q,w),O=Math.min(pe,O),$=Math.min(te,$)}return r.locked===!1&&r.type!=="selection"&&!(0,g.Xh)(r)&&A<=c&&E<=w&&L>=O&&h>=$});return y=(y=ne?K(y):y).filter(function(r){var M=(0,a.$Z)(r);return!M||(0,a.cO)(r,M)})},m=function(ce,D,ne){var S=new Set(D.map(function(z){return z.id}));return ce.filter(function(z){var A=(0,R.PZ)(z,ne.width,ne.height,ne);return!S.has(z.id)&&A})},G=(T=null,j=null,f=null,(l=function(ce,D){return f!=null&&ce===T&&D.selectedElementIds===j||(f=ce.some(function(ne){return D.selectedElementIds[ne.id]}),T=ce,j=D.selectedElementIds),f}).clearCache=function(){T=null,j=null,f=null},l),he=function(ce,D,ne){var S=Array.from(new Set(be(ce,D).map(function(z){return ne(z)})));return S.length===1?S[0]:null},be=function(ce,D,ne){var S=ce.filter(function(A){return D.selectedElementIds[A.id]||ne!=null&&ne.includeBoundTextElement&&(0,g.Xh)(A)&&D.selectedElementIds[A==null?void 0:A.containerId]?A:null});if(ne!=null&&ne.includeElementsInFrames){var z=[];return S.forEach(function(A){A.type==="frame"&&(0,a.zD)(ce,A.id).forEach(function(E){return z.push(E)}),z.push(A)}),z}return S},we=function(ce,D){return D.editingElement?[D.editingElement]:be(ce,D,{includeBoundTextElement:!0})},xe=function(ce,D){return(0,P.w8)(D.selectedElementIds,ce)?D.selectedElementIds:ce}},4116:function(fe,Q,t){t.d(Q,{E:function(){return f},j:function(){return j}});var T=t(9937),j=function(l){return Math.max(T.Zj,Math.min(l,30))},f=function(l,v){var k=l.viewportX,g=l.viewportY,a=l.nextZoom,P=k-v.offsetLeft,R=g-v.offsetTop,K=v.zoom.value;return{scrollX:v.scrollX+(P-P/K)+-(P-P/a),scrollY:v.scrollY+(R-R/K)+-(R-R/a),zoom:{value:a}}}},9827:function(fe,Q,t){t.d(Q,{$9:function(){return te},$g:function(){return D},$h:function(){return Oe},AK:function(){return I},B4:function(){return L},C3:function(){return le},Ds:function(){return S},FG:function(){return C},Fc:function(){return G},G3:function(){return H},G9:function(){return u},HP:function(){return s},I4:function(){return Le},IH:function(){return w},Ip:function(){return ve},Mj:function(){return Ie},Om:function(){return r},Oo:function(){return he},Qm:function(){return q},TE:function(){return y},Vv:function(){return A},XF:function(){return x},_Z:function(){return we},_i:function(){return c},ag:function(){return Ne},cx:function(){return _},dE:function(){return p},dZ:function(){return $},h2:function(){return Ge},hR:function(){return z},mO:function(){return ne},qr:function(){return N},qz:function(){return ae},s:function(){return ce},tH:function(){return pe},uY:function(){return M},v4:function(){return Ce},vE:function(){return oe},w8:function(){return ie},wO:function(){return be},xU:function(){return V},xn:function(){return ke},xp:function(){return Ae},y1:function(){return xe},y8:function(){return De},yo:function(){return h}});var T=t(6655),j=t(7169),f=t(1930),l=t(2577),v=t(9240),k=t(9937),g=t(5156),a=t(9787),P=t.n(a);function R(W,re){var ee=typeof Symbol<"u"&&W[Symbol.iterator]||W["@@iterator"];if(!ee){if(Array.isArray(W)||(ee=function(Ye,Ze){if(Ye){if(typeof Ye=="string")return K(Ye,Ze);var Je=Object.prototype.toString.call(Ye).slice(8,-1);if(Je==="Object"&&Ye.constructor&&(Je=Ye.constructor.name),Je==="Map"||Je==="Set")return Array.from(Ye);if(Je==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Je))return K(Ye,Ze)}}(W))||re){ee&&(W=ee);var se=0,Ee=function(){};return{s:Ee,n:function(){return se>=W.length?{done:!0}:{done:!1,value:W[se++]}},e:function(Ye){throw Ye},f:Ee}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
182
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var _e,Ue=!0,We=!1;return{s:function(){ee=ee.call(W)},n:function(){var Ye=ee.next();return Ue=Ye.done,Ye},e:function(Ye){We=!0,_e=Ye},f:function(){try{Ue||ee.return==null||ee.return()}finally{if(We)throw _e}}}}function K(W,re){(re==null||re>W.length)&&(re=W.length);for(var ee=0,se=new Array(re);ee<re;ee++)se[ee]=W[ee];return se}function U(W,re){var ee=Object.keys(W);if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(W);re&&(se=se.filter(function(Ee){return Object.getOwnPropertyDescriptor(W,Ee).enumerable})),ee.push.apply(ee,se)}return ee}function m(W){for(var re=1;re<arguments.length;re++){var ee=arguments[re]!=null?arguments[re]:{};re%2?U(Object(ee),!0).forEach(function(se){(0,j.Z)(W,se,ee[se])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(ee)):U(Object(ee)).forEach(function(se){Object.defineProperty(W,se,Object.getOwnPropertyDescriptor(ee,se))})}return W}var G=function(){var W=new Date,re=W.getFullYear(),ee="".concat(W.getMonth()+1).padStart(2,"0"),se="".concat(W.getDate()).padStart(2,"0"),Ee="".concat(W.getHours()).padStart(2,"0"),_e="".concat(W.getMinutes()).padStart(2,"0");return"".concat(re,"-").concat(ee,"-").concat(se,"-").concat(Ee).concat(_e)},he=function(W){return W.charAt(0).toUpperCase()+W.slice(1)},be=function(W){return W instanceof HTMLElement&&W.className.includes("ToolIcon")},we=function(W){return W instanceof HTMLElement&&W.dataset.type==="wysiwyg"||W instanceof HTMLBRElement||W instanceof HTMLInputElement||W instanceof HTMLTextAreaElement||W instanceof HTMLSelectElement},xe=function(W){return we(W)||W instanceof Element&&!!W.closest("label, button")},ce=function(W){return W instanceof HTMLElement&&W.dataset.type==="wysiwyg"||W instanceof HTMLBRElement||W instanceof HTMLTextAreaElement||W instanceof HTMLInputElement&&(W.type==="text"||W.type==="number")},D=function(W){for(var re=W.fontFamily,ee=0,se=Object.entries(k.ut);ee<se.length;ee++){var Ee=(0,l.Z)(se[ee],2),_e=Ee[0];if(Ee[1]===re)return"".concat(_e,", ").concat(k._D)}return k._D},ne=function(W){var re=W.fontSize,ee=W.fontFamily;return"".concat(re,"px ").concat(D({fontFamily:ee}))},S=function(W,re){var ee=0,se=null,Ee=function(){for(var _e=arguments.length,Ue=new Array(_e),We=0;We<_e;We++)Ue[We]=arguments[We];se=Ue,clearTimeout(ee),ee=window.setTimeout(function(){se=null,W.apply(void 0,Ue)},re)};return Ee.flush=function(){if(clearTimeout(ee),se){var _e=se;se=null,W.apply(void 0,(0,f.Z)(_e))}},Ee.cancel=function(){se=null,clearTimeout(ee)},Ee},z=function(W,re){var ee=null,se=null,Ee=null,_e=function We(Ye){ee=window.requestAnimationFrame(function(){ee=null,W.apply(void 0,(0,f.Z)(Ye)),se=null,Ee&&(se=Ee,Ee=null,We(se))})},Ue=function(){for(var We=arguments.length,Ye=new Array(We),Ze=0;Ze<We;Ze++)Ye[Ze]=arguments[Ze];se=Ye,ee===null?_e(se):re!=null&&re.trailing&&(Ee=Ye)};return Ue.flush=function(){ee!==null&&(cancelAnimationFrame(ee),ee=null),se&&(W.apply(void 0,(0,f.Z)(Ee||se)),se=Ee=null)},Ue.cancel=function(){se=Ee=null,ee!==null&&(cancelAnimationFrame(ee),ee=null)},Ue},A=function(W){return 1-Math.pow(1-W,4)},E=function(W,re,ee){return(re-W)*A(ee)+W},L=function(W){var re,ee=W.fromValues,se=W.toValues,Ee=W.onStep,_e=W.duration,Ue=_e===void 0?250:_e,We=W.interpolateValue,Ye=W.onStart,Ze=W.onEnd,Je=W.onCancel,nt=!1,dt=0;return dt=window.requestAnimationFrame(function ge(Se){if(!nt){re===void 0&&(re=Se,Ye==null||Ye());var Be=Math.min(Se-re,Ue),Xe=A(Be/Ue),lt={};if(Object.keys(ee).forEach(function(_t){var ut=_t,Tt=(se[ut]-ee[ut])*Xe+ee[ut];lt[ut]=Tt}),Ee(lt),Be<Ue){var it=Be/Ue,yt={};Object.keys(ee).forEach(function(_t){var ut,Tt=_t,Yt=ee[Tt],Zt=se[Tt];(ut=We?We(Yt,Zt,it,Tt):E(Yt,Zt,it))==null&&(ut=E(Yt,Zt,it)),yt[Tt]=ut}),Ee(yt),dt=window.requestAnimationFrame(ge)}else Ee(se),Ze==null||Ze()}}),function(){Je==null||Je(),nt=!0,window.cancelAnimationFrame(dt)}},h=function(W,re){if(!W.length||re<1)return[];for(var ee=0,se=0,Ee=Array(Math.ceil(W.length/re));ee<W.length;)Ee[se++]=W.slice(ee,ee+=re);return Ee},y=function(W,re){return Math.abs(W-re)},r=function(W,re){var ee,se;return re.type==="custom"?m(m({},W.activeTool),{},{type:"custom",customType:re.customType,locked:(se=re.locked)!==null&&se!==void 0?se:W.activeTool.locked}):m(m({},W.activeTool),{},{lastActiveTool:re.lastActiveToolBeforeEraser===void 0?W.activeTool.lastActiveTool:re.lastActiveToolBeforeEraser,type:re.type,customType:null,locked:(ee=re.locked)!==null&&ee!==void 0?ee:W.activeTool.locked})},M=function(W){return W=W.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter"),k.Um?W.replace(/\bCtrlOrCmd\b/gi,"Cmd").replace(/\bAlt\b/i,"Option"):W.replace(/\bCtrlOrCmd\b/gi,"Ctrl")},p=function(W,re){var ee=W.clientX,se=W.clientY,Ee=re.zoom,_e=re.offsetLeft,Ue=re.offsetTop,We=re.scrollX,Ye=re.scrollY;return{x:(ee-_e)/Ee.value-We,y:(se-Ue)/Ee.value-Ye}},c=function(W,re){var ee=W.sceneX,se=W.sceneY,Ee=re.zoom,_e=re.offsetLeft,Ue=re.offsetTop,We=re.scrollX,Ye=re.scrollY;return{x:(ee+We)*Ee.value+_e,y:(se+Ye)*Ee.value+Ue}},w=function(W){return getComputedStyle(document.documentElement).getPropertyValue("--".concat(W))},O=new RegExp("^[^".concat("A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-﷾--","]*[").concat("֑-߿יִ-﷽ﹰ-ﻼ","]")),$=function(W){return O.test(W)},I=function(W){var re=(0,l.Z)(W,2);return{x:re[0],y:re[1]}},C=function(W){if((W==null?void 0:W.name)!=="AbortError")throw W;console.warn(W)},_=function(W,re){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;ee<0&&(ee=W.length+ee);for(var se=(ee=Math.min(W.length,Math.max(ee,0)))-1;++se<W.length;)if(re(W[se],se,W))return se;return-1},N=function(W,re){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:W.length-1;ee<0&&(ee=W.length+ee);for(var se=(ee=Math.min(W.length-1,Math.max(ee,0)))+1;--se>-1;)if(re(W[se],se,W))return se;return-1},q=function(W){var re=W.length===5&&W.substr(4,1)==="0",ee=W.length===9&&W.substr(7,2)==="00";return re||ee||W===v.HO.transparent},pe=function(W){return function(re){(0,g.unstable_batchedUpdates)(W,re)}},te=function(W){return z(function(re){(0,g.unstable_batchedUpdates)(W,re)})},ve=function(W){for(var re=W.parentElement;re;){if(re===document.body)return document;var ee=window.getComputedStyle(re).overflowY;if(re.scrollHeight>re.clientHeight&&(ee==="auto"||ee==="scroll"||ee==="overlay"))return re;re=re.parentElement}return document},ae=function(W){for(var re=W.parentElement;re;){if(re.tabIndex>-1)return void re.focus();re=re.parentElement}},H=function(W){return Array.from(W).map(function(re){return"0".concat(re.toString(16)).slice(-2)}).join("")},le=function(){return Ge()?1:Date.now()},ke=function(W){return W.reduce(function(re,ee){return re.set(typeof ee=="string"?ee:ee.id,ee),re},new Map)},Le=function(W){return W.reduce(function(re,ee,se){return re.set(ee.id,[ee,se]),re},new Map)},Ge=function(){return!1},Ne=function(W,re){return new CustomEvent(W,{detail:{nativeEvent:re},cancelable:!0})},Ce=function(W,re){var ee=!1;for(var se in re){var Ee=re[se];if(Ee!==void 0){if(W[se]===Ee&&((0,T.Z)(Ee)!=="object"||Ee===null))continue;ee=!0}}return ee?m(m({},W),re):W},Oe=function(){try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}},De=function(W){return!!W&&(0,T.Z)(W)==="object"&&"then"in W&&"catch"in W&&"finally"in W},Ae=function(W){var re=W==null?void 0:W.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return re?Array.from(re).filter(function(ee){return ee.tabIndex>-1&&!ee.disabled}):[]},ie=function(W,re,ee){var se=arguments.length>3&&arguments[3]!==void 0&&arguments[3],Ee=Object.keys(W),_e=Object.keys(re);return Ee.length===_e.length&&Ee.every(function(Ue){var We=ee==null?void 0:ee[Ue],Ye=We?We(W[Ue],re[Ue]):W[Ue]===re[Ue];return!Ye&&se&&console.info("%cisShallowEqual: ".concat(Ue," not equal ->"),"color: #8B4000",W[Ue],re[Ue]),Ye})},Ie=function(W,re){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},se=ee.checkForDefaultPrevented,Ee=se===void 0||se;return function(_e){if(W==null||W(_e),!Ee||!_e.defaultPrevented)return re==null?void 0:re(_e)}},oe=function(W,re,ee){if(!re)return W;if(ee)return console.error(re),W;throw new Error(re)},s=function(W){var re,ee,se=function(Ee){var _e=Object.entries(Ee);if(re){var Ue,We=!0,Ye=R(_e);try{for(Ye.s();!(Ue=Ye.n()).done;){var Ze=(0,l.Z)(Ue.value,2),Je=Ze[0],nt=Ze[1];if(re.get(Je)!==nt){We=!1;break}}}catch(ge){Ye.e(ge)}finally{Ye.f()}if(We)return ee}var dt=W(Ee);return re=new Map(_e),ee=dt,dt};return se.clear=function(){re=void 0,ee=void 0},se},u=function(){var W;try{var re=P().version.split(".");W=Number(re[0])>17}catch{W=!1}var ee=!1;return function(){return window.EXCALIDRAW_THROTTLE_RENDER===!0&&(!!W||(ee||(ee=!0,console.warn("Excalidraw: render throttling is disabled on React versions < 18.")),!1))}}(),x=function(W,re){return W instanceof Set||W instanceof Map?W.has(re):"includes"in W?W.includes(re):W.hasOwnProperty(re)},V=function(W){return JSON.parse(JSON.stringify(W))}},3041:function(fe,Q,t){var T=t(3379),j=t.n(T),f=t(7795),l=t.n(f),v=t(569),k=t.n(v),g=t(3565),a=t.n(g),P=t(9216),R=t.n(P),K=t(4589),U=t.n(K),m=t(2044),G={};G.styleTagTransform=U(),G.setAttributes=a(),G.insert=k().bind(null,"head"),G.domAPI=l(),G.insertStyleElement=R(),j()(m.Z,G),m.Z&&m.Z.locals&&m.Z.locals},3379:function(fe){var Q=[];function t(f){for(var l=-1,v=0;v<Q.length;v++)if(Q[v].identifier===f){l=v;break}return l}function T(f,l){for(var v={},k=[],g=0;g<f.length;g++){var a=f[g],P=l.base?a[0]+l.base:a[0],R=v[P]||0,K="".concat(P," ").concat(R);v[P]=R+1;var U=t(K),m={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(U!==-1)Q[U].references++,Q[U].updater(m);else{var G=j(m,l);l.byIndex=g,Q.splice(g,0,{identifier:K,updater:G,references:1})}k.push(K)}return k}function j(f,l){var v=l.domAPI(l);return v.update(f),function(k){if(k){if(k.css===f.css&&k.media===f.media&&k.sourceMap===f.sourceMap&&k.supports===f.supports&&k.layer===f.layer)return;v.update(f=k)}else v.remove()}}fe.exports=function(f,l){var v=T(f=f||[],l=l||{});return function(k){k=k||[];for(var g=0;g<v.length;g++){var a=t(v[g]);Q[a].references--}for(var P=T(k,l),R=0;R<v.length;R++){var K=t(v[R]);Q[K].references===0&&(Q[K].updater(),Q.splice(K,1))}v=P}}},569:function(fe){var Q={};fe.exports=function(t,T){var j=function(f){if(Q[f]===void 0){var l=document.querySelector(f);if(window.HTMLIFrameElement&&l instanceof window.HTMLIFrameElement)try{l=l.contentDocument.head}catch{l=null}Q[f]=l}return Q[f]}(t);if(!j)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");j.appendChild(T)}},9216:function(fe){fe.exports=function(Q){var t=document.createElement("style");return Q.setAttributes(t,Q.attributes),Q.insert(t,Q.options),t}},3565:function(fe,Q,t){fe.exports=function(T){var j=t.nc;j&&T.setAttribute("nonce",j)}},7795:function(fe){fe.exports=function(Q){if(typeof document>"u")return{update:function(){},remove:function(){}};var t=Q.insertStyleElement(Q);return{update:function(T){(function(j,f,l){var v="";l.supports&&(v+="@supports (".concat(l.supports,") {")),l.media&&(v+="@media ".concat(l.media," {"));var k=l.layer!==void 0;k&&(v+="@layer".concat(l.layer.length>0?" ".concat(l.layer):""," {")),v+=l.css,k&&(v+="}"),l.media&&(v+="}"),l.supports&&(v+="}");var g=l.sourceMap;g&&typeof btoa<"u"&&(v+=`
|
|
183
|
+
/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(g))))," */")),f.styleTagTransform(v,j,f.options)})(t,Q,T)},remove:function(){(function(T){if(T.parentNode===null)return!1;T.parentNode.removeChild(T)})(t)}}}},4589:function(fe){fe.exports=function(Q,t){if(t.styleSheet)t.styleSheet.cssText=Q;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(Q))}}},9669:function(fe){fe.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg=="},7984:function(fe){fe.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'},1639:function(fe){fe.exports='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path fill="%23ced4da" d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>'},9729:function(fe,Q,t){fe.exports=t.p+"excalidraw-assets/Assistant-Bold.woff2"},1273:function(fe,Q,t){fe.exports=t.p+"excalidraw-assets/Assistant-Medium.woff2"},8303:function(fe,Q,t){fe.exports=t.p+"excalidraw-assets/Assistant-Regular.woff2"},9577:function(fe,Q,t){fe.exports=t.p+"excalidraw-assets/Assistant-SemiBold.woff2"},3147:function(fe,Q,t){fe.exports=t.p+"excalidraw-assets/Cascadia.woff2"},3940:function(fe,Q,t){fe.exports=t.p+"excalidraw-assets/Virgil.woff2"},9787:function(fe){fe.exports=i},5156:function(fe){fe.exports=d},9649:function(fe,Q,t){var T=t(8114).default;function j(){fe.exports=j=function(){return f},fe.exports.__esModule=!0,fe.exports.default=fe.exports;var f={},l=Object.prototype,v=l.hasOwnProperty,k=Object.defineProperty||function(p,c,w){p[c]=w.value},g=typeof Symbol=="function"?Symbol:{},a=g.iterator||"@@iterator",P=g.asyncIterator||"@@asyncIterator",R=g.toStringTag||"@@toStringTag";function K(p,c,w){return Object.defineProperty(p,c,{value:w,enumerable:!0,configurable:!0,writable:!0}),p[c]}try{K({},"")}catch{K=function(c,w,O){return c[w]=O}}function U(p,c,w,O){var $=c&&c.prototype instanceof he?c:he,I=Object.create($.prototype),C=new y(O||[]);return k(I,"_invoke",{value:A(p,w,C)}),I}function m(p,c,w){try{return{type:"normal",arg:p.call(c,w)}}catch(O){return{type:"throw",arg:O}}}f.wrap=U;var G={};function he(){}function be(){}function we(){}var xe={};K(xe,a,function(){return this});var ce=Object.getPrototypeOf,D=ce&&ce(ce(r([])));D&&D!==l&&v.call(D,a)&&(xe=D);var ne=we.prototype=he.prototype=Object.create(xe);function S(p){["next","throw","return"].forEach(function(c){K(p,c,function(w){return this._invoke(c,w)})})}function z(p,c){function w($,I,C,_){var N=m(p[$],p,I);if(N.type!=="throw"){var q=N.arg,pe=q.value;return pe&&T(pe)=="object"&&v.call(pe,"__await")?c.resolve(pe.__await).then(function(te){w("next",te,C,_)},function(te){w("throw",te,C,_)}):c.resolve(pe).then(function(te){q.value=te,C(q)},function(te){return w("throw",te,C,_)})}_(N.arg)}var O;k(this,"_invoke",{value:function($,I){function C(){return new c(function(_,N){w($,I,_,N)})}return O=O?O.then(C,C):C()}})}function A(p,c,w){var O="suspendedStart";return function($,I){if(O==="executing")throw new Error("Generator is already running");if(O==="completed"){if($==="throw")throw I;return M()}for(w.method=$,w.arg=I;;){var C=w.delegate;if(C){var _=E(C,w);if(_){if(_===G)continue;return _}}if(w.method==="next")w.sent=w._sent=w.arg;else if(w.method==="throw"){if(O==="suspendedStart")throw O="completed",w.arg;w.dispatchException(w.arg)}else w.method==="return"&&w.abrupt("return",w.arg);O="executing";var N=m(p,c,w);if(N.type==="normal"){if(O=w.done?"completed":"suspendedYield",N.arg===G)continue;return{value:N.arg,done:w.done}}N.type==="throw"&&(O="completed",w.method="throw",w.arg=N.arg)}}}function E(p,c){var w=c.method,O=p.iterator[w];if(O===void 0)return c.delegate=null,w==="throw"&&p.iterator.return&&(c.method="return",c.arg=void 0,E(p,c),c.method==="throw")||w!=="return"&&(c.method="throw",c.arg=new TypeError("The iterator does not provide a '"+w+"' method")),G;var $=m(O,p.iterator,c.arg);if($.type==="throw")return c.method="throw",c.arg=$.arg,c.delegate=null,G;var I=$.arg;return I?I.done?(c[p.resultName]=I.value,c.next=p.nextLoc,c.method!=="return"&&(c.method="next",c.arg=void 0),c.delegate=null,G):I:(c.method="throw",c.arg=new TypeError("iterator result is not an object"),c.delegate=null,G)}function L(p){var c={tryLoc:p[0]};1 in p&&(c.catchLoc=p[1]),2 in p&&(c.finallyLoc=p[2],c.afterLoc=p[3]),this.tryEntries.push(c)}function h(p){var c=p.completion||{};c.type="normal",delete c.arg,p.completion=c}function y(p){this.tryEntries=[{tryLoc:"root"}],p.forEach(L,this),this.reset(!0)}function r(p){if(p){var c=p[a];if(c)return c.call(p);if(typeof p.next=="function")return p;if(!isNaN(p.length)){var w=-1,O=function $(){for(;++w<p.length;)if(v.call(p,w))return $.value=p[w],$.done=!1,$;return $.value=void 0,$.done=!0,$};return O.next=O}}return{next:M}}function M(){return{value:void 0,done:!0}}return be.prototype=we,k(ne,"constructor",{value:we,configurable:!0}),k(we,"constructor",{value:be,configurable:!0}),be.displayName=K(we,R,"GeneratorFunction"),f.isGeneratorFunction=function(p){var c=typeof p=="function"&&p.constructor;return!!c&&(c===be||(c.displayName||c.name)==="GeneratorFunction")},f.mark=function(p){return Object.setPrototypeOf?Object.setPrototypeOf(p,we):(p.__proto__=we,K(p,R,"GeneratorFunction")),p.prototype=Object.create(ne),p},f.awrap=function(p){return{__await:p}},S(z.prototype),K(z.prototype,P,function(){return this}),f.AsyncIterator=z,f.async=function(p,c,w,O,$){$===void 0&&($=Promise);var I=new z(U(p,c,w,O),$);return f.isGeneratorFunction(c)?I:I.next().then(function(C){return C.done?C.value:I.next()})},S(ne),K(ne,R,"Generator"),K(ne,a,function(){return this}),K(ne,"toString",function(){return"[object Generator]"}),f.keys=function(p){var c=Object(p),w=[];for(var O in c)w.push(O);return w.reverse(),function $(){for(;w.length;){var I=w.pop();if(I in c)return $.value=I,$.done=!1,$}return $.done=!0,$}},f.values=r,y.prototype={constructor:y,reset:function(p){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(h),!p)for(var c in this)c.charAt(0)==="t"&&v.call(this,c)&&!isNaN(+c.slice(1))&&(this[c]=void 0)},stop:function(){this.done=!0;var p=this.tryEntries[0].completion;if(p.type==="throw")throw p.arg;return this.rval},dispatchException:function(p){if(this.done)throw p;var c=this;function w(N,q){return I.type="throw",I.arg=p,c.next=N,q&&(c.method="next",c.arg=void 0),!!q}for(var O=this.tryEntries.length-1;O>=0;--O){var $=this.tryEntries[O],I=$.completion;if($.tryLoc==="root")return w("end");if($.tryLoc<=this.prev){var C=v.call($,"catchLoc"),_=v.call($,"finallyLoc");if(C&&_){if(this.prev<$.catchLoc)return w($.catchLoc,!0);if(this.prev<$.finallyLoc)return w($.finallyLoc)}else if(C){if(this.prev<$.catchLoc)return w($.catchLoc,!0)}else{if(!_)throw new Error("try statement without catch or finally");if(this.prev<$.finallyLoc)return w($.finallyLoc)}}}},abrupt:function(p,c){for(var w=this.tryEntries.length-1;w>=0;--w){var O=this.tryEntries[w];if(O.tryLoc<=this.prev&&v.call(O,"finallyLoc")&&this.prev<O.finallyLoc){var $=O;break}}$&&(p==="break"||p==="continue")&&$.tryLoc<=c&&c<=$.finallyLoc&&($=null);var I=$?$.completion:{};return I.type=p,I.arg=c,$?(this.method="next",this.next=$.finallyLoc,G):this.complete(I)},complete:function(p,c){if(p.type==="throw")throw p.arg;return p.type==="break"||p.type==="continue"?this.next=p.arg:p.type==="return"?(this.rval=this.arg=p.arg,this.method="return",this.next="end"):p.type==="normal"&&c&&(this.next=c),G},finish:function(p){for(var c=this.tryEntries.length-1;c>=0;--c){var w=this.tryEntries[c];if(w.finallyLoc===p)return this.complete(w.completion,w.afterLoc),h(w),G}},catch:function(p){for(var c=this.tryEntries.length-1;c>=0;--c){var w=this.tryEntries[c];if(w.tryLoc===p){var O=w.completion;if(O.type==="throw"){var $=O.arg;h(w)}return $}}throw new Error("illegal catch attempt")},delegateYield:function(p,c,w){return this.delegate={iterator:r(p),resultName:c,nextLoc:w},this.method==="next"&&(this.arg=void 0),G}},f}fe.exports=j,fe.exports.__esModule=!0,fe.exports.default=fe.exports},8114:function(fe){function Q(t){return fe.exports=Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},fe.exports.__esModule=!0,fe.exports.default=fe.exports,Q(t)}fe.exports=Q,fe.exports.__esModule=!0,fe.exports.default=fe.exports},2975:function(fe,Q,t){var T=t(9649)();fe.exports=T;try{regeneratorRuntime=T}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=T:Function("r","regeneratorRuntime = r")(T)}},7017:function(fe,Q,t){function T(j,f){(f==null||f>j.length)&&(f=j.length);for(var l=0,v=new Array(f);l<f;l++)v[l]=j[l];return v}t.d(Q,{Z:function(){return T}})},3173:function(fe,Q,t){function T(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}t.d(Q,{Z:function(){return T}})},8950:function(fe,Q,t){function T(f,l,v,k,g,a,P){try{var R=f[a](P),K=R.value}catch(U){return void v(U)}R.done?l(K):Promise.resolve(K).then(k,g)}function j(f){return function(){var l=this,v=arguments;return new Promise(function(k,g){var a=f.apply(l,v);function P(K){T(a,k,g,P,R,"next",K)}function R(K){T(a,k,g,P,R,"throw",K)}P(void 0)})}}t.d(Q,{Z:function(){return j}})},8821:function(fe,Q,t){function T(j,f){if(!(j instanceof f))throw new TypeError("Cannot call a class as a function")}t.d(Q,{Z:function(){return T}})},5169:function(fe,Q,t){t.d(Q,{Z:function(){return f}});var T=t(3525);function j(l,v){for(var k=0;k<v.length;k++){var g=v[k];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(l,(0,T.Z)(g.key),g)}}function f(l,v,k){return v&&j(l.prototype,v),k&&j(l,k),Object.defineProperty(l,"prototype",{writable:!1}),l}},7169:function(fe,Q,t){t.d(Q,{Z:function(){return j}});var T=t(3525);function j(f,l,v){return(l=(0,T.Z)(l))in f?Object.defineProperty(f,l,{value:v,enumerable:!0,configurable:!0,writable:!0}):f[l]=v,f}},11:function(fe,Q,t){function T(){return T=Object.assign?Object.assign.bind():function(j){for(var f=1;f<arguments.length;f++){var l=arguments[f];for(var v in l)Object.prototype.hasOwnProperty.call(l,v)&&(j[v]=l[v])}return j},T.apply(this,arguments)}t.d(Q,{Z:function(){return T}})},2312:function(fe,Q,t){function T(j){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},T(j)}t.d(Q,{Z:function(){return T}})},2248:function(fe,Q,t){t.d(Q,{Z:function(){return j}});var T=t(5901);function j(f,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(l&&l.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),Object.defineProperty(f,"prototype",{writable:!1}),l&&(0,T.Z)(f,l)}},2726:function(fe,Q,t){function T(j,f){if(j==null)return{};var l,v,k=function(a,P){if(a==null)return{};var R,K,U={},m=Object.keys(a);for(K=0;K<m.length;K++)R=m[K],P.indexOf(R)>=0||(U[R]=a[R]);return U}(j,f);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(j);for(v=0;v<g.length;v++)l=g[v],f.indexOf(l)>=0||Object.prototype.propertyIsEnumerable.call(j,l)&&(k[l]=j[l])}return k}t.d(Q,{Z:function(){return T}})},7245:function(fe,Q,t){t.d(Q,{Z:function(){return f}});var T=t(6655),j=t(3173);function f(l,v){if(v&&((0,T.Z)(v)==="object"||typeof v=="function"))return v;if(v!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(0,j.Z)(l)}},5901:function(fe,Q,t){function T(j,f){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,v){return l.__proto__=v,l},T(j,f)}t.d(Q,{Z:function(){return T}})},2577:function(fe,Q,t){t.d(Q,{Z:function(){return j}});var T=t(9139);function j(f,l){return function(v){if(Array.isArray(v))return v}(f)||function(v,k){var g=v==null?null:typeof Symbol<"u"&&v[Symbol.iterator]||v["@@iterator"];if(g!=null){var a,P,R,K,U=[],m=!0,G=!1;try{if(R=(g=g.call(v)).next,k===0){if(Object(g)!==g)return;m=!1}else for(;!(m=(a=R.call(g)).done)&&(U.push(a.value),U.length!==k);m=!0);}catch(he){G=!0,P=he}finally{try{if(!m&&g.return!=null&&(K=g.return(),Object(K)!==K))return}finally{if(G)throw P}}return U}}(f,l)||(0,T.Z)(f,l)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
184
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}},1930:function(fe,Q,t){t.d(Q,{Z:function(){return f}});var T=t(7017),j=t(9139);function f(l){return function(v){if(Array.isArray(v))return(0,T.Z)(v)}(l)||function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)}(l)||(0,j.Z)(l)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
185
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}},3525:function(fe,Q,t){t.d(Q,{Z:function(){return j}});var T=t(6655);function j(f){var l=function(v,k){if((0,T.Z)(v)!=="object"||v===null)return v;var g=v[Symbol.toPrimitive];if(g!==void 0){var a=g.call(v,k||"default");if((0,T.Z)(a)!=="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(k==="string"?String:Number)(v)}(f,"string");return(0,T.Z)(l)==="symbol"?l:String(l)}},6655:function(fe,Q,t){function T(j){return T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},T(j)}t.d(Q,{Z:function(){return T}})},9139:function(fe,Q,t){t.d(Q,{Z:function(){return j}});var T=t(7017);function j(f,l){if(f){if(typeof f=="string")return(0,T.Z)(f,l);var v=Object.prototype.toString.call(f).slice(8,-1);return v==="Object"&&f.constructor&&(v=f.constructor.name),v==="Map"||v==="Set"?Array.from(f):v==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(v)?(0,T.Z)(f,l):void 0}}},3607:function(fe,Q,t){t.d(Q,{zt:function(){return D},cn:function(){return ne},Vv:function(){return be},KO:function(){return A},Dv:function(){return S},b9:function(){return z}});var T=t(9787);let j=0;const f=Symbol(),l=E=>!!E[f],v=E=>!E[f].c,k=E=>{var L;const{b:h,c:y}=E[f];y&&(y(),(L=P.get(h))==null||L())},g=(E,L)=>{const h=E[f].o,y=L[f].o;return h===y||E===y||l(h)&&g(h,L)},a=(E,L)=>{const h={b:E,o:L,c:null},y=new Promise(r=>{h.c=()=>{h.c=null,r()},L.finally(h.c)});return y[f]=h,y},P=new WeakMap,R=E=>"init"in E,K="r",U="w",m="c",G="s",he=E=>{const L=new WeakMap,h=new WeakMap,y=new Map;let r,M;if(r=new Set,M=new Set,E)for(const[Ae,ie]of E){const Ie={v:ie,r:0,y:!0,d:new Map};Object.freeze(Ie),R(Ae)||console.warn("Found initial value for derived atom which can cause unexpected behavior",Ae),L.set(Ae,Ie)}const p=new WeakMap,c=new WeakMap,w=Ae=>{let ie=c.get(Ae);return ie||(ie=new Map,c.set(Ae,ie)),ie},O=(Ae,ie)=>{if(Ae){const Ie=w(Ae);let oe=Ie.get(ie);return oe||(oe=O(Ae.p,ie),oe&&"p"in oe&&v(oe.p)&&(oe=void 0),oe&&Ie.set(ie,oe)),oe}return L.get(ie)},$=(Ae,ie,Ie)=>{if(Object.freeze(Ie),Ae)w(Ae).set(ie,Ie);else{const oe=L.get(ie);L.set(ie,Ie),y.has(ie)||y.set(ie,oe)}},I=(Ae,ie=new Map,Ie)=>{if(!Ie)return ie;const oe=new Map;let s=!1;return Ie.forEach(u=>{var x;const V=((x=O(Ae,u))==null?void 0:x.r)||0;oe.set(u,V),ie.get(u)!==V&&(s=!0)}),ie.size!==oe.size||s?oe:ie},C=(Ae,ie,Ie,oe,s)=>{const u=O(Ae,ie);if(u){if(s&&(!("p"in u)||!g(u.p,s)))return u;"p"in u&&k(u.p)}const x={v:Ie,r:(u==null?void 0:u.r)||0,y:!0,d:I(Ae,u==null?void 0:u.d,oe)};let V=!(u!=null&&u.y);return u&&"v"in u&&Object.is(u.v,Ie)?x.d===u.d||x.d.size===u.d.size&&Array.from(x.d.keys()).every(W=>u.d.has(W))||(V=!0,Promise.resolve().then(()=>{Ne(Ae)})):(V=!0,++x.r,x.d.has(ie)&&(x.d=new Map(x.d).set(ie,x.r))),u&&!V?u:($(Ae,ie,x),x)},_=(Ae,ie,Ie,oe,s)=>{const u=O(Ae,ie);if(u){if(s&&(!("p"in u)||!g(u.p,s)))return u;"p"in u&&k(u.p)}const x={e:Ie,r:((u==null?void 0:u.r)||0)+1,y:!0,d:I(Ae,u==null?void 0:u.d,oe)};return $(Ae,ie,x),x},N=(Ae,ie,Ie,oe)=>{const s=O(Ae,ie);if(s&&"p"in s){if(g(s.p,Ie)&&!v(s.p))return s.y?s:{...s,y:!0};k(s.p)}((x,V,W)=>{let re=p.get(V);re||(re=new Map,p.set(V,re)),W.then(()=>{re.get(x)===W&&(re.delete(x),re.size||p.delete(V))}),re.set(x,W)})(Ae,ie,Ie);const u={p:Ie,r:((s==null?void 0:s.r)||0)+1,y:!0,d:I(Ae,s==null?void 0:s.d,oe)};return $(Ae,ie,u),u},q=(Ae,ie,Ie,oe)=>{if(Ie instanceof Promise){const s=a(Ie,Ie.then(u=>{C(Ae,ie,u,oe,s)}).catch(u=>{if(u instanceof Promise)return l(u)?u.then(()=>{pe(Ae,ie,!0)}):u;_(Ae,ie,u,oe,s)}));return N(Ae,ie,s,oe)}return C(Ae,ie,Ie,oe)},pe=(Ae,ie,Ie)=>{if(!Ie){const s=O(Ae,ie);if(s){if(s.y&&"p"in s&&!v(s.p))return s;if(s.d.forEach((u,x)=>{if(x!==ie)if(h.has(x)){const V=O(Ae,x);V&&!V.y&&pe(Ae,x)}else pe(Ae,x)}),Array.from(s.d).every(([u,x])=>{const V=O(Ae,u);return V&&!("p"in V)&&V.r===x}))return s.y?s:{...s,y:!0}}}const oe=new Set;try{const s=ie.read(u=>{oe.add(u);const x=u===ie?O(Ae,u):pe(Ae,u);if(x){if("e"in x)throw x.e;if("p"in x)throw x.p;return x.v}if(R(u))return u.init;throw new Error("no atom init")});return q(Ae,ie,s,oe)}catch(s){if(s instanceof Promise){const u=l(s)&&v(s)?(x=>a(x[f].b,x[f].o))(s):a(s,s);return N(Ae,ie,u,oe)}return _(Ae,ie,s,oe)}},te=(Ae,ie)=>pe(ie,Ae),ve=(Ae,ie)=>!ie.l.size&&(!ie.t.size||ie.t.size===1&&ie.t.has(Ae)),ae=(Ae,ie)=>{const Ie=h.get(ie);Ie==null||Ie.t.forEach(oe=>{oe!==ie&&(((s,u)=>{const x=O(s,u);if(x){const V={...x,y:!1};$(s,u,V)}else console.warn("[Bug] could not invalidate non existing atom",u)})(Ae,oe),ae(Ae,oe))})},H=(Ae,ie,Ie)=>{let oe=!0;const s=(x,V)=>{const W=pe(Ae,x);if("e"in W)throw W.e;if("p"in W){if(V!=null&&V.unstable_promise)return W.p.then(()=>{const re=O(Ae,x);return re&&"p"in re&&re.p===W.p?new Promise(ee=>setTimeout(ee)).then(()=>s(x,V)):s(x,V)});throw console.info("Reading pending atom state in write operation. We throw a promise for now.",x),W.p}if("v"in W)return W.v;throw console.warn("[Bug] no value found while reading atom in write operation. This is probably a bug.",x),new Error("no value found")},u=ie.write(s,(x,V)=>{let W;if(x===ie){if(!R(x))throw new Error("atom not writable");(ee=>{const se=new Set,Ee=p.get(ee);return Ee&&(p.delete(ee),Ee.forEach((_e,Ue)=>{k(_e),se.add(Ue)})),se})(x).forEach(ee=>{ee!==Ae&&q(ee,x,V)}),O(Ae,x)!==q(Ae,x,V)&&ae(Ae,x)}else W=H(Ae,x,V);return oe||Ne(Ae),W},Ie);return oe=!1,u},le=(Ae,ie,Ie)=>{const oe=H(Ie,Ae,ie);return Ne(Ie),oe},ke=(Ae,ie,Ie)=>{const oe={t:new Set(Ie&&[Ie]),l:new Set};if(h.set(ie,oe),M.add(ie),pe(void 0,ie).d.forEach((s,u)=>{const x=h.get(u);x?x.t.add(ie):u!==ie&&ke(Ae,u,ie)}),(s=>!!s.write)(ie)&&ie.onMount){const s=x=>le(ie,x,Ae),u=ie.onMount(s);Ae=void 0,u&&(oe.u=u)}return oe},Le=(Ae,ie)=>{var Ie;const oe=(Ie=h.get(ie))==null?void 0:Ie.u;oe&&oe(),h.delete(ie),M.delete(ie);const s=O(Ae,ie);s?("p"in s&&k(s.p),s.d.forEach((u,x)=>{if(x!==ie){const V=h.get(x);V&&(V.t.delete(ie),ve(x,V)&&Le(Ae,x))}})):console.warn("[Bug] could not find atom state to unmount",ie)},Ge=(Ae,ie,Ie,oe)=>{const s=new Set(Ie.d.keys());oe==null||oe.forEach((u,x)=>{if(s.has(x))return void s.delete(x);const V=h.get(x);V&&(V.t.delete(ie),ve(x,V)&&Le(Ae,x))}),s.forEach(u=>{const x=h.get(u);x?x.t.add(ie):h.has(ie)&&ke(Ae,u,ie)})},Ne=Ae=>{if(Ae)w(Ae).forEach((ie,Ie)=>{if(ie!==L.get(Ie)){const oe=h.get(Ie);oe==null||oe.l.forEach(s=>s(Ae))}});else{for(;y.size;){const ie=Array.from(y);y.clear(),ie.forEach(([Ie,oe])=>{const s=O(void 0,Ie);if(s&&s.d!==(oe==null?void 0:oe.d)&&Ge(void 0,Ie,s,oe==null?void 0:oe.d),oe&&!oe.y&&(s==null?void 0:s.y))return;const u=h.get(Ie);u==null||u.l.forEach(x=>x())})}r.forEach(ie=>ie())}},Ce=(Ae,ie)=>{ie&&(Ie=>{w(Ie).forEach((oe,s)=>{const u=L.get(s);(!u||oe.r>u.r||oe.y!==u.y||oe.r===u.r&&oe.d!==u.d)&&(L.set(s,oe),oe.d!==(u==null?void 0:u.d)&&Ge(Ie,s,oe,u==null?void 0:u.d))})})(ie),Ne(void 0)},Oe=(Ae,ie,Ie)=>{const oe=((u,x)=>{let V=h.get(x);return V||(V=ke(u,x)),V})(Ie,Ae),s=oe.l;return s.add(ie),()=>{s.delete(ie),((u,x)=>{const V=h.get(x);V&&ve(x,V)&&Le(u,x)})(Ie,Ae)}},De=(Ae,ie)=>{for(const[Ie,oe]of Ae)R(Ie)&&(q(ie,Ie,oe),ae(ie,Ie));Ne(ie)};return{[K]:te,[U]:le,[m]:Ce,[G]:Oe,h:De,n:Ae=>(r.add(Ae),()=>{r.delete(Ae)}),l:()=>M.values(),a:Ae=>L.get(Ae),m:Ae=>h.get(Ae)}},be=E=>{const L=he(E),h=y=>new Promise((r,M)=>{const p=L.r(y);"e"in p?M(p.e):r("p"in p?p.p.then(()=>h(y)):p.v)});return{get:y=>{const r=L.r(y);if("e"in r)throw r.e;if(!("p"in r))return r.v},asyncGet:h,set:(y,r)=>L.w(y,r),sub:(y,r)=>L.s(y,r),SECRET_INTERNAL_store:L}},we=(E,L)=>({s:L?L(E).SECRET_INTERNAL_store:he(E)}),xe=new Map,ce=E=>(xe.has(E)||xe.set(E,(0,T.createContext)(we())),xe.get(E)),D=({children:E,initialValues:L,scope:h,unstable_createStore:y,unstable_enableVersionedWrite:r})=>{const[M,p]=(0,T.useState)({});(0,T.useEffect)(()=>{const O=c.current;O.w&&(O.s.c(null,M),delete M.p,O.v=M)},[M]);const c=(0,T.useRef)();if(!c.current){const O=we(L,y);if(r){let $=0;O.w=I=>{p(C=>{const _=$?C:{p:C};return I(_),_})},O.v=M,O.r=I=>{++$,I(),--$}}c.current=O}const w=ce(h);return(0,T.createElement)(w.Provider,{value:c.current},E)};function ne(E,L){return function(h,y){const r="atom"+ ++j,M={toString:()=>r};return typeof h=="function"?M.read=h:(M.init=h,M.read=p=>p(M),M.write=(p,c,w)=>c(M,typeof w=="function"?w(p(M)):w)),y&&(M.write=y),M}(E,L)}function S(E,L){const h=ce(L),y=(0,T.useContext)(h),{s:r,v:M}=y,p=C=>{const _=r.r(E,C);if(!_.y)throw new Error("should not be invalidated");if("e"in _)throw _.e;if("p"in _)throw _.p;if("v"in _)return _.v;throw new Error("no atom value")},[[c,w,O],$]=(0,T.useReducer)((C,_)=>{const N=p(_);return Object.is(C[1],N)&&C[2]===E?C:[_,N,E]},M,C=>[C,p(C),E]);let I=w;return O!==E&&($(c),I=p(c)),(0,T.useEffect)(()=>{const{v:C}=y;C&&r.c(E,C);const _=r.s(E,$,C);return $(C),_},[r,E,y]),(0,T.useEffect)(()=>{r.c(E,c)}),(0,T.useDebugValue)(I),I}function z(E,L){const h=ce(L),{s:y,w:r}=(0,T.useContext)(h);return(0,T.useCallback)(M=>{if(!("write"in E))throw new Error("not writable atom");const p=c=>y.w(E,M,c);return r?r(p):p()},[y,r,E])}function A(E,L){return"scope"in E&&(console.warn("atom.scope is deprecated. Please do useAtom(atom, scope) instead."),L=E.scope),[S(E,L),z(E,L)]}},5605:function(fe,Q,t){t.d(Q,{x0:function(){return T}});let T=(j=21)=>crypto.getRandomValues(new Uint8Array(j)).reduce((f,l)=>f+=(l&=63)<36?l.toString(36):l<62?(l-26).toString(36).toUpperCase():l>62?"-":"_","")},5284:function(fe){fe.exports=JSON.parse('{"white":"#ffffff","black":"#000000","gray":["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],"red":["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],"pink":["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],"grape":["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],"violet":["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],"indigo":["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],"blue":["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],"cyan":["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],"teal":["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],"green":["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],"lime":["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],"yellow":["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],"orange":["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]}')},1463:function(fe){fe.exports=JSON.parse(`{"labels":{"paste":"Paste","pasteAsPlaintext":"Paste as plaintext","pasteCharts":"Paste charts","selectAll":"Select all","multiSelect":"Add element to selection","moveCanvas":"Move canvas","cut":"Cut","copy":"Copy","copyAsPng":"Copy to clipboard as PNG","copyAsSvg":"Copy to clipboard as SVG","copyText":"Copy to clipboard as text","bringForward":"Bring forward","sendToBack":"Send to back","bringToFront":"Bring to front","sendBackward":"Send backward","delete":"Delete","copyStyles":"Copy styles","pasteStyles":"Paste styles","stroke":"Stroke","background":"Background","fill":"Fill","strokeWidth":"Stroke width","strokeStyle":"Stroke style","strokeStyle_solid":"Solid","strokeStyle_dashed":"Dashed","strokeStyle_dotted":"Dotted","sloppiness":"Sloppiness","opacity":"Opacity","textAlign":"Text align","edges":"Edges","sharp":"Sharp","round":"Round","arrowheads":"Arrowheads","arrowhead_none":"None","arrowhead_arrow":"Arrow","arrowhead_bar":"Bar","arrowhead_dot":"Dot","arrowhead_triangle":"Triangle","fontSize":"Font size","fontFamily":"Font family","addWatermark":"Add \\"Made with Excalidraw\\"","handDrawn":"Hand-drawn","normal":"Normal","code":"Code","small":"Small","medium":"Medium","large":"Large","veryLarge":"Very large","solid":"Solid","hachure":"Hachure","zigzag":"Zigzag","crossHatch":"Cross-hatch","thin":"Thin","bold":"Bold","left":"Left","center":"Center","right":"Right","extraBold":"Extra bold","architect":"Architect","artist":"Artist","cartoonist":"Cartoonist","fileTitle":"File name","colorPicker":"Color picker","canvasColors":"Used on canvas","canvasBackground":"Canvas background","drawingCanvas":"Drawing canvas","layers":"Layers","actions":"Actions","language":"Language","liveCollaboration":"Live collaboration...","duplicateSelection":"Duplicate","untitled":"Untitled","name":"Name","yourName":"Your name","madeWithExcalidraw":"Made with Excalidraw","group":"Group selection","ungroup":"Ungroup selection","collaborators":"Collaborators","showGrid":"Show grid","addToLibrary":"Add to library","removeFromLibrary":"Remove from library","libraryLoadingMessage":"Loading library…","libraries":"Browse libraries","loadingScene":"Loading scene…","align":"Align","alignTop":"Align top","alignBottom":"Align bottom","alignLeft":"Align left","alignRight":"Align right","centerVertically":"Center vertically","centerHorizontally":"Center horizontally","distributeHorizontally":"Distribute horizontally","distributeVertically":"Distribute vertically","flipHorizontal":"Flip horizontal","flipVertical":"Flip vertical","viewMode":"View mode","share":"Share","showStroke":"Show stroke color picker","showBackground":"Show background color picker","toggleTheme":"Toggle theme","personalLib":"Personal Library","excalidrawLib":"Excalidraw Library","decreaseFontSize":"Decrease font size","increaseFontSize":"Increase font size","unbindText":"Unbind text","bindText":"Bind text to the container","createContainerFromText":"Wrap text in a container","link":{"edit":"Edit link","editEmbed":"Edit link & embed","create":"Create link","createEmbed":"Create link & embed","label":"Link","labelEmbed":"Link & embed","empty":"No link is set"},"lineEditor":{"edit":"Edit line","exit":"Exit line editor"},"elementLock":{"lock":"Lock","unlock":"Unlock","lockAll":"Lock all","unlockAll":"Unlock all"},"statusPublished":"Published","sidebarLock":"Keep sidebar open","selectAllElementsInFrame":"Select all elements in frame","removeAllElementsFromFrame":"Remove all elements from frame","eyeDropper":"Pick color from canvas"},"library":{"noItems":"No items added yet...","hint_emptyLibrary":"Select an item on canvas to add it here, or install a library from the public repository, below.","hint_emptyPrivateLibrary":"Select an item on canvas to add it here."},"buttons":{"clearReset":"Reset the canvas","exportJSON":"Export to file","exportImage":"Export image...","export":"Save to...","copyToClipboard":"Copy to clipboard","save":"Save to current file","saveAs":"Save as","load":"Open","getShareableLink":"Get shareable link","close":"Close","selectLanguage":"Select language","scrollBackToContent":"Scroll back to content","zoomIn":"Zoom in","zoomOut":"Zoom out","resetZoom":"Reset zoom","menu":"Menu","done":"Done","edit":"Edit","undo":"Undo","redo":"Redo","resetLibrary":"Reset library","createNewRoom":"Create new room","fullScreen":"Full screen","darkMode":"Dark mode","lightMode":"Light mode","zenMode":"Zen mode","objectsSnapMode":"Snap to objects","exitZenMode":"Exit zen mode","cancel":"Cancel","clear":"Clear","remove":"Remove","embed":"Toggle embedding","publishLibrary":"Publish","submit":"Submit","confirm":"Confirm","embeddableInteractionButton":"Click to interact"},"alerts":{"clearReset":"This will clear the whole canvas. Are you sure?","couldNotCreateShareableLink":"Couldn't create shareable link.","couldNotCreateShareableLinkTooBig":"Couldn't create shareable link: the scene is too big","couldNotLoadInvalidFile":"Couldn't load invalid file","importBackendFailed":"Importing from backend failed.","cannotExportEmptyCanvas":"Cannot export empty canvas.","couldNotCopyToClipboard":"Couldn't copy to clipboard.","decryptFailed":"Couldn't decrypt data.","uploadedSecurly":"The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can't read the content.","loadSceneOverridePrompt":"Loading external drawing will replace your existing content. Do you wish to continue?","collabStopOverridePrompt":"Stopping the session will overwrite your previous, locally stored drawing. Are you sure?\\n\\n(If you want to keep your local drawing, simply close the browser tab instead.)","errorAddingToLibrary":"Couldn't add item to the library","errorRemovingFromLibrary":"Couldn't remove item from the library","confirmAddLibrary":"This will add {{numShapes}} shape(s) to your library. Are you sure?","imageDoesNotContainScene":"This image does not seem to contain any scene data. Have you enabled scene embedding during export?","cannotRestoreFromImage":"Scene couldn't be restored from this image file","invalidSceneUrl":"Couldn't import scene from the supplied URL. It's either malformed, or doesn't contain valid Excalidraw JSON data.","resetLibrary":"This will clear your library. Are you sure?","removeItemsFromsLibrary":"Delete {{count}} item(s) from library?","invalidEncryptionKey":"Encryption key must be of 22 characters. Live collaboration is disabled.","collabOfflineWarning":"No internet connection available.\\nYour changes will not be saved!"},"errors":{"unsupportedFileType":"Unsupported file type.","imageInsertError":"Couldn't insert image. Try again later...","fileTooBig":"File is too big. Maximum allowed size is {{maxSize}}.","svgImageInsertError":"Couldn't insert SVG image. The SVG markup looks invalid.","failedToFetchImage":"Failed to fetch image.","invalidSVGString":"Invalid SVG.","cannotResolveCollabServer":"Couldn't connect to the collab server. Please reload the page and try again.","importLibraryError":"Couldn't load library","collabSaveFailed":"Couldn't save to the backend database. If problems persist, you should save your file locally to ensure you don't lose your work.","collabSaveFailed_sizeExceeded":"Couldn't save to the backend database, the canvas seems to be too big. You should save the file locally to ensure you don't lose your work.","imageToolNotSupported":"Images are disabled.","brave_measure_text_error":{"line1":"Looks like you are using Brave browser with the <bold>Aggressively Block Fingerprinting</bold> setting enabled.","line2":"This could result in breaking the <bold>Text Elements</bold> in your drawings.","line3":"We strongly recommend disabling this setting. You can follow <link>these steps</link> on how to do so.","line4":"If disabling this setting doesn't fix the display of text elements, please open an <issueLink>issue</issueLink> on our GitHub, or write us on <discordLink>Discord</discordLink>"},"libraryElementTypeError":{"embeddable":"Embeddable elements cannot be added to the library.","image":"Support for adding images to the library coming soon!"},"asyncPasteFailedOnRead":"Couldn't paste (couldn't read from system clipboard).","asyncPasteFailedOnParse":"Couldn't paste.","copyToSystemClipboardFailed":"Couldn't copy to clipboard."},"toolBar":{"selection":"Selection","image":"Insert image","rectangle":"Rectangle","diamond":"Diamond","ellipse":"Ellipse","arrow":"Arrow","line":"Line","freedraw":"Draw","text":"Text","library":"Library","lock":"Keep selected tool active after drawing","penMode":"Pen mode - prevent touch","link":"Add/ Update link for a selected shape","eraser":"Eraser","frame":"Frame tool","embeddable":"Web Embed","laser":"Laser pointer","hand":"Hand (panning tool)","extraTools":"More tools","mermaidToExcalidraw":"Mermaid to Excalidraw"},"headings":{"canvasActions":"Canvas actions","selectedShapeActions":"Selected shape actions","shapes":"Shapes"},"hints":{"canvasPanning":"To move canvas, hold mouse wheel or spacebar while dragging, or use the hand tool","linearElement":"Click to start multiple points, drag for single line","freeDraw":"Click and drag, release when you're finished","text":"Tip: you can also add text by double-clicking anywhere with the selection tool","embeddable":"Click-drag to create a website embed","text_selected":"Double-click or press ENTER to edit text","text_editing":"Press Escape or CtrlOrCmd+ENTER to finish editing","linearElementMulti":"Click on last point or press Escape or Enter to finish","lockAngle":"You can constrain angle by holding SHIFT","resize":"You can constrain proportions by holding SHIFT while resizing,\\nhold ALT to resize from the center","resizeImage":"You can resize freely by holding SHIFT,\\nhold ALT to resize from the center","rotate":"You can constrain angles by holding SHIFT while rotating","lineEditor_info":"Hold CtrlOrCmd and Double-click or press CtrlOrCmd + Enter to edit points","lineEditor_pointSelected":"Press Delete to remove point(s),\\nCtrlOrCmd+D to duplicate, or drag to move","lineEditor_nothingSelected":"Select a point to edit (hold SHIFT to select multiple),\\nor hold Alt and click to add new points","placeImage":"Click to place the image, or click and drag to set its size manually","publishLibrary":"Publish your own library","bindTextToElement":"Press enter to add text","deepBoxSelect":"Hold CtrlOrCmd to deep select, and to prevent dragging","eraserRevert":"Hold Alt to revert the elements marked for deletion","firefox_clipboard_write":"This feature can likely be enabled by setting the \\"dom.events.asyncClipboard.clipboardItem\\" flag to \\"true\\". To change the browser flags in Firefox, visit the \\"about:config\\" page.","disableSnapping":"Hold CtrlOrCmd to disable snapping"},"canvasError":{"cannotShowPreview":"Cannot show preview","canvasTooBig":"The canvas may be too big.","canvasTooBigTip":"Tip: try moving the farthest elements a bit closer together."},"errorSplash":{"headingMain":"Encountered an error. Try <button>reloading the page</button>.","clearCanvasMessage":"If reloading doesn't work, try <button>clearing the canvas</button>.","clearCanvasCaveat":" This will result in loss of work ","trackedToSentry":"The error with identifier {{eventId}} was tracked on our system.","openIssueMessage":"We were very cautious not to include your scene information on the error. If your scene is not private, please consider following up on our <button>bug tracker</button>. Please include information below by copying and pasting into the GitHub issue.","sceneContent":"Scene content:"},"roomDialog":{"desc_intro":"You can invite people to your current scene to collaborate with you.","desc_privacy":"Don't worry, the session uses end-to-end encryption, so whatever you draw will stay private. Not even our server will be able to see what you come up with.","button_startSession":"Start session","button_stopSession":"Stop session","desc_inProgressIntro":"Live-collaboration session is now in progress.","desc_shareLink":"Share this link with anyone you want to collaborate with:","desc_exitSession":"Stopping the session will disconnect you from the room, but you'll be able to continue working with the scene, locally. Note that this won't affect other people, and they'll still be able to collaborate on their version.","shareTitle":"Join a live collaboration session on Excalidraw"},"errorDialog":{"title":"Error"},"exportDialog":{"disk_title":"Save to disk","disk_details":"Export the scene data to a file from which you can import later.","disk_button":"Save to file","link_title":"Shareable link","link_details":"Export as a read-only link.","link_button":"Export to Link","excalidrawplus_description":"Save the scene to your Excalidraw+ workspace.","excalidrawplus_button":"Export","excalidrawplus_exportError":"Couldn't export to Excalidraw+ at this moment..."},"helpDialog":{"blog":"Read our blog","click":"click","deepSelect":"Deep select","deepBoxSelect":"Deep select within box, and prevent dragging","curvedArrow":"Curved arrow","curvedLine":"Curved line","documentation":"Documentation","doubleClick":"double-click","drag":"drag","editor":"Editor","editLineArrowPoints":"Edit line/arrow points","editText":"Edit text / add label","github":"Found an issue? Submit","howto":"Follow our guides","or":"or","preventBinding":"Prevent arrow binding","tools":"Tools","shortcuts":"Keyboard shortcuts","textFinish":"Finish editing (text editor)","textNewLine":"Add new line (text editor)","title":"Help","view":"View","zoomToFit":"Zoom to fit all elements","zoomToSelection":"Zoom to selection","toggleElementLock":"Lock/unlock selection","movePageUpDown":"Move page up/down","movePageLeftRight":"Move page left/right"},"clearCanvasDialog":{"title":"Clear canvas"},"publishDialog":{"title":"Publish library","itemName":"Item name","authorName":"Author name","githubUsername":"GitHub username","twitterUsername":"Twitter username","libraryName":"Library name","libraryDesc":"Library description","website":"Website","placeholder":{"authorName":"Your name or username","libraryName":"Name of your library","libraryDesc":"Description of your library to help people understand its usage","githubHandle":"GitHub handle (optional), so you can edit the library once submitted for review","twitterHandle":"Twitter username (optional), so we know who to credit when promoting over Twitter","website":"Link to your personal website or elsewhere (optional)"},"errors":{"required":"Required","website":"Enter a valid URL"},"noteDescription":"Submit your library to be included in the <link>public library repository</link> for other people to use in their drawings.","noteGuidelines":"The library needs to be manually approved first. Please read the <link>guidelines</link> before submitting. You will need a GitHub account to communicate and make changes if requested, but it is not strictly required.","noteLicense":"By submitting, you agree the library will be published under the <link>MIT License</link>, which in short means anyone can use them without restrictions.","noteItems":"Each library item must have its own name so it's filterable. The following library items will be included:","atleastOneLibItem":"Please select at least one library item to get started","republishWarning":"Note: some of the selected items are marked as already published/submitted. You should only resubmit items when updating an existing library or submission."},"publishSuccessDialog":{"title":"Library submitted","content":"Thank you {{authorName}}. Your library has been submitted for review. You can track the status <link>here</link>"},"confirmDialog":{"resetLibrary":"Reset library","removeItemsFromLib":"Remove selected items from library"},"imageExportDialog":{"header":"Export image","label":{"withBackground":"Background","onlySelected":"Only selected","darkMode":"Dark mode","embedScene":"Embed scene","scale":"Scale","padding":"Padding"},"tooltip":{"embedScene":"Scene data will be saved into the exported PNG/SVG file so that the scene can be restored from it.\\nWill increase exported file size."},"title":{"exportToPng":"Export to PNG","exportToSvg":"Export to SVG","copyPngToClipboard":"Copy PNG to clipboard"},"button":{"exportToPng":"PNG","exportToSvg":"SVG","copyPngToClipboard":"Copy to clipboard"}},"encrypted":{"tooltip":"Your drawings are end-to-end encrypted so Excalidraw's servers will never see them.","link":"Blog post on end-to-end encryption in Excalidraw"},"stats":{"angle":"Angle","element":"Element","elements":"Elements","height":"Height","scene":"Scene","selected":"Selected","storage":"Storage","title":"Stats for nerds","total":"Total","version":"Version","versionCopy":"Click to copy","versionNotAvailable":"Version not available","width":"Width"},"toast":{"addedToLibrary":"Added to library","copyStyles":"Copied styles.","copyToClipboard":"Copied to clipboard.","copyToClipboardAsPng":"Copied {{exportSelection}} to clipboard as PNG\\n({{exportColorScheme}})","fileSaved":"File saved.","fileSavedToFilename":"Saved to {filename}","canvas":"canvas","selection":"selection","pasteAsSingleElement":"Use {{shortcut}} to paste as a single element,\\nor paste into an existing text editor","unableToEmbed":"Embedding this url is currently not allowed. Raise an issue on GitHub to request the url whitelisted","unrecognizedLinkFormat":"The link you embedded does not match the expected format. Please try to paste the 'embed' string provided by the source site"},"colors":{"transparent":"Transparent","black":"Black","white":"White","red":"Red","pink":"Pink","grape":"Grape","violet":"Violet","gray":"Gray","blue":"Blue","cyan":"Cyan","teal":"Teal","green":"Green","yellow":"Yellow","orange":"Orange","bronze":"Bronze"},"welcomeScreen":{"app":{"center_heading":"All your data is saved locally in your browser.","center_heading_plus":"Did you want to go to the Excalidraw+ instead?","menuHint":"Export, preferences, languages, ..."},"defaults":{"menuHint":"Export, preferences, and more...","center_heading":"Diagrams. Made. Simple.","toolbarHint":"Pick a tool & Start drawing!","helpHint":"Shortcuts & help"}},"colorPicker":{"mostUsedCustomColors":"Most used custom colors","colors":"Colors","shades":"Shades","hexCode":"Hex code","noShades":"No shades available for this color"},"overwriteConfirm":{"action":{"exportToImage":{"title":"Export as image","button":"Export as image","description":"Export the scene data as an image from which you can import later."},"saveToDisk":{"title":"Save to disk","button":"Save to disk","description":"Export the scene data to a file from which you can import later."},"excalidrawPlus":{"title":"Excalidraw+","button":"Export to Excalidraw+","description":"Save the scene to your Excalidraw+ workspace."}},"modal":{"loadFromFile":{"title":"Load from file","button":"Load from file","description":"Loading from a file will <bold>replace your existing content</bold>.<br></br>You can back up your drawing first using one of the options below."},"shareableLink":{"title":"Load from link","button":"Replace my content","description":"Loading external drawing will <bold>replace your existing content</bold>.<br></br>You can back up your drawing first by using one of the options below."}}},"mermaid":{"title":"Mermaid to Excalidraw","button":"Insert","description":"Currently only <flowchartLink>Flowcharts</flowchartLink> and <sequenceLink>Sequence Diagrams</sequenceLink> are supported. The other types will be rendered as image in Excalidraw.","syntax":"Mermaid Syntax","preview":"Preview"}}`)},4451:function(fe){fe.exports=JSON.parse('{"ar-SA":99,"az-AZ":18,"bg-BG":75,"bn-BD":55,"ca-ES":81,"cs-CZ":91,"da-DK":31,"de-DE":100,"el-GR":85,"en":100,"es-ES":96,"eu-ES":99,"fa-IR":87,"fi-FI":81,"fr-FR":98,"gl-ES":90,"he-IL":81,"hi-IN":75,"hu-HU":70,"id-ID":96,"it-IT":99,"ja-JP":95,"kaa":34,"kab-KAB":80,"kk-KZ":20,"km-KH":87,"ko-KR":100,"ku-TR":92,"lt-LT":51,"lv-LV":82,"mr-IN":92,"my-MM":37,"nb-NO":99,"nl-NL":79,"nn-NO":71,"oc-FR":79,"pa-IN":82,"pl-PL":100,"pt-BR":96,"pt-PT":88,"ro-RO":98,"ru-RU":94,"si-LK":8,"sk-SK":99,"sl-SI":100,"sv-SE":100,"ta-IN":85,"th-TH":46,"tr-TR":91,"uk-UA":99,"vi-VN":51,"zh-CN":99,"zh-HK":24,"zh-TW":100}')}},ct={};function kt(fe){var Q=ct[fe];if(Q!==void 0)return Q.exports;var t=ct[fe]={id:fe,exports:{}};return tt[fe].call(t.exports,t,t.exports,kt),t.exports}kt.m=tt,kt.n=function(fe){var Q=fe&&fe.__esModule?function(){return fe.default}:function(){return fe};return kt.d(Q,{a:Q}),Q},J=Object.getPrototypeOf?function(fe){return Object.getPrototypeOf(fe)}:function(fe){return fe.__proto__},kt.t=function(fe,Q){if(1&Q&&(fe=this(fe)),8&Q||typeof fe=="object"&&fe&&(4&Q&&fe.__esModule||16&Q&&typeof fe.then=="function"))return fe;var t=Object.create(null);kt.r(t);var T={};F=F||[null,J({}),J([]),J(J)];for(var j=2&Q&&fe;typeof j=="object"&&!~F.indexOf(j);j=J(j))Object.getOwnPropertyNames(j).forEach(function(f){T[f]=function(){return fe[f]}});return T.default=function(){return fe},kt.d(t,T),t},kt.d=function(fe,Q){for(var t in Q)kt.o(Q,t)&&!kt.o(fe,t)&&Object.defineProperty(fe,t,{enumerable:!0,get:Q[t]})},kt.f={},kt.e=function(fe){return Promise.all(Object.keys(kt.f).reduce(function(Q,t){return kt.f[t](fe,Q),Q},[]))},kt.u=function(fe){return"excalidraw-assets/"+{22:"locales/kk-KZ-json",537:"locales/th-TH-json",663:"locales/kaa-json",1204:"locales/ja-JP-json",1302:"locales/si-LK-json",1477:"locales/my-MM-json",1513:"locales/el-GR-json",1628:"locales/bg-BG-json",1690:"locales/oc-FR-json",1790:"locales/da-DK-json",2091:"locales/ar-SA-json",2312:"locales/he-IL-json",2359:"locales/nb-NO-json",2404:"locales/ta-IN-json",2943:"locales/gl-ES-json",3024:"locales/nl-NL-json",3031:"locales/ku-TR-json",3082:"locales/de-DE-json",3162:"locales/pa-IN-json",3397:"locales/mr-IN-json",3421:"locales/zh-TW-json",3512:"locales/fi-FI-json",3674:"locales/pl-PL-json",3682:"locales/fr-FR-json",3721:"locales/pt-BR-json",3808:"locales/id-ID-json",3885:"locales/nn-NO-json",4e3:"locales/vi-VN-json",4568:"locales/az-AZ-json",4680:"locales/zh-CN-json",4736:"vendor",4977:"locales/tr-TR-json",5089:"locales/ro-RO-json",5130:"locales/ca-ES-json",5330:"locales/fa-IR-json",5395:"locales/pt-PT-json",6071:"locales/sl-SI-json",6239:"locales/it-IT-json",6265:"locales/cs-CZ-json",6566:"locales/km-KH-json",6768:"locales/lv-LV-json",6844:"locales/ko-KR-json",7368:"locales/hu-HU-json",7429:"locales/bn-BD-json",7759:"locales/uk-UA-json",7920:"locales/zh-HK-json",8081:"locales/eu-ES-json",8124:"locales/ru-RU-json",8340:"locales/lt-LT-json",8534:"locales/sv-SE-json",8750:"locales/sk-SK-json",8759:"locales/es-ES-json",9551:"locales/kab-KAB-json",9828:"locales/hi-IN-json"}[fe]+"-"+{22:"2224f237cc93465f126f",537:"9a390d3cc7a7a6226b63",663:"4d0a4868835d0334a549",1204:"2cb067da0fb518e73564",1302:"4921d4298abfa256fe6f",1477:"3ba296b6fcf2a2197a7c",1513:"4cbc2dbda5a5df636ee1",1628:"42fb0378311f3ade2627",1690:"644a5eaa1311f70cb697",1790:"a94944ac6fa9756d2fac",2091:"db7c644ccbeb85d54a47",2312:"a7bc2a673875b2e655e1",2359:"798d785698d467e76fcf",2404:"2fa1854af68381c61913",2943:"d11c7966c3c2f95756e0",3024:"2cf913fe2f491c5d7075",3031:"bafa8865ed7002bb249e",3082:"d82053ab52357510811b",3162:"165c5c2760688033b2cc",3397:"ad1359c30c334d05eee0",3421:"5a3fa7cacfa83c411d89",3512:"64c8902f10425e1b2e81",3674:"35c1f168f53af24b657a",3682:"d16a471290ba26a6c66a",3721:"370215dc506c58ee3217",3808:"6542dd92ab54a2c1c48e",3885:"aa607835ad9408789c5f",4e3:"9c1c2a9fa9d6b5a58223",4568:"08a6de50238dbb21926c",4680:"069c304b5011429be615",4736:"677e88ca78c86bddf13d",4977:"fc9b16e9dc2be2660439",5089:"3c32b962880e225d3416",5130:"a6b2c18f7e85cfd11599",5330:"76b039039b043cc4280c",5395:"6f3d80656622a222b4e2",6071:"efb839ef0456f5c72e6e",6239:"ab410570df07304cb0ca",6265:"ea03835d73f9b921f7c4",6566:"cbe8e2e8d26d30a3175c",6768:"f7f9363e42ee2e3a7c67",6844:"c2387972637d47f15765",7368:"0419027d32efac73d518",7429:"9ad9e5ae95c4c66297b1",7759:"82753e98dced302ac187",7920:"d9bf1e4e2d1f8650c680",8081:"671a4afcfce7b0a7660b",8124:"e1f4ed9d2d074f778304",8340:"9b7e91a51b90ee551cad",8534:"cfab3adbd37dd273c61e",8750:"27b59d7e026675f929c4",8759:"7afb66536ee40d852fa2",9551:"0d400ba2836cc0752cd6",9828:"4947c9dace32cc3c6eef"}[fe]+".js"},kt.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),kt.o=function(fe,Q){return Object.prototype.hasOwnProperty.call(fe,Q)},Me={},qe="ExcalidrawLib:",kt.l=function(fe,Q,t,T){if(Me[fe])Me[fe].push(Q);else{var j,f;if(t!==void 0)for(var l=document.getElementsByTagName("script"),v=0;v<l.length;v++){var k=l[v];if(k.getAttribute("src")==fe||k.getAttribute("data-webpack")==qe+t){j=k;break}}j||(f=!0,(j=document.createElement("script")).charset="utf-8",j.timeout=120,kt.nc&&j.setAttribute("nonce",kt.nc),j.setAttribute("data-webpack",qe+t),j.src=fe),Me[fe]=[Q];var g=function(P,R){j.onerror=j.onload=null,clearTimeout(a);var K=Me[fe];if(delete Me[fe],j.parentNode&&j.parentNode.removeChild(j),K&&K.forEach(function(U){return U(R)}),P)return P(R)},a=setTimeout(g.bind(null,void 0,{type:"timeout",target:j}),12e4);j.onerror=g.bind(null,j.onerror),j.onload=g.bind(null,j.onload),f&&document.head.appendChild(j)}},kt.r=function(fe){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(fe,"__esModule",{value:!0})},kt.p="",function(){kt.b=document.baseURI||self.location.href;var fe={1388:0};kt.f.j=function(T,j){var f=kt.o(fe,T)?fe[T]:void 0;if(f!==0)if(f)j.push(f[2]);else{var l=new Promise(function(g,a){f=fe[T]=[g,a]});j.push(f[2]=l);var v=kt.p+kt.u(T),k=new Error;kt.l(v,function(g){if(kt.o(fe,T)&&((f=fe[T])!==0&&(fe[T]=void 0),f)){var a=g&&(g.type==="load"?"missing":g.type),P=g&&g.target&&g.target.src;k.message="Loading chunk "+T+` failed.
|
|
186
|
+
(`+a+": "+P+")",k.name="ChunkLoadError",k.type=a,k.request=P,f[1](k)}},"chunk-"+T,T)}};var Q=function(T,j){var f,l,v=j[0],k=j[1],g=j[2],a=0;if(v.some(function(P){return fe[P]!==0})){for(f in k)kt.o(k,f)&&(kt.m[f]=k[f]);g&&g(kt)}for(T&&T(j);a<v.length;a++)l=v[a],kt.o(fe,l)&&fe[l]&&fe[l][0](),fe[l]=0},t=self.webpackChunkExcalidrawLib=self.webpackChunkExcalidrawLib||[];t.forEach(Q.bind(null,0)),t.push=Q.bind(null,t.push.bind(t))}(),kt.nc=void 0;var At={};return function(){kt.r(At),kt.d(At,{Button:function(){return m.zx},DefaultSidebar:function(){return m.Or},Excalidraw:function(){return m.Eb},FONT_FAMILY:function(){return m.ut},Footer:function(){return m.$_},LiveCollaborationTrigger:function(){return m.vO},MIME_TYPES:function(){return m.LO},MainMenu:function(){return m.lb},Sidebar:function(){return m.YE},THEME:function(){return m.C6},WelcomeScreen:function(){return m.B4},bumpVersion:function(){return m.ZP},convertToExcalidrawElements:function(){return m.wc},defaultLang:function(){return m.Fp},elementPartiallyOverlapsWithOrContainsBBox:function(){return m.sQ},elementsOverlappingBBox:function(){return m.Xs},exportToBlob:function(){return m.Fl},exportToCanvas:function(){return m.NL},exportToClipboard:function(){return m.i1},exportToSvg:function(){return m.$D},getCommonBounds:function(){return m.KP},getFreeDrawSvgPath:function(){return m.N7},getNonDeletedElements:function(){return m.Lm},getSceneVersion:function(){return m.Uo},isElementInsideBBox:function(){return m.Ne},isInvisiblySmallElement:function(){return m.QD},isLinearElement:function(){return m.bt},languages:function(){return m.Mj},loadFromBlob:function(){return m.cT},loadLibraryFromBlob:function(){return m.lV},loadSceneOrLibraryFromBlob:function(){return m.ZY},mergeLibraryItems:function(){return m.zh},mutateElement:function(){return m.DR},newElementWith:function(){return m.BE},normalizeLink:function(){return m.$u},parseLibraryTokensFromUrl:function(){return m.Di},restore:function(){return m.nu},restoreAppState:function(){return m.lY},restoreElements:function(){return m.ET},restoreLibraryItems:function(){return m.wJ},sceneCoordsToViewportCoords:function(){return m._i},serializeAsJSON:function(){return m.I_},serializeLibraryAsJSON:function(){return m.NI},useDevice:function(){return m.Fy},useHandleLibrary:function(){return m.xS},useI18n:function(){return m.QT},viewportCoordsToSceneCoords:function(){return m.dE}}),kt(9937).Vi.TEST!=="production"&&(kt.p=window.EXCALIDRAW_ASSET_PATH||"https://unpkg.com/".concat("@excalidraw/excalidraw","@").concat("0.17.6","/dist/"));var fe=function(){Array.prototype.at||Object.defineProperty(Array.prototype,"at",{value:function(G){if((G=Math.trunc(G)||0)<0&&(G+=this.length),!(G<0||G>=this.length))return this[G]},writable:!0,enumerable:!1,configurable:!0}),Element.prototype.replaceChildren||(Element.prototype.replaceChildren=function(){this.innerHTML="",this.append.apply(this,arguments)})},Q=kt(3379),t=kt.n(Q),T=kt(7795),j=kt.n(T),f=kt(569),l=kt.n(f),v=kt(3565),k=kt.n(v),g=kt(9216),a=kt.n(g),P=kt(4589),R=kt.n(P),K=kt(4295),U={};U.styleTagTransform=R(),U.setAttributes=k(),U.insert=l().bind(null,"head"),U.domAPI=j(),U.insertStyleElement=a(),t()(K.Z,U),K.Z&&K.Z.locals&&K.Z.locals;var m=kt(4864);fe()}(),At}()})})(gm);var p2=gm.exports;mm.exports=p2;var h2=mm.exports,m2=void 0,g2=function(e){var n=e.lang,i=n===void 0?"en":n,d=e.autoZoom,F=d===void 0?!0:d,J=e.edit,Me=J===void 0?!1:J,qe=e.src,tt=e.onlinkopen,ct=tt===void 0?function(){}:tt,kt=Mi.useState(),At=kt[0],fe=kt[1],Q=function(v,k){var g;return function(){for(var a=[],P=0;P<arguments.length;P++)a[P]=arguments[P];clearTimeout(g),g=setTimeout(function(){v.apply(m2,a)},k)}},t=function(){F&&(At==null||At.scrollToContent(void 0,{fitToViewport:!0,viewportZoomFactor:.9}))};Mi.useEffect(function(){var v=function(k){k.which===32&&k.target===document.body&&k.preventDefault()};return window.addEventListener("keydown",v),function(){window.removeEventListener("keydown",v)}},[]),Mi.useEffect(function(){var v=Q(t,300);return window.addEventListener("resize",v),function(){window.removeEventListener("resize",v)}},[At,F]);var T=function(v){v.matches?At==null||At.updateScene({appState:{theme:"dark"}}):At==null||At.updateScene({appState:{theme:"light"}})},j=window.matchMedia("(prefers-color-scheme: dark)");Mi.useEffect(function(){return j.addEventListener("change",T),function(){j.removeEventListener("change",T)}},[At]),Mi.useEffect(function(){F&&setTimeout(function(){At==null||At.scrollToContent(void 0,{fitToViewport:!0,viewportZoomFactor:.9})},2e3)},[At,F]);var f=Mi.useCallback(function(v,k){var g=v.link,a=k.detail.nativeEvent,P=a.ctrlKey||a.metaKey,R=a.shiftKey;!P&&!R&&g&&(k.preventDefault(),ct(g))},[]),l=function(){return o2(void 0,void 0,void 0,function(){return i2(this,function(v){return[2,fetch(qe).then(function(k){return k.json()}).then(function(k){return Rl(Rl({},k),{scrollToContent:F,appState:Rl(Rl({},k==null?void 0:k.appState),{collaborators:[],theme:j.matches?"dark":"light"})})}).catch(function(){return{}})]})})};return f2.jsx(h2.Excalidraw,{excalidrawAPI:function(v){return fe(v)},langCode:i,onLinkOpen:f,initialData:l(),viewModeEnabled:!Me})};customElements.define("hyperbook-excalidraw",r2(g2,{props:{lang:"string",autoZoom:"boolean",edit:"boolean",src:"string",onlinkopen:"function"}}))});
|