@excalidraw/excalidraw 0.17.1-d2f67e6 → 0.17.1-e63dd02
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/CHANGELOG.md +4 -0
- package/dist/browser/dev/excalidraw-assets-dev/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-EM6LVGFW.js → chunk-IT7T3AIK.js} +23 -5
- package/dist/browser/dev/excalidraw-assets-dev/chunk-IT7T3AIK.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{chunk-B4UMSLQQ.js → chunk-RNHSD5AR.js} +7451 -2098
- package/dist/browser/dev/excalidraw-assets-dev/chunk-RNHSD5AR.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{dist-6QVAH5JA.js → dist-DNSPZDOZ.js} +31 -19
- package/dist/browser/dev/excalidraw-assets-dev/dist-DNSPZDOZ.js.map +7 -0
- package/dist/browser/dev/excalidraw-assets-dev/{en-AZFA5HJJ.js → en-XV7OZCPP.js} +6 -2
- package/dist/browser/dev/excalidraw-assets-dev/{image-V7E6IT6R.js → image-77HZYGLG.js} +2 -2
- package/dist/browser/dev/excalidraw-assets-dev/{image-O66MQ7WQ.css → image-WDHYGKKP.css} +1 -1
- package/dist/browser/dev/excalidraw-assets-dev/{image-O66MQ7WQ.css.map → image-WDHYGKKP.css.map} +2 -2
- package/dist/browser/dev/index.css +449 -114
- package/dist/browser/dev/index.css.map +3 -3
- package/dist/browser/dev/index.js +4143 -5956
- package/dist/browser/dev/index.js.map +4 -4
- package/dist/browser/prod/excalidraw-assets/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/chunk-OYEADJSR.js +63 -0
- package/dist/browser/prod/excalidraw-assets/{chunk-7DXALCB2.js → chunk-PDYFZJMS.js} +3 -3
- package/dist/browser/prod/excalidraw-assets/dist-NLUQPPQQ.js +7 -0
- package/dist/browser/prod/excalidraw-assets/en-YVAVVILW.js +1 -0
- package/dist/browser/prod/excalidraw-assets/image-X3GFZHNN.js +1 -0
- package/dist/browser/prod/index.css +1 -1
- package/dist/browser/prod/index.js +40 -50
- package/dist/dev/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
- package/dist/dev/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
- package/dist/dev/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
- package/dist/dev/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
- package/dist/dev/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
- package/dist/dev/{en-EB2MBPAV.json → en-YNVBSAIL.json} +18 -4
- package/dist/dev/index.css +449 -114
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +21626 -18122
- package/dist/dev/index.js.map +4 -4
- package/dist/excalidraw/actions/actionAddToLibrary.d.ts +9 -3
- package/dist/excalidraw/actions/actionBoundText.d.ts +6 -2
- package/dist/excalidraw/actions/actionCanvas.d.ts +36 -12
- package/dist/excalidraw/actions/actionClipboard.d.ts +22 -7
- package/dist/excalidraw/actions/actionDeleteSelected.d.ts +12 -5
- package/dist/excalidraw/actions/actionDeleteSelected.js +24 -5
- package/dist/excalidraw/actions/actionDuplicateSelection.js +1 -2
- package/dist/excalidraw/actions/actionElementLock.d.ts +6 -2
- package/dist/excalidraw/actions/actionExport.d.ts +27 -9
- package/dist/excalidraw/actions/actionFinalize.d.ts +6 -2
- package/dist/excalidraw/actions/actionFinalize.js +2 -2
- package/dist/excalidraw/actions/actionFlip.js +2 -2
- package/dist/excalidraw/actions/actionFrame.d.ts +12 -4
- package/dist/excalidraw/actions/actionGroup.d.ts +6 -2
- package/dist/excalidraw/actions/actionHistory.js +4 -4
- package/dist/excalidraw/actions/actionLinearEditor.d.ts +3 -1
- package/dist/excalidraw/actions/actionLinearEditor.js +3 -2
- package/dist/excalidraw/actions/actionLink.d.ts +3 -1
- package/dist/excalidraw/actions/actionMenu.d.ts +9 -3
- package/dist/excalidraw/actions/actionNavigate.d.ts +6 -2
- package/dist/excalidraw/actions/actionProperties.d.ts +411 -56
- package/dist/excalidraw/actions/actionProperties.js +383 -58
- package/dist/excalidraw/actions/actionSelectAll.d.ts +3 -1
- package/dist/excalidraw/actions/actionStyles.d.ts +3 -1
- package/dist/excalidraw/actions/actionStyles.js +3 -2
- package/dist/excalidraw/actions/actionToggleGridMode.d.ts +3 -1
- package/dist/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +3 -1
- package/dist/excalidraw/actions/actionToggleStats.d.ts +3 -1
- package/dist/excalidraw/actions/actionToggleViewMode.d.ts +3 -1
- package/dist/excalidraw/actions/actionToggleZenMode.d.ts +3 -1
- package/dist/excalidraw/actions/types.d.ts +1 -1
- package/dist/excalidraw/analytics.js +9 -7
- package/dist/excalidraw/appState.d.ts +1 -0
- package/dist/excalidraw/appState.js +9 -1
- package/dist/excalidraw/binaryheap.d.ts +12 -0
- package/dist/excalidraw/binaryheap.js +93 -0
- package/dist/excalidraw/change.d.ts +2 -1
- package/dist/excalidraw/change.js +6 -4
- package/dist/excalidraw/charts.js +0 -10
- package/dist/excalidraw/components/Actions.js +7 -5
- package/dist/excalidraw/components/App.d.ts +5 -9
- package/dist/excalidraw/components/App.js +218 -161
- package/dist/excalidraw/components/ButtonIcon.d.ts +15 -0
- package/dist/excalidraw/components/ButtonIcon.js +8 -0
- package/dist/excalidraw/components/ButtonIconSelect.js +2 -3
- package/dist/excalidraw/components/ButtonSeparator.d.ts +2 -0
- package/dist/excalidraw/components/ButtonSeparator.js +7 -0
- package/dist/excalidraw/components/ColorPicker/ColorPicker.js +47 -79
- package/dist/excalidraw/components/ColorPicker/Picker.js +1 -1
- package/dist/excalidraw/components/FontPicker/FontPicker.d.ts +21 -0
- package/dist/excalidraw/components/FontPicker/FontPicker.js +49 -0
- package/dist/excalidraw/components/FontPicker/FontPickerList.d.ts +25 -0
- package/dist/excalidraw/components/FontPicker/FontPickerList.js +119 -0
- package/dist/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +7 -0
- package/dist/excalidraw/components/FontPicker/FontPickerTrigger.js +13 -0
- package/dist/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +14 -0
- package/dist/excalidraw/components/FontPicker/keyboardNavHandlers.js +38 -0
- package/dist/excalidraw/components/HelpDialog.js +1 -1
- package/dist/excalidraw/components/HintViewer.js +6 -3
- package/dist/excalidraw/components/PropertiesPopover.d.ts +15 -0
- package/dist/excalidraw/components/PropertiesPopover.js +31 -0
- package/dist/excalidraw/components/QuickSearch.d.ts +9 -0
- package/dist/excalidraw/components/QuickSearch.js +8 -0
- package/dist/excalidraw/components/ScrollableList.d.ts +9 -0
- package/dist/excalidraw/components/ScrollableList.js +8 -0
- package/dist/excalidraw/components/Stats/Angle.d.ts +7 -3
- package/dist/excalidraw/components/Stats/Angle.js +39 -31
- package/dist/excalidraw/components/Stats/Dimension.d.ts +6 -3
- package/dist/excalidraw/components/Stats/Dimension.js +51 -49
- package/dist/excalidraw/components/Stats/DragInput.d.ts +15 -6
- package/dist/excalidraw/components/Stats/DragInput.js +59 -26
- package/dist/excalidraw/components/Stats/FontSize.d.ts +8 -4
- package/dist/excalidraw/components/Stats/FontSize.js +39 -36
- package/dist/excalidraw/components/Stats/MultiAngle.d.ts +5 -3
- package/dist/excalidraw/components/Stats/MultiAngle.js +43 -34
- package/dist/excalidraw/components/Stats/MultiDimension.d.ts +5 -3
- package/dist/excalidraw/components/Stats/MultiDimension.js +101 -99
- package/dist/excalidraw/components/Stats/MultiFontSize.d.ts +6 -3
- package/dist/excalidraw/components/Stats/MultiFontSize.js +47 -32
- package/dist/excalidraw/components/Stats/MultiPosition.d.ts +3 -1
- package/dist/excalidraw/components/Stats/MultiPosition.js +52 -48
- package/dist/excalidraw/components/Stats/Position.d.ts +5 -1
- package/dist/excalidraw/components/Stats/Position.js +31 -29
- package/dist/excalidraw/components/Stats/index.js +5 -17
- package/dist/excalidraw/components/Stats/utils.d.ts +14 -3
- package/dist/excalidraw/components/Stats/utils.js +48 -9
- package/dist/excalidraw/components/TTDDialog/common.d.ts +2 -2
- package/dist/excalidraw/components/TTDDialog/common.js +3 -7
- package/dist/excalidraw/components/UserList.js +22 -22
- package/dist/excalidraw/components/canvases/StaticCanvas.js +1 -0
- package/dist/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +12 -3
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +24 -4
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItem.js +55 -14
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +2 -1
- package/dist/excalidraw/components/dropdownMenu/DropdownMenuItemContent.js +2 -2
- package/dist/excalidraw/components/dropdownMenu/common.d.ts +1 -1
- package/dist/excalidraw/components/dropdownMenu/common.js +3 -2
- package/dist/excalidraw/components/icons.d.ts +4 -0
- package/dist/excalidraw/components/icons.js +7 -0
- package/dist/excalidraw/components/main-menu/MainMenu.d.ts +12 -3
- package/dist/excalidraw/components/welcome-screen/WelcomeScreen.Center.js +2 -2
- package/dist/excalidraw/components/welcome-screen/WelcomeScreen.Hints.js +3 -3
- package/dist/excalidraw/constants.d.ts +17 -2
- package/dist/excalidraw/constants.js +21 -4
- package/dist/excalidraw/data/reconcile.js +18 -1
- package/dist/excalidraw/data/restore.js +55 -9
- package/dist/excalidraw/data/transform.js +8 -5
- package/dist/excalidraw/element/binding.d.ts +28 -9
- package/dist/excalidraw/element/binding.js +303 -71
- package/dist/excalidraw/element/collision.d.ts +1 -1
- package/dist/excalidraw/element/collision.js +4 -1
- package/dist/excalidraw/element/dragElements.d.ts +2 -2
- package/dist/excalidraw/element/dragElements.js +13 -3
- package/dist/excalidraw/element/embeddable.d.ts +3 -1
- package/dist/excalidraw/element/heading.d.ts +11 -0
- package/dist/excalidraw/element/heading.js +81 -0
- package/dist/excalidraw/element/index.d.ts +1 -1
- package/dist/excalidraw/element/index.js +1 -1
- package/dist/excalidraw/element/linearElementEditor.d.ts +21 -13
- package/dist/excalidraw/element/linearElementEditor.js +133 -56
- package/dist/excalidraw/element/newElement.d.ts +8 -3
- package/dist/excalidraw/element/newElement.js +15 -2
- package/dist/excalidraw/element/resizeElements.d.ts +4 -3
- package/dist/excalidraw/element/resizeElements.js +47 -23
- package/dist/excalidraw/element/routing.d.ts +13 -0
- package/dist/excalidraw/element/routing.js +641 -0
- package/dist/excalidraw/element/textElement.d.ts +3 -26
- package/dist/excalidraw/element/textElement.js +54 -110
- package/dist/excalidraw/element/textWysiwyg.js +39 -47
- package/dist/excalidraw/element/transformHandles.js +7 -2
- package/dist/excalidraw/element/typeChecks.d.ts +5 -2
- package/dist/excalidraw/element/typeChecks.js +17 -0
- package/dist/excalidraw/element/types.d.ts +12 -1
- package/dist/excalidraw/fonts/ExcalidrawFont.d.ts +21 -0
- package/dist/excalidraw/fonts/ExcalidrawFont.js +112 -0
- package/dist/excalidraw/fonts/index.d.ts +58 -0
- package/dist/excalidraw/fonts/index.js +240 -0
- package/dist/excalidraw/fonts/metadata.d.ts +36 -0
- package/dist/excalidraw/fonts/metadata.js +91 -0
- package/dist/excalidraw/fractionalIndex.d.ts +11 -4
- package/dist/excalidraw/fractionalIndex.js +38 -6
- package/dist/excalidraw/frame.d.ts +1 -1
- package/dist/excalidraw/frame.js +3 -3
- package/dist/excalidraw/history.d.ts +4 -3
- package/dist/excalidraw/history.js +8 -8
- package/dist/excalidraw/index.d.ts +1 -1
- package/dist/excalidraw/index.js +3 -3
- package/dist/excalidraw/locales/en.json +18 -4
- package/dist/excalidraw/math.d.ts +43 -0
- package/dist/excalidraw/math.js +110 -0
- package/dist/excalidraw/mermaid.js +4 -3
- package/dist/excalidraw/renderer/interactiveScene.js +33 -17
- package/dist/excalidraw/renderer/renderElement.d.ts +2 -0
- package/dist/excalidraw/renderer/renderElement.js +74 -54
- package/dist/excalidraw/renderer/staticSvgScene.js +2 -1
- package/dist/excalidraw/scene/Scene.js +9 -3
- package/dist/excalidraw/scene/Shape.js +56 -5
- package/dist/excalidraw/scene/comparisons.d.ts +1 -0
- package/dist/excalidraw/scene/comparisons.js +1 -1
- package/dist/excalidraw/scene/export.d.ts +2 -1
- package/dist/excalidraw/scene/export.js +33 -35
- package/dist/excalidraw/scene/types.d.ts +1 -4
- package/dist/excalidraw/shapes.d.ts +8 -0
- package/dist/excalidraw/shapes.js +57 -0
- package/dist/excalidraw/types.d.ts +8 -3
- package/dist/excalidraw/utils.d.ts +11 -1
- package/dist/excalidraw/utils.js +22 -0
- package/dist/prod/CascadiaCode-Regular-TMZI7IJ5.woff2 +0 -0
- package/dist/prod/ComicShanns-Regular-6TOETDFT.woff2 +0 -0
- package/dist/prod/Excalifont-Regular-CPKEUDVM.woff2 +0 -0
- package/dist/prod/LiberationSans-Regular-ZQD73GJM.woff2 +0 -0
- package/dist/prod/Virgil-Regular-YHAB2VGJ.woff2 +0 -0
- package/dist/prod/{en-EB2MBPAV.json → en-YNVBSAIL.json} +18 -4
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +49 -53
- package/dist/utils/export.d.ts +2 -1
- package/dist/utils/export.js +2 -1
- package/dist/utils/geometry/geometry.d.ts +2 -1
- package/dist/utils/geometry/geometry.js +5 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/history.ts +9 -2
- package/package.json +2 -2
- package/dist/browser/dev/Cascadia-CYPE3OJC.woff2 +0 -0
- package/dist/browser/dev/Virgil-UZN6MUT6.woff2 +0 -0
- package/dist/browser/dev/excalidraw-assets-dev/chunk-B4UMSLQQ.js.map +0 -7
- package/dist/browser/dev/excalidraw-assets-dev/chunk-EM6LVGFW.js.map +0 -7
- package/dist/browser/dev/excalidraw-assets-dev/dist-6QVAH5JA.js.map +0 -7
- package/dist/browser/prod/Cascadia-CYPE3OJC.woff2 +0 -0
- package/dist/browser/prod/Virgil-UZN6MUT6.woff2 +0 -0
- package/dist/browser/prod/excalidraw-assets/chunk-EGOLGOLD.js +0 -55
- package/dist/browser/prod/excalidraw-assets/dist-567JAXHK.js +0 -7
- package/dist/browser/prod/excalidraw-assets/en-6E7MYLWO.js +0 -1
- package/dist/browser/prod/excalidraw-assets/image-SI7BKULC.js +0 -1
- package/dist/dev/Cascadia-CYPE3OJC.woff2 +0 -0
- package/dist/dev/Virgil-UZN6MUT6.woff2 +0 -0
- package/dist/excalidraw/scene/Fonts.d.ts +0 -19
- package/dist/excalidraw/scene/Fonts.js +0 -66
- package/dist/prod/Cascadia-CYPE3OJC.woff2 +0 -0
- package/dist/prod/Virgil-UZN6MUT6.woff2 +0 -0
- /package/dist/browser/dev/{Assistant-Bold-ZDZZ6JHA.woff2 → excalidraw-assets-dev/Assistant-Bold-ZDZZ6JHA.woff2} +0 -0
- /package/dist/browser/dev/{Assistant-Medium-DZ25RZU3.woff2 → excalidraw-assets-dev/Assistant-Medium-DZ25RZU3.woff2} +0 -0
- /package/dist/browser/dev/{Assistant-Regular-PLF2XOGW.woff2 → excalidraw-assets-dev/Assistant-Regular-PLF2XOGW.woff2} +0 -0
- /package/dist/browser/dev/{Assistant-SemiBold-CZ5MX6FK.woff2 → excalidraw-assets-dev/Assistant-SemiBold-CZ5MX6FK.woff2} +0 -0
- /package/dist/browser/dev/excalidraw-assets-dev/{en-AZFA5HJJ.js.map → en-XV7OZCPP.js.map} +0 -0
- /package/dist/browser/dev/excalidraw-assets-dev/{image-V7E6IT6R.js.map → image-77HZYGLG.js.map} +0 -0
- /package/dist/browser/prod/{Assistant-Bold-ZDZZ6JHA.woff2 → excalidraw-assets/Assistant-Bold-ZDZZ6JHA.woff2} +0 -0
- /package/dist/browser/prod/{Assistant-Medium-DZ25RZU3.woff2 → excalidraw-assets/Assistant-Medium-DZ25RZU3.woff2} +0 -0
- /package/dist/browser/prod/{Assistant-Regular-PLF2XOGW.woff2 → excalidraw-assets/Assistant-Regular-PLF2XOGW.woff2} +0 -0
- /package/dist/browser/prod/{Assistant-SemiBold-CZ5MX6FK.woff2 → excalidraw-assets/Assistant-SemiBold-CZ5MX6FK.woff2} +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import{a as x,b as M}from"./chunk-M2JW2GFW.js";import{d as pe,f as An}from"./chunk-SXMPUQ6M.js";var ss=pe(as=>{x();var Vc;(function(e){typeof DO_NOT_EXPORT_CRC>"u"?typeof as=="object"?e(as):typeof define=="function"&&define.amd?define(function(){var t={};return e(t),t}):e(Vc={}):e(Vc={})})(function(e){e.version="0.3.0";function t(){for(var l=0,c=new Array(256),d=0;d!=256;++d)l=d,l=l&1?-306674912^l>>>1:l>>>1,l=l&1?-306674912^l>>>1:l>>>1,l=l&1?-306674912^l>>>1:l>>>1,l=l&1?-306674912^l>>>1:l>>>1,l=l&1?-306674912^l>>>1:l>>>1,l=l&1?-306674912^l>>>1:l>>>1,l=l&1?-306674912^l>>>1:l>>>1,l=l&1?-306674912^l>>>1:l>>>1,c[d]=l;return typeof Int32Array<"u"?new Int32Array(c):c}var n=t(),r=typeof Buffer<"u";function o(l){if(l.length>32768&&r)return a(new Buffer(l));for(var c=-1,d=l.length-1,p=0;p<d;)c=n[(c^l.charCodeAt(p++))&255]^c>>>8,c=n[(c^l.charCodeAt(p++))&255]^c>>>8;return p===d&&(c=c>>>8^n[(c^l.charCodeAt(p))&255]),c^-1}function i(l){if(l.length>1e4)return a(l);for(var c=-1,d=0,p=l.length-3;d<p;)c=c>>>8^n[(c^l[d++])&255],c=c>>>8^n[(c^l[d++])&255],c=c>>>8^n[(c^l[d++])&255],c=c>>>8^n[(c^l[d++])&255];for(;d<p+3;)c=c>>>8^n[(c^l[d++])&255];return c^-1}function a(l){for(var c=-1,d=0,p=l.length-7;d<p;)c=c>>>8^n[(c^l[d++])&255],c=c>>>8^n[(c^l[d++])&255],c=c>>>8^n[(c^l[d++])&255],c=c>>>8^n[(c^l[d++])&255],c=c>>>8^n[(c^l[d++])&255],c=c>>>8^n[(c^l[d++])&255],c=c>>>8^n[(c^l[d++])&255],c=c>>>8^n[(c^l[d++])&255];for(;d<p+7;)c=c>>>8^n[(c^l[d++])&255];return c^-1}function s(l){for(var c=-1,d=0,p=l.length,f,h;d<p;)f=l.charCodeAt(d++),f<128?c=c>>>8^n[(c^f)&255]:f<2048?(c=c>>>8^n[(c^(192|f>>6&31))&255],c=c>>>8^n[(c^(128|f&63))&255]):f>=55296&&f<57344?(f=(f&1023)+64,h=l.charCodeAt(d++)&1023,c=c>>>8^n[(c^(240|f>>8&7))&255],c=c>>>8^n[(c^(128|f>>2&63))&255],c=c>>>8^n[(c^(128|h>>6&15|f&3))&255],c=c>>>8^n[(c^(128|h&63))&255]):(c=c>>>8^n[(c^(224|f>>12&15))&255],c=c>>>8^n[(c^(128|f>>6&63))&255],c=c>>>8^n[(c^(128|f&63))&255]);return c^-1}e.table=n,e.bstr=o,e.buf=i,e.str=s})});var Yc=pe((ky,Xc)=>{x();var W0=ss();Xc.exports=Y0;var Lt=new Uint8Array(4),V0=new Int32Array(Lt.buffer),X0=new Uint32Array(Lt.buffer);function Y0(e){if(e[0]!==137)throw new Error("Invalid .png file header");if(e[1]!==80)throw new Error("Invalid .png file header");if(e[2]!==78)throw new Error("Invalid .png file header");if(e[3]!==71)throw new Error("Invalid .png file header");if(e[4]!==13)throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(e[5]!==10)throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");if(e[6]!==26)throw new Error("Invalid .png file header");if(e[7]!==10)throw new Error("Invalid .png file header: possibly caused by DOS-Unix line ending conversion?");for(var t=!1,n=[],r=8;r<e.length;){Lt[3]=e[r++],Lt[2]=e[r++],Lt[1]=e[r++],Lt[0]=e[r++];var o=X0[0]+4,i=new Uint8Array(o);i[0]=e[r++],i[1]=e[r++],i[2]=e[r++],i[3]=e[r++];var a=String.fromCharCode(i[0])+String.fromCharCode(i[1])+String.fromCharCode(i[2])+String.fromCharCode(i[3]);if(!n.length&&a!=="IHDR")throw new Error("IHDR header missing");if(a==="IEND"){t=!0,n.push({name:a,data:new Uint8Array(0)});break}for(var s=4;s<o;s++)i[s]=e[r++];Lt[3]=e[r++],Lt[2]=e[r++],Lt[1]=e[r++],Lt[0]=e[r++];var l=V0[0],c=W0.buf(i);if(c!==l)throw new Error("CRC values for "+a+" header do not match, PNG file is likely corrupted");var d=new Uint8Array(i.buffer.slice(4));n.push({name:a,data:d})}if(!t)throw new Error(".png file ended prematurely: no IEND header was found");return n}});var Zc=pe((Cy,$c)=>{x();$c.exports=$0;function $0(e,t){if(e=String(e),t=String(t),!/^[\x00-\xFF]+$/.test(e)||!/^[\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(e.length>=80)throw new Error('Keyword "'+e+'" is longer than the 79-character limit imposed by the PNG specification');for(var n=e.length+t.length+1,r=new Uint8Array(n),o=0,i,a=0;a<e.length;a++){if(!(i=e.charCodeAt(a)))throw new Error("0x00 character is not permitted in tEXt keywords");r[o++]=i}r[o++]=0;for(var s=0;s<t.length;s++){if(!(i=t.charCodeAt(s)))throw new Error("0x00 character is not permitted in tEXt content");r[o++]=i}return{name:"tEXt",data:r}}});var jc=pe((Ry,Kc)=>{x();Kc.exports=Z0;function Z0(e){e.data&&e.name&&(e=e.data);for(var t=!0,n="",r="",o=0;o<e.length;o++){var i=e[o];if(t)i?r+=String.fromCharCode(i):t=!1;else if(i)n+=String.fromCharCode(i);else throw new Error("Invalid NULL character found. 0x00 character is not permitted in tEXt content")}return{keyword:r,text:n}}});var qc=pe(ls=>{x();ls.encode=Zc();ls.decode=jc()});var Qc=pe((By,Jc)=>{x();Jc.exports=function(e,t,n){var r=[],o=e.length;if(o===0)return r;var i=t<0?Math.max(0,t+o):t||0;for(n!==void 0&&(o=n<0?n+o:n);o-- >i;)r[o-i]=e[o];return r}});var td=pe((zy,ed)=>{x();var K0=Qc(),j0=ss();ed.exports=Q0;var Ct=new Uint8Array(4),q0=new Int32Array(Ct.buffer),J0=new Uint32Array(Ct.buffer);function Q0(e){var t=8,n=t,r;for(r=0;r<e.length;r++)t+=e[r].data.length,t+=12;var o=new Uint8Array(t);for(o[0]=137,o[1]=80,o[2]=78,o[3]=71,o[4]=13,o[5]=10,o[6]=26,o[7]=10,r=0;r<e.length;r++){var i=e[r],a=i.name,s=i.data,l=s.length,c=[a.charCodeAt(0),a.charCodeAt(1),a.charCodeAt(2),a.charCodeAt(3)];J0[0]=l,o[n++]=Ct[3],o[n++]=Ct[2],o[n++]=Ct[1],o[n++]=Ct[0],o[n++]=c[0],o[n++]=c[1],o[n++]=c[2],o[n++]=c[3];for(var d=0;d<l;)o[n++]=s[d++];var p=c.concat(K0(s)),f=j0.buf(p);q0[0]=f,o[n++]=Ct[3],o[n++]=Ct[2],o[n++]=Ct[1],o[n++]=Ct[0]}return o}});var tn=pe(De=>{"use strict";x();var em=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function tm(e,t){return Object.prototype.hasOwnProperty.call(e,t)}De.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(var r in n)tm(n,r)&&(e[r]=n[r])}}return e};De.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var nm={arraySet:function(e,t,n,r,o){if(t.subarray&&e.subarray){e.set(t.subarray(n,n+r),o);return}for(var i=0;i<r;i++)e[o+i]=t[n+i]},flattenChunks:function(e){var t,n,r,o,i,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),o=0,t=0,n=e.length;t<n;t++)i=e[t],a.set(i,o),o+=i.length;return a}},rm={arraySet:function(e,t,n,r,o){for(var i=0;i<r;i++)e[o+i]=t[n+i]},flattenChunks:function(e){return[].concat.apply([],e)}};De.setTyped=function(e){e?(De.Buf8=Uint8Array,De.Buf16=Uint16Array,De.Buf32=Int32Array,De.assign(De,nm)):(De.Buf8=Array,De.Buf16=Array,De.Buf32=Array,De.assign(De,rm))};De.setTyped(em)});var Td=pe(Pr=>{"use strict";x();var om=tn(),im=4,nd=0,rd=1,am=2;function Ir(e){for(var t=e.length;--t>=0;)e[t]=0}var sm=0,cd=1,lm=2,cm=3,dm=258,ms=29,fo=256,lo=fo+1+ms,Sr=30,gs=19,dd=2*lo+1,Qn=15,cs=16,um=7,Es=256,ud=16,pd=17,fd=18,fs=[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],fi=[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],pm=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],hd=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],fm=512,nn=new Array((lo+2)*2);Ir(nn);var so=new Array(Sr*2);Ir(so);var co=new Array(fm);Ir(co);var uo=new Array(dm-cm+1);Ir(uo);var xs=new Array(ms);Ir(xs);var hi=new Array(Sr);Ir(hi);function ds(e,t,n,r,o){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=o,this.has_stree=e&&e.length}var md,gd,Ed;function us(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function xd(e){return e<256?co[e]:co[256+(e>>>7)]}function po(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function Ve(e,t,n){e.bi_valid>cs-n?(e.bi_buf|=t<<e.bi_valid&65535,po(e,e.bi_buf),e.bi_buf=t>>cs-e.bi_valid,e.bi_valid+=n-cs):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function Dt(e,t,n){Ve(e,n[t*2],n[t*2+1])}function wd(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function hm(e){e.bi_valid===16?(po(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function mm(e,t){var n=t.dyn_tree,r=t.max_code,o=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length,c,d,p,f,h,m,g=0;for(f=0;f<=Qn;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<dd;c++)d=e.heap[c],f=n[n[d*2+1]*2+1]+1,f>l&&(f=l,g++),n[d*2+1]=f,!(d>r)&&(e.bl_count[f]++,h=0,d>=s&&(h=a[d-s]),m=n[d*2],e.opt_len+=m*(f+h),i&&(e.static_len+=m*(o[d*2+1]+h)));if(g!==0){do{for(f=l-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[l]--,g-=2}while(g>0);for(f=l;f!==0;f--)for(d=e.bl_count[f];d!==0;)p=e.heap[--c],!(p>r)&&(n[p*2+1]!==f&&(e.opt_len+=(f-n[p*2+1])*n[p*2],n[p*2+1]=f),d--)}}function yd(e,t,n){var r=new Array(Qn+1),o=0,i,a;for(i=1;i<=Qn;i++)r[i]=o=o+n[i-1]<<1;for(a=0;a<=t;a++){var s=e[a*2+1];s!==0&&(e[a*2]=wd(r[s]++,s))}}function gm(){var e,t,n,r,o,i=new Array(Qn+1);for(n=0,r=0;r<ms-1;r++)for(xs[r]=n,e=0;e<1<<fs[r];e++)uo[n++]=r;for(uo[n-1]=r,o=0,r=0;r<16;r++)for(hi[r]=o,e=0;e<1<<fi[r];e++)co[o++]=r;for(o>>=7;r<Sr;r++)for(hi[r]=o<<7,e=0;e<1<<fi[r]-7;e++)co[256+o++]=r;for(t=0;t<=Qn;t++)i[t]=0;for(e=0;e<=143;)nn[e*2+1]=8,e++,i[8]++;for(;e<=255;)nn[e*2+1]=9,e++,i[9]++;for(;e<=279;)nn[e*2+1]=7,e++,i[7]++;for(;e<=287;)nn[e*2+1]=8,e++,i[8]++;for(yd(nn,lo+1,i),e=0;e<Sr;e++)so[e*2+1]=5,so[e*2]=wd(e,5);md=new ds(nn,fs,fo+1,lo,Qn),gd=new ds(so,fi,0,Sr,Qn),Ed=new ds(new Array(0),pm,0,gs,um)}function bd(e){var t;for(t=0;t<lo;t++)e.dyn_ltree[t*2]=0;for(t=0;t<Sr;t++)e.dyn_dtree[t*2]=0;for(t=0;t<gs;t++)e.bl_tree[t*2]=0;e.dyn_ltree[Es*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function vd(e){e.bi_valid>8?po(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Em(e,t,n,r){vd(e),r&&(po(e,n),po(e,~n)),om.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function od(e,t,n,r){var o=t*2,i=n*2;return e[o]<e[i]||e[o]===e[i]&&r[t]<=r[n]}function ps(e,t,n){for(var r=e.heap[n],o=n<<1;o<=e.heap_len&&(o<e.heap_len&&od(t,e.heap[o+1],e.heap[o],e.depth)&&o++,!od(t,r,e.heap[o],e.depth));)e.heap[n]=e.heap[o],n=o,o<<=1;e.heap[n]=r}function id(e,t,n){var r,o,i=0,a,s;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+i*2]<<8|e.pending_buf[e.d_buf+i*2+1],o=e.pending_buf[e.l_buf+i],i++,r===0?Dt(e,o,t):(a=uo[o],Dt(e,a+fo+1,t),s=fs[a],s!==0&&(o-=xs[a],Ve(e,o,s)),r--,a=xd(r),Dt(e,a,n),s=fi[a],s!==0&&(r-=hi[a],Ve(e,r,s)));while(i<e.last_lit);Dt(e,Es,t)}function hs(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.elems,a,s,l=-1,c;for(e.heap_len=0,e.heap_max=dd,a=0;a<i;a++)n[a*2]!==0?(e.heap[++e.heap_len]=l=a,e.depth[a]=0):n[a*2+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=l<2?++l:0,n[c*2]=1,e.depth[c]=0,e.opt_len--,o&&(e.static_len-=r[c*2+1]);for(t.max_code=l,a=e.heap_len>>1;a>=1;a--)ps(e,n,a);c=i;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ps(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[c*2]=n[a*2]+n[s*2],e.depth[c]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[a*2+1]=n[s*2+1]=c,e.heap[1]=c++,ps(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],mm(e,t),yd(n,l,e.bl_count)}function ad(e,t,n){var r,o=-1,i,a=t[0*2+1],s=0,l=7,c=4;for(a===0&&(l=138,c=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)i=a,a=t[(r+1)*2+1],!(++s<l&&i===a)&&(s<c?e.bl_tree[i*2]+=s:i!==0?(i!==o&&e.bl_tree[i*2]++,e.bl_tree[ud*2]++):s<=10?e.bl_tree[pd*2]++:e.bl_tree[fd*2]++,s=0,o=i,a===0?(l=138,c=3):i===a?(l=6,c=3):(l=7,c=4))}function sd(e,t,n){var r,o=-1,i,a=t[0*2+1],s=0,l=7,c=4;for(a===0&&(l=138,c=3),r=0;r<=n;r++)if(i=a,a=t[(r+1)*2+1],!(++s<l&&i===a)){if(s<c)do Dt(e,i,e.bl_tree);while(--s!==0);else i!==0?(i!==o&&(Dt(e,i,e.bl_tree),s--),Dt(e,ud,e.bl_tree),Ve(e,s-3,2)):s<=10?(Dt(e,pd,e.bl_tree),Ve(e,s-3,3)):(Dt(e,fd,e.bl_tree),Ve(e,s-11,7));s=0,o=i,a===0?(l=138,c=3):i===a?(l=6,c=3):(l=7,c=4)}}function xm(e){var t;for(ad(e,e.dyn_ltree,e.l_desc.max_code),ad(e,e.dyn_dtree,e.d_desc.max_code),hs(e,e.bl_desc),t=gs-1;t>=3&&e.bl_tree[hd[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function wm(e,t,n,r){var o;for(Ve(e,t-257,5),Ve(e,n-1,5),Ve(e,r-4,4),o=0;o<r;o++)Ve(e,e.bl_tree[hd[o]*2+1],3);sd(e,e.dyn_ltree,t-1),sd(e,e.dyn_dtree,n-1)}function ym(e){var t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return nd;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return rd;for(n=32;n<fo;n++)if(e.dyn_ltree[n*2]!==0)return rd;return nd}var ld=!1;function bm(e){ld||(gm(),ld=!0),e.l_desc=new us(e.dyn_ltree,md),e.d_desc=new us(e.dyn_dtree,gd),e.bl_desc=new us(e.bl_tree,Ed),e.bi_buf=0,e.bi_valid=0,bd(e)}function Md(e,t,n,r){Ve(e,(sm<<1)+(r?1:0),3),Em(e,t,n,!0)}function vm(e){Ve(e,cd<<1,3),Dt(e,Es,nn),hm(e)}function Mm(e,t,n,r){var o,i,a=0;e.level>0?(e.strm.data_type===am&&(e.strm.data_type=ym(e)),hs(e,e.l_desc),hs(e,e.d_desc),a=xm(e),o=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=o&&(o=i)):o=i=n+5,n+4<=o&&t!==-1?Md(e,t,n,r):e.strategy===im||i===o?(Ve(e,(cd<<1)+(r?1:0),3),id(e,nn,so)):(Ve(e,(lm<<1)+(r?1:0),3),wm(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),id(e,e.dyn_ltree,e.dyn_dtree)),bd(e),r&&vd(e)}function Tm(e,t,n){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=n&255,e.last_lit++,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(uo[n]+fo+1)*2]++,e.dyn_dtree[xd(t)*2]++),e.last_lit===e.lit_bufsize-1}Pr._tr_init=bm;Pr._tr_stored_block=Md;Pr._tr_flush_block=Mm;Pr._tr_tally=Tm;Pr._tr_align=vm});var ws=pe((Yy,Ad)=>{"use strict";x();function Am(e,t,n,r){for(var o=e&65535|0,i=e>>>16&65535|0,a=0;n!==0;){a=n>2e3?2e3:n,n-=a;do o=o+t[r++]|0,i=i+o|0;while(--a);o%=65521,i%=65521}return o|i<<16|0}Ad.exports=Am});var ys=pe((Zy,Sd)=>{"use strict";x();function Sm(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}var Im=Sm();function Pm(e,t,n,r){var o=Im,i=r+n;e^=-1;for(var a=r;a<i;a++)e=e>>>8^o[(e^t[a])&255];return e^-1}Sd.exports=Pm});var mi=pe((jy,Id)=>{"use strict";x();Id.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"}});var Od=pe(Ot=>{"use strict";x();var Re=tn(),nt=Td(),Ld=ws(),Sn=ys(),_m=mi(),rr=0,km=1,Lm=3,Ln=4,Pd=5,Ft=0,_d=1,rt=-2,Cm=-3,bs=-5,Dm=-1,Rm=1,gi=2,Fm=3,Om=4,Nm=0,Bm=2,yi=8,Hm=9,zm=15,Gm=8,Um=29,Wm=256,Ms=Wm+1+Um,Vm=30,Xm=19,Ym=2*Ms+1,$m=15,te=3,_n=258,ct=_n+te+1,Zm=32,bi=42,Ts=69,Ei=73,xi=91,wi=103,er=113,mo=666,Te=1,go=2,tr=3,Lr=4,Km=3;function kn(e,t){return e.msg=_m[t],t}function kd(e){return(e<<1)-(e>4?9:0)}function Pn(e){for(var t=e.length;--t>=0;)e[t]=0}function In(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(Re.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function Pe(e,t){nt._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,In(e.strm)}function re(e,t){e.pending_buf[e.pending++]=t}function ho(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function jm(e,t,n,r){var o=e.avail_in;return o>r&&(o=r),o===0?0:(e.avail_in-=o,Re.arraySet(t,e.input,e.next_in,o,n),e.state.wrap===1?e.adler=Ld(e.adler,t,o,n):e.state.wrap===2&&(e.adler=Sn(e.adler,t,o,n)),e.next_in+=o,e.total_in+=o,o)}function Cd(e,t){var n=e.max_chain_length,r=e.strstart,o,i,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-ct?e.strstart-(e.w_size-ct):0,c=e.window,d=e.w_mask,p=e.prev,f=e.strstart+_n,h=c[r+a-1],m=c[r+a];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(o=t,!(c[o+a]!==m||c[o+a-1]!==h||c[o]!==c[r]||c[++o]!==c[r+1])){r+=2,o++;do;while(c[++r]===c[++o]&&c[++r]===c[++o]&&c[++r]===c[++o]&&c[++r]===c[++o]&&c[++r]===c[++o]&&c[++r]===c[++o]&&c[++r]===c[++o]&&c[++r]===c[++o]&&r<f);if(i=_n-(f-r),r=f-_n,i>a){if(e.match_start=t,a=i,i>=s)break;h=c[r+a-1],m=c[r+a]}}while((t=p[t&d])>l&&--n!==0);return a<=e.lookahead?a:e.lookahead}function nr(e){var t=e.w_size,n,r,o,i,a;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-ct)){Re.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do o=e.head[--n],e.head[n]=o>=t?o-t:0;while(--r);r=t,n=r;do o=e.prev[--n],e.prev[n]=o>=t?o-t:0;while(--r);i+=t}if(e.strm.avail_in===0)break;if(r=jm(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,e.lookahead+e.insert>=te)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[a+te-1])&e.hash_mask,e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<te)););}while(e.lookahead<ct&&e.strm.avail_in!==0)}function qm(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(nr(e),e.lookahead===0&&t===rr)return Te;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Pe(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-ct&&(Pe(e,!1),e.strm.avail_out===0))return Te}return e.insert=0,t===Ln?(Pe(e,!0),e.strm.avail_out===0?tr:Lr):(e.strstart>e.block_start&&(Pe(e,!1),e.strm.avail_out===0),Te)}function vs(e,t){for(var n,r;;){if(e.lookahead<ct){if(nr(e),e.lookahead<ct&&t===rr)return Te;if(e.lookahead===0)break}if(n=0,e.lookahead>=te&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+te-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-ct&&(e.match_length=Cd(e,n)),e.match_length>=te)if(r=nt._tr_tally(e,e.strstart-e.match_start,e.match_length-te),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=te){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+te-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=nt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Pe(e,!1),e.strm.avail_out===0))return Te}return e.insert=e.strstart<te-1?e.strstart:te-1,t===Ln?(Pe(e,!0),e.strm.avail_out===0?tr:Lr):e.last_lit&&(Pe(e,!1),e.strm.avail_out===0)?Te:go}function _r(e,t){for(var n,r,o;;){if(e.lookahead<ct){if(nr(e),e.lookahead<ct&&t===rr)return Te;if(e.lookahead===0)break}if(n=0,e.lookahead>=te&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+te-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=te-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-ct&&(e.match_length=Cd(e,n),e.match_length<=5&&(e.strategy===Rm||e.match_length===te&&e.strstart-e.match_start>4096)&&(e.match_length=te-1)),e.prev_length>=te&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-te,r=nt._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-te),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=o&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+te-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=te-1,e.strstart++,r&&(Pe(e,!1),e.strm.avail_out===0))return Te}else if(e.match_available){if(r=nt._tr_tally(e,0,e.window[e.strstart-1]),r&&Pe(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Te}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=nt._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<te-1?e.strstart:te-1,t===Ln?(Pe(e,!0),e.strm.avail_out===0?tr:Lr):e.last_lit&&(Pe(e,!1),e.strm.avail_out===0)?Te:go}function Jm(e,t){for(var n,r,o,i,a=e.window;;){if(e.lookahead<=_n){if(nr(e),e.lookahead<=_n&&t===rr)return Te;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=te&&e.strstart>0&&(o=e.strstart-1,r=a[o],r===a[++o]&&r===a[++o]&&r===a[++o])){i=e.strstart+_n;do;while(r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&r===a[++o]&&o<i);e.match_length=_n-(i-o),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=te?(n=nt._tr_tally(e,1,e.match_length-te),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=nt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Pe(e,!1),e.strm.avail_out===0))return Te}return e.insert=0,t===Ln?(Pe(e,!0),e.strm.avail_out===0?tr:Lr):e.last_lit&&(Pe(e,!1),e.strm.avail_out===0)?Te:go}function Qm(e,t){for(var n;;){if(e.lookahead===0&&(nr(e),e.lookahead===0)){if(t===rr)return Te;break}if(e.match_length=0,n=nt._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Pe(e,!1),e.strm.avail_out===0))return Te}return e.insert=0,t===Ln?(Pe(e,!0),e.strm.avail_out===0?tr:Lr):e.last_lit&&(Pe(e,!1),e.strm.avail_out===0)?Te:go}function Rt(e,t,n,r,o){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=o}var kr;kr=[new Rt(0,0,0,0,qm),new Rt(4,4,8,4,vs),new Rt(4,5,16,8,vs),new Rt(4,6,32,32,vs),new Rt(4,4,16,16,_r),new Rt(8,16,32,32,_r),new Rt(8,16,128,128,_r),new Rt(8,32,128,256,_r),new Rt(32,128,258,1024,_r),new Rt(32,258,258,4096,_r)];function e2(e){e.window_size=2*e.w_size,Pn(e.head),e.max_lazy_match=kr[e.level].max_lazy,e.good_match=kr[e.level].good_length,e.nice_match=kr[e.level].nice_length,e.max_chain_length=kr[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=te-1,e.match_available=0,e.ins_h=0}function t2(){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=yi,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 Re.Buf16(Ym*2),this.dyn_dtree=new Re.Buf16((2*Vm+1)*2),this.bl_tree=new Re.Buf16((2*Xm+1)*2),Pn(this.dyn_ltree),Pn(this.dyn_dtree),Pn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Re.Buf16($m+1),this.heap=new Re.Buf16(2*Ms+1),Pn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Re.Buf16(2*Ms+1),Pn(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 Dd(e){var t;return!e||!e.state?kn(e,rt):(e.total_in=e.total_out=0,e.data_type=Bm,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?bi:er,e.adler=t.wrap===2?0:1,t.last_flush=rr,nt._tr_init(t),Ft)}function Rd(e){var t=Dd(e);return t===Ft&&e2(e.state),t}function n2(e,t){return!e||!e.state||e.state.wrap!==2?rt:(e.state.gzhead=t,Ft)}function Fd(e,t,n,r,o,i){if(!e)return rt;var a=1;if(t===Dm&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),o<1||o>Hm||n!==yi||r<8||r>15||t<0||t>9||i<0||i>Om)return kn(e,rt);r===8&&(r=9);var s=new t2;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=o+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+te-1)/te),s.window=new Re.Buf8(s.w_size*2),s.head=new Re.Buf16(s.hash_size),s.prev=new Re.Buf16(s.w_size),s.lit_bufsize=1<<o+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Re.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=i,s.method=n,Rd(e)}function r2(e,t){return Fd(e,t,yi,zm,Gm,Nm)}function o2(e,t){var n,r,o,i;if(!e||!e.state||t>Pd||t<0)return e?kn(e,rt):rt;if(r=e.state,!e.output||!e.input&&e.avail_in!==0||r.status===mo&&t!==Ln)return kn(e,e.avail_out===0?bs:rt);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===bi)if(r.wrap===2)e.adler=0,re(r,31),re(r,139),re(r,8),r.gzhead?(re(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),re(r,r.gzhead.time&255),re(r,r.gzhead.time>>8&255),re(r,r.gzhead.time>>16&255),re(r,r.gzhead.time>>24&255),re(r,r.level===9?2:r.strategy>=gi||r.level<2?4:0),re(r,r.gzhead.os&255),r.gzhead.extra&&r.gzhead.extra.length&&(re(r,r.gzhead.extra.length&255),re(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Sn(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=Ts):(re(r,0),re(r,0),re(r,0),re(r,0),re(r,0),re(r,r.level===9?2:r.strategy>=gi||r.level<2?4:0),re(r,Km),r.status=er);else{var a=yi+(r.w_bits-8<<4)<<8,s=-1;r.strategy>=gi||r.level<2?s=0:r.level<6?s=1:r.level===6?s=2:s=3,a|=s<<6,r.strstart!==0&&(a|=Zm),a+=31-a%31,r.status=er,ho(r,a),r.strstart!==0&&(ho(r,e.adler>>>16),ho(r,e.adler&65535)),e.adler=1}if(r.status===Ts)if(r.gzhead.extra){for(o=r.pending;r.gzindex<(r.gzhead.extra.length&65535)&&!(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(e.adler=Sn(e.adler,r.pending_buf,r.pending-o,o)),In(e),o=r.pending,r.pending===r.pending_buf_size));)re(r,r.gzhead.extra[r.gzindex]&255),r.gzindex++;r.gzhead.hcrc&&r.pending>o&&(e.adler=Sn(e.adler,r.pending_buf,r.pending-o,o)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=Ei)}else r.status=Ei;if(r.status===Ei)if(r.gzhead.name){o=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(e.adler=Sn(e.adler,r.pending_buf,r.pending-o,o)),In(e),o=r.pending,r.pending===r.pending_buf_size)){i=1;break}r.gzindex<r.gzhead.name.length?i=r.gzhead.name.charCodeAt(r.gzindex++)&255:i=0,re(r,i)}while(i!==0);r.gzhead.hcrc&&r.pending>o&&(e.adler=Sn(e.adler,r.pending_buf,r.pending-o,o)),i===0&&(r.gzindex=0,r.status=xi)}else r.status=xi;if(r.status===xi)if(r.gzhead.comment){o=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>o&&(e.adler=Sn(e.adler,r.pending_buf,r.pending-o,o)),In(e),o=r.pending,r.pending===r.pending_buf_size)){i=1;break}r.gzindex<r.gzhead.comment.length?i=r.gzhead.comment.charCodeAt(r.gzindex++)&255:i=0,re(r,i)}while(i!==0);r.gzhead.hcrc&&r.pending>o&&(e.adler=Sn(e.adler,r.pending_buf,r.pending-o,o)),i===0&&(r.status=wi)}else r.status=wi;if(r.status===wi&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&In(e),r.pending+2<=r.pending_buf_size&&(re(r,e.adler&255),re(r,e.adler>>8&255),e.adler=0,r.status=er)):r.status=er),r.pending!==0){if(In(e),e.avail_out===0)return r.last_flush=-1,Ft}else if(e.avail_in===0&&kd(t)<=kd(n)&&t!==Ln)return kn(e,bs);if(r.status===mo&&e.avail_in!==0)return kn(e,bs);if(e.avail_in!==0||r.lookahead!==0||t!==rr&&r.status!==mo){var l=r.strategy===gi?Qm(r,t):r.strategy===Fm?Jm(r,t):kr[r.level].func(r,t);if((l===tr||l===Lr)&&(r.status=mo),l===Te||l===tr)return e.avail_out===0&&(r.last_flush=-1),Ft;if(l===go&&(t===km?nt._tr_align(r):t!==Pd&&(nt._tr_stored_block(r,0,0,!1),t===Lm&&(Pn(r.head),r.lookahead===0&&(r.strstart=0,r.block_start=0,r.insert=0))),In(e),e.avail_out===0))return r.last_flush=-1,Ft}return t!==Ln?Ft:r.wrap<=0?_d:(r.wrap===2?(re(r,e.adler&255),re(r,e.adler>>8&255),re(r,e.adler>>16&255),re(r,e.adler>>24&255),re(r,e.total_in&255),re(r,e.total_in>>8&255),re(r,e.total_in>>16&255),re(r,e.total_in>>24&255)):(ho(r,e.adler>>>16),ho(r,e.adler&65535)),In(e),r.wrap>0&&(r.wrap=-r.wrap),r.pending!==0?Ft:_d)}function i2(e){var t;return!e||!e.state?rt:(t=e.state.status,t!==bi&&t!==Ts&&t!==Ei&&t!==xi&&t!==wi&&t!==er&&t!==mo?kn(e,rt):(e.state=null,t===er?kn(e,Cm):Ft))}function a2(e,t){var n=t.length,r,o,i,a,s,l,c,d;if(!e||!e.state||(r=e.state,a=r.wrap,a===2||a===1&&r.status!==bi||r.lookahead))return rt;for(a===1&&(e.adler=Ld(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(a===0&&(Pn(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new Re.Buf8(r.w_size),Re.arraySet(d,t,n-r.w_size,r.w_size,0),t=d,n=r.w_size),s=e.avail_in,l=e.next_in,c=e.input,e.avail_in=n,e.next_in=0,e.input=t,nr(r);r.lookahead>=te;){o=r.strstart,i=r.lookahead-(te-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[o+te-1])&r.hash_mask,r.prev[o&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=o,o++;while(--i);r.strstart=o,r.lookahead=te-1,nr(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=te-1,r.match_available=0,e.next_in=l,e.input=c,e.avail_in=s,r.wrap=a,Ft}Ot.deflateInit=r2;Ot.deflateInit2=Fd;Ot.deflateReset=Rd;Ot.deflateResetKeep=Dd;Ot.deflateSetHeader=n2;Ot.deflate=o2;Ot.deflateEnd=i2;Ot.deflateSetDictionary=a2;Ot.deflateInfo="pako deflate (from Nodeca project)"});var As=pe(Cr=>{"use strict";x();var vi=tn(),Nd=!0,Bd=!0;try{String.fromCharCode.apply(null,[0])}catch{Nd=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Bd=!1}var Eo=new vi.Buf8(256);for(rn=0;rn<256;rn++)Eo[rn]=rn>=252?6:rn>=248?5:rn>=240?4:rn>=224?3:rn>=192?2:1;var rn;Eo[254]=Eo[254]=1;Cr.string2buf=function(e){var t,n,r,o,i,a=e.length,s=0;for(o=0;o<a;o++)n=e.charCodeAt(o),(n&64512)===55296&&o+1<a&&(r=e.charCodeAt(o+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),o++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new vi.Buf8(s),i=0,o=0;i<s;o++)n=e.charCodeAt(o),(n&64512)===55296&&o+1<a&&(r=e.charCodeAt(o+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),o++)),n<128?t[i++]=n:n<2048?(t[i++]=192|n>>>6,t[i++]=128|n&63):n<65536?(t[i++]=224|n>>>12,t[i++]=128|n>>>6&63,t[i++]=128|n&63):(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63,t[i++]=128|n>>>6&63,t[i++]=128|n&63);return t};function Hd(e,t){if(t<65534&&(e.subarray&&Bd||!e.subarray&&Nd))return String.fromCharCode.apply(null,vi.shrinkBuf(e,t));for(var n="",r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n}Cr.buf2binstring=function(e){return Hd(e,e.length)};Cr.binstring2buf=function(e){for(var t=new vi.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t};Cr.buf2string=function(e,t){var n,r,o,i,a=t||e.length,s=new Array(a*2);for(r=0,n=0;n<a;){if(o=e[n++],o<128){s[r++]=o;continue}if(i=Eo[o],i>4){s[r++]=65533,n+=i-1;continue}for(o&=i===2?31:i===3?15:7;i>1&&n<a;)o=o<<6|e[n++]&63,i--;if(i>1){s[r++]=65533;continue}o<65536?s[r++]=o:(o-=65536,s[r++]=55296|o>>10&1023,s[r++]=56320|o&1023)}return Hd(s,r)};Cr.utf8border=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Eo[e[n]]>t?n:t}});var Ss=pe((n3,zd)=>{"use strict";x();function s2(){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}zd.exports=s2});var Vd=pe(yo=>{"use strict";x();var xo=Od(),wo=tn(),Ps=As(),_s=mi(),l2=Ss(),Wd=Object.prototype.toString,c2=0,Is=4,Dr=0,Gd=1,Ud=2,d2=-1,u2=0,p2=8;function or(e){if(!(this instanceof or))return new or(e);this.options=wo.assign({level:d2,method:p2,chunkSize:16384,windowBits:15,memLevel:8,strategy:u2,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l2,this.strm.avail_out=0;var n=xo.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Dr)throw new Error(_s[n]);if(t.header&&xo.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(typeof t.dictionary=="string"?r=Ps.string2buf(t.dictionary):Wd.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=xo.deflateSetDictionary(this.strm,r),n!==Dr)throw new Error(_s[n]);this._dict_set=!0}}or.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,o,i;if(this.ended)return!1;i=t===~~t?t:t===!0?Is:c2,typeof e=="string"?n.input=Ps.string2buf(e):Wd.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new wo.Buf8(r),n.next_out=0,n.avail_out=r),o=xo.deflate(n,i),o!==Gd&&o!==Dr)return this.onEnd(o),this.ended=!0,!1;(n.avail_out===0||n.avail_in===0&&(i===Is||i===Ud))&&(this.options.to==="string"?this.onData(Ps.buf2binstring(wo.shrinkBuf(n.output,n.next_out))):this.onData(wo.shrinkBuf(n.output,n.next_out)))}while((n.avail_in>0||n.avail_out===0)&&o!==Gd);return i===Is?(o=xo.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===Dr):(i===Ud&&(this.onEnd(Dr),n.avail_out=0),!0)};or.prototype.onData=function(e){this.chunks.push(e)};or.prototype.onEnd=function(e){e===Dr&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=wo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ks(e,t){var n=new or(t);if(n.push(e,!0),n.err)throw n.msg||_s[n.err];return n.result}function f2(e,t){return t=t||{},t.raw=!0,ks(e,t)}function h2(e,t){return t=t||{},t.gzip=!0,ks(e,t)}yo.Deflate=or;yo.deflate=ks;yo.deflateRaw=f2;yo.gzip=h2});var Yd=pe((a3,Xd)=>{"use strict";x();var Mi=30,m2=12;Xd.exports=function(t,n){var r,o,i,a,s,l,c,d,p,f,h,m,g,E,w,y,b,T,A,k,P,I,_,D,S;r=t.state,o=t.next_in,D=t.input,i=o+(t.avail_in-5),a=t.next_out,S=t.output,s=a-(n-t.avail_out),l=a+(t.avail_out-257),c=r.dmax,d=r.wsize,p=r.whave,f=r.wnext,h=r.window,m=r.hold,g=r.bits,E=r.lencode,w=r.distcode,y=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{g<15&&(m+=D[o++]<<g,g+=8,m+=D[o++]<<g,g+=8),T=E[m&y];t:for(;;){if(A=T>>>24,m>>>=A,g-=A,A=T>>>16&255,A===0)S[a++]=T&65535;else if(A&16){k=T&65535,A&=15,A&&(g<A&&(m+=D[o++]<<g,g+=8),k+=m&(1<<A)-1,m>>>=A,g-=A),g<15&&(m+=D[o++]<<g,g+=8,m+=D[o++]<<g,g+=8),T=w[m&b];n:for(;;){if(A=T>>>24,m>>>=A,g-=A,A=T>>>16&255,A&16){if(P=T&65535,A&=15,g<A&&(m+=D[o++]<<g,g+=8,g<A&&(m+=D[o++]<<g,g+=8)),P+=m&(1<<A)-1,P>c){t.msg="invalid distance too far back",r.mode=Mi;break e}if(m>>>=A,g-=A,A=a-s,P>A){if(A=P-A,A>p&&r.sane){t.msg="invalid distance too far back",r.mode=Mi;break e}if(I=0,_=h,f===0){if(I+=d-A,A<k){k-=A;do S[a++]=h[I++];while(--A);I=a-P,_=S}}else if(f<A){if(I+=d+f-A,A-=f,A<k){k-=A;do S[a++]=h[I++];while(--A);if(I=0,f<k){A=f,k-=A;do S[a++]=h[I++];while(--A);I=a-P,_=S}}}else if(I+=f-A,A<k){k-=A;do S[a++]=h[I++];while(--A);I=a-P,_=S}for(;k>2;)S[a++]=_[I++],S[a++]=_[I++],S[a++]=_[I++],k-=3;k&&(S[a++]=_[I++],k>1&&(S[a++]=_[I++]))}else{I=a-P;do S[a++]=S[I++],S[a++]=S[I++],S[a++]=S[I++],k-=3;while(k>2);k&&(S[a++]=S[I++],k>1&&(S[a++]=S[I++]))}}else if(A&64){t.msg="invalid distance code",r.mode=Mi;break e}else{T=w[(T&65535)+(m&(1<<A)-1)];continue n}break}}else if(A&64)if(A&32){r.mode=m2;break e}else{t.msg="invalid literal/length code",r.mode=Mi;break e}else{T=E[(T&65535)+(m&(1<<A)-1)];continue t}break}}while(o<i&&a<l);k=g>>3,o-=k,g-=k<<3,m&=(1<<g)-1,t.next_in=o,t.next_out=a,t.avail_in=o<i?5+(i-o):5-(o-i),t.avail_out=a<l?257+(l-a):257-(a-l),r.hold=m,r.bits=g}});var Qd=pe((l3,Jd)=>{"use strict";x();var $d=tn(),Rr=15,Zd=852,Kd=592,jd=0,Ls=1,qd=2,g2=[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],E2=[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],x2=[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],w2=[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];Jd.exports=function(t,n,r,o,i,a,s,l){var c=l.bits,d=0,p=0,f=0,h=0,m=0,g=0,E=0,w=0,y=0,b=0,T,A,k,P,I,_=null,D=0,S,L=new $d.Buf16(Rr+1),O=new $d.Buf16(Rr+1),G=null,X=0,U,F,K;for(d=0;d<=Rr;d++)L[d]=0;for(p=0;p<o;p++)L[n[r+p]]++;for(m=c,h=Rr;h>=1&&L[h]===0;h--);if(m>h&&(m=h),h===0)return i[a++]=1<<24|64<<16|0,i[a++]=1<<24|64<<16|0,l.bits=1,0;for(f=1;f<h&&L[f]===0;f++);for(m<f&&(m=f),w=1,d=1;d<=Rr;d++)if(w<<=1,w-=L[d],w<0)return-1;if(w>0&&(t===jd||h!==1))return-1;for(O[1]=0,d=1;d<Rr;d++)O[d+1]=O[d]+L[d];for(p=0;p<o;p++)n[r+p]!==0&&(s[O[n[r+p]]++]=p);if(t===jd?(_=G=s,S=19):t===Ls?(_=g2,D-=257,G=E2,X-=257,S=256):(_=x2,G=w2,S=-1),b=0,p=0,d=f,I=a,g=m,E=0,k=-1,y=1<<m,P=y-1,t===Ls&&y>Zd||t===qd&&y>Kd)return 1;for(;;){U=d-E,s[p]<S?(F=0,K=s[p]):s[p]>S?(F=G[X+s[p]],K=_[D+s[p]]):(F=96,K=0),T=1<<d-E,A=1<<g,f=A;do A-=T,i[I+(b>>E)+A]=U<<24|F<<16|K|0;while(A!==0);for(T=1<<d-1;b&T;)T>>=1;if(T!==0?(b&=T-1,b+=T):b=0,p++,--L[d]===0){if(d===h)break;d=n[r+s[p]]}if(d>m&&(b&P)!==k){for(E===0&&(E=m),I+=f,g=d-E,w=1<<g;g+E<h&&(w-=L[g+E],!(w<=0));)g++,w<<=1;if(y+=1<<g,t===Ls&&y>Zd||t===qd&&y>Kd)return 1;k=b&P,i[k]=m<<24|g<<16|I-a|0}}return b!==0&&(i[I+b]=d-E<<24|64<<16|0),l.bits=m,0}});var Ru=pe(dt=>{"use strict";x();var Ke=tn(),Ns=ws(),Nt=ys(),y2=Yd(),bo=Qd(),b2=0,Au=1,Su=2,eu=4,v2=5,Ti=6,ir=0,M2=1,T2=2,ot=-2,Iu=-3,Bs=-4,A2=-5,tu=8,Pu=1,nu=2,ru=3,ou=4,iu=5,au=6,su=7,lu=8,cu=9,du=10,Ii=11,on=12,Cs=13,uu=14,Ds=15,pu=16,fu=17,hu=18,mu=19,Ai=20,Si=21,gu=22,Eu=23,xu=24,wu=25,yu=26,Rs=27,bu=28,vu=29,Ee=30,Hs=31,S2=32,I2=852,P2=592,_2=15,k2=_2;function Mu(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function L2(){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 Ke.Buf16(320),this.work=new Ke.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _u(e){var t;return!e||!e.state?ot:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Pu,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Ke.Buf32(I2),t.distcode=t.distdyn=new Ke.Buf32(P2),t.sane=1,t.back=-1,ir)}function ku(e){var t;return!e||!e.state?ot:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,_u(e))}function Lu(e,t){var n,r;return!e||!e.state||(r=e.state,t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?ot:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,ku(e))}function Cu(e,t){var n,r;return e?(r=new L2,e.state=r,r.window=null,n=Lu(e,t),n!==ir&&(e.state=null),n):ot}function C2(e){return Cu(e,k2)}var Tu=!0,Fs,Os;function D2(e){if(Tu){var t;for(Fs=new Ke.Buf32(512),Os=new Ke.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(bo(Au,e.lens,0,288,Fs,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;bo(Su,e.lens,0,32,Os,0,e.work,{bits:5}),Tu=!1}e.lencode=Fs,e.lenbits=9,e.distcode=Os,e.distbits=5}function Du(e,t,n,r){var o,i=e.state;return i.window===null&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Ke.Buf8(i.wsize)),r>=i.wsize?(Ke.arraySet(i.window,t,n-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>r&&(o=r),Ke.arraySet(i.window,t,n-r,o,i.wnext),r-=o,r?(Ke.arraySet(i.window,t,n-r,r,0),i.wnext=r,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0}function R2(e,t){var n,r,o,i,a,s,l,c,d,p,f,h,m,g,E=0,w,y,b,T,A,k,P,I,_=new Ke.Buf8(4),D,S,L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return ot;n=e.state,n.mode===on&&(n.mode=Cs),a=e.next_out,o=e.output,l=e.avail_out,i=e.next_in,r=e.input,s=e.avail_in,c=n.hold,d=n.bits,p=s,f=l,I=ir;e:for(;;)switch(n.mode){case Pu:if(n.wrap===0){n.mode=Cs;break}for(;d<16;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}if(n.wrap&2&&c===35615){n.check=0,_[0]=c&255,_[1]=c>>>8&255,n.check=Nt(n.check,_,2,0),c=0,d=0,n.mode=nu;break}if(n.flags=0,n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=Ee;break}if((c&15)!==tu){e.msg="unknown compression method",n.mode=Ee;break}if(c>>>=4,d-=4,P=(c&15)+8,n.wbits===0)n.wbits=P;else if(P>n.wbits){e.msg="invalid window size",n.mode=Ee;break}n.dmax=1<<P,e.adler=n.check=1,n.mode=c&512?du:on,c=0,d=0;break;case nu:for(;d<16;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}if(n.flags=c,(n.flags&255)!==tu){e.msg="unknown compression method",n.mode=Ee;break}if(n.flags&57344){e.msg="unknown header flags set",n.mode=Ee;break}n.head&&(n.head.text=c>>8&1),n.flags&512&&(_[0]=c&255,_[1]=c>>>8&255,n.check=Nt(n.check,_,2,0)),c=0,d=0,n.mode=ru;case ru:for(;d<32;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}n.head&&(n.head.time=c),n.flags&512&&(_[0]=c&255,_[1]=c>>>8&255,_[2]=c>>>16&255,_[3]=c>>>24&255,n.check=Nt(n.check,_,4,0)),c=0,d=0,n.mode=ou;case ou:for(;d<16;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}n.head&&(n.head.xflags=c&255,n.head.os=c>>8),n.flags&512&&(_[0]=c&255,_[1]=c>>>8&255,n.check=Nt(n.check,_,2,0)),c=0,d=0,n.mode=iu;case iu:if(n.flags&1024){for(;d<16;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}n.length=c,n.head&&(n.head.extra_len=c),n.flags&512&&(_[0]=c&255,_[1]=c>>>8&255,n.check=Nt(n.check,_,2,0)),c=0,d=0}else n.head&&(n.head.extra=null);n.mode=au;case au:if(n.flags&1024&&(h=n.length,h>s&&(h=s),h&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Ke.arraySet(n.head.extra,r,i,h,P)),n.flags&512&&(n.check=Nt(n.check,r,h,i)),s-=h,i+=h,n.length-=h),n.length))break e;n.length=0,n.mode=su;case su:if(n.flags&2048){if(s===0)break e;h=0;do P=r[i+h++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P));while(P&&h<s);if(n.flags&512&&(n.check=Nt(n.check,r,h,i)),s-=h,i+=h,P)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=lu;case lu:if(n.flags&4096){if(s===0)break e;h=0;do P=r[i+h++],n.head&&P&&n.length<65536&&(n.head.comment+=String.fromCharCode(P));while(P&&h<s);if(n.flags&512&&(n.check=Nt(n.check,r,h,i)),s-=h,i+=h,P)break e}else n.head&&(n.head.comment=null);n.mode=cu;case cu:if(n.flags&512){for(;d<16;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}if(c!==(n.check&65535)){e.msg="header crc mismatch",n.mode=Ee;break}c=0,d=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=on;break;case du:for(;d<32;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}e.adler=n.check=Mu(c),c=0,d=0,n.mode=Ii;case Ii:if(n.havedict===0)return e.next_out=a,e.avail_out=l,e.next_in=i,e.avail_in=s,n.hold=c,n.bits=d,T2;e.adler=n.check=1,n.mode=on;case on:if(t===v2||t===Ti)break e;case Cs:if(n.last){c>>>=d&7,d-=d&7,n.mode=Rs;break}for(;d<3;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}switch(n.last=c&1,c>>>=1,d-=1,c&3){case 0:n.mode=uu;break;case 1:if(D2(n),n.mode=Ai,t===Ti){c>>>=2,d-=2;break e}break;case 2:n.mode=fu;break;case 3:e.msg="invalid block type",n.mode=Ee}c>>>=2,d-=2;break;case uu:for(c>>>=d&7,d-=d&7;d<32;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}if((c&65535)!==(c>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Ee;break}if(n.length=c&65535,c=0,d=0,n.mode=Ds,t===Ti)break e;case Ds:n.mode=pu;case pu:if(h=n.length,h){if(h>s&&(h=s),h>l&&(h=l),h===0)break e;Ke.arraySet(o,r,i,h,a),s-=h,i+=h,l-=h,a+=h,n.length-=h;break}n.mode=on;break;case fu:for(;d<14;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}if(n.nlen=(c&31)+257,c>>>=5,d-=5,n.ndist=(c&31)+1,c>>>=5,d-=5,n.ncode=(c&15)+4,c>>>=4,d-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Ee;break}n.have=0,n.mode=hu;case hu:for(;n.have<n.ncode;){for(;d<3;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}n.lens[L[n.have++]]=c&7,c>>>=3,d-=3}for(;n.have<19;)n.lens[L[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,D={bits:n.lenbits},I=bo(b2,n.lens,0,19,n.lencode,0,n.work,D),n.lenbits=D.bits,I){e.msg="invalid code lengths set",n.mode=Ee;break}n.have=0,n.mode=mu;case mu:for(;n.have<n.nlen+n.ndist;){for(;E=n.lencode[c&(1<<n.lenbits)-1],w=E>>>24,y=E>>>16&255,b=E&65535,!(w<=d);){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}if(b<16)c>>>=w,d-=w,n.lens[n.have++]=b;else{if(b===16){for(S=w+2;d<S;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}if(c>>>=w,d-=w,n.have===0){e.msg="invalid bit length repeat",n.mode=Ee;break}P=n.lens[n.have-1],h=3+(c&3),c>>>=2,d-=2}else if(b===17){for(S=w+3;d<S;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}c>>>=w,d-=w,P=0,h=3+(c&7),c>>>=3,d-=3}else{for(S=w+7;d<S;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}c>>>=w,d-=w,P=0,h=11+(c&127),c>>>=7,d-=7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Ee;break}for(;h--;)n.lens[n.have++]=P}}if(n.mode===Ee)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=Ee;break}if(n.lenbits=9,D={bits:n.lenbits},I=bo(Au,n.lens,0,n.nlen,n.lencode,0,n.work,D),n.lenbits=D.bits,I){e.msg="invalid literal/lengths set",n.mode=Ee;break}if(n.distbits=6,n.distcode=n.distdyn,D={bits:n.distbits},I=bo(Su,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,D),n.distbits=D.bits,I){e.msg="invalid distances set",n.mode=Ee;break}if(n.mode=Ai,t===Ti)break e;case Ai:n.mode=Si;case Si:if(s>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=i,e.avail_in=s,n.hold=c,n.bits=d,y2(e,f),a=e.next_out,o=e.output,l=e.avail_out,i=e.next_in,r=e.input,s=e.avail_in,c=n.hold,d=n.bits,n.mode===on&&(n.back=-1);break}for(n.back=0;E=n.lencode[c&(1<<n.lenbits)-1],w=E>>>24,y=E>>>16&255,b=E&65535,!(w<=d);){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}if(y&&!(y&240)){for(T=w,A=y,k=b;E=n.lencode[k+((c&(1<<T+A)-1)>>T)],w=E>>>24,y=E>>>16&255,b=E&65535,!(T+w<=d);){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}c>>>=T,d-=T,n.back+=T}if(c>>>=w,d-=w,n.back+=w,n.length=b,y===0){n.mode=yu;break}if(y&32){n.back=-1,n.mode=on;break}if(y&64){e.msg="invalid literal/length code",n.mode=Ee;break}n.extra=y&15,n.mode=gu;case gu:if(n.extra){for(S=n.extra;d<S;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,d-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Eu;case Eu:for(;E=n.distcode[c&(1<<n.distbits)-1],w=E>>>24,y=E>>>16&255,b=E&65535,!(w<=d);){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}if(!(y&240)){for(T=w,A=y,k=b;E=n.distcode[k+((c&(1<<T+A)-1)>>T)],w=E>>>24,y=E>>>16&255,b=E&65535,!(T+w<=d);){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}c>>>=T,d-=T,n.back+=T}if(c>>>=w,d-=w,n.back+=w,y&64){e.msg="invalid distance code",n.mode=Ee;break}n.offset=b,n.extra=y&15,n.mode=xu;case xu:if(n.extra){for(S=n.extra;d<S;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,d-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Ee;break}n.mode=wu;case wu:if(l===0)break e;if(h=f-l,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Ee;break}h>n.wnext?(h-=n.wnext,m=n.wsize-h):m=n.wnext-h,h>n.length&&(h=n.length),g=n.window}else g=o,m=a-n.offset,h=n.length;h>l&&(h=l),l-=h,n.length-=h;do o[a++]=g[m++];while(--h);n.length===0&&(n.mode=Si);break;case yu:if(l===0)break e;o[a++]=n.length,l--,n.mode=Si;break;case Rs:if(n.wrap){for(;d<32;){if(s===0)break e;s--,c|=r[i++]<<d,d+=8}if(f-=l,e.total_out+=f,n.total+=f,f&&(e.adler=n.check=n.flags?Nt(n.check,o,f,a-f):Ns(n.check,o,f,a-f)),f=l,(n.flags?c:Mu(c))!==n.check){e.msg="incorrect data check",n.mode=Ee;break}c=0,d=0}n.mode=bu;case bu:if(n.wrap&&n.flags){for(;d<32;){if(s===0)break e;s--,c+=r[i++]<<d,d+=8}if(c!==(n.total&4294967295)){e.msg="incorrect length check",n.mode=Ee;break}c=0,d=0}n.mode=vu;case vu:I=M2;break e;case Ee:I=Iu;break e;case Hs:return Bs;case S2:default:return ot}return e.next_out=a,e.avail_out=l,e.next_in=i,e.avail_in=s,n.hold=c,n.bits=d,(n.wsize||f!==e.avail_out&&n.mode<Ee&&(n.mode<Rs||t!==eu))&&Du(e,e.output,e.next_out,f-e.avail_out)?(n.mode=Hs,Bs):(p-=e.avail_in,f-=e.avail_out,e.total_in+=p,e.total_out+=f,n.total+=f,n.wrap&&f&&(e.adler=n.check=n.flags?Nt(n.check,o,f,e.next_out-f):Ns(n.check,o,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===on?128:0)+(n.mode===Ai||n.mode===Ds?256:0),(p===0&&f===0||t===eu)&&I===ir&&(I=A2),I)}function F2(e){if(!e||!e.state)return ot;var t=e.state;return t.window&&(t.window=null),e.state=null,ir}function O2(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?ot:(n.head=t,t.done=!1,ir)}function N2(e,t){var n=t.length,r,o,i;return!e||!e.state||(r=e.state,r.wrap!==0&&r.mode!==Ii)?ot:r.mode===Ii&&(o=1,o=Ns(o,t,n,0),o!==r.check)?Iu:(i=Du(e,t,n,n),i?(r.mode=Hs,Bs):(r.havedict=1,ir))}dt.inflateReset=ku;dt.inflateReset2=Lu;dt.inflateResetKeep=_u;dt.inflateInit=C2;dt.inflateInit2=Cu;dt.inflate=R2;dt.inflateEnd=F2;dt.inflateGetHeader=O2;dt.inflateSetDictionary=N2;dt.inflateInfo="pako inflate (from Nodeca project)"});var zs=pe((p3,Fu)=>{"use strict";x();Fu.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}});var Nu=pe((h3,Ou)=>{"use strict";x();function B2(){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}Ou.exports=B2});var Hu=pe(Mo=>{"use strict";x();var Fr=Ru(),vo=tn(),Pi=As(),be=zs(),Gs=mi(),H2=Ss(),z2=Nu(),Bu=Object.prototype.toString;function ar(e){if(!(this instanceof ar))return new ar(e);this.options=vo.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new H2,this.strm.avail_out=0;var n=Fr.inflateInit2(this.strm,t.windowBits);if(n!==be.Z_OK)throw new Error(Gs[n]);if(this.header=new z2,Fr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Pi.string2buf(t.dictionary):Bu.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Fr.inflateSetDictionary(this.strm,t.dictionary),n!==be.Z_OK)))throw new Error(Gs[n])}ar.prototype.push=function(e,t){var n=this.strm,r=this.options.chunkSize,o=this.options.dictionary,i,a,s,l,c,d=!1;if(this.ended)return!1;a=t===~~t?t:t===!0?be.Z_FINISH:be.Z_NO_FLUSH,typeof e=="string"?n.input=Pi.binstring2buf(e):Bu.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;do{if(n.avail_out===0&&(n.output=new vo.Buf8(r),n.next_out=0,n.avail_out=r),i=Fr.inflate(n,be.Z_NO_FLUSH),i===be.Z_NEED_DICT&&o&&(i=Fr.inflateSetDictionary(this.strm,o)),i===be.Z_BUF_ERROR&&d===!0&&(i=be.Z_OK,d=!1),i!==be.Z_STREAM_END&&i!==be.Z_OK)return this.onEnd(i),this.ended=!0,!1;n.next_out&&(n.avail_out===0||i===be.Z_STREAM_END||n.avail_in===0&&(a===be.Z_FINISH||a===be.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=Pi.utf8border(n.output,n.next_out),l=n.next_out-s,c=Pi.buf2string(n.output,s),n.next_out=l,n.avail_out=r-l,l&&vo.arraySet(n.output,n.output,s,l,0),this.onData(c)):this.onData(vo.shrinkBuf(n.output,n.next_out))),n.avail_in===0&&n.avail_out===0&&(d=!0)}while((n.avail_in>0||n.avail_out===0)&&i!==be.Z_STREAM_END);return i===be.Z_STREAM_END&&(a=be.Z_FINISH),a===be.Z_FINISH?(i=Fr.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===be.Z_OK):(a===be.Z_SYNC_FLUSH&&(this.onEnd(be.Z_OK),n.avail_out=0),!0)};ar.prototype.onData=function(e){this.chunks.push(e)};ar.prototype.onEnd=function(e){e===be.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=vo.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Us(e,t){var n=new ar(t);if(n.push(e,!0),n.err)throw n.msg||Gs[n.err];return n.result}function G2(e,t){return t=t||{},t.raw=!0,Us(e,t)}Mo.Inflate=ar;Mo.inflate=Us;Mo.inflateRaw=G2;Mo.ungzip=Us});var Uu=pe((x3,Gu)=>{"use strict";x();var U2=tn().assign,W2=Vd(),V2=Hu(),X2=zs(),zu={};U2(zu,W2,V2,X2);Gu.exports=zu});var _l=pe((r5,vf)=>{x();vf.exports=React});var Sf=pe(ua=>{"use strict";x();var tE=_l(),nE=Symbol.for("react.element"),rE=Symbol.for("react.fragment"),oE=Object.prototype.hasOwnProperty,iE=tE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,aE={key:!0,ref:!0,__self:!0,__source:!0};function Af(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)oE.call(t,r)&&!aE.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:nE,type:e,key:i,ref:a,props:o,_owner:iE.current}}ua.Fragment=rE;ua.jsx=Af;ua.jsxs=Af});var kl=pe((c5,If)=>{"use strict";x();If.exports=Sf()});var r1=pe(Ra=>{"use strict";x();Object.defineProperty(Ra,"__esModule",{value:!0});Ra.sanitizeUrl=void 0;var Fx=/^([^\w]*)(javascript|data|vbscript)/im,Ox=/&#(\w+)(^\w|;)?/g,Nx=/&(newline|tab);/gi,Bx=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Hx=/^.+(:|:)/gim,zx=[".","/"];function Gx(e){return zx.indexOf(e[0])>-1}function Ux(e){return e.replace(Ox,function(t,n){return String.fromCharCode(n)})}function Wx(e){var t=Ux(e||"").replace(Nx,"").replace(Bx,"").trim();if(!t)return"about:blank";if(Gx(t))return t;var n=t.match(Hx);if(!n)return t;var r=n[0];return Fx.test(r)?"about:blank":t}Ra.sanitizeUrl=Wx});x();var zc=An(Yc(),1),Gc=An(qc(),1),G0=An(td(),1);x();var is=An(Uu(),1);x();x();var Ws={};x();var an={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"]};var Z2=(e,t)=>t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{}),M3=5,T3=5,Wu=4,_i=4,ki=1,ut=[0,2,4,6,8];var pt=(e,t)=>t.map(n=>an[e][n]),$={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:pt("gray",ut),red:pt("red",ut),pink:pt("pink",ut),grape:pt("grape",ut),violet:pt("violet",ut),blue:pt("blue",ut),cyan:pt("cyan",ut),teal:pt("teal",ut),green:pt("green",ut),yellow:pt("yellow",ut),orange:pt("orange",ut),bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},Vu=Z2($,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"]),A3=[$.black,$.red[_i],$.green[_i],$.blue[_i],$.yellow[_i]],S3=[$.transparent,$.red[ki],$.green[ki],$.blue[ki],$.yellow[ki]],I3=[$.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],P3={transparent:$.transparent,white:$.white,gray:$.gray,black:$.black,bronze:$.bronze,...Vu},_3={transparent:$.transparent,white:$.white,gray:$.gray,black:$.black,bronze:$.bronze,...Vu},Xu=e=>[$.cyan[e],$.blue[e],$.violet[e],$.grape[e],$.pink[e],$.green[e],$.teal[e],$.yellow[e],$.orange[e],$.red[e]],k3=(e,t,n)=>`#${((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}`;var Li=/Mac|iPod|iPhone|iPad/.test(navigator.platform),F3=/^Win/.test(navigator.platform),Yu=/\b(android)\b/i.test(navigator.userAgent),O3="netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,K2=navigator.userAgent.indexOf("Chrome")!==-1,N3=!K2&&navigator.userAgent.indexOf("Safari")!==-1,$u=/iPad|iPhone/.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,B3=()=>navigator.brave?.isBrave?.name==="isBrave",H3=typeof window<"u"&&"ResizeObserver"in window,z3="Excalidraw",Zu=36,Ku=10,ju=8,G3=5,U3=1,W3=30,Bt=Math.PI/12,V3="red",Ci={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},X3={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1,ERASER:5},Y3={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"};var $3={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},it={TEST:"test",DEVELOPMENT:"development"},Z3={SHAPE_ACTIONS_MENU:"App-menu__left"},ae={Virgil:1,Helvetica:2,Cascadia:3,Excalifont:5,Nunito:6,"Lilita One":7,"Comic Shanns":8,"Liberation Sans":9},Fe={LIGHT:"light",DARK:"dark"},Ae={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},Vs="Segoe UI Emoji",Di=1,Ht=20,zt=ae.Excalifont,Or="left",Ri="top";var To=2,Fi=2*To,j2=1e-5,K3=2*Fi-j2,j3="#ffffff",q3="#1e1e1e",J3="#a2f1a6";var Q3=20,Xs={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"},qu=["text/plain","text/html"],W={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",...Xs},eb={png:"png",svg:"svg",clipboard:"clipboard"},Xe={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},Ys=window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,tb=500,nb=300,rb=500;var ob=100,ib=.1,Ju=.1,ab=30,sb=300;var Oi=Ws.themeFilter,lb={addLibrary:"addLibrary"},cb={addLibrary:"addLibrary"},db={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},ub=730,pb=1e3,fb=500,hb=1229,mb=parseInt(Ws.rightSidebarWidth),Nr=2,Qu=[1,2,3],$s=10,gb=1440,Eb=4*1024*1024,le="http://www.w3.org/2000/svg";var Zs={excalidraw:2,excalidrawLibrary:2},ve=5,ep=.7,tp=11,sn={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},Ks={LEFT:"left",CENTER:"center",RIGHT:"right"},np=20,Ni=.25,rp=32,je={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},js={architect:0,artist:1,cartoonist:2},xb={thin:1,bold:2,extraBold:4},fe={strokeColor:$.black,backgroundColor:$.transparent,fillStyle:"solid",strokeWidth:2,strokeStyle:"solid",roughness:js.artist,opacity:100,locked:!1},q2="library",op={name:"default",defaultTab:q2},wb=new Set(["iframe","embeddable","image"]),yb={selection:"selection",rectangle:"rectangle",diamond:"diamond",ellipse:"ellipse",arrow:"arrow",line:"line",freedraw:"freedraw",text:"text",image:"image",eraser:"eraser",hand:"hand",frame:"frame",magicframe:"magicframe",embeddable:"embeddable",laser:"laser"},bb={OAI_API_KEY:"excalidraw-oai-api-key",MERMAID_TO_EXCALIDRAW:"mermaid-to-excalidraw",PUBLISH_LIBRARY:"publish-library-data"},ip="Untitled",qs={generalStats:1,elementProperties:2},vb=1,ap={sharp:"sharp",round:"round",elbow:"elbow"};x();x();x();var Bi=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");x();var J2=Qu.includes(devicePixelRatio)?devicePixelRatio:1,ft=()=>({showWelcomeScreen:!1,theme:Fe.LIGHT,collaborators:new Map,currentChartType:"bar",currentItemBackgroundColor:fe.backgroundColor,currentItemEndArrowhead:"arrow",currentItemFillStyle:fe.fillStyle,currentItemFontFamily:zt,currentItemFontSize:Ht,currentItemOpacity:fe.opacity,currentItemRoughness:fe.roughness,currentItemStartArrowhead:null,currentItemStrokeColor:fe.strokeColor,currentItemRoundness:"round",currentItemArrowType:ap.round,currentItemStrokeStyle:fe.strokeStyle,currentItemStrokeWidth:fe.strokeWidth,currentItemTextAlign:Or,currentHoveredFontFamily:null,cursorButton:"up",activeEmbeddable:null,draggingElement:null,editingElement:null,editingGroupId:null,editingLinearElement:null,activeTool:{type:"selection",customType:null,locked:fe.locked,lastActiveTool:null},penMode:!1,penDetected:!1,errorMessage:null,exportBackground:!0,exportScale:J2,exportEmbedScene:!1,exportWithDarkMode:!1,fileHandle:null,gridSize:null,isBindingEnabled:!0,defaultSidebarDockedPreference:!1,isLoading:!1,isResizing:!1,isRotating:!1,lastPointerDownWith:"mouse",multiElement:null,name:null,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,stats:{open:!1,panels:qs.generalStats|qs.elementProperties},startBoundElement:null,suggestedBindings:[],frameRendering:{enabled:!0,clip:!0,name:!0,outline:!0},frameToHighlight:null,editingFrame:null,elementsToHighlight:null,toast:null,viewBackgroundColor:$.white,zenModeEnabled:!1,zoom:{value:1},viewModeEnabled:!1,pendingImageElementId:null,showHyperlinkPopup:!1,selectedLinearElement:null,snapLines:[],originSnapOffset:{x:0,y:0},objectsSnapModeEnabled:!1,userToFollow:null,followedBy:new Set}),Q2=(e=>e)({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},currentItemArrowType:{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},currentHoveredFontFamily:{browser:!1,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},stats:{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},userToFollow:{browser:!1,export:!1,server:!1},followedBy:{browser:!1,export:!1,server:!1}}),sp=(e,t)=>{let n={};for(let r of Object.keys(e))if(Q2[r]?.[t]){let i=e[r];n[r]=i}return n};var Hi=e=>sp(e,"export"),lp=e=>sp(e,"server"),cp=({activeTool:e})=>e.type==="eraser",dp=({activeTool:e})=>e.type==="hand";x();x();x();x();x();x();var up=null;var Bb=()=>{if(up)return up;let e=new Date,t=e.getFullYear(),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0"),o=`${e.getHours()}`.padStart(2,"0"),i=`${e.getMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}-${o}${i}`},Hb=e=>e.charAt(0).toUpperCase()+e.slice(1),zb=e=>e instanceof HTMLElement&&e.className.includes("ToolIcon"),eg=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement,Gb=e=>eg(e)||e instanceof Element&&!!e.closest("label, button"),Ub=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&(e.type==="text"||e.type==="number"||e.type==="password"),Js=({fontFamily:e})=>{for(let[t,n]of Object.entries(ae))if(n===e)return`${t}, ${Vs}`;return Vs},he=({fontSize:e,fontFamily:t})=>`${e}px ${Js({fontFamily:t})}`,hp=(e,t)=>{let n=0,r=null,o=(...i)=>{r=i,clearTimeout(n),n=window.setTimeout(()=>{r=null,e(...i)},t)};return o.flush=()=>{if(clearTimeout(n),r){let i=r;r=null,e(...i)}},o.cancel=()=>{r=null,clearTimeout(n)},o},mp=(e,t)=>{let n=null,r=null,o=null,i=s=>{n=window.requestAnimationFrame(()=>{n=null,e(...s),r=null,o&&(r=o,o=null,i(r))})},a=(...s)=>{if(M.MODE==="test"){e(...s);return}r=s,n===null?i(r):t?.trailing&&(o=s)};return a.flush=()=>{n!==null&&(cancelAnimationFrame(n),n=null),r&&(e(...o||r),r=o=null)},a.cancel=()=>{r=o=null,n!==null&&(cancelAnimationFrame(n),n=null)},a},gp=e=>1-Math.pow(1-e,4),pp=(e,t,n)=>(t-e)*gp(n)+e,Wb=({fromValues:e,toValues:t,onStep:n,duration:r=250,interpolateValue:o,onStart:i,onEnd:a,onCancel:s})=>{let l=!1,c=0,d;function p(f){if(l)return;d===void 0&&(d=f,i?.());let h=Math.min(f-d,r),m=gp(h/r),g={};if(Object.keys(e).forEach(E=>{let w=E,y=(t[w]-e[w])*m+e[w];g[w]=y}),n(g),h<r){let E=h/r,w={};Object.keys(e).forEach(y=>{let b=y,T=e[b],A=t[b],k;k=o?o(T,A,E,b):pp(T,A,E),k==null&&(k=pp(T,A,E)),w[b]=k}),n(w),c=window.requestAnimationFrame(p)}else n(t),a?.()}return c=window.requestAnimationFrame(p),()=>{s?.(),l=!0,window.cancelAnimationFrame(c)}},Vb=(e,t)=>{if(!e.length||t<1)return[];let n=0,r=0,o=Array(Math.ceil(e.length/t));for(;n<e.length;)o[r++]=e.slice(n,n+=t);return o};var at=(e,t)=>Math.abs(e-t),Ao=(e,t)=>t.type==="custom"?{...e.activeTool,type:"custom",customType:t.customType,locked:t.locked??e.activeTool.locked}:{...e.activeTool,lastActiveTool:t.lastActiveToolBeforeEraser===void 0?e.activeTool.lastActiveTool:t.lastActiveToolBeforeEraser,type:t.type,customType:null,locked:t.locked??e.activeTool.locked};var Xb=e=>(e=e.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter"),Li?e.replace(/\bCtrlOrCmd\b/gi,"Cmd").replace(/\bAlt\b/i,"Option"):e.replace(/\bCtrlOrCmd\b/gi,"Ctrl")),So=({clientX:e,clientY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:i,scrollY:a})=>{let s=(e-r)/n.value-i,l=(t-o)/n.value-a;return{x:s,y:l}},Qs=({sceneX:e,sceneY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:i,scrollY:a})=>{let s=(e+i)*n.value+r,l=(t+a)*n.value+o;return{x:s,y:l}},Yb=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),tg="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",ng="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",rg=new RegExp(`^[^${tg}]*[${ng}]`),Gi=e=>rg.test(e),ln=e=>{let[t,n]=e;return{x:t,y:n}},$b=e=>{if(e?.name==="AbortError"){console.warn(e);return}throw e},Zb=(e,t,n=0)=>{n<0&&(n=e.length+n),n=Math.min(e.length,Math.max(n,0));let r=n-1;for(;++r<e.length;)if(t(e[r],r,e))return r;return-1},Kb=(e,t,n=e.length-1)=>{n<0&&(n=e.length+n),n=Math.min(e.length-1,Math.max(n,0));let r=n+1;for(;--r>-1;)if(t(e[r],r,e))return r;return-1},Cn=e=>{let t=e.length===5&&e.substr(4,1)==="0",n=e.length===9&&e.substr(7,2)==="00";return t||n||e===$.transparent},jb=()=>{let e,t,n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n};var qb=e=>{let t=e.parentElement;for(;t;){if(t===document.body)return document;let{overflowY:n}=window.getComputedStyle(t);if(t.scrollHeight>t.clientHeight&&(n==="auto"||n==="scroll"||n==="overlay"))return t;t=t.parentElement}return document},Jb=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1){t.focus();return}t=t.parentElement}},Qb=e=>{e.preventDefault(),e.returnValue=""},Ep=e=>Array.from(e).map(t=>`0${t.toString(16)}`.slice(-2)).join(""),cn=()=>dn()?1:Date.now(),Q=e=>e instanceof Map?e:e.reduce((t,n)=>(t.set(typeof n=="string"?n:n.id,n),t),new Map),e6=e=>e.reduce((t,n,r)=>(t.set(n.id,[n,r]),t),new Map),Gt=(e,t)=>e.reduce((n,r)=>(n[t?t(r):String(r)]=r,n),{}),t6=e=>e.reduce((t,n,r)=>{let o={...n,prev:null,next:null};if(r!==0){let i=t[r-1];if(o.prev=i,i.next=o,r===e.length-1){let a=t[0];o.next=a,a.prev=o}}return t.push(o),t},[]),dn=()=>M.MODE==="test",n6=()=>M.MODE==="development",r6=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),o6=(e,t)=>{let n=!1;for(let r in t){let o=t[r];if(typeof o<"u"){if(e[r]===o&&(typeof o!="object"||o===null))continue;n=!0}}return n?{...e,...t}:e};var i6=()=>{try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}};var Ui=e=>!!e&&typeof e=="object"&&"then"in e&&"catch"in e&&"finally"in e,a6=e=>{let t=e?.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter(n=>n.tabIndex>-1&&!n.disabled):[]},fp=(e,t)=>Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t,un=(e,t,n,r=!1)=>{let o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return r&&console.warn("%cisShallowEqual: objects don't have same properties ->","color: #8B4000",e,t),!1;if(n&&Array.isArray(n)){for(let a of n)if(!(e[a]===t[a]||fp(e[a],t[a])))return r&&console.warn(`%cisShallowEqual: ${a} not equal ->`,"color: #8B4000",e[a],t[a]),!1;return!0}return o.every(a=>{let s=n?.[a],l=s?s(e[a],t[a]):e[a]===t[a]||fp(e[a],t[a]);return!l&&r&&console.warn(`%cisShallowEqual: ${a} not equal ->`,"color: #8B4000",e[a],t[a]),l})},s6=(e,t,{checkForDefaultPrevented:n=!0}={})=>function(o){if(e?.(o),!n||!o?.defaultPrevented)return t?.(o)},sr=(e,t,n)=>{if(!t)return e;if(n)return console.error(t),e;throw new Error(t)},l6=e=>{let t,n,r=function(o){let i=Object.entries(o);if(t){let s=!0;for(let[l,c]of i)if(t.get(l)!==c){s=!1;break}if(s)return n}let a=e(o);return t=new Map(i),n=a,a};return r.clear=()=>{t=void 0,n=void 0},r},xp=(e,t)=>e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t),c6=e=>JSON.parse(JSON.stringify(e)),d6=e=>typeof e=="number"&&Number.isFinite(e),u6=(e,t)=>un(e,t)?e:t;function p6(e,t,n,r){return e?(e?.addEventListener?.(t,n,r),()=>{e?.removeEventListener?.(t,n,r)}):()=>{}}var zi=(e,t)=>(e+t)/2;function f6(e,t=!0){let n=e.length;if(n<4)return"";let r=e[0],o=e[1],i=e[2],a=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${o[0].toFixed(2)},${o[1].toFixed(2)} ${zi(o[0],i[0]).toFixed(2)},${zi(o[1],i[1]).toFixed(2)} T`;for(let s=2,l=n-1;s<l;s++)r=e[s],o=e[s+1],a+=`${zi(r[0],o[0]).toFixed(2)},${zi(r[1],o[1]).toFixed(2)} `;return t&&(a+="Z"),a}var wp=e=>e.replace(/\r?\n|\r/g,`
|
|
2
|
+
`),ht=e=>e,h6=async(e,...t)=>new Promise(n=>{n(e(...t))}),yp=(...e)=>Math.max(...e.map(t=>t?1:0))>0;var Ut=e=>!!e&&e.type==="image"&&!!e.fileId,Wi=e=>!!e&&e.type==="image",Vi=e=>!!e&&e.type==="embeddable",Io=e=>!!e&&e.type==="iframe",mt=e=>!!e&&(e.type==="iframe"||e.type==="embeddable"),Y=e=>e!=null&&e.type==="text",bp=e=>e!=null&&e.type==="frame",vp=e=>e!=null&&e.type==="magicframe",se=e=>e!=null&&(e.type==="frame"||e.type==="magicframe"),Se=e=>e!=null&&og(e.type),og=e=>e==="freedraw",oe=e=>e!=null&&el(e.type),Z=e=>e!=null&&e.type==="arrow",ie=e=>Z(e)&&e.elbowed,el=e=>e==="arrow"||e==="line",Po=(e,t=!0)=>e!=null&&(!e.locked||t===!0)&&ig(e.type),ig=e=>e==="arrow",Wt=(e,t=!0)=>e!=null&&(!e.locked||t===!0)&&(e.type==="rectangle"||e.type==="diamond"||e.type==="ellipse"||e.type==="image"||e.type==="iframe"||e.type==="embeddable"||e.type==="frame"||e.type==="magicframe"||e.type==="text"&&!e.containerId),Mp=e=>e!=null&&(e.type==="rectangle"||e.type==="diamond"||e.type==="image"||e.type==="iframe"||e.type==="embeddable"||e.type==="frame"||e.type==="magicframe"||e.type==="text"&&!e.containerId),ag=(e,t=!0)=>e!=null&&(!e.locked||t===!0)&&(e.type==="rectangle"||e.type==="diamond"||e.type==="ellipse"||Z(e)),tl=e=>{let t=e?.type;if(!t)return!1;switch(t){case"text":case"diamond":case"rectangle":case"iframe":case"embeddable":case"ellipse":case"arrow":case"freedraw":case"line":case"frame":case"magicframe":case"image":case"selection":return!0;default:return sr(t,null),!1}},Dn=e=>ag(e)&&!!e.boundElements?.some(({type:t})=>t==="text"),ke=e=>e!==null&&"containerId"in e&&e.containerId!==null&&Y(e),Xi=e=>e==="rectangle"||e==="embeddable"||e==="iframe"||e==="image",Tp=e=>e==="line"||e==="arrow"||e==="diamond",w6=(e,t)=>!!((e===je.ADAPTIVE_RADIUS||e===je.LEGACY)&&Xi(t.type)||e===je.PROPORTIONAL_RADIUS&&Tp(t.type)),y6=e=>Tp(e.type)?{type:je.PROPORTIONAL_RADIUS}:Xi(e.type)?{type:je.ADAPTIVE_RADIUS}:null,nl=e=>e.fixedPoint!=null;x();x();x();x();x();x();x();x();x();x();x();x();function rl(e,t,n){if(e&&e.length){let[r,o]=t,i=Math.PI/180*n,a=Math.cos(i),s=Math.sin(i);for(let l of e){let[c,d]=l;l[0]=(c-r)*a-(d-o)*s+r,l[1]=(c-r)*s+(d-o)*a+o}}}function sg(e,t,n){let r=[];e.forEach(o=>r.push(...o)),rl(r,t,n)}function lg(e,t){return e[0]===t[0]&&e[1]===t[1]}function Ap(e,t,n,r=1){let o=n,i=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(o)for(let c of a)rl(c,s,o);let l=cg(a,i,r);if(o){for(let c of a)rl(c,s,-o);sg(l,s,-o)}return l}function cg(e,t,n){let r=[];for(let c of e){let d=[...c];lg(d[0],d[d.length-1])||d.push([d[0][0],d[0][1]]),d.length>2&&r.push(d)}let o=[];t=Math.max(t,.1);let i=[];for(let c of r)for(let d=0;d<c.length-1;d++){let p=c[d],f=c[d+1];if(p[1]!==f[1]){let h=Math.min(p[1],f[1]);i.push({ymin:h,ymax:Math.max(p[1],f[1]),x:h===p[1]?p[0]:f[0],islope:(f[0]-p[0])/(f[1]-p[1])})}}if(i.sort((c,d)=>c.ymin<d.ymin?-1:c.ymin>d.ymin?1:c.x<d.x?-1:c.x>d.x?1:c.ymax===d.ymax?0:(c.ymax-d.ymax)/Math.abs(c.ymax-d.ymax)),!i.length)return o;let a=[],s=i[0].ymin,l=0;for(;a.length||i.length;){if(i.length){let c=-1;for(let p=0;p<i.length&&!(i[p].ymin>s);p++)c=p;i.splice(0,c+1).forEach(p=>{a.push({s,edge:p})})}if(a=a.filter(c=>!(c.edge.ymax<=s)),a.sort((c,d)=>c.edge.x===d.edge.x?0:(c.edge.x-d.edge.x)/Math.abs(c.edge.x-d.edge.x)),(n!==1||l%t===0)&&a.length>1)for(let c=0;c<a.length;c=c+2){let d=c+1;if(d>=a.length)break;let p=a[c].edge,f=a[d].edge;o.push([[Math.round(p.x),s],[Math.round(f.x),s]])}s+=n,a.forEach(c=>{c.edge.x=c.edge.x+n*c.edge.islope}),l++}return o}function Vt(e,t){var n;let r=t.hachureAngle+90,o=t.hachureGap;o<0&&(o=t.strokeWidth*4),o=Math.max(o,.1);let i=1;return t.roughness>=1&&(((n=t.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(i=o),Ap(e,o,r,i||1)}var Rn=class{constructor(t){this.helper=t}fillPolygons(t,n){return this._fillPolygons(t,n)}_fillPolygons(t,n){let r=Vt(t,n);return{type:"fillSketch",ops:this.renderLines(r,n)}}renderLines(t,n){let r=[];for(let o of t)r.push(...this.helper.doubleLineOps(o[0][0],o[0][1],o[1][0],o[1][1],n));return r}};x();x();function Fn(e){let t=e[0],n=e[1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}var Yi=class extends Rn{fillPolygons(t,n){let r=n.hachureGap;r<0&&(r=n.strokeWidth*4),r=Math.max(r,.1);let o=Object.assign({},n,{hachureGap:r}),i=Vt(t,o),a=Math.PI/180*n.hachureAngle,s=[],l=r*.5*Math.cos(a),c=r*.5*Math.sin(a);for(let[p,f]of i)Fn([p,f])&&s.push([[p[0]-l,p[1]+c],[...f]],[[p[0]+l,p[1]-c],[...f]]);return{type:"fillSketch",ops:this.renderLines(s,n)}}};x();var $i=class extends Rn{fillPolygons(t,n){let r=this._fillPolygons(t,n),o=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),i=this._fillPolygons(t,o);return r.ops=r.ops.concat(i.ops),r}};x();var Zi=class{constructor(t){this.helper=t}fillPolygons(t,n){n=Object.assign({},n,{hachureAngle:0});let r=Vt(t,n);return this.dotsOnLines(r,n)}dotsOnLines(t,n){let r=[],o=n.hachureGap;o<0&&(o=n.strokeWidth*4),o=Math.max(o,.1);let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let a=o/4;for(let s of t){let l=Fn(s),c=l/o,d=Math.ceil(c)-1,p=l-d*o,f=(s[0][0]+s[1][0])/2-o/4,h=Math.min(s[0][1],s[1][1]);for(let m=0;m<d;m++){let g=h+p+m*o,E=f-a+Math.random()*2*a,w=g-a+Math.random()*2*a,y=this.helper.ellipse(E,w,i,i,n);r.push(...y.ops)}}return{type:"fillSketch",ops:r}}};x();var Ki=class{constructor(t){this.helper=t}fillPolygons(t,n){let r=Vt(t,n);return{type:"fillSketch",ops:this.dashedLine(r,n)}}dashedLine(t,n){let r=n.dashOffset<0?n.hachureGap<0?n.strokeWidth*4:n.hachureGap:n.dashOffset,o=n.dashGap<0?n.hachureGap<0?n.strokeWidth*4:n.hachureGap:n.dashGap,i=[];return t.forEach(a=>{let s=Fn(a),l=Math.floor(s/(r+o)),c=(s+o-l*(r+o))/2,d=a[0],p=a[1];d[0]>p[0]&&(d=a[1],p=a[0]);let f=Math.atan((p[1]-d[1])/(p[0]-d[0]));for(let h=0;h<l;h++){let m=h*(r+o),g=m+r,E=[d[0]+m*Math.cos(f)+c*Math.cos(f),d[1]+m*Math.sin(f)+c*Math.sin(f)],w=[d[0]+g*Math.cos(f)+c*Math.cos(f),d[1]+g*Math.sin(f)+c*Math.sin(f)];i.push(...this.helper.doubleLineOps(E[0],E[1],w[0],w[1],n))}}),i}};x();var ji=class{constructor(t){this.helper=t}fillPolygons(t,n){let r=n.hachureGap<0?n.strokeWidth*4:n.hachureGap,o=n.zigzagOffset<0?r:n.zigzagOffset;n=Object.assign({},n,{hachureGap:r+o});let i=Vt(t,n);return{type:"fillSketch",ops:this.zigzagLines(i,o,n)}}zigzagLines(t,n,r){let o=[];return t.forEach(i=>{let a=Fn(i),s=Math.round(a/(2*n)),l=i[0],c=i[1];l[0]>c[0]&&(l=i[1],c=i[0]);let d=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let p=0;p<s;p++){let f=p*2*n,h=(p+1)*2*n,m=Math.sqrt(2*Math.pow(n,2)),g=[l[0]+f*Math.cos(d),l[1]+f*Math.sin(d)],E=[l[0]+h*Math.cos(d),l[1]+h*Math.sin(d)],w=[g[0]+m*Math.cos(d+Math.PI/4),g[1]+m*Math.sin(d+Math.PI/4)];o.push(...this.helper.doubleLineOps(g[0],g[1],w[0],w[1],r),...this.helper.doubleLineOps(w[0],w[1],E[0],E[1],r))}}),o}};var Ye={};function Sp(e,t){let n=e.fillStyle||"hachure";if(!Ye[n])switch(n){case"zigzag":Ye[n]||(Ye[n]=new Yi(t));break;case"cross-hatch":Ye[n]||(Ye[n]=new $i(t));break;case"dots":Ye[n]||(Ye[n]=new Zi(t));break;case"dashed":Ye[n]||(Ye[n]=new Ki(t));break;case"zigzag-line":Ye[n]||(Ye[n]=new ji(t));break;case"hachure":default:n="hachure",Ye[n]||(Ye[n]=new Rn(t));break}return Ye[n]}x();function Ip(){return Math.floor(Math.random()*2**31)}var Br=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};x();x();var qi={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 dg(e){let t=new Array;for(;e!=="";)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:0,text:RegExp.$1},e=e.substr(RegExp.$1.length);else if(e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))t[t.length]={type:1,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length);else return[];return t[t.length]={type:2,text:""},t}function ol(e,t){return e.type===t}function Hr(e){let t=[],n=dg(e),r="BOD",o=0,i=n[o];for(;!ol(i,2);){let a=0,s=[];if(r==="BOD")if(i.text==="M"||i.text==="m")o++,a=qi[i.text],r=i.text;else return Hr("M0,0"+e);else ol(i,1)?a=qi[r]:(o++,a=qi[i.text],r=i.text);if(o+a<n.length){for(let l=o;l<o+a;l++){let c=n[l];if(ol(c,1))s[s.length]=+c.text;else throw new Error("Param not a number: "+r+","+c.text)}if(typeof qi[r]=="number"){let l={key:r,data:s};t.push(l),o+=a,i=n[o],r==="M"&&(r="L"),r==="m"&&(r="l")}else throw new Error("Bad segment: "+r)}else throw new Error("Path data ended short")}return t}x();function _o(e){let t=0,n=0,r=0,o=0,i=[];for(let{key:a,data:s}of e)switch(a){case"M":i.push({key:"M",data:[...s]}),[t,n]=s,[r,o]=s;break;case"m":t+=s[0],n+=s[1],i.push({key:"M",data:[t,n]}),r=t,o=n;break;case"L":i.push({key:"L",data:[...s]}),[t,n]=s;break;case"l":t+=s[0],n+=s[1],i.push({key:"L",data:[t,n]});break;case"C":i.push({key:"C",data:[...s]}),t=s[4],n=s[5];break;case"c":{let l=s.map((c,d)=>d%2?c+n:c+t);i.push({key:"C",data:l}),t=l[4],n=l[5];break}case"Q":i.push({key:"Q",data:[...s]}),t=s[2],n=s[3];break;case"q":{let l=s.map((c,d)=>d%2?c+n:c+t);i.push({key:"Q",data:l}),t=l[2],n=l[3];break}case"A":i.push({key:"A",data:[...s]}),t=s[5],n=s[6];break;case"a":t+=s[5],n+=s[6],i.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case"H":i.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],i.push({key:"H",data:[t]});break;case"V":i.push({key:"V",data:[...s]}),n=s[0];break;case"v":n+=s[0],i.push({key:"V",data:[n]});break;case"S":i.push({key:"S",data:[...s]}),t=s[2],n=s[3];break;case"s":{let l=s.map((c,d)=>d%2?c+n:c+t);i.push({key:"S",data:l}),t=l[2],n=l[3];break}case"T":i.push({key:"T",data:[...s]}),t=s[0],n=s[1];break;case"t":t+=s[0],n+=s[1],i.push({key:"T",data:[t,n]});break;case"Z":case"z":i.push({key:"Z",data:[]}),t=r,n=o;break}return i}x();function Lo(e){let t=[],n="",r=0,o=0,i=0,a=0,s=0,l=0;for(let{key:c,data:d}of e){switch(c){case"M":t.push({key:"M",data:[...d]}),[r,o]=d,[i,a]=d;break;case"C":t.push({key:"C",data:[...d]}),r=d[4],o=d[5],s=d[2],l=d[3];break;case"L":t.push({key:"L",data:[...d]}),[r,o]=d;break;case"H":r=d[0],t.push({key:"L",data:[r,o]});break;case"V":o=d[0],t.push({key:"L",data:[r,o]});break;case"S":{let p=0,f=0;n==="C"||n==="S"?(p=r+(r-s),f=o+(o-l)):(p=r,f=o),t.push({key:"C",data:[p,f,...d]}),s=d[0],l=d[1],r=d[2],o=d[3];break}case"T":{let[p,f]=d,h=0,m=0;n==="Q"||n==="T"?(h=r+(r-s),m=o+(o-l)):(h=r,m=o);let g=r+2*(h-r)/3,E=o+2*(m-o)/3,w=p+2*(h-p)/3,y=f+2*(m-f)/3;t.push({key:"C",data:[g,E,w,y,p,f]}),s=h,l=m,r=p,o=f;break}case"Q":{let[p,f,h,m]=d,g=r+2*(p-r)/3,E=o+2*(f-o)/3,w=h+2*(p-h)/3,y=m+2*(f-m)/3;t.push({key:"C",data:[g,E,w,y,h,m]}),s=p,l=f,r=h,o=m;break}case"A":{let p=Math.abs(d[0]),f=Math.abs(d[1]),h=d[2],m=d[3],g=d[4],E=d[5],w=d[6];p===0||f===0?(t.push({key:"C",data:[r,o,E,w,E,w]}),r=E,o=w):(r!==E||o!==w)&&(Pp(r,o,E,w,p,f,h,m,g).forEach(function(b){t.push({key:"C",data:b})}),r=E,o=w);break}case"Z":t.push({key:"Z",data:[]}),r=i,o=a;break}n=c}return t}function ug(e){return Math.PI*e/180}function ko(e,t,n){let r=e*Math.cos(n)-t*Math.sin(n),o=e*Math.sin(n)+t*Math.cos(n);return[r,o]}function Pp(e,t,n,r,o,i,a,s,l,c){let d=ug(a),p=[],f=0,h=0,m=0,g=0;if(c)[f,h,m,g]=c;else{[e,t]=ko(e,t,-d),[n,r]=ko(n,r,-d);let L=(e-n)/2,O=(t-r)/2,G=L*L/(o*o)+O*O/(i*i);G>1&&(G=Math.sqrt(G),o=G*o,i=G*i);let X=s===l?-1:1,U=o*o,F=i*i,K=U*F-U*O*O-F*L*L,R=U*O*O+F*L*L,q=X*Math.sqrt(Math.abs(K/R));m=q*o*O/i+(e+n)/2,g=q*-i*L/o+(t+r)/2,f=Math.asin(parseFloat(((t-g)/i).toFixed(9))),h=Math.asin(parseFloat(((r-g)/i).toFixed(9))),e<m&&(f=Math.PI-f),n<m&&(h=Math.PI-h),f<0&&(f=Math.PI*2+f),h<0&&(h=Math.PI*2+h),l&&f>h&&(f=f-Math.PI*2),!l&&h>f&&(h=h-Math.PI*2)}let E=h-f;if(Math.abs(E)>Math.PI*120/180){let L=h,O=n,G=r;l&&h>f?h=f+Math.PI*120/180*1:h=f+Math.PI*120/180*-1,n=m+o*Math.cos(h),r=g+i*Math.sin(h),p=Pp(n,r,O,G,o,i,a,0,l,[h,L,m,g])}E=h-f;let w=Math.cos(f),y=Math.sin(f),b=Math.cos(h),T=Math.sin(h),A=Math.tan(E/4),k=4/3*o*A,P=4/3*i*A,I=[e,t],_=[e+k*y,t-P*w],D=[n+k*T,r-P*b],S=[n,r];if(_[0]=2*I[0]-_[0],_[1]=2*I[1]-_[1],c)return[_,D,S].concat(p);{p=[_,D,S].concat(p);let L=[];for(let O=0;O<p.length;O+=3){let G=ko(p[O][0],p[O][1],d),X=ko(p[O+1][0],p[O+1][1],d),U=ko(p[O+2][0],p[O+2][1],d);L.push([G[0],G[1],X[0],X[1],U[0],U[1]])}return L}}var pg={randOffset:mg,randOffsetWithRange:gg,ellipse:hg,doubleLineOps:Eg};function il(e,t,n,r,o){return{type:"path",ops:pn(e,t,n,r,o)}}function Co(e,t,n){let r=(e||[]).length;if(r>2){let o=[];for(let i=0;i<r-1;i++)o.push(...pn(e[i][0],e[i][1],e[i+1][0],e[i+1][1],n));return t&&o.push(...pn(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:o}}else if(r===2)return il(e[0][0],e[0][1],e[1][0],e[1][1],n);return{type:"path",ops:[]}}function fg(e,t){return Co(e,!0,t)}function Dp(e,t,n,r,o){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];return fg(i,o)}function al(e,t){let n=kp(e,1*(1+t.roughness*.2),t);if(!t.disableMultiStroke){let r=kp(e,1.5*(1+t.roughness*.22),xg(t));n=n.concat(r)}return{type:"path",ops:n}}function hg(e,t,n,r,o){let i=sl(n,r,o);return ea(e,t,o,i).opset}function sl(e,t,n){let r=Math.sqrt(Math.PI*2*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),o=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),i=Math.PI*2/o,a=Math.abs(e/2),s=Math.abs(t/2),l=1-n.curveFitting;return a+=z(a*l,n),s+=z(s*l,n),{increment:i,rx:a,ry:s}}function ea(e,t,n,r){let[o,i]=Lp(r.increment,e,t,r.rx,r.ry,1,r.increment*Ji(.1,Ji(.4,1,n),n),n),a=Qi(o,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[s]=Lp(r.increment,e,t,r.rx,r.ry,1.5,0,n),l=Qi(s,null,n);a=a.concat(l)}return{estimatedPoints:i,opset:{type:"path",ops:a}}}function ll(e,t,n,r,o,i,a,s,l){let c=e,d=t,p=Math.abs(n/2),f=Math.abs(r/2);p+=z(p*.01,l),f+=z(f*.01,l);let h=o,m=i;for(;h<0;)h+=Math.PI*2,m+=Math.PI*2;m-h>Math.PI*2&&(h=0,m=Math.PI*2);let g=Math.PI*2/l.curveStepCount,E=Math.min(g/2,(m-h)/2),w=Cp(E,c,d,p,f,h,m,1,l);if(!l.disableMultiStroke){let y=Cp(E,c,d,p,f,h,m,1.5,l);w.push(...y)}return a&&(s?w.push(...pn(c,d,c+p*Math.cos(h),d+f*Math.sin(h),l),...pn(c,d,c+p*Math.cos(m),d+f*Math.sin(m),l)):w.push({op:"lineTo",data:[c,d]},{op:"lineTo",data:[c+p*Math.cos(h),d+f*Math.sin(h)]})),{type:"path",ops:w}}function cl(e,t){let n=Lo(_o(Hr(e))),r=[],o=[0,0],i=[0,0];for(let{key:a,data:s}of n)switch(a){case"M":{i=[s[0],s[1]],o=[s[0],s[1]];break}case"L":r.push(...pn(i[0],i[1],s[0],s[1],t)),i=[s[0],s[1]];break;case"C":{let[l,c,d,p,f,h]=s;r.push(...wg(l,c,d,p,f,h,i,t)),i=[f,h];break}case"Z":r.push(...pn(i[0],i[1],o[0],o[1],t)),i=[o[0],o[1]];break}return{type:"path",ops:r}}function ta(e,t){let n=[];for(let r of e)if(r.length){let o=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:"move",data:[r[0][0]+z(o,t),r[0][1]+z(o,t)]});for(let a=1;a<i;a++)n.push({op:"lineTo",data:[r[a][0]+z(o,t),r[a][1]+z(o,t)]})}}return{type:"fillPath",ops:n}}function lr(e,t){return Sp(t,pg).fillPolygons(e,t)}function Rp(e,t,n,r,o,i,a){let s=e,l=t,c=Math.abs(n/2),d=Math.abs(r/2);c+=z(c*.01,a),d+=z(d*.01,a);let p=o,f=i;for(;p<0;)p+=Math.PI*2,f+=Math.PI*2;f-p>Math.PI*2&&(p=0,f=Math.PI*2);let h=(f-p)/a.curveStepCount,m=[];for(let g=p;g<=f;g=g+h)m.push([s+c*Math.cos(g),l+d*Math.sin(g)]);return m.push([s+c*Math.cos(f),l+d*Math.sin(f)]),m.push([s,l]),lr([m],a)}function mg(e,t){return z(e,t)}function gg(e,t,n){return Ji(e,t,n)}function Eg(e,t,n,r,o){return pn(e,t,n,r,o,!0)}function xg(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Fp(e){return e.randomizer||(e.randomizer=new Br(e.seed||0)),e.randomizer.next()}function Ji(e,t,n,r=1){return n.roughness*r*(Fp(n)*(t-e)+e)}function z(e,t,n=1){return Ji(-e,e,t,n)}function pn(e,t,n,r,o,i=!1){let a=i?o.disableMultiStrokeFill:o.disableMultiStroke,s=_p(e,t,n,r,o,!0,!1);if(a)return s;let l=_p(e,t,n,r,o,!0,!0);return s.concat(l)}function _p(e,t,n,r,o,i,a){let s=Math.pow(e-n,2)+Math.pow(t-r,2),l=Math.sqrt(s),c=1;l<200?c=1:l>500?c=.4:c=-.0016668*l+1.233334;let d=o.maxRandomnessOffset||0;d*d*100>s&&(d=l/10);let p=d/2,f=.2+Fp(o)*.2,h=o.bowing*o.maxRandomnessOffset*(r-t)/200,m=o.bowing*o.maxRandomnessOffset*(e-n)/200;h=z(h,o,c),m=z(m,o,c);let g=[],E=()=>z(p,o,c),w=()=>z(d,o,c),y=o.preserveVertices;return i&&(a?g.push({op:"move",data:[e+(y?0:E()),t+(y?0:E())]}):g.push({op:"move",data:[e+(y?0:z(d,o,c)),t+(y?0:z(d,o,c))]})),a?g.push({op:"bcurveTo",data:[h+e+(n-e)*f+E(),m+t+(r-t)*f+E(),h+e+2*(n-e)*f+E(),m+t+2*(r-t)*f+E(),n+(y?0:E()),r+(y?0:E())]}):g.push({op:"bcurveTo",data:[h+e+(n-e)*f+w(),m+t+(r-t)*f+w(),h+e+2*(n-e)*f+w(),m+t+2*(r-t)*f+w(),n+(y?0:w()),r+(y?0:w())]}),g}function kp(e,t,n){let r=[];r.push([e[0][0]+z(t,n),e[0][1]+z(t,n)]),r.push([e[0][0]+z(t,n),e[0][1]+z(t,n)]);for(let o=1;o<e.length;o++)r.push([e[o][0]+z(t,n),e[o][1]+z(t,n)]),o===e.length-1&&r.push([e[o][0]+z(t,n),e[o][1]+z(t,n)]);return Qi(r,null,n)}function Qi(e,t,n){let r=e.length,o=[];if(r>3){let i=[],a=1-n.curveTightness;o.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<r;s++){let l=e[s];i[0]=[l[0],l[1]],i[1]=[l[0]+(a*e[s+1][0]-a*e[s-1][0])/6,l[1]+(a*e[s+1][1]-a*e[s-1][1])/6],i[2]=[e[s+1][0]+(a*e[s][0]-a*e[s+2][0])/6,e[s+1][1]+(a*e[s][1]-a*e[s+2][1])/6],i[3]=[e[s+1][0],e[s+1][1]],o.push({op:"bcurveTo",data:[i[1][0],i[1][1],i[2][0],i[2][1],i[3][0],i[3][1]]})}if(t&&t.length===2){let s=n.maxRandomnessOffset;o.push({op:"lineTo",data:[t[0]+z(s,n),t[1]+z(s,n)]})}}else r===3?(o.push({op:"move",data:[e[1][0],e[1][1]]}),o.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&o.push(...pn(e[0][0],e[0][1],e[1][0],e[1][1],n));return o}function Lp(e,t,n,r,o,i,a,s){let l=s.roughness===0,c=[],d=[];if(l){e=e/4,d.push([t+r*Math.cos(-e),n+o*Math.sin(-e)]);for(let p=0;p<=Math.PI*2;p=p+e){let f=[t+r*Math.cos(p),n+o*Math.sin(p)];c.push(f),d.push(f)}d.push([t+r*Math.cos(0),n+o*Math.sin(0)]),d.push([t+r*Math.cos(e),n+o*Math.sin(e)])}else{let p=z(.5,s)-Math.PI/2;d.push([z(i,s)+t+.9*r*Math.cos(p-e),z(i,s)+n+.9*o*Math.sin(p-e)]);let f=Math.PI*2+p-.01;for(let h=p;h<f;h=h+e){let m=[z(i,s)+t+r*Math.cos(h),z(i,s)+n+o*Math.sin(h)];c.push(m),d.push(m)}d.push([z(i,s)+t+r*Math.cos(p+Math.PI*2+a*.5),z(i,s)+n+o*Math.sin(p+Math.PI*2+a*.5)]),d.push([z(i,s)+t+.98*r*Math.cos(p+a),z(i,s)+n+.98*o*Math.sin(p+a)]),d.push([z(i,s)+t+.9*r*Math.cos(p+a*.5),z(i,s)+n+.9*o*Math.sin(p+a*.5)])}return[d,c]}function Cp(e,t,n,r,o,i,a,s,l){let c=i+z(.1,l),d=[];d.push([z(s,l)+t+.9*r*Math.cos(c-e),z(s,l)+n+.9*o*Math.sin(c-e)]);for(let p=c;p<=a;p=p+e)d.push([z(s,l)+t+r*Math.cos(p),z(s,l)+n+o*Math.sin(p)]);return d.push([t+r*Math.cos(a),n+o*Math.sin(a)]),d.push([t+r*Math.cos(a),n+o*Math.sin(a)]),Qi(d,null,l)}function wg(e,t,n,r,o,i,a,s){let l=[],c=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],d=[0,0],p=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let h=0;h<p;h++)h===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(f?0:z(c[0],s)),a[1]+(f?0:z(c[0],s))]}),d=f?[o,i]:[o+z(c[h],s),i+z(c[h],s)],l.push({op:"bcurveTo",data:[e+z(c[h],s),t+z(c[h],s),n+z(c[h],s),r+z(c[h],s),d[0],d[1]]});return l}x();function Do(e){return[...e]}function Op(e,t=0){let n=e.length;if(n<3)throw new Error("A curve must have at least three points.");let r=[];if(n===3)r.push(Do(e[0]),Do(e[1]),Do(e[2]),Do(e[2]));else{let o=[];o.push(e[0],e[0]);for(let s=1;s<e.length;s++)o.push(e[s]),s===e.length-1&&o.push(e[s]);let i=[],a=1-t;r.push(Do(o[0]));for(let s=1;s+2<o.length;s++){let l=o[s];i[0]=[l[0],l[1]],i[1]=[l[0]+(a*o[s+1][0]-a*o[s-1][0])/6,l[1]+(a*o[s+1][1]-a*o[s-1][1])/6],i[2]=[o[s+1][0]+(a*o[s][0]-a*o[s+2][0])/6,o[s+1][1]+(a*o[s][1]-a*o[s+2][1])/6],i[3]=[o[s+1][0],o[s+1][1]],r.push(i[1],i[2],i[3])}}return r}x();function yg(e,t){return Math.sqrt(na(e,t))}function na(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function bg(e,t,n){let r=na(t,n);if(r===0)return na(e,t);let o=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return o=Math.max(0,Math.min(1,o)),na(e,cr(t,n,o))}function cr(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function vg(e,t){let n=e[t+0],r=e[t+1],o=e[t+2],i=e[t+3],a=3*r[0]-2*n[0]-i[0];a*=a;let s=3*r[1]-2*n[1]-i[1];s*=s;let l=3*o[0]-2*i[0]-n[0];l*=l;let c=3*o[1]-2*i[1]-n[1];return c*=c,a<l&&(a=l),s<c&&(s=c),a+s}function dl(e,t,n,r){let o=r||[];if(vg(e,t)<n){let i=e[t+0];o.length?yg(o[o.length-1],i)>1&&o.push(i):o.push(i),o.push(e[t+3])}else{let a=e[t+0],s=e[t+1],l=e[t+2],c=e[t+3],d=cr(a,s,.5),p=cr(s,l,.5),f=cr(l,c,.5),h=cr(d,p,.5),m=cr(p,f,.5),g=cr(h,m,.5);dl([a,d,h,g],0,n,o),dl([g,m,f,c],0,n,o)}return o}function Np(e,t){return ra(e,0,e.length,t)}function ra(e,t,n,r,o){let i=o||[],a=e[t],s=e[n-1],l=0,c=1;for(let d=t+1;d<n-1;++d){let p=bg(e[d],a,s);p>l&&(l=p,c=d)}return Math.sqrt(l)>r?(ra(e,t,c+1,r,i),ra(e,c,n,r,i)):(i.length||i.push(a),i.push(s)),i}function zr(e,t=.15,n){let r=[],o=(e.length-1)/3;for(let i=0;i<o;i++){let a=i*3;dl(e,a,t,r)}return n&&n>0?ra(r,0,r.length,n):r}x();function Bp(e,t,n){let r=Hr(e),o=Lo(_o(r)),i=[],a=[],s=[0,0],l=[],c=()=>{l.length>=4&&a.push(...zr(l,t)),l=[]},d=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:f,data:h}of o)switch(f){case"M":d(),s=[h[0],h[1]],a.push(s);break;case"L":c(),a.push([h[0],h[1]]);break;case"C":if(!l.length){let m=a.length?a[a.length-1]:s;l.push([m[0],m[1]])}l.push([h[0],h[1]]),l.push([h[2],h[3]]),l.push([h[4],h[5]]);break;case"Z":c(),a.push([s[0],s[1]]);break}if(d(),!n)return i;let p=[];for(let f of i){let h=Np(f,n);h.length&&p.push(h)}return p}var qe="none",gt=class{constructor(t){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=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Ip()}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,n,r){return{shape:t,sets:n||[],options:r||this.defaultOptions}}line(t,n,r,o,i){let a=this._o(i);return this._d("line",[il(t,n,r,o,a)],a)}rectangle(t,n,r,o,i){let a=this._o(i),s=[],l=Dp(t,n,r,o,a);if(a.fill){let c=[[t,n],[t+r,n],[t+r,n+o],[t,n+o]];a.fillStyle==="solid"?s.push(ta([c],a)):s.push(lr([c],a))}return a.stroke!==qe&&s.push(l),this._d("rectangle",s,a)}ellipse(t,n,r,o,i){let a=this._o(i),s=[],l=sl(r,o,a),c=ea(t,n,a,l);if(a.fill)if(a.fillStyle==="solid"){let d=ea(t,n,a,l).opset;d.type="fillPath",s.push(d)}else s.push(lr([c.estimatedPoints],a));return a.stroke!==qe&&s.push(c.opset),this._d("ellipse",s,a)}circle(t,n,r,o){let i=this.ellipse(t,n,r,r,o);return i.shape="circle",i}linearPath(t,n){let r=this._o(n);return this._d("linearPath",[Co(t,!1,r)],r)}arc(t,n,r,o,i,a,s=!1,l){let c=this._o(l),d=[],p=ll(t,n,r,o,i,a,s,!0,c);if(s&&c.fill)if(c.fillStyle==="solid"){let f=Object.assign({},c);f.disableMultiStroke=!0;let h=ll(t,n,r,o,i,a,!0,!1,f);h.type="fillPath",d.push(h)}else d.push(Rp(t,n,r,o,i,a,c));return c.stroke!==qe&&d.push(p),this._d("arc",d,c)}curve(t,n){let r=this._o(n),o=[],i=al(t,r);if(r.fill&&r.fill!==qe&&t.length>=3)if(r.fillStyle==="solid"){let a=al(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{let a=Op(t),s=zr(a,10,(1+r.roughness)/2);o.push(lr([s],r))}return r.stroke!==qe&&o.push(i),this._d("curve",o,r)}polygon(t,n){let r=this._o(n),o=[],i=Co(t,!0,r);return r.fill&&(r.fillStyle==="solid"?o.push(ta([t],r)):o.push(lr([t],r))),r.stroke!==qe&&o.push(i),this._d("polygon",o,r)}path(t,n){let r=this._o(n),o=[];if(!t)return this._d("path",o,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let i=r.fill&&r.fill!=="transparent"&&r.fill!==qe,a=r.stroke!==qe,s=!!(r.simplification&&r.simplification<1),l=s?4-4*(r.simplification||1):(1+r.roughness)/2,c=Bp(t,1,l),d=cl(t,r);if(i)if(r.fillStyle==="solid")if(c.length===1){let p=cl(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));o.push({type:"fillPath",ops:this._mergedShape(p.ops)})}else o.push(ta(c,r));else o.push(lr(c,r));return a&&(s?c.forEach(p=>{o.push(Co(p,!1,r))}):o.push(d)),this._d("path",o,r)}opsToPath(t,n){let r="";for(let o of t.ops){let i=typeof n=="number"&&n>=0?o.data.map(a=>+a.toFixed(n)):o.data;switch(o.op){case"move":r+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":r+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":r+=`L${i[0]} ${i[1]} `;break}}return r.trim()}toPaths(t){let n=t.sets||[],r=t.options||this.defaultOptions,o=[];for(let i of n){let a=null;switch(i.type){case"path":a={d:this.opsToPath(i),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:qe};break;case"fillPath":a={d:this.opsToPath(i),stroke:qe,strokeWidth:0,fill:r.fill||qe};break;case"fillSketch":a=this.fillSketch(i,r);break}a&&o.push(a)}return o}fillSketch(t,n){let r=n.fillWeight;return r<0&&(r=n.strokeWidth/2),{d:this.opsToPath(t),stroke:n.fill||qe,strokeWidth:r,fill:qe}}_mergedShape(t){return t.filter((n,r)=>r===0?!0:n.op!=="move")}};var oa=class{constructor(t,n){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new gt(n)}draw(t){let n=t.sets||[],r=t.options||this.getDefaultOptions(),o=this.ctx,i=t.options.fixedDecimalPlaceDigits;for(let a of n)switch(a.type){case"path":o.save(),o.strokeStyle=r.stroke==="none"?"transparent":r.stroke,o.lineWidth=r.strokeWidth,r.strokeLineDash&&o.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(o.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(o,a,i),o.restore();break;case"fillPath":{o.save(),o.fillStyle=r.fill||"";let s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(o,a,i,s),o.restore();break}case"fillSketch":this.fillSketch(o,a,r);break}}fillSketch(t,n,r){let o=r.fillWeight;o<0&&(o=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=o,this._drawToContext(t,n,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,n,r,o="nonzero"){t.beginPath();for(let i of n.ops){let a=typeof r=="number"&&r>=0?i.data.map(s=>+s.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1]);break}}n.type==="fillPath"?t.fill(o):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,n,r,o,i){let a=this.gen.line(t,n,r,o,i);return this.draw(a),a}rectangle(t,n,r,o,i){let a=this.gen.rectangle(t,n,r,o,i);return this.draw(a),a}ellipse(t,n,r,o,i){let a=this.gen.ellipse(t,n,r,o,i);return this.draw(a),a}circle(t,n,r,o){let i=this.gen.circle(t,n,r,o);return this.draw(i),i}linearPath(t,n){let r=this.gen.linearPath(t,n);return this.draw(r),r}polygon(t,n){let r=this.gen.polygon(t,n);return this.draw(r),r}arc(t,n,r,o,i,a,s=!1,l){let c=this.gen.arc(t,n,r,o,i,a,s,l);return this.draw(c),c}curve(t,n){let r=this.gen.curve(t,n);return this.draw(r),r}path(t,n){let r=this.gen.path(t,n);return this.draw(r),r}};x();x();var Ro="http://www.w3.org/2000/svg";var ia=class{constructor(t,n){this.svg=t,this.gen=new gt(n)}draw(t){let n=t.sets||[],r=t.options||this.getDefaultOptions(),o=this.svg.ownerDocument||window.document,i=o.createElementNS(Ro,"g"),a=t.options.fixedDecimalPlaceDigits;for(let s of n){let l=null;switch(s.type){case"path":{l=o.createElementNS(Ro,"path"),l.setAttribute("d",this.opsToPath(s,a)),l.setAttribute("stroke",r.stroke),l.setAttribute("stroke-width",r.strokeWidth+""),l.setAttribute("fill","none"),r.strokeLineDash&&l.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break}case"fillPath":{l=o.createElementNS(Ro,"path"),l.setAttribute("d",this.opsToPath(s,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",r.fill||""),(t.shape==="curve"||t.shape==="polygon")&&l.setAttribute("fill-rule","evenodd");break}case"fillSketch":{l=this.fillSketch(o,s,r);break}}l&&i.appendChild(l)}return i}fillSketch(t,n,r){let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);let i=t.createElementNS(Ro,"path");return i.setAttribute("d",this.opsToPath(n,r.fixedDecimalPlaceDigits)),i.setAttribute("stroke",r.fill||""),i.setAttribute("stroke-width",o+""),i.setAttribute("fill","none"),r.fillLineDash&&i.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,n){return this.gen.opsToPath(t,n)}line(t,n,r,o,i){let a=this.gen.line(t,n,r,o,i);return this.draw(a)}rectangle(t,n,r,o,i){let a=this.gen.rectangle(t,n,r,o,i);return this.draw(a)}ellipse(t,n,r,o,i){let a=this.gen.ellipse(t,n,r,o,i);return this.draw(a)}circle(t,n,r,o){let i=this.gen.circle(t,n,r,o);return this.draw(i)}linearPath(t,n){let r=this.gen.linearPath(t,n);return this.draw(r)}polygon(t,n){let r=this.gen.polygon(t,n);return this.draw(r)}arc(t,n,r,o,i,a,s=!1,l){let c=this.gen.arc(t,n,r,o,i,a,s,l);return this.draw(c)}curve(t,n){let r=this.gen.curve(t,n);return this.draw(r)}path(t,n){let r=this.gen.path(t,n);return this.draw(r)}};var Xt={canvas(e,t){return new oa(e,t)},svg(e,t){return new ia(e,t)},generator(e){return new gt(e)},newSeed(){return gt.newSeed()}};x();x();x();function Hp(e,t,n,r=o=>o){return e*r(.5-t*(.5-n))}function Mg(e){return[-e[0],-e[1]]}function xt(e,t){return[e[0]+t[0],e[1]+t[1]]}function st(e,t){return[e[0]-t[0],e[1]-t[1]]}function Et(e,t){return[e[0]*t,e[1]*t]}function Tg(e,t){return[e[0]/t,e[1]/t]}function Fo(e){return[e[1],-e[0]]}function zp(e,t){return e[0]*t[0]+e[1]*t[1]}function Ag(e,t){return e[0]===t[0]&&e[1]===t[1]}function Sg(e){return Math.hypot(e[0],e[1])}function Ig(e){return e[0]*e[0]+e[1]*e[1]}function Gp(e,t){return Ig(st(e,t))}function Vp(e){return Tg(e,Sg(e))}function Pg(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function Oo(e,t,n){let r=Math.sin(n),o=Math.cos(n),i=e[0]-t[0],a=e[1]-t[1],s=i*o-a*r,l=i*r+a*o;return[s+t[0],l+t[1]]}function ul(e,t,n){return xt(e,Et(st(t,e),n))}function Up(e,t,n){return xt(e,Et(t,n))}var{min:Gr,PI:_g}=Math,Wp=.275,No=_g+1e-4;function kg(e,t={}){let{size:n=16,smoothing:r=.5,thinning:o=.5,simulatePressure:i=!0,easing:a=F=>F,start:s={},end:l={},last:c=!1}=t,{cap:d=!0,easing:p=F=>F*(2-F)}=s,{cap:f=!0,easing:h=F=>--F*F*F+1}=l;if(e.length===0||n<=0)return[];let m=e[e.length-1].runningLength,g=s.taper===!1?0:s.taper===!0?Math.max(n,m):s.taper,E=l.taper===!1?0:l.taper===!0?Math.max(n,m):l.taper,w=Math.pow(n*r,2),y=[],b=[],T=e.slice(0,10).reduce((F,K)=>{let R=K.pressure;if(i){let q=Gr(1,K.distance/n),we=Gr(1,1-q);R=Gr(1,F+(we-F)*(q*Wp))}return(F+R)/2},e[0].pressure),A=Hp(n,o,e[e.length-1].pressure,a),k,P=e[0].vector,I=e[0].point,_=I,D=I,S=_,L=!1;for(let F=0;F<e.length;F++){let{pressure:K}=e[F],{point:R,vector:q,distance:we,runningLength:me}=e[F];if(F<e.length-1&&m-me<3)continue;if(o){if(i){let Ge=Gr(1,we/n),tt=Gr(1,1-Ge);K=Gr(1,T+(tt-T)*(Ge*Wp))}A=Hp(n,o,K,a)}else A=n/2;k===void 0&&(k=A);let Ie=me<g?p(me/g):1,ge=m-me<E?h((m-me)/E):1;A=Math.max(.01,A*Math.min(Ie,ge));let et=(F<e.length-1?e[F+1]:e[F]).vector,en=F<e.length-1?zp(q,et):1,Ce=zp(q,P)<0&&!L,kt=en!==null&&en<0;if(Ce||kt){let Ge=Et(Fo(P),A);for(let tt=1/13,Ue=0;Ue<=1;Ue+=tt)D=Oo(st(R,Ge),R,No*Ue),y.push(D),S=Oo(xt(R,Ge),R,No*-Ue),b.push(S);I=D,_=S,kt&&(L=!0);continue}if(L=!1,F===e.length-1){let Ge=Et(Fo(q),A);y.push(st(R,Ge)),b.push(xt(R,Ge));continue}let Tn=Et(Fo(ul(et,q,en)),A);D=st(R,Tn),(F<=1||Gp(I,D)>w)&&(y.push(D),I=D),S=xt(R,Tn),(F<=1||Gp(_,S)>w)&&(b.push(S),_=S),T=K,P=q}let O=e[0].point.slice(0,2),G=e.length>1?e[e.length-1].point.slice(0,2):xt(e[0].point,[1,1]),X=[],U=[];if(e.length===1){if(!(g||E)||c){let F=Up(O,Vp(Fo(st(O,G))),-(k||A)),K=[];for(let R=1/13,q=R;q<=1;q+=R)K.push(Oo(F,O,No*2*q));return K}}else{if(!(g||E&&e.length===1))if(d)for(let K=1/13,R=K;R<=1;R+=K){let q=Oo(b[0],O,No*R);X.push(q)}else{let K=st(y[0],b[0]),R=Et(K,.5),q=Et(K,.51);X.push(st(O,R),st(O,q),xt(O,q),xt(O,R))}let F=Fo(Mg(e[e.length-1].vector));if(E||g&&e.length===1)U.push(G);else if(f){let K=Up(G,F,A);for(let R=1/29,q=R;q<1;q+=R)U.push(Oo(K,G,No*3*q))}else U.push(xt(G,Et(F,A)),xt(G,Et(F,A*.99)),st(G,Et(F,A*.99)),st(G,Et(F,A)))}return y.concat(U,b.reverse(),X)}function Lg(e,t={}){var n;let{streamline:r=.5,size:o=16,last:i=!1}=t;if(e.length===0)return[];let a=.15+(1-r)*.85,s=Array.isArray(e[0])?e:e.map(({x:h,y:m,pressure:g=.5})=>[h,m,g]);if(s.length===2){let h=s[1];s=s.slice(0,-1);for(let m=1;m<5;m++)s.push(ul(s[0],h,m/4))}s.length===1&&(s=[...s,[...xt(s[0],[1,1]),...s[0].slice(2)]]);let l=[{point:[s[0][0],s[0][1]],pressure:s[0][2]>=0?s[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],c=!1,d=0,p=l[0],f=s.length-1;for(let h=1;h<s.length;h++){let m=i&&h===f?s[h].slice(0,2):ul(p.point,s[h],a);if(Ag(p.point,m))continue;let g=Pg(m,p.point);if(d+=g,h<f&&!c){if(d<o)continue;c=!0}p={point:m,pressure:s[h][2]>=0?s[h][2]:.5,vector:Vp(st(p.point,m)),distance:g,runningLength:d},l.push(p)}return l[0].vector=((n=l[1])==null?void 0:n.vector)||[0,0],l}function Xp(e,t={}){return kg(Lg(e,t),t)}x();x();x();x();var Le=(e,t)=>[0,0,0,0,t,e,1,0];var Yp=(e,t)=>[0,0,0,0,t,e,0,0];var dr=(e=0,t=0)=>{let n=[0,0,0,0,0,0,0,0];if(t<0||t>7)throw new Error(`Expected \`index\` between 0 and 7, got \`${t}\``);return e!==0&&(n[t]=e),n};var Ur=e=>[e[0],e[1],e[2],e[3],-e[4],-e[5],-e[6],-e[7]];var $p=(e,t)=>gl(t)?[e[0]+t,e[1],e[2],e[3],e[4],e[5],e[6],e[7]]:[e[0]+t[0],e[1]+t[1],e[2]+t[2],e[3]+t[3],e[4]+t[4],e[5]+t[5],e[6]+t[6],e[7]+t[7]],pl=(e,t)=>gl(t)?[e[0]-t,e[1],e[2],e[3],e[4],e[5],e[6],e[7]]:[e[0]-t[0],e[1]-t[1],e[2]-t[2],e[3]-t[3],e[4]-t[4],e[5]-t[5],e[6]-t[6],e[7]-t[7]],On=(e,t)=>gl(t)?[e[0]*t,e[1]*t,e[2]*t,e[3]*t,e[4]*t,e[5]*t,e[6]*t,e[7]*t]:[Cg(e,t),t[1]*e[0]+t[0]*e[1]-t[4]*e[2]+t[5]*e[3]+t[2]*e[4]-t[3]*e[5]-t[7]*e[6]-t[6]*e[7],t[2]*e[0]+t[0]*e[2]-t[6]*e[3]+t[3]*e[6],t[3]*e[0]+t[6]*e[2]+t[0]*e[3]-t[2]*e[6],t[4]*e[0]+t[2]*e[1]-t[1]*e[2]+t[7]*e[3]+t[0]*e[4]+t[6]*e[5]-t[5]*e[6]+t[3]*e[7],t[5]*e[0]-t[3]*e[1]+t[7]*e[2]+t[1]*e[3]-t[6]*e[4]+t[0]*e[5]+t[4]*e[6]+t[2]*e[7],t[6]*e[0]+t[3]*e[2]-t[2]*e[3]+t[0]*e[6],t[7]*e[0]+t[6]*e[1]+t[5]*e[2]+t[4]*e[3]+t[3]*e[4]+t[2]*e[5]+t[1]*e[6]+t[0]*e[7]],Cg=(e,t)=>t[0]*e[0]+t[2]*e[2]+t[3]*e[3]-t[6]*e[6],fl=(e,t)=>[t[0]*e[0],t[1]*e[0]+t[0]*e[1],t[2]*e[0]+t[0]*e[2],t[3]*e[0]+t[0]*e[3],t[4]*e[0]+t[2]*e[1]-t[1]*e[2]+t[0]*e[4],t[5]*e[0]-t[3]*e[1]+t[1]*e[3]+t[0]*e[5],t[6]*e[0]+t[3]*e[2]-t[2]*e[3]+t[0]*e[6],t[7]*e[0]+t[6]*e[1]+t[5]*e[2]+t[4]*e[3]+t[3]*e[4]+t[2]*e[5]+t[1]*e[6]],aa=(e,t)=>[hl(e,t),e[1]*t[7]+e[4]*t[5]-e[5]*t[4]+e[7]*t[1],e[2]*t[7]-e[4]*t[6]+e[6]*t[4]+e[7]*t[2],e[3]*t[7]+e[5]*t[6]-e[6]*t[5]+e[7]*t[3],e[4]*t[7]+e[7]*t[4],e[5]*t[7]+e[7]*t[5],e[6]*t[7]+e[7]*t[6],e[7]*t[7]],hl=(e,t)=>e[0]*t[7]+e[1]*t[6]+e[2]*t[5]+e[3]*t[4]+e[4]*t[3]+e[5]*t[2]+e[6]*t[1]+e[7]*t[0],Zp=(e,t)=>[t[0]*e[0]+t[2]*e[2]+t[3]*e[3]-t[6]*e[6],t[1]*e[0]+t[0]*e[1]-t[4]*e[2]+t[5]*e[3]+t[2]*e[4]-t[3]*e[5]-t[7]*e[6]-t[6]*e[7],t[2]*e[0]+t[0]*e[2]-t[6]*e[3]+t[3]*e[6],t[3]*e[0]+t[6]*e[2]+t[0]*e[3]-t[2]*e[6],t[4]*e[0]+t[7]*e[3]+t[0]*e[4]+t[3]*e[7],t[5]*e[0]+t[7]*e[2]+t[0]*e[5]+t[2]*e[7],t[6]*e[0]+t[0]*e[6],t[7]*e[0]+t[0]*e[7]],ml=e=>Math.sqrt(Math.abs(e[0]*e[0]-e[2]*e[2]-e[3]*e[3]+e[6]*e[6])),Kp=e=>Math.sqrt(Math.abs(e[7]*e[7]-e[5]*e[5]-e[4]*e[4]+e[1]*e[1])),ur=e=>{let t=ml(e);if(t===0||t===1)return e;let n=e[6]<0?-1:1;return On(e,n/t)},jp=e=>{let t=Kp(e);return t===0||t===1?e:On(e,1/t)},gl=e=>typeof e=="number",rv=dr(1,1),ov=dr(1,2),iv=dr(1,3),av=dr(1,4),sv=dr(1,5),lv=dr(1,6),cv=dr(1,7);x();x();var sa=(e,t,n)=>ur([0,n,e,t,0,0,0,0]),Wr=(e,t)=>ur(aa(t,e)),qp=(e,t)=>Zp(e,t),Jp=(e,t)=>qp(Wr(e,t),t);var Qp=e=>Math.sign(e[1]);var pr=([e,t])=>[0,0,0,0,t,e,1,0],fr=e=>[e[5],e[4]],tf=e=>[0,0,0,0,Math.abs(e[4]),Math.abs(e[5]),1,0],nf=(e,t)=>ur(fl(e,t));var El=(e,t)=>ml(aa(e,t)),Nn=(e,t)=>hl(e,t);x();var xl=e=>[0,0,0,0,e[4],e[5],0,0],rf=(e,t)=>jp([0,0,0,0,t[4]-e[4],t[5]-e[5],0,0]);x();var wl=(e,t)=>$p(On(e,Math.sin(t/2)),Math.cos(t/2)),af=e=>[1,0,0,0,-(.5*e[5]),.5*e[4],0,0],sf=(e,t)=>{let n=.5*t;return[1,0,0,0,n*e[4],n*e[5],0,0]};var lf=(e,t)=>On(t,e),wt=(e,t)=>ur(On(On(e,t),Ur(e)));x();x();var Vr=1e-4,Ho=(e,t,n)=>(e[0]-n[0])*(t[1]-n[1])-(e[1]-n[1])*(t[0]-n[0]);var Fg=e=>{let t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]},Xr=e=>Fg(e)?e:[...e,e[0]],yt=e=>{let t=e*180/Math.PI;return t<0?360+t:t},Og=e=>e/180*Math.PI;var cf=(e,t)=>[e[0]*Math.cos(t)-e[1]*Math.sin(t),e[0]*Math.sin(t)+e[1]*Math.cos(t)],Ng=e=>e[0]===0&&e[1]===0,ye=(e,t,n)=>{let r=Og(t);return!n||Ng(n)?cf(e,r):cf(e.map((o,i)=>o-n[i]),r).map((o,i)=>o+n[i])};var Bg=e=>[-e[0],-e[1]],yl=(e,t)=>[e[0]+t[0],e[1]+t[1]],Hg=(e,t)=>Je(...e,...t),df=e=>yt(Math.atan2(e[1][1]-e[0][1],e[1][0]-e[0][0]));var uf=(e,t,n)=>{let r=yl(e,Bg(t));return ye(r,-yt(n))};var zg=(e,t)=>{let[n,r]=e,[[o,i],[a,s]]=t,l=n-o,c=r-i,d=a-o,p=s-i,f=l*d+c*p,h=d*d+p*p,m=-1;h!==0&&(m=f/h);let g,E;m<0?(g=o,E=i):m>1?(g=a,E=s):(g=o+m*d,E=i+m*p);let w=n-g,y=r-E;return Math.sqrt(w*w+y*y)},hr=(e,t,n=Vr)=>{let r=zg(e,t);return r===0?!0:r<n},bl=(e,t,n=Vr)=>t.some(r=>hr(e,r,n));var Gg=e=>{let[t,n,r,o]=e;return(i,a)=>Math.pow(1-i,3)*o[a]+3*i*Math.pow(1-i,2)*r[a]+3*Math.pow(i,2)*(1-i)*n[a]+t[a]*Math.pow(i,3)},Ug=(e,t=10)=>{let n=Gg(e),r=[n(0,0),n(0,1)],o=[],i=0,a=1/t;for(let s=0;s<t;s++)if(i+=a,i<=1){let l=[n(i,0),n(i,1)];o.push([r,l]),r=l}return o},vl=(e,t,n=Vr)=>bl(e,Ug(t),n),pf=(e,t,n=Vr)=>t.some(r=>vl(e,r,n)),Ml=(e,t)=>{let n=e[0],r=e[1],o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){let s=t[i][0],l=t[i][1],c=t[a][0],d=t[a][1];(l>r&&d<=r||l<=r&&d>r)&&n<(c-s)*(r-l)/(d-l)+s&&(o=!o)}return o},ff=(e,t,n=Vr)=>{let r=!1,o=Xr(t);for(let i=0,a=o.length-1;i<a;i++)if(hr(e,[o[i],o[i+1]],n)){r=!0;break}return r};var Wg=(e,t)=>{let{angle:n,halfWidth:r,halfHeight:o,center:i}=t,a=r,s=o,[l,c]=uf(e,i,n),d=Math.abs(l),p=Math.abs(c),f=.707,h=.707;for(let E=0;E<3;E++){let w=a*f,y=s*h,b=(a*a-s*s)*f**3/a,T=(s*s-a*a)*h**3/s,A=w-b,k=y-T,P=d-b,I=p-T,_=Math.hypot(k,A),D=Math.hypot(I,P);f=Math.min(1,Math.max(0,(P*_/D+b)/a)),h=Math.min(1,Math.max(0,(I*_/D+T)/s));let S=Math.hypot(h,f);f/=S,h/=S}let[m,g]=[a*f*Math.sign(l),s*h*Math.sign(c)];return Hg([l,c],[m,g])},hf=(e,t,n=Vr)=>Wg(e,t)<=n,mf=(e,t)=>{let{center:n,angle:r,halfWidth:o,halfHeight:i}=t,[a,s]=uf(e,n,r);return a/o*(a/o)+s/i*(s/i)<=1};var zo=(e,t,n=0)=>{switch(t.type){case"polygon":return ff(e,t.data,n);case"ellipse":return hf(e,t.data,n);case"line":return hr(e,t.data,n);case"polyline":return bl(e,t.data,n);case"curve":return vl(e,t.data,n);case"polycurve":return pf(e,t.data,n);default:throw Error(`shape ${t} is not implemented`)}},la=(e,t)=>{switch(t.type){case"polygon":return Ml(e,t.data);case"line":return!1;case"curve":return!1;case"ellipse":return mf(e,t.data);case"polyline":{let n=Xr(t.data.flat());return Ml(e,n)}case"polycurve":return!1;default:throw Error(`shape ${t} is not implemented`)}};x();x();var Vg=(e,t)=>{let[n,r,o,i]=t,{x:a,y:s}=Qs({sceneX:n,sceneY:r},e),{x:l,y:c}=Qs({sceneX:o,sceneY:i},e);return l-a>e.width||c-s>e.height},Xg=({scenePoint:e,viewportDimensions:t,zoom:n})=>({scrollX:t.width/2/n.value-e.x,scrollY:t.height/2/n.value-e.y}),Al=(e,t)=>{if(e=gf(e),!e.length)return{scrollX:0,scrollY:0};let[n,r,o,i]=Oe(e);Vg(t,[n,r,o,i])&&([n,r,o,i]=Tl(e,So({clientX:t.scrollX,clientY:t.scrollY},t)));let a=(n+o)/2,s=(r+i)/2;return Xg({scenePoint:{x:a,y:s},viewportDimensions:{width:t.width,height:t.height},zoom:t.zoom})};x();var Yg=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="ellipse"||e==="diamond"||e==="line"||e==="freedraw",_v=e=>e!=="image"&&e!=="frame"&&e!=="magicframe",$g=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="ellipse"||e==="diamond"||e==="freedraw"||e==="arrow"||e==="line",Zg=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="ellipse"||e==="diamond"||e==="arrow"||e==="line",Sl=e=>e==="rectangle"||e==="iframe"||e==="embeddable"||e==="line"||e==="diamond"||e==="image",kv=e=>e==="arrow",Kg=e=>e==="arrow",Il=(e,t)=>{let n=null;for(let r=e.length-1;r>=0;--r){let o=e[r];if(!o.isDeleted&&t(o)){n=o;break}}return n};x();var jg=e=>Math.max(Ju,Math.min(e,30)),Rv=({viewportX:e,viewportY:t,nextZoom:n},r)=>{let o=e-r.offsetLeft,i=t-r.offsetTop,a=r.zoom.value,s=r.scrollX+(o-o/a),l=r.scrollY+(i-i/a),c=-(o-o/n),d=-(i-i/n);return{scrollX:s+c,scrollY:l+d,zoom:{value:n}}};x();var Xv={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"},ne={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:Li?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SUBTRACT:"-",SLASH:"/",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"},Yv=e=>e===ne.ARROW_LEFT||e===ne.ARROW_RIGHT||e===ne.ARROW_DOWN||e===ne.ARROW_UP,$v=e=>e.altKey,Zv=e=>e.shiftKey,Pl=e=>e.shiftKey;x();x();var da=e=>{let{angle:t,width:n,height:r,x:o,y:i}=e,a=yt(t),s=o+n/2,l=i+r/2,c=[s,l],d=[];return e.type==="diamond"?d=[ye([s,i],a,c),ye([o+n,l],a,c),ye([s,i+r],a,c),ye([o,l],a,c)]:d=[ye([o,i],a,c),ye([o+n,i],a,c),ye([o+n,i+r],a,c),ye([o,i+r],a,c)],{type:"polygon",data:d}},e5=(e,t,n=10)=>{let[r,o,i,a,s,l]=H(e,t,!0);r-=n,i+=n,o-=n,a+=n;let c=yt(e.angle),d=[s,l],p=ye([r,o],c,d),f=ye([i,o],c,d),h=ye([r,a],c,d),m=ye([i,a],c,d);return{type:"polygon",data:[p,f,m,h]}},Ef=e=>{let{width:t,height:n,angle:r,x:o,y:i}=e;return{type:"ellipse",data:{center:[o+t/2,i+n/2],angle:r,halfWidth:t/2,halfHeight:n/2}}},xf=e=>{for(let t of e.sets)if(t.type==="path")return t.ops;return e.sets[0].ops},wf=(e,t=[0,0],n,r)=>{let o=l=>ye([l[0]+t[0],l[1]+t[1]],yt(n),r),i=xf(e),a=[],s=[0,0];for(let l of i)if(l.op==="move"&&(s=o(l.data)),l.op==="bcurveTo"){let c=o([l.data[0],l.data[1]]),d=o([l.data[2],l.data[3]]),p=o([l.data[4],l.data[5]]);a.push([s,c,d,p]),s=p}return{type:"polycurve",data:a}},eE=e=>{let t=e[0],n=[];for(let r=1;r<e.length;r++){let o=e[r];n.push([t,o]),t=o}return n},yf=(e,t,n=!1)=>{let r=yt(e.angle),o=a=>ye(yl(a,[e.x,e.y]),r,t),i=eE(e.points.map(a=>o(a)));return n?{type:"polygon",data:Xr(i.flat())}:{type:"polyline",data:i}},bf=(e,t,n=[0,0],r,o)=>{let i=d=>ye([d[0]+n[0],d[1]+n[1]],yt(r),o);if(e.roundness===null)return{type:"polygon",data:Xr(e.points.map(d=>i(d)))};let a=xf(t),s=[],l=!1;for(let d of a)d.op==="move"?(l=!l,l&&s.push([d.data[0],d.data[1]])):d.op==="bcurveTo"?l&&(s.push([d.data[0],d.data[1]]),s.push([d.data[2],d.data[3]]),s.push([d.data[4],d.data[5]])):d.op==="lineTo"&&l&&s.push([d.data[0],d.data[1]]);return{type:"polygon",data:zr(s,10,5).map(d=>i(d))}};x();var Ne=An(_l(),1);x();function Mf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Mf(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Tf(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=Mf(t))&&(r&&(r+=" "),r+=n);return r}var u=An(kl(),1),vt=e=>"var(--icon-fill-color)",Pf=e=>e===Fe.LIGHT?an.white:"#1e1e1e",v=(e,t=512)=>{let{width:n=512,height:r=n,mirror:o,style:i,...a}=typeof t=="number"?{width:t}:t;return(0,u.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:`0 0 ${n} ${r}`,className:Tf({"rtl-mirror":o}),style:i,...a,children:typeof e=="string"?(0,u.jsx)("path",{fill:"currentColor",d:e}):e})},C={width:24,height:24,fill:"none",strokeWidth:2,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},V={width:20,height:20,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},h5=v((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("rect",{x:3,y:8,width:18,height:4,rx:1}),(0,u.jsx)("line",{x1:12,y1:8,x2:12,y2:21}),(0,u.jsx)("path",{d:"M19 12v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-7"}),(0,u.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"})]}),C),m5=v((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,u.jsx)("path",{d:"M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0"}),(0,u.jsx)("line",{x1:"3",y1:"6",x2:"3",y2:"19"}),(0,u.jsx)("line",{x1:"12",y1:"6",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"21",y1:"6",x2:"21",y2:"19"})]}),C),g5=v((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),C),E5=v((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"1"}),(0,u.jsx)("circle",{cx:"12",cy:"19",r:"1"}),(0,u.jsx)("circle",{cx:"12",cy:"5",r:"1"})]}),C),x5=v((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M9 4v6l-2 4v2h10v-2l-2 -4v-6"}),(0,u.jsx)("line",{x1:"12",y1:"16",x2:"12",y2:"21"}),(0,u.jsx)("line",{x1:"8",y1:"4",x2:"16",y2:"4"})]}),C),w5=v((0,u.jsxs)("g",{children:[(0,u.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,u.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,u.jsx)("mask",{id:"UnlockedIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:6,y:1,width:9,height:9,children:(0,u.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,u.jsx)("g",{mask:"url(#UnlockedIcon)",children:(0,u.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"})})]}),V),y5=v((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.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,u.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,u.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"})]}),V),b5=v((0,u.jsxs)(u.Fragment,{children:[(0,u.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,u.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.005 10.478 7.905 14.423L6 25.75l6.005-15.273Z",fill:"currentColor"}),(0,u.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"}),v5=v((0,u.jsxs)(u.Fragment,{children:[(0,u.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,u.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,u.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"}),M5=v((0,u.jsxs)(u.Fragment,{children:[(0,u.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,u.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,u.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"}),T5=v((0,u.jsx)("g",{fill:"currentColor",children:(0,u.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"}),_f=v((0,u.jsxs)("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.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,u.jsx)("path",{d:"M13.5 13.5l4.5 4.5"})]}),{fill:"none",width:22,height:22,strokeWidth:1.25}),kf=v((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"})]}),C),Lf=v((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.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"})]}),C),Cf=v((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"})]}),C),Df=v((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"16",x2:"19",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"8",x2:"19",y2:"12"})]}),C),Rf=v((0,u.jsx)("path",{d:"M4.167 10h11.666",strokeWidth:"1.5"}),V),A5=v((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M20 17v-12c0 -1.121 -.879 -2 -2 -2s-2 .879 -2 2v12l2 2l2 -2z"}),(0,u.jsx)("path",{d:"M16 7h4"}),(0,u.jsx)("path",{d:"M18 19h-13a2 2 0 1 1 0 -4h4a2 2 0 1 0 0 -4h-3"})]}),C),Go=v((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.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,u.jsx)("path",{d:"m11.25 5.417 3.333 3.333"})]}),V),Ff=v((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"7",y2:"20"}),(0,u.jsx)("line",{x1:"14",y1:"20",x2:"21",y2:"20"}),(0,u.jsx)("line",{x1:"6.9",y1:"15",x2:"13.8",y2:"15"}),(0,u.jsx)("line",{x1:"10.2",y1:"6.3",x2:"16",y2:"20"}),(0,u.jsx)("polyline",{points:"5 20 11 4 13 4 20 20"})]}),C),Of=v((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M12.5 6.667h.01"}),(0,u.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,u.jsx)("path",{d:"m3.333 12.5 3.334-3.333c.773-.745 1.726-.745 2.5 0l4.166 4.166"}),(0,u.jsx)("path",{d:"m11.667 11.667.833-.834c.774-.744 1.726-.744 2.5 0l1.667 1.667"})]}),V),Nf=v((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.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,u.jsx)("path",{d:"M18 13.3l-6.3 -6.3"})]}),C),S5=v((0,u.jsx)("path",{strokeWidth:"1.25",d:"M10 4.167v11.666M4.167 10h11.666"}),V),I5=v((0,u.jsx)("path",{d:"M5 10h10",strokeWidth:"1.25"}),V),P5=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M21 21l-6 -6"}),(0,u.jsx)("path",{d:"M3.268 12.043a7.017 7.017 0 0 0 6.634 4.957a7.012 7.012 0 0 0 7.043 -6.131a7 7 0 0 0 -5.314 -7.672a7.021 7.021 0 0 0 -8.241 4.403"}),(0,u.jsx)("path",{d:"M3 4v4h4"})]}),C),_5=v((0,u.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"}),V),k5=v((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("polyline",{points:"12 16 18 10 12 4"}),(0,u.jsx)("polyline",{points:"8 4 2 10 8 16"})]}),V),L5=v((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.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,u.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"})]}),V),C5=v((0,u.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"}),V),D5=v((0,u.jsx)("g",{stroke:"currentColor",strokeLinejoin:"round",children:(0,u.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"})}),{...V,strokeWidth:1.5}),R5=v((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"6",x2:"20",y2:"6"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("line",{x1:"4",y1:"18",x2:"20",y2:"18"})]}),C),F5=v((0,u.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"}),V),O5=v((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,u.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),(0,u.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),C),N5=v((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,u.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"17.01"}),(0,u.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),C),B5=v((0,u.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"}),V),H5=v((0,u.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"}),V),z5=v((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.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,u.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"})]}),V),G5=v((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 4l11.733 16h4.267l-11.733 -16z"}),(0,u.jsx)("path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"})]}),C),U5=v((0,u.jsx)("polyline",{fill:"none",stroke:"currentColor",points:"20 6 9 17 4 12"}),{width:24,height:24}),W5=v((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.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,u.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"})]}),V),V5=v("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}),X5=v("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}),Y5=v((0,u.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"}),V),$5=v("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}),Z5=v("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"),K5=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 16l1.465 1.638a2 2 0 1 1 -3.015 .099l1.55 -1.737z"}),(0,u.jsx)("path",{d:"M13.737 9.737c2.299 -2.3 3.23 -5.095 2.081 -6.245c-1.15 -1.15 -3.945 -.217 -6.244 2.082c-2.3 2.299 -3.231 5.095 -2.082 6.244c1.15 1.15 3.946 .218 6.245 -2.081z"}),(0,u.jsx)("path",{d:"M7.492 11.818c.362 .362 .768 .676 1.208 .934l6.895 4.047c1.078 .557 2.255 -.075 3.692 -1.512c1.437 -1.437 2.07 -2.614 1.512 -3.692c-.372 -.718 -1.72 -3.017 -4.047 -6.895a6.015 6.015 0 0 0 -.934 -1.208"})]}),C),j5=v((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15 8h.01"}),(0,u.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,u.jsx)("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),(0,u.jsx)("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),(0,u.jsx)("path",{d:"M19 16v6"}),(0,u.jsx)("path",{d:"M22 19l-3 3l-3 -3"})]}),C),q5=v("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}),J5=v("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}),Q5=v("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}),eM=v("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"),tM=v("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"),nM=v((0,u.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"}),V),rM=v((0,u.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"}),V),oM=v("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}),iM=v((0,u.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"}),V),aM=v("M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"),sM=v("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}),lM=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 9h-1a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-8a2 2 0 0 0 -2 -2h-1"}),(0,u.jsx)("path",{d:"M12 14v-11"}),(0,u.jsx)("path",{d:"M9 6l3 -3l3 3"})]}),C),cM=v((0,u.jsxs)(u.Fragment,{children:[(0,u.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,u.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}),dM=v((0,u.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}),Bf=(0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M12 10l0 10"}),(0,u.jsx)("path",{d:"M12 10l4 4"}),(0,u.jsx)("path",{d:"M12 10l-4 4"}),(0,u.jsx)("path",{d:"M4 4l16 0"})]}),Hf=(0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M12 5l0 14"}),(0,u.jsx)("path",{d:"M16 9l-4 -4"}),(0,u.jsx)("path",{d:"M8 9l4 -4"})]}),uM=v(Hf,C),pM=v(Hf,{...C,style:{transform:"rotate(180deg)"}}),fM=v(Bf,C),hM=v(Bf,{...C,style:{transform:"rotate(180deg)"}}),mM=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.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,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),V),gM=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.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,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),V),EM=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.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,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),V),xM=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M16.667 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.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,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),V),wM=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M16.667 3.333v13.334M3.333 3.333v13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.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,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),V),yM=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M3.333 3.333h13.334M3.333 16.667h13.334",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.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,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),V),bM=v((0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M1.667 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M8.333 10h3.334",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M15.417 10h2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.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"})]}),V),vM=v((0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M10 18.333v-2.916",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10 11.667V8.333",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M10 4.583V1.667",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.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"})]}),V),MM=v((0,u.jsxs)("g",{strokeWidth:"1.5",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("circle",{cx:"9",cy:"7",r:"4"}),(0,u.jsx)("path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"}),(0,u.jsx)("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}),(0,u.jsx)("path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85"})]}),C),TM=v("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"),AM=v("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"),SM=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.jsx)("path",{d:"M15 5 5 15M5 5l10 10"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),V),IM=v("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}),PM=v("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=v("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}),kM=Ne.default.memo(({theme:e})=>v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M25 26H111V111H25",fill:vt(e)}),(0,u.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:vt(e),strokeWidth:"2"}),(0,u.jsx)("path",{d:"M100 100H160V160H100",fill:vt(e)}),(0,u.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:vt(e),strokeWidth:"2"}),(0,u.jsxs)("g",{fill:Pf(e),stroke:vt(e),strokeWidth:"6",children:[(0,u.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"2.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"2.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),LM=Ne.default.memo(({theme:e})=>v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{d:"M25 26H111V111H25",fill:vt(e)}),(0,u.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:vt(e),strokeWidth:"2"}),(0,u.jsx)("path",{d:"M100 100H160V160H100",fill:vt(e)}),(0,u.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:vt(e),strokeWidth:"2"}),(0,u.jsxs)("g",{fill:Pf(e),stroke:vt(e),strokeWidth:"6",children:[(0,u.jsx)("rect",{x:"2.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"78.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"149.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"147.5",y:"78.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"105.5",y:"2.5",width:"30",height:"30"}),(0,u.jsx)("rect",{x:"2.5",y:"102.5",width:"30",height:"30"})]})]}),{width:182,height:182,mirror:!0})),CM=v((0,u.jsx)("g",{strokeWidth:1.25,children:(0,u.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"})}),V),DM=v((0,u.jsxs)(u.Fragment,{children:[(0,u.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,u.jsx)("mask",{id:"FillHachureIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:2,y:2,width:16,height:16,children:(0,u.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,u.jsx)("g",{mask:"url(#FillHachureIcon)",children:(0,u.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"})})]}),V),RM=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("g",{clipPath:"url(#a)",children:[(0,u.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,u.jsx)("mask",{id:"FillCrossHatchIcon",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:-1,y:-1,width:22,height:22,children:(0,u.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,u.jsx)("g",{mask:"url(#FillCrossHatchIcon)",children:(0,u.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,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),V),FM=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.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,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),{...V,fill:"currentColor"}),OM=v((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("path",{d:"M4.167 10h11.666",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),V),NM=v((0,u.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"}),V),BM=v((0,u.jsx)("path",{d:"M5 10h10",stroke:"currentColor",strokeWidth:"3.75",strokeLinecap:"round",strokeLinejoin:"round"}),V),HM=Ne.default.memo(({theme:e})=>v((0,u.jsx)("path",{d:"M6 10H34",stroke:vt(e),strokeWidth:2,fill:"none",strokeLinecap:"round"}),{width:40,height:20})),zM=v((0,u.jsxs)("g",{strokeWidth:"2",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 12h2"}),(0,u.jsx)("path",{d:"M17 12h2"}),(0,u.jsx)("path",{d:"M11 12h2"})]}),C),GM=v((0,u.jsxs)("g",{strokeWidth:"2",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 12v.01"}),(0,u.jsx)("path",{d:"M8 12v.01"}),(0,u.jsx)("path",{d:"M12 12v.01"}),(0,u.jsx)("path",{d:"M16 12v.01"}),(0,u.jsx)("path",{d:"M20 12v.01"})]}),C),UM=v((0,u.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"}),V),WM=v((0,u.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"}),V),VM=v((0,u.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"}),V),XM=v((0,u.jsxs)("svg",{strokeWidth:"1.5",children:[(0,u.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,u.jsx)("path",{d:"M13.3333 3.33331V3.34331"}),(0,u.jsx)("path",{d:"M16.6667 3.33331V3.34331"}),(0,u.jsx)("path",{d:"M16.6667 6.66669V6.67669"}),(0,u.jsx)("path",{d:"M16.6667 10V10.01"}),(0,u.jsx)("path",{d:"M3.33334 13.3333V13.3433"}),(0,u.jsx)("path",{d:"M16.6667 13.3333V13.3433"}),(0,u.jsx)("path",{d:"M3.33334 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M6.66666 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M10 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M13.3333 16.6667V16.6767"}),(0,u.jsx)("path",{d:"M16.6667 16.6667V16.6767"})]}),V),YM=v((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 12v-4a4 4 0 0 1 4 -4h4"}),(0,u.jsx)("line",{x1:"16",y1:"4",x2:"16",y2:"4.01"}),(0,u.jsx)("line",{x1:"20",y1:"4",x2:"20",y2:"4.01"}),(0,u.jsx)("line",{x1:"20",y1:"8",x2:"20",y2:"8.01"}),(0,u.jsx)("line",{x1:"20",y1:"12",x2:"20",y2:"12.01"}),(0,u.jsx)("line",{x1:"4",y1:"16",x2:"4",y2:"16.01"}),(0,u.jsx)("line",{x1:"20",y1:"16",x2:"20",y2:"16.01"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"4",y2:"20.01"}),(0,u.jsx)("line",{x1:"8",y1:"20",x2:"8",y2:"20.01"}),(0,u.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"20.01"}),(0,u.jsx)("line",{x1:"16",y1:"20",x2:"16",y2:"20.01"}),(0,u.jsx)("line",{x1:"20",y1:"20",x2:"20",y2:"20.01"})]}),C),$M=v((0,u.jsx)("path",{d:"M6 10H34",stroke:"currentColor",strokeWidth:2,fill:"none"}),{width:40,height:20}),ZM=Ne.default.memo(({flip:e=!1})=>v((0,u.jsxs)("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",stroke:"currentColor",strokeWidth:2,fill:"none",children:[(0,u.jsx)("path",{d:"M34 10H6M34 10L27 5M34 10L27 15"}),(0,u.jsx)("path",{d:"M27.5 5L34.5 10L27.5 15"})]}),{width:40,height:20})),KM=Ne.default.memo(({flip:e=!1})=>v((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[(0,u.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,u.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),jM=Ne.default.memo(({flip:e=!1})=>v((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,children:[(0,u.jsx)("path",{d:"M26 10L6 10"}),(0,u.jsx)("circle",{r:"4",transform:"matrix(-1 0 0 1 30 10)"})]}),{width:40,height:20})),qM=Ne.default.memo(({flip:e=!1})=>v((0,u.jsx)("g",{transform:e?"translate(40, 0) scale(-1, 1)":"",children:(0,u.jsx)("path",{d:"M34 10H5.99996M34 10L34 5M34 10L34 15",stroke:"currentColor",strokeWidth:2,fill:"none"})}),{width:40,height:20})),JM=Ne.default.memo(({flip:e=!1})=>v((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",children:[(0,u.jsx)("path",{d:"M32 10L6 10",strokeWidth:2}),(0,u.jsx)("path",{d:"M27.5 5.5L34.5 10L27.5 14.5L27.5 5.5"})]}),{width:40,height:20})),QM=Ne.default.memo(({flip:e=!1})=>v((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeWidth:2,strokeLinejoin:"round",children:[(0,u.jsx)("path",{d:"M6,9.5H27"}),(0,u.jsx)("path",{d:"M27,5L34,10L27,14Z",fill:"none"})]}),{width:40,height:20})),eT=Ne.default.memo(({flip:e=!1})=>v((0,u.jsxs)("g",{stroke:"currentColor",fill:"currentColor",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[(0,u.jsx)("path",{d:"M6,9.5H20"}),(0,u.jsx)("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),tT=Ne.default.memo(({flip:e=!1})=>v((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",transform:e?"translate(40, 0) scale(-1, 1)":"",strokeLinejoin:"round",strokeWidth:2,children:[(0,u.jsx)("path",{d:"M6,9.5H20"}),(0,u.jsx)("path",{d:"M27,5L34,10L27,14L20,9.5Z"})]}),{width:40,height:20})),nT=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.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,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),V),rT=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M5 16.667V3.333L10 15l5-11.667v13.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),V),oT=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",children:(0,u.jsx)("path",{d:"M5.833 3.333v13.334h8.334",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),V),iT=v((0,u.jsx)(u.Fragment,{children:(0,u.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"})}),V),aT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 7v-2h13v2"}),(0,u.jsx)("path",{d:"M10 5v14"}),(0,u.jsx)("path",{d:"M12 19h-4"}),(0,u.jsx)("path",{d:"M15 13v-1h6v1"}),(0,u.jsx)("path",{d:"M18 12v7"}),(0,u.jsx)("path",{d:"M17 19h2"})]}),C),zf=v((0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M7 12h10"}),(0,u.jsx)("path",{d:"M7 5v14"}),(0,u.jsx)("path",{d:"M17 5v14"}),(0,u.jsx)("path",{d:"M15 19h4"}),(0,u.jsx)("path",{d:"M15 5h4"}),(0,u.jsx)("path",{d:"M5 19h4"}),(0,u.jsx)("path",{d:"M5 5h4"})]})}),C),pa=v((0,u.jsx)(u.Fragment,{children:(0,u.jsx)("g",{stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.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"})})}),V),Ll=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("g",{clipPath:"url(#a)",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",children:(0,u.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,u.jsx)("defs",{children:(0,u.jsx)("clipPath",{id:"a",children:(0,u.jsx)("path",{fill:"#fff",d:"M0 0h20v20H0z"})})})]}),V),sT=v((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"12",y2:"12"}),(0,u.jsx)("line",{x1:"4",y1:"16",x2:"16",y2:"16"})]}),C),lT=v((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12"}),(0,u.jsx)("line",{x1:"6",y1:"16",x2:"18",y2:"16"})]}),C),cT=v((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"8",x2:"20",y2:"8"}),(0,u.jsx)("line",{x1:"10",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("line",{x1:"8",y1:"16",x2:"20",y2:"16"})]}),C),dT=Ne.default.memo(({theme:e})=>v((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"4",x2:"20",y2:"4"}),(0,u.jsx)("rect",{x:"9",y:"8",width:"6",height:"12",rx:"2"})]}),C)),uT=Ne.default.memo(({theme:e})=>v((0,u.jsxs)("g",{strokeWidth:"2",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"20",x2:"20",y2:"20"}),(0,u.jsx)("rect",{x:"9",y:"4",width:"6",height:"12",rx:"2"})]}),C)),pT=Ne.default.memo(({theme:e})=>v((0,u.jsxs)("g",{strokeWidth:"1.5",stroke:"currentColor",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("line",{x1:"4",y1:"12",x2:"9",y2:"12"}),(0,u.jsx)("line",{x1:"15",y1:"12",x2:"20",y2:"12"}),(0,u.jsx)("rect",{x:"9",y:"6",width:"6",height:"12",rx:"2"})]}),C)),fT=v((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M21 19h-18l9 -15"}),(0,u.jsx)("path",{d:"M20.615 15.171h.015"}),(0,u.jsx)("path",{d:"M19.515 11.771h.015"}),(0,u.jsx)("path",{d:"M17.715 8.671h.015"}),(0,u.jsx)("path",{d:"M15.415 5.971h.015"})]}),C),hT=v((0,u.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}),mT=v((0,u.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"})),gT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 13v-7.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,u.jsx)("path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5"}),(0,u.jsx)("path",{d:"M14 5.5a1.5 1.5 0 0 1 3 0v6.5"}),(0,u.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"})]}),C),ET=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"}),(0,u.jsx)("path",{d:"M7 11l5 5l5 -5"}),(0,u.jsx)("path",{d:"M12 4l0 12"})]}),C),xT=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.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,u.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"})]}),C),wT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M7 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),(0,u.jsx)("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),(0,u.jsx)("path",{d:"M9.15 14.85l8.85 -10.85"}),(0,u.jsx)("path",{d:"M6 4l8.85 10.85"})]}),C),yT=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"}),(0,u.jsx)("path",{d:"M12 17l0 .01"}),(0,u.jsx)("path",{d:"M12 13.5a1.5 1.5 0 0 1 1 -1.5a2.6 2.6 0 1 0 -3 -4"})]}),C),bT=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M7 4v16l13 -8z"})]}),C),vT=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.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"})]}),C),MT=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 12l5 5l10 -10"})]}),C),TT=v((0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.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,u.jsx)("path",{d:"M12 9v4"}),(0,u.jsx)("path",{d:"M12 17h.01"})]}),C),AT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M11 7l6 6"}),(0,u.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"})]}),C),ST=v((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M12 3l-4 7h8z"}),(0,u.jsx)("path",{d:"M17 17m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"}),(0,u.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"})]}),C),IT=v((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 7l16 0"}),(0,u.jsx)("path",{d:"M4 17l16 0"}),(0,u.jsx)("path",{d:"M7 4l0 16"}),(0,u.jsx)("path",{d:"M17 4l0 16"})]}),C),PT=v((0,u.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"})),_T=v((0,u.jsxs)("g",{strokeWidth:"1.25",children:[(0,u.jsx)("path",{d:"M4.16602 10H15.8327"}),(0,u.jsx)("path",{d:"M12.5 13.3333L15.8333 10"}),(0,u.jsx)("path",{d:"M12.5 6.66666L15.8333 9.99999"})]}),V),kT=v((0,u.jsxs)("g",{fill:"none",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round",transform:"rotate(90 10 10)",children:[(0,u.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,u.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),LT=v((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z"}),(0,u.jsx)("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),(0,u.jsx)("path",{d:"M15 6l3 3"}),(0,u.jsx)("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),(0,u.jsx)("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),C),CT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z"}),(0,u.jsx)("path",{d:"M6 21l15 -15l-3 -3l-15 15l3 3"}),(0,u.jsx)("path",{d:"M15 6l3 3"}),(0,u.jsx)("path",{d:"M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"}),(0,u.jsx)("path",{d:"M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2"})]}),C),DT=v((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M11.217 19.384a3.501 3.501 0 0 0 6.783 -1.217v-5.167l-6 -3.35"}),(0,u.jsx)("path",{d:"M5.214 15.014a3.501 3.501 0 0 0 4.446 5.266l4.34 -2.534v-6.946"}),(0,u.jsx)("path",{d:"M6 7.63c-1.391 -.236 -2.787 .395 -3.534 1.689a3.474 3.474 0 0 0 1.271 4.745l4.263 2.514l6 -3.348"}),(0,u.jsx)("path",{d:"M12.783 4.616a3.501 3.501 0 0 0 -6.783 1.217v5.067l6 3.45"}),(0,u.jsx)("path",{d:"M18.786 8.986a3.501 3.501 0 0 0 -4.446 -5.266l-4.34 2.534v6.946"}),(0,u.jsx)("path",{d:"M18 16.302c1.391 .236 2.787 -.395 3.534 -1.689a3.474 3.474 0 0 0 -1.271 -4.745l-4.308 -2.514l-5.955 3.42"})]}),C),RT=v((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2"}),(0,u.jsx)("path",{d:"M4 16v2a2 2 0 0 0 2 2h2"}),(0,u.jsx)("path",{d:"M16 4h2a2 2 0 0 1 2 2v2"}),(0,u.jsx)("path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2"})]}),C),FT=v((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"}),(0,u.jsx)("path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"})]}),C),OT=v((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"}),(0,u.jsx)("path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"}),(0,u.jsx)("path",{d:"M3 3l18 18"})]}),C),NT=v((0,u.jsxs)("g",{stroke:"currentColor",fill:"none",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),(0,u.jsx)("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),(0,u.jsx)("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),(0,u.jsx)("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),(0,u.jsx)("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),(0,u.jsx)("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),C),BT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15.5 13a3.5 3.5 0 0 0 -3.5 3.5v1a3.5 3.5 0 0 0 7 0v-1.8"}),(0,u.jsx)("path",{d:"M8.5 13a3.5 3.5 0 0 1 3.5 3.5v1a3.5 3.5 0 0 1 -7 0v-1.8"}),(0,u.jsx)("path",{d:"M17.5 16a3.5 3.5 0 0 0 0 -7h-.5"}),(0,u.jsx)("path",{d:"M19 9.3v-2.8a3.5 3.5 0 0 0 -7 0"}),(0,u.jsx)("path",{d:"M6.5 16a3.5 3.5 0 0 1 0 -7h.5"}),(0,u.jsx)("path",{d:"M5 9.3v-2.8a3.5 3.5 0 0 1 7 0v10"})]}),C),HT=v((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"}),(0,u.jsx)("path",{d:"M21 21l-6 -6"})]}),C),zT=v((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M20.984 12.53a9 9 0 1 0 -7.552 8.355"}),(0,u.jsx)("path",{d:"M12 7v5l3 3"}),(0,u.jsx)("path",{d:"M19 16l-2 3h4l-2 3"})]}),C),GT=v((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M9 2m0 3a3 3 0 0 1 3 -3h0a3 3 0 0 1 3 3v5a3 3 0 0 1 -3 3h0a3 3 0 0 1 -3 -3z"}),(0,u.jsx)("path",{d:"M5 10a7 7 0 0 0 14 0"}),(0,u.jsx)("path",{d:"M8 21l8 0"}),(0,u.jsx)("path",{d:"M12 17l0 4"})]}),C),UT=v((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 3l18 18"}),(0,u.jsx)("path",{d:"M9 5a3 3 0 0 1 6 0v5a3 3 0 0 1 -.13 .874m-2 2a3 3 0 0 1 -3.87 -2.872v-1"}),(0,u.jsx)("path",{d:"M5 10a7 7 0 0 0 10.846 5.85m2 -2a6.967 6.967 0 0 0 1.152 -3.85"}),(0,u.jsx)("path",{d:"M8 21l8 0"}),(0,u.jsx)("path",{d:"M12 17l0 4"})]}),C),WT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11"})]}),C),VT=v((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M8 8m0 1a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1z"}),(0,u.jsx)("path",{d:"M12 20v.01"}),(0,u.jsx)("path",{d:"M16 20v.01"}),(0,u.jsx)("path",{d:"M8 20v.01"}),(0,u.jsx)("path",{d:"M4 20v.01"}),(0,u.jsx)("path",{d:"M4 16v.01"}),(0,u.jsx)("path",{d:"M4 12v.01"}),(0,u.jsx)("path",{d:"M4 8v.01"}),(0,u.jsx)("path",{d:"M4 4v.01"}),(0,u.jsx)("path",{d:"M8 4v.01"}),(0,u.jsx)("path",{d:"M12 4v.01"}),(0,u.jsx)("path",{d:"M16 4v.01"}),(0,u.jsx)("path",{d:"M20 4v.01"}),(0,u.jsx)("path",{d:"M20 8v.01"}),(0,u.jsx)("path",{d:"M20 12v.01"}),(0,u.jsx)("path",{d:"M20 16v.01"}),(0,u.jsx)("path",{d:"M20 20v.01"})]}),C),XT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 3v18"}),(0,u.jsx)("path",{d:"M19 21v-18"}),(0,u.jsx)("path",{d:"M5 7h14"}),(0,u.jsx)("path",{d:"M5 15h14"}),(0,u.jsx)("path",{d:"M8 13v4"}),(0,u.jsx)("path",{d:"M11 13v4"}),(0,u.jsx)("path",{d:"M16 13v4"}),(0,u.jsx)("path",{d:"M14 5v4"}),(0,u.jsx)("path",{d:"M11 5v4"}),(0,u.jsx)("path",{d:"M8 5v4"}),(0,u.jsx)("path",{d:"M3 21h18"})]}),C),YT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 12l18 0"}),(0,u.jsx)("path",{d:"M7 16l10 0l-10 5l0 -5"}),(0,u.jsx)("path",{d:"M7 8l10 0l-10 -5l0 5"})]}),C),$T=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M12 3l0 18"}),(0,u.jsx)("path",{d:"M16 7l0 10l5 0l-5 -10"}),(0,u.jsx)("path",{d:"M8 7l0 10l-5 0l5 -10"})]}),C),ZT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M5 3m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z"}),(0,u.jsx)("path",{d:"M19 6h1a2 2 0 0 1 2 2a5 5 0 0 1 -5 5l-5 0v2"}),(0,u.jsx)("path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"})]}),C),KT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15 15m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0"}),(0,u.jsx)("path",{d:"M22 22l-3 -3"}),(0,u.jsx)("path",{d:"M6 18h-1a2 2 0 0 1 -2 -2v-1"}),(0,u.jsx)("path",{d:"M3 11v-1"}),(0,u.jsx)("path",{d:"M3 6v-1a2 2 0 0 1 2 -2h1"}),(0,u.jsx)("path",{d:"M10 3h1"}),(0,u.jsx)("path",{d:"M15 3h1a2 2 0 0 1 2 2v1"})]}),C),jT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),(0,u.jsx)("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),(0,u.jsx)("path",{d:"M4 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"}),(0,u.jsx)("path",{d:"M10 15l2 6l2 -6"}),(0,u.jsx)("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"})]}),C),qT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M14 3v4a1 1 0 0 0 1 1h4"}),(0,u.jsx)("path",{d:"M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"}),(0,u.jsx)("path",{d:"M20 15h-1a2 2 0 0 0 -2 2v2a2 2 0 0 0 2 2h1v-3"}),(0,u.jsx)("path",{d:"M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"}),(0,u.jsx)("path",{d:"M11 21v-6l3 6v-6"})]}),C),JT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4 13v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a2 2 0 0 0 6 0v-8a2 2 0 0 1 2 -2h1a2 2 0 0 1 2 2v8a8 8 0 0 1 -16 0"}),(0,u.jsx)("path",{d:"M4 8l5 0"}),(0,u.jsx)("path",{d:"M15 8l4 0"})]}),C),QT=v((0,u.jsxs)("g",{strokeWidth:1.25,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 14c.83 .642 2.077 1.017 3.5 1c1.423 .017 2.67 -.358 3.5 -1c.83 -.642 2.077 -1.017 3.5 -1c1.423 -.017 2.67 .358 3.5 1"}),(0,u.jsx)("path",{d:"M8 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),(0,u.jsx)("path",{d:"M12 3a2.4 2.4 0 0 0 -1 2a2.4 2.4 0 0 0 1 2"}),(0,u.jsx)("path",{d:"M3 10h14v5a6 6 0 0 1 -6 6h-2a6 6 0 0 1 -6 -6v-5z"}),(0,u.jsx)("path",{d:"M16.746 16.726a3 3 0 1 0 .252 -5.555"})]}),C),eA=v((0,u.jsxs)("g",{stroke:"currentColor",children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 5a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-16a1 1 0 0 1-1-1v-10zM7 20h10M9 16v4M15 16v4"})]}),{...C,strokeWidth:1.5}),tA=v((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M15 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"}),(0,u.jsx)("path",{d:"M21 12h-13l3 -3"}),(0,u.jsx)("path",{d:"M11 15l-3 -3"})]}),C),nA=v((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8z"}),(0,u.jsx)("path",{d:"M10 9l5 3l-5 3z"})]}),C),rA=v((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M3 6h18"}),(0,u.jsx)("path",{d:"M3 12h18"}),(0,u.jsx)("path",{d:"M3 18h18"}),(0,u.jsx)("path",{d:"M6 3v18"}),(0,u.jsx)("path",{d:"M12 3v18"}),(0,u.jsx)("path",{d:"M18 3v18"})]}),C),oA=v((0,u.jsxs)("g",{strokeWidth:1.5,children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M17 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),(0,u.jsx)("path",{d:"M3 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"}),(0,u.jsx)("path",{d:"M17 5c-6.627 0 -12 5.373 -12 12"})]}),C),iA=v((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M6 18l12 -12"}),(0,u.jsx)("path",{d:"M18 10v-4h-4"})]}),C),aA=v((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M4,19L10,19C11.097,19 12,18.097 12,17L12,9C12,7.903 12.903,7 14,7L21,7"}),(0,u.jsx)("path",{d:"M18 4l3 3l-3 3"})]}),C),sA=v((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{d:"M16,12L20,9L16,6"}),(0,u.jsx)("path",{d:"M6 20c0 -6.075 4.925 -11 11 -11h3"})]}),C),lA=v((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M6 9l6 6l6 -6"})]}),C),cA=v((0,u.jsxs)("g",{children:[(0,u.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,u.jsx)("path",{d:"M6 15l6 -6l6 6"})]}),C);x();var fa=e=>{if(e.type==="arrow")return!1;let t=!Cn(e.backgroundColor)||Dn(e)||mt(e)||Y(e);return e.type==="line"?t&&Yt(e.points):e.type==="freedraw"?t&&Yt(e.points):t||Wi(e)},sE=({x:e,y:t,element:n,shape:r,threshold:o=10,frameNameBound:i=null})=>{let a=fa(n)?la([e,t],r)||zo([e,t],r,o):zo([e,t],r,o);return!a&&i&&(a=la([e,t],{type:"polygon",data:da(i).data})),a},Cl=(e,t,n,r,o=0)=>{let[i,a,s,l]=Qe(n,r);return i-=o,a-=o,s+=o,l+=o,ha([i,a],[e,t],[s,l])},wA=(e,t)=>!sE(e)&&!lE(e.x,e.y,Gf(e.element,t))&&Cl(e.x,e.y,e.element,t),lE=(e,t,n)=>!!n&&la([e,t],n);x();var ce=class e{static rg=new gt;static cache=new WeakMap;static get=t=>e.cache.get(t);static set=(t,n)=>e.cache.set(t,n);static delete=t=>e.cache.delete(t);static destroy=()=>{e.cache=new WeakMap};static generateElementShape=(t,n)=>{let r=n?.isExporting?void 0:e.get(t);if(r!==void 0)return r;ma.delete(t);let o=Uf(t,e.rg,n||{isExporting:!1,canvasBackgroundColor:$.white,embedsValidationStatus:null});return e.cache.set(t,o),o}};var cE=[{icon:_f,value:"selection",key:ne.V,numericKey:ne[1],fillable:!0},{icon:kf,value:"rectangle",key:ne.R,numericKey:ne[2],fillable:!0},{icon:Lf,value:"diamond",key:ne.D,numericKey:ne[3],fillable:!0},{icon:Cf,value:"ellipse",key:ne.O,numericKey:ne[4],fillable:!0},{icon:Df,value:"arrow",key:ne.A,numericKey:ne[5],fillable:!0},{icon:Rf,value:"line",key:ne.L,numericKey:ne[6],fillable:!0},{icon:Go,value:"freedraw",key:[ne.P,ne.X],numericKey:ne[7],fillable:!1},{icon:Ff,value:"text",key:ne.T,numericKey:ne[8],fillable:!1},{icon:Of,value:"image",key:null,numericKey:ne[9],fillable:!1},{icon:Nf,value:"eraser",key:ne.E,numericKey:ne[0],fillable:!1}],OA=e=>cE.find((n,r)=>n.numericKey!=null&&e===n.numericKey.toString()||n.key&&(typeof n.key=="string"?n.key===e:n.key.includes(e)))?.value||null,ga=(e,t)=>{switch(e.type){case"rectangle":case"diamond":case"frame":case"magicframe":case"embeddable":case"image":case"iframe":case"text":case"selection":return da(e);case"arrow":case"line":{let n=ce.get(e)?.[0]??ce.generateElementShape(e,null)[0],[,,,,r,o]=H(e,t);return fa(e)?bf(e,n,[e.x,e.y],e.angle,[r,o]):wf(n,[e.x,e.y],e.angle,[r,o])}case"ellipse":return Ef(e);case"freedraw":{let[,,,,n,r]=H(e,t);return yf(e,[n,r],fa(e))}}},Gf=(e,t)=>{let n=ee(e,t);return n?e.type==="arrow"?ga({...n,...J.getBoundTextElementPosition(e,n,t)},t):ga(n,t):null};x();var Me=[1,0],Be=[0,1],He=[-1,0],ze=[0,-1],Ea=(e,t)=>{let n=df([e,t]);return n>=315||n<45?ze:n>=45&&n<135?Me:n>=135&&n<225?Be:He},Bn=e=>{let[t,n]=e,r=Math.abs(t),o=Math.abs(n);return t>o?Me:t<=-o?He:n>r?Be:ze},Yr=(e,t)=>e[0]===t[0]&&e[1]===t[1],Dl=(e,t,n)=>{let o=xa(t);if(e.type==="diamond"){if(n[0]<e.x)return He;if(n[1]<e.y)return ze;if(n[0]>e.x+e.width)return Me;if(n[1]>e.y+e.height)return Be;let c=N(Mt([e.x+e.width/2,e.y],o,2),o,e.angle),d=N(Mt([e.x+e.width,e.y+e.height/2],o,2),o,e.angle),p=N(Mt([e.x+e.width/2,e.y+e.height],o,2),o,e.angle),f=N(Mt([e.x,e.y+e.height/2],o,2),o,e.angle);return mr(n,c,d,o)?Ea(c,d):mr(n,d,p,o)?Ea(d,p):mr(n,p,f,o)?Ea(p,f):Ea(f,c)}let i=Mt([t[0],t[1]],o,2),a=Mt([t[2],t[1]],o,2),s=Mt([t[0],t[3]],o,2),l=Mt([t[2],t[3]],o,2);return mr(n,i,a,o)?ze:mr(n,a,l,o)?Me:mr(n,l,s,o)?Be:He};var tS=e=>!e[ne.CTRL_OR_CMD],Ol=e=>e.isBindingEnabled,de=5,dE=(e,t)=>{let n=[];return t.forEach(r=>{let o=e.getNonDeletedElement(r);o!=null&&n.push(o)}),n},Nl=(e,t,n,r,o)=>{let i=new Set,a=new Set;Wf(e,t,n,"start",i,a,r,o),Wf(e,n,t,"end",i,a,r,o);let s=Array.from(a).filter(l=>!i.has(l));dE(o,s).forEach(l=>{B(l,{boundElements:l.boundElements?.filter(c=>c.type!=="arrow"||c.id!==e.id)})})},Wf=(e,t,n,r,o,i,a,s)=>{if(t!=="keep"){if(t===null){let l=mE(e,r);l!=null&&i.add(l);return}Zf(e)?(n==null||(n==="keep"?!$f(e,t,r):r==="start"||n.id!==t.id))&&(wa(e,t,r,a),o.add(t.id)):(wa(e,t,r,a),o.add(t.id))}},uE=(e,t,n)=>{let r=Qf(e,t,n),o=t==="start"?e.startBinding?.elementId:e.endBinding?.elementId;if(o){let i=n.get(o);if(Wt(i)&&eh(i,r,n))return i}return null},Yf=(e,t)=>["start","end"].map(n=>uE(e,n,t)),pE=(e,t,n,r,o)=>{let a=e.points.length-1,s=n.findIndex(p=>p===0)>-1,l=n.findIndex(p=>p===a)>-1,c=s?t?$r(e,"start",r,o):null:$r(e,"start",r,o),d=l?t?$r(e,"end",r,o):null:$r(e,"end",r,o);return[c,d]},fE=(e,t,n,r)=>{let[o,i]=Yf(e,t),a=o&&r?$r(e,"start",t,n):null,s=i&&r?$r(e,"end",t,n):null;return[a,s]},nS=(e,t,n,r,o,i)=>{e.forEach(a=>{let[s,l]=i?.length?pE(a,o,i??[],t,n):fE(a,t,n,o);Nl(a,s,l,t,r)})},rS=(e,t)=>e.length>50?[]:e.filter(oe).flatMap(n=>Yf(n,t)).filter(n=>n!==null).filter(n=>e.filter(r=>r.id===n?.id).length===0),oS=(e,t,n,r,o)=>{t.startBoundElement!=null&&wa(e,t.startBoundElement,"start",r);let i=Gn(n,o,r,ie(e)&&ie(e));i!==null&&($f(e,i,"end")||wa(e,i,"end",r))},wa=(e,t,n,r)=>{if(!Z(e))return;let o={elementId:t.id,...gE(e,t,n,r),...ie(e)?Jf(e,t,n,r):{fixedPoint:null}};B(e,{[n==="start"?"startBinding":"endBinding"]:o}),Q(t.boundElements||[]).has(e.id)||B(t,{boundElements:(t.boundElements||[]).concat({id:e.id,type:"arrow"})})},$f=(e,t,n)=>{let r=e[n==="start"?"endBinding":"startBinding"];return hE(e,r?.elementId,t)},hE=(e,t,n)=>t===n.id&&Zf(e),Zf=e=>e.points.length<3,mE=(e,t)=>{let n=t==="start"?"startBinding":"endBinding",r=e[n];return r==null?null:(B(e,{[n]:null}),r.elementId)},Gn=(e,t,n,r)=>Il(t,i=>Wt(i,!1)&&eh(i,e,n,r&&!se(i))),gE=(e,t,n,r)=>{let o=n==="start"?-1:1,i=o===-1?0:e.points.length-1,a=i-o,s=J.getPointAtIndexGlobalCoordinates(e,i,r),l=J.getPointAtIndexGlobalCoordinates(e,a,r);return{focus:SE(t,l,s,r),gap:Math.max(1,gr(t,s,r))}},$t=(e,t,n,r)=>{let{oldSize:o,simultaneouslyUpdated:i,changedElements:a}=r??{},s=xE(i);Wt(e)&&ya(t,e,l=>{if(!oe(l)||l.isDeleted||!EE(l,e))return;let c={startBinding:Vf(e,l.startBinding,o),endBinding:Vf(e,l.endBinding,o)};if(s.has(l.id)){B(l,c);return}let d=ba(t,l,(f,h)=>{if(f&&Wt(f)&&(h==="startBinding"||h==="endBinding")&&e.id===l[h]?.elementId){let m=bE(l,h,c[h],f,t);if(m)return{index:h==="startBinding"?0:l.points.length-1,point:m}}return null}).filter(f=>f!==null);J.movePoints(l,d,n,{...e.id===l.startBinding?.elementId?{startBinding:c.startBinding}:{},...e.id===l.endBinding?.elementId?{endBinding:c.endBinding}:{}},{changedElements:a});let p=ee(l,t);p&&!p.isDeleted&&Er(l,t,!1)})},EE=(e,t)=>e.startBinding?.elementId===t.id||e.endBinding?.elementId===t.id,xE=e=>new Set((e||[]).map(t=>t.id)),Kf=(e,t,n,r,o,i)=>{let a=Bn(fn(t,e));return!n||!r?a:wE(i,n,o)?Dl(n,r,e):Bn(fn(e,Ma(n)))},wE=(e,t,n)=>{let r=gr(t,e,n),o=Hl(t,t.width,t.height);return r>o?null:r},Bl=(e,t,n,r)=>{let o=n&&hn(n);if(n&&o){let i=[...Rl(n,[e[0],e[1]-2*n.height],[e[0],e[1]+2*n.height],de,r),...Rl(n,[e[0]-2*n.width,e[1]],[e[0]+2*n.width,e[1]],de,r)].map(d=>gr(n,d,r)>Math.min(n.width,n.height)/2?[-1*d[0],-1*d[1]]:d),a=Dl(n,o,e),s=Yr(a,He)||Yr(a,Me),l=gr(n,e,r),c=s?l<n.width*-.1:l<n.height*-.1;return i.sort((d,p)=>Zr(d,e)-Zr(p,e)),c?yE(t,n,o):i.filter(d=>s?Math.abs(e[1]-d[1])<.1:Math.abs(e[0]-d[0])<.1)[0]??e}return e},yE=(e,t,n)=>{let r=xa(n),o=Bn(fn(e,r));switch(!0){case Yr(o,ze):return N([(n[0]+n[2])/2+.1,n[1]],r,t.angle);case Yr(o,Me):return N([n[2],(n[1]+n[3])/2+.1],r,t.angle);case Yr(o,Be):return N([(n[0]+n[2])/2-.1,n[3]],r,t.angle);default:return N([n[0],(n[1]+n[3])/2-.1],r,t.angle)}},jf=(e,t)=>{let n=Ma(e),r=N(t,n,-e.angle);return r[0]<e.x&&r[1]<e.y?r[1]-e.y>-de?N([e.x-de,e.y],n,e.angle):N([e.x,e.y-de],n,e.angle):r[0]<e.x&&r[1]>e.y+e.height?r[0]-e.x>-de?N([e.x,e.y+e.height+de],n,e.angle):N([e.x-de,e.y+e.height],n,e.angle):r[0]>e.x+e.width&&r[1]>e.y+e.height?r[0]-e.x<e.width+de?N([e.x+e.width,e.y+e.height+de],n,e.angle):N([e.x+e.width+de,e.y+e.height],n,e.angle):r[0]>e.x+e.width&&r[1]<e.y?r[0]-e.x<e.width+de?N([e.x+e.width,e.y-de],n,e.angle):N([e.x+e.width+de,e.y],n,e.angle):t},qf=(e,t,n=.05)=>{let{x:r,y:o,width:i,height:a,angle:s}=e,l=[r+i/2-.1,o+a/2-.1],c=N(t,l,-s),d=Fl(n*a,5,80),p=Fl(n*i,5,80);return c[0]<=r+i/2&&c[1]>l[1]-d&&c[1]<l[1]+d?N([r-de,l[1]],l,s):c[1]<=o+a/2&&c[0]>l[0]-p&&c[0]<l[0]+p?N([l[0],o-de],l,s):c[0]>=r+i/2&&c[1]>l[1]-d&&c[1]<l[1]+d?N([r+i+de,l[1]],l,s):c[1]>=o+a/2&&c[0]>l[0]-p&&c[0]<l[0]+p?N([l[0],o+a+de],l,s):t},bE=(e,t,n,r,o)=>{if(n==null||n.elementId!==r.id&&e.points.length>2)return null;let i=t==="startBinding"?-1:1,a=i===-1?0:e.points.length-1;if(ie(e)){let p=n.fixedPoint??Jf(e,r,t==="startBinding"?"start":"end",o).fixedPoint,f=[r.x+r.width/2,r.y+r.height/2],h=[r.x+p[0]*r.width,r.y+p[1]*r.height],m=N(h,f,r.angle);return J.pointFromAbsoluteCoords(e,m,o)}let s=a-i,l=J.getPointAtIndexGlobalCoordinates(e,s,o),c=IE(r,n.focus,l,o),d;if(n.gap===0)d=c;else{let p=Rl(r,l,c,n.gap,o);p.length===0?d=c:d=p[0]}return J.pointFromAbsoluteCoords(e,d,o)},Jf=(e,t,n,r)=>{let o=[t.x,t.y,t.x+t.width,t.y+t.height],i=n==="start"?0:e.points.length-1,a=J.getPointAtIndexGlobalCoordinates(e,i,r),s=J.getPointAtIndexGlobalCoordinates(e,i,r),l=Bl(a,s,t,r),c=[o[0]+(o[2]-o[0])/2,o[1]+(o[3]-o[1])/2],d=N(l,c,-t.angle);return{fixedPoint:[(d[0]-t.x)/t.width,(d[1]-t.y)/t.height]}},Vf=(e,t,n)=>{if(t==null||n==null)return t;let{width:r,height:o}=n,{width:i,height:a}=e,s=Math.max(1,Math.min(Hl(e,r,o),t.gap*(r<o?r/i:o/a)));return{...t,gap:s}},$r=(e,t,n,r)=>Gn(Qf(e,t,n),r,n),Qf=(e,t,n)=>{let r=t==="start"?0:-1;return ln(J.getPointAtIndexGlobalCoordinates(e,r,n))},iS=(e,t,n,r)=>{let o=new Set,i=new Set,a=r==="duplicatesServeAsOld",s=new Map([...n].map(([l,c])=>[c,l]));t.forEach(l=>{let{boundElements:c}=l;if(c!=null&&c.length>0&&(c.forEach(d=>{a&&!n.has(d.id)&&o.add(d.id)}),i.add(n.get(l.id))),Po(l)){if(l.startBinding!=null){let{elementId:d}=l.startBinding;a&&!n.has(d)&&i.add(d)}if(l.endBinding!=null){let{elementId:d}=l.endBinding;a&&!n.has(d)&&i.add(d)}(l.startBinding!=null||l.endBinding!=null)&&o.add(n.get(l.id))}}),e.filter(({id:l})=>o.has(l)).forEach(l=>{let{startBinding:c,endBinding:d}=l;B(l,{startBinding:Xf(c,n),endBinding:Xf(d,n)})}),e.filter(({id:l})=>i.has(l)).forEach(l=>{let c=s.get(l.id),{boundElements:d}=e.find(({id:p})=>p===c);d!=null&&d.length>0&&B(l,{boundElements:d.map(p=>n.has(p.id)?{id:n.get(p.id),type:p.type}:p)})})},Xf=(e,t)=>e==null?null:{...e,elementId:t.get(e.elementId)??e.elementId},aS=(e,t)=>{let n=Q(e);for(let r of t)Hn.unbindAffected(n,r,B),zn.unbindAffected(n,r,B)},Uo=(e,t,n=[])=>{if(!e)return null;let r=e.filter(o=>!t.has(o.id));return r.push(...n.map(o=>({id:o.id,type:o.type}))),r},eh=(e,{x:t,y:n},r,o)=>{let i=Hl(e,e.width,e.height),a=ga(e,r);return zo([t,n],a,i)||o===!0&&Un([t,n],hn(e))},Hl=(e,t,n)=>{let o=(e.type==="diamond"?1/Math.sqrt(2):1)*Math.min(t,n);return Math.max(16,Math.min(.25*o,32))},gr=(e,t,n)=>{switch(e.type){case"rectangle":case"image":case"text":case"iframe":case"embeddable":case"frame":case"magicframe":return vE(e,t,n);case"diamond":return ME(e,t,n);case"ellipse":return TE(e,t,n)}},vE=(e,t,n)=>{let[,r,o,i]=zl(e,t,n);return Math.max(Nn(r,sa(0,1,-i)),Nn(r,sa(1,0,-o)))},ME=(e,t,n)=>{let[,r,o,i]=zl(e,t,n),a=sa(i,o,-i*o);return Nn(r,a)},TE=(e,t,n)=>{let[r,o]=AE(e,t,n);return-Qp(o)*Nn(r,o)},AE=(e,t,n)=>{let[,r,o,i]=zl(e,t,n),[a,s]=fr(r),l=.707,c=.707,d=o,p=i;[0,1,2,3].forEach(m=>{let g=d*l,E=p*c,w=(d*d-p*p)*l**3/d,y=(p*p-d*d)*c**3/p,b=g-w,T=E-y,A=a-w,k=s-y,P=Math.hypot(T,b),I=Math.hypot(k,A);l=Math.min(1,Math.max(0,(A*P/I+w)/d)),c=Math.min(1,Math.max(0,(k*P/I+y)/p));let _=Math.hypot(c,l);l/=_,c/=_});let f=Le(d*l,p*c),h=Jp(r,f);return[r,h]},zl=(e,t,n)=>{let r=pr(t),[o,i,a,s]=H(e,n),l=Ul(o,i,a,s),c=wl(l,e.angle),d=wt(c,r),p=pl(d,xl(l)),f=tf(p),h=Yp(e.x,e.y),m=pl(d,h),g=(a-o)/2,E=(s-i)/2;return[m,f,g,E]},Gl=(e,t)=>{let[n,r,o,i]=H(e,t),a=Ul(n,r,o,i),s=wl(a,e.angle),l=Ur(af(xl(a)));return lf(s,l)},Ul=(e,t,n,r)=>Le((e+n)/2,(t+r)/2),SE=(e,t,n,r)=>{let o=Gl(e,r),i=wt(o,pr(t)),a=wt(o,pr(n)),s=Wr(i,a),l=e.height/e.width,c=e.width/2,d=e.height/2,p=s[2],f=s[3],h=s[1],m=Math.abs(f),g=Math.abs(p),E;switch(e.type){case"rectangle":case"image":case"text":case"iframe":case"embeddable":case"frame":case"magicframe":E=h/(c*(g+l*m));break;case"diamond":E=m<g?h/(g*c):h/(m*d);break;case"ellipse":E=h/(c*Math.sqrt(p**2+l**2*f**2));break}return E||0},IE=(e,t,n,r)=>{if(t===0){let[l,c,d,p]=H(e,r),f=Ul(l,c,d,p);return fr(f)}let o=Gl(e,r),i=wt(o,pr(n)),a=Ur(o),s;switch(e.type){case"rectangle":case"image":case"text":case"diamond":case"iframe":case"embeddable":case"frame":case"magicframe":s=RE(e,t,i);break;case"ellipse":s=DE(e,t,i);break}return fr(wt(a,s))},Rl=(e,t,n,r=0,o)=>{let i=Gl(e,o),a=wt(i,pr(t)),s=wt(i,pr(n)),l=Wr(a,s),c=Ur(i);return PE(e,l,a,r).map(p=>fr(wt(c,p)))},PE=(e,t,n,r=0)=>{let o;switch(e.type){case"rectangle":case"image":case"text":case"diamond":case"iframe":case"embeddable":case"frame":case"magicframe":let a=th(e);o=a.flatMap((s,l)=>{let c=[s,a[(l+1)%4]];return _E(t,kE(c,r))}).concat(a.flatMap(s=>CE(s,r,t)));break;case"ellipse":o=LE(e,r,t);break}if(o.length<2)return[];let i=o.sort((a,s)=>El(a,n)-El(s,n));return[i[0],i[i.length-1]]},th=(e,t=1)=>{let n=t*e.width/2,r=t*e.height/2;switch(e.type){case"rectangle":case"image":case"text":case"iframe":case"embeddable":case"frame":case"magicframe":return[Le(n,r),Le(n,-r),Le(-n,-r),Le(-n,r)];case"diamond":return[Le(0,r),Le(n,0),Le(0,-r),Le(-n,0)]}},_E=(e,t)=>{let[n,r]=t,o=Nn(n,e),i=Nn(r,e);return o*i>=0?[]:[nf(e,Wr(n,r))]},kE=(e,t)=>{let[n,r]=e,o=sf(rf(n,r),t);return[wt(o,n),wt(o,r)]},LE=(e,t,n)=>{let r=e.width/2+t,o=e.height/2+t,i=n[2],a=n[3],s=n[1],l=r*r*i*i+o*o*a*a,c=l-s*s;if(l===0||c<=0)return[];let d=Math.sqrt(c),p=-r*r*i*s,f=-o*o*a*s;return[Le((p+r*o*a*d)/l,(f-r*o*i*d)/l),Le((p-r*o*a*d)/l,(f+r*o*i*d)/l)]},CE=(e,t,n)=>{if(t===0)return Nn(n,e)===0?[e]:[];let r=n[2],o=n[3],i=n[1],[a,s]=fr(e),l=t,c=r*r+o*o,d=l*l*c-(r*a+o*s+i)**2;if(c===0||d<=0)return[];let p=Math.sqrt(d),f=a*o*o-s*r*o-r*i,h=s*r*r-a*r*o-o*i;return[Le((f+o*p)/c,(h-r*p)/c),Le((f-o*p)/c,(h+r*p)/c)]},DE=(e,t,n)=>{let r=Math.abs(t),o=e.width*r/2,i=e.height*r/2,a=Math.sign(t),[s,l]=fr(n),c=l===0?1e-4:l,d=s**2*i**2+c**2*o**2,p=(-s*i**2+a*c*Math.sqrt(Math.max(0,d-o**2*i**2)))/d,f=(-p*s-1)/c;f===0&&(f=(Object.is(f,-0)?-1:1)*.01);let h=-(o**2*p)/(f**2*i**2+p**2*o**2);return Le(h,(-p*h-1)/f)},RE=(e,t,n)=>{let r=Math.abs(t),o=Math.sign(t),i=th(e,r),a=0,s=null;return i.forEach(l=>{let c=o*Wr(n,l)[1];c>a&&(a=c,s=l)}),s},nh=new Set(["boundElements","frameId","containerId","startBinding","endBinding"]),ya=(e,t,n)=>{Wt(t)&&(t.boundElements?.slice()??[]).forEach(({id:o})=>{n(e.get(o),"boundElements",o)})},ba=(e,t,n)=>{let r=[];if(t.frameId){let o=t.frameId;r.push(n(e.get(o),"frameId",o))}if(ke(t)){let o=t.containerId;r.push(n(e.get(o),"containerId",o))}if(Z(t)){if(t.startBinding){let o=t.startBinding.elementId;r.push(n(e.get(o),"startBinding",o))}if(t.endBinding){let o=t.endBinding.elementId;r.push(n(e.get(o),"endBinding",o))}}return r},Hn=class{static unbindAffected(t,n,r){n&&ba(t,n,o=>{!o||o.isDeleted||ya(t,o,(i,a,s)=>{s===n.id&&r(o,{boundElements:Uo(o.boundElements,new Set([s]))})})})}static rebindAffected=(t,n,r)=>{!n||n.isDeleted||ba(t,n,(o,i)=>{if(!o||o.isDeleted){r(n,{[i]:null});return}i!=="frameId"&&(o.boundElements?.find(a=>a.id===n.id)||(Z(n)&&r(o,{boundElements:Uo(o.boundElements,new Set,new Array(n))}),Y(n)&&(o.boundElements?.find(a=>a.type==="text")?r(n,{[i]:null}):r(o,{boundElements:Uo(o.boundElements,new Set,new Array(n))}))))})}},zn=class{static unbindAffected(t,n,r){n&&ya(t,n,o=>{!o||o.isDeleted||ba(t,o,(i,a,s)=>{s===n.id&&r(o,{[a]:null})})})}static rebindAffected=(t,n,r)=>{!n||n.isDeleted||ya(t,n,(o,i,a)=>{if(!o||o.isDeleted){r(n,{boundElements:Uo(n.boundElements,new Set([a]))});return}Y(o)&&((n.boundElements?.slice()??[]).reverse().find(l=>l.type==="text")?.id===o.id?o.containerId!==n.id&&r(o,{containerId:n.id}):(o.containerId!==null&&r(o,{containerId:null}),r(n,{boundElements:Uo(n.boundElements,new Set([o.id]))})))})}},va=(e,t)=>{let[n,r]=e;return N([t.x+t.width*n,t.y+t.height*r],Ma(t),t.angle)},FE=(e,t)=>{let n=e.startBinding&&t.get(e.startBinding.elementId),r=e.endBinding&&t.get(e.endBinding.elementId),o=n&&e.startBinding?va(e.startBinding.fixedPoint,n):[e.x+e.points[0][0],e.y+e.points[0][1]],i=r&&e.endBinding?va(e.endBinding.fixedPoint,r):[e.x+e.points[e.points.length-1][0],e.y+e.points[e.points.length-1][1]];return[o,i]},rh=(e,t)=>{let[n,r]=FE(e,t);return[J.pointFromAbsoluteCoords(e,n,t),J.pointFromAbsoluteCoords(e,r,t)]};x();x();var Wo=class{constructor(t){this.scoreFunction=t}content=[];sinkDown(t){let n=this.content[t];for(;t>0;){let r=(t+1>>1)-1,o=this.content[r];if(this.scoreFunction(n)<this.scoreFunction(o))this.content[r]=n,this.content[t]=o,t=r;else break}}bubbleUp(t){let n=this.content.length,r=this.content[t],o=this.scoreFunction(r);for(;;){let i=t+1<<1,a=i-1,s=null,l=0;if(a<n){let c=this.content[a];l=this.scoreFunction(c),l<o&&(s=a)}if(i<n){let c=this.content[i];this.scoreFunction(c)<(s===null?o:l)&&(s=i)}if(s!==null)this.content[t]=this.content[s],this.content[s]=r,t=s;else break}}push(t){this.content.push(t),this.sinkDown(this.content.length-1)}pop(){if(this.content.length===0)return null;let t=this.content[0],n=this.content.pop();return this.content.length>0&&(this.content[0]=n,this.bubbleUp(0)),t}remove(t){if(this.content.length===0)return;let n=this.content.indexOf(t),r=this.content.pop();n<this.content.length&&(this.content[n]=r,this.scoreFunction(r)<this.scoreFunction(t)?this.sinkDown(n):this.bubbleUp(n))}size(){return this.content.length}rescoreElement(t){this.sinkDown(this.content.indexOf(t))}};x();var xr=e=>{let t=e.map(r=>r[0]),n=e.map(r=>r[1]);return{width:Math.max(...t)-Math.min(...t),height:Math.max(...n)-Math.min(...n)}},Wn=(e,t,n,r)=>{let o=n.map(h=>h[e]),i=Math.max(...o),a=Math.min(...o),s=i-a,l=s===0?1:t/s,c=1/0,d=n.map(h=>{let m=h[e]*l,g=[...h];return g[e]=m,m<c&&(c=m),g});if(!r||d.length===2)return d;let p=a-c;return d.map(h=>h.map((m,g)=>g===e?m+p:m))};var Zt=40,Xo=(e,t,n,r,o,i)=>{let a=YE(t,i?.changedElements),s=XE(t,i?.changedElements),l=Aa(n[0],[e.x+(r?r[0]:0),e.y+(r?r[1]:0)]),c=Aa(n[n.length-1],[e.x+(r?r[0]:0),e.y+(r?r[1]:0)]),d=e.startBinding&&ih(e.startBinding.elementId,s),p=e.endBinding&&ih(e.endBinding.elementId,s),f=i?.isDragging?Gn(ln(l),a,s,!0):d,h=i?.isDragging?Gn(ln(c),a,s,!0):p,m=ah(e.startBinding?.fixedPoint,l,c,s,d,f,i?.isDragging),g=ah(e.endBinding?.fixedPoint,c,l,s,p,h,i?.isDragging),E=lh(m,g,s,f,l),w=lh(g,m,s,h,c),y=[m[0]-2,m[1]-2,m[0]+2,m[1]+2],b=[g[0]-2,g[1]-2,g[0]+2,g[1]+2],T=f?hn(f,Vn(E,e.startArrowhead?de*6:de*2,1)):y,A=h?hn(h,Vn(w,e.endArrowhead?de*6:de*2,1)):b,k=Un(m,h?hn(h,Vn(w,Zt,Zt)):b)||Un(g,f?hn(f,Vn(E,Zt,Zt)):y),P=ch(k?[y,b]:[T,A]),I=BE(k?y:T,k?b:A,P,k?Vn(E,!f&&!h?0:Zt,0):Vn(E,!f&&!h?0:Zt-(e.startArrowhead?de*6:de*2),Zt),k?Vn(w,!f&&!h?0:Zt,0):Vn(w,!f&&!h?0:Zt-(e.endArrowhead?de*6:de*2),Zt),k),_=oh(I[0],E,m),D=oh(I[1],w,g),S=HE(I,_||m,E,D||g,w,P),L=_&&Ta(_,S),O=D&&Ta(D,S),G=Ta(g,S);G&&h&&(G.closed=!0);let X=Ta(m,S);X&&e.startBinding&&(X.closed=!0);let U=L&&O&&(Un(L.pos,I[1])||Un(O.pos,I[0])),F=OE(L||X,O||G,S,E||Me,w||Me,U?[]:I);if(F){let K=F.map(R=>[R.pos[0],R.pos[1]]);L&&K.unshift(m),O&&K.push(g),B(e,{...o,...UE(WE(K),0,0),angle:0},i?.informMutation)}else console.error("Elbow arrow cannot find a route")},Vn=(e,t,n)=>{switch(e){case ze:return[t,n,n,n];case Me:return[n,t,n,n];case Be:return[n,n,t,n]}return[n,n,n,t]},OE=(e,t,n,r,o,i)=>{let a=Wl(e.pos,t.pos),s=new Wo(l=>l.f);for(s.push(e);s.size()>0;){let l=s.pop();if(!l||l.closed)continue;if(l===t)return NE(e,l);l.closed=!0;let c=GE(l.addr,n);for(let d=0;d<4;d++){let p=c[d];if(!p||p.closed)continue;let f=Mt(p.pos,l.pos,.5);if(yp(...i.map(T=>Un(f,T))))continue;let h=VE(d),m=l.parent?Bn(fn(l.pos,l.parent.pos)):r,g=Vl(m,-1);if(Tt(g,h)||Tt(e.addr,p.addr)&&Tt(h,r)||Tt(t.addr,p.addr)&&Tt(h,o))continue;let w=m!==h,y=l.g+Wl(p.pos,l.pos)+(w?Math.pow(a,3):0),b=p.visited;if(!b||y<p.g){let T=zE(p,t,h,o);p.visited=!0,p.parent=l,p.h=Wl(t.pos,p.pos)+T*Math.pow(a,2),p.g=y,p.f=p.g+p.h,b?s.rescoreElement(p):s.push(p)}}}return null},NE=(e,t)=>{let n=t,r=[];for(;n.parent;)r.unshift(n),n=n.parent;return r.unshift(e),r},Wl=(e,t)=>Math.abs(e[0]-t[0])+Math.abs(e[1]-t[1]),BE=(e,t,n,r,o,i)=>{let[a,s,l,c]=r??[0,0,0,0],[d,p,f,h]=o??[0,0,0,0],m=[e[0]>t[2]?e[1]>t[3]||e[3]<t[1]?Math.min((e[0]+t[2])/2,e[0]-c):(e[0]+t[2])/2:e[0]>t[0]?e[0]-c:n[0]-c,e[1]>t[3]?e[0]>t[2]||e[2]<t[0]?Math.min((e[1]+t[3])/2,e[1]-a):(e[1]+t[3])/2:e[1]>t[1]?e[1]-a:n[1]-a,e[2]<t[0]?e[1]>t[3]||e[3]<t[1]?Math.max((e[2]+t[0])/2,e[2]+s):(e[2]+t[0])/2:e[2]<t[2]?e[2]+s:n[2]+s,e[3]<t[1]?e[0]>t[2]||e[2]<t[0]?Math.max((e[3]+t[1])/2,e[3]+l):(e[3]+t[1])/2:e[3]<t[3]?e[3]+l:n[3]+l],g=[t[0]>e[2]?t[1]>e[3]||t[3]<e[1]?Math.min((t[0]+e[2])/2,t[0]-h):(t[0]+e[2])/2:t[0]>e[0]?t[0]-h:n[0]-h,t[1]>e[3]?t[0]>e[2]||t[2]<e[0]?Math.min((t[1]+e[3])/2,t[1]-d):(t[1]+e[3])/2:t[1]>e[1]?t[1]-d:n[1]-d,t[2]<e[0]?t[1]>e[3]||t[3]<e[1]?Math.max((t[2]+e[0])/2,t[2]+p):(t[2]+e[0])/2:t[2]<e[2]?t[2]+p:n[2]+p,t[3]<e[1]?t[0]>e[2]||t[2]<e[0]?Math.max((t[3]+e[1])/2,t[3]+f):(t[3]+e[1])/2:t[3]<e[3]?t[3]+f:n[3]+f],E=ch([m,g]);if(!i&&m[2]-m[0]+g[2]-g[0]>E[2]-E[0]+1e-11&&m[3]-m[1]+g[3]-g[1]>E[3]-E[1]+1e-11){let[w,y]=[(g[0]+g[2])/2,(g[1]+g[3])/2];if(t[0]>e[2]&&e[1]>t[3]){let b=m[2]+(g[0]-m[2])/2,T=g[3]+(m[1]-g[3])/2;return Ho([e[2],e[1]],[e[0],e[3]],[w,y])>0?[[m[0],m[1],b,m[3]],[b,g[1],g[2],g[3]]]:[[m[0],T,m[2],m[3]],[g[0],g[1],g[2],T]]}else if(e[2]<t[0]&&e[3]<t[1]){let b=m[2]+(g[0]-m[2])/2,T=m[3]+(g[1]-m[3])/2;return Ho([e[0],e[1]],[e[2],e[3]],[w,y])>0?[[m[0],m[1],m[2],T],[g[0],T,g[2],g[3]]]:[[m[0],m[1],b,m[3]],[b,g[1],g[2],g[3]]]}else if(e[0]>t[2]&&e[3]<t[1]){let b=g[2]+(m[0]-g[2])/2,T=m[3]+(g[1]-m[3])/2;return Ho([e[2],e[1]],[e[0],e[3]],[w,y])>0?[[b,m[1],m[2],m[3]],[g[0],g[1],b,g[3]]]:[[m[0],m[1],m[2],T],[g[0],T,g[2],g[3]]]}else if(e[0]>t[2]&&e[1]>t[3]){let b=g[2]+(m[0]-g[2])/2,T=g[3]+(m[1]-g[3])/2;return Ho([e[0],e[1]],[e[2],e[3]],[w,y])>0?[[b,m[1],m[2],m[3]],[g[0],g[1],b,g[3]]]:[[m[0],T,m[2],m[3]],[g[0],g[1],g[2],T]]}}return[m,g]},HE=(e,t,n,r,o,i)=>{let a=new Set,s=new Set;n===He||n===Me?s.add(t[1]):a.add(t[0]),o===He||o===Me?s.add(r[1]):a.add(r[0]),e.forEach(d=>{a.add(d[0]),a.add(d[2]),s.add(d[1]),s.add(d[3])}),a.add(i[0]),a.add(i[2]),s.add(i[1]),s.add(i[3]);let l=Array.from(s).sort((d,p)=>d-p),c=Array.from(a).sort((d,p)=>d-p);return{row:l.length,col:c.length,data:l.flatMap((d,p)=>c.map((f,h)=>({f:0,g:0,h:0,closed:!1,visited:!1,parent:null,addr:[h,p],pos:[f,d]})))}},oh=(e,t,n)=>{switch(t){case ze:return[n[0],e[1]];case Me:return[e[2],n[1]];case Be:return[n[0],e[3]]}return[e[0],n[1]]},zE=(e,t,n,r)=>{if(r===Me)switch(n){case Me:return e.pos[0]>=t.pos[0]?4:e.pos[1]===t.pos[1]?0:2;case ze:return e.pos[1]>t.pos[1]&&e.pos[0]<t.pos[0]?1:3;case Be:return e.pos[1]<t.pos[1]&&e.pos[0]<t.pos[0]?1:3;case He:return e.pos[1]===t.pos[1]?4:2}else if(r===He)switch(n){case Me:return e.pos[1]===t.pos[1]?4:2;case ze:return e.pos[1]>t.pos[1]&&e.pos[0]>t.pos[0]?1:3;case Be:return e.pos[1]<t.pos[1]&&e.pos[0]>t.pos[0]?1:3;case He:return e.pos[0]<=t.pos[0]?4:e.pos[1]===t.pos[1]?0:2}else if(r===ze)switch(n){case Me:return e.pos[1]>t.pos[1]&&e.pos[0]<t.pos[0]?1:3;case ze:return e.pos[1]>=t.pos[1]?4:e.pos[0]===t.pos[0]?0:2;case Be:return e.pos[0]===t.pos[0]?4:2;case He:return e.pos[1]>t.pos[1]&&e.pos[0]>t.pos[0]?1:3}else if(r===Be)switch(n){case Me:return e.pos[1]<t.pos[1]&&e.pos[0]<t.pos[0]?1:3;case ze:return e.pos[0]===t.pos[0]?4:2;case Be:return e.pos[1]<=t.pos[1]?4:e.pos[0]===t.pos[0]?0:2;case He:return e.pos[1]<t.pos[1]&&e.pos[0]>t.pos[0]?1:3}return 0},GE=([e,t],n)=>[Vo([e,t-1],n),Vo([e+1,t],n),Vo([e,t+1],n),Vo([e-1,t],n)],Vo=([e,t],n)=>e<0||e>=n.col||t<0||t>=n.row?null:n.data[t*n.col+e]??null,Ta=(e,t)=>{for(let n=0;n<t.col;n++)for(let r=0;r<t.row;r++){let o=Vo([n,r],t);if(o&&e[0]===o.pos[0]&&e[1]===o.pos[1])return o}return null},ch=e=>[Math.min(...e.map(t=>t[0])),Math.min(...e.map(t=>t[1])),Math.max(...e.map(t=>t[2])),Math.max(...e.map(t=>t[3]))],ih=(e,t)=>{let n=t.get(e);return n&&Wt(n)?n:null},UE=(e,t,n)=>{let r=e[0][0],o=e[0][1],i=e.map((a,s)=>[a[0]-r,a[1]-o]);return{points:i,x:r+(t??0),y:o+(n??0),...xr(i)}},WE=e=>e.slice(2).reduce((t,n)=>Tt(Bn(fn(t[t.length-1],t[t.length-2])),Bn(fn(n,t[t.length-1])))?[...t.slice(0,-1),n]:[...t,n],[e[0]??[0,0],e[1]??[1,0]]),VE=e=>{switch(e){case 0:return ze;case 1:return Me;case 2:return Be}return He},XE=(e,t)=>t?ht(new Map([...e.getNonDeletedElementsMap(),...t])):e.getNonDeletedElementsMap(),YE=(e,t)=>t?[...e.getNonDeletedElements(),...[...t].map(([n,r])=>r)]:e.getNonDeletedElements(),ah=(e,t,n,r,o,i,a)=>{if(a){if(i){let s=sh(t,n,i,r);return qf(i,s)}return t}if(o){let s=va(e||[0,0],o);return Math.abs(gr(o,s,r)-de)>.01?sh(t,n,o,r):s}return t},sh=(e,t,n,r)=>Bl(Mp(n)?jf(n,e):e,t,n,r),lh=(e,t,n,r,o)=>Kf(e,t,r,r&&hn(r,Array(4).fill(gr(r,e,n))),n,o);var mn={version:null,points:[],zoom:null},J=class e{elementId;selectedPointsIndices;pointerDownState;isDragging;lastUncommittedPoint;pointerOffset;startBindingElement;endBindingElement;hoverPointIndex;segmentMidPointHoveredCoords;constructor(t){this.elementId=t.id,Tt(t.points[0],[0,0])||console.error("Linear element is not normalized",Error().stack),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,lastClickedIsEndPoint:!1,origin:null,segmentMidpoint:{value:null,index:null,added:!1}},this.hoverPointIndex=-1,this.segmentMidPointHoveredCoords=null}static POINT_HANDLE_SIZE=10;static getElement(t,n){let r=n.get(t);return r||null}static handleBoxSelection(t,n,r,o){if(!n.editingLinearElement||n.draggingElement?.type!=="selection")return!1;let{editingLinearElement:i}=n,{selectedPointsIndices:a,elementId:s}=i,l=e.getElement(s,o);if(!l)return!1;let[c,d,p,f]=H(n.draggingElement,o),m=e.getPointsGlobalCoordinates(l,o).reduce((g,E,w)=>((E[0]>=c&&E[0]<=p&&E[1]>=d&&E[1]<=f||t.shiftKey&&a?.includes(w))&&g.push(w),g),[]).filter(g=>!(ie(l)&&g!==0&&g!==l.points.length-1));r({editingLinearElement:{...i,selectedPointsIndices:m.length?m:null}})}static handlePointDragging(t,n,r,o,i,a,s){if(!a)return!1;let{elementId:l}=a,c=s.getNonDeletedElementsMap(),d=e.getElement(l,c);if(!d||ie(d)&&!a.pointerDownState.lastClickedIsEndPoint&&a.pointerDownState.lastClickedPoint!==0)return!1;let p=ie(d)?a.selectedPointsIndices?.reduce((m,g)=>g===0?[0,m[1]]:[m[0],d.points.length-1],[!1,!1]).filter(m=>typeof m=="number"):a.selectedPointsIndices,f=ie(d)?a.pointerDownState.lastClickedPoint>0?d.points.length-1:0:a.pointerDownState.lastClickedPoint,h=d.points[f];if(p&&h){if(Pl(t)&&p.length===1&&d.points.length>1){let g=p[0],E=d.points[g===0?1:g-1],[w,y]=e._getShiftLockedDelta(d,c,E,[r,o],t[ne.CTRL_OR_CMD]?null:n.gridSize);e.movePoints(d,[{index:g,point:[w+E[0],y+E[1]],isDragging:g===f}],s)}else{let g=e.createPointAt(d,c,r-a.pointerOffset.x,o-a.pointerOffset.y,t[ne.CTRL_OR_CMD]?null:n.gridSize),E=g[0]-h[0],w=g[1]-h[1];e.movePoints(d,p.map(y=>{let b=y===f?e.createPointAt(d,c,r-a.pointerOffset.x,o-a.pointerOffset.y,t[ne.CTRL_OR_CMD]?null:n.gridSize):[d.points[y][0]+E,d.points[y][1]+w];return{index:y,point:b,isDragging:y===f}}),s)}if(ee(d,c)&&Er(d,c,!1),Po(d,!1)){let g=[];p[0]===0&&g.push(ln(e.getPointGlobalCoordinates(d,d.points[0],c)));let w=p[p.length-1];w===d.points.length-1&&g.push(ln(e.getPointGlobalCoordinates(d,d.points[w],c))),g.length&&i(d,g)}return!0}return!1}static handlePointerUp(t,n,r,o){let i=o.getNonDeletedElementsMap(),a=o.getNonDeletedElements(),{elementId:s,selectedPointsIndices:l,isDragging:c,pointerDownState:d}=n,p=e.getElement(s,i);if(!p)return n;let f={};if(c&&l){for(let h of l)if(h===0||h===p.points.length-1){Yt(p.points,r.zoom.value)&&e.movePoints(p,[{index:h,point:h===0?p.points[p.points.length-1]:p.points[0]}],o);let m=Ol(r)?Gn(ln(e.getPointAtIndexGlobalCoordinates(p,h,i)),a,i):null;f[h===0?"startBindingElement":"endBindingElement"]=m}}return{...n,...f,selectedPointsIndices:c||t.shiftKey?!c&&t.shiftKey&&d.prevSelectedPointsIndices?.includes(d.lastClickedPoint)?l&&l.filter(h=>h!==d.lastClickedPoint):l:l?.includes(d.lastClickedPoint)?[d.lastClickedPoint]:l,isDragging:!1,pointerOffset:{x:0,y:0}}}static getEditorMidPoints=(t,n,r)=>{let o=ee(t,n);return!r.editingLinearElement&&t.points.length>2&&!o?[]:(mn.version===t.version&&mn.zoom===r.zoom.value||e.updateEditorMidPointsCache(t,n,r),mn.points)};static updateEditorMidPointsCache=(t,n,r)=>{let o=e.getPointsGlobalCoordinates(t,n),i=0,a=[];for(;i<o.length-1;){if(e.isSegmentTooShort(t,t.points[i],t.points[i+1],r.zoom)){a.push(null),i++;continue}let s=e.getSegmentMidPoint(t,o[i],o[i+1],i+1,n);a.push(s),i++}mn.points=a,mn.version=t.version,mn.zoom=r.zoom.value};static getSegmentMidpointHitCoords=(t,n,r,o)=>{let{elementId:i}=t,a=e.getElement(i,o);if(!a||e.getPointIndexUnderCursor(a,o,r.zoom,n.x,n.y)>=0||e.getPointsGlobalCoordinates(a,o).length>=3&&!r.editingLinearElement)return null;let c=e.POINT_HANDLE_SIZE/r.zoom.value,d=t.segmentMidPointHoveredCoords;if(d&&Je(d[0],d[1],n.x,n.y)<=c)return d;let p=0,f=e.getEditorMidPoints(a,o,r);for(;p<f.length;){if(f[p]!==null&&Je(f[p][0],f[p][1],n.x,n.y)<=c)return f[p];p++}return null};static isSegmentTooShort(t,n,r,o){let i=Je(n[0],n[1],r[0],r[1]);return t.points.length>2&&t.roundness&&(i=dh(t,r)),i*o.value<e.POINT_HANDLE_SIZE*4}static getSegmentMidPoint(t,n,r,o,i){let a=Kr(n,r);if(t.points.length>2&&t.roundness){let s=Yl(t,t.points[o]);if(s){let l=uh(t,t.points[o],.5),[c,d]=$l(s[0],s[1],s[2],s[3],l);a=e.getPointGlobalCoordinates(t,[c,d],i)}}return a}static getSegmentMidPointIndex(t,n,r,o){let i=e.getElement(t.elementId,o);if(!i)return-1;let a=e.getEditorMidPoints(i,o,n),s=0;for(;s<a.length;){if(e.arePointsEqual(r,a[s]))return s+1;s++}return-1}static handlePointerDown(t,n,r,o,i,a){let s=a.getNonDeletedElementsMap(),l=a.getNonDeletedElements(),c={didAddPoint:!1,hitElement:null,linearElementEditor:null};if(!i)return c;let{elementId:d}=i,p=e.getElement(d,s);if(!p)return c;let f=e.getSegmentMidpointHitCoords(i,o,n,s),h=null;if(f&&(h=e.getSegmentMidPointIndex(i,n,f,s)),t.altKey&&n.editingLinearElement)return(i.lastUncommittedPoint==null||!ie(p))&&(B(p,{points:[...p.points,e.createPointAt(p,s,o.x,o.y,t[ne.CTRL_OR_CMD]?null:n.gridSize)]}),c.didAddPoint=!0),r.shouldCaptureIncrement(),c.linearElementEditor={...i,pointerDownState:{prevSelectedPointsIndices:i.selectedPointsIndices,lastClickedPoint:-1,lastClickedIsEndPoint:!1,origin:{x:o.x,y:o.y},segmentMidpoint:{value:f,index:h,added:!1}},selectedPointsIndices:[p.points.length-1],lastUncommittedPoint:null,endBindingElement:Gn(o,l,s)},c.didAddPoint=!0,c;let m=e.getPointIndexUnderCursor(p,s,n.zoom,o.x,o.y);if(m>=0||f)c.hitElement=p;else{let{startBindingElement:P,endBindingElement:I}=i;Ol(n)&&Po(p)&&Nl(p,P,I,s,a)}let[g,E,w,y]=H(p,s),b=(g+w)/2,T=(E+y)/2,A=m>-1&&j(p.x+p.points[m][0],p.y+p.points[m][1],b,T,p.angle),k=m>-1||t.shiftKey?t.shiftKey||i.selectedPointsIndices?.includes(m)?$E([...i.selectedPointsIndices||[],m]):[m]:null;return c.linearElementEditor={...i,pointerDownState:{prevSelectedPointsIndices:i.selectedPointsIndices,lastClickedPoint:m,lastClickedIsEndPoint:m===p.points.length-1,origin:{x:o.x,y:o.y},segmentMidpoint:{value:f,index:h,added:!1}},selectedPointsIndices:k,pointerOffset:A?{x:o.x-A[0],y:o.y-A[1]}:{x:0,y:0}},c}static arePointsEqual(t,n){return!t&&!n?!0:!t||!n?!1:Tt(t,n)}static handlePointerMove(t,n,r,o,i){if(!o.editingLinearElement)return null;let{elementId:a,lastUncommittedPoint:s}=o.editingLinearElement,l=i.getNonDeletedElementsMap(),c=e.getElement(a,l);if(!c)return o.editingLinearElement;let{points:d}=c,p=d[d.length-1];if(!t.altKey)return p===s&&e.deletePoints(c,[d.length-1],i),{...o.editingLinearElement,lastUncommittedPoint:null};let f;if(Pl(t)&&d.length>=2){let h=d[d.length-2],[m,g]=e._getShiftLockedDelta(c,l,h,[n,r],t[ne.CTRL_OR_CMD]?null:o.gridSize);f=[m+h[0],g+h[1]]}else f=e.createPointAt(c,l,n-o.editingLinearElement.pointerOffset.x,r-o.editingLinearElement.pointerOffset.y,t[ne.CTRL_OR_CMD]||ie(c)?null:o.gridSize);return p===s?e.movePoints(c,[{index:c.points.length-1,point:f}],i):e.addPoints(c,o,[{point:f}],i),{...o.editingLinearElement,lastUncommittedPoint:c.points[c.points.length-1]}}static getPointGlobalCoordinates(t,n,r){let[o,i,a,s]=H(t,r),l=(o+a)/2,c=(i+s)/2,{x:d,y:p}=t;return[d,p]=j(d+n[0],p+n[1],l,c,t.angle),[d,p]}static getPointsGlobalCoordinates(t,n){let[r,o,i,a]=H(t,n),s=(r+i)/2,l=(o+a)/2;return t.points.map(c=>{let{x:d,y:p}=t;return[d,p]=j(d+c[0],p+c[1],s,l,t.angle),[d,p]})}static getPointAtIndexGlobalCoordinates(t,n,r){let o=n<0?t.points.length+n:n,[i,a,s,l]=H(t,r),c=(i+s)/2,d=(a+l)/2,p=t.points[o],{x:f,y:h}=t;return p?j(f+p[0],h+p[1],c,d,t.angle):j(f,h,c,d,t.angle)}static pointFromAbsoluteCoords(t,n,r){if(ie(t))return[n[0]-t.x,n[1]-t.y];let[o,i,a,s]=H(t,r),l=(o+a)/2,c=(i+s)/2,[d,p]=j(n[0],n[1],l,c,-t.angle);return[d-t.x,p-t.y]}static getPointIndexUnderCursor(t,n,r,o,i){let a=e.getPointsGlobalCoordinates(t,n),s=a.length;for(;--s>-1;){let l=a[s];if(Je(o,i,l[0],l[1])*r.value<e.POINT_HANDLE_SIZE+1)return s}return-1}static createPointAt(t,n,r,o,i){let a=Yo(r,o,i),[s,l,c,d]=H(t,n),p=(s+c)/2,f=(l+d)/2,[h,m]=j(a[0],a[1],p,f,-t.angle);return[h-t.x,m-t.y]}static getNormalizedPoints(t){let{points:n}=t,r=n[0][0],o=n[0][1];return{points:n.map((i,a)=>[i[0]-r,i[1]-o]),x:t.x+r,y:t.y+o}}static normalizePoints(t){B(t,e.getNormalizedPoints(t))}static duplicateSelectedPoints(t,n){if(!t.editingLinearElement)return!1;let{selectedPointsIndices:r,elementId:o}=t.editingLinearElement,i=n.getNonDeletedElementsMap(),a=e.getElement(o,i);if(!a||r===null)return!1;let{points:s}=a,l=[],c=!1,d=-1,p=s.reduce((f,h,m)=>{if(++d,f.push(h),r.includes(m)){let E=s[m+1];E||(c=!0),f.push(E?[(h[0]+E[0])/2,(h[1]+E[1])/2]:[h[0],h[1]]),l.push(d+1),++d}return f},[]);if(B(a,{points:p}),c){let f=a.points[a.points.length-1];e.movePoints(a,[{index:a.points.length-1,point:[f[0]+30,f[1]+30]}],n)}return{appState:{...t,editingLinearElement:{...t.editingLinearElement,selectedPointsIndices:l}}}}static deletePoints(t,n,r){let o=0,i=0;if(n.includes(0)){let l=t.points.find((c,d)=>!n.includes(d));l&&(o=l[0],i=l[1])}let s=t.points.reduce((l,c,d)=>(n.includes(d)||l.push(l.length?[c[0]-o,c[1]-i]:[0,0]),l),[]);e._updatePoints(t,s,o,i,r)}static addPoints(t,n,r,o){let s=[...t.points,...r.map(l=>l.point)];e._updatePoints(t,s,0,0,o)}static movePoints(t,n,r,o,i){let{points:a}=t,s=0,l=0,c=n.find(({index:p})=>p===0);c&&(s=c.point[0]+a[c.index][0],l=c.point[1]+a[c.index][1]);let d=a.map((p,f)=>{let h=n.find(m=>m.index===f);if(h){if(h.index===0)return p;let m=h.point[0]-a[h.index][0],g=h.point[1]-a[h.index][1];return[p[0]+m-s,p[1]+g-l]}return s||l?[p[0]-s,p[1]-l]:p});e._updatePoints(t,d,s,l,r,o,{isDragging:n.reduce((p,f)=>p||f.isDragging===!0,!1),changedElements:i?.changedElements})}static shouldAddMidpoint(t,n,r,o){let i=e.getElement(t.elementId,o);if(i&&ie(i)||!i)return!1;let{segmentMidpoint:a}=t.pointerDownState;if(a.added||a.value===null||a.index===null||t.pointerDownState.origin===null)return!1;let s=t.pointerDownState.origin,l=Je(s.x,s.y,n.x,n.y);return!(!r.editingLinearElement&&l<Ku/r.zoom.value)}static addMidpoint(t,n,r,o,i){let a=e.getElement(t.elementId,i);if(!a)return;let{segmentMidpoint:s}=t.pointerDownState,l={pointerDownState:t.pointerDownState,selectedPointsIndices:t.selectedPointsIndices},c=e.createPointAt(a,i,n.x,n.y,o&&!ie(a)?r.gridSize:null),d=[...a.points.slice(0,s.index),c,...a.points.slice(s.index)];return B(a,{points:d}),l.pointerDownState={...t.pointerDownState,segmentMidpoint:{...t.pointerDownState.segmentMidpoint,added:!0},lastClickedPoint:s.index},l.selectedPointsIndices=[s.index],l}static _updatePoints(t,n,r,o,i,a,s){if(ie(t)){let l={};a?.startBinding!==void 0&&(l.startBinding=a.startBinding!==null&&nl(a.startBinding)?a.startBinding:null),a?.endBinding!==void 0&&(l.endBinding=a.endBinding!==null&&nl(a.endBinding)?a.endBinding:null),Xo(t,i,n,[r,o],l,s)}else{let l=Xl(t,n),c=Xl(t,t.points),d=(l[0]+l[2])/2,p=(l[1]+l[3])/2,f=(c[0]+c[2])/2,h=(c[1]+c[3])/2,m=f-d,g=h-p,E=j(r,o,m,g,t.angle);B(t,{...a,points:n,x:t.x+E[0],y:t.y+E[1]})}}static _getShiftLockedDelta(t,n,r,o,i){let a=e.getPointGlobalCoordinates(t,r,n);if(ie(t))return[o[0]-a[0],o[1]-a[1]];let[s,l]=Yo(o[0],o[1],i),{width:c,height:d}=Zl(a[0],a[1],s,l);return N([c,d],[0,0],-t.angle)}static getBoundTextElementPosition=(t,n,r)=>{let o=e.getPointsGlobalCoordinates(t,r);o.length<2&&B(n,{isDeleted:!0});let i=0,a=0;if(t.points.length%2===1){let s=Math.floor(t.points.length/2),l=e.getPointGlobalCoordinates(t,t.points[s],r);i=l[0]-n.width/2,a=l[1]-n.height/2}else{let s=t.points.length/2-1,l=mn.points[s];t.points.length===2&&(l=Kr(o[0],o[1])),(!l||mn.version!==t.version)&&(l=e.getSegmentMidPoint(t,o[s],o[s+1],s+1,r)),i=l[0]-n.width/2,a=l[1]-n.height/2}return{x:i,y:a}};static getMinMaxXYWithBoundText=(t,n,r,o)=>{let[i,a,s,l]=r,c=(i+s)/2,d=(a+l)/2,{x:p,y:f}=e.getBoundTextElementPosition(t,o,n),h=p+o.width,m=f+o.height,g=N([i,a],[c,d],t.angle),E=N([s,a],[c,d],t.angle),w=N([p,f],[c,d],-t.angle),y=N([h,f],[c,d],-t.angle),b=N([p,m],[c,d],-t.angle),T=N([h,m],[c,d],-t.angle);return g[0]<E[0]&&g[1]>=E[1]?(i=Math.min(i,b[0]),s=Math.max(s,Math.max(y[0],T[0])),a=Math.min(a,w[1]),l=Math.max(l,T[1])):g[0]>=E[0]&&g[1]>E[1]?(i=Math.min(i,T[0]),s=Math.max(s,Math.max(w[0],y[0])),a=Math.min(a,b[1]),l=Math.max(l,y[1])):g[0]>=E[0]?(i=Math.min(i,y[0]),s=Math.max(s,b[0]),a=Math.min(a,T[1]),l=Math.max(l,w[1])):g[1]<=E[1]&&(i=Math.min(i,Math.min(y[0],w[0])),s=Math.max(s,T[0]),a=Math.min(a,y[1]),l=Math.max(l,b[1])),[i,a,s,l,c,d]};static getElementAbsoluteCoords=(t,n,r=!1)=>{let o,i,a,s,l;if(t.points.length<2||!ce.get(t)){let{minX:f,minY:h,maxX:m,maxY:g}=t.points.reduce((E,[w,y])=>(E.minY=Math.min(E.minY,y),E.minX=Math.min(E.minX,w),E.maxX=Math.max(E.maxX,w),E.maxY=Math.max(E.maxY,y),E),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});i=f+t.x,a=h+t.y,s=m+t.x,l=g+t.y}else{let f=ce.generateElementShape(t,null),h=Xn(f[0]),[m,g,E,w]=$o(h);i=m+t.x,a=g+t.y,s=E+t.x,l=w+t.y}let c=(i+s)/2,d=(a+l)/2;if(o=[i,a,s,l,c,d],!r)return o;let p=ee(t,n);return p&&(o=e.getMinMaxXYWithBoundText(t,n,[i,a,s,l],p)),o}},$E=e=>{let t=[...new Set(e.filter(n=>n!==null&&n!==-1))];return t=t.sort((n,r)=>n-r),t.length?t:null};x();var Zo={},ph=(e,t)=>{let n=Zo[e]||(Zo[e]={height:t});return n.height=t,n},fh=e=>{Zo[e]&&delete Zo[e]},BS=e=>Zo[e]?.height??null;var ql=e=>wp(e).replace(/\t/g," "),Jl=e=>ql(e).split(`
|
|
3
|
+
`),Ql=(e,t,n,r=!0)=>{let o,i={x:e.x,y:e.y,text:e.text,width:e.width,height:e.height,angle:t?.angle??e.angle};i.text=e.text,(t||!e.autoResize)&&(o=t?At(t,e):e.width,i.text=Yn(e.originalText,he(e),o));let a=Kt(i.text,he(e),e.lineHeight);if(e.autoResize&&(i.width=a.width),i.height=a.height,t){let s=Ko(t,e),l=At(t,e);if(!Z(t)&&a.height>s){let f=jl(a.height,t.type);B(t,{height:f},r),ph(t.id,f)}if(a.width>l){let f=jl(a.width,t.type);B(t,{width:f},r)}let c={...e,...i},{x:d,y:p}=hh(t,c,n);i.x=d,i.y=p}B(e,i,r)},ZS=(e,t,n)=>{let r=Q(e);t.forEach(o=>{let i=n.get(o.id),a=gn(o);if(a){let s=n.get(a);if(s){let l=r.get(i);l&&B(l,{boundElements:(o.boundElements||[]).filter(d=>d.id!==s&&d.id!==a).concat({type:"text",id:s})});let c=r.get(s);c&&Y(c)&&B(c,{containerId:l?i:null})}}})},Er=(e,t,n,r=!1)=>{if(!gn(e))return;fh(e.id);let i=ee(e,t);if(i&&i.text){if(!e)return;let a=i.text,s=i.height,l=i.width,c=At(e,i),d=Ko(e,i),p=e.height;if(r||n!=="n"&&n!=="s"){a&&(a=Yn(i.originalText,he(i),c));let f=Kt(a,he(i),i.lineHeight);s=f.height,l=f.width}if(s>d){p=jl(s,e.type);let f=p-e.height,h=!Z(e)&&(n==="ne"||n==="nw"||n==="n")?e.y-f:e.y;B(e,{height:p,y:h})}B(i,{text:a,width:l,height:s}),Z(e)||B(i,hh(e,i,t))}},hh=(e,t,n)=>{if(Z(e))return J.getBoundTextElementPosition(e,t,n);let r=ec(e),o=Ko(e,t),i=At(e,t),a,s;return t.verticalAlign===sn.TOP?s=r.y:t.verticalAlign===sn.BOTTOM?s=r.y+(o-t.height):s=r.y+(o/2-t.height/2),t.textAlign===Ks.LEFT?a=r.x:t.textAlign===Ks.RIGHT?a=r.x+(i-t.width):a=r.x+(i/2-t.width/2),{x:a,y:s}},Kt=(e,t,n)=>{e=e.split(`
|
|
4
|
+
`).map(a=>a||" ").join(`
|
|
5
|
+
`);let r=parseFloat(t),o=ZE(e,r,n);return{width:Eh(e,t),height:o}},mh=e=>{let t=Jl(e.text).length;return e.height/t/e.fontSize},jr=(e,t)=>e*t,gh=(e,t)=>jr(e,t)+ve*2,Kl,wr=(e,t,n)=>{Kl||(Kl=document.createElement("canvas"));let r=Kl.getContext("2d");r.font=t;let o=r.measureText(e),i=o.width;if(!n&&window.TextMetrics&&"actualBoundingBoxLeft"in window.TextMetrics.prototype&&"actualBoundingBoxRight"in window.TextMetrics.prototype){let a=Math.abs(o.actualBoundingBoxLeft)+Math.abs(o.actualBoundingBoxRight);return Math.max(a,i)}return dn()?i*10:i},Eh=(e,t,n)=>{let r=Jl(e),o=0;return r.forEach(i=>{o=Math.max(o,wr(i,t,n))}),o},ZE=(e,t,n)=>{let r=Jl(e).length;return jr(t,n)*r},KE=e=>{let t=e.split("-");return t.length>1&&t.forEach((n,r)=>{r!==t.length-1&&(t[r]=n+="-")}),t.join(" ").split(" ")},Yn=(e,t,n)=>{if(!Number.isFinite(n)||n<0)return e;let r=[],o=e.split(`
|
|
6
|
+
`),i=wr(" ",t,!0),a="",s=0,l=d=>{d.trim()&&r.push(d)},c=()=>{a="",s=0};for(let d of o){if(wr(d,t,!0)<=n){r.push(d);continue}let f=KE(d);c();let h=0;for(;h<f.length;){let m=wr(f[h],t,!0);if(m===n)l(f[h]),h++;else if(m>n){for(l(a),c();f[h].length>0;){let g=String.fromCodePoint(f[h].codePointAt(0)),E=a+g,w=wr(E,t,!0),y=xh.calculate(g,t);s=w,f[h]=f[h].slice(g.length),s>=n?(l(a),a=g,s=y):a=E}s+i>=n?(l(a),c()):a.endsWith("-")||(a+=" ",s+=i),h++}else for(;s<n&&h<f.length;){let g=f[h];if(s=wr(a+g,t,!0),s>n){l(a),c();break}h++;let E=!g.endsWith("-");if(a+=g,E&&(a+=" "),s+i>=n){E?r.push(a.slice(0,-1)):r.push(a),c();break}}}a.slice(-1)===" "&&(a=a.slice(0,-1),l(a))}return r.join(`
|
|
7
|
+
`)},xh=(()=>{let e={};return{calculate:(r,o)=>{let i=r.charCodeAt(0);if(e[o]||(e[o]=[]),!e[o][i]){let a=wr(r,o,!0);e[o][i]=a}return e[o][i]},getCache:r=>e[r]}})(),wh="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".toLocaleUpperCase(),yh=(e,t)=>{let n=jE(e);return n===0?Kt(wh.split("").join(`
|
|
8
|
+
`),e,t).width+ve*2:n+ve*2};var jE=e=>{let t=xh.getCache(e);if(!t)return 0;let n=t.filter(r=>r!==void 0);return Math.max(...n)},gn=e=>e?.boundElements?.length&&e?.boundElements?.find(t=>t.type==="text")?.id||null,ee=(e,t)=>{if(!e)return null;let n=gn(e);return n&&t.get(n)||null},_e=(e,t)=>e&&e.containerId&&t.get(e.containerId)||null,KS=(e,t,n)=>{if(!Z(e))return{x:e.x+e.width/2,y:e.y+e.height/2};let r=J.getPointsGlobalCoordinates(e,n);if(r.length%2===1){let a=Math.floor(e.points.length/2),s=J.getPointGlobalCoordinates(e,e.points[a],n);return{x:s[0],y:s[1]}}let o=e.points.length/2-1,i=J.getEditorMidPoints(e,n,t)[o];return i||(i=J.getSegmentMidPoint(e,r[o],r[o+1],o+1,n)),{x:i[0],y:i[1]}},ec=e=>{let t=ve,n=ve;return e.type==="ellipse"&&(t+=e.width/2*(1-Math.sqrt(2)/2),n+=e.height/2*(1-Math.sqrt(2)/2)),e.type==="diamond"&&(t+=e.width/4,n+=e.height/4),{x:e.x+t,y:e.y+n}},jS=(e,t)=>!t||Z(t)?e.angle:t.angle;var qS=(e,t)=>e.some(n=>{if(ke(n)){let r=_e(n,t);return!Z(r)}return!1}),JS=(e,t)=>e.some(n=>{if(ke(n)){let r=_e(n,t);return!Z(r)}return Y(n)}),qE=new Set(["rectangle","ellipse","diamond","arrow"]),QS=e=>qE.has(e.type),jl=(e,t)=>{e=Math.ceil(e);let n=ve*2;return t==="ellipse"?Math.round((e+n)/Math.sqrt(2)*2):t==="arrow"?e+n*8:t==="diamond"?2*(e+n):e+n},At=(e,t)=>{let{width:n}=e;if(Z(e)){let r=(t?.fontSize??Ht)*tp;return Math.max(ep*n,r)}return e.type==="ellipse"?Math.round(n/2*Math.sqrt(2))-ve*2:e.type==="diamond"?Math.round(n/2)-ve*2:n-ve*2},Ko=(e,t)=>{let{height:n}=e;return Z(e)?n-ve*8*2<=0?t.height:n:e.type==="ellipse"?Math.round(n/2*Math.sqrt(2))-ve*2:e.type==="diamond"?Math.round(n/2)-ve*2:n-ve*2},e8=()=>Eh(wh,he({fontSize:Ht,fontFamily:zt}))>0,Sa=(e,t)=>Kt("",e,t).width+ve*2;x();x();var St={[ae.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},icon:Go},[ae.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.35},icon:pa},[ae["Lilita One"]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15},icon:zf},[ae["Comic Shanns"]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25},icon:Ll},[ae.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},icon:Go,deprecated:!0},[ae.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},icon:pa,deprecated:!0,local:!0},[ae.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},icon:Ll,deprecated:!0},[ae["Liberation Sans"]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},icon:pa,serverSide:!0}},$n={LATIN:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",LATIN_EXT:"U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF",CYRILIC_EXT:"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F",CYRILIC:"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116",VIETNAMESE:"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB"},Ia="local:";x();var JE=`https://unpkg.com/${M.VITE_PKG_NAME?`${M.VITE_PKG_NAME}@${M.PKG_VERSION}`:"@excalidraw/excalidraw"}/dist/prod/`,Pa=class e{urls;fontFace;constructor(t,n,r){this.urls=e.createUrls(n);let o=this.urls.map(i=>`url(${i}) ${e.getFormat(i)}`).join(", ");this.fontFace=new FontFace(t,o,{display:"swap",style:"normal",weight:"400",...r})}async getContent(){let t=0,n=[];for(;t<this.urls.length;){let r=this.urls[t];if(r.protocol==="data:")return r.toString();try{let o=await fetch(r,{headers:{Accept:"font/woff2"}});if(o.ok){let i=await o.headers.get("Content-Type"),a=await o.arrayBuffer();return`data:${i};base64,${await _a(await jo(a),!0)}`}n.push(`"${r.toString()}" returned status "${o.status}"`)}catch(o){n.push(`"${r.toString()}" returned error "${o}"`)}t++}return console.error(`Failed to fetch font "${this.fontFace.family}" from urls "${this.urls.toString()}`,JSON.stringify(n,void 0,2)),this.urls.length?this.urls[this.urls.length-1].toString():""}static createUrls(t){if(t.startsWith(Ia))return[];if(t.startsWith("http")||t.startsWith("data"))return[new URL(t)];let n=t.replace(/^\/+/,""),r=[];if(typeof window.EXCALIDRAW_ASSET_PATH=="string"){let o=this.normalizeBaseUrl(window.EXCALIDRAW_ASSET_PATH);r.push(new URL(n,o))}else Array.isArray(window.EXCALIDRAW_ASSET_PATH)&&window.EXCALIDRAW_ASSET_PATH.forEach(o=>{let i=this.normalizeBaseUrl(o);r.push(new URL(n,i))});return r.push(new URL(n,JE)),r}static getFormat(t){try{let r=new URL(t).pathname.split(".");return r.length===1?"":`format('${r.pop()}')`}catch{return""}}static normalizeBaseUrl(t){let n=t;return/^\.?\//.test(n)&&(n=new URL(n.replace(/^\.?\/+/,""),window?.location?.origin).toString()),n=`${n.replace(/\/+$/,"")}/`,n}};var bh="./Virgil-Regular-YHAB2VGJ.woff2";var vh="./Excalifont-Regular-CPKEUDVM.woff2";var Mh="./CascadiaCode-Regular-TMZI7IJ5.woff2";var Th="./ComicShanns-Regular-6TOETDFT.woff2";var Ah="./LiberationSans-Regular-ZQD73GJM.woff2";var Sh="https://fonts.gstatic.com/s/lilitaone/v15/i7dPIFZ9Zz-WBtRtedDbYEF8RXi4EwQ.woff2";var Ih="https://fonts.gstatic.com/s/lilitaone/v15/i7dPIFZ9Zz-WBtRtedDbYE98RXi4EwSsbg.woff2";var Ph="https://fonts.gstatic.com/s/nunito/v26/XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTQ3j6zbXWjgeg.woff2";var _h="https://fonts.gstatic.com/s/nunito/v26/XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTo3j6zbXWjgevT5.woff2";var kh="https://fonts.gstatic.com/s/nunito/v26/XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTA3j6zbXWjgevT5.woff2";var Lh="https://fonts.gstatic.com/s/nunito/v26/XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTk3j6zbXWjgevT5.woff2";var Ch="https://fonts.gstatic.com/s/nunito/v26/XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTs3j6zbXWjgevT5.woff2";var Zn=class e{static loadedFontsCache=new Set;static _registered;static _initialized=!1;static get registered(){return e._registered?e._initialized||(e._registered=new Map([...e.init().entries(),...e._registered.entries()])):e._registered=e.init(),e._registered}get registered(){return e.registered}scene;constructor({scene:t}){this.scene=t}onLoaded=t=>{if(t.every(o=>{let i=`${o.family}-${o.style}-${o.weight}-${o.unicodeRange}`;return e.loadedFontsCache.has(i)?!0:(e.loadedFontsCache.add(i),!1)}))return!1;let n=!1,r=this.scene.getNonDeletedElementsMap();for(let o of this.scene.getNonDeletedElements())if(Y(o)){n=!0,ce.delete(o);let i=_e(o,r);i&&ce.delete(i)}n&&this.scene.triggerUpdate()};loadSceneFonts=async()=>{let t=this.getSceneFontFamilies(),n=await e.loadFontFaces(t);return this.onLoaded(n),n};getSceneFontFamilies=()=>e.getFontFamilies(this.scene.getNonDeletedElements());static loadFontsForElements=async t=>{let n=e.getFontFamilies(t);return await e.loadFontFaces(n)};static async loadFontFaces(t){for(let{fonts:r,metadata:o}of e.registered.values())if(!o.local)for(let{fontFace:i}of r)window.document.fonts.has(i)||window.document.fonts.add(i);return(await Promise.all(t.map(async r=>{let o=he({fontFamily:r,fontSize:16});if(!window.document.fonts.check(o))try{return await window.document.fonts.load(o)}catch(i){console.error(`Failed to load font "${o}" from urls "${e.registered.get(r)?.fonts.map(a=>a.urls)}"`,i)}return Promise.resolve()}))).flat().filter(Boolean)}static init(){let t={registered:new Map},n=ux.bind(t);return n("Virgil",St[ae.Virgil],{uri:bh}),n("Excalifont",St[ae.Excalifont],{uri:vh}),n("Helvetica",St[ae.Helvetica],{uri:Ia}),n("Liberation Sans",St[ae["Liberation Sans"]],{uri:Ah}),n("Cascadia",St[ae.Cascadia],{uri:Mh}),n("Comic Shanns",St[ae["Comic Shanns"]],{uri:Th}),n("Lilita One",St[ae["Lilita One"]],{uri:Ih,descriptors:{unicodeRange:$n.LATIN_EXT}},{uri:Sh,descriptors:{unicodeRange:$n.LATIN}}),n("Nunito",St[ae.Nunito],{uri:Lh,descriptors:{unicodeRange:$n.CYRILIC_EXT,weight:"500"}},{uri:kh,descriptors:{unicodeRange:$n.CYRILIC,weight:"500"}},{uri:Ch,descriptors:{unicodeRange:$n.VIETNAMESE,weight:"500"}},{uri:_h,descriptors:{unicodeRange:$n.LATIN_EXT,weight:"500"}},{uri:Ph,descriptors:{unicodeRange:$n.LATIN,weight:"500"}}),e._initialized=!0,t.registered}static getFontFamilies(t){return Array.from(t.reduce((n,r)=>(Y(r)&&n.add(r.fontFamily),n),new Set))}};function ux(e,t,...n){let r=ae[e];return this.registered.get(r)||this.registered.set(r,{metadata:t,fonts:n.map(({uri:i,descriptors:a})=>new Pa(e,i,a))}),this.registered}var ka=(e,t,n)=>{let{unitsPerEm:r,ascender:o,descender:i}=Zn.registered.get(e)?.metadata.metrics||St[ae.Virgil].metrics,a=t/r,s=(n-a*o+a*i)/2;return a*o+s},La=e=>{let{lineHeight:t}=Zn.registered.get(e)?.metadata.metrics||St[ae.Excalifont].metrics;return t};var tc="invert(100%) hue-rotate(180deg) saturate(1.25)",px=ft(),Oh=(e,t)=>Ut(e)&&!t.imageCache.has(e.fileId),Nh=(e,t,n)=>n.theme===Fe.DARK&&Ut(e)&&!Oh(e,t)&&t.imageCache.get(e.fileId)?.mimeType!==W.svg,Da=e=>{switch(e.type){case"freedraw":return e.strokeWidth*12;case"text":return e.fontSize/2;default:return 20}},fx=(e,t,n)=>{let r=(t?.opacity??100)*e.opacity/1e4;return(n.has(e.id)||t&&n.has(t.id))&&(r*=np/100),r},hx=(e,t,n)=>{let i=Da(e),[a,s,l,c]=H(e,t),d=oe(e)||Se(e)?at(a,l):e.width,p=oe(e)||Se(e)?at(s,c):e.height,f=d*window.devicePixelRatio+i*2,h=p*window.devicePixelRatio+i*2,m=n.value;return(f*m>32767||h*m>32767)&&(m=Math.min(32767/f,32767/h)),f*h*m*m>16777216&&(m=Math.sqrt(16777216/(f*h))),f=Math.floor(f*m),h=Math.floor(h*m),{width:f,height:h,scale:m}},mx=(e,t,n,r,o)=>{let i=document.createElement("canvas"),a=i.getContext("2d"),s=Da(e),{width:l,height:c,scale:d}=hx(e,t,n);i.width=l,i.height=c;let p=-100,f=0;if(oe(e)||Se(e)){let[w,y]=H(e,t);p=e.x>w?at(e.x,w)*window.devicePixelRatio*d:0,f=e.y>y?at(e.y,y)*window.devicePixelRatio*d:0,a.translate(p,f)}a.save(),a.translate(s*d,s*d),a.scale(window.devicePixelRatio*d,window.devicePixelRatio*d);let h=Xt.canvas(i);Nh(e,r,o)&&(a.filter=tc),Ca(e,h,a,r,o),a.restore();let m=ee(e,t),g=document.createElement("canvas"),E=g.getContext("2d");if(Z(e)&&m){let[w,y,b,T]=H(e,t),A=Math.max(at(w,b),at(y,T));g.width=A*window.devicePixelRatio*d+s*d*10,g.height=A*window.devicePixelRatio*d+s*d*10,E.translate(g.width/2,g.height/2),E.rotate(e.angle),E.drawImage(i,-i.width/2,-i.height/2,i.width,i.height);let[,,,,k,P]=H(m,t);E.rotate(-e.angle);let I=(g.width-i.width)/2,_=(g.height-i.height)/2,D=g.width/2-(k-w)*window.devicePixelRatio*d-I-s*d,S=g.height/2-(P-y)*window.devicePixelRatio*d-_-s*d;E.translate(-D,-S),E.clearRect(-(m.width/2+ve)*window.devicePixelRatio*d,-(m.height/2+ve)*window.devicePixelRatio*d,(m.width+ve*2)*window.devicePixelRatio*d,(m.height+ve*2)*window.devicePixelRatio*d)}return{element:e,canvas:i,theme:o.theme,scale:d,zoomValue:n.value,canvasOffsetX:p,canvasOffsetY:f,boundTextElementVersion:ee(e,t)?.version||null,containingFrameOpacity:$e(e,t)?.opacity||100,boundTextCanvas:g,angle:e.angle}},Bh=14,Hh=document.createElement("img");Hh.src=`data:${W.svg},${encodeURIComponent('<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="image" class="svg-inline--fa fa-image fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#888" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg>')}`;var zh=document.createElement("img");zh.src=`data:${W.svg},${encodeURIComponent('<svg viewBox="0 0 668 668" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48ZM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56ZM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.81709 0 0 .81709 124.825 145.825)"/><path d="M256 8C119.034 8 8 119.033 8 256c0 136.967 111.034 248 248 248s248-111.034 248-248S392.967 8 256 8Zm130.108 117.892c65.448 65.448 70 165.481 20.677 235.637L150.47 105.216c70.204-49.356 170.226-44.735 235.638 20.676ZM125.892 386.108c-65.448-65.448-70-165.481-20.677-235.637L361.53 406.784c-70.203 49.356-170.226 44.736-235.638-20.676Z" style="fill:#888;fill-rule:nonzero" transform="matrix(.30366 0 0 .30366 506.822 60.065)"/></svg>')}`;var gx=(e,t)=>{t.fillStyle="#E7E7E7",t.fillRect(0,0,e.width,e.height);let n=Math.min(e.width,e.height),r=Math.min(n,Math.min(n*.4,100));t.drawImage(e.status==="error"?zh:Hh,e.width/2-r/2,e.height/2-r/2,r,r)},Ca=(e,t,n,r,o)=>{switch(e.type){case"rectangle":case"iframe":case"embeddable":case"diamond":case"ellipse":{n.lineJoin="round",n.lineCap="round",t.draw(ce.get(e));break}case"arrow":case"line":{n.lineJoin="round",n.lineCap="round",ce.get(e).forEach(i=>{t.draw(i)});break}case"freedraw":{n.save(),n.fillStyle=e.strokeColor;let i=Ex(e),a=ce.get(e);a&&t.draw(a),n.fillStyle=e.strokeColor,n.fill(i),n.restore();break}case"image":{let i=Ut(e)?r.imageCache.get(e.fileId)?.image:void 0;i!=null&&!(i instanceof Promise)?(e.roundness&&n.roundRect&&(n.beginPath(),n.roundRect(0,0,e.width,e.height,En(Math.min(e.width,e.height),e)),n.clip()),n.drawImage(i,0,0,e.width,e.height)):gx(e,n);break}default:if(Y(e)){let i=Gi(e.text),a=i&&!n.canvas.isConnected;a&&document.body.appendChild(n.canvas),n.canvas.setAttribute("dir",i?"rtl":"ltr"),n.save(),n.font=he(e),n.fillStyle=e.strokeColor,n.textAlign=e.textAlign;let s=e.text.replace(/\r\n?/g,`
|
|
9
|
+
`).split(`
|
|
10
|
+
`),l=e.textAlign==="center"?e.width/2:e.textAlign==="right"?e.width:0,c=jr(e.fontSize,e.lineHeight),d=ka(e.fontFamily,e.fontSize,c);for(let p=0;p<s.length;p++)n.fillText(s[p],l,p*c+d);n.restore(),a&&n.canvas.remove()}else throw new Error(`Unimplemented type ${e.type}`)}},ma=new WeakMap,Dh=(e,t,n,r)=>{let o=n?r.zoom:px.zoom,i=ma.get(e),a=i&&i.zoomValue!==o.value&&!r?.shouldCacheIgnoreZoom,s=ee(e,t),l=s?.version||null,c=$e(e,t)?.opacity||100;if(!i||a||i.theme!==r.theme||i.boundTextElementVersion!==l||i.containingFrameOpacity!==c||Z(e)&&s&&e.angle!==i.angle){let d=mx(e,t,o,n,r);return ma.set(e,d),d}return i},Rh=(e,t,n,r,o)=>{let i=e.element,a=Da(i),s=e.scale,[l,c,d,p]=H(i,o),f=((l+d)/2+r.scrollX)*window.devicePixelRatio,h=((c+p)/2+r.scrollY)*window.devicePixelRatio;t.save(),t.scale(1/window.devicePixelRatio,1/window.devicePixelRatio);let m=ee(i,o);if(Z(i)&&m){let g=(e.boundTextCanvas.width-e.canvas.width)/2,E=(e.boundTextCanvas.height-e.canvas.height)/2;t.translate(f,h),t.drawImage(e.boundTextCanvas,-(d-l)/2*window.devicePixelRatio-g/s-a,-(p-c)/2*window.devicePixelRatio-E/s-a,e.boundTextCanvas.width/s,e.boundTextCanvas.height/s)}else if(t.translate(f,h),t.rotate(i.angle),"scale"in e.element&&!Oh(i,n)&&t.scale(e.element.scale[0],e.element.scale[1]),t.translate(-f,-h),t.drawImage(e.canvas,(l+r.scrollX)*window.devicePixelRatio-a*e.scale/e.scale,(c+r.scrollY)*window.devicePixelRatio-a*e.scale/e.scale,e.canvas.width/e.scale,e.canvas.height/e.scale),M.VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX==="true"&&Dn(i)){let g=ee(i,o),E=ec(i);t.strokeStyle="#c92a2a",t.lineWidth=3,t.strokeRect((E.x+r.scrollX)*window.devicePixelRatio,(E.y+r.scrollY)*window.devicePixelRatio,At(i,g)*window.devicePixelRatio,Ko(i,g)*window.devicePixelRatio)}t.restore()},rI=(e,t,n,r)=>{t.save(),t.translate(e.x+n.scrollX,e.y+n.scrollY),t.fillStyle="rgba(0, 0, 200, 0.04)";let o=.5/n.zoom.value;t.fillRect(o,o,e.width,e.height),t.lineWidth=1/n.zoom.value,t.strokeStyle=r,t.strokeRect(o,o,e.width,e.height),t.restore()},qr=(e,t,n,r,o,i,a)=>{switch(o.globalAlpha=fx(e,$e(e,t),i.elementsPendingErasure),e.type){case"magicframe":case"frame":{a.frameRendering.enabled&&a.frameRendering.outline&&(o.save(),o.translate(e.x+a.scrollX,e.y+a.scrollY),o.fillStyle="rgba(0, 0, 200, 0.04)",o.lineWidth=Ae.strokeWidth/a.zoom.value,o.strokeStyle=Ae.strokeColor,vp(e)&&(o.strokeStyle=a.theme===Fe.LIGHT?"#7affd7":"#1d8264"),Ae.radius&&o.roundRect?(o.beginPath(),o.roundRect(0,0,e.width,e.height,Ae.radius/a.zoom.value),o.stroke(),o.closePath()):o.strokeRect(0,0,e.width,e.height),o.restore());break}case"freedraw":{if(ce.generateElementShape(e,null),i.isExporting){let[s,l,c,d]=H(e,t),p=(s+c)/2+a.scrollX,f=(l+d)/2+a.scrollY,h=(c-s)/2-(e.x-s),m=(d-l)/2-(e.y-l);o.save(),o.translate(p,f),o.rotate(e.angle),o.translate(-h,-m),Ca(e,r,o,i,a),o.restore()}else{let s=Dh(e,n,i,a);Rh(s,o,i,a,n)}break}case"rectangle":case"diamond":case"ellipse":case"line":case"arrow":case"image":case"text":case"iframe":case"embeddable":{if(ce.generateElementShape(e,i),i.isExporting){let[s,l,c,d]=H(e,t),p=(s+c)/2+a.scrollX,f=(l+d)/2+a.scrollY,h=(c-s)/2-(e.x-s),m=(d-l)/2-(e.y-l);if(Y(e)){let E=_e(e,t);if(Z(E)){let w=J.getBoundTextElementPosition(E,e,t);h=(c-s)/2-(w.x-s),m=(d-l)/2-(w.y-l)}}o.save(),o.translate(p,f),Nh(e,i,a)&&(o.filter="none");let g=ee(e,t);if(Z(e)&&g){let E=document.createElement("canvas"),w=E.getContext("2d"),y=Math.max(at(s,c),at(l,d)),b=Da(e);E.width=y*a.exportScale+b*10*a.exportScale,E.height=y*a.exportScale+b*10*a.exportScale,w.translate(E.width/2,E.height/2),w.scale(a.exportScale,a.exportScale),h=e.width/2-(e.x-s),m=e.height/2-(e.y-l),w.rotate(e.angle);let T=Xt.canvas(E);w.translate(-h,-m),Ca(e,T,w,i,a),w.translate(h,m),w.rotate(-e.angle);let[,,,,A,k]=H(g,t),P=(s+c)/2-A,I=(l+d)/2-k;w.translate(-P,-I),w.clearRect(-g.width/2,-g.height/2,g.width,g.height),o.scale(1/a.exportScale,1/a.exportScale),o.drawImage(E,-E.width/2,-E.height/2,E.width,E.height)}else o.rotate(e.angle),e.type==="image"&&o.scale(e.scale[0],e.scale[1]),o.translate(-h,-m),Ca(e,r,o,i,a);o.restore()}else{let s=Dh(e,n,i,a),l=o.imageSmoothingEnabled;!a?.shouldCacheIgnoreZoom&&(!e.angle||Wh(e.angle))&&(o.imageSmoothingEnabled=!1),Rh(s,o,i,a,n),o.imageSmoothingEnabled=l}break}default:throw new Error(`Unimplemented type ${e.type}`)}o.globalAlpha=1},Gh=new WeakMap([]);function Uh(e){let t=nc(e),n=new Path2D(t);return Gh.set(e,n),n}function Ex(e){return Gh.get(e)}function nc(e){let t=e.simulatePressure?e.points:e.points.length?e.points.map(([r,o],i)=>[r,o,e.pressures[i]]):[[0,0,.5]],n={simulatePressure:e.simulatePressure,size:e.strokeWidth*4.25,thinning:.6,smoothing:.5,streamline:.5,easing:r=>Math.sin(r*Math.PI/2),last:!!e.lastCommittedPoint};return wx(Xp(t,n))}function Fh(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}var xx=/(\s?[A-Z]?,?-?[0-9]*\.[0-9]{0,2})(([0-9]|e|-)*)/g;function wx(e){if(!e.length)return"";let t=e.length-1;return e.reduce((n,r,o,i)=>(o===t?n.push(r,Fh(r,i[0]),"L",i[0],"Z"):n.push(r,Fh(r,i[o+1])),n),["M",e[0],"Q"]).join(" ").replace(xx,"$1")}x();function rc(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function yx(e,t,n){let r=rc(t,n);if(r===0)return rc(e,t);let o=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return o=Math.max(0,Math.min(1,o)),rc(e,bx(t,n,o))}function bx(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function Vh(e,t){return oc(e,0,e.length,t)}function oc(e,t,n,r,o){let i=o||[],a=e[t],s=e[n-1],l=0,c=1;for(let d=t+1;d<n-1;++d){let p=yx(e[d],a,s);p>l&&(l=p,c=d)}return Math.sqrt(l)>r?(oc(e,t,c+1,r,i),oc(e,c,n,r,i)):(i.length||i.push(a),i.push(s)),i}var vx=e=>[8,8+e],$h=e=>[1.5,6+e];function Mx(e){let t=e.roughness,n=Math.max(e.width,e.height),r=Math.min(e.width,e.height);return r>=20&&n>=50||r>=15&&e.roundness&&Sl(e.type)||oe(e)&&n>=50?t:Math.min(t/(n<10?3:2),2.5)}var Ze=(e,t=!1)=>{let n={seed:e.seed,strokeLineDash:e.strokeStyle==="dashed"?vx(e.strokeWidth):e.strokeStyle==="dotted"?$h(e.strokeWidth):void 0,disableMultiStroke:e.strokeStyle!=="solid",strokeWidth:e.strokeStyle!=="solid"?e.strokeWidth+.5:e.strokeWidth,fillWeight:e.strokeWidth/2,hachureGap:e.strokeWidth*4,roughness:Mx(e),stroke:e.strokeColor,preserveVertices:t||e.roughness<js.cartoonist};switch(e.type){case"rectangle":case"iframe":case"embeddable":case"diamond":case"ellipse":return n.fillStyle=e.fillStyle,n.fill=Cn(e.backgroundColor)?void 0:e.backgroundColor,e.type==="ellipse"&&(n.curveFitting=1),n;case"line":case"freedraw":return Yt(e.points)&&(n.fillStyle=e.fillStyle,n.fill=e.backgroundColor==="transparent"?void 0:e.backgroundColor),n;case"arrow":return n;default:throw new Error(`Unimplemented type ${e.type}`)}},Xh=(e,t,n)=>mt(e)&&(t||Vi(e)&&n?.get(e.id)!==!0)&&Cn(e.backgroundColor)&&Cn(e.strokeColor)?{...e,roughness:0,backgroundColor:"#d3d3d3",fillStyle:"solid"}:Io(e)?{...e,strokeColor:Cn(e.strokeColor)?"#000000":e.strokeColor,backgroundColor:Cn(e.backgroundColor)?"#f4f4f6":e.backgroundColor}:e,Yh=(e,t,n,r,o,i,a)=>{let s=ac(e,t,n,r);if(s===null)return[];switch(r){case"dot":case"circle":case"circle_outline":{let[l,c,d]=s;return delete i.strokeLineDash,[o.circle(l,c,d,{...i,fill:r==="circle_outline"?a:e.strokeColor,fillStyle:"solid",stroke:e.strokeColor,roughness:Math.min(.5,i.roughness||0)})]}case"triangle":case"triangle_outline":{let[l,c,d,p,f,h]=s;return delete i.strokeLineDash,[o.polygon([[l,c],[d,p],[f,h],[l,c]],{...i,fill:r==="triangle_outline"?a:e.strokeColor,fillStyle:"solid",roughness:Math.min(1,i.roughness||0)})]}case"diamond":case"diamond_outline":{let[l,c,d,p,f,h,m,g]=s;return delete i.strokeLineDash,[o.polygon([[l,c],[d,p],[f,h],[m,g],[l,c]],{...i,fill:r==="diamond_outline"?a:e.strokeColor,fillStyle:"solid",roughness:Math.min(1,i.roughness||0)})]}case"bar":case"arrow":default:{let[l,c,d,p,f,h]=s;if(e.strokeStyle==="dotted"){let m=$h(e.strokeWidth-1);i.strokeLineDash=[m[0],m[1]-1]}else delete i.strokeLineDash;return i.roughness=Math.min(1,i.roughness||0),[o.line(d,p,l,c,i),o.line(f,h,l,c,i)]}}},Uf=(e,t,{isExporting:n,canvasBackgroundColor:r,embedsValidationStatus:o})=>{switch(e.type){case"rectangle":case"iframe":case"embeddable":{let i;if(e.roundness){let a=e.width,s=e.height,l=En(Math.min(a,s),e);i=t.path(`M ${l} 0 L ${a-l} 0 Q ${a} 0, ${a} ${l} L ${a} ${s-l} Q ${a} ${s}, ${a-l} ${s} L ${l} ${s} Q 0 ${s}, 0 ${s-l} L 0 ${l} Q 0 0, ${l} 0`,Ze(Xh(e,n,o),!0))}else i=t.rectangle(0,0,e.width,e.height,Ze(Xh(e,n,o),!1));return i}case"diamond":{let i,[a,s,l,c,d,p,f,h]=ic(e);if(e.roundness){let m=En(Math.abs(a-f),e),g=En(Math.abs(c-s),e);i=t.path(`M ${a+m} ${s+g} L ${l-m} ${c-g}
|
|
11
|
+
C ${l} ${c}, ${l} ${c}, ${l-m} ${c+g}
|
|
12
|
+
L ${d+m} ${p-g}
|
|
13
|
+
C ${d} ${p}, ${d} ${p}, ${d-m} ${p-g}
|
|
14
|
+
L ${f+m} ${h+g}
|
|
15
|
+
C ${f} ${h}, ${f} ${h}, ${f+m} ${h-g}
|
|
16
|
+
L ${a-m} ${s+g}
|
|
17
|
+
C ${a} ${s}, ${a} ${s}, ${a+m} ${s+g}`,Ze(e,!0))}else i=t.polygon([[a,s],[l,c],[d,p],[f,h]],Ze(e));return i}case"ellipse":return t.ellipse(e.width/2,e.height/2,e.width,e.height,Ze(e));case"line":case"arrow":{let i,a=Ze(e),s=e.points.length?e.points:[[0,0]];if(ie(e)?i=[t.path(Tx(s,16),Ze(e,!0))]:e.roundness?i=[t.curve(s,a)]:a.fill?i=[t.polygon(s,a)]:i=[t.linearPath(s,a)],e.type==="arrow"){let{startArrowhead:l=null,endArrowhead:c="arrow"}=e;if(l!==null){let d=Yh(e,i,"start",l,t,a,r);i.push(...d)}if(c!==null){let d=Yh(e,i,"end",c,t,a,r);i.push(...d)}}return i}case"freedraw":{let i;if(Uh(e),Yt(e.points)){let a=Vh(e.points,.75);i=t.curve(a,{...Ze(e),stroke:"none"})}else i=null;return i}case"frame":case"magicframe":case"text":case"image":return null;default:return sr(e,`generateElementShape(): Unimplemented type ${e?.type}`),null}},Tx=(e,t)=>{let n=[];for(let o=1;o<e.length-1;o+=1){let i=e[o-1],a=e[o+1],s=Math.min(t,Math.sqrt(Zr(e[o],a))/2,Math.sqrt(Zr(e[o],i))/2);i[0]<e[o][0]&&i[1]===e[o][1]?n.push([e[o][0]-s,e[o][1]]):i[0]===e[o][0]&&i[1]<e[o][1]?n.push([e[o][0],e[o][1]-s]):i[0]>e[o][0]&&i[1]===e[o][1]?n.push([e[o][0]+s,e[o][1]]):n.push([e[o][0],e[o][1]+s]),n.push(e[o]),a[0]<e[o][0]&&a[1]===e[o][1]?n.push([e[o][0]-s,e[o][1]]):a[0]===e[o][0]&&a[1]<e[o][1]?n.push([e[o][0],e[o][1]-s]):a[0]>e[o][0]&&a[1]===e[o][1]?n.push([e[o][0]+s,e[o][1]]):n.push([e[o][0],e[o][1]+s])}let r=[`M ${e[0][0]} ${e[0][1]}`];for(let o=0;o<n.length;o+=3)r.push(`L ${n[o][0]} ${n[o][1]}`),r.push(`Q ${n[o+1][0]} ${n[o+1][1]}, ${n[o+2][0]} ${n[o+2][1]}`);return r.push(`L ${e[e.length-1][0]} ${e[e.length-1][1]}`),r.join(" ")};var sc=class e{static boundsCache=new WeakMap;static getBounds(t,n){let r=e.boundsCache.get(t);if(r?.version&&r.version===t.version&&!ke(t))return r.bounds;let o=e.calculateBounds(t,n);return e.boundsCache.set(t,{version:t.version,bounds:o}),o}static calculateBounds(t,n){let r,[o,i,a,s,l,c]=H(t,n);if(Se(t)){let[d,p,f,h]=cc(t.points.map(([m,g])=>j(m,g,l-t.x,c-t.y,t.angle)));return[d+t.x,p+t.y,f+t.x,h+t.y]}else if(oe(t))r=kx(t,l,c,n);else if(t.type==="diamond"){let[d,p]=j(l,i,l,c,t.angle),[f,h]=j(l,s,l,c,t.angle),[m,g]=j(o,c,l,c,t.angle),[E,w]=j(a,c,l,c,t.angle),y=Math.min(d,f,m,E),b=Math.min(p,h,g,w),T=Math.max(d,f,m,E),A=Math.max(p,h,g,w);r=[y,b,T,A]}else if(t.type==="ellipse"){let d=(a-o)/2,p=(s-i)/2,f=Math.cos(t.angle),h=Math.sin(t.angle),m=Math.hypot(d*f,p*h),g=Math.hypot(p*f,d*h);r=[l-m,c-g,l+m,c+g]}else{let[d,p]=j(o,i,l,c,t.angle),[f,h]=j(o,s,l,c,t.angle),[m,g]=j(a,s,l,c,t.angle),[E,w]=j(a,i,l,c,t.angle),y=Math.min(d,f,m,E),b=Math.min(p,h,g,w),T=Math.max(d,f,m,E),A=Math.max(p,h,g,w);r=[y,b,T,A]}return r}},H=(e,t,n=!1)=>{if(Se(e))return Sx(e);if(oe(e))return J.getElementAbsoluteCoords(e,t,n);if(Y(e)){let r=t?_e(e,t):null;if(Z(r)){let o=J.getBoundTextElementPosition(r,e,t);return[o.x,o.y,o.x+e.width,o.y+e.height,o.x+e.width/2,o.y+e.height/2]}}return[e.x,e.y,e.x+e.width,e.y+e.height,e.x+e.width/2,e.y+e.height/2]},lc=(e,t)=>{let[n,r,o,i,a,s]=H(e,t),l=[a,s];if(oe(e)||Se(e)){let w=[],y=0;for(;y<e.points.length-1;)w.push([N([e.points[y][0]+e.x,e.points[y][1]+e.y],l,e.angle),N([e.points[y+1][0]+e.x,e.points[y+1][1]+e.y],l,e.angle)]),y++;return w}let[c,d,p,f,h,m,g,E]=[[n,r],[o,r],[n,i],[o,i],[a,r],[a,i],[n,s],[o,s]].map(w=>N(w,l,e.angle));return e.type==="diamond"?[[h,g],[h,E],[m,g],[m,E]]:e.type==="ellipse"?[[h,g],[h,E],[m,g],[m,E],[h,g],[h,E],[m,g],[m,E]]:[[c,d],[p,f],[c,p],[d,f],[c,E],[p,E],[d,g],[f,g]]};var ic=e=>{let t=Math.floor(e.width/2)+1,n=0,r=e.width,o=Math.floor(e.height/2)+1,i=t,a=e.height;return[t,n,r,o,i,a,0,o]},Xn=e=>{for(let t of e.sets)if(t.type==="path")return t.ops;return e.sets[0].ops},Zh=(e,t,n,r,o)=>{let i=1-e;return Math.pow(i,3)*t+3*Math.pow(i,2)*e*n+3*i*Math.pow(e,2)*r+Math.pow(e,3)*o},Kh=(e,t,n,r)=>{let o=t-e,i=n-t,a=r-n,s=3*o-6*i+3*a,l=6*i-6*o,c=3*o,d=l*l-4*s*c;if(!(d>=0))return!1;let f=null,h=null,m=1/0,g=1/0;return s===0?m=g=-c/l:(m=(-l+Math.sqrt(d))/(2*s),g=(-l-Math.sqrt(d))/(2*s)),m>=0&&m<=1&&(f=Zh(m,e,t,n,r)),g>=0&&g<=1&&(h=Zh(g,e,t,n,r)),[f,h]},Ax=(e,t,n,r)=>{let o=Kh(e[0],t[0],n[0],r[0]),i=Kh(e[1],t[1],n[1],r[1]),a=Math.min(e[0],r[0]),s=Math.max(e[0],r[0]);if(o){let d=o.filter(p=>p!==null);a=Math.min(a,...d),s=Math.max(s,...d)}let l=Math.min(e[1],r[1]),c=Math.max(e[1],r[1]);if(i){let d=i.filter(p=>p!==null);l=Math.min(l,...d),c=Math.max(c,...d)}return[a,l,s,c]},$o=(e,t)=>{let n=[0,0],{minX:r,minY:o,maxX:i,maxY:a}=e.reduce((s,{op:l,data:c})=>{if(l==="move")n=c;else if(l==="bcurveTo"){let d=[c[0],c[1]],p=[c[2],c[3]],f=[c[4],c[5]],h=t?t(...d):d,m=t?t(...p):p,g=t?t(...f):f,E=t?t(...n):n;n=f;let[w,y,b,T]=Ax(E,h,m,g);s.minX=Math.min(s.minX,w),s.minY=Math.min(s.minY,y),s.maxX=Math.max(s.maxX,b),s.maxY=Math.max(s.maxY,T)}return s},{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0});return[r,o,i,a]},cc=e=>{let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let[i,a]of e)t=Math.min(t,i),n=Math.min(n,a),r=Math.max(r,i),o=Math.max(o,a);return[t,n,r,o]},Sx=e=>{let[t,n,r,o]=cc(e.points),i=t+e.x,a=n+e.y,s=r+e.x,l=o+e.y;return[i,a,s,l,(i+s)/2,(a+l)/2]},Ix=e=>{switch(e){case"arrow":return 25;case"diamond":case"diamond_outline":return 12;default:return 15}},Px=e=>{switch(e){case"bar":return 90;case"arrow":return 20;default:return 25}},ac=(e,t,n,r)=>{let o=Xn(t[0]);if(o.length<1)return null;let i=n==="start"?1:o.length-1,a=o[i].data,s=[a[4],a[5]],l=[a[2],a[3]],c=[a[0],a[1]],d=o[i-1],p=[0,0];d.op==="move"?p=d.data:d.op==="bcurveTo"&&(p=[d.data[4],d.data[5]]);let f=(X,U)=>Math.pow(1-X,3)*s[U]+3*X*Math.pow(1-X,2)*l[U]+3*Math.pow(X,2)*(1-X)*c[U]+p[U]*Math.pow(X,3),[h,m]=n==="start"?p:s,[g,E]=[f(.3,0),f(.3,1)],w=Math.hypot(h-g,m-E),y=(h-g)/w,b=(m-E)/w,T=Ix(r),A=0;{let[X,U]=n==="end"?e.points[e.points.length-1]:e.points[0],[F,K]=e.points.length>1?n==="end"?e.points[e.points.length-2]:e.points[1]:[0,0];A=Math.hypot(X-F,U-K)}let P=Math.min(T,A*(r==="diamond"||r==="diamond_outline"?.25:.5)),I=h-y*P,_=m-b*P;if(r==="dot"||r==="circle"||r==="circle_outline"){let X=Math.hypot(_-m,I-h)+e.strokeWidth-2;return[h,m,X]}let D=Px(r),[S,L]=j(I,_,h,m,-D*Math.PI/180),[O,G]=j(I,_,h,m,D*Math.PI/180);if(r==="diamond"||r==="diamond_outline"){let X,U;if(n==="start"){let[F,K]=e.points.length>1?e.points[1]:[0,0];[X,U]=j(h+P*2,m,h,m,Math.atan2(K-m,F-h))}else{let[F,K]=e.points.length>1?e.points[e.points.length-2]:[0,0];[X,U]=j(h-P*2,m,h,m,Math.atan2(m-K,h-F))}return[h,m,S,L,X,U,O,G]}return[h,m,S,L,O,G]},_x=e=>{let t=Xt.generator(),n=Ze(e),r=e.roundness?"curve":n.fill?"polygon":"linearPath";return t[r](e.points,n)},kx=(e,t,n,r)=>{let o=ee(e,r);if(e.points.length<2){let[p,f]=e.points[0],[h,m]=j(e.x+p,e.y+f,t,n,e.angle),g=[h,m,h,m];if(o){let E=J.getMinMaxXYWithBoundText(e,r,[h,m,h,m],o);g=[E[0],E[1],E[2],E[3]]}return g}let a=ce.get(e)?.[0]??_x(e),s=Xn(a),c=$o(s,(p,f)=>j(e.x+p,e.y+f,t,n,e.angle)),d=[c[0],c[1],c[2],c[3]];if(o){let p=J.getMinMaxXYWithBoundText(e,r,d,o);d=[p[0],p[1],p[2],p[3]]}return d},Qe=(e,t)=>sc.getBounds(e,t),Oe=e=>{if(!e.length)return[0,0,0,0];let t=1/0,n=-1/0,r=1/0,o=-1/0,i=Q(e);return e.forEach(a=>{let[s,l,c,d]=Qe(a,i);t=Math.min(t,s),r=Math.min(r,l),n=Math.max(n,c),o=Math.max(o,d)}),[t,r,n,o]},II=(e,t)=>{let[n,r,o,i]=Oe(e);return[n+t.x,r+t.y,o+t.x,i+t.y]},xn=(e,t,n,r)=>{if(!(oe(e)||Se(e)))return[e.x,e.y,e.x+t,e.y+n];let o=Wn(0,t,Wn(1,n,e.points,r),r),i;if(Se(e))i=cc(o);else{let d=Xt.generator(),p=e.roundness?d.curve(o,Ze(e)):d.linearPath(o,Ze(e)),f=Xn(p);i=$o(f)}let[a,s,l,c]=i;return[a+e.x,s+e.y,l+e.x,c+e.y]},Xl=(e,t)=>{let n=Xt.generator(),r=e.roundness==null?n.linearPath(t,Ze(e)):n.curve(t,Ze(e)),o=Xn(r),[i,a,s,l]=$o(o);return[i+e.x,a+e.y,s+e.x,l+e.y]},Tl=(e,t)=>{if(!e.length)return[0,0,0,0];let n=1/0,r=e[0],o=Q(e);return e.forEach(i=>{let[a,s,l,c]=Qe(i,o),d=Je((a+l)/2,(s+c)/2,t.x,t.y);d<n&&(n=d,r=i)}),Qe(r,o)},jh=e=>{let[t,n,r,o]=Oe(e);return{minX:t,minY:n,maxX:r,maxY:o,width:r-t,height:o-n,midX:(t+r)/2,midY:(n+o)/2}},PI=({scrollX:e,scrollY:t,width:n,height:r,zoom:o})=>[-e,-t,-e+n/o.value,-t+r/o.value];var j=(e,t,n,r,o)=>[(e-n)*Math.cos(o)-(t-r)*Math.sin(o)+n,(e-n)*Math.sin(o)+(t-r)*Math.cos(o)+r],N=(e,t,n)=>j(e[0],e[1],t[0],t[1],n),qh=(e,t,n,r,o,i,a,s)=>{let l=Math.cos(r),c=Math.sin(r);return e.e&&e.w?t+=o+a:e.e?(t+=o*(1+l),n+=o*c,t+=a*(1-l),n+=a*-c):e.w&&(t+=o*(1-l),n+=o*-c,t+=a*(1+l),n+=a*c),e.n&&e.s?n+=i+s:e.n?(t+=i*c,n+=i*(1-l),t+=s*-c,n+=s*(1+l)):e.s&&(t+=i*-c,n+=i*(1+l),t+=s*c,n+=s*(1-l)),[t,n]};var Je=(e,t,n,r)=>{let o=n-e,i=r-t;return Math.hypot(o,i)},Zr=(e,t)=>{let n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r},Kr=(e,t)=>[(e[0]+t[0])/2,(e[1]+t[1])/2],Yt=(e,t=1)=>{if(e.length>=3){let[n,r]=[e[0],e[e.length-1]];return Je(n[0],n[1],r[0],r[1])<=ju/t}return!1};var ha=(e,t,n)=>t[0]<=Math.max(e[0],n[0])&&t[0]>=Math.min(e[0],n[0])&&t[1]<=Math.max(e[1],n[1])&&t[1]>=Math.min(e[1],n[1]);var Yo=(e,t,n)=>n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t],En=(e,t)=>{if(t.roundness?.type===je.PROPORTIONAL_RADIUS||t.roundness?.type===je.LEGACY)return e*Ni;if(t.roundness?.type===je.ADAPTIVE_RADIUS){let n=t.roundness?.value??rp,r=n/Ni;return e<=r?e*Ni:n}return 0},Yl=(e,t)=>{let n=ce.generateElementShape(e,null);if(!n)return null;let r=Xn(n[0]),o=[0,0],i=0,a=1/0,s=null;for(;i<r.length;){let{op:l,data:c}=r[i];if(l==="move"&&(o=c),l==="bcurveTo"){let d=o,p=[c[0],c[1]],f=[c[2],c[3]],h=[c[4],c[5]],m=Je(h[0],h[1],t[0],t[1]);m<a&&(a=m,s=[d,p,f,h]),o=h}i++}return s},$l=(e,t,n,r,o)=>{let i=(l,c)=>Math.pow(1-l,3)*r[c]+3*l*Math.pow(1-l,2)*n[c]+3*Math.pow(l,2)*(1-l)*t[c]+e[c]*Math.pow(l,3),a=i(o,0),s=i(o,1);return[a,s]},Lx=(e,t)=>{let n=Yl(e,t);if(!n)return[];let r=[],o=1;for(;o>0;){let i=$l(n[0],n[1],n[2],n[3],o);r.push([i[0],i[1]]),o-=.05}return r.length&&Tt(r.at(-1),t)&&r.push([t[0],t[1]]),r},Jh=(e,t)=>{let n=[];n[0]=0;let r=Lx(e,t),o=0,i=0;for(;o<r.length-1;){let a=Je(r[o][0],r[o][1],r[o+1][0],r[o+1][1]);i+=a,n.push(i),o++}return n},dh=(e,t)=>Jh(e,t).at(-1),uh=(e,t,n)=>{let r=Jh(e,t),o=r.length-1,i=r.at(-1),a=n*i,s=0,l=o,c=0;for(;s<l;)c=Math.floor(s+(l-s)/2),r[c]<a?s=c+1:l=c;return r[c]>a&&c--,r[c]===a?c/o:1-(c+(a-r[c])/(r[c+1]-r[c]))/o},Tt=(e,t)=>e[0]===t[0]&&e[1]===t[1],Wh=e=>Math.round(e/Math.PI*1e4)%5e3===0,RI=e=>e*180/Math.PI,FI=e=>e/180*Math.PI,OI=([e,t],[n,r])=>e<=n?t>=n:e>=n?r>=e:!1,NI=(e,t)=>{let n=Math.max(e[0],t[0]),r=Math.min(e[1],t[1]);return n<=r?[n,r]:null},qo=(e,t,n)=>e>=t&&e<=n,Aa=(e,t)=>[e[0]+t[0],e[1]+t[1]],Vl=(e,t)=>[e[0]*t,e[1]*t],fn=(e,t=[0,0])=>[e[0]-t[0],e[1]-t[1]],Mt=(e,t,n)=>Aa(t,Vl(fn(e,t),n)),dc=(e,t,n)=>(e[0]-n[0])*(t[1]-n[1])-(t[0]-n[0])*(e[1]-n[1]),mr=(e,t,n,r)=>{let o=dc(e,t,n),i=dc(e,n,r),a=dc(e,r,t),s=o<0||i<0||a<0,l=o>0||i>0||a>0;return!(s&&l)};var Un=(e,t)=>e[0]>t[0]&&e[0]<t[2]&&e[1]>t[1]&&e[1]<t[3],hn=(e,t)=>{let n={minX:e.x,minY:e.y,maxX:e.x+e.width,maxY:e.y+e.height,midX:e.x+e.width/2,midY:e.y+e.height/2},r=[n.midX,n.midY],[o,i]=N([n.minX,n.minY],r,e.angle),[a,s]=N([n.maxX,n.minY],r,e.angle),[l,c]=N([n.maxX,n.maxY],r,e.angle),[d,p]=N([n.minX,n.maxY],r,e.angle),f=[Math.min(o,a,l,d),Math.min(i,s,c,p),Math.max(o,a,l,d),Math.max(i,s,c,p)];if(t){let[h,m,g,E]=t;return[f[0]-E,f[1]-h,f[2]+m,f[3]+g]}return f};var xa=e=>[e[0]+(e[2]-e[0])/2,e[1]+(e[3]-e[1])/2],Ma=e=>[e.x+e.width/2,e.y+e.height/2];var Fl=(e,t,n)=>Math.min(Math.max(e,t),n);x();var Cx=(e,t,n)=>{let r=n.reduce((o,i)=>(i.groupIds.includes(e)&&(o[i.id]=!0),o),{});return Object.keys(r).length<2?t.selectedGroupIds[e]||t.editingGroupId===e?{selectedElementIds:t.selectedElementIds,selectedGroupIds:{...t.selectedGroupIds,[e]:!1},editingGroupId:null}:t:{editingGroupId:t.editingGroupId,selectedGroupIds:{...t.selectedGroupIds,[e]:!0},selectedElementIds:{...t.selectedElementIds,...r}}},WI=function(){let e=null,t=null,n=null,r=(i,a,s,l)=>{if(n!==void 0&&a===t&&i===e&&s.editingGroupId===n?.editingGroupId)return n;let c={};for(let f of i){let h=f.groupIds;if(s.editingGroupId){let m=h.indexOf(s.editingGroupId);m>-1&&(h=h.slice(0,m))}if(h.length>0){let m=h[h.length-1];c[m]=!0}}let d={},p=a.reduce((f,h)=>{let m=h.groupIds.find(g=>c[g]);return m&&(f[h.id]=!0,Array.isArray(d[m])?d[m].push(h.id):d[m]=[h.id]),f},{});for(let f of Object.keys(d))d[f].length<2&&c[f]&&(c[f]=!1);return t=a,e=i,n={editingGroupId:s.editingGroupId,selectedGroupIds:c,selectedElementIds:uc({...s.selectedElementIds,...p},l)},n},o=(i,a,s,l)=>{let c=l?l.scene.getSelectedElements({selectedElementIds:i.selectedElementIds,elements:a}):bt(a,i);return c.length?r(c,a,i,s):{selectedGroupIds:{},editingGroupId:null,selectedElementIds:uc(i.selectedElementIds,s)}};return o.clearCache=()=>{t=null,e=null,n=null},o}(),VI=(e,t)=>Dx(e,t)!=null,Dx=(e,t)=>t.groupIds.filter(n=>n!==e.editingGroupId).find(n=>e.selectedGroupIds[n]),XI=e=>Object.entries(e.selectedGroupIds).filter(([t,n])=>n).map(([t,n])=>t),Qh=(e,t)=>{let n={...t,selectedGroupIds:{}};for(let r of e){let o=r.groupIds;if(t.editingGroupId){let i=o.indexOf(t.editingGroupId);i>-1&&(o=o.slice(0,i))}if(o.length>0){let i=o[o.length-1];n={...n,...Cx(i,n,e)}}}return n.selectedGroupIds},YI=(e,t)=>({...e,editingGroupId:t.groupIds.length?t.groupIds[0]:null,selectedGroupIds:{},selectedElementIds:{[t.id]:!0}}),Rx=(e,t)=>e.groupIds.includes(t),Jr=(e,t)=>{let n=[];for(let r of e.values())Rx(r,t)&&n.push(r);return n},$I=(e,t)=>e.groupIds.find(n=>t[n]),e1=(e,t,n)=>{let r=[...e],o=t?e.indexOf(t):-1,i=o>-1?o:e.length;for(let a=0;a<i;a++)r[a]=n(r[a]);return r},ZI=(e,t,n)=>{let r=[...e],o=n?r.indexOf(n):-1,i=o>-1?o:r.length;return r.splice(i,0,t),r},KI=(e,t)=>e.filter(n=>!t[n]),jI=(e,t)=>{let n=new Map;return e.forEach(r=>{let o=r.groupIds.length===0?r.id:r.groupIds[r.groupIds.length-1],i=n.get(o)||[],a=ee(r,t);a&&i.push(a),n.set(o,[...i,r])}),Array.from(n.values())},t1=e=>{let t=new Set;for(let[,n]of e)if(!n.isDeleted)for(let r of n.groupIds??[])t.add(r);return t},qI=e=>{let t=e.flatMap(o=>o.groupIds),n=new Map,r=0;for(let o of t)n.set(o,(n.get(o)??0)+1),n.get(o)>r&&(r=n.get(o));return r===e.length},n1=e=>e.groupIds.length>0;x();x();x();x();x();var o1=An(r1(),1),Fa=e=>e.replace(/"/g,"""),Qr=e=>(e=e.trim(),e&&(0,o1.sanitizeUrl)(Fa(e))),nP=e=>!!(e?.includes(location.origin)||e?.startsWith("/")),i1=e=>{if(e=Qr(e),e.startsWith("/"))return`${location.origin}${e}`;try{new URL(e)}catch{return"about:blank"}return e};x();x();var a1=[],s1=e=>(a1=a1.concat(e),e);x();var c1='<svg viewBox="0 0 24 24" stroke-width="1" width="28" height="28" xmlns="http://www.w3.org/2000/svg">',Vx='<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"/>',d1='<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"/>',Xx=`data:${W.svg},${encodeURIComponent(`${c1}${d1}</svg>`)}`,Yx=`data:${W.svg},${encodeURIComponent(`${c1}${Vx}${d1}</svg>`)}`,$x=e=>{e&&(e.style.cursor="")},Zx=(e,t)=>{e&&(e.style.cursor=t)},jt,l1,Kx=(e,t)=>{let r=()=>{let o=t===Fe.DARK;jt=document.createElement("canvas"),jt.theme=t,jt.height=20,jt.width=20;let i=jt.getContext("2d");i.lineWidth=1,i.beginPath(),i.arc(jt.width/2,jt.height/2,5,0,2*Math.PI),i.fillStyle=o?an.black:an.white,i.fill(),i.strokeStyle=o?an.white:an.black,i.stroke(),l1=jt.toDataURL(W.svg)};(!jt||jt.theme!==t)&&r(),Zx(e,`url(${l1}) ${20/2} ${20/2}, auto`)},u1=(e,t)=>{if(e)if(t.activeTool.type==="selection")$x(e);else if(dp(t))e.style.cursor=Ci.GRAB;else if(cp(t))Kx(e,t.theme);else if(t.activeTool.type==="laser"){let n=t.theme===Fe.LIGHT?Xx:Yx;e.style.cursor=`url(${n}), auto`}else["image","custom"].includes(t.activeTool.type)?t.activeTool.type!=="image"&&(e.style.cursor=Ci.AUTO):e.style.cursor=Ci.CROSSHAIR};x();x();var jx=new Br(Date.now()),qx=0,qt=()=>Math.floor(jx.next()*2**31);var It=()=>dn()?`id${qx++}`:Bi();var Jt=(e,{x:t,y:n,strokeColor:r=fe.strokeColor,backgroundColor:o=fe.backgroundColor,fillStyle:i=fe.fillStyle,strokeWidth:a=fe.strokeWidth,strokeStyle:s=fe.strokeStyle,roughness:l=fe.roughness,opacity:c=fe.opacity,width:d=0,height:p=0,angle:f=0,groupIds:h=[],frameId:m=null,index:g=null,roundness:E=null,boundElements:w=null,link:y=null,locked:b=fe.locked,...T})=>({id:T.id||It(),type:e,x:t,y:n,width:d,height:p,angle:f,strokeColor:r,backgroundColor:o,fillStyle:i,strokeWidth:a,strokeStyle:s,roughness:l,opacity:c,groupIds:h,frameId:m,index:g,roundness:E,seed:T.seed??qt(),version:T.version||1,versionNonce:T.versionNonce??0,isDeleted:!1,boundElements:w,updated:cn(),link:y,locked:b,customData:T.customData}),Jo=e=>Jt(e.type,e),IP=e=>Jt("embeddable",e),PP=e=>({...Jt("iframe",e)}),_P=e=>Pt({...Jt("frame",e),type:"frame",name:e?.name||null},{}),kP=e=>Pt({...Jt("magicframe",e),type:"magicframe",name:e?.name||null},{}),p1=(e,t)=>({x:e.textAlign==="center"?t.width/2:e.textAlign==="right"?t.width:0,y:e.verticalAlign==="middle"?t.height/2:0}),Qt=e=>{let t=e.fontFamily||zt,n=e.fontSize||Ht,r=e.lineHeight||La(t),o=ql(e.text),i=Kt(o,he({fontFamily:t,fontSize:n}),r),a=e.textAlign||Or,s=e.verticalAlign||Ri,l=p1({textAlign:a,verticalAlign:s},i),c={...Jt("text",e),text:o,fontSize:n,fontFamily:t,textAlign:a,verticalAlign:s,x:e.x-l.x,y:e.y-l.y,width:i.width,height:i.height,containerId:e.containerId||null,originalText:e.originalText??o,autoResize:e.autoResize??!0,lineHeight:r};return Pt(c,{})},Jx=(e,t,n)=>{let{width:r,height:o}=Kt(n,he(e),e.lineHeight);e.autoResize||(r=e.width);let{textAlign:i,verticalAlign:a}=e,s,l;if(i==="center"&&a===sn.MIDDLE&&!e.containerId&&e.autoResize){let c=Kt(e.text,he(e),e.lineHeight),d=p1(e,{width:r-c.width,height:o-c.height});s=e.x-d.x,l=e.y-d.y}else{let[c,d,p,f]=H(e,t),[h,m,g,E]=xn(e,r,o,!1),w=(c-h)/2,y=(d-m)/2,b=(p-g)/2,T=(f-E)/2;[s,l]=qh({s:!0,e:i==="center"||i==="left",w:i==="center"||i==="right"},e.x,e.y,e.angle,w,y,b,T)}return{width:r,height:o,x:Number.isFinite(s)?s:e.x,y:Number.isFinite(l)?l:e.y}},pc=(e,t,n,r=e.text)=>{if(e.isDeleted)return;(t||!e.autoResize)&&(r=Yn(r,he(e),t?At(t,e):e.width));let o=Jx(e,n,r);return{text:r,...o}},LP=e=>({...Jt(e.type,e),points:e.points||[],pressures:[],simulatePressure:e.simulatePressure,lastCommittedPoint:null}),yr=e=>({...Jt(e.type,e),points:e.points||[],lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:null,endArrowhead:null}),Qx=e=>({...Jt(e.type,e),points:e.points||[],lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:e.startArrowhead||null,endArrowhead:e.endArrowhead||null,elbowed:e.elbowed||!1}),ew=e=>({...Jt("image",e),strokeColor:"transparent",status:e.status??"pending",fileId:e.fileId??null,scale:e.scale??[1,1]}),Oa=(e,t=0)=>{if(e==null||typeof e!="object")return e;let n=Object.prototype.toString.call(e);if(n==="[object Object]"){let r=typeof e.constructor=="function"?Object.create(Object.getPrototypeOf(e)):{};for(let o in e)if(e.hasOwnProperty(o)){if(t===0&&(o==="shape"||o==="canvas"))continue;r[o]=Oa(e[o],t+1)}return r}if(Array.isArray(e)){let r=e.length,o=new Array(r);for(;r--;)o[r]=Oa(e[r],t+1);return o}return M.DEV&&n!=="[object Object]"&&n!=="[object Array]"&&n.startsWith("[object ")&&console.warn(`_deepCloneElement: unexpected object type ${n}. This value will not be cloned!`),e},Qo=e=>Oa(e),Na=e=>{if(dn()&&e){let t=`${e}_copy`;return window.h?.app?.getSceneElementsIncludingDeleted().find(n=>n.id===t)&&(t+="_copy"),t}return It()},tw=(e,t,n,r)=>{let o=Qo(n);return o.id=Na(o.id),o.boundElements=null,o.updated=cn(),o.seed=qt(),o.groupIds=e1(o.groupIds,e,i=>(t.has(i)||t.set(i,Na(i)),t.get(i))),r&&(o=Object.assign(o,r)),o},CP=(e,t)=>{let n=[],r=Q(e),o=new Map,i=s=>{if(o.has(s))return o.get(s);if(r.has(s)){let l=Na(s);return o.set(s,l),l}return null},a=new Map;for(let s of e){let l=Oa(s);if(l.id=i(s.id),t?.randomizeSeed&&(l.seed=qt(),ei(l)),l.groupIds&&(l.groupIds=l.groupIds.map(c=>(a.has(c)||a.set(c,Na(c)),a.get(c)))),"containerId"in l&&l.containerId){let c=i(l.containerId);l.containerId=c}if("boundElements"in l&&l.boundElements&&(l.boundElements=l.boundElements.reduce((c,d)=>{let p=i(d.id);return p&&c.push({...d,id:p}),c},[])),"endBinding"in l&&l.endBinding){let c=i(l.endBinding.elementId);l.endBinding=c?{...l.endBinding,elementId:c}:null}if("startBinding"in l&&l.startBinding){let c=i(l.startBinding.elementId);l.startBinding=c?{...l.startBinding,elementId:c}:null}l.frameId&&(l.frameId=i(l.frameId)),n.push(l)}return n};x();x();x();x();var m1="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function to(e,t,n){let r=n[0];if(t!=null&&e>=t)throw new Error(e+" >= "+t);if(e.slice(-1)===r||t&&t.slice(-1)===r)throw new Error("trailing zero");if(t){let a=0;for(;(e[a]||r)===t[a];)a++;if(a>0)return t.slice(0,a)+to(e.slice(a),t.slice(a),n)}let o=e?n.indexOf(e[0]):0,i=t!=null?n.indexOf(t[0]):n.length;if(i-o>1){let a=Math.round(.5*(o+i));return n[a]}else return t&&t.length>1?t.slice(0,1):n[o]+to(e.slice(1),null,n)}function g1(e){if(e.length!==E1(e[0]))throw new Error("invalid integer part of order key: "+e)}function E1(e){if(e>="a"&&e<="z")return e.charCodeAt(0)-97+2;if(e>="A"&&e<="Z")return 90-e.charCodeAt(0)+2;throw new Error("invalid order key head: "+e)}function ti(e){let t=E1(e[0]);if(t>e.length)throw new Error("invalid order key: "+e);return e.slice(0,t)}function f1(e,t){if(e==="A"+t[0].repeat(26))throw new Error("invalid order key: "+e);let n=ti(e);if(e.slice(n.length).slice(-1)===t[0])throw new Error("invalid order key: "+e)}function h1(e,t){g1(e);let[n,...r]=e.split(""),o=!0;for(let i=r.length-1;o&&i>=0;i--){let a=t.indexOf(r[i])+1;a===t.length?r[i]=t[0]:(r[i]=t[a],o=!1)}if(o){if(n==="Z")return"a"+t[0];if(n==="z")return null;let i=String.fromCharCode(n.charCodeAt(0)+1);return i>"a"?r.push(t[0]):r.pop(),i+r.join("")}else return n+r.join("")}function nw(e,t){g1(e);let[n,...r]=e.split(""),o=!0;for(let i=r.length-1;o&&i>=0;i--){let a=t.indexOf(r[i])-1;a===-1?r[i]=t.slice(-1):(r[i]=t[a],o=!1)}if(o){if(n==="a")return"Z"+t.slice(-1);if(n==="A")return null;let i=String.fromCharCode(n.charCodeAt(0)-1);return i<"Z"?r.push(t.slice(-1)):r.pop(),i+r.join("")}else return n+r.join("")}function eo(e,t,n=m1){if(e!=null&&f1(e,n),t!=null&&f1(t,n),e!=null&&t!=null&&e>=t)throw new Error(e+" >= "+t);if(e==null){if(t==null)return"a"+n[0];let l=ti(t),c=t.slice(l.length);if(l==="A"+n[0].repeat(26))return l+to("",c,n);if(l<t)return l;let d=nw(l,n);if(d==null)throw new Error("cannot decrement any more");return d}if(t==null){let l=ti(e),c=e.slice(l.length),d=h1(l,n);return d??l+to(c,null,n)}let r=ti(e),o=e.slice(r.length),i=ti(t),a=t.slice(i.length);if(r===i)return r+to(o,a,n);let s=h1(r,n);if(s==null)throw new Error("cannot increment any more");return s<t?s:r+to(o,null,n)}function Ba(e,t,n,r=m1){if(n===0)return[];if(n===1)return[eo(e,t,r)];if(t==null){let a=eo(e,t,r),s=[a];for(let l=0;l<n-1;l++)a=eo(a,t,r),s.push(a);return s}if(e==null){let a=eo(e,t,r),s=[a];for(let l=0;l<n-1;l++)a=eo(e,a,r),s.push(a);return s.reverse(),s}let o=Math.floor(n/2),i=eo(e,t,r);return[...Ba(e,i,o,r),i,...Ba(i,t,n-o-1,r)]}x();var Ha=class extends Error{constructor(t="Couldn't export canvas.",n="CANVAS_ERROR"){super(),this.name=n,this.message=t}},za=class extends DOMException{constructor(t="Request Aborted"){super(t,"AbortError")}},wn=class extends Error{code;constructor(t="Image Scene Data Error",n="IMAGE_SCENE_DATA_ERROR"){super(t),this.name="EncodingError",this.code=n}},Ga=class extends Error{code="ELEMENT_HAS_INVALID_INDEX"};var hc=(e,{shouldThrow:t=!1,includeBoundTextValidation:n=!1,reconciliationContext:r})=>{let o=[],i=s=>`${s?.index}:${s?.id}:${s?.type}:${s?.isDeleted}:${s?.version}:${s?.versionNonce}`,a=e.map(s=>s.index);for(let[s,l]of a.entries()){let c=a[s-1],d=a[s+1];if(fc(l,c,d)||o.push(`Fractional indices invariant has been compromised: "${i(e[s-1])}", "${i(e[s])}", "${i(e[s+1])}"`),n&&Dn(e[s])){let p=e[s],f=ee(p,Q(e));f&&f.index<=p.index&&o.push(`Fractional indices invariant for bound elements has been compromised: "${i(f)}", "${i(p)}"`)}}if(o.length){let s=new Ga,l=[];if(r&&(l.push("Additional reconciliation context:"),l.push(r.localElements.map(c=>i(c))),l.push(r.remoteElements.map(c=>i(c)))),console.error(o.join(`
|
|
18
|
+
|
|
19
|
+
`),s.stack,e.map(c=>i(c)),...l),t)throw s}},w1=e=>e.sort((t,n)=>x1(t)&&x1(n)?t.index<n.index?-1:t.index>n.index?1:t.id<n.id?-1:1:1),ni=(e,t)=>{try{let n=rw(e,t),r=y1(e,n),o=e.map(i=>r.has(i)?{...i,...r.get(i)}:i);hc(o,{includeBoundTextValidation:!1,shouldThrow:!0});for(let[i,a]of r)B(i,a,!1)}catch{br(e)}return e},br=e=>{let t=ow(e),n=y1(e,t);for(let[r,o]of n)B(r,o,!1);return e},rw=(e,t)=>{let n=[],r=0;for(;r<e.length;)if(t.has(e[r].id)){let o=[r-1,r];for(;++r<e.length&&t.has(e[r].id);)o.push(r);o.push(r),n.push(o)}else r++;return n},ow=e=>{let t=[],n,r,o=-1,i=0,a=c=>{let d=e[o]?e[o].index:void 0,p=e[c-1]?.index;return!d&&p||d&&p&&p>d?[p,c-1]:[d,o]},s=c=>{let d=e[i]?e[i].index:void 0;if(d&&c<i)return[d,i];let p=i;for(;++p<e.length;){let f=e[p]?.index;if(!d&&f||d&&f&&f>d)return[f,p]}return[void 0,p]},l=0;for(;l<e.length;){let c=e[l].index;if([n,o]=a(l),[r,i]=s(l),fc(c,n,r))l++;else{let d=[o,l];for(;++l<e.length;){let p=e[l].index,[f,h]=a(l),[m,g]=s(l);if(fc(p,f,m))break;[n,o]=[f,h],[r,i]=[m,g],d.push(l)}d.push(i),t.push(d)}}return t},fc=(e,t,n)=>e?t&&n?t<e&&e<n:!t&&n?e<n:t&&!n?t<e:!!e:!1,y1=(e,t)=>{let n=new Map;for(let r of t){let o=r.shift(),i=r.pop(),a=Ba(e[o]?.index,e[i]?.index,r.length);for(let s=0;s<r.length;s++){let l=e[r[s]];n.set(l,{index:a[s]})}}return n},x1=e=>!!e.index;var xe=class e{constructor(t,n){this.deleted=t;this.inserted=n}static create(t,n,r,o){let i=r&&o!=="inserted"?r(t):t,a=r&&o!=="deleted"?r(n):n;return new e(i,a)}static calculate(t,n,r,o){if(t===n)return e.empty();let i={},a={};for(let c of this.distinctKeysIterator("full",t,n))i[c]=t[c],a[c]=n[c];let[s,l]=o?o(i,a):[i,a];return e.create(s,l,r)}static empty(){return new e({},{})}static isEmpty(t){return!Object.keys(t.deleted).length&&!Object.keys(t.inserted).length}static mergeObjects(t,n,r){let o={...t};for(let i of Object.keys(r))delete o[i];return{...o,...n}}static mergeArrays(t,n,r,o){return Object.values(e.mergeObjects(Gt(t??[],o),Gt(n??[],o),Gt(r??[],o)))}static diffObjects(t,n,r,o){if(!(!t[r]&&!n[r])&&(typeof t[r]=="object"||typeof n[r]=="object")){let i=t[r]??{},a=n[r]??{},s=e.getLeftDifferences(i,a).reduce((c,d)=>(c[d]=o(i[d]),c),{}),l=e.getRightDifferences(i,a).reduce((c,d)=>(c[d]=o(a[d]),c),{});Object.keys(s).length||Object.keys(l).length?(Reflect.set(t,r,s),Reflect.set(n,r,l)):(Reflect.deleteProperty(t,r),Reflect.deleteProperty(n,r))}}static diffArrays(t,n,r,o){if(!(!t[r]&&!n[r])&&(Array.isArray(t[r])||Array.isArray(n[r]))){let i=Array.isArray(t[r])?t[r]:[],a=Array.isArray(n[r])?n[r]:[],s=Gt(e.getLeftDifferences(Gt(i,o),Gt(a,o))),l=Gt(e.getRightDifferences(Gt(i,o),Gt(a,o)));if(Object.keys(s).length||Object.keys(l).length){let c=i.filter(p=>s[o?o(p):String(p)]),d=a.filter(p=>l[o?o(p):String(p)]);Reflect.set(t,r,c),Reflect.set(n,r,d)}else Reflect.deleteProperty(t,r),Reflect.deleteProperty(n,r)}}static isLeftDifferent(t,n,r=!1){return!!this.distinctKeysIterator("left",t,n,r).next().value}static isRightDifferent(t,n,r=!1){return!!this.distinctKeysIterator("right",t,n,r).next().value}static getLeftDifferences(t,n,r=!1){return Array.from(this.distinctKeysIterator("left",t,n,r))}static getRightDifferences(t,n,r=!1){return Array.from(this.distinctKeysIterator("right",t,n,r))}static*distinctKeysIterator(t,n,r,o=!1){if(n===r)return;let i=[];t==="left"?i=Object.keys(n):t==="right"?i=Object.keys(r):t==="full"?i=Array.from(new Set([...Object.keys(n),...Object.keys(r)])):sr(t,`Unknown distinctKeysIterator's join param "${t}"`,!0);for(let a of i){let s=n[a],l=r[a];if(s!==l){if(!o&&typeof s=="object"&&typeof l=="object"&&s!==null&&l!==null&&un(s,l))continue;yield a}}}},ri=class e{constructor(t){this.delta=t}static calculate(t,n){let r=xe.calculate(t,n,void 0,e.postProcess);return new e(r)}static empty(){return new e(xe.create({},{}))}inverse(){let t=xe.create(this.delta.inserted,this.delta.deleted);return new e(t)}applyTo(t,n){try{let{selectedElementIds:r={},selectedGroupIds:o={}}=this.delta.deleted,{selectedElementIds:i={},selectedGroupIds:a={},selectedLinearElementId:s,editingLinearElementId:l,...c}=this.delta.inserted,d=xe.mergeObjects(t.selectedElementIds,i,r),p=xe.mergeObjects(t.selectedGroupIds,a,o),f=s&&n.has(s)?new J(n.get(s)):null,h=l&&n.has(l)?new J(n.get(l)):null,m={...t,...c,selectedElementIds:d,selectedGroupIds:p,selectedLinearElement:typeof s<"u"?f:t.selectedLinearElement,editingLinearElement:typeof l<"u"?h:t.editingLinearElement},g=this.filterInvisibleChanges(t,m,n);return[m,g]}catch(r){if(console.error("Couldn't apply appstate change",r),M.DEV||M.MODE===it.TEST)throw r;return[t,!1]}}isEmpty(){return xe.isEmpty(this.delta)}static postProcess(t,n){try{xe.diffObjects(t,n,"selectedElementIds",r=>!0),xe.diffObjects(t,n,"selectedGroupIds",r=>r??!1)}catch(r){if(console.error("Couldn't postprocess appstate change deltas."),M.DEV||M.MODE===it.TEST)throw r}finally{return[t,n]}}filterInvisibleChanges(t,n,r){let o=ii(t),i=ii(n),a=xe.isRightDifferent(e.stripElementsProps(o),e.stripElementsProps(i)),s=xe.isRightDifferent(e.stripStandaloneProps(o),e.stripStandaloneProps(i));if(!a&&!s)return!1;let l={value:a};if(s){let c=xe.getRightDifferences(e.stripStandaloneProps(o),e.stripStandaloneProps(i)),d=new Set;(c.includes("editingGroupId")||c.includes("selectedGroupIds"))&&(d=t1(r));for(let p of c)switch(p){case"selectedElementIds":n[p]=e.filterSelectedElements(n[p],r,l);break;case"selectedGroupIds":n[p]=e.filterSelectedGroups(n[p],d,l);break;case"editingGroupId":let f=n[p];f?d.has(f)?l.value=!0:n[p]=null:l.value=!0;break;case"selectedLinearElementId":case"editingLinearElementId":let h=e.convertToAppStateKey(p),m=n[h];if(!m)l.value=!0;else{let g=r.get(m.elementId);g&&!g.isDeleted?l.value=!0:n[h]=null}break;default:sr(p,`Unknown ObservedElementsAppState's key "${p}"`,!0)}}return l.value}static convertToAppStateKey(t){switch(t){case"selectedLinearElementId":return"selectedLinearElement";case"editingLinearElementId":return"editingLinearElement"}}static filterSelectedElements(t,n,r){let o=Object.keys(t);if(!o.length)return r.value=!0,t;let i={...t};for(let a of o){let s=n.get(a);s&&!s.isDeleted?r.value=!0:delete i[a]}return i}static filterSelectedGroups(t,n,r){if(!Object.keys(t).length)return r.value=!0,t;let i={...t};for(let a of Object.keys(i))n.has(a)?r.value=!0:delete i[a];return i}static stripElementsProps(t){let{editingGroupId:n,selectedGroupIds:r,selectedElementIds:o,editingLinearElementId:i,selectedLinearElementId:a,...s}=t;return s}static stripStandaloneProps(t){let{name:n,viewBackgroundColor:r,...o}=t;return o}},oi=class e{constructor(t,n,r){this.added=t;this.removed=n;this.updated=r}static create(t,n,r,o={shouldRedistribute:!1}){let i;if(o.shouldRedistribute){let a=new Map,s=new Map,l=new Map,c=[...t,...n,...r];for(let[d,p]of c)this.satisfiesAddition(p)?a.set(d,p):this.satisfiesRemoval(p)?s.set(d,p):l.set(d,p);i=new e(a,s,l)}else i=new e(t,n,r);return(M.DEV||M.MODE===it.TEST)&&(e.validate(i,"added",this.satisfiesAddition),e.validate(i,"removed",this.satisfiesRemoval),e.validate(i,"updated",this.satisfiesUpdate)),i}static satisfiesAddition=({deleted:t,inserted:n})=>t.isDeleted===!0&&!n.isDeleted;static satisfiesRemoval=({deleted:t,inserted:n})=>!t.isDeleted&&n.isDeleted===!0;static satisfiesUpdate=({deleted:t,inserted:n})=>!!t.isDeleted==!!n.isDeleted;static validate(t,n,r){for(let[o,i]of t[n].entries())if(!r(i))throw console.error(`Broken invariant for "${n}" delta, element "${o}", delta:`,i),new Error(`ElementsChange invariant broken for element "${o}".`)}static calculate(t,n){if(t===n)return e.empty();let r=new Map,o=new Map,i=new Map;for(let a of t.values())if(!n.get(a.id)){let l={...a,isDeleted:!1},c={isDeleted:!0},d=xe.create(l,c,e.stripIrrelevantProps);o.set(a.id,d)}for(let a of n.values()){let s=t.get(a.id);if(!s){let l={isDeleted:!0},c={...a,isDeleted:!1},d=xe.create(l,c,e.stripIrrelevantProps);r.set(a.id,d);continue}if(s.versionNonce!==a.versionNonce){let l=xe.calculate(s,a,e.stripIrrelevantProps,e.postProcess);if(typeof s.isDeleted=="boolean"&&typeof a.isDeleted=="boolean"&&s.isDeleted!==a.isDeleted){s.isDeleted&&!a.isDeleted?r.set(a.id,l):o.set(a.id,l);continue}xe.isEmpty(l)||i.set(a.id,l)}}return e.create(r,o,i)}static empty(){return e.create(new Map,new Map,new Map)}inverse(){let t=i=>{let a=new Map;for(let[s,l]of i.entries())a.set(s,xe.create(l.inserted,l.deleted));return a},n=t(this.added),r=t(this.removed),o=t(this.updated);return e.create(r,n,o)}isEmpty(){return this.added.size===0&&this.removed.size===0&&this.updated.size===0}applyLatestChanges(t){let n=s=>l=>{let c={};for(let d of Object.keys(l))switch(d){case"boundElements":c[d]=l[d];break;default:c[d]=s[d]}return c},r=s=>{let l=new Map;for(let[c,d]of s.entries()){let p=t.get(c);if(p){let f=xe.create(d.deleted,d.inserted,n(p),"inserted");l.set(c,f)}else l.set(c,d)}return l},o=r(this.added),i=r(this.removed),a=r(this.updated);return e.create(o,i,a,{shouldRedistribute:!0})}applyTo(t,n,r){let o=ht(new Map(t)),i,a={containsVisibleDifference:!1,containsZindexDifference:!1};try{let s=e.createApplier(o,n,a),l=s(this.added),c=s(this.removed),d=s(this.updated),p=this.resolveConflicts(t,o);i=new Map([...l,...c,...d,...p])}catch(s){if(console.error("Couldn't apply elements change",s),M.DEV||M.MODE===it.TEST)throw s;return[t,!0]}try{e.redrawTextBoundingBoxes(o,i),e.redrawBoundArrows(o,i,r),o=e.reorderElements(o,i,a)}catch(s){if(console.error("Couldn't mutate elements after applying elements change",s),M.DEV||M.MODE===it.TEST)throw s}finally{return[o,a.containsVisibleDifference]}}static createApplier=(t,n,r)=>{let o=e.createGetter(t,n,r);return i=>Array.from(i.entries()).reduce((a,[s,l])=>{let c=o(s,l.inserted);if(c){let d=e.applyDelta(c,l,r);t.set(d.id,d),a.set(d.id,d)}return a},new Map)};static createGetter=(t,n,r)=>(o,i)=>{let a=t.get(o);return a||(a=n.get(o),a&&(r.containsZindexDifference=!0,(i.isDeleted===!1||i.isDeleted!==!0&&a.isDeleted===!1)&&(r.containsVisibleDifference=!0))),a};static applyDelta(t,n,r={containsVisibleDifference:!0,containsZindexDifference:!0}){let{boundElements:o,...i}=n.inserted;if(n.deleted.boundElements?.length||n.inserted.boundElements?.length){let a=xe.mergeArrays(t.boundElements,n.inserted.boundElements,n.deleted.boundElements,s=>s.id);Object.assign(i,{boundElements:a})}if(!r.containsVisibleDifference){let{index:a,...s}=i,l=e.checkForVisibleDifference(t,s);r.containsVisibleDifference=l}return r.containsZindexDifference||(r.containsZindexDifference=n.deleted.index!==n.inserted.index),Pt(t,i)}static checkForVisibleDifference(t,n){return t.isDeleted&&n.isDeleted!==!1?!1:t.isDeleted&&n.isDeleted===!1||t.isDeleted===!1&&n.isDeleted?!0:xe.isRightDifferent(t,n)}resolveConflicts(t,n){let r=new Map,o=(c,d)=>{let p=n.get(c.id);if(!p)return;let f;t.get(c.id)===p?f=Pt(p,d):f=B(p,d),r.set(f.id,f),n.set(f.id,f)};for(let[c]of this.removed)e.unbindAffected(t,n,c,o);for(let[c]of this.added)e.rebindAffected(t,n,c,o);for(let[c]of Array.from(this.updated).filter(([d,p])=>Object.keys({...p.deleted,...p.inserted}).find(f=>nh.has(f)))){let d=n.get(c);!d||d.isDeleted||e.rebindAffected(t,n,c,o)}let i=new Map(Array.from(t).filter(([c])=>r.has(c))),{added:a,removed:s,updated:l}=e.calculate(i,r);for(let[c,d]of a)this.added.set(c,d);for(let[c,d]of s)this.removed.set(c,d);for(let[c,d]of l)this.updated.set(c,d);return r}static unbindAffected(t,n,r,o){let i=()=>t.get(r),a=()=>n.get(r);Hn.unbindAffected(n,i(),o),Hn.unbindAffected(n,a(),o),zn.unbindAffected(n,i(),o),zn.unbindAffected(n,a(),o)}static rebindAffected(t,n,r,o){let i=()=>t.get(r),a=()=>n.get(r);Hn.unbindAffected(n,i(),o),Hn.rebindAffected(n,a(),o),zn.unbindAffected(n,i(),(s,l)=>{Y(s)&&o(s,l)}),zn.rebindAffected(n,a(),o)}static redrawTextBoundingBoxes(t,n){let r=new Map;for(let o of n.values()){if(ke(o)){let{containerId:i}=o,a=i?t.get(i):void 0;a&&r.set(a.id,{container:a,boundText:o})}if(Dn(o)){let i=gn(o),a=i?t.get(i):void 0;a&&r.set(o.id,{container:o,boundText:a})}}for(let{container:o,boundText:i}of r.values())o.isDeleted||i.isDeleted||Ql(i,o,t,!1)}static redrawBoundArrows(t,n,r){for(let o of n.values())!o.isDeleted&&Wt(o)&&$t(o,t,r,{changedElements:n})}static reorderElements(t,n,r){if(!r.containsZindexDifference)return t;let o=Array.from(t.values()),i=w1([...o]),a=xe.getRightDifferences(o,i,!0).reduce((s,l)=>{let c=o[Number(l)];return c&&n.has(c.id)&&s.set(c.id,c),s},new Map);return!r.containsVisibleDifference&&a.size&&(r.containsVisibleDifference=!0),Q(ni(i,a))}static postProcess(t,n){try{xe.diffArrays(t,n,"boundElements",r=>r.id)}catch(r){if(console.error("Couldn't postprocess elements change deltas."),M.DEV||M.MODE===it.TEST)throw r}finally{return[t,n]}}static stripIrrelevantProps(t){let{id:n,updated:r,version:o,versionNonce:i,seed:a,...s}=t;return s}};x();var Ua=class{subscribers=[];on(...t){let n=t.flat().filter(r=>typeof r=="function");return this.subscribers.push(...n),()=>this.off(n)}once(...t){let n=t.flat().filter(o=>typeof o=="function");n.push(()=>r());let r=this.on(...n);return r}off(...t){let n=t.flat();this.subscribers=this.subscribers.filter(r=>!n.includes(r))}trigger(...t){for(let n of this.subscribers)n(...t);return this}clear(){this.subscribers=[]}};var v1="__observedAppState",ii=e=>{let t={name:e.name,editingGroupId:e.editingGroupId,viewBackgroundColor:e.viewBackgroundColor,selectedElementIds:e.selectedElementIds,selectedGroupIds:e.selectedGroupIds,editingLinearElementId:e.editingLinearElement?.elementId||null,selectedLinearElementId:e.selectedLinearElement?.elementId||null};return Reflect.defineProperty(t,v1,{value:!0,enumerable:!1}),t},iw=e=>!!Reflect.get(e,v1),no={CAPTURE:"capture",UPDATE:"update",NONE:"none"},mc=class{constructor(t,n){this.elementsChange=t;this.appStateChange=n}},b1=class{onStoreIncrementEmitter=new Ua;scheduledActions=new Set;_snapshot=Wa.empty();get snapshot(){return this._snapshot}set snapshot(t){this._snapshot=t}shouldCaptureIncrement=()=>{this.scheduleAction(no.CAPTURE)};shouldUpdateSnapshot=()=>{this.scheduleAction(no.UPDATE)};scheduleAction=t=>{this.scheduledActions.add(t),this.satisfiesScheduledActionsInvariant()};commit=(t,n)=>{try{this.scheduledActions.has(no.CAPTURE)?this.captureIncrement(t,n):this.scheduledActions.has(no.UPDATE)&&this.updateSnapshot(t,n)}finally{this.satisfiesScheduledActionsInvariant(),this.scheduledActions=new Set}};captureIncrement=(t,n)=>{let r=this.snapshot,o=this.snapshot.maybeClone(t,n);if(r!==o){let i=o.meta.didElementsChange?oi.calculate(r.elements,o.elements):oi.empty(),a=o.meta.didAppStateChange?ri.calculate(r.appState,o.appState):ri.empty();(!i.isEmpty()||!a.isEmpty())&&this.onStoreIncrementEmitter.trigger(new mc(i,a)),this.snapshot=o}};updateSnapshot=(t,n)=>{let r=this.snapshot.maybeClone(t,n);this.snapshot!==r&&(this.snapshot=r)};filterUncomittedElements=(t,n)=>{for(let[r,o]of t.entries()){if(!n.get(r))continue;let a=this.snapshot.elements.get(r);a?a.version<o.version&&n.set(r,a):n.delete(r)}return n};clear=()=>{this.snapshot=Wa.empty(),this.scheduledActions=new Set};satisfiesScheduledActionsInvariant=()=>{if(!(this.scheduledActions.size>=0&&this.scheduledActions.size<=3)){let t=`There can be at most three store actions scheduled at the same time, but there are "${this.scheduledActions.size}".`;if(console.error(t,this.scheduledActions.values()),M.DEV||M.MODE===it.TEST)throw new Error(t)}}},Wa=class e{constructor(t,n,r={didElementsChange:!1,didAppStateChange:!1,isEmpty:!1}){this.elements=t;this.appState=n;this.meta=r}static empty(){return new e(new Map,ii(ft()),{didElementsChange:!1,didAppStateChange:!1,isEmpty:!0})}isEmpty(){return this.meta.isEmpty}maybeClone(t,n){let r=this.maybeCreateElementsSnapshot(t),o=this.maybeCreateAppStateSnapshot(n),i=!1,a=!1;return this.elements!==r&&(i=!0),this.appState!==o&&(a=!0),!i&&!a?this:new e(r,o,{didElementsChange:i,didAppStateChange:a})}maybeCreateAppStateSnapshot(t){if(!t)return this.appState;let n=iw(t)?t:ii(t);return this.detectChangedAppState(n)?n:this.appState}detectChangedAppState(t){return!un(this.appState,t,{selectedElementIds:un,selectedGroupIds:un})}maybeCreateElementsSnapshot(t){return t?this.detectChangedElements(t)?this.createElementsSnapshot(t):this.elements:this.elements}detectChangedElements(t){if(this.elements===t)return!1;if(this.elements.size!==t.size)return!0;let n=Array.from(t.keys());for(let r=n.length-1;r>=0;r--){let o=this.elements.get(n[r]),i=t.get(n[r]);if(!o||!i||o.id!==i.id||o.versionNonce!==i.versionNonce)return!0}return!1}createElementsSnapshot(t){let n=new Map;for(let[r,o]of this.elements.entries())t.get(r)?n.set(r,o):n.set(r,Pt(o,{isDeleted:!0}));for(let[r,o]of t.entries()){let i=n.get(r);(!i||i&&i.versionNonce!==o.versionNonce)&&n.set(r,Qo(o))}return n}};var yn=new Map,aw=/^(?: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]*$/,sw=/^(?:http(?:s)?:\/\/)?(?:(?:w){3}\.)?(?:player\.)?vimeo\.com\/(?:video\/)?([^?\s]+)(?:\?.*)?$/,lw=/^https:\/\/(?:www\.)?figma\.com/,M1=/^https:\/\/gist\.github\.com\/([\w_-]+)\/([\w_-]+)/,cw=/^<script[\s\S]*?\ssrc=["'](https:\/\/gist\.github\.com\/.*?)\.js["']/i,T1=/(?:https?:\/\/)?(?:(?:w){3}\.)?(?:twitter|x)\.com\/[^/]+\/status\/(\d+)/,dw=/^<blockquote[\s\S]*?\shref=["'](https?:\/\/(?:twitter|x)\.com\/[^"']*)/i,uw=/^https:\/\/(?:www\.)?val\.town\/(v|embed)\/[a-zA-Z_$][0-9a-zA-Z_$]+\.[a-zA-Z_$][0-9a-zA-Z_$]+/,pw=/^<(?:iframe|blockquote)[\s\S]*?\s(?:src|href)=["']([^"']*)["'][\s\S]*?>$/i,A1=/giphy.com\/(?:clips|embed|gifs)\/[a-zA-Z0-9]*?-?([a-zA-Z0-9]+)(?:[^a-zA-Z0-9]|$)/,gc=new Set(["youtube.com","youtu.be","vimeo.com","player.vimeo.com","figma.com","link.excalidraw.com","gist.github.com","twitter.com","x.com","*.simplepdf.eu","stackblitz.com","val.town","giphy.com"]),S1=new Set(["youtube.com","youtu.be","vimeo.com","player.vimeo.com","figma.com","twitter.com","x.com","*.simplepdf.eu","stackblitz.com"]),I1=e=>`<html><body>${e}</body></html>`,P1=e=>{if(!e)return null;if(yn.has(e))return yn.get(e);let t=e,n=S1.has(Ec(e,S1)||""),r="generic",o={w:560,h:840},i=e.match(aw);if(i?.[2]){let c=i[3]?`&start=${i[3]}`:"",d=e.includes("shorts");switch(r="video",i[1]){case"embed/":case"watch?v=":case"shorts/":e=`https://www.youtube.com/embed/${i[2]}?enablejsapi=1${c}`;break;case"playlist?list=":case"embed/videoseries?list=":e=`https://www.youtube.com/embed/videoseries?list=${i[2]}&enablejsapi=1${c}`;break;default:e=`https://www.youtube.com/embed/${i[2]}?enablejsapi=1${c}`;break}return o=d?{w:315,h:560}:{w:560,h:315},yn.set(t,{link:e,intrinsicSize:o,type:r,sandbox:{allowSameOrigin:n}}),{link:e,intrinsicSize:o,type:r,sandbox:{allowSameOrigin:n}}}let a=e.match(sw);if(a?.[1]){let c=a?.[1],d=/^\d+$/.test(c)?void 0:new URIError("Invalid embed link format");return r="video",e=`https://player.vimeo.com/video/${c}?api=1`,o={w:560,h:315},yn.set(t,{link:e,intrinsicSize:o,type:r,sandbox:{allowSameOrigin:n}}),{link:e,intrinsicSize:o,type:r,error:d,sandbox:{allowSameOrigin:n}}}if(e.match(lw))return r="generic",e=`https://www.figma.com/embed?embed_host=share&url=${encodeURIComponent(e)}`,o={w:550,h:550},yn.set(t,{link:e,intrinsicSize:o,type:r,sandbox:{allowSameOrigin:n}}),{link:e,intrinsicSize:o,type:r,sandbox:{allowSameOrigin:n}};let l=e.match(uw);if(l)return e=l[1]==="embed"?l[0]:l[0].replace("/v","/embed"),yn.set(t,{link:e,intrinsicSize:o,type:r,sandbox:{allowSameOrigin:n}}),{link:e,intrinsicSize:o,type:r,sandbox:{allowSameOrigin:n}};if(T1.test(e)){let c=e.match(T1)[1],d=Fa(`https://twitter.com/x/status/${c}`),p={type:"document",srcdoc:f=>I1(`<blockquote class="twitter-tweet" data-dnt="true" data-theme="${f}"><a href="${d}"></a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"><\/script>`),intrinsicSize:{w:480,h:480},sandbox:{allowSameOrigin:n}};return yn.set(t,p),p}if(M1.test(e)){let[,c,d]=e.match(M1),p=Fa(`https://gist.github.com/${c}/${d}`),f={type:"document",srcdoc:()=>I1(`
|
|
20
|
+
<script src="${p}.js"><\/script>
|
|
21
|
+
<style type="text/css">
|
|
22
|
+
* { margin: 0px; }
|
|
23
|
+
table, .gist { height: 100%; }
|
|
24
|
+
.gist .gist-file { height: calc(100vh - 2px); padding: 0px; display: grid; grid-template-rows: 1fr auto; }
|
|
25
|
+
</style>
|
|
26
|
+
`),intrinsicSize:{w:550,h:720},sandbox:{allowSameOrigin:n}};return yn.set(e,f),f}return yn.set(e,{link:e,intrinsicSize:o,type:r,sandbox:{allowSameOrigin:n}}),{link:e,intrinsicSize:o,type:r,sandbox:{allowSameOrigin:n}}},Va=e=>{let t;Io(e)?t="IFrame element":t=!e.link||e?.link===""?"Empty Web-Embed":e.link;let n=Math.max(Math.min(e.width/2,e.width/t.length),e.width/30),r=ae.Helvetica,o=he({fontSize:n,fontFamily:r});return Qt({x:e.x+e.width/2,y:e.y+e.height/2,strokeColor:e.strokeColor!=="transparent"?e.strokeColor:"black",backgroundColor:"transparent",fontFamily:r,fontSize:n,text:Yn(t,o,e.width-20),textAlign:"center",verticalAlign:sn.MIDDLE,angle:e.angle??0})},A7=s1({name:"setEmbeddableAsActiveTool",trackEvent:{category:"toolbar"},target:"Tool",label:"toolBar.embeddable",perform:(e,t,n,r)=>{let o=Ao(t,{type:"embeddable"});return u1(r.canvas,{...t,activeTool:o}),{elements:e,appState:{...t,activeTool:Ao(t,{type:"embeddable"})},storeAction:no.NONE}}}),Ec=(e,t)=>{try{let{hostname:n}=new URL(e),r=n.replace(/^www\./,"");if(t instanceof Set){if(gc.has(r))return r;let i=r.replace(/^([^.]+)/,"*");return gc.has(i)?i:null}let o=t.replace(/^www\./,"");if(r===o)return o}catch{}return null},S7=e=>{let t=e.match(dw);if(t&&t.length===2)return t[1];let n=e.match(cw);if(n&&n.length===2)return n[1];if(A1.test(e))return`https://giphy.com/embed/${A1.exec(e)[1]}`;let r=e.match(pw);return r&&r.length===2?r[1]:e},I7=(e,t)=>{if(!e)return!1;if(t!=null)if(typeof t=="function"){let n=t(e);if(typeof n=="boolean")return n}else{if(typeof t=="boolean")return t;if(t instanceof RegExp)return t.test(e);if(Array.isArray(t)){for(let n of t)if(n instanceof RegExp){if(e.match(n))return!0}else if(Ec(e,n))return!0;return!1}}return!!Ec(e,gc)};var ai=(e,t,n)=>{if(typeof n>"u")return e.draw(t);let r={sets:t.sets,shape:t.shape,options:{...t.options,fixedDecimalPlaceDigits:n}};return e.draw(r)},si=(e,t,n,r,o)=>{if(!r.enabled||!r.clip)return null;let i=$e(e,o);if(i){let a=t.ownerDocument.createElementNS(le,"g");return a.setAttributeNS(le,"clip-path",`url(#${i.id})`),n.forEach(s=>a.appendChild(s)),a}return null},Xa=(e,t,n,r,o,i,a,s)=>{let l={x:i,y:a},[c,d,p,f]=H(e,t),h=(p-c)/2-(e.x-c),m=(f-d)/2-(e.y-d);if(Y(e)){let b=_e(e,t);if(Z(b)){let[T,A,k,P]=H(b,t),I=J.getBoundTextElementPosition(b,e,t);h=(k-T)/2-(I.x-T),m=(P-A)/2-(I.y-A),i=i+I.x-e.x,a=a+I.y-e.y}}let g=180*e.angle/Math.PI,E=r;if(e.link){let b=r.ownerDocument.createElementNS(le,"a");b.setAttribute("href",Qr(e.link)),E.appendChild(b),E=b}let w=(b,T)=>{dn()&&b.setAttribute("data-id",T.id),E.appendChild(b)},y=($e(e,t)?.opacity??100)*e.opacity/1e4;switch(e.type){case"selection":throw new Error("Selection rendering is not supported for SVG");case"rectangle":case"diamond":case"ellipse":{let b=ce.generateElementShape(e,null),T=ai(n,b,Nr);y!==1&&(T.setAttribute("stroke-opacity",`${y}`),T.setAttribute("fill-opacity",`${y}`)),T.setAttribute("stroke-linecap","round"),T.setAttribute("transform",`translate(${i||0} ${a||0}) rotate(${g} ${h} ${m})`);let A=si(e,E,[T],s.frameRendering,t);w(A||T,e);break}case"iframe":case"embeddable":{let b=ce.generateElementShape(e,s),T=ai(n,b,Nr),A=e.opacity/100;A!==1&&(T.setAttribute("stroke-opacity",`${A}`),T.setAttribute("fill-opacity",`${A}`)),T.setAttribute("stroke-linecap","round"),T.setAttribute("transform",`translate(${i||0} ${a||0}) rotate(${g} ${h} ${m})`),w(T,e);let k=Va(e);Xa(k,t,n,E,o,k.x+l.x-e.x,k.y+l.y-e.y,s);let P=ai(n,b,Nr);for(P.setAttribute("stroke-linecap","round"),P.setAttribute("transform",`translate(${i||0} ${a||0}) rotate(${g} ${h} ${m})`);P.firstChild;)P.removeChild(P.firstChild);let I=En(Math.min(e.width,e.height),e),_=P1(i1(e.link||""));if(s.renderEmbeddables===!1||_?.type==="document"){let D=r.ownerDocument.createElementNS(le,"a");D.setAttribute("href",Qr(e.link||"")),D.setAttribute("target","_blank"),D.setAttribute("rel","noopener noreferrer"),D.style.borderRadius=`${I}px`,P.appendChild(D)}else{let D=r.ownerDocument.createElementNS(le,"foreignObject");D.style.width=`${e.width}px`,D.style.height=`${e.height}px`,D.style.border="none";let S=D.ownerDocument.createElementNS(le,"div");S.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),S.style.width="100%",S.style.height="100%";let L=S.ownerDocument.createElement("iframe");L.src=_?.link??"",L.style.width="100%",L.style.height="100%",L.style.border="none",L.style.borderRadius=`${I}px`,L.style.top="0",L.style.left="0",L.allowFullscreen=!0,S.appendChild(L),D.appendChild(S),P.appendChild(D)}w(P,e);break}case"line":case"arrow":{let b=ee(e,t),T=r.ownerDocument.createElementNS(le,"mask");if(b){T.setAttribute("id",`mask-${e.id}`);let I=r.ownerDocument.createElementNS(le,"rect");i=i||0,a=a||0,I.setAttribute("x","0"),I.setAttribute("y","0"),I.setAttribute("fill","#fff"),I.setAttribute("width",`${e.width+100+i}`),I.setAttribute("height",`${e.height+100+a}`),T.appendChild(I);let _=r.ownerDocument.createElementNS(le,"rect"),D=J.getBoundTextElementPosition(e,b,t),S=i+D.x-e.x,L=a+D.y-e.y;_.setAttribute("x",S.toString()),_.setAttribute("y",L.toString()),_.setAttribute("fill","#000"),_.setAttribute("width",`${b.width}`),_.setAttribute("height",`${b.height}`),_.setAttribute("opacity","1"),T.appendChild(_)}let A=r.ownerDocument.createElementNS(le,"g");b&&A.setAttribute("mask",`url(#mask-${e.id})`),A.setAttribute("stroke-linecap","round"),ce.generateElementShape(e,s).forEach(I=>{let _=ai(n,I,Nr);y!==1&&(_.setAttribute("stroke-opacity",`${y}`),_.setAttribute("fill-opacity",`${y}`)),_.setAttribute("transform",`translate(${i||0} ${a||0}) rotate(${g} ${h} ${m})`),e.type==="line"&&Yt(e.points)&&e.backgroundColor!=="transparent"&&_.setAttribute("fill-rule","evenodd"),A.appendChild(_)});let P=si(e,E,[A,T],s.frameRendering,t);P?(w(P,e),E.appendChild(P)):(w(A,e),E.append(T));break}case"freedraw":{let b=ce.generateElementShape(e,s),T=b?ai(n,b,Nr):r.ownerDocument.createElementNS(le,"g");y!==1&&(T.setAttribute("stroke-opacity",`${y}`),T.setAttribute("fill-opacity",`${y}`)),T.setAttribute("transform",`translate(${i||0} ${a||0}) rotate(${g} ${h} ${m})`),T.setAttribute("stroke","none");let A=r.ownerDocument.createElementNS(le,"path");A.setAttribute("fill",e.strokeColor),A.setAttribute("d",nc(e)),T.appendChild(A);let k=si(e,E,[T],s.frameRendering,t);w(k||T,e);break}case"image":{let b=Math.round(e.width),T=Math.round(e.height),A=Ut(e)&&o[e.fileId];if(A){let k=`image-${A.id}`,P=r.querySelector(`#${k}`);if(!P){P=r.ownerDocument.createElementNS(le,"symbol"),P.id=k;let S=r.ownerDocument.createElementNS(le,"image");S.setAttribute("width","100%"),S.setAttribute("height","100%"),S.setAttribute("href",A.dataURL),P.appendChild(S),E.prepend(P)}let I=r.ownerDocument.createElementNS(le,"use");if(I.setAttribute("href",`#${k}`),s.exportWithDarkMode&&A.mimeType!==W.svg&&I.setAttribute("filter",tc),I.setAttribute("width",`${b}`),I.setAttribute("height",`${T}`),I.setAttribute("opacity",`${y}`),e.scale[0]!==1||e.scale[1]!==1){let S=e.scale[0]!==1?-b:0,L=e.scale[1]!==1?-T:0;I.setAttribute("transform",`scale(${e.scale[0]}, ${e.scale[1]}) translate(${S} ${L})`)}let _=r.ownerDocument.createElementNS(le,"g");if(_.appendChild(I),_.setAttribute("transform",`translate(${i||0} ${a||0}) rotate(${g} ${h} ${m})`),e.roundness){let S=r.ownerDocument.createElementNS(le,"clipPath");S.id=`image-clipPath-${e.id}`;let L=r.ownerDocument.createElementNS(le,"rect"),O=En(Math.min(e.width,e.height),e);L.setAttribute("width",`${e.width}`),L.setAttribute("height",`${e.height}`),L.setAttribute("rx",`${O}`),L.setAttribute("ry",`${O}`),S.appendChild(L),w(S,e),_.setAttributeNS(le,"clip-path",`url(#${S.id})`)}let D=si(e,E,[_],s.frameRendering,t);w(D||_,e)}break}case"frame":case"magicframe":{if(s.frameRendering.enabled&&s.frameRendering.outline){let b=document.createElementNS(le,"rect");b.setAttribute("transform",`translate(${i||0} ${a||0}) rotate(${g} ${h} ${m})`),b.setAttribute("width",`${e.width}px`),b.setAttribute("height",`${e.height}px`),b.setAttribute("rx",Ae.radius.toString()),b.setAttribute("ry",Ae.radius.toString()),b.setAttribute("fill","none"),b.setAttribute("stroke",Ae.strokeColor),b.setAttribute("stroke-width",Ae.strokeWidth.toString()),w(b,e)}break}default:if(Y(e)){let b=r.ownerDocument.createElementNS(le,"g");y!==1&&(b.setAttribute("stroke-opacity",`${y}`),b.setAttribute("fill-opacity",`${y}`)),b.setAttribute("transform",`translate(${i||0} ${a||0}) rotate(${g} ${h} ${m})`);let T=e.text.replace(/\r\n?/g,`
|
|
27
|
+
`).split(`
|
|
28
|
+
`),A=jr(e.fontSize,e.lineHeight),k=e.textAlign==="center"?e.width/2:e.textAlign==="right"?e.width:0,P=ka(e.fontFamily,e.fontSize,A),I=Gi(e.text)?"rtl":"ltr",_=e.textAlign==="center"?"middle":e.textAlign==="right"||I==="rtl"?"end":"start";for(let S=0;S<T.length;S++){let L=r.ownerDocument.createElementNS(le,"text");L.textContent=T[S],L.setAttribute("x",`${k}`),L.setAttribute("y",`${S*A+P}`),L.setAttribute("font-family",Js(e)),L.setAttribute("font-size",`${e.fontSize}px`),L.setAttribute("fill",e.strokeColor),L.setAttribute("text-anchor",_),L.setAttribute("style","white-space: pre;"),L.setAttribute("direction",I),L.setAttribute("dominant-baseline","alphabetic"),b.appendChild(L)}let D=si(e,E,[b],s.frameRendering,t);w(D||b,e)}else throw new Error(`Unimplemented type ${e.type}`)}},_1=(e,t,n,r,o,i)=>{r&&(e.filter(a=>!mt(a)).forEach(a=>{if(!a.isDeleted){if(Y(a)&&a.containerId&&t.has(a.containerId))return;try{Xa(a,t,n,r,o,a.x+i.offsetX,a.y+i.offsetY,i);let s=ee(a,t);s&&Xa(s,t,n,r,o,s.x+i.offsetX,s.y+i.offsetY,i)}catch(s){console.error(s)}}}),e.filter(a=>mt(a)).forEach(a=>{if(!a.isDeleted)try{Xa(a,t,n,r,o,a.x+i.offsetX,a.y+i.offsetY,i)}catch(s){console.error(s)}}))};x();x();x();var ro=(()=>{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})(),fw=ro?import("./file-open-002ab408-MILJ6BM2.js"):import("./file-open-7c801643-BHFKUUBS.js");async function k1(...e){return(await fw).default(...e)}var X7=ro?import("./directory-open-4ed118d0-57WBH3LL.js"):import("./directory-open-01563666-OLGZGYEQ.js");var hw=ro?import("./file-save-745eba88-CGSHK46Y.js"):import("./file-save-3189631c-IHOU4DOS.js");async function L1(...e){return(await hw).default(...e)}var C1=500,D1=e=>{let t=e.extensions?.reduce((r,o)=>(r.push(W[o]),r),[]),n=e.extensions?.reduce((r,o)=>o==="jpg"?r.concat(".jpg",".jpeg"):r.concat(`.${o}`),[]);return k1({description:e.description,extensions:n,mimeTypes:t,multiple:e.multiple??!1,legacySetup:(r,o,i)=>{let a=hp(o,C1),s=()=>{l(),document.addEventListener("keyup",a),document.addEventListener("pointerup",a),a()},l=()=>{if(i.files?.length){let d=e.multiple?[...i.files]:i.files[0];r(d)}};requestAnimationFrame(()=>{window.addEventListener("focus",s)});let c=window.setInterval(()=>{l()},C1);return d=>{clearInterval(c),a.cancel(),window.removeEventListener("focus",s),document.removeEventListener("keyup",a),document.removeEventListener("pointerup",a),d&&(console.warn("Opening the file was canceled (legacy-fs)."),d(new za))}}})},xc=(e,t)=>L1(e,{fileName:`${t.name}.${t.extension}`,description:t.description,extensions:[`.${t.extension}`]},t.fileHandle);var mw=(e,t)=>{let n={};for(let r of e)!r.isDeleted&&"fileId"in r&&r.fileId&&t[r.fileId]&&(n[r.fileId]=t[r.fileId]);return n},li=(e,t,n,r)=>{let o={type:Xe.excalidraw,version:Zs.excalidraw,source:Ys,elements:r==="local"?Ya(e):N1(e),appState:r==="local"?Hi(t):lp(t),files:r==="local"?mw(e,n):void 0};return JSON.stringify(o,null,2)},a_=async(e,t,n,r=t.name||ip)=>{let o=li(e,t,n,"local"),i=new Blob([o],{type:W.excalidraw});return{fileHandle:await xc(i,{name:r,extension:"excalidraw",description:"Excalidraw file",fileHandle:F1(t.fileHandle)?null:t.fileHandle})}},s_=async(e,t)=>{let n=await D1({description:"Excalidraw files"});return O1(await yc(n),e,t,n.handle)},R1=e=>e?.type===Xe.excalidraw&&(!e.elements||Array.isArray(e.elements)&&(!e.appState||typeof e.appState=="object")),wc=e=>typeof e=="object"&&e&&e.type===Xe.excalidrawLibrary&&(e.version===1||e.version===2),gw=e=>{let t={type:Xe.excalidrawLibrary,version:Zs.excalidrawLibrary,source:Ys,libraryItems:e};return JSON.stringify(t,null,2)},l_=async e=>{let t=gw(e);await xc(new Blob([t],{type:W.excalidrawlib}),{name:"library",extension:"excalidrawlib",description:"Excalidraw library file"})};x();var Ew=e=>new Promise((t,n)=>{let r=new Image;r.onload=()=>{t(r)},r.onerror=o=>{n(o)},r.src=e}),B1=async({fileIds:e,files:t,imageCache:n})=>{let r=new Map,o=new Map;return await Promise.all(e.reduce((i,a)=>{let s=t[a];return s&&!r.has(a)?(r.set(a,!0),i.concat((async()=>{try{if(s.mimeType===W.binary)throw new Error("Only images can be added to ImageCache");let l=Ew(s.dataURL),c={image:l,mimeType:s.mimeType};n.set(a,c);let d=await l;n.set(a,{...c,image:d})}catch{o.set(a,!0)}})())):i},[])),{imageCache:n,updatedFiles:r,erroredFiles:o}},H1=e=>e.filter(t=>Ut(t)),xw=e=>e?.nodeName.toLowerCase()==="svg",f_=async e=>{let t=new DOMParser().parseFromString(e,W.svg),n=t.querySelector("svg");if(t.querySelector("parsererror")||!xw(n))throw new Error("Invalid SVG");if(n.hasAttribute("xmlns")||n.setAttribute("xmlns",le),!n.hasAttribute("width")||!n.hasAttribute("height")){let o=n.getAttribute("viewBox"),i=n.getAttribute("width")||"50",a=n.getAttribute("height")||"50";if(o){let s=o.match(/\d+ +\d+ +(\d+) +(\d+)/);s&&([,i,a]=s)}n.setAttribute("width",i),n.setAttribute("height",a)}return n.outerHTML};x();x();var bc=document.createElement("img");bc.src=`data:${W.svg}, ${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 vc=([e,t,n,r],o,i)=>{let a=Bh,s=a/i.zoom.value,l=a/i.zoom.value,c=a/i.zoom.value,d=(e+n)/2,p=(t+r)/2,f=(a-8)/(2*i.zoom.value),h=4/i.zoom.value,m=n+h-f,g=t-h-c+f,[E,w]=j(m+s/2,g+l/2,d,p,o);return[E-s/2,w-l/2,s,l]},ww=(e,t,n,[r,o])=>{let i=4/n.zoom.value,[a,s,l,c]=H(e,t),[d,p,f,h]=vc([a,s,l,c],e.angle,n);return r>d-i&&r<d+i+f&&o>p-i&&o<p+h+i},b_=(e,t,n,[r,o],i)=>!e.link||n.selectedElementIds[e.id]?!1:!i&&n.viewModeEnabled&&Cl(r,o,e,t)?!0:ww(e,t,n,[r,o]);x();var A_=(e,t,n,r,o=!0)=>{e.beginPath(),e.arc(t,n,r,0,Math.PI*2),e.fill(),o&&e.stroke()},z1=(e,t)=>[e.width/t,e.height/t],G1=({canvas:e,scale:t,normalizedWidth:n,normalizedHeight:r,theme:o,isExporting:i,viewBackgroundColor:a})=>{let s=e.getContext("2d");return s.setTransform(1,0,0,1,0,0),s.scale(t,t),i&&o===Fe.DARK&&(s.filter=Oi),typeof a=="string"?((a==="transparent"||a.length===5||a.length===9||/(hsla|rgba)\(/.test(a))&&s.clearRect(0,0,n,r),s.save(),s.fillStyle=a,s.fillRect(0,0,n,r),s.restore()):s.clearRect(0,0,n,r),s};var yw=(e,t,n,r,o,i,a)=>{let l;(E=>(E.Bold="#cccccc",E.Regular="#e5e5e5"))(l||={});let c=-Math.round(o.value/t)*t+n%t,d=-Math.round(o.value/t)*t+r%t,p=Math.min(1/o.value,1),f=1/o.value,h=[p*3,f+(p+f)];e.save(),e.lineWidth=p;for(let m=c;m<c+i+t*2;m+=t){let g=Math.round(m-n)%(5*t)===0;e.beginPath(),e.setLineDash(g?[]:h),e.strokeStyle=g?"#cccccc":"#e5e5e5",e.moveTo(m,d-t),e.lineTo(m,d+a+t*2),e.stroke()}for(let m=d;m<d+a+t*2;m+=t){let g=Math.round(m-r)%(5*t)===0;e.beginPath(),e.setLineDash(g?[]:h),e.strokeStyle=g?"#cccccc":"#e5e5e5",e.moveTo(c-t,m),e.lineTo(c+i+t*2,m),e.stroke()}e.restore()},U1=(e,t,n,r)=>{t.translate(e.x+r.scrollX,e.y+r.scrollY),t.beginPath(),t.roundRect?t.roundRect(0,0,e.width,e.height,Ae.radius/r.zoom.value):t.rect(0,0,e.width,e.height),t.clip(),t.translate(-(e.x+r.scrollX),-(e.y+r.scrollY))},bn,W1=(e,t,n,r)=>{if(e.link&&!n.selectedElementIds[e.id]){let[o,i,a,s]=H(e,r),[l,c,d,p]=vc([o,i,a,s],e.angle,n),f=l+d/2,h=c+p/2;if(t.save(),t.translate(n.scrollX+f,n.scrollY+h),t.rotate(e.angle),!bn||bn.zoom!==n.zoom.value){bn=document.createElement("canvas"),bn.zoom=n.zoom.value,bn.width=d*window.devicePixelRatio*n.zoom.value,bn.height=p*window.devicePixelRatio*n.zoom.value;let m=bn.getContext("2d");m.scale(window.devicePixelRatio*n.zoom.value,window.devicePixelRatio*n.zoom.value),m.fillStyle="#fff",m.fillRect(0,0,d,p),m.drawImage(bc,0,0,d,p),m.restore(),t.drawImage(bn,l-f,c-h,d,p)}else t.drawImage(bn,l-f,c-h,d,p);t.restore()}},V1=({canvas:e,rc:t,elementsMap:n,allElementsMap:r,visibleElements:o,scale:i,appState:a,renderConfig:s})=>{if(e===null)return;let{renderGrid:l=!0,isExporting:c}=s,[d,p]=z1(e,i),f=G1({canvas:e,scale:i,normalizedWidth:d,normalizedHeight:p,theme:a.theme,isExporting:c,viewBackgroundColor:a.viewBackgroundColor});f.scale(a.zoom.value,a.zoom.value),l&&a.gridSize&&yw(f,a.gridSize,a.scrollX,a.scrollY,a.zoom,d/a.zoom.value,p/a.zoom.value);let h=new Set;o.forEach(m=>{m.groupIds.length>0&&a.frameToHighlight&&a.selectedElementIds[m.id]&&(Kn(m,a.frameToHighlight,n)||m.groupIds.find(g=>h.has(g)))&&m.groupIds.forEach(g=>h.add(g))}),o.filter(m=>!mt(m)).forEach(m=>{try{let g=m.frameId||a.frameToHighlight?.id;if(Y(m)&&m.containerId&&n.has(m.containerId))return;if(f.save(),g&&a.frameRendering.enabled&&a.frameRendering.clip){let w=$a(m,n,a);w&&Za(m,n,a)&&U1(w,f,s,a),qr(m,n,r,t,f,s,a)}else qr(m,n,r,t,f,s,a);let E=ee(m,n);E&&qr(E,n,r,t,f,s,a),f.restore(),c||W1(m,f,a,n)}catch(g){console.error(g)}}),o.filter(m=>mt(m)).forEach(m=>{try{let g=()=>{if(qr(m,n,r,t,f,s,a),mt(m)&&(c||Vi(m)&&s.embedsValidationStatus.get(m.id)!==!0)&&m.width&&m.height){let w=Va(m);qr(w,n,r,t,f,s,a)}c||W1(m,f,a,n)};if((m.frameId||a.frameToHighlight?.id)&&a.frameRendering.enabled&&a.frameRendering.clip){f.save();let w=$a(m,n,a);w&&Za(m,n,a)&&U1(w,f,s,a),g(),f.restore()}else g()}catch(g){console.error(g)}})},bw=mp(e=>{V1(e)},{trailing:!0}),X1=(e,t)=>{if(t){bw(e);return}V1(e)};var vw="<!-- svg-source:excalidraw -->",Mw=(e,t)=>{if(e.width<=t)return e;let r=document.createElement("canvas").getContext("2d");r.font=he({fontFamily:e.fontFamily,fontSize:e.fontSize});let o=e.text;if(r.measureText(o).width>t)for(let a=o.length;a>0;a--){let s=`${o.slice(0,a)}...`;if(r.measureText(s).width<=t){o=s;break}}return Pt(e,{text:o,width:t})},Tw=(e,t)=>{let n=[];for(let r of e){if(se(r)){let o=Qt({x:r.x,y:r.y-Ae.nameOffsetY,fontFamily:ae.Helvetica,fontSize:Ae.nameFontSize,lineHeight:Ae.nameLineHeight,strokeColor:t.exportWithDarkMode?Ae.nameColorDarkTheme:Ae.nameColorLightTheme,text:j1(r)});o.y-=o.height,o=Mw(o,r.width),n.push(o)}n.push(r)}return n},Y1=(e,t)=>(t=t||ft().frameRendering,{enabled:e?!0:t.enabled,outline:e?!1:t.outline,name:e?!1:t.name,clip:e?!0:t.clip}),$1=({elements:e,exportingFrame:t,frameRendering:n,exportWithDarkMode:r})=>{let o;return t?o=q1(e,t):n.enabled&&n.name?o=Tw(e,{exportWithDarkMode:r}):o=e,o},Z1=async(e,t,n,{exportBackground:r,exportPadding:o=$s,viewBackgroundColor:i,exportingFrame:a},s=(c,d)=>{let p=document.createElement("canvas");return p.width=c*t.exportScale,p.height=d*t.exportScale,{canvas:p,scale:t.exportScale}},l=async()=>{await Zn.loadFontsForElements(e)})=>{await l();let c=Y1(a??null,t.frameRendering??null),d=$1({elements:e,exportingFrame:a,exportWithDarkMode:t.exportWithDarkMode,frameRendering:c});a&&(o=0);let[p,f,h,m]=Mc(a?[a]:Ac(d),o),{canvas:g,scale:E=1}=s(h,m),w=ft(),{imageCache:y}=await B1({imageCache:new Map,fileIds:H1(d).map(b=>b.fileId),files:n});return X1({canvas:g,rc:Xt.canvas(g),elementsMap:ht(Q(d)),allElementsMap:ht(Q(br(e))),visibleElements:d,scale:E,appState:{...t,frameRendering:c,viewBackgroundColor:r?i:null,scrollX:-p+o,scrollY:-f+o,zoom:w.zoom,shouldCacheIgnoreZoom:!1,theme:t.exportWithDarkMode?Fe.DARK:Fe.LIGHT},renderConfig:{canvasBackgroundColor:i,imageCache:y,renderGrid:!1,isExporting:!0,embedsValidationStatus:new Map,elementsPendingErasure:new Set}}),g},K1=async(e,t,n,r)=>{let o=Y1(r?.exportingFrame??null,t.frameRendering??null),{exportPadding:i=$s,exportWithDarkMode:a=!1,viewBackgroundColor:s,exportScale:l=1,exportEmbedScene:c}=t,{exportingFrame:d=null}=r||{},p=$1({elements:e,exportingFrame:d,exportWithDarkMode:a,frameRendering:o});d&&(i=0);let f="";if(c)try{f=await(await import("./image-X3GFZHNN.js")).encodeSvgMetadata({text:li(e,t,n||{},"local")})}catch(S){console.error(S)}let[h,m,g,E]=Mc(d?[d]:Ac(p),i),w=document.createElementNS(le,"svg");w.setAttribute("version","1.1"),w.setAttribute("xmlns",le),w.setAttribute("viewBox",`0 0 ${g} ${E}`),w.setAttribute("width",`${g*l}`),w.setAttribute("height",`${E*l}`),a&&w.setAttribute("filter",Oi);let y=-h+i,b=-m+i,T=Tc(e),A="",k=Q(e);for(let S of T){let[L,O,G,X]=H(S,k),U=(G-L)/2-(S.x-L),F=(X-O)/2-(S.y-O);A+=`<clipPath id=${S.id}>
|
|
29
|
+
<rect transform="translate(${S.x+y} ${S.y+b}) rotate(${S.angle} ${U} ${F})"
|
|
30
|
+
width="${S.width}"
|
|
31
|
+
height="${S.height}"
|
|
32
|
+
>
|
|
33
|
+
</rect>
|
|
34
|
+
</clipPath>`}let P=e.reduce((S,L)=>(Y(L)&&S.add(L.fontFamily),S),new Set),I=r?.skipInliningFonts?[]:await Promise.all(Array.from(P).map(async S=>{let{fonts:L,metadata:O}=Zn.registered.get(S)??{};if(!Array.isArray(L)){console.error(`Couldn't find registered fonts for font-family "${S}"`,Zn.registered);return}if(!O?.local)return Promise.all(L.map(async G=>`@font-face {
|
|
35
|
+
font-family: ${G.fontFace.family};
|
|
36
|
+
src: url(${await G.getContent()});
|
|
37
|
+
}`))}));if(w.innerHTML=`
|
|
38
|
+
${vw}
|
|
39
|
+
${f}
|
|
40
|
+
<defs>
|
|
41
|
+
<style class="style-fonts">
|
|
42
|
+
${I.flat().filter(Boolean).join(`
|
|
43
|
+
`)}
|
|
44
|
+
</style>
|
|
45
|
+
${A}
|
|
46
|
+
</defs>
|
|
47
|
+
`,t.exportBackground&&s){let S=w.ownerDocument.createElementNS(le,"rect");S.setAttribute("x","0"),S.setAttribute("y","0"),S.setAttribute("width",`${g}`),S.setAttribute("height",`${E}`),S.setAttribute("fill",s),w.appendChild(S)}let _=Xt.svg(w),D=r?.renderEmbeddables??!1;return _1(p,ht(Q(p)),_,w,n||{},{offsetX:y,offsetY:b,isExporting:!0,exportWithDarkMode:a,renderEmbeddables:D,frameRendering:o,canvasBackgroundColor:s,embedsValidationStatus:D?new Map(p.filter(S=>se(S)).map(S=>[S.id,!0])):new Map}),w},Mc=(e,t)=>{let[n,r,o,i]=Oe(e),a=at(n,o)+t*2,s=at(r,i)+t*2;return[n,r,a,s]},tk=(e,t,n)=>{let[,,r,o]=Mc(e,t).map(i=>Math.trunc(i*n));return[r,o]};x();var Aw={selection:!0,text:!0,rectangle:!0,diamond:!0,ellipse:!0,line:!0,image:!0,arrow:!0,freedraw:!0,eraser:!1,custom:!0,frame:!0,embeddable:!0,hand:!0,laser:!1,magicframe:!1},Sw=e=>Object.keys(ae).includes(e)?ae[e]:zt,Ka=(e,t)=>t?{...t,focus:t.focus||0,fixedPoint:ie(e)?t.fixedPoint??[0,0]:null}:null,vr=(e,t)=>{let n={type:t.type||e.type,version:e.version||1,versionNonce:e.versionNonce??0,index:e.index??null,isDeleted:e.isDeleted??!1,id:e.id||It(),fillStyle:e.fillStyle||fe.fillStyle,strokeWidth:e.strokeWidth||fe.strokeWidth,strokeStyle:e.strokeStyle??fe.strokeStyle,roughness:e.roughness??fe.roughness,opacity:e.opacity==null?fe.opacity:e.opacity,angle:e.angle||0,x:t.x??e.x??0,y:t.y??e.y??0,strokeColor:e.strokeColor||fe.strokeColor,backgroundColor:e.backgroundColor||fe.backgroundColor,width:e.width||0,height:e.height||0,seed:e.seed??1,groupIds:e.groupIds??[],frameId:e.frameId??null,roundness:e.roundness?e.roundness:e.strokeSharpness==="round"?{type:Xi(e.type)?je.LEGACY:je.PROPORTIONAL_RADIUS}:null,boundElements:e.boundElementIds?e.boundElementIds.map(r=>({type:"arrow",id:r})):e.boundElements??[],updated:e.updated??cn(),link:e.link?Qr(e.link):null,locked:e.locked??!1};return("customData"in e||"customData"in t)&&(n.customData="customData"in t?t.customData:e.customData),{...n,...Sc(n),...t}},Iw=e=>{switch(e.type){case"text":let t=e.fontSize,n=e.fontFamily;if("font"in e){let[d,p]=e.font.split(" ");t=parseFloat(d),n=Sw(p)}let r=typeof e.text=="string"&&e.text||"",o=e.lineHeight||(e.height?mh(e):La(e.fontFamily));return e=vr(e,{fontSize:t,fontFamily:n,text:r,textAlign:e.textAlign||Or,verticalAlign:e.verticalAlign||Ri,containerId:e.containerId??null,originalText:e.originalText||r,autoResize:e.autoResize??!0,lineHeight:o}),!r&&!e.isDeleted&&(e={...e,originalText:r,isDeleted:!0},e=ei(e)),e;case"freedraw":return vr(e,{points:e.points,lastCommittedPoint:null,simulatePressure:e.simulatePressure,pressures:e.pressures});case"image":return vr(e,{status:e.status||"pending",fileId:e.fileId,scale:e.scale||[1,1]});case"line":case"draw":let{startArrowhead:i=null,endArrowhead:a=null}=e,s=e.x,l=e.y,c=!Array.isArray(e.points)||e.points.length<2?[[0,0],[e.width,e.height]]:e.points;return(c[0][0]!==0||c[0][1]!==0)&&({points:c,x:s,y:l}=J.getNormalizedPoints(e)),vr(e,{type:e.type==="draw"?"line":e.type,startBinding:Ka(e,e.startBinding),endBinding:Ka(e,e.endBinding),lastCommittedPoint:null,startArrowhead:i,endArrowhead:a,points:c,x:s,y:l,...xr(c)});case"arrow":{let{startArrowhead:d=null,endArrowhead:p="arrow"}=e,f=e.x,h=e.y,m=!Array.isArray(e.points)||e.points.length<2?[[0,0],[e.width,e.height]]:e.points;return(m[0][0]!==0||m[0][1]!==0)&&({points:m,x:f,y:h}=J.getNormalizedPoints(e)),vr(e,{type:e.type,startBinding:Ka(e,e.startBinding),endBinding:Ka(e,e.endBinding),lastCommittedPoint:null,startArrowhead:d,endArrowhead:p,points:m,x:f,y:h,elbowed:e.elbowed,...xr(m)})}case"ellipse":case"rectangle":case"diamond":case"iframe":case"embeddable":return vr(e,{});case"magicframe":case"frame":return vr(e,{name:e.name??null})}return null},Pw=(e,t)=>{if(e.boundElements){let n=e.boundElements.slice(),r=new Set;e.boundElements=n.reduce((o,i)=>{let a=t.get(i.id);if(a&&!r.has(i.id)){if(r.add(i.id),a.isDeleted)return o;o.push(i),Y(a)&&!a.containerId&&(a.containerId=e.id)}return o},[])}},_w=(e,t)=>{let n=e.containerId?t.get(e.containerId):null;if(!n){e.containerId=null;return}if(!e.isDeleted&&n.boundElements&&!n.boundElements.find(r=>r.id===e.id)){let r=(n.boundElements||(n.boundElements=[])).slice();r.push({type:"text",id:e.id}),n.boundElements=r}},kw=(e,t)=>{e.frameId&&(t.get(e.frameId)||(e.frameId=null))},e0=(e,t,n)=>{let r=new Set,o=t?Q(t):null,i=br((e||[]).reduce((s,l)=>{if(l.type!=="selection"&&!di(l)){let c=Iw(l);if(c){let d=o?.get(l.id);d&&d.version>c.version&&(c=ei(c,d.version)),r.has(c.id)&&(c={...c,id:It()}),r.add(c.id),s.push(c)}}return s},[]));if(!n?.repairBindings)return i;let a=Q(i);for(let s of i)s.frameId&&kw(s,a),Y(s)&&s.containerId?_w(s,a):s.boundElements&&Pw(s,a),n.refreshDimensions&&Y(s)&&Object.assign(s,pc(s,_e(s,a),a)),oe(s)&&(s.startBinding&&(!a.has(s.startBinding.elementId)||!Z(s))&&(s.startBinding=null),s.endBinding&&(!a.has(s.endBinding.elementId)||!Z(s))&&(s.endBinding=null));return i},Lw=(e,t,n)=>{let r=t[e];return r!==void 0?r:n[e]},J1={isSidebarDocked:(e,t)=>["defaultSidebarDockedPreference",e.isSidebarDocked??Lw("defaultSidebarDockedPreference",e,t)]},Cw=(e,t)=>{e=e||{};let n=ft(),r={};for(let o of Object.keys(J1))if(o in e){let[i,a]=J1[o](e,n);r[i]=a}for(let[o,i]of Object.entries(n)){let a=e[o],s=t?t[o]:void 0;r[o]=a!==void 0?a:s!==void 0?s:i}return{...r,cursorButton:t?.cursorButton||"up",penDetected:t?.penDetected??(e.penMode?e.penDetected??!1:!1),activeTool:{...Ao(n,r.activeTool.type&&Aw[r.activeTool.type]?r.activeTool:{type:"selection"}),lastActiveTool:null,locked:r.activeTool.locked??!1},zoom:typeof e.zoom=="number"?{value:e.zoom}:e.zoom?.value?e.zoom:n.zoom,openSidebar:typeof e.openSidebar=="string"?{name:op.name}:r.openSidebar}},ci=(e,t,n,r)=>({elements:e0(e?.elements,n,r),appState:Cw(e?.appState,t||null),files:e?.files||{}}),Q1=e=>{let t=e0(Ic(e.elements),null);return t.length?{...e,elements:t}:null},t0=(e=[],t)=>{let n=[];for(let r of e)if(Array.isArray(r)){let o=Q1({status:t,elements:r,id:It(),created:Date.now()});o&&n.push(o)}else{let o=r,i=Q1({...o,id:o.id||It(),status:o.status||t,created:o.created||Date.now()});i&&n.push(i)}return n};x();x();var _t=32,ue=12,jn=256,r0=50,Mr="NOT_SPREADSHEET",oo="VALID_SPREADSHEET",ui=e=>{let t=/^([-+]?)[$€£¥₩]?([-+]?)([\d.,]+)[%]?$/.exec(e);return t?parseFloat(`${(t[1]||t[2])+t[3]}`.replace(/,/g,"")):null},Pc=(e,t)=>e.slice(1).every(n=>ui(n[t])!==null),n0=e=>{let t=e[0].length;if(t>2)return{type:Mr,reason:"More than 2 columns"};if(t===1){if(!Pc(e,0))return{type:Mr,reason:"Value is not numeric"};let l=ui(e[0][0])===null,c=(l?e.slice(1):e).map(d=>ui(d[0]));return c.length<2?{type:Mr,reason:"Less than two rows"}:{type:oo,spreadsheet:{title:l?e[0][0]:null,labels:null,values:c}}}let n=Pc(e,0),r=Pc(e,1);if(!n&&!r)return{type:Mr,reason:"Value is not numeric"};let[o,i]=r?[0,1]:[1,0],a=ui(e[0][i])===null,s=a?e.slice(1):e;return s.length<2?{type:Mr,reason:"Less than 2 rows"}:{type:oo,spreadsheet:{title:a?e[0][i]:null,labels:s.map(l=>l[o]),values:s.map(l=>ui(l[i]))}}},Dw=e=>{let t=[];for(let n=0;n<e[0].length;n++){let r=[];for(let o=0;o<e.length;o++)r.push(e[o][n]);t.push(r)}return t},o0=e=>{let t=e.trim().split(`
|
|
48
|
+
`).map(i=>i.trim().split(" "));if(t.length&&t[0].length!==2&&(t=e.trim().split(`
|
|
49
|
+
`).map(i=>i.trim().split(","))),t.length===0)return{type:Mr,reason:"No values"};let n=t[0].length;if(!t.every(i=>i.length===n))return{type:Mr,reason:"All rows don't have same number of columns"};let o=n0(t);if(o.type!==oo){let i=n0(Dw(t));if(i.type===oo)return i}return o},ja=Xu(Wu),lt={fillStyle:"hachure",fontFamily:zt,fontSize:Ht,opacity:100,roughness:1,strokeColor:$.black,roundness:null,strokeStyle:"solid",strokeWidth:1,verticalAlign:sn.MIDDLE,locked:!1},i0=e=>{let t=(_t+ue)*e.values.length+ue,n=jn+ue*2;return{chartWidth:t,chartHeight:n}},Rw=(e,t,n,r,o)=>e.labels?.map((i,a)=>Qt({groupIds:[r],backgroundColor:o,...lt,text:i.length>8?`${i.slice(0,5)}...`:i,x:t+a*(_t+ue)+ue*2,y:n+ue/2,width:_t,angle:5.87,fontSize:16,textAlign:"center",verticalAlign:"top"}))||[],Fw=(e,t,n,r,o)=>{let i=Qt({groupIds:[r],backgroundColor:o,...lt,x:t-ue,y:n-ue,text:"0",textAlign:"right"}),a=Qt({groupIds:[r],backgroundColor:o,...lt,x:t-ue,y:n-jn-i.height/2,text:Math.max(...e.values).toLocaleString(),textAlign:"right"});return[i,a]},Ow=(e,t,n,r,o)=>{let{chartWidth:i,chartHeight:a}=i0(e),s=yr({backgroundColor:o,groupIds:[r],...lt,type:"line",x:t,y:n,width:i,points:[[0,0],[i,0]]}),l=yr({backgroundColor:o,groupIds:[r],...lt,type:"line",x:t,y:n,height:a,points:[[0,0],[0,-a]]}),c=yr({backgroundColor:o,groupIds:[r],...lt,type:"line",x:t,y:n-jn-ue,strokeStyle:"dotted",width:i,opacity:r0,points:[[0,0],[i,0]]});return[s,l,c]},a0=(e,t,n,r,o,i)=>{let{chartWidth:a,chartHeight:s}=i0(e),l=e.title?Qt({backgroundColor:o,groupIds:[r],...lt,text:e.title,x:t+a/2,y:n-jn-ue*2-Ht,roundness:null,textAlign:"center"}):null,c=i?Jo({backgroundColor:o,groupIds:[r],...lt,type:"rectangle",x:t,y:n-s,width:a,height:s,strokeColor:$.black,fillStyle:"solid",opacity:6}):null;return[...c?[c]:[],...l?[l]:[],...Rw(e,t,n,r,o),...Fw(e,t,n,r,o),...Ow(e,t,n,r,o)]},Nw=(e,t,n)=>{let r=Math.max(...e.values),o=It(),i=ja[Math.floor(Math.random()*ja.length)];return[...e.values.map((s,l)=>{let c=s/r*jn;return Jo({backgroundColor:i,groupIds:[o],...lt,type:"rectangle",x:t+l*(_t+ue)+ue,y:n-c-ue,width:_t,height:c})}),...a0(e,t,n,o,i,M.DEV)]},Bw=(e,t,n)=>{let r=Math.max(...e.values),o=It(),i=ja[Math.floor(Math.random()*ja.length)],a=0,s=[];for(let g of e.values){let E=a*(_t+ue),w=-(g/r)*jn;s.push([E,w]),a++}let l=Math.max(...s.map(g=>g[0])),c=Math.max(...s.map(g=>g[1])),d=Math.min(...s.map(g=>g[0])),p=Math.min(...s.map(g=>g[1])),f=yr({backgroundColor:i,groupIds:[o],...lt,type:"line",x:t+ue+_t/2,y:n-ue,height:c-p,width:l-d,strokeWidth:2,points:s}),h=e.values.map((g,E)=>{let w=E*(_t+ue)+ue/2,y=-(g/r)*jn+ue/2;return Jo({backgroundColor:i,groupIds:[o],...lt,fillStyle:"solid",strokeWidth:2,type:"ellipse",x:t+w+_t/2,y:n+y-ue*2,width:ue,height:ue})}),m=e.values.map((g,E)=>{let w=E*(_t+ue)+ue/2,y=g/r*jn+ue/2+ue;return yr({backgroundColor:i,groupIds:[o],...lt,type:"line",x:t+w+_t/2+ue/2,y:n-y,height:y,strokeStyle:"dotted",opacity:r0,points:[[0,0],[0,y]]})});return[...a0(e,t,n,o,i,M.DEV),f,...m,...h]},Tk=(e,t,n,r)=>e==="line"?Bw(t,n,r):Nw(t,n,r);var Rk="clipboard"in navigator&&"readText"in navigator.clipboard,Hw="clipboard"in navigator&&"writeText"in navigator.clipboard,Fk="clipboard"in navigator&&"write"in navigator.clipboard&&"ClipboardItem"in window&&"toBlob"in HTMLCanvasElement.prototype,zw=e=>!!([Xe.excalidraw,Xe.excalidrawClipboard,Xe.excalidrawClipboardWithAPI].includes(e?.type)&&Array.isArray(e.elements)),Ok=({types:e,files:t})=>{!e&&!t&&console.warn("createPasteEvent: no types or files provided");let n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});if(e)for(let[r,o]of Object.entries(e))try{if(n.clipboardData?.setData(r,o),n.clipboardData?.getData(r)!==o)throw new Error(`Failed to set "${r}" as clipboardData item`)}catch(i){throw new Error(i.message)}if(t){let r=-1;for(let o of t){r++;try{if(n.clipboardData?.items.add(o),n.clipboardData?.files[r]!==o)throw new Error(`Failed to set file "${o.name}" as clipboardData item`)}catch(i){throw new Error(i.message)}}}return n},Gw=({elements:e,files:t})=>{let n=Q(e),r=new Set(e.filter(s=>se(s))),o=!1,i=e.reduce((s,l)=>(Ut(l)&&(o=!0,t&&t[l.fileId]&&(s[l.fileId]=t[l.fileId])),s),{});o&&!t&&console.warn("copyToClipboard: attempting to file element(s) without providing associated `files` object.");let a={type:Xe.excalidrawClipboard,elements:e.map(s=>{if($e(s,n)&&!r.has($e(s,n))){let l=Qo(s);return B(l,{frameId:null}),l}return s}),files:t?i:void 0};return JSON.stringify(a)},s0=async(e,t,n)=>{await _c(Gw({elements:e,files:t}),n)},Uw=e=>{let t=o0(e);return t.type===oo?{spreadsheet:t.spreadsheet}:null};function l0(e){let t=[];for(let n of e.childNodes)if(n.nodeType===3){let r=n.textContent?.trim();r&&t.push({type:"text",value:r})}else if(n instanceof HTMLImageElement){let r=n.getAttribute("src");r&&r.startsWith("http")&&t.push({type:"imageUrl",value:r})}else t=t.concat(l0(n));return t}var Ww=e=>{let t=e.clipboardData?.getData("text/html");if(!t)return null;try{let n=new DOMParser().parseFromString(t,"text/html"),r=l0(n.body);if(r.length)return{type:"mixedContent",value:r}}catch(n){console.error(`error in parseHTMLFromPaste: ${n.message}`)}return null},Nk=async()=>{let e={};try{if(navigator.clipboard?.readText)return{"text/plain":await navigator.clipboard?.readText()}}catch(n){if(navigator.clipboard?.read)console.warn(`navigator.clipboard.readText() failed (${n.message}). Failling back to navigator.clipboard.read()`);else throw n}let t;try{t=await navigator.clipboard?.read()}catch(n){if(n.name==="DataError")return console.warn(`navigator.clipboard.read() error, clipboard is probably empty: ${n.message}`),e;throw n}for(let n of t)for(let r of n.types)if(xp(qu,r))try{e[r]=await(await n.getType(r)).text()}catch(o){console.warn(`Cannot retrieve ${r} from clipboardItem: ${o.message}`)}return Object.keys(e).length===0&&console.warn("No clipboard data found from clipboard.read()."),e},Vw=async(e,t=!1)=>{try{let n=!t&&e&&Ww(e);return n?n.value.every(o=>o.type==="text")?{type:"text",value:e.clipboardData?.getData("text/plain")||n.value.map(o=>o.value).join(`
|
|
50
|
+
`).trim()}:n:{type:"text",value:(e.clipboardData?.getData("text/plain")||"").trim()}}catch{return{type:"text",value:""}}},Bk=async(e,t=!1)=>{let n=await Vw(e,t);if(n.type==="mixedContent")return{mixedContent:n.value};try{let r=!t&&Uw(n.value);if(r)return r}catch(r){console.error(r)}try{let r=JSON.parse(n.value),o=r.type===Xe.excalidrawClipboardWithAPI;if(zw(r))return{elements:r.elements,files:r.files,text:t?JSON.stringify(r.elements,null,2):void 0,programmaticAPI:o}}catch{}return{text:n.value}},c0=async e=>{try{await navigator.clipboard.write([new window.ClipboardItem({[W.png]:e})])}catch(t){if(Ui(e))await navigator.clipboard.write([new window.ClipboardItem({[W.png]:await e})]);else throw t}},_c=async(e,t)=>{if(Hw)try{await navigator.clipboard.writeText(e||"");return}catch(n){console.error(n)}try{if(t){if(t.clipboardData?.setData("text/plain",e||""),t.clipboardData?.getData("text/plain")!==e)throw new Error("Failed to setData on clipboardEvent");return}}catch(n){console.error(n)}if(!Xw(e))throw new Error("Error copying to clipboard.")},Xw=e=>{e||(e=" ");let t=document.documentElement.getAttribute("dir")==="rtl",n=document.createElement("textarea");n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";let r=window.pageYOffset||document.documentElement.scrollTop;n.style.top=`${r}px`,n.style.fontSize="12pt",n.setAttribute("readonly",""),n.value=e,document.body.appendChild(n);let o=!1;try{n.select(),n.setSelectionRange(0,n.value.length),o=document.execCommand("copy")}catch(i){console.error(i)}return n.remove(),o};var Yw=({elements:e,appState:t,files:n,maxWidthOrHeight:r,getDimensions:o,exportPadding:i,exportingFrame:a})=>{let{elements:s,appState:l}=ci({elements:e,appState:t},null,null),{exportBackground:c,viewBackgroundColor:d}=l;return Z1(s,{...l,offsetTop:0,offsetLeft:0,width:0,height:0},n||{},{exportBackground:c,exportPadding:i,viewBackgroundColor:d,exportingFrame:a},(p,f)=>{let h=document.createElement("canvas");if(r){typeof o=="function"&&console.warn("`getDimensions()` is ignored when `maxWidthOrHeight` is supplied.");let g=Math.max(p,f),E=r<g?r/g:t?.exportScale??1;return h.width=p*E,h.height=f*E,{canvas:h,scale:E}}let m=o?.(p,f)||{width:p,height:f};return h.width=m.width,h.height=m.height,{canvas:h,scale:m.scale??1}})},$w=async e=>{let{mimeType:t=W.png,quality:n}=e;t===W.png&&typeof n=="number"&&console.warn(`"quality" will be ignored for "${W.png}" mimeType`),t==="image/jpg"&&(t=W.jpg),t===W.jpg&&!e.appState?.exportBackground&&(console.warn(`Defaulting "exportBackground" to "true" for "${W.jpg}" mimeType`),e={...e,appState:{...e.appState,exportBackground:!0}});let r=await Yw(e);return n=n||(/image\/jpe?g/.test(t)?.92:.8),new Promise((o,i)=>{r.toBlob(async a=>{if(!a)return i(new Error("couldn't export to blob"));a&&t===W.png&&e.appState?.exportEmbedScene&&(a=await d0({blob:a,metadata:li(e.elements,e.appState,e.files||{},"local")})),o(a)},t,n)})},Zw=async({elements:e,appState:t=ft(),files:n={},exportPadding:r,renderEmbeddables:o,exportingFrame:i,skipInliningFonts:a})=>{let{elements:s,appState:l}=ci({elements:e,appState:t},null,null),c={...l,exportPadding:r};return K1(s,c,n,{exportingFrame:i,renderEmbeddables:o,skipInliningFonts:a})},Zk=async e=>{if(e.type==="svg"){let t=await Zw(e);await _c(t.outerHTML)}else if(e.type==="png")await c0($w(e));else if(e.type==="json")await s0(e.elements,e.files);else throw new Error("Invalid export type")};x();var Kw=e=>e.type==="diamond"?[[e.width/2,0],[e.width,e.height/2],[e.width/2,e.height],[0,e.height/2]]:[[0,0],[0+e.width,0],[0+e.width,e.height],[0,e.height]],jw=e=>oe(e)||Se(e)?e.points:Kw(e),u0=e=>{let t=e.reduce((n,[r,o])=>(n.minY=Math.min(n.minY,o),n.minX=Math.min(n.minX,r),n.maxX=Math.max(n.maxX,r),n.maxY=Math.max(n.maxY,o),n),{minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0,cx:0,cy:0});return t.cx=(t.maxX+t.minX)/2,t.cy=(t.maxY+t.minY)/2,t},f0=e=>{let t=jw(e),{cx:n,cy:r}=u0(t),o=[n,r],i=t.map(d=>N([d[0],d[1]],o,e.angle)),{minX:a,minY:s,maxX:l,maxY:c}=u0(i);return[a+e.x,s+e.y,l+e.x,c+e.y]},p0=(e,t,n=!1)=>{let r=f0(e),o=t[0]<=r[0]&&t[2]>=r[2]&&t[1]<=r[1]&&t[3]>=r[3];return n?o?!0:r[0]<=t[0]&&r[2]>=t[2]&&r[1]<=t[1]&&r[3]>=t[3]:o},qw=(e,t)=>{let n=f0(e);return(qo(n[0],t[0],t[2])||qo(t[0],n[0],n[2]))&&(qo(n[1],t[1],t[3])||qo(t[1],n[1],n[3]))},h0=({elements:e,bounds:t,type:n,errorMargin:r=0})=>{tl(t)&&(t=Qe(t,Q(e)));let o=[t[0]-r,t[1]-r,t[2]+r,t[3]+r],i=new Set;for(let a of e){if(i.has(a.id))continue;if(n==="overlap"?qw(a,o):n==="inside"?p0(a,o):p0(a,o,!0)){if(i.add(a.id),a.boundElements)for(let l of a.boundElements)i.add(l.id);Y(a)&&a.containerId&&i.add(a.containerId),Z(a)&&(a.startBinding&&i.add(a.startBinding.elementId),a.endBinding&&i.add(a.endBinding?.elementId))}}return e.filter(a=>i.has(a.id))};x();function m0(e){return[Math.min(e[0][0],e[1][0]),Math.min(e[0][1],e[1][1]),Math.max(e[0][0],e[1][0]),Math.max(e[0][1],e[1][1])]}function x0(e,t){return e[0]*t[1]-t[0]*e[1]}function Jw(e,t){return e[0]<=t[2]&&e[2]>=t[0]&&e[1]<=t[3]&&e[3]>=t[1]}function qa(e,t){return[e[0]-t[0],e[1]-t[1]]}var Qw=1e-6;function g0(e,t){let n=qa(e[1],e[0]),r=qa(t,e[0]),o=x0(n,r);return Math.abs(o)<Qw}function kc(e,t){let n=qa(e[1],e[0]),r=qa(t,e[0]);return x0(n,r)<0}function E0(e,t){return g0(e,t[0])||g0(e,t[1])||(kc(e,t[0])?!kc(e,t[1]):kc(e,t[1]))}function w0(e,t){return Jw(m0(e),m0(t))&&E0(e,t)&&E0(t,e)}var bL=(e,t,n)=>{let r=Q(e);for(let o of t)if(o.frameId){let i=n.get(o.id),a=n.get(o.frameId);if(i){let s=r.get(i);s&&B(s,{frameId:a??o.frameId},!1)}}};function y0(e,t,n){let r=lc(t,n),o=lc(e,n);return r.some(a=>o.some(s=>w0(a,s)))}var b0=(e,t,n)=>Ja(ca(e,t,n,!1)).filter(r=>!se(r)&&!r.frameId||r.frameId===t.id),v0=(e,t,n,r)=>ca(e,t,r).some(o=>o.id===n.id);var M0=(e,t,n)=>{let[r,o,i,a]=H(t,n),[s,l,c,d]=Oe(e);return r<=s&&o<=l&&i>=c&&a>=d},Kn=(e,t,n)=>M0([e],t,n)||y0(e,t,n)||v0([t],e,t,n),vL=(e,t,n)=>{let[r,o,i,a]=H(t,n);return ha([r,o],[e.x,e.y],[i,a])};var ML=e=>{let t=new Map;for(let n of e){let r=se(n)?n.id:n.frameId;r&&!t.has(r)&&t.set(r,pi(e,r))}return t},pi=(e,t)=>{let n=[];for(let r of e.values())r.frameId===t&&n.push(r);return n},Tc=e=>e.filter(t=>se(t)),Ac=e=>{let t=Q(Tc(e));return e.filter(n=>t.has(n.id)||!n.frameId||!t.has(n.frameId))},TL=(e,t,n,r)=>{let o=pi(e,t.id),i=new Set(o),a=new Set([...b0(e,t,r),...o.filter(f=>v0(e,f,t,r))]),s=o.filter(f=>!a.has(f)),l=new Set(Array.from(a).flatMap(f=>f.groupIds));for(let f of s)if(!y0(f,t,r))f.groupIds.length===0&&i.delete(f);else if(f.groupIds.length>0)for(let h of f.groupIds)l.add(h);for(let f of s)if(f.groupIds.length>0){let h=!0;for(let m of f.groupIds)l.has(m)&&(h=!1);h&&i.delete(f)}let c=Array.from(a).filter(f=>f.groupIds.length===0);for(let f of c)i.add(f);let d=Array.from(a).filter(f=>f.groupIds.length>0),p=Qh(d,n);for(let[f,h]of Object.entries(p))if(h){let m=Jr(e,f);if(M0(m,t,r))for(let g of m)i.add(g)}return[...i].filter(f=>!(Y(f)&&f.containerId))},AL=(e,t,n)=>Ja(e,b0(e,t,n)),$e=(e,t)=>e.frameId&&t.get(e.frameId)||null,SL=(e,t)=>{let n=new Set,r=Q(e);e=Ja(e);for(let a of e)se(a)&&a.id!==t.id&&n.add(a.id);let o=new Set,i=[];for(let a of e)if(!(se(a)||a.frameId&&n.has(a.frameId)))if(a.groupIds.length){let s=a.groupIds.at(-1);if(!o.has(s)){o.add(s);let l=Jr(e,s);if(l.some(c=>Kn(c,t,r)))for(let c of l)i.push(c)}}else Kn(a,t,r)&&i.push(a);return i},ey=(e,t,n)=>{let r=Q(e),o=new Map;for(let l of e.values())l.frameId===n.id&&o.set(l.id,!0);let i=new Set(t.map(l=>l.id)),a=[],s=new Set;for(let l of t)se(l)&&l.id!==n.id&&s.add(l.id);for(let l of Ja(e,t)){if(se(l)||l.frameId&&s.has(l.frameId))continue;o.has(l.id)||a.push(l);let c=ee(l,r);c&&!i.has(c.id)&&!o.has(c.id)&&a.push(c)}for(let l of a)B(l,{frameId:n.id},!1);return e},T0=(e,t)=>{let n=new Map,r=new Map;for(let o of e)if(o.frameId){n.set(o.id,o);let i=r.get(o.frameId)||[];i.push(o);let a=ee(o,t);a&&(n.set(a.id,a),i.push(a)),r.set(o.frameId,i)}for(let[,o]of n)B(o,{frameId:null},!1)},ty=(e,t)=>{let n=pi(e,t.id);return T0(n,Q(e)),e},IL=(e,t,n,r)=>ey(ty(e,n),t,n).slice(),PL=(e,t,n)=>{let r=n.scene.getSelectedElements({selectedElementIds:t.selectedElementIds,elements:e}),o=new Set(r);if(t.editingGroupId)for(let s of r)s.groupIds.length===0?o.add(s):s.groupIds.flatMap(l=>Jr(e,l)).forEach(l=>o.add(l));let i=new Set,a=Q(e);return o.forEach(s=>{s.frameId&&!se(s)&&!Za(s,a,t)&&i.add(s)}),i.size>0&&T0(i,a),e},Ja=(e,t)=>{let n=new Set,r=t||e;for(let a of r.values()){let s=a.groupIds[a.groupIds.length-1];s&&n.add(s)}let o=new Set;for(let a of n)Jr(e,a).some(s=>se(s))&&o.add(a);let i=[];for(let a of r.values())o.has(a.groupIds[a.groupIds.length-1])||i.push(a);return i},$a=(e,t,n)=>{let r=Y(e)&&_e(e,t)||e;return n.selectedElementIds[r.id]&&n.selectedElementsAreBeingDragged?n.frameToHighlight:$e(r,t)},Za=(e,t,n)=>{let r=$a(e,t,n),o=Y(e)&&_e(e,t)||e;if(r){if(!n.selectedElementIds[e.id]||!n.selectedElementsAreBeingDragged)return!0;if(o.groupIds.length===0)return Kn(o,r,t);let i=new Set(o.groupIds.flatMap(a=>Jr(t,a)));if(n.editingGroupId&&n.selectedElementsAreBeingDragged){let a=new Set(bt(t,n));if(n.frameToHighlight!==null)return!0;a.forEach(l=>{i.delete(l)})}for(let a of i)if(se(a))return!1;for(let a of i)if(Kn(a,r,t))return!0}return!1},j1=e=>e.name===null?bp(e)?"Frame":"AI Frame":e.name,q1=(e,t)=>h0({elements:e,bounds:t,type:"overlap"}).filter(n=>!n.frameId||n.frameId===t.id);var ny=e=>{let t=new Set;return e.forEach(n=>{se(n)&&t.add(n.id)}),e.filter(n=>!(n.frameId&&t.has(n.frameId)))},ca=(e,t,n,r=!0)=>{let[o,i,a,s]=H(t,n),l=e.filter(c=>{let[d,p,f,h]=Qe(c,n),m=$e(c,n);if(m){let[g,E,w,y]=Qe(m,n);d=Math.max(g,d),p=Math.max(E,p),f=Math.min(w,f),h=Math.min(y,h)}return c.locked===!1&&c.type!=="selection"&&!ke(c)&&o<=d&&i<=p&&a>=f&&s>=h});return l=r?ny(l):l,l=l.filter(c=>{let d=$e(c,n);return d?Kn(c,d,n):!0}),l},OL=(e,t,n,r)=>{let o=new Set(t.map(i=>i.id));return e.filter(i=>{let a=A0(i,n.width,n.height,n,r);return!o.has(i.id)&&a})},qg=function(){let e=null,t=null,n=null,r=(o,i)=>(n!=null&&o===e&&i.selectedElementIds===t||(n=o.some(a=>i.selectedElementIds[a.id]),e=o,t=i.selectedElementIds),n);return r.clearCache=()=>{e=null,t=null,n=null},r}(),Jg=(e,t,n)=>{let r=Array.from(new Set(bt(e,t).map(o=>n(o))));return r.length===1?r[0]:null},bt=(e,t,n)=>{let r=[];for(let o of e.values()){if(t.selectedElementIds[o.id]){r.push(o);continue}if(n?.includeBoundTextElement&&ke(o)&&t.selectedElementIds[o?.containerId]){r.push(o);continue}}if(n?.includeElementsInFrames){let o=[];return r.forEach(i=>{se(i)&&pi(e,i.id).forEach(a=>o.push(a)),o.push(i)}),o}return r},Qg=(e,t)=>t.editingElement?[t.editingElement]:bt(e,t,{includeBoundTextElement:!0}),uc=(e,t)=>un(t.selectedElementIds,e)?t.selectedElementIds:e;var S0=e=>{let t=new Map,n=[];for(let r of e)r.isDeleted||(n.push(r),t.set(r.id,r));return{elementsMap:t,elements:n}},ry=e=>{let t=["includeBoundTextElement","includeElementsInFrames"],n="";for(let r of t)n+=`${r}:${e[r]?"1":"0"}`;return n},I0=e=>typeof e=="string",Lc=class e{static sceneMapByElement=new WeakMap;static sceneMapById=new Map;static mapElementToScene(t,n){I0(t)?this.sceneMapById.set(t,n):(this.sceneMapByElement.set(t,n),this.sceneMapById.set(t.id,n))}static getScene(t){return I0(t)?this.sceneMapById.get(t)||null:this.sceneMapByElement.get(t)||null}callbacks=new Set;nonDeletedElements=[];nonDeletedElementsMap=ht(new Map);elements=[];nonDeletedFramesLikes=[];frames=[];elementsMap=ht(new Map);selectedElementsCache={selectedElementIds:null,elements:null,cache:new Map};sceneNonce;getSceneNonce(){return this.sceneNonce}getNonDeletedElementsMap(){return this.nonDeletedElementsMap}getElementsIncludingDeleted(){return this.elements}getElementsMapIncludingDeleted(){return this.elementsMap}getNonDeletedElements(){return this.nonDeletedElements}getFramesIncludingDeleted(){return this.frames}getSelectedElements(t){let n=ry(t),r=t?.elements||this.nonDeletedElements;if(this.selectedElementsCache.elements===r&&this.selectedElementsCache.selectedElementIds===t.selectedElementIds){let i=this.selectedElementsCache.cache.get(n);if(i)return i}else t?.elements==null&&this.selectedElementsCache.cache.clear();let o=bt(r,{selectedElementIds:t.selectedElementIds},t);return t?.elements==null&&(this.selectedElementsCache.selectedElementIds=t.selectedElementIds,this.selectedElementsCache.elements=this.nonDeletedElements,this.selectedElementsCache.cache.set(n,o)),o}getNonDeletedFramesLikes(){return this.nonDeletedFramesLikes}getElement(t){return this.elementsMap.get(t)||null}getNonDeletedElement(t){let n=this.getElement(t);return n&&P0(n)?n:null}mapElements(t){let n=!1,r=this.elements.map(o=>{let i=t(o);return i!==o&&(n=!0),i});return n&&this.replaceAllElements(r),n}replaceAllElements(t){let n=t instanceof Array?t:Array.from(t.values()),r=[];(M.DEV||M.MODE===it.TEST||window?.DEBUG_FRACTIONAL_INDICES)&&hc(n,{includeBoundTextValidation:!0,shouldThrow:M.DEV||M.MODE===it.TEST}),this.elements=br(n),this.elementsMap.clear(),this.elements.forEach(i=>{se(i)&&r.push(i),this.elementsMap.set(i.id,i),e.mapElementToScene(i,this)});let o=S0(this.elements);this.nonDeletedElements=o.elements,this.nonDeletedElementsMap=o.elementsMap,this.frames=r,this.nonDeletedFramesLikes=S0(this.frames).elements,this.triggerUpdate()}triggerUpdate(){this.sceneNonce=qt();for(let t of Array.from(this.callbacks))t()}onUpdate(t){if(this.callbacks.has(t))throw new Error;return this.callbacks.add(t),()=>{if(!this.callbacks.has(t))throw new Error;this.callbacks.delete(t)}}destroy(){this.elements=[],this.nonDeletedElements=[],this.nonDeletedFramesLikes=[],this.frames=[],this.elementsMap.clear(),this.selectedElementsCache.selectedElementIds=null,this.selectedElementsCache.elements=null,this.selectedElementsCache.cache.clear(),e.sceneMapById.forEach((t,n)=>{t===this&&e.sceneMapById.delete(n)}),this.callbacks.clear()}insertElementAtIndex(t,n){if(!Number.isFinite(n)||n<0)throw new Error("insertElementAtIndex can only be called with index >= 0");let r=[...this.elements.slice(0,n),t,...this.elements.slice(n)];ni(r,Q([t])),this.replaceAllElements(r)}insertElementsAtIndex(t,n){if(!Number.isFinite(n)||n<0)throw new Error("insertElementAtIndex can only be called with index >= 0");let r=[...this.elements.slice(0,n),...t,...this.elements.slice(n)];ni(r,Q(t)),this.replaceAllElements(r)}insertElement=t=>{let n=t.frameId?this.getElementIndex(t.frameId):this.elements.length;this.insertElementAtIndex(t,n)};insertElements=t=>{let n=t[0].frameId?this.getElementIndex(t[0].frameId):this.elements.length;this.insertElementsAtIndex(t,n)};getElementIndex(t){return this.elements.findIndex(n=>n.id===t)}getContainerElement=t=>t&&t.containerId&&this.getElement(t.containerId)||null},io=Lc;var B=(e,t,n=!0)=>{let r=!1,{points:o,fileId:i}=t;typeof o<"u"&&(t={...xr(o),...t});for(let a in t){let s=t[a];if(typeof s<"u"){if(e[a]===s&&(typeof s!="object"||s===null||a==="groupIds"||a==="scale"))continue;if(a==="scale"){let l=e[a],c=s;if(l[0]===c[0]&&l[1]===c[1])continue}else if(a==="points"){let l=e[a],c=s;if(l.length===c.length){let d=!1,p=l.length;for(;--p;){let f=l[p],h=c[p];if(f[0]!==h[0]||f[1]!==h[1]){d=!0;break}}if(!d)continue}}e[a]=s,r=!0}}return r&&((typeof t.height<"u"||typeof t.width<"u"||typeof i<"u"||typeof o<"u")&&ce.delete(e),e.version++,e.versionNonce=qt(),e.updated=cn(),n&&io.getScene(e)?.triggerUpdate()),e},Pt=(e,t,n=!1)=>{let r=!1;for(let o in t){let i=t[o];if(typeof i<"u"){if(e[o]===i&&(typeof i!="object"||i===null))continue;r=!0}}return!r&&!n?e:{...e,...t,updated:cn(),version:e.version+1,versionNonce:qt()}},ei=(e,t)=>(e.version=(t??e.version)+1,e.versionNonce=qt(),e.updated=cn(),e);var di=e=>oe(e)||Se(e)?e.points.length<2:e.width===0&&e.height===0,A0=(e,t,n,r,o)=>{let[i,a,s,l]=Qe(e,o),c=So({clientX:r.offsetLeft,clientY:r.offsetTop},r),d=So({clientX:r.offsetLeft+t,clientY:r.offsetTop+n},r);return c.x<=s&&c.y<=l&&d.x>=i&&d.y>=a},Qa=(e,t,n)=>{let r=Math.abs(t),o=Math.abs(n);if(e==="line"||e==="arrow"||e==="freedraw"){let i=Math.round(Math.atan(o/r)/Bt)*Bt;i===0?n=0:i===Math.PI/2?t=0:n=r*Math.tan(i)*Math.sign(n)||n}else e!=="selection"&&(n=r*Math.sign(n));return{width:t,height:n}},Zl=(e,t,n,r)=>{let o=n-e,i=r-t,a=Math.round(Math.atan(i/o)/Bt)*Bt;if(a===0)i=0;else if(a===Math.PI/2)o=0;else{let s=Math.tan(a),l=-1,c=t-s*e,d=-1/s,p=-1,f=r-d*n,h=(l*f-p*c)/(s*p-d*l),m=(c*d-f*s)/(s*p-d*l);o=h-e,i=m-t}return{width:o,height:i}};var Sc=e=>{let t={width:e.width,height:e.height,x:e.x,y:e.y};if(e.width<0){let n=Math.abs(e.width);t.width=n,t.x=e.x-n}if(e.height<0){let n=Math.abs(e.height);t.height=n,t.y=e.y-n}return t};x();var _0={mouse:8,pen:16,touch:28},oy=16,L0={e:!0,s:!0,n:!0,w:!0};var k0={e:!0,s:!0,n:!0,w:!0,nw:!0,se:!0},Cc={e:!0,s:!0,n:!0,w:!0},vn=(e,t,n,r,o,i,a)=>{let[s,l]=j(e+n/2,t+r/2,o,i,a);return[s-n/2,l-r/2,n,r]},es=e=>!(e.viewport.isMobile||e.isTouchScreen&&(Yu||$u)),Dc=e=>es(e)?L0:{},ts=([e,t,n,r,o,i],a,s,l,c={},d=4)=>{let p=_0[l],f=p/s.value,h=p/s.value,m=p/s.value,g=p/s.value,E=n-e,w=r-t,y=d/s.value,b=(p-To*2)/(2*s.value),T={nw:c.nw?void 0:vn(e-y-m+b,t-y-g+b,f,h,o,i,a),ne:c.ne?void 0:vn(n+y-b,t-y-g+b,f,h,o,i,a),sw:c.sw?void 0:vn(e-y-m+b,r+y-b,f,h,o,i,a),se:c.se?void 0:vn(n+y-b,r+y-b,f,h,o,i,a),rotation:c.rotation?void 0:vn(e+E/2-f/2,t-y-g+b-oy/s.value,f,h,o,i,a)},A=5*_0.mouse/s.value;return Math.abs(E)>A&&(c.n||(T.n=vn(e+E/2-f/2,t-y-g+b,f,h,o,i,a)),c.s||(T.s=vn(e+E/2-f/2,r+y-b,f,h,o,i,a))),Math.abs(w)>A&&(c.w||(T.w=vn(e-y-m+b,t+w/2-h/2,f,h,o,i,a)),c.e||(T.e=vn(n+y-b,t+w/2-h/2,f,h,o,i,a))),T},Rc=(e,t,n,r="mouse",o=L0)=>{if(e.locked||ie(e))return{};if(e.type==="freedraw"||oe(e)){if(e.points.length===2){let[,a]=e.points;a[0]===0||a[1]===0?o=Cc:a[0]>0&&a[1]<0?o=k0:a[0]>0&&a[1]>0?o=Cc:a[0]<0&&a[1]>0?o=k0:a[0]<0&&a[1]<0&&(o=Cc)}}else se(e)&&(o={...o,rotation:!0});let i=oe(e)?To+8:To;return ts(H(e,n,!0),e.angle,t,r,o,i)},fC=(e,t)=>{if(t.editingLinearElement)return!1;if(e.length>1)return!0;let n=e[0];return ie(n)?!1:oe(n)?n.points.length>2:!0};x();var Oc=(e,t,n)=>t>=e[0]&&t<=e[0]+e[2]&&n>=e[1]&&n<=e[1]+e[3],C0=(e,t,n,r,o,i,a,s)=>{if(!n.selectedElementIds[e.id])return!1;let{rotation:l,...c}=Rc(e,i,t,a,Dc(s));if(l&&Oc(l,r,o))return"rotation";let d=Object.keys(c).filter(p=>{let f=c[p];return f?Oc(f,r,o):!1});if(d.length>0)return d[0];if(es(s)){let[p,f,h,m,g,E]=H(e,t);if(!(oe(e)&&e.points.length<=2)){let w=Fi/i.value,y=D0([p-w,f-w],[h+w,m+w],[g,E],yt(e.angle));for(let[b,T]of Object.entries(y))if(hr([r,o],T,w))return b}}return!1},iy=(e,t,n,r,o,i,a,s)=>e.reduce((l,c)=>{if(l)return l;let d=C0(c,a,t,n,r,o,i,s);return d?{element:c,transformHandleType:d}:null},null),ay=([e,t,n,r],o,i,a,s,l)=>{let c=ts([e,t,n,r,(e+n)/2,(t+r)/2],0,a,s,Dc(l)),d=Object.keys(c).find(p=>{let f=c[p];return f&&Oc(f,o,i)});if(d)return d;if(es(l)){let p=(e+n)/2,f=(t+r)/2,h=Fi/a.value,m=D0([e-h,t-h],[n+h,r+h],[p,f],yt(0));for(let[g,E]of Object.entries(m))if(hr([o,i],E,h))return g}return!1},Fc=["ns","nesw","ew","nwse"],sy=(e,t)=>{let n=Fc.indexOf(e);if(n>=0){let r=Math.round(t/(Math.PI/4));e=Fc[(n+r)%Fc.length]}return e},ly=e=>{let{element:t,transformHandleType:n}=e,r=t&&Math.sign(t.height)*Math.sign(t.width)===-1,o=null;switch(n){case"n":case"s":o="ns";break;case"w":case"e":o="ew";break;case"nw":case"se":r?o="nesw":o="nwse";break;case"ne":case"sw":r?o="nwse":o="nesw";break;case"rotation":return"grab"}return o&&t&&(o=sy(o,t.angle)),o?`${o}-resize`:""},D0=([e,t],[n,r],o,i)=>{let a=ye([e,t],i,o),s=ye([n,t],i,o),l=ye([e,r],i,o),c=ye([n,r],i,o);return{n:[a,s],e:[s,c],s:[c,l],w:[l,a]}};x();var ns=e=>e<0?e+2*Math.PI:e>=2*Math.PI?e-2*Math.PI:e,cy=(e,t,n,r,o,i,a,s,l,c,d,p)=>{if(n.length===1){let[f]=n;return t==="rotation"?ie(f)||(dy(f,r,s,l,o),$t(f,r,p)):Y(f)&&t?(py(e,f,r,t,i,s,l),$t(f,r,p)):t&&fy(e,a,f,r,t,i,s,l,p),!0}else if(n.length>1){if(t==="rotation")return my(e,n,r,s,l,o,c,d,p),!0;if(t)return hy(e,n,r,t,i,a,s,l,p),!0}return!1},dy=(e,t,n,r,o)=>{let[i,a,s,l]=H(e,t),c=(i+s)/2,d=(a+l)/2,p;se(e)?p=0:(p=5*Math.PI/2+Math.atan2(r-d,n-c),o&&(p+=Bt/2,p-=p%Bt),p=ns(p));let f=gn(e);if(B(e,{angle:p}),f){let h=io.getScene(e)?.getElement(f);h&&!Z(e)&&B(h,{angle:p})}},uy=(e,t,n,r)=>oe(e)||Se(e)?{points:Wn(0,t,Wn(1,n,e.points,r),r)}:{},Nc=(e,t,n)=>{let r=e.width;if(ke(e)){let a=_e(e,t);a&&(r=At(a,e))}let i=e.fontSize*(n/r);return i<Di?null:{size:i}},py=(e,t,n,r,o,i,a)=>{let[s,l,c,d,p,f]=H(t,n),[h,m]=j(i,a,p,f,-t.angle),g=0,E=0;r!=="e"&&r!=="w"&&(r.includes("e")&&(g=(h-s)/(c-s)),r.includes("w")&&(g=(c-h)/(c-s)),r.includes("n")&&(E=(d-m)/(d-l)),r.includes("s")&&(E=(m-l)/(d-l)));let w=Math.max(g,E);if(w>0){let y=t.width*w,b=t.height*w,T=Nc(t,n,y);if(T===null)return;let A=[s,l],k=[c,d],P=[p,f],I=[s,l];if(["n","w","nw"].includes(r)&&(I=[k[0]-Math.abs(y),k[1]-Math.abs(b)]),r==="ne"){let X=[A[0],k[1]];I=[X[0],X[1]-Math.abs(b)]}if(r==="sw"){let X=[k[0],A[1]];I=[X[0]-Math.abs(y),X[1]]}["s","n"].includes(r)&&(I[0]=P[0]-y/2),["e","w"].includes(r)&&(I[1]=P[1]-b/2),o&&(I[0]=P[0]-Math.abs(y)/2,I[1]=P[1]-Math.abs(b)/2);let _=t.angle,D=N(I,[p,f],_),S=[I[0]+Math.abs(y)/2,I[1]+Math.abs(b)/2],L=N(S,[p,f],_);I=N(D,L,-_);let[O,G]=I;B(t,{fontSize:T.size,width:y,height:b,x:O,y:G})}if(r==="e"||r==="w"){let y=e.get(t.id),[b,T,A,k]=xn(y,y.width,y.height,!0),P=[b,T],I=[A,k],_=Kr(P,I),D=N([i,a],_,-y.angle),[S,,L]=xn(t,t.width,t.height,!0),O=L-S,G=I[0]-P[0],X=Sa(he({fontSize:t.fontSize,fontFamily:t.fontFamily}),t.lineHeight),U=G/O;r.includes("e")&&(U=(D[0]-P[0])/O),r.includes("w")&&(U=(I[0]-D[0])/O);let F=t.width*U<X?X:t.width*U,K=Yn(t.originalText,he(t),Math.abs(F)),R=Kt(K,he(t),t.lineHeight),q=R.height,[we,me,Ie,ge]=xn(y,F,q,!0),et=Ie-we,en=ge-me,Ce=[...P];["n","w","nw"].includes(r)&&(Ce=[I[0]-Math.abs(et),P[1]]);let kt=y.angle,Tn=N(Ce,_,kt),Ge=[Ce[0]+Math.abs(et)/2,Ce[1]+Math.abs(en)/2],tt=N(Ge,_,kt);Ce=N(Tn,tt,-kt);let Ue={width:Math.abs(F),height:Math.abs(R.height),x:Ce[0],y:Ce[1],text:K,autoResize:!1};B(t,Ue)}},fy=(e,t,n,r,o,i,a,s,l)=>{if(Z(n)&&ie(n)&&(n.startBinding||n.endBinding))return;let c=e.get(n.id),[d,p,f,h]=xn(c,c.width,c.height,!0),m=[d,p],g=[f,h],E=Kr(m,g),w=N([a,s],E,-c.angle),[y,b,T,A]=xn(n,n.width,n.height,!0),k=T-y,P=A-b,I=g[0]-m[0],_=g[1]-m[1],D=I/k,S=_/P,L={},O=ee(n,r);o.includes("e")&&(D=(w[0]-m[0])/k),o.includes("s")&&(S=(w[1]-m[1])/P),o.includes("w")&&(D=(g[0]-w[0])/k),o.includes("n")&&(S=(g[1]-w[1])/P);let G=c.width,X=c.height,U=n.width*D,F=n.height*S;if(i&&(U=2*U-G,F=2*F-X),t){let We=Math.abs(U)/G,Ar=Math.abs(F)/X;if(o.length===1&&(F*=We,U*=Ar),o.length===2){let Jn=Math.max(We,Ar);U=G*Jn*Math.sign(U),F=X*Jn*Math.sign(F)}}if(O){let We=e.get(O.id);if(We&&(L={fontSize:We.fontSize}),t){let Ar={...n,width:U,height:F},Jn=Nc(O,r,At(Ar,O));if(Jn===null)return;L={fontSize:Jn.size}}else{let Ar=yh(he(O),O.lineHeight),Jn=gh(O.fontSize,O.lineHeight);U=Math.max(U,Ar),F=Math.max(F,Jn)}}let[K,R,q,we]=xn(c,U,F,!0),me=q-K,Ie=we-R,ge=[...m];if(["n","w","nw"].includes(o)&&(ge=[g[0]-Math.abs(me),g[1]-Math.abs(Ie)]),o==="ne"){let We=[m[0],g[1]];ge=[We[0],We[1]-Math.abs(Ie)]}if(o==="sw"){let We=[g[0],m[1]];ge=[We[0]-Math.abs(me),We[1]]}t&&(["s","n"].includes(o)&&(ge[0]=E[0]-me/2),["e","w"].includes(o)&&(ge[1]=E[1]-Ie/2));let et=U<0,en=F<0;et&&(o.includes("e")&&(ge[0]-=Math.abs(me)),o.includes("w")&&(ge[0]+=Math.abs(me))),en&&(o.includes("s")&&(ge[1]-=Math.abs(Ie)),o.includes("n")&&(ge[1]+=Math.abs(Ie))),i&&(ge[0]=E[0]-Math.abs(me)/2,ge[1]=E[1]-Math.abs(Ie)/2);let Ce=c.angle,kt=N(ge,E,Ce),Tn=[ge[0]+Math.abs(me)/2,ge[1]+Math.abs(Ie)/2],Ge=N(Tn,E,Ce);ge=N(kt,Ge,-Ce);let tt=[...ge],Ue=c.x-K,ao=c.y-R;tt[0]+=Ue,tt[1]+=ao;let qn=tt[0],U0=tt[1],Uc,Wc;(oe(n)||Se(n))&&(Uc=Wn(1,F,c.points,!0),Wc=Wn(0,U,Uc,!0));let Tr={width:Math.abs(U),height:Math.abs(F),x:qn,y:U0,points:Wc};if("scale"in n&&"scale"in c&&B(n,{scale:[(Math.sign(q-c.x)||c.scale[0])*c.scale[0],(Math.sign(we-c.y)||c.scale[1])*c.scale[1]]}),Z(n)&&O&&t){let We=Tr.width/n.width*O.fontSize;if(We<Di)return;L.fontSize=We}Tr.width!==0&&Tr.height!==0&&Number.isFinite(Tr.x)&&Number.isFinite(Tr.y)&&(B(n,Tr),$t(n,r,l,{oldSize:{width:c.width,height:c.height}}),O&&L!=null&&B(O,{fontSize:L.fontSize}),Er(n,r,o,t))},hy=(e,t,n,r,o,i,a,s,l)=>{let c=t.reduce((R,q)=>{let we=e.get(q.id);return we&&R.push({orig:we,latest:q}),R},[]),d=c.reduce((R,{orig:q})=>{if(!oe(q))return R;let we=gn(q);if(!we)return R;let me=e.get(we)??null;if(!ke(me))return R;let Ie=J.getBoundTextElementPosition(q,me,n);return[...R,{...me,...Ie}]},[]),{minX:p,minY:f,maxX:h,maxY:m,midX:g,midY:E}=jh(c.map(({orig:R})=>R).concat(d)),w=h-p,y=m-f,b=r,T={ne:[p,m],se:[p,f],sw:[h,f],nw:[h,m],e:[p,f+y/2],w:[h,f+y/2],n:[p+w/2,m],s:[p+w/2,f]},[A,k]=o?[g,E]:T[b],P=o?2:1,I=Math.max(Math.abs(a-A)/w||0,Math.abs(s-k)/y||0)*P;if(I===0)return;let _=b.includes("e")||b.includes("w")?Math.abs(a-A)/w*P:1,D=b.includes("n")||b.includes("s")?Math.abs(s-k)/y*P:1,S=i||c.some(R=>R.latest.angle!==0||Y(R.latest)||n1(R.latest));S&&(_=I,D=I);let L={ne:[a<A,s>k],se:[a<A,s<k],sw:[a>A,s<k],nw:[a>A,s>k],e:[a<A,!1],w:[a>A,!1],n:[!1,s>k],s:[!1,s<k]},[O,G]=L[b].map(R=>R?-1:1),X=O<0,U=G<0,F=[];for(let{orig:R,latest:q}of c){if(Y(R)&&ke(R))continue;let we=R.width*_,me=R.height*D,Ie=ns(R.angle*O*G),ge=oe(R)||Se(R),et=R.x-A,en=R.y-k,Ce=X&&!ge?we:0,kt=U&&!ge?me:0,Tn=A+O*(et*_+Ce),Ge=k+G*(en*D+kt),tt=uy(R,we*O,me*G,!1),Ue={x:Tn,y:Ge,width:we,height:me,angle:Ie,...tt};if(Wi(R)&&(Ue.scale=[R.scale[0]*O,R.scale[1]*G]),Y(R)){let qn=Nc(R,n,we);if(!qn)return;Ue.fontSize=qn.size}let ao=e.get(gn(R)??"");if(ao)if(S){let qn=ao.fontSize*I;if(qn<Di)return;Ue.boundTextFontSize=qn}else Ue.boundTextFontSize=ao.fontSize;F.push({element:q,update:Ue})}let K=F.map(({element:R})=>R);for(let{element:R,update:{boundTextFontSize:q,...we}}of F){let{angle:me}=we,{width:Ie,height:ge}=R;B(R,we,!1),Z(R)&&ie(R)&&Xo(R,l,R.points,void 0,void 0,{informMutation:!1}),$t(R,n,l,{simultaneouslyUpdated:K,oldSize:{width:Ie,height:ge}});let et=ee(R,n);et&&q&&(B(et,{fontSize:q,angle:oe(R)?void 0:me},!1),Er(R,n,r,!0))}io.getScene(F[0].element)?.triggerUpdate()},my=(e,t,n,r,o,i,a,s,l)=>{let c=5*Math.PI/2+Math.atan2(o-s,r-a);i&&(c+=Bt/2,c-=c%Bt),t.filter(d=>!se(d)).forEach(d=>{let[p,f,h,m]=H(d,n),g=(p+h)/2,E=(f+m)/2,w=e.get(d.id)?.angle??d.angle,[y,b]=j(g,E,a,s,c+w-d.angle);if(Z(d)&&ie(d)){let A=rh(d,n);Xo(d,l,A)}else B(d,{x:d.x+(y-g),y:d.y+(b-E),angle:ns(c+w)},!1);$t(d,n,l,{simultaneouslyUpdated:t});let T=ee(d,n);T&&!Z(d)&&B(T,{x:T.x+(y-g),y:T.y+(b-E),angle:ns(c+w)},!1)}),io.getScene(t[0])?.triggerUpdate()},gy=(e,t,n,r,o)=>{let[i,a,s,l]=t.length===1?H(t[0],n):Oe(t),c=(i+s)/2,d=(a+l)/2,p=t.length===1?t[0].angle:0;switch([r,o]=j(r,o,c,d,-p),e){case"n":return j(r-(i+s)/2,o-a,0,0,p);case"s":return j(r-(i+s)/2,o-l,0,0,p);case"w":return j(r-i,o-(a+l)/2,0,0,p);case"e":return j(r-s,o-(a+l)/2,0,0,p);case"nw":return j(r-i,o-a,0,0,p);case"ne":return j(r-s,o-a,0,0,p);case"sw":return j(r-i,o-l,0,0,p);case"se":return j(r-s,o-l,0,0,p);default:return[0,0]}},Ey=(e,t)=>{let[,[n,r]]=t.points;return e==="nw"&&(n<0||r<0)||e==="ne"&&n>=0||e==="sw"&&n<=0||e==="se"&&(n>0||r>0)?"end":"origin"};x();var xy=(e,t,n,r,o,i)=>{if(t.length===1&&Z(t[0])&&ie(t[0])&&(t[0].startBinding||t[0].endBinding))return;let a=t.filter(p=>!(Z(p)&&ie(p)&&p.startBinding&&p.endBinding)),s=new Set(a),l=a.filter(p=>se(p)).map(p=>p.id);if(l.length>0)for(let p of r.getNonDeletedElements())p.frameId!==null&&l.includes(p.frameId)&&s.add(p);let c=Oe(Array.from(s).map(p=>e.originalElements.get(p.id)??p)),d=wy(c,n,o,i);s.forEach(p=>{if(R0(e,p,d),!Z(p)){let f=ee(p,r.getNonDeletedElementsMap());f&&R0(e,f,d)}$t(p,r.getElementsMapIncludingDeleted(),r,{simultaneouslyUpdated:Array.from(s)})})},wy=(e,t,n,r)=>{let[o,i]=e,a=o+t.x+n.x,s=i+t.y+n.y;if(n.x===0||n.y===0){let[l,c]=Yo(o+t.x,i+t.y,r);n.x===0&&(a=l),n.y===0&&(s=c)}return{x:a-o,y:s-i}},R0=(e,t,n)=>{let r=e.originalElements.get(t.id)??t,o=r.x+n.x,i=r.y+n.y;B(t,{x:o,y:i})},yy=(e,t,n)=>{let[r,o]=Oe(e);return[t-r,n-o]},by=(e,t,n,r,o,i,a,s,l,c,d,p,f=null)=>{l&&e.type!=="selection"&&(p?s=a/p:(Math.abs(i-r)>Math.abs(o-n)?{width:a,height:s}=Qa(t,s,o<n?-a:a):{width:a,height:s}=Qa(t,a,i<r?-s:s),s<0&&(s=-s)));let h=o<n?n-a:n,m=i<r?r-s:r;c&&(a+=a,s+=s,h=n-a/2,m=r-s/2);let g=null;if(Y(e)){s=e.height;let E=Sa(he({fontSize:e.fontSize,fontFamily:e.fontFamily}),e.lineHeight);a=Math.max(a,E),Math.abs(o-n)>Zu/d&&(g={autoResize:!1}),m=r,c&&(h=n-a/2)}a!==0&&s!==0&&B(e,{x:h+(f?.x??0),y:m+(f?.y??0),width:a,height:s,...g})};x();var vy=(e,t)=>!!(!e.viewModeEnabled&&(e.activeTool.type!=="custom"&&(e.editingElement||e.activeTool.type!=="selection"&&e.activeTool.type!=="eraser"&&e.activeTool.type!=="hand"&&e.activeTool.type!=="laser")||bt(t,e).length));var nD=e=>e.reduce((t,n)=>t+n.version,0),rD=e=>{let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e[n].versionNonce;return t>>>0},oD=e=>{let t=5381;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)+t+r}return t>>>0},gf=e=>e.filter(t=>!t.isDeleted&&!di(t)),Ic=e=>e.filter(t=>!t.isDeleted),P0=e=>!e.isDeleted,F0=e=>Ic(e).map(t=>el(t.type)?{...t,lastCommittedPoint:null}:t),N1=e=>F0(e),Ya=e=>F0(e);var N0=async e=>{let t;if(e.type===W.png)try{return await(await import("./image-X3GFZHNN.js")).decodePngMetadata(e)}catch(n){throw n.message==="INVALID"?new wn("Image doesn't contain scene","IMAGE_NOT_CONTAINS_SCENE_DATA"):new wn("Error: cannot restore image")}else if("text"in Blob?t=await e.text():t=await new Promise(n=>{let r=new FileReader;r.readAsText(e,"utf8"),r.onloadend=()=>{r.readyState===FileReader.DONE&&n(r.result)}}),e.type===W.svg)try{return await(await import("./image-X3GFZHNN.js")).decodeSvgMetadata({svg:t})}catch(n){throw n.message==="INVALID"?new wn("Image doesn't contain scene","IMAGE_NOT_CONTAINS_SCENE_DATA"):new wn("Error: cannot restore image")}return t};var My=e=>e&&e.name.match(/\.(json|excalidraw|png|svg)$/)?.[1]||null,ID=e=>e==="png"||e==="svg",F1=e=>{let t=My(e);return t==="png"||t==="svg"},os=e=>{let{type:t}=e||{};return!!t&&Object.values(Xs).includes(t)},Ty=async(e,t,n,r)=>{let o=await N0(e),i;try{try{i=JSON.parse(o)}catch(a){throw os(e)?new wn("Image doesn't contain scene","IMAGE_NOT_CONTAINS_SCENE_DATA"):a}if(R1(i))return{type:W.excalidraw,data:ci({elements:Ya(i.elements||[]),appState:{theme:t?.theme,fileHandle:r||e.handle||null,...Hi(i.appState||{}),...t?Al(i.elements||[],t):{}},files:i.files},t,n,{repairBindings:!0,refreshDimensions:!1})};if(wc(i))return{type:W.excalidrawlib,data:i};throw new Error("Error: invalid file")}catch(a){throw a instanceof wn?a:new Error("Error: invalid file")}},O1=async(e,t,n,r)=>{let o=await Ty(e,t,n,r);if(o.type!==W.excalidraw)throw new Error("Error: invalid file");return o.data},Ay=(e,t="unpublished")=>{let n=JSON.parse(e);if(!wc(n))throw new Error("Invalid library");let r=n.libraryItems||n.library;return t0(r,t)},PD=async(e,t="unpublished")=>Ay(await N0(e),t),_D=async e=>new Promise(async(t,n)=>{try{Ui(e)&&(e=await e),e.toBlob(r=>{if(!r)return n(new Ha("Error: Canvas too big","CANVAS_POSSIBLY_TOO_BIG"));t(r)})}catch(r){n(r)}}),kD=async e=>{try{let t=await window.crypto.subtle.digest("SHA-1",await Mn(e));return Ep(new Uint8Array(t))}catch(t){return console.error(t),Bi(40)}},LD=async e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let o=r.result;t(o)},r.onerror=o=>n(o),r.readAsDataURL(e)}),CD=(e,t="")=>{let n=e.indexOf(","),r=atob(e.slice(n+1)),o=e.slice(0,n).split(":")[1].split(";")[0],i=new ArrayBuffer(r.length),a=new Uint8Array(i);for(let s=0;s<r.length;s++)a[s]=r.charCodeAt(s);return new File([i],t,{type:o})},DD=async(e,t)=>{if(e.type===W.svg)return e;let[n,r]=await Promise.all([import("./pica-GFNRRI3K.js").then(i=>i.default),import("./image-blob-reduce.esm-2RRQLBYF.js").then(i=>i.default)]),o=r({pica:n({features:["js","wasm"]})});if(t.outputType){let{outputType:i}=t;o._create_blob=function(a){return this.pica.toBlob(a.out_canvas,i,.8).then(s=>(a.out_blob=s,a))}}if(!os(e))throw new Error("Error: unsupported file type",{cause:"UNSUPPORTED"});return new File([await o.toBlob(e,{max:t.maxWidthOrHeight})],e.name,{type:t.outputType||e.type})},RD=(e,t="")=>new File([new TextEncoder().encode(e)],t,{type:W.svg}),FD=async(e,t="")=>{let n;try{n=await fetch(e)}catch{throw new Error("Error: failed to fetch image",{cause:"FETCH_ERROR"})}if(!n.ok)throw new Error("Error: failed to fetch image",{cause:"FETCH_ERROR"});let r=await n.blob();if(r.type&&os(r)){let o=t||r.name||"";return new File([r],o,{type:r.type})}throw new Error("Error: unsupported file type",{cause:"UNSUPPORTED"})},OD=async e=>{let t=e.dataTransfer.files.item(0),n=await Sy(e);return{file:t?await yc(t):null,fileHandle:n}},Sy=async e=>{if(ro)try{return await e.dataTransfer.items[0].getAsFileSystemHandle()||null}catch(t){return console.warn(t.name,t.message),null}return null},O0=e=>{let t=null,n=`${[...new Uint8Array(e).slice(0,8)].join(" ")} `,r={png:"137 80 78 71 13 10 26 10 ",jpg:"255 216 255 ",gif:"71 73 70 56 57 97 "};return n===r.png?t=W.png:n.startsWith(r.jpg)?t=W.jpg:n.startsWith(r.gif)&&(t=W.gif),t},rs=(e,t,n)=>new File([e],n||"",{type:t}),yc=async e=>{if(e.type){if(os(e)){let t=await Mn(e),n=O0(t);n&&n!==e.type&&(e=rs(t,n,e.name))}}else if(e?.name?.endsWith(".excalidrawlib"))e=rs(await Mn(e),W.excalidrawlib,e.name);else if(e?.name?.endsWith(".excalidraw"))e=rs(await Mn(e),W.excalidraw,e.name);else{let t=await Mn(e),n=O0(t);n&&(e=rs(t,n,e.name))}return e},Mn=e=>"arrayBuffer"in e?e.arrayBuffer():new Promise((t,n)=>{let r=new FileReader;r.onload=o=>{if(!o.target?.result)return n(new Error("Couldn't convert blob to ArrayBuffer"));t(o.target.result)},r.readAsArrayBuffer(e)});var jo=e=>new Promise((t,n)=>{let r=typeof e=="string"?new Blob([new TextEncoder().encode(e)]):new Blob([e instanceof Uint8Array?e:new Uint8Array(e)]),o=new FileReader;o.onload=i=>{if(!i.target||typeof i.target.result!="string")return n(new Error("couldn't convert to byte string"));t(i.target.result)},o.readAsBinaryString(r)}),B0=e=>{let t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let r=0,o=e.length;r<o;r++)n[r]=e.charCodeAt(r);return t},H0=e=>new TextDecoder("utf-8").decode(B0(e)),_a=async(e,t=!1)=>t?window.btoa(e):window.btoa(await jo(e)),z0=async(e,t=!1)=>t?window.atob(e):H0(window.atob(e)),Bc=async({text:e,compress:t})=>{let n;if(t!==!1)try{n=await jo((0,is.deflate)(e))}catch(r){console.error("encode: cannot deflate",r)}return{version:"1",encoding:"bstring",compressed:!!n,encoded:n||await jo(e)}},Hc=async e=>{let t;switch(e.encoding){case"bstring":t=e.compressed?e.encoded:await H0(e.encoded);break;default:throw new Error(`decode: unknown encoding "${e.encoding}"`)}return e.compressed?(0,is.inflate)(new Uint8Array(B0(t)),{to:"string"}):t};var Iy=async e=>{let n=(0,zc.default)(new Uint8Array(await Mn(e))).find(r=>r.name==="tEXt");return n?Gc.default.decode(n.data):null},d0=async({blob:e,metadata:t})=>{let n=(0,zc.default)(new Uint8Array(await Mn(e))),r=Gc.default.encode(W.excalidraw,JSON.stringify(await Bc({text:t,compress:!0})));return n.splice(-1,0,r),new Blob([(0,G0.default)(n)],{type:W.png})},JD=async e=>{let t=await Iy(e);if(t?.keyword===W.excalidraw)try{let n=JSON.parse(t.text);if(!("encoded"in n)){if("type"in n&&n.type===Xe.excalidraw)return t.text;throw new Error("FAILED")}return await Hc(n)}catch(n){throw console.error(n),new Error("FAILED")}throw new Error("INVALID")},QD=async({text:e})=>{let t=await _a(JSON.stringify(await Bc({text:e})),!0),n="";return n+=`<!-- payload-type:${W.excalidraw} -->`,n+="<!-- payload-version:2 -->",n+="<!-- payload-start -->",n+=t,n+="<!-- payload-end -->",n},e9=async({svg:e})=>{if(e.includes(`payload-type:${W.excalidraw}`)){let t=e.match(/<!-- payload-start -->\s*(.+?)\s*<!-- payload-end -->/);if(!t)throw new Error("INVALID");let o=(e.match(/<!-- payload-version:(\d+) -->/)?.[1]||"1")!=="1";try{let i=await z0(t[1],o),a=JSON.parse(i);if(!("encoded"in a)){if("type"in a&&a.type===Xe.excalidraw)return i;throw new Error("FAILED")}return await Hc(a)}catch(i){throw console.error(i),new Error("FAILED")}}throw new Error("INVALID")};export{_l as a,kl as b,Tf as c,an as d,M3 as e,T3 as f,_i as g,ki as h,$ as i,A3 as j,S3 as k,I3 as l,P3 as m,_3 as n,k3 as o,Li as p,F3 as q,O3 as r,N3 as s,$u as t,B3 as u,H3 as v,z3 as w,Ku as x,ju as y,G3 as z,U3 as A,W3 as B,V3 as C,Ci as D,X3 as E,Y3 as F,$3 as G,it as H,Z3 as I,ae as J,Fe as K,Ae as L,Ht as M,zt as N,Or as O,Ri as P,To as Q,K3 as R,j3 as S,q3 as T,J3 as U,Q3 as V,Xs as W,W as X,eb as Y,Xe as Z,Ys as _,tb as $,nb as aa,rb as ba,ob as ca,ib as da,Ju as ea,ab as fa,sb as ga,Oi as ha,lb as ia,cb as ja,db as ka,ub as la,pb as ma,fb as na,hb as oa,mb as pa,Qu as qa,$s as ra,gb as sa,Eb as ta,le as ua,Zs as va,ve as wa,sn as xa,Ks as ya,je as za,xb as Aa,q2 as Ba,op as Ca,wb as Da,yb as Ea,bb as Fa,ip as Ga,qs as Ha,vb as Ia,ap as Ja,Xt as Ka,Bi as La,Bb as Ma,Hb as Na,zb as Oa,eg as Pa,Gb as Qa,Ub as Ra,Js as Sa,he as Ta,hp as Ua,mp as Va,gp as Wa,Wb as Xa,Vb as Ya,at as Za,Ao as _a,Xb as $a,So as ab,Qs as bb,Yb as cb,ln as db,$b as eb,Zb as fb,Kb as gb,Cn as hb,jb as ib,qb as jb,Jb as kb,Qb as lb,Q as mb,e6 as nb,t6 as ob,dn as pb,n6 as qb,r6 as rb,o6 as sb,i6 as tb,Ui as ub,a6 as vb,un as wb,s6 as xb,sr as yb,l6 as zb,xp as Ab,c6 as Bb,d6 as Cb,u6 as Db,p6 as Eb,f6 as Fb,wp as Gb,ht as Hb,h6 as Ib,Ut as Jb,Wi as Kb,Vi as Lb,Io as Mb,mt as Nb,Y as Ob,vp as Pb,se as Qb,oe as Rb,Z as Sb,ie as Tb,el as Ub,Po as Vb,ig as Wb,ag as Xb,tl as Yb,Dn as Zb,ke as _b,Xi as $b,w6 as ac,y6 as bc,qt as cc,It as dc,za as ec,wn as fc,ft as gc,cp as hc,dp as ic,Cx as jc,WI as kc,VI as lc,Dx as mc,XI as nc,Qh as oc,YI as pc,Rx as qc,Jr as rc,$I as sc,ZI as tc,KI as uc,jI as vc,qI as wc,n1 as xc,Qr as yc,nP as zc,i1 as Ac,a1 as Bc,s1 as Cc,$x as Dc,Zx as Ec,Kx as Fc,u1 as Gc,ce as Hc,m5 as Ic,g5 as Jc,E5 as Kc,x5 as Lc,w5 as Mc,y5 as Nc,b5 as Oc,v5 as Pc,M5 as Qc,A5 as Rc,Go as Sc,Ff as Tc,S5 as Uc,I5 as Vc,P5 as Wc,_5 as Xc,k5 as Yc,L5 as Zc,C5 as _c,D5 as $c,R5 as ad,F5 as bd,O5 as cd,N5 as dd,B5 as ed,H5 as fd,z5 as gd,G5 as hd,U5 as id,W5 as jd,V5 as kd,X5 as ld,Y5 as md,Z5 as nd,K5 as od,j5 as pd,q5 as qd,eM as rd,nM as sd,rM as td,oM as ud,iM as vd,uM as wd,pM as xd,fM as yd,hM as zd,mM as Ad,gM as Bd,EM as Cd,xM as Dd,wM as Ed,yM as Fd,bM as Gd,vM as Hd,MM as Id,SM as Jd,kM as Kd,LM as Ld,CM as Md,DM as Nd,RM as Od,FM as Pd,OM as Qd,NM as Rd,BM as Sd,zM as Td,GM as Ud,UM as Vd,WM as Wd,VM as Xd,XM as Yd,YM as Zd,$M as _d,ZM as $d,KM as ae,jM as be,qM as ce,JM as de,QM as ee,eT as fe,tT as ge,nT as he,rT as ie,oT as je,iT as ke,aT as le,pa as me,Ll as ne,sT as oe,lT as pe,cT as qe,dT as re,uT as se,pT as te,fT as ue,hT as ve,gT as we,ET as xe,xT as ye,wT as ze,yT as Ae,TT as Be,AT as Ce,ST as De,IT as Ee,PT as Fe,_T as Ge,kT as He,LT as Ie,DT as Je,RT as Ke,FT as Le,OT as Me,NT as Ne,BT as Oe,HT as Pe,zT as Qe,GT as Re,UT as Se,WT as Te,VT as Ue,XT as Ve,YT as We,$T as Xe,ZT as Ye,KT as Ze,jT as _e,qT as $e,JT as af,QT as bf,eA as cf,nA as df,rA as ef,oA as ff,iA as gf,aA as hf,sA as if,lA as jf,cA as kf,ro as lf,D1 as mf,xc as nf,li as of,a_ as pf,s_ as qf,gw as rf,l_ as sf,xr as tf,e0 as uf,Cw as vf,ci as wf,t0 as xf,Iy as yf,d0 as zf,JD as Af,QD as Bf,e9 as Cf,My as Df,ID as Ef,F1 as Ff,os as Gf,Ty as Hf,O1 as If,Ay as Jf,PD as Kf,_D as Lf,kD as Mf,LD as Nf,CD as Of,DD as Pf,RD as Qf,FD as Rf,OD as Sf,yc as Tf,Zn as Uf,La as Vf,Jo as Wf,IP as Xf,PP as Yf,_P as Zf,kP as _f,Qt as $f,pc as ag,LP as bg,yr as cg,Qx as dg,ew as eg,Qo as fg,tw as gg,CP as hg,la as ig,Xv as jg,ne as kg,Yv as lg,$v as mg,Zv as ng,Pl as og,e5 as pg,sE as qg,Cl as rg,wA as sg,lE as tg,cE as ug,OA as vg,ga as wg,Gf as xg,tS as yg,Ol as zg,Nl as Ag,nS as Bg,rS as Cg,oS as Dg,wa as Eg,hE as Fg,Gn as Gg,$t as Hg,Bl as Ig,Jf as Jg,iS as Kg,aS as Lg,Hl as Mg,Ua as Ng,no as Og,b1 as Pg,I1 as Qg,P1 as Rg,S7 as Sg,I7 as Tg,Ew as Ug,B1 as Vg,H1 as Wg,f_ as Xg,vc as Yg,ww as Zg,b_ as _g,A_ as $g,z1 as ah,G1 as bh,bw as ch,X1 as dh,Z1 as eh,K1 as fh,tk as gh,Tk as hh,Hw as ih,Fk as jh,Ok as kh,s0 as lh,Nk as mh,Bk as nh,c0 as oh,_c as ph,Yw as qh,$w as rh,Zw as sh,Zk as th,p0 as uh,qw as vh,h0 as wh,bL as xh,Kn as yh,vL as zh,ML as Ah,pi as Bh,Tc as Ch,TL as Dh,AL as Eh,$e as Fh,SL as Gh,ey as Hh,T0 as Ih,ty as Jh,IL as Kh,PL as Lh,Za as Mh,j1 as Nh,q1 as Oh,fx as Ph,rI as Qh,nc as Rh,Yg as Sh,_v as Th,$g as Uh,Zg as Vh,Sl as Wh,kv as Xh,Kg as Yh,H as Zh,Oe as _h,II as $h,jh as ai,PI as bi,j as ci,N as di,Je as ei,Yt as fi,Yo as gi,En as hi,RI as ii,FI as ji,OI as ki,NI as li,Xo as mi,J as ni,Zo as oi,ph as pi,fh as qi,BS as ri,ql as si,Ql as ti,ZS as ui,Er as vi,hh as wi,Kt as xi,jr as yi,gh as zi,Eh as Ai,Yn as Bi,yh as Ci,gn as Di,ee as Ei,_e as Fi,KS as Gi,jS as Hi,qS as Ii,JS as Ji,QS as Ki,jl as Li,At as Mi,Ko as Ni,e8 as Oi,Sa as Pi,hc as Qi,w1 as Ri,ni as Si,br as Ti,io as Ui,B as Vi,Pt as Wi,ei as Xi,di as Yi,A0 as Zi,Zl as _i,Sc as $i,Dc as aj,ts as bj,Rc as cj,fC as dj,iy as ej,ay as fj,ly as gj,cy as hj,uy as ij,Nc as jj,hy as kj,gy as lj,Ey as mj,xy as nj,yy as oj,by as pj,vy as qj,nD as rj,rD as sj,oD as tj,Ic as uj,P0 as vj,ny as wj,ca as xj,OL as yj,qg as zj,Jg as Aj,bt as Bj,Qg as Cj,uc as Dj,Xg as Ej,Al as Fj,jg as Gj,Rv as Hj};
|
|
51
|
+
/*! Bundled license information:
|
|
52
|
+
|
|
53
|
+
react/cjs/react-jsx-runtime.production.min.js:
|
|
54
|
+
(**
|
|
55
|
+
* @license React
|
|
56
|
+
* react-jsx-runtime.production.min.js
|
|
57
|
+
*
|
|
58
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
59
|
+
*
|
|
60
|
+
* This source code is licensed under the MIT license found in the
|
|
61
|
+
* LICENSE file in the root directory of this source tree.
|
|
62
|
+
*)
|
|
63
|
+
*/
|