@salesforce/ui-design-mode 10.9.1 → 10.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/authoring/core/DesignPropertyPanelRoot.d.cts +31 -1
  2. package/dist/authoring/core/DesignPropertyPanelRoot.d.ts +31 -1
  3. package/dist/authoring/core/DesignPropertyPanelRoot.d.ts.map +1 -1
  4. package/dist/authoring/core/editors/ImageEditor.d.cts +110 -0
  5. package/dist/authoring/core/editors/ImageEditor.d.ts +110 -0
  6. package/dist/authoring/core/editors/ImageEditor.d.ts.map +1 -0
  7. package/dist/authoring/core/history/historyService.d.cts +3 -1
  8. package/dist/authoring/core/history/historyService.d.ts +3 -1
  9. package/dist/authoring/core/history/historyService.d.ts.map +1 -1
  10. package/dist/authoring/core/history/iframeCommandExecutor.d.cts +1 -1
  11. package/dist/authoring/core/history/iframeCommandExecutor.d.ts +1 -1
  12. package/dist/authoring/core/history/iframeCommandExecutor.d.ts.map +1 -1
  13. package/dist/authoring/core/labels/labels.d.cts +106 -0
  14. package/dist/authoring/core/labels/labels.d.ts +106 -0
  15. package/dist/authoring/core/labels/labels.d.ts.map +1 -1
  16. package/dist/authoring/host/index.cjs +111 -0
  17. package/dist/authoring/host/index.d.cts +86 -0
  18. package/dist/authoring/host/index.d.ts +86 -0
  19. package/dist/authoring/host/index.d.ts.map +1 -0
  20. package/dist/authoring/host/index.js +111 -0
  21. package/dist/authoring/react/index.d.cts +2 -1
  22. package/dist/authoring/react/index.d.ts +2 -1
  23. package/dist/authoring/react/index.d.ts.map +1 -1
  24. package/dist/authoring/react/index.js +4 -4
  25. package/dist/authoring/react/styles.css +1 -1
  26. package/dist/authoring/web-component/index.d.cts +8 -1
  27. package/dist/authoring/web-component/index.d.ts +8 -1
  28. package/dist/authoring/web-component/index.d.ts.map +1 -1
  29. package/dist/authoring/web-component/index.js +430 -21
  30. package/dist/protocol/messageTypes.d.cts +13 -1
  31. package/dist/protocol/messageTypes.d.ts +13 -1
  32. package/dist/protocol/messageTypes.d.ts.map +1 -1
  33. package/dist/runtime/design-mode-interactions.js +4 -0
  34. package/dist/runtime/interactions/interactionsController.d.ts.map +1 -1
  35. package/package.json +12 -1
@@ -1,7 +1,7 @@
1
- var j5=Object.create;var $a=Object.defineProperty;var K5=Object.getOwnPropertyDescriptor;var G5=Object.getOwnPropertyNames;var W5=Object.getPrototypeOf,X5=Object.prototype.hasOwnProperty;var Q5=(e,t,o)=>t in e?$a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var $t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var J5=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of G5(t))!X5.call(e,r)&&r!==o&&$a(e,r,{get:()=>t[r],enumerable:!(a=K5(t,r))||a.enumerable});return e};var w9=(e,t,o)=>(o=e!=null?j5(W5(e)):{},J5(t||!e||!e.__esModule?$a(o,"default",{value:e,enumerable:!0}):o,e));var Q1=(e,t,o)=>Q5(e,typeof t!="symbol"?t+"":t,o);var P0=$t((pw,k0)=>{"use strict";var Lu="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";k0.exports=Lu});var D0=$t((Cw,_0)=>{"use strict";var wu=P0();function T0(){}function V0(){}V0.resetWarningCache=T0;_0.exports=function(){function e(a,r,l,n,i,s){if(s!==wu){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:V0,resetWarningCache:T0};return o.PropTypes=o,o}});var B0=$t((gw,O0)=>{O0.exports=D0()();var mw,hw});var A0=$t(ue=>{"use strict";var gl=Symbol.for("react.element"),vl=Symbol.for("react.portal"),ha=Symbol.for("react.fragment"),ga=Symbol.for("react.strict_mode"),va=Symbol.for("react.profiler"),xa=Symbol.for("react.provider"),La=Symbol.for("react.context"),Iu=Symbol.for("react.server_context"),wa=Symbol.for("react.forward_ref"),Ia=Symbol.for("react.suspense"),ba=Symbol.for("react.suspense_list"),Ma=Symbol.for("react.memo"),ya=Symbol.for("react.lazy"),bu=Symbol.for("react.offscreen"),E0;E0=Symbol.for("react.module.reference");function o1(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case gl:switch(e=e.type,e){case ha:case va:case ga:case Ia:case ba:return e;default:switch(e=e&&e.$$typeof,e){case Iu:case La:case wa:case ya:case Ma:case xa:return e;default:return t}}case vl:return t}}}ue.ContextConsumer=La;ue.ContextProvider=xa;ue.Element=gl;ue.ForwardRef=wa;ue.Fragment=ha;ue.Lazy=ya;ue.Memo=Ma;ue.Portal=vl;ue.Profiler=va;ue.StrictMode=ga;ue.Suspense=Ia;ue.SuspenseList=ba;ue.isAsyncMode=function(){return!1};ue.isConcurrentMode=function(){return!1};ue.isContextConsumer=function(e){return o1(e)===La};ue.isContextProvider=function(e){return o1(e)===xa};ue.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===gl};ue.isForwardRef=function(e){return o1(e)===wa};ue.isFragment=function(e){return o1(e)===ha};ue.isLazy=function(e){return o1(e)===ya};ue.isMemo=function(e){return o1(e)===Ma};ue.isPortal=function(e){return o1(e)===vl};ue.isProfiler=function(e){return o1(e)===va};ue.isStrictMode=function(e){return o1(e)===ga};ue.isSuspense=function(e){return o1(e)===Ia};ue.isSuspenseList=function(e){return o1(e)===ba};ue.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ha||e===va||e===ga||e===Ia||e===ba||e===bu||typeof e=="object"&&e!==null&&(e.$$typeof===ya||e.$$typeof===Ma||e.$$typeof===xa||e.$$typeof===La||e.$$typeof===wa||e.$$typeof===E0||e.getModuleId!==void 0)};ue.typeOf=o1});var F0=$t((xw,Z0)=>{"use strict";Z0.exports=A0()});import{forwardRef as pe,createElement as G}from"react";function Ce(e,t){if(e==null)return{};var o={},a=Object.keys(e),r,l;for(l=0;l<a.length;l++)r=a[l],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var Y5=["color"],I9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,Y5);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M0 7.5C0 7.22386 0.223858 7 0.5 7H3C3.27614 7 3.5 7.22386 3.5 7.5C3.5 7.77614 3.27614 8 3 8H0.5C0.223858 8 0 7.77614 0 7.5ZM5.75 7.5C5.75 7.22386 5.97386 7 6.25 7H8.75C9.02614 7 9.25 7.22386 9.25 7.5C9.25 7.77614 9.02614 8 8.75 8H6.25C5.97386 8 5.75 7.77614 5.75 7.5ZM12 7C11.7239 7 11.5 7.22386 11.5 7.5C11.5 7.77614 11.7239 8 12 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),ei=["color"],b9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,ei);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M1.5 6.625C1.01675 6.625 0.625 7.01675 0.625 7.5C0.625 7.98325 1.01675 8.375 1.5 8.375C1.98325 8.375 2.375 7.98325 2.375 7.5C2.375 7.01675 1.98325 6.625 1.5 6.625ZM5.5 6.625C5.01675 6.625 4.625 7.01675 4.625 7.5C4.625 7.98325 5.01675 8.375 5.5 8.375C5.98325 8.375 6.375 7.98325 6.375 7.5C6.375 7.01675 5.98325 6.625 5.5 6.625ZM9.5 6.625C9.01675 6.625 8.625 7.01675 8.625 7.5C8.625 7.98325 9.01675 8.375 9.5 8.375C9.98325 8.375 10.375 7.98325 10.375 7.5C10.375 7.01675 9.98325 6.625 9.5 6.625ZM12.625 7.5C12.625 7.01675 13.0168 6.625 13.5 6.625C13.9832 6.625 14.375 7.01675 14.375 7.5C14.375 7.98325 13.9832 8.375 13.5 8.375C13.0168 8.375 12.625 7.98325 12.625 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var ti=["color"],M9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,ti);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M1.25 7.5C1.25 7.22386 1.47386 7 1.75 7H13.25C13.5261 7 13.75 7.22386 13.75 7.5C13.75 7.77614 13.5261 8 13.25 8H1.75C1.47386 8 1.25 7.77614 1.25 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var oi=["color"],y9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,oi);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var ai=["color"],ct=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,ai);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var ri=["color"],S9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,ri);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M5.67494 3.50017C5.67494 3.25164 5.87641 3.05017 6.12494 3.05017H10.6249C10.8735 3.05017 11.0749 3.25164 11.0749 3.50017C11.0749 3.7487 10.8735 3.95017 10.6249 3.95017H9.00587L7.2309 11.05H8.87493C9.12345 11.05 9.32493 11.2515 9.32493 11.5C9.32493 11.7486 9.12345 11.95 8.87493 11.95H4.37493C4.1264 11.95 3.92493 11.7486 3.92493 11.5C3.92493 11.2515 4.1264 11.05 4.37493 11.05H5.99397L7.76894 3.95017H6.12494C5.87641 3.95017 5.67494 3.7487 5.67494 3.50017Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),li=["color"],R9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,li);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M4.79993 3.50017C4.79993 3.25164 5.0014 3.05017 5.24993 3.05017H9.74993C9.99845 3.05017 10.1999 3.25164 10.1999 3.50017C10.1999 3.7487 9.99845 3.95017 9.74993 3.95017H8.09993V11.05H9.74994C9.99847 11.05 10.1999 11.2515 10.1999 11.5C10.1999 11.7486 9.99847 11.95 9.74994 11.95H5.24994C5.00141 11.95 4.79994 11.7486 4.79994 11.5C4.79994 11.2515 5.00141 11.05 5.24994 11.05H6.89993V3.95017H5.24993C5.0014 3.95017 4.79993 3.7487 4.79993 3.50017Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),ni=["color"],H9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,ni);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M2.78233 2.21707C2.70732 2.14206 2.60557 2.09991 2.49949 2.09991C2.3934 2.09991 2.29166 2.14206 2.21664 2.21707L0.216645 4.21707C0.0604351 4.37328 0.0604351 4.62655 0.216645 4.78276C0.372855 4.93897 0.626121 4.93897 0.78233 4.78276L2.09949 3.4656L2.09949 11.5342L0.78233 10.2171C0.62612 10.0609 0.372854 10.0609 0.216645 10.2171C0.0604349 10.3733 0.0604349 10.6265 0.216645 10.7828L2.21664 12.7828C2.29166 12.8578 2.3934 12.8999 2.49949 12.8999C2.60557 12.8999 2.70731 12.8578 2.78233 12.7828L4.78233 10.7828C4.93854 10.6265 4.93854 10.3733 4.78233 10.2171C4.62612 10.0609 4.37285 10.0609 4.21664 10.2171L2.89949 11.5342L2.89949 3.4656L4.21664 4.78276C4.37285 4.93897 4.62612 4.93897 4.78233 4.78276C4.93854 4.62655 4.93854 4.37328 4.78233 4.21707L2.78233 2.21707ZM10.5 2.74997C10.7107 2.74997 10.8988 2.88211 10.9703 3.08036L13.9703 11.3999C14.064 11.6597 13.9293 11.9462 13.6696 12.0399C13.4098 12.1336 13.1233 11.9989 13.0296 11.7392L12.0477 9.016H8.95228L7.97033 11.7392C7.87666 11.9989 7.59013 12.1336 7.33036 12.0399C7.07059 11.9462 6.93595 11.6597 7.02962 11.3999L10.0296 3.08036C10.1011 2.88211 10.2892 2.74997 10.5 2.74997ZM10.5 4.72396L11.7412 8.166H9.25879L10.5 4.72396Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var ii=["color"],k9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,ii);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M7.1813 1.68179C7.35704 1.50605 7.64196 1.50605 7.8177 1.68179L10.3177 4.18179C10.4934 4.35753 10.4934 4.64245 10.3177 4.81819C10.142 4.99392 9.85704 4.99392 9.6813 4.81819L7.9495 3.08638L7.9495 11.9136L9.6813 10.1818C9.85704 10.0061 10.142 10.0061 10.3177 10.1818C10.4934 10.3575 10.4934 10.6424 10.3177 10.8182L7.8177 13.3182C7.73331 13.4026 7.61885 13.45 7.4995 13.45C7.38015 13.45 7.26569 13.4026 7.1813 13.3182L4.6813 10.8182C4.50557 10.6424 4.50557 10.3575 4.6813 10.1818C4.85704 10.0061 5.14196 10.0061 5.3177 10.1818L7.0495 11.9136L7.0495 3.08638L5.3177 4.81819C5.14196 4.99392 4.85704 4.99392 4.6813 4.81819C4.50557 4.64245 4.50557 4.35753 4.6813 4.18179L7.1813 1.68179Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var si=["color"],P9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,si);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M6.5 1C6.22386 1 6 1.22386 6 1.5C6 1.77614 6.22386 2 6.5 2C7.12671 2 7.45718 2.20028 7.65563 2.47812C7.8781 2.78957 8 3.28837 8 4V11C8 11.7116 7.8781 12.2104 7.65563 12.5219C7.45718 12.7997 7.12671 13 6.5 13C6.22386 13 6 13.2239 6 13.5C6 13.7761 6.22386 14 6.5 14C7.37329 14 8.04282 13.7003 8.46937 13.1031C8.47976 13.0886 8.48997 13.0739 8.5 13.0591C8.51003 13.0739 8.52024 13.0886 8.53063 13.1031C8.95718 13.7003 9.62671 14 10.5 14C10.7761 14 11 13.7761 11 13.5C11 13.2239 10.7761 13 10.5 13C9.87329 13 9.54282 12.7997 9.34437 12.5219C9.1219 12.2104 9 11.7116 9 11V4C9 3.28837 9.1219 2.78957 9.34437 2.47812C9.54282 2.20028 9.87329 2 10.5 2C10.7761 2 11 1.77614 11 1.5C11 1.22386 10.7761 1 10.5 1C9.62671 1 8.95718 1.29972 8.53063 1.89688C8.52024 1.91143 8.51003 1.92611 8.5 1.9409C8.48997 1.92611 8.47976 1.91143 8.46937 1.89688C8.04282 1.29972 7.37329 1 6.5 1ZM14 5H11V4H14C14.5523 4 15 4.44772 15 5V10C15 10.5523 14.5523 11 14 11H11V10H14V5ZM6 4V5H1L1 10H6V11H1C0.447715 11 0 10.5523 0 10V5C0 4.44772 0.447715 4 1 4H6Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var di=["color"],T9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,di);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M3.68979 2.75C3.89667 2.74979 4.08232 2.87701 4.15679 3.07003L7.36662 11.39C7.46602 11.6477 7.33774 11.9371 7.0801 12.0365C6.82247 12.1359 6.53304 12.0076 6.43365 11.75L5.3825 9.02537H2.01133L0.966992 11.749C0.868128 12.0068 0.578964 12.1357 0.321126 12.0369C0.0632878 11.938 -0.0655864 11.6488 0.0332774 11.391L3.22344 3.07099C3.29751 2.87782 3.4829 2.75021 3.68979 2.75ZM3.69174 4.64284L5.05458 8.17537H2.33724L3.69174 4.64284ZM10.8989 5.20703C9.25818 5.20703 8.00915 6.68569 8.00915 8.60972C8.00915 10.6337 9.35818 12.0124 10.8989 12.0124C11.7214 12.0124 12.5744 11.6692 13.1543 11.0219V11.53C13.1543 11.7785 13.3557 11.98 13.6043 11.98C13.8528 11.98 14.0543 11.7785 14.0543 11.53V5.72C14.0543 5.47147 13.8528 5.27 13.6043 5.27C13.3557 5.27 13.1543 5.47147 13.1543 5.72V6.22317C12.6054 5.60095 11.7924 5.20703 10.8989 5.20703ZM13.1543 9.79823V7.30195C12.7639 6.58101 11.9414 6.05757 11.0868 6.05757C10.1088 6.05757 9.03503 6.96581 9.03503 8.60955C9.03503 10.1533 10.0088 11.1615 11.0868 11.1615C11.9701 11.1615 12.7719 10.4952 13.1543 9.79823Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),ui=["color"],V9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,ui);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M3.69899 5.20703C2.05823 5.20703 0.809204 6.68569 0.809204 8.60972C0.809204 10.6337 2.15823 12.0124 3.69899 12.0124C4.52126 12.0124 5.37402 11.6693 5.9539 11.0223V11.53C5.9539 11.7785 6.15537 11.98 6.4039 11.98C6.65243 11.98 6.8539 11.7785 6.8539 11.53V5.72001C6.8539 5.47149 6.65243 5.27001 6.4039 5.27001C6.15537 5.27001 5.9539 5.47149 5.9539 5.72001V6.22269C5.40506 5.60075 4.59218 5.20703 3.69899 5.20703ZM5.9539 9.799V7.30117C5.56339 6.58064 4.74118 6.05757 3.8868 6.05757C2.9089 6.05757 1.83508 6.96581 1.83508 8.60955C1.83508 10.1533 2.80889 11.1615 3.8868 11.1615C4.76984 11.1615 5.57141 10.4957 5.9539 9.799ZM10.799 5.20703C9.15823 5.20703 7.9092 6.68569 7.9092 8.60972C7.9092 10.6337 9.25823 12.0124 10.799 12.0124C11.6215 12.0124 12.4744 11.6692 13.0543 11.0218V11.53C13.0543 11.7785 13.2558 11.98 13.5043 11.98C13.7529 11.98 13.9543 11.7785 13.9543 11.53V5.72C13.9543 5.47147 13.7529 5.27 13.5043 5.27C13.2558 5.27 13.0543 5.47147 13.0543 5.72V6.22318C12.5055 5.60095 11.6924 5.20703 10.799 5.20703ZM13.0543 9.79822V7.30196C12.664 6.58102 11.8415 6.05757 10.9868 6.05757C10.0089 6.05757 8.93508 6.96581 8.93508 8.60955C8.93508 10.1533 9.90889 11.1615 10.9868 11.1615C11.8702 11.1615 12.672 10.4952 13.0543 9.79822Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var ci=["color"],_9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,ci);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M3.6255 2.75C3.83478 2.75 4.02192 2.88034 4.09448 3.07664L7.16985 11.3962C7.2656 11.6552 7.13324 11.9428 6.87423 12.0386C6.61522 12.1343 6.32763 12.002 6.23188 11.7429L5.22387 9.01603H2.02712L1.01911 11.7429C0.923362 12.002 0.635774 12.1343 0.376762 12.0386C0.117749 11.9428 -0.0146052 11.6552 0.0811401 11.3962L3.15651 3.07664C3.22908 2.88034 3.41621 2.75 3.6255 2.75ZM3.6255 4.69207L4.90966 8.16603H2.34133L3.6255 4.69207ZM11.3719 2.75C11.5811 2.75 11.7683 2.88034 11.8408 3.07664L14.9162 11.3962C15.012 11.6552 14.8796 11.9428 14.6206 12.0386C14.3616 12.1343 14.074 12.002 13.9782 11.7429L12.9702 9.01603H9.77348L8.76547 11.7429C8.66972 12.002 8.38213 12.1343 8.12312 12.0386C7.86411 11.9428 7.73175 11.6552 7.8275 11.3962L10.9029 3.07664C10.9754 2.88034 11.1626 2.75 11.3719 2.75ZM11.3719 4.69207L12.656 8.16603H10.0877L11.3719 4.69207Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),fi=["color"],D9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,fi);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M4.55293 0.999969C4.75295 0.999969 4.93372 1.11917 5.0125 1.30301L8.01106 8.29982C8.11984 8.55363 8.00226 8.84757 7.74844 8.95635C7.49463 9.06512 7.20069 8.94754 7.09191 8.69373L6.11613 6.41685H2.98973L2.01395 8.69373C1.90517 8.94754 1.61123 9.06512 1.35742 8.95635C1.1036 8.84757 0.986023 8.55363 1.0948 8.29982L4.09336 1.30301C4.17214 1.11917 4.35291 0.999969 4.55293 0.999969ZM4.55293 2.76929L5.75186 5.56685H3.354L4.55293 2.76929ZM11.0562 9.00214C11.2617 9.00214 11.4463 8.87633 11.5215 8.68502L14.2733 1.68299C14.3743 1.42598 14.2478 1.13575 13.9908 1.03475C13.7338 0.933747 13.4436 1.06021 13.3426 1.31722L11.0562 7.13514L8.76973 1.31722C8.66873 1.06021 8.3785 0.933747 8.1215 1.03475C7.86449 1.13575 7.73802 1.42598 7.83902 1.68299L10.5908 8.68502C10.666 8.87633 10.8506 9.00214 11.0562 9.00214ZM14.9537 12.4999C14.9537 12.606 14.9115 12.7077 14.8365 12.7828L12.8365 14.7828C12.6803 14.939 12.4271 14.939 12.2708 14.7828C12.1146 14.6265 12.1146 14.3733 12.2708 14.2171L13.588 12.8999H1.51937L2.83653 14.2171C2.99274 14.3733 2.99274 14.6265 2.83653 14.7828C2.68032 14.939 2.42705 14.939 2.27084 14.7828L0.270843 12.7828C0.195828 12.7077 0.153687 12.606 0.153687 12.4999C0.153687 12.3938 0.195828 12.2921 0.270843 12.2171L2.27084 10.2171C2.42705 10.0609 2.68032 10.0609 2.83653 10.2171C2.99274 10.3733 2.99274 10.6265 2.83653 10.7828L1.51937 12.0999L13.588 12.0999L12.2708 10.7828C12.1146 10.6265 12.1146 10.3733 12.2708 10.2171C12.4271 10.0609 12.6803 10.0609 12.8365 10.2171L14.8365 12.2171C14.9115 12.2921 14.9537 12.3938 14.9537 12.4999Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var pi=["color"],O9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,pi);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M3.78233 2.21713C3.70732 2.14212 3.60557 2.09998 3.49949 2.09998C3.3934 2.09998 3.29166 2.14212 3.21664 2.21713L1.21664 4.21713C1.06044 4.37334 1.06044 4.62661 1.21664 4.78282C1.37285 4.93903 1.62612 4.93903 1.78233 4.78282L3.09949 3.46566L3.09949 11.5343L1.78233 10.2171C1.62612 10.0609 1.37285 10.0609 1.21664 10.2171C1.06043 10.3733 1.06043 10.6266 1.21664 10.7828L3.21664 12.7828C3.29166 12.8578 3.3934 12.9 3.49949 12.9C3.60557 12.9 3.70731 12.8578 3.78233 12.7828L5.78233 10.7828C5.93854 10.6266 5.93854 10.3733 5.78233 10.2171C5.62612 10.0609 5.37285 10.0609 5.21664 10.2171L3.89949 11.5343L3.89949 3.46566L5.21664 4.78282C5.37285 4.93903 5.62612 4.93903 5.78233 4.78282C5.93854 4.62661 5.93854 4.37334 5.78233 4.21713L3.78233 2.21713ZM8.49998 3.99997C8.22383 3.99997 7.99998 4.22382 7.99998 4.49997C7.99998 4.77611 8.22383 4.99997 8.49998 4.99997H14.5C14.7761 4.99997 15 4.77611 15 4.49997C15 4.22382 14.7761 3.99997 14.5 3.99997H8.49998ZM7.99998 7.49997C7.99998 7.22382 8.22383 6.99997 8.49998 6.99997H14.5C14.7761 6.99997 15 7.22382 15 7.49997C15 7.77611 14.7761 7.99997 14.5 7.99997H8.49998C8.22383 7.99997 7.99998 7.77611 7.99998 7.49997ZM8.49998 9.99997C8.22383 9.99997 7.99998 10.2238 7.99998 10.5C7.99998 10.7761 8.22383 11 8.49998 11H14.5C14.7761 11 15 10.7761 15 10.5C15 10.2238 14.7761 9.99997 14.5 9.99997H8.49998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Ci=["color"],B9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,Ci);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M4.62471 4.00001L4.56402 4.00001C4.04134 3.99993 3.70687 3.99988 3.4182 4.055C2.2379 4.28039 1.29846 5.17053 1.05815 6.33035C0.999538 6.61321 0.999604 6.93998 0.999703 7.43689L0.999711 7.50001L0.999703 7.56313C0.999604 8.06004 0.999538 8.38681 1.05815 8.66967C1.29846 9.8295 2.2379 10.7196 3.4182 10.945C3.70688 11.0001 4.04135 11.0001 4.56403 11L4.62471 11H5.49971C5.77585 11 5.99971 10.7762 5.99971 10.5C5.99971 10.2239 5.77585 10 5.49971 10H4.62471C4.02084 10 3.78907 9.99777 3.60577 9.96277C2.80262 9.8094 2.19157 9.21108 2.03735 8.46678C2.00233 8.29778 1.99971 8.08251 1.99971 7.50001C1.99971 6.91752 2.00233 6.70225 2.03735 6.53324C2.19157 5.78895 2.80262 5.19062 3.60577 5.03725C3.78907 5.00225 4.02084 5.00001 4.62471 5.00001H5.49971C5.77585 5.00001 5.99971 4.77615 5.99971 4.50001C5.99971 4.22387 5.77585 4.00001 5.49971 4.00001H4.62471ZM10.3747 5.00001C10.9786 5.00001 11.2104 5.00225 11.3937 5.03725C12.1968 5.19062 12.8079 5.78895 12.9621 6.53324C12.9971 6.70225 12.9997 6.91752 12.9997 7.50001C12.9997 8.08251 12.9971 8.29778 12.9621 8.46678C12.8079 9.21108 12.1968 9.8094 11.3937 9.96277C11.2104 9.99777 10.9786 10 10.3747 10H9.49971C9.22357 10 8.99971 10.2239 8.99971 10.5C8.99971 10.7762 9.22357 11 9.49971 11H10.3747L10.4354 11C10.9581 11.0001 11.2925 11.0001 11.5812 10.945C12.7615 10.7196 13.701 9.8295 13.9413 8.66967C13.9999 8.38681 13.9998 8.06005 13.9997 7.56314L13.9997 7.50001L13.9997 7.43688C13.9998 6.93998 13.9999 6.61321 13.9413 6.33035C13.701 5.17053 12.7615 4.28039 11.5812 4.055C11.2925 3.99988 10.9581 3.99993 10.4354 4.00001L10.3747 4.00001H9.49971C9.22357 4.00001 8.99971 4.22387 8.99971 4.50001C8.99971 4.77615 9.22357 5.00001 9.49971 5.00001H10.3747ZM5.00038 7C4.72424 7 4.50038 7.22386 4.50038 7.5C4.50038 7.77614 4.72424 8 5.00038 8H10.0004C10.2765 8 10.5004 7.77614 10.5004 7.5C10.5004 7.22386 10.2765 7 10.0004 7H5.00038Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var mi=["color"],E9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,mi);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M4.56427 3.99988C4.58422 3.99989 4.60445 3.99989 4.62496 3.99989H5.49996C5.7761 3.99989 5.99996 4.22375 5.99996 4.49989C5.99996 4.77603 5.7761 4.99989 5.49996 4.99989H4.62496C4.02108 4.99989 3.78932 5.00213 3.60601 5.03713C2.80287 5.1905 2.19181 5.78883 2.03759 6.53312C2.00257 6.70212 1.99996 6.91739 1.99996 7.49989C1.99996 8.08239 2.00257 8.29766 2.03759 8.46666C2.19181 9.21095 2.80287 9.80928 3.60601 9.96265C3.78932 9.99765 4.02108 9.99989 4.62496 9.99989H5.49996C5.7761 9.99989 5.99996 10.2237 5.99996 10.4999C5.99996 10.776 5.7761 10.9999 5.49996 10.9999H4.62496C4.60445 10.9999 4.58422 10.9999 4.56427 10.9999C4.04159 11 3.70712 11 3.41845 10.9449C2.23814 10.7195 1.29871 9.82937 1.05839 8.66955C0.999782 8.38669 0.999848 8.05992 0.999947 7.56301C0.999951 7.54227 0.999955 7.52123 0.999955 7.49989C0.999955 7.47855 0.999951 7.45751 0.999947 7.43677C0.999848 6.93986 0.999782 6.61309 1.05839 6.33023C1.29871 5.17041 2.23814 4.28027 3.41845 4.05488C3.70712 3.99976 4.04159 3.99981 4.56427 3.99988ZM11.3939 5.03713C11.2106 5.00213 10.9788 4.99989 10.375 4.99989H9.49996C9.22381 4.99989 8.99996 4.77603 8.99996 4.49989C8.99996 4.22375 9.22381 3.99989 9.49996 3.99989H10.375C10.3955 3.99989 10.4157 3.99989 10.4356 3.99988C10.9583 3.99981 11.2928 3.99976 11.5815 4.05488C12.7618 4.28027 13.7012 5.17041 13.9415 6.33023C14.0001 6.61309 14.0001 6.93985 14 7.43676C14 7.4575 14 7.47854 14 7.49989C14 7.52124 14 7.54228 14 7.56302C14.0001 8.05992 14.0001 8.38669 13.9415 8.66955C13.7012 9.82937 12.7618 10.7195 11.5815 10.9449C11.2928 11 10.9583 11 10.4356 10.9999C10.4157 10.9999 10.3955 10.9999 10.375 10.9999H9.49996C9.22381 10.9999 8.99996 10.776 8.99996 10.4999C8.99996 10.2237 9.22381 9.99989 9.49996 9.99989H10.375C10.9788 9.99989 11.2106 9.99765 11.3939 9.96265C12.197 9.80928 12.8081 9.21095 12.9623 8.46666C12.9973 8.29766 13 8.08239 13 7.49989C13 6.91739 12.9973 6.70212 12.9623 6.53312C12.8081 5.78883 12.197 5.1905 11.3939 5.03713Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var hi=["color"],A9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,hi);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M5.00003 3.25C5.00003 2.97386 4.77617 2.75 4.50003 2.75C4.22389 2.75 4.00003 2.97386 4.00003 3.25V7.10003H2.49998C2.27906 7.10003 2.09998 7.27912 2.09998 7.50003C2.09998 7.72094 2.27906 7.90003 2.49998 7.90003H4.00003V8.55C4.00003 10.483 5.56703 12.05 7.50003 12.05C9.43303 12.05 11 10.483 11 8.55V7.90003H12.5C12.7209 7.90003 12.9 7.72094 12.9 7.50003C12.9 7.27912 12.7209 7.10003 12.5 7.10003H11V3.25C11 2.97386 10.7762 2.75 10.5 2.75C10.2239 2.75 10 2.97386 10 3.25V7.10003H5.00003V3.25ZM5.00003 7.90003V8.55C5.00003 9.93071 6.11932 11.05 7.50003 11.05C8.88074 11.05 10 9.93071 10 8.55V7.90003H5.00003Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var gi=["color"],Z9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,gi);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),vi=["color"],F9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,vi);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),xi=["color"],$9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,xi);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Li=["color"],N9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,Li);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var wi=["color"],U9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,wi);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M4 6H11L7.5 10.5L4 6Z",fill:a}))});var Ii=["color"],q9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,Ii);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M4 9H11L7.5 4.5L4 9Z",fill:a}))});var bi=["color"],z9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,bi);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M5.00001 2.75C5.00001 2.47386 4.77615 2.25 4.50001 2.25C4.22387 2.25 4.00001 2.47386 4.00001 2.75V8.05C4.00001 9.983 5.56702 11.55 7.50001 11.55C9.43301 11.55 11 9.983 11 8.05V2.75C11 2.47386 10.7762 2.25 10.5 2.25C10.2239 2.25 10 2.47386 10 2.75V8.05C10 9.43071 8.88072 10.55 7.50001 10.55C6.1193 10.55 5.00001 9.43071 5.00001 8.05V2.75ZM3.49998 13.1001C3.27906 13.1001 3.09998 13.2791 3.09998 13.5001C3.09998 13.721 3.27906 13.9001 3.49998 13.9001H11.5C11.7209 13.9001 11.9 13.721 11.9 13.5001C11.9 13.2791 11.7209 13.1001 11.5 13.1001H3.49998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Mi=["color"],j9=pe(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Ce(e,Mi);return G("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),G("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});import He from"react";import{createRoot as t8}from"react-dom/client";import K9 from"react";import{jsx as Na,jsxs as G9}from"react/jsx-runtime";function ft({title:e,defaultOpen:t=!0,children:o}){let[a,r]=K9.useState(t),l=K9.useCallback(n=>{r(n.currentTarget.open)},[]);return G9("details",{className:"property-panel-section",open:a,onToggle:l,children:[G9("summary",{className:"property-panel-section-trigger",children:[Na("span",{children:e}),Na(y9,{className:"property-panel-section-chevron",width:12,height:12,"aria-hidden":"true"})]}),Na("div",{className:"property-panel-section-content",children:o})]})}var W9=["H1","H2","H3","H4","H5","H6","P","SPAN","A","BUTTON","LABEL"];import n1 from"react";import*as b1 from"react";import{jsx as yi}from"react/jsx-runtime";function pt(e,t=[]){let o=[];function a(l,n){let i=b1.createContext(n),s=o.length;o=[...o,n];let d=c=>{let{scope:f,children:x,...g}=c,b=f?.[e]?.[s]||i,m=b1.useMemo(()=>g,Object.values(g));return yi(b.Provider,{value:m,children:x})};d.displayName=l+"Provider";function u(c,f){let x=f?.[e]?.[s]||i,g=b1.useContext(x);if(g)return g;if(n!==void 0)return n;throw new Error(`\`${c}\` must be used within \`${l}\``)}return[d,u]}let r=()=>{let l=o.map(n=>b1.createContext(n));return function(i){let s=i?.[e]||l;return b1.useMemo(()=>({[`__scope${e}`]:{...i,[e]:s}}),[i,s])}};return r.scopeName=e,[a,Si(r,...t)]}function Si(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let a=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(l){let n=a.reduce((i,{useScope:s,scopeName:d})=>{let c=s(l)[`__scope${d}`];return{...i,...c}},{});return b1.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return o.scopeName=t.scopeName,o}import*as Y9 from"react";import*as Vi from"react-dom";import*as we from"react";import*as Q9 from"react";function X9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ua(...e){return t=>{let o=!1,a=e.map(r=>{let l=X9(r,t);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let r=0;r<a.length;r++){let l=a[r];typeof l=="function"?l():X9(e[r],null)}}}}function Nt(...e){return Q9.useCallback(Ua(...e),e)}import{Fragment as T8,jsx as J9}from"react/jsx-runtime";function Ut(e){let t=Ri(e),o=we.forwardRef((a,r)=>{let{children:l,...n}=a,i=we.Children.toArray(l),s=i.find(ki);if(s){let d=s.props.children,u=i.map(c=>c===s?we.Children.count(d)>1?we.Children.only(null):we.isValidElement(d)?d.props.children:null:c);return J9(t,{...n,ref:r,children:we.isValidElement(d)?we.cloneElement(d,void 0,u):null})}return J9(t,{...n,ref:r,children:l})});return o.displayName=`${e}.Slot`,o}function Ri(e){let t=we.forwardRef((o,a)=>{let{children:r,...l}=o;if(we.isValidElement(r)){let n=Ti(r),i=Pi(l,r.props);return r.type!==we.Fragment&&(i.ref=a?Ua(a,n):n),we.cloneElement(r,i)}return we.Children.count(r)>1?we.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Hi=Symbol("radix.slottable");function ki(e){return we.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Hi}function Pi(e,t){let o={...t};for(let a in t){let r=e[a],l=t[a];/^on[A-Z]/.test(a)?r&&l?o[a]=(...i)=>{let s=l(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...l}:a==="className"&&(o[a]=[r,l].filter(Boolean).join(" "))}return{...e,...o}}function Ti(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}import{jsx as _i}from"react/jsx-runtime";var Di=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_1=Di.reduce((e,t)=>{let o=Ut(`Primitive.${t}`),a=Y9.forwardRef((r,l)=>{let{asChild:n,...i}=r,s=n?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_i(s,{...i,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});import*as be from"react";var B8=!!(typeof window<"u"&&window.document&&window.document.createElement);function M1(e,t,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e?.(r),o===!1||!r.defaultPrevented)return t?.(r)}}import J1 from"react";import{jsx as qa}from"react/jsx-runtime";import K8 from"react";import{jsx as W8}from"react/jsx-runtime";function e2(e){let t=e+"CollectionProvider",[o,a]=pt(t),[r,l]=o(t,{collectionRef:{current:null},itemMap:new Map}),n=b=>{let{scope:m,children:M}=b,v=J1.useRef(null),R=J1.useRef(new Map).current;return qa(r,{scope:m,itemMap:R,collectionRef:v,children:M})};n.displayName=t;let i=e+"CollectionSlot",s=Ut(i),d=J1.forwardRef((b,m)=>{let{scope:M,children:v}=b,R=l(i,M),L=Nt(m,R.collectionRef);return qa(s,{ref:L,children:v})});d.displayName=i;let u=e+"CollectionItemSlot",c="data-radix-collection-item",f=Ut(u),x=J1.forwardRef((b,m)=>{let{scope:M,children:v,...R}=b,L=J1.useRef(null),V=Nt(m,L),B=l(u,M);return J1.useEffect(()=>(B.itemMap.set(L,{ref:L,...R}),()=>void B.itemMap.delete(L))),qa(f,{[c]:"",ref:V,children:v})});x.displayName=u;function g(b){let m=l(e+"CollectionConsumer",b);return J1.useCallback(()=>{let v=m.collectionRef.current;if(!v)return[];let R=Array.from(v.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((B,z)=>R.indexOf(B.ref.current)-R.indexOf(z.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:n,Slot:d,ItemSlot:x},g,a]}import*as za from"react";import*as t2 from"react";var bo=globalThis?.document?t2.useLayoutEffect:()=>{};var Oi=za[" useId ".trim().toString()]||(()=>{}),Bi=0;function o2(e){let[t,o]=za.useState(Oi());return bo(()=>{e||o(a=>a??String(Bi++))},[e]),e||(t?`radix-${t}`:"")}import*as Ct from"react";function a2(e){let t=Ct.useRef(e);return Ct.useEffect(()=>{t.current=e}),Ct.useMemo(()=>(...o)=>t.current?.(...o),[])}import*as Qe from"react";import*as Mo from"react";var Ei=Qe[" useInsertionEffect ".trim().toString()]||bo;function Y1({prop:e,defaultProp:t,onChange:o=()=>{},caller:a}){let[r,l,n]=Ai({defaultProp:t,onChange:o}),i=e!==void 0,s=i?e:r;{let u=Qe.useRef(e!==void 0);Qe.useEffect(()=>{let c=u.current;c!==i&&console.warn(`${a} is changing from ${c?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,a])}let d=Qe.useCallback(u=>{if(i){let c=Zi(u)?u(e):u;c!==e&&n.current?.(c)}else l(u)},[i,e,l,n]);return[s,d]}function Ai({defaultProp:e,onChange:t}){let[o,a]=Qe.useState(e),r=Qe.useRef(o),l=Qe.useRef(t);return Ei(()=>{l.current=t},[t]),Qe.useEffect(()=>{r.current!==o&&(l.current?.(o),r.current=o)},[o,r]),[o,a,l]}function Zi(e){return typeof e=="function"}var ac=Symbol("RADIX:SYNC_STATE");import*as yo from"react";import{jsx as nc}from"react/jsx-runtime";var Fi=yo.createContext(void 0);function So(e){let t=yo.useContext(Fi);return e||t||"ltr"}import{jsx as et}from"react/jsx-runtime";var ja="rovingFocusGroup.onEntryFocus",$i={bubbles:!1,cancelable:!0},qt="RovingFocusGroup",[Ka,r2,Ni]=e2(qt),[Ui,Ga]=pt(qt,[Ni]),[qi,zi]=Ui(qt),l2=be.forwardRef((e,t)=>et(Ka.Provider,{scope:e.__scopeRovingFocusGroup,children:et(Ka.Slot,{scope:e.__scopeRovingFocusGroup,children:et(ji,{...e,ref:t})})}));l2.displayName=qt;var ji=be.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:a,loop:r=!1,dir:l,currentTabStopId:n,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:s,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...c}=e,f=be.useRef(null),x=Nt(t,f),g=So(l),[b,m]=Y1({prop:n,defaultProp:i??null,onChange:s,caller:qt}),[M,v]=be.useState(!1),R=a2(d),L=r2(o),V=be.useRef(!1),[B,z]=be.useState(0);return be.useEffect(()=>{let y=f.current;if(y)return y.addEventListener(ja,R),()=>y.removeEventListener(ja,R)},[R]),et(qi,{scope:o,orientation:a,dir:g,loop:r,currentTabStopId:b,onItemFocus:be.useCallback(y=>m(y),[m]),onItemShiftTab:be.useCallback(()=>v(!0),[]),onFocusableItemAdd:be.useCallback(()=>z(y=>y+1),[]),onFocusableItemRemove:be.useCallback(()=>z(y=>y-1),[]),children:et(_1.div,{tabIndex:M||B===0?-1:0,"data-orientation":a,...c,ref:x,style:{outline:"none",...e.style},onMouseDown:M1(e.onMouseDown,()=>{V.current=!0}),onFocus:M1(e.onFocus,y=>{let H=!V.current;if(y.target===y.currentTarget&&H&&!M){let j=new CustomEvent(ja,$i);if(y.currentTarget.dispatchEvent(j),!j.defaultPrevented){let N=L().filter(w=>w.focusable),J=N.find(w=>w.active),D=N.find(w=>w.id===b),S=[J,D,...N].filter(Boolean).map(w=>w.ref.current);s2(S,u)}}V.current=!1}),onBlur:M1(e.onBlur,()=>v(!1))})})}),n2="RovingFocusGroupItem",i2=be.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:a=!0,active:r=!1,tabStopId:l,children:n,...i}=e,s=o2(),d=l||s,u=zi(n2,o),c=u.currentTabStopId===d,f=r2(o),{onFocusableItemAdd:x,onFocusableItemRemove:g,currentTabStopId:b}=u;return be.useEffect(()=>{if(a)return x(),()=>g()},[a,x,g]),et(Ka.ItemSlot,{scope:o,id:d,focusable:a,active:r,children:et(_1.span,{tabIndex:c?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:M1(e.onMouseDown,m=>{a?u.onItemFocus(d):m.preventDefault()}),onFocus:M1(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:M1(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){u.onItemShiftTab();return}if(m.target!==m.currentTarget)return;let M=Wi(m,u.orientation,u.dir);if(M!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let R=f().filter(L=>L.focusable).map(L=>L.ref.current);if(M==="last")R.reverse();else if(M==="prev"||M==="next"){M==="prev"&&R.reverse();let L=R.indexOf(m.currentTarget);R=u.loop?Xi(R,L+1):R.slice(L+1)}setTimeout(()=>s2(R))}}),children:typeof n=="function"?n({isCurrentTabStop:c,hasTabStop:b!=null}):n})})});i2.displayName=n2;var Ki={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Gi(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Wi(e,t,o){let a=Gi(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return Ki[a]}function s2(e,t=!1){let o=document.activeElement;for(let a of e)if(a===o||(a.focus({preventScroll:t}),document.activeElement!==o))return}function Xi(e,t){return e.map((o,a)=>e[(t+a)%e.length])}var d2=l2,u2=i2;import*as c2 from"react";import{jsx as Ji}from"react/jsx-runtime";var f2="Toggle",Wa=c2.forwardRef((e,t)=>{let{pressed:o,defaultPressed:a,onPressedChange:r,...l}=e,[n,i]=Y1({prop:o,onChange:r,defaultProp:a??!1,caller:f2});return Ji(_1.button,{type:"button","aria-pressed":n,"data-state":n?"on":"off","data-disabled":e.disabled?"":void 0,...l,ref:t,onClick:M1(e.onClick,()=>{e.disabled||i(!n)})})});Wa.displayName=f2;import{jsx as Be}from"react/jsx-runtime";var D1="ToggleGroup",[C2,Tc]=pt(D1,[Ga]),m2=Ga(),Xa=n1.forwardRef((e,t)=>{let{type:o,...a}=e;if(o==="single")return Be(Yi,{...a,ref:t});if(o==="multiple")return Be(e3,{...a,ref:t});throw new Error(`Missing prop \`type\` expected on \`${D1}\``)});Xa.displayName=D1;var[h2,g2]=C2(D1),Yi=n1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...l}=e,[n,i]=Y1({prop:o,defaultProp:a??"",onChange:r,caller:D1});return Be(h2,{scope:e.__scopeToggleGroup,type:"single",value:n1.useMemo(()=>n?[n]:[],[n]),onItemActivate:i,onItemDeactivate:n1.useCallback(()=>i(""),[i]),children:Be(v2,{...l,ref:t})})}),e3=n1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...l}=e,[n,i]=Y1({prop:o,defaultProp:a??[],onChange:r,caller:D1}),s=n1.useCallback(u=>i((c=[])=>[...c,u]),[i]),d=n1.useCallback(u=>i((c=[])=>c.filter(f=>f!==u)),[i]);return Be(h2,{scope:e.__scopeToggleGroup,type:"multiple",value:n,onItemActivate:s,onItemDeactivate:d,children:Be(v2,{...l,ref:t})})});Xa.displayName=D1;var[t3,o3]=C2(D1),v2=n1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,disabled:a=!1,rovingFocus:r=!0,orientation:l,dir:n,loop:i=!0,...s}=e,d=m2(o),u=So(n),c={role:"group",dir:u,...s};return Be(t3,{scope:o,rovingFocus:r,disabled:a,children:r?Be(d2,{asChild:!0,...d,orientation:l,dir:u,loop:i,children:Be(_1.div,{...c,ref:t})}):Be(_1.div,{...c,ref:t})})}),Ro="ToggleGroupItem",x2=n1.forwardRef((e,t)=>{let o=g2(Ro,e.__scopeToggleGroup),a=o3(Ro,e.__scopeToggleGroup),r=m2(e.__scopeToggleGroup),l=o.value.includes(e.value),n=a.disabled||e.disabled,i={...e,pressed:l,disabled:n},s=n1.useRef(null);return a.rovingFocus?Be(u2,{asChild:!0,...r,focusable:!n,active:l,ref:s,children:Be(p2,{...i,ref:t})}):Be(p2,{...i,ref:t})});x2.displayName=Ro;var p2=n1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,value:a,...r}=e,l=g2(Ro,o),n={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=l.type==="single"?n:void 0;return Be(Wa,{...i,...r,ref:t,onPressedChange:s=>{s?l.onItemActivate(a):l.onItemDeactivate(a)}})}),L2=Xa,w2=x2;import s3 from"react";import{jsx as n3,jsxs as i3}from"react/jsx-runtime";var r3={border:"none",margin:0,padding:0,minWidth:0},l3={color:"var(--dmp-color-foreground)",fontSize:"var(--dmp-font-size-label)",display:"block",marginBottom:"5px",padding:0};function p1({label:e,id:t,className:o,children:a}){let r=`${t}-legend`;return i3("fieldset",{style:r3,className:o,"aria-labelledby":r,children:[n3("legend",{id:r,style:l3,children:e}),a]})}import{jsx as Qa}from"react/jsx-runtime";function C1({label:e,options:t,value:o,onChange:a,id:r="radio-group"}){let l=s3.useCallback(n=>{n&&typeof a=="function"&&a(n)},[a]);return Qa(p1,{label:e,id:r,className:"radioGroupEditor-fieldset",children:Qa(L2,{type:"single",value:o,onValueChange:l,className:"radioGroupEditor-root","aria-label":e,children:t.map(n=>Qa(w2,{value:n.value,className:"radioGroupEditor-item","aria-label":n.label,title:n.label,children:n.icon??n.label},n.value))})})}import{jsx as zt}from"react/jsx-runtime";var b2=[{value:"none",labelKey:"none",defaultLabel:"None",icon:zt(ct,{width:14,height:14})},{value:"solid",labelKey:"solid",defaultLabel:"Solid",icon:zt(M9,{width:14,height:14})},{value:"dashed",labelKey:"dashed",defaultLabel:"Dashed",icon:zt(I9,{width:14,height:14})},{value:"dotted",labelKey:"dotted",defaultLabel:"Dotted",icon:zt(b9,{width:14,height:14})}],I2=new Set(b2.map(e=>e.value));function d3(e){if(!e)return"none";if(I2.has(e))return e;let t=e.split(/\s+/)[0]??"";return I2.has(t)?t:"none"}function M2({label:e="Border Style",value:t,onChange:o,id:a="border-style",optionLabels:r}){let l=b2.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return zt(C1,{label:e,options:l,value:d3(t),onChange:o,id:a})}import Te from"react";function je(e,t){return e.replace(/\{(\d+)\}/g,(o,a)=>{let r=t[Number(a)];return r===void 0?o:String(r)})}function y1(e,t){if(t==null||typeof t!="object"||typeof e!="object")return e;let o={...e},a=t;for(let r of Object.keys(o)){let l=o[r],n=a[r];l!==null&&typeof l=="object"&&!Array.isArray(l)?o[r]=y1(l,n):typeof n=="string"&&(o[r]=n)}return o}var y2=[{path:"general.headerTitle"},{path:"general.emptyPlaceholder"},{path:"general.inlineEditEditable"},{path:"general.inlineEditNonEditable"},{path:"general.addToChatContext"},{path:"general.ariaPropertyPanel"},{path:"general.ariaSelectedComponent"},{path:"general.ariaElementStyling"},{path:"sections.background"},{path:"sections.spacing"},{path:"sections.border"},{path:"sections.typography"},{path:"sections.elementDimensions"},{path:"instances.backgroundColor"},{path:"instances.padding"},{path:"instances.margin"},{path:"instances.borderRadius"},{path:"instances.borderWeight"},{path:"instances.borderStyle"},{path:"instances.borderColor"},{path:"instances.fontFamily"},{path:"instances.fontSize"},{path:"instances.fontWeight"},{path:"instances.fontStyle"},{path:"instances.textColor"},{path:"instances.textAlignment"},{path:"instances.textFormatting"},{path:"instances.textTransform"},{path:"instances.lineHeight"},{path:"instances.letterSpacing"},{path:"instances.width"},{path:"instances.minWidth"},{path:"instances.maxWidth"},{path:"instances.height"},{path:"instances.minHeight"},{path:"instances.maxHeight"},{path:"instances.overflow"},{path:"editors.boxDimension.sides.top"},{path:"editors.boxDimension.sides.right"},{path:"editors.boxDimension.sides.bottom"},{path:"editors.boxDimension.sides.left"},{path:"editors.boxDimension.corners.topLeft"},{path:"editors.boxDimension.corners.topRight"},{path:"editors.boxDimension.corners.bottomRight"},{path:"editors.boxDimension.corners.bottomLeft"},{path:"editors.boxDimension.linkSides"},{path:"editors.boxDimension.unlinkSides"},{path:"editors.boxDimension.ariaUnit",placeholders:[0]},{path:"editors.boxDimension.ariaSide",placeholders:[0,1]},{path:"editors.dimension.ariaValue",placeholders:[0]},{path:"editors.dimension.ariaUnit",placeholders:[0]},{path:"editors.color.placeholder"},{path:"editors.color.ariaValue",placeholders:[0]},{path:"editors.color.ariaOpenPicker",placeholders:[0,1]},{path:"editors.color.ariaPicker",placeholders:[0]},{path:"editors.color.ariaSaturation"},{path:"editors.color.ariaEyedropper"},{path:"editors.color.ariaHue"},{path:"editors.color.ariaAlphaSlider"},{path:"editors.color.ariaHex"},{path:"editors.color.ariaChannel",placeholders:[0,1,2,3]},{path:"editors.color.ariaAlphaInput"},{path:"editors.color.ariaFormatCycle",placeholders:[0]},{path:"editors.color.titleFormatCycle"},{path:"editors.fontWeight.options.default"},{path:"editors.fontWeight.options.thin"},{path:"editors.fontWeight.options.extraLight"},{path:"editors.fontWeight.options.light"},{path:"editors.fontWeight.options.regular"},{path:"editors.fontWeight.options.medium"},{path:"editors.fontWeight.options.semiBold"},{path:"editors.fontWeight.options.bold"},{path:"editors.fontWeight.options.extraBold"},{path:"editors.fontWeight.options.black"},{path:"editors.fontStyle.options.normal"},{path:"editors.fontStyle.options.italic"},{path:"editors.borderStyle.options.none"},{path:"editors.borderStyle.options.solid"},{path:"editors.borderStyle.options.dashed"},{path:"editors.borderStyle.options.dotted"},{path:"editors.overflow.options.default"},{path:"editors.overflow.options.visible"},{path:"editors.overflow.options.hidden"},{path:"editors.overflow.options.scroll"},{path:"editors.overflow.options.auto"},{path:"editors.textAlignment.options.left"},{path:"editors.textAlignment.options.center"},{path:"editors.textAlignment.options.right"},{path:"editors.textAlignment.options.justify"},{path:"editors.textDecoration.options.none"},{path:"editors.textDecoration.options.underline"},{path:"editors.textDecoration.options.lineThrough"},{path:"editors.textTransform.options.none"},{path:"editors.textTransform.options.uppercase"},{path:"editors.textTransform.options.lowercase"},{path:"editors.textTransform.options.capitalize"},{path:"editors.fontFamily.options.default"}];function u3(e,t){return t.split(".").reduce((o,a)=>{if(o&&typeof o=="object")return o[a]},e)}function c3(e){let t=new Set;for(let o of e.matchAll(/\{(\d+)\}/g))t.add(Number(o[1]));return Array.from(t).sort((o,a)=>o-a)}function f3(e){let t=[];if(!e||typeof e!="object")return["labels is not an object"];for(let o of y2){let{path:a,placeholders:r}=o,l=u3(e,a);if(typeof l!="string"){t.push(`missing or non-string label: ${a}`);continue}if(r){let n=c3(l),i=[...r].sort((d,u)=>d-u);(n.length!==i.length||n.some((d,u)=>d!==i[u]))&&t.push(`placeholder mismatch at ${a}: expected {${i.join(",")}}, got {${n.join(",")}}`)}}return t}var Ho=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"},{value:"pt",label:"pt"},{value:"vw",label:"vw"},{value:"vh",label:"vh"},{value:"vmin",label:"vmin"},{value:"vmax",label:"vmax"},{value:"ch",label:"ch"},{value:"ex",label:"ex"},{value:"cm",label:"cm"},{value:"mm",label:"mm"},{value:"in",label:"in"},{value:"pc",label:"pc"}],i1={px:{min:0,max:1e4,step:1,decimals:1},em:{min:0,max:100,step:.1,decimals:3},rem:{min:0,max:100,step:.1,decimals:3},"%":{min:0,max:1e3,step:1,decimals:2},pt:{min:0,max:1e4,step:1,decimals:1},vw:{min:0,max:100,step:.1,decimals:1},vh:{min:0,max:100,step:.1,decimals:1},vmin:{min:0,max:100,step:.1,decimals:1},vmax:{min:0,max:100,step:.1,decimals:1},ch:{min:0,max:100,step:.1,decimals:1},ex:{min:0,max:100,step:.1,decimals:1},cm:{min:0,max:100,step:.1,decimals:2},mm:{min:0,max:1e3,step:1,decimals:1},in:{min:0,max:50,step:.01,decimals:2},pc:{min:0,max:500,step:1,decimals:0}},p3=i1.px??{min:0,max:1e4,step:1,decimals:0};function jt(e){let t=e.map(o=>o.value).join("|");return new RegExp(`^(-?\\d*\\.?\\d+)\\s*(${t})$`)}var C3=jt(Ho);function Ee(e,t="px",o=C3){if(e==null||e==="")return{numericValue:"",unit:t};let a=String(e).trim();if(a==="")return{numericValue:"",unit:t};let r=a.match(o);if(r&&r[1]!=null&&r[2]!=null)return{numericValue:parseFloat(r[1]),unit:r[2]};let l=parseFloat(a);return isNaN(l)?{numericValue:"",unit:t}:{numericValue:l,unit:t}}function Ja(e,t=i1){return t[e]||p3}function s1(e,t,o=i1){let a=Ja(t,o);return Math.min(a.max,Math.max(a.min,e))}function d1(e,t,o=i1){if(e===""||e==null||isNaN(e))return"";let a=Ja(t,o);return Number(Number(e).toFixed(a.decimals))}function ko(e,t){return e===""||e==null||isNaN(e)?"":`${e}${t}`}function Po(e,t,o,a,r=i1){let l=parseFloat(e)||0,n=Ja(a,r),i=o?10:1,s=(t==="ArrowUp"?1:-1)*n.step*i,d=s1(l+s,a,r);return String(d1(d,a,r))}function Ya({top:e,right:t,bottom:o,left:a}){return`${e||"0px"} ${t||"0px"} ${o||"0px"} ${a||"0px"}`}function mt(e){let t={top:"",right:"",bottom:"",left:""};if(!e||typeof e!="string")return t;let o=e.trim().split(/\s+/),[a="",r="",l="",n=""]=o;return o.length===0||o.length===1&&a===""?t:o.length===1?{top:a,right:a,bottom:a,left:a}:o.length===2?{top:a,right:r,bottom:a,left:r}:o.length===3?{top:a,right:r,bottom:l,left:r}:{top:a,right:r,bottom:l,left:n}}function Je(...e){return Ho.filter(t=>e.includes(t.value))}var m1={width:{units:Je("px","em","rem","vw","ch","%"),icon:j9},minWidth:{units:Je("px","em","rem","vw","ch","%")},maxWidth:{units:Je("px","em","rem","vw","ch","%")},height:{units:Je("px","em","rem","vh","%"),icon:k9},minHeight:{units:Je("px","em","rem","vh","%")},maxHeight:{units:Je("px","em","rem","vh","%")},fontSize:{units:Je("px","em","rem","%","pt"),constraints:{...i1,px:{min:0,max:1e3,step:1,decimals:0},"%":{min:0,max:1e3,step:1,decimals:0}},icon:H9},lineHeight:{units:[],defaultUnit:"",constraints:{"":{min:0,max:10,step:.1,decimals:2}},icon:O9},letterSpacing:{units:Je("px","em","rem"),constraints:{...i1,px:{min:-100,max:1e3,step:.5,decimals:1},em:{min:-10,max:100,step:.01,decimals:3},rem:{min:-10,max:100,step:.01,decimals:3}},icon:D9}},Kt={padding:{units:Je("px","em","rem","%")},margin:{units:Je("px","em","rem","%")},borderRadius:{units:Je("px","em","rem","%"),sideLabelKind:"corners"},borderWidth:{units:Je("px","em","rem")}};import{jsx as u1,jsxs as To}from"react/jsx-runtime";var m3=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],ht=["top","right","bottom","left"],h3={sides:{top:"Top",right:"Right",bottom:"Bottom",left:"Left"},corners:{topLeft:"Top Left",topRight:"Top Right",bottomRight:"Bottom Right",bottomLeft:"Bottom Left"},linkSides:"Link all sides",unlinkSides:"Unlink sides",ariaUnit:"{0} unit",ariaSide:"{0} {1}"};function g3(e,t){return t==="corners"?[e.corners.topLeft,e.corners.topRight,e.corners.bottomRight,e.corners.bottomLeft]:[e.sides.top,e.sides.right,e.sides.bottom,e.sides.left]}var v3=u1(B9,{width:14,height:14}),x3=u1(E9,{width:14,height:14});function Gt(e){return typeof e=="string"&&e.trim().toLowerCase()==="auto"}function er(e,t,o){let a={top:"",right:"",bottom:"",left:""};for(let r of ht){let l=e[r];if(l==null||l==="")a[r]="";else if(Gt(l))a[r]="auto";else{let n=Ee(String(l),t,o);a[r]=n.numericValue!==""?String(n.numericValue):""}}return a}function tr(e){let t=e.top||"";return t===(e.right||"")&&t===(e.bottom||"")&&t===(e.left||"")}function S2(e,t,o){for(let a of ht){let r=e[a];if(r!=null&&r!==""&&r!=="0"){let l=Ee(String(r),"px",t);if(l.unit&&o.has(l.unit))return l.unit}}return"px"}function L3(e,t,o){if(Gt(e))return"auto";let a=parseFloat(e);if(e===""||isNaN(a))return"";let r=s1(a,t,o);return`${d1(r,t,o)}${t}`}function R2(e){if(!e)return"";let t=mt(e);return!t.top&&!t.right&&!t.bottom&&!t.left?"":Ya(t)}function Wt({label:e,value:t="",onChange:o,id:a="",units:r=m3,constraints:l=i1,allowAuto:n=!1,sideLabelKind:i="sides",sideIcons:s,placeholder:d="",aria:u}){let c=y1(h3,u),f=g3(c,i),x=Te.useRef(o);x.current=o;let g=Te.useMemo(()=>jt(r),[r]),b=Te.useMemo(()=>new Set(r.map(S=>S.value)),[r]),m=Te.useMemo(()=>{if(!d)return{top:"0",right:"0",bottom:"0",left:"0"};let S=mt(d),w={top:"0",right:"0",bottom:"0",left:"0"};for(let I of ht){let p=S[I];if(!p||p==="")w[I]="0";else{let U=Ee(p,"px",g);w[I]=U.numericValue!==""?String(U.numericValue):"0"}}return w},[d,g]),M=Te.useMemo(()=>mt(t),[]),[v,R]=Te.useState(()=>S2(M,g,b)),[L,V]=Te.useState(()=>er(M,v,g)),[B,z]=Te.useState(()=>tr(L)),y=Te.useRef(R2(t));Te.useEffect(()=>{if(t===y.current)return;let S=R2(t);if(S===y.current)return;y.current=S;let w=mt(t),I=S2(w,g,b);R(I);let p=er(w,I,g);V(p),z(tr(p))},[t,g,b]);let H=Te.useCallback((S,w)=>{let I={top:"",right:"",bottom:"",left:""},p=!0;for(let _ of ht)I[_]=L3(S[_],w,l),I[_]!==""&&(p=!1);let U=p?"":Ya(I);U!==y.current&&(y.current=U,typeof x.current=="function"&&x.current(U))},[l]),j=Te.useCallback((S,w)=>{V(B?{top:w,right:w,bottom:w,left:w}:p=>({...p,[S]:w}));let I=Ee(w,v,g);I.numericValue!==""&&I.unit&&b.has(I.unit)&&I.unit!==v&&R(I.unit)},[B,v,g,b]),N=Te.useCallback((S,w)=>{let I=w.clipboardData.getData("text"),p=Ee(I,v,g);if(p.numericValue!==""&&p.unit&&b.has(p.unit)){w.preventDefault();let U=s1(p.numericValue,p.unit,l),_=String(d1(U,p.unit,l)),A=B?{top:_,right:_,bottom:_,left:_}:{...L,[S]:_};V(A),p.unit!==v&&R(p.unit),H(A,p.unit)}},[B,L,v,g,b,l,H]),J=Te.useCallback(S=>{let w=L[S];if(w===""){let A=B?{top:"",right:"",bottom:"",left:""}:{...L,[S]:""};V(A),H(A,v);return}if(n&&Gt(w)){let A="auto",E=B?{top:A,right:A,bottom:A,left:A}:{...L,[S]:A};V(E),H(E,v);return}let I=parseFloat(w);if(isNaN(I)){let A=mt(y.current);V(er(A,v,g));return}let p=s1(I,v,l),U=String(d1(p,v,l)),_=B?{top:U,right:U,bottom:U,left:U}:{...L,[S]:U};V(_),H(_,v)},[L,B,v,g,l,H,n]),D=Te.useCallback((S,w)=>{if(w.key==="Enter"){w.currentTarget.blur();return}if(w.key==="ArrowUp"||w.key==="ArrowDown"){if(Gt(L[S]))return;w.preventDefault();let I=Po(L[S],w.key,w.shiftKey,v,l);if(I===null)return;let p=B?{top:I,right:I,bottom:I,left:I}:{...L,[S]:I};V(p),H(p,v)}},[L,B,v,l,H]),q=Te.useCallback(S=>{let w=S.target.value;if(!b.has(w))return;R(w);let I={top:"",right:"",bottom:"",left:""};for(let p of ht){let U=L[p];if(Gt(U))I[p]="auto";else if(U!==""){let _=parseFloat(U);if(isNaN(_))I[p]=U;else{let A=s1(_,w,l);I[p]=String(d1(A,w,l))}}else I[p]=""}V(I),H(I,w)},[L,b,l,H]);return To(p1,{label:e,id:a,className:"boxDimensionEditor-fieldset",children:[u1("div",{className:"boxDimensionEditor-header",children:To("div",{className:"boxDimensionEditor-controls",children:[u1("button",{type:"button",className:"boxDimensionEditor-link-btn"+(B?" boxDimensionEditor-link-btn--active":""),onClick:()=>{if(!B){let S=L.top;if(!tr(L)){let w={top:S,right:S,bottom:S,left:S};V(w),H(w,v)}}z(S=>!S)},"aria-label":B?c.unlinkSides:c.linkSides,"aria-pressed":B,title:B?c.unlinkSides:c.linkSides,children:B?v3:x3}),u1("select",{className:"boxDimensionEditor-unit",value:v,onChange:q,"aria-label":je(c.ariaUnit,[e]),children:r.map(S=>u1("option",{value:S.value,children:S.label},S.value))})]})}),u1("div",{className:"boxDimensionEditor-grid",children:ht.map((S,w)=>{let I=s&&s[w];return To("div",{className:"boxDimensionEditor-cell",children:[u1("label",{htmlFor:`${a}-${S}`,className:"boxDimensionEditor-label",children:f[w]}),To("div",{className:"boxDimensionEditor-input-row",children:[I&&u1("span",{className:"boxDimensionEditor-input-icon","aria-hidden":"true",children:u1(I,{size:12,width:12,height:12})}),u1("input",{id:`${a}-${S}`,type:"text",className:I?"boxDimensionEditor-input boxDimensionEditor-input--with-icon":"boxDimensionEditor-input",value:L[S],placeholder:m[S],onChange:p=>j(S,p.target.value),onPaste:p=>N(S,p),onBlur:()=>J(S),onKeyDown:p=>D(S,p),"aria-label":je(c.ariaSide,[e,f[w]??""]),autoComplete:"off",spellCheck:"false"})]})]},S)})})]})}import{forwardRef as I3,createElement as b3}from"react";var Vo=(...e)=>e.filter((t,o,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===o).join(" ").trim();var H2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var k2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,a)=>a?a.toUpperCase():o.toLowerCase());var or=e=>{let t=k2(e);return t.charAt(0).toUpperCase()+t.slice(1)};import{forwardRef as w3,createElement as V2}from"react";var P2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var T2=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var _2=w3(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:r="",children:l,iconNode:n,...i},s)=>V2("svg",{ref:s,...P2,width:t,height:t,stroke:e,strokeWidth:a?Number(o)*24/Number(t):o,className:Vo("lucide",r),...!l&&!T2(i)&&{"aria-hidden":"true"},...i},[...n.map(([d,u])=>V2(d,u)),...Array.isArray(l)?l:[l]]));var D2=(e,t)=>{let o=I3(({className:a,...r},l)=>b3(_2,{ref:l,iconNode:t,className:Vo(`lucide-${H2(or(e))}`,`lucide-${e}`,a),...r}));return o.displayName=or(e),o};var M3=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],Xt=D2("pipette",M3);import he from"react";import{useRef as Bo,useCallback as Re,useEffect as ur,useMemo as Eo,useState as cr,createContext as y3,useContext as S3}from"react";var O2={exports:{}},Qt={};var B2;function R3(){if(B2)return Qt;B2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(a,r,l){var n=null;if(l!==void 0&&(n=""+l),r.key!==void 0&&(n=""+r.key),"key"in r){l={};for(var i in r)i!=="key"&&(l[i]=r[i])}else l=r;return r=l.ref,{$$typeof:e,type:a,key:n,ref:r!==void 0?r:null,props:l}}return Qt.Fragment=t,Qt.jsx=o,Qt.jsxs=o,Qt}var E2;function H3(){return E2||(E2=1,O2.exports=R3()),O2.exports}var ve=H3();function j2(e){var t,o,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=j2(e[t]))&&(a&&(a+=" "),a+=o)}else for(o in e)e[o]&&(a&&(a+=" "),a+=o);return a}function k3(){for(var e,t,o=0,a="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=j2(e))&&(a&&(a+=" "),a+=t);return a}var fr="-",P3=e=>{let t=V3(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:r=>{let l=r.split(fr);return l[0]===""&&l.length!==1&&l.shift(),K2(l,t)||T3(r)},getConflictingClassGroupIds:(r,l)=>{let n=o[r]||[];return l&&a[r]?[...n,...a[r]]:n}}},K2=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),r=a?K2(e.slice(1),a):void 0;if(r)return r;if(t.validators.length===0)return;let l=e.join(fr);return t.validators.find(({validator:n})=>n(l))?.classGroupId},A2=/^\[(.+)\]$/,T3=e=>{if(A2.test(e)){let t=A2.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},V3=e=>{let{theme:t,classGroups:o}=e,a={nextPart:new Map,validators:[]};for(let r in o)lr(o[r],a,r,t);return a},lr=(e,t,o,a)=>{e.forEach(r=>{if(typeof r=="string"){let l=r===""?t:Z2(t,r);l.classGroupId=o;return}if(typeof r=="function"){if(_3(r)){lr(r(a),t,o,a);return}t.validators.push({validator:r,classGroupId:o});return}Object.entries(r).forEach(([l,n])=>{lr(n,Z2(t,l),o,a)})})},Z2=(e,t)=>{let o=e;return t.split(fr).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},_3=e=>e.isThemeGetter,D3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,r=(l,n)=>{o.set(l,n),t++,t>e&&(t=0,a=o,o=new Map)};return{get(l){let n=o.get(l);if(n!==void 0)return n;if((n=a.get(l))!==void 0)return r(l,n),n},set(l,n){o.has(l)?o.set(l,n):r(l,n)}}},nr="!",ir=":",O3=ir.length,B3=e=>{let{prefix:t,experimentalParseClassName:o}=e,a=r=>{let l=[],n=0,i=0,s=0,d;for(let g=0;g<r.length;g++){let b=r[g];if(n===0&&i===0){if(b===ir){l.push(r.slice(s,g)),s=g+O3;continue}if(b==="/"){d=g;continue}}b==="["?n++:b==="]"?n--:b==="("?i++:b===")"&&i--}let u=l.length===0?r:r.substring(s),c=E3(u),f=c!==u,x=d&&d>s?d-s:void 0;return{modifiers:l,hasImportantModifier:f,baseClassName:c,maybePostfixModifierPosition:x}};if(t){let r=t+ir,l=a;a=n=>n.startsWith(r)?l(n.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:n,maybePostfixModifierPosition:void 0}}if(o){let r=a;a=l=>o({className:l,parseClassName:r})}return a},E3=e=>e.endsWith(nr)?e.substring(0,e.length-1):e.startsWith(nr)?e.substring(1):e,A3=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;let a=[],r=[];return o.forEach(l=>{l[0]==="["||t[l]?(a.push(...r.sort(),l),r=[]):r.push(l)}),a.push(...r.sort()),a}},Z3=e=>({cache:D3(e.cacheSize),parseClassName:B3(e),sortModifiers:A3(e),...P3(e)}),F3=/\s+/,$3=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:l}=t,n=[],i=e.trim().split(F3),s="";for(let d=i.length-1;d>=0;d-=1){let u=i[d],{isExternal:c,modifiers:f,hasImportantModifier:x,baseClassName:g,maybePostfixModifierPosition:b}=o(u);if(c){s=u+(s.length>0?" "+s:s);continue}let m=!!b,M=a(m?g.substring(0,b):g);if(!M){if(!m){s=u+(s.length>0?" "+s:s);continue}if(M=a(g),!M){s=u+(s.length>0?" "+s:s);continue}m=!1}let v=l(f).join(":"),R=x?v+nr:v,L=R+M;if(n.includes(L))continue;n.push(L);let V=r(M,m);for(let B=0;B<V.length;++B){let z=V[B];n.push(R+z)}s=u+(s.length>0?" "+s:s)}return s};function N3(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=G2(t))&&(a&&(a+=" "),a+=o);return a}var G2=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=G2(e[a]))&&(o&&(o+=" "),o+=t);return o};function U3(e,...t){let o,a,r,l=n;function n(s){let d=t.reduce((u,c)=>c(u),e());return o=Z3(d),a=o.cache.get,r=o.cache.set,l=i,i(s)}function i(s){let d=a(s);if(d)return d;let u=$3(s,o);return r(s,u),u}return function(){return l(N3.apply(null,arguments))}}var Ie=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},W2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,X2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,q3=/^\d+\/\d+$/,z3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,j3=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,K3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,G3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,W3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gt=e=>q3.test(e),ee=e=>!!e&&!Number.isNaN(Number(e)),O1=e=>!!e&&Number.isInteger(Number(e)),ar=e=>e.endsWith("%")&&ee(e.slice(0,-1)),S1=e=>z3.test(e),X3=()=>!0,Q3=e=>j3.test(e)&&!K3.test(e),Q2=()=>!1,J3=e=>G3.test(e),Y3=e=>W3.test(e),e7=e=>!F(e)&&!$(e),t7=e=>vt(e,en,Q2),F=e=>W2.test(e),tt=e=>vt(e,tn,Q3),rr=e=>vt(e,n7,ee),F2=e=>vt(e,J2,Q2),o7=e=>vt(e,Y2,Y3),_o=e=>vt(e,on,J3),$=e=>X2.test(e),Jt=e=>xt(e,tn),a7=e=>xt(e,i7),$2=e=>xt(e,J2),r7=e=>xt(e,en),l7=e=>xt(e,Y2),Do=e=>xt(e,on,!0),vt=(e,t,o)=>{let a=W2.exec(e);return a?a[1]?t(a[1]):o(a[2]):!1},xt=(e,t,o=!1)=>{let a=X2.exec(e);return a?a[1]?t(a[1]):o:!1},J2=e=>e==="position"||e==="percentage",Y2=e=>e==="image"||e==="url",en=e=>e==="length"||e==="size"||e==="bg-size",tn=e=>e==="length",n7=e=>e==="number",i7=e=>e==="family-name",on=e=>e==="shadow",s7=()=>{let e=Ie("color"),t=Ie("font"),o=Ie("text"),a=Ie("font-weight"),r=Ie("tracking"),l=Ie("leading"),n=Ie("breakpoint"),i=Ie("container"),s=Ie("spacing"),d=Ie("radius"),u=Ie("shadow"),c=Ie("inset-shadow"),f=Ie("text-shadow"),x=Ie("drop-shadow"),g=Ie("blur"),b=Ie("perspective"),m=Ie("aspect"),M=Ie("ease"),v=Ie("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...L(),$,F],B=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],y=()=>[$,F,s],H=()=>[gt,"full","auto",...y()],j=()=>[O1,"none","subgrid",$,F],N=()=>["auto",{span:["full",O1,$,F]},O1,$,F],J=()=>[O1,"auto",$,F],D=()=>["auto","min","max","fr",$,F],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],S=()=>["start","end","center","stretch","center-safe","end-safe"],w=()=>["auto",...y()],I=()=>[gt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...y()],p=()=>[e,$,F],U=()=>[...L(),$2,F2,{position:[$,F]}],_=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",r7,t7,{size:[$,F]}],E=()=>[ar,Jt,tt],C=()=>["","none","full",d,$,F],h=()=>["",ee,Jt,tt],T=()=>["solid","dashed","dotted","double"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[ee,ar,$2,F2],Q=()=>["","none",g,$,F],le=()=>["none",ee,$,F],Y=()=>["none",ee,$,F],se=()=>[ee,$,F],de=()=>[gt,"full",...y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[S1],breakpoint:[S1],color:[X3],container:[S1],"drop-shadow":[S1],ease:["in","out","in-out"],font:[e7],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[S1],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[S1],shadow:[S1],spacing:["px",ee],text:[S1],"text-shadow":[S1],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",gt,F,$,m]}],container:["container"],columns:[{columns:[ee,F,$,i]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{start:H()}],end:[{end:H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[O1,"auto",$,F]}],basis:[{basis:[gt,"full","auto",i,...y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ee,gt,"auto","initial","none",F]}],grow:[{grow:["",ee,$,F]}],shrink:[{shrink:["",ee,$,F]}],order:[{order:[O1,"first","last","none",$,F]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:y()}],"gap-x":[{"gap-x":y()}],"gap-y":[{"gap-y":y()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...S(),"normal"]}],"justify-self":[{"justify-self":["auto",...S()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...S(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...S(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...S(),"baseline"]}],"place-self":[{"place-self":["auto",...S()]}],p:[{p:y()}],px:[{px:y()}],py:[{py:y()}],ps:[{ps:y()}],pe:[{pe:y()}],pt:[{pt:y()}],pr:[{pr:y()}],pb:[{pb:y()}],pl:[{pl:y()}],m:[{m:w()}],mx:[{mx:w()}],my:[{my:w()}],ms:[{ms:w()}],me:[{me:w()}],mt:[{mt:w()}],mr:[{mr:w()}],mb:[{mb:w()}],ml:[{ml:w()}],"space-x":[{"space-x":y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":y()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[i,"screen",...I()]}],"min-w":[{"min-w":[i,"screen","none",...I()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[n]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",o,Jt,tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,$,rr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ar,F]}],"font-family":[{font:[a7,F,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,$,F]}],"line-clamp":[{"line-clamp":[ee,"none",$,rr]}],leading:[{leading:[l,...y()]}],"list-image":[{"list-image":["none",$,F]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",$,F]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:p()}],"text-color":[{text:p()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...T(),"wavy"]}],"text-decoration-thickness":[{decoration:[ee,"from-font","auto",$,tt]}],"text-decoration-color":[{decoration:p()}],"underline-offset":[{"underline-offset":[ee,"auto",$,F]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$,F]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$,F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:U()}],"bg-repeat":[{bg:_()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},O1,$,F],radial:["",$,F],conic:[O1,$,F]},l7,o7]}],"bg-color":[{bg:p()}],"gradient-from-pos":[{from:E()}],"gradient-via-pos":[{via:E()}],"gradient-to-pos":[{to:E()}],"gradient-from":[{from:p()}],"gradient-via":[{via:p()}],"gradient-to":[{to:p()}],rounded:[{rounded:C()}],"rounded-s":[{"rounded-s":C()}],"rounded-e":[{"rounded-e":C()}],"rounded-t":[{"rounded-t":C()}],"rounded-r":[{"rounded-r":C()}],"rounded-b":[{"rounded-b":C()}],"rounded-l":[{"rounded-l":C()}],"rounded-ss":[{"rounded-ss":C()}],"rounded-se":[{"rounded-se":C()}],"rounded-ee":[{"rounded-ee":C()}],"rounded-es":[{"rounded-es":C()}],"rounded-tl":[{"rounded-tl":C()}],"rounded-tr":[{"rounded-tr":C()}],"rounded-br":[{"rounded-br":C()}],"rounded-bl":[{"rounded-bl":C()}],"border-w":[{border:h()}],"border-w-x":[{"border-x":h()}],"border-w-y":[{"border-y":h()}],"border-w-s":[{"border-s":h()}],"border-w-e":[{"border-e":h()}],"border-w-t":[{"border-t":h()}],"border-w-r":[{"border-r":h()}],"border-w-b":[{"border-b":h()}],"border-w-l":[{"border-l":h()}],"divide-x":[{"divide-x":h()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":h()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...T(),"hidden","none"]}],"divide-style":[{divide:[...T(),"hidden","none"]}],"border-color":[{border:p()}],"border-color-x":[{"border-x":p()}],"border-color-y":[{"border-y":p()}],"border-color-s":[{"border-s":p()}],"border-color-e":[{"border-e":p()}],"border-color-t":[{"border-t":p()}],"border-color-r":[{"border-r":p()}],"border-color-b":[{"border-b":p()}],"border-color-l":[{"border-l":p()}],"divide-color":[{divide:p()}],"outline-style":[{outline:[...T(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ee,$,F]}],"outline-w":[{outline:["",ee,Jt,tt]}],"outline-color":[{outline:p()}],shadow:[{shadow:["","none",u,Do,_o]}],"shadow-color":[{shadow:p()}],"inset-shadow":[{"inset-shadow":["none",c,Do,_o]}],"inset-shadow-color":[{"inset-shadow":p()}],"ring-w":[{ring:h()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:p()}],"ring-offset-w":[{"ring-offset":[ee,tt]}],"ring-offset-color":[{"ring-offset":p()}],"inset-ring-w":[{"inset-ring":h()}],"inset-ring-color":[{"inset-ring":p()}],"text-shadow":[{"text-shadow":["none",f,Do,_o]}],"text-shadow-color":[{"text-shadow":p()}],opacity:[{opacity:[ee,$,F]}],"mix-blend":[{"mix-blend":[...O(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":O()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":p()}],"mask-image-linear-to-color":[{"mask-linear-to":p()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":p()}],"mask-image-t-to-color":[{"mask-t-to":p()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":p()}],"mask-image-r-to-color":[{"mask-r-to":p()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":p()}],"mask-image-b-to-color":[{"mask-b-to":p()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":p()}],"mask-image-l-to-color":[{"mask-l-to":p()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":p()}],"mask-image-x-to-color":[{"mask-x-to":p()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":p()}],"mask-image-y-to-color":[{"mask-y-to":p()}],"mask-image-radial":[{"mask-radial":[$,F]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":p()}],"mask-image-radial-to-color":[{"mask-radial-to":p()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":L()}],"mask-image-conic-pos":[{"mask-conic":[ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":p()}],"mask-image-conic-to-color":[{"mask-conic-to":p()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:U()}],"mask-repeat":[{mask:_()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",$,F]}],filter:[{filter:["","none",$,F]}],blur:[{blur:Q()}],brightness:[{brightness:[ee,$,F]}],contrast:[{contrast:[ee,$,F]}],"drop-shadow":[{"drop-shadow":["","none",x,Do,_o]}],"drop-shadow-color":[{"drop-shadow":p()}],grayscale:[{grayscale:["",ee,$,F]}],"hue-rotate":[{"hue-rotate":[ee,$,F]}],invert:[{invert:["",ee,$,F]}],saturate:[{saturate:[ee,$,F]}],sepia:[{sepia:["",ee,$,F]}],"backdrop-filter":[{"backdrop-filter":["","none",$,F]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[ee,$,F]}],"backdrop-contrast":[{"backdrop-contrast":[ee,$,F]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ee,$,F]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ee,$,F]}],"backdrop-invert":[{"backdrop-invert":["",ee,$,F]}],"backdrop-opacity":[{"backdrop-opacity":[ee,$,F]}],"backdrop-saturate":[{"backdrop-saturate":[ee,$,F]}],"backdrop-sepia":[{"backdrop-sepia":["",ee,$,F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":y()}],"border-spacing-x":[{"border-spacing-x":y()}],"border-spacing-y":[{"border-spacing-y":y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",$,F]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ee,"initial",$,F]}],ease:[{ease:["linear","initial",M,$,F]}],delay:[{delay:[ee,$,F]}],animate:[{animate:["none",v,$,F]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,$,F]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:Y()}],"scale-x":[{"scale-x":Y()}],"scale-y":[{"scale-y":Y()}],"scale-z":[{"scale-z":Y()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[$,F,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":["translate-none"],accent:[{accent:p()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:p()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$,F]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":y()}],"scroll-mx":[{"scroll-mx":y()}],"scroll-my":[{"scroll-my":y()}],"scroll-ms":[{"scroll-ms":y()}],"scroll-me":[{"scroll-me":y()}],"scroll-mt":[{"scroll-mt":y()}],"scroll-mr":[{"scroll-mr":y()}],"scroll-mb":[{"scroll-mb":y()}],"scroll-ml":[{"scroll-ml":y()}],"scroll-p":[{"scroll-p":y()}],"scroll-px":[{"scroll-px":y()}],"scroll-py":[{"scroll-py":y()}],"scroll-ps":[{"scroll-ps":y()}],"scroll-pe":[{"scroll-pe":y()}],"scroll-pt":[{"scroll-pt":y()}],"scroll-pr":[{"scroll-pr":y()}],"scroll-pb":[{"scroll-pb":y()}],"scroll-pl":[{"scroll-pl":y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$,F]}],fill:[{fill:["none",...p()]}],"stroke-w":[{stroke:[ee,Jt,tt,rr]}],stroke:[{stroke:["none",...p()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},d7=U3(s7),u7=(e,t,o)=>Math.min(Math.max(e,t),o),Oo=e=>Math.round(u7(e,0,255)),an=e=>{let t=e.replace("#",""),o=parseInt(t,16);return{r:o>>16&255,g:o>>8&255,b:o&255}},c7=({r:e,g:t,b:o})=>{let a=r=>Oo(r).toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(o)}`},sr=({h:e,s:t,v:o})=>{e=e/360,t=t/100,o=o/100;let a=Math.floor(e*6),r=e*6-a,l=o*(1-t),n=o*(1-r*t),i=o*(1-(1-r)*t),s,d,u;switch(a%6){case 0:s=o,d=i,u=l;break;case 1:s=n,d=o,u=l;break;case 2:s=l,d=o,u=i;break;case 3:s=l,d=n,u=o;break;case 4:s=i,d=l,u=o;break;case 5:s=o,d=l,u=n;break;default:s=d=u=0}return{r:Oo(s*255),g:Oo(d*255),b:Oo(u*255)}},dr=({r:e,g:t,b:o})=>{e/=255,t/=255,o/=255;let a=Math.max(e,t,o),r=Math.min(e,t,o),l=a-r,n=0,i=a===0?0:l/a,s=a;if(l!==0)switch(a){case e:n=((t-o)/l+(t<o?6:0))/6;break;case t:n=((o-e)/l+2)/6;break;case o:n=((e-t)/l+4)/6;break}return{h:Math.round(n*360),s:Math.round(i*100),v:Math.round(s*100)}},f7=e=>c7(sr(e)),p7=e=>dr(an(e));var N2=({h:e,s:t,v:o})=>{let a=o*(2-t/100)/2,r=a!==0&&a!==100?(o-a)/Math.min(a,100-a)*100:0;return{h:e,s:Math.round(r),l:Math.round(a)}},U2=({h:e,s:t,l:o})=>{let a=o+t*Math.min(o,100-o)/100,r=a===0?0:2*(1-o/a)*100;return{h:e,s:Math.round(r),v:Math.round(a)}},C7=e=>{let{r:t,g:o,b:a}=an(e);return(.299*t+.587*o+.114*a)/255>.5?"#000000":"#ffffff"};var m7=(e,t="hex")=>{switch(t){case"hex":return e.getHex();case"rgb":let o=e.getRgb();return`rgb(${o.r}, ${o.g}, ${o.b})`;case"rgba":let a=e.getRgba();return`rgba(${a.r}, ${a.g}, ${a.b}, ${a.a})`;case"hsl":let r=e.getHsl();return`hsl(${r.h}, ${r.s}%, ${r.l}%)`;case"hsla":let l=e.getHsla();return`hsla(${l.h}, ${l.s}%, ${l.l}%, ${l.a})`;default:Ao()}};function h7(e){switch(e.type){case"hex":return{...p7(e.value),a:1};case"rgb":return{...dr(e),a:1};case"rgba":return{...dr(e),a:e.a};case"hsl":return{...U2(e),a:1};case"hsla":return{...U2(e),a:1};case"hsv":return{...e,a:1};case"hsva":return{...e};default:Ao()}}function B1(e,t){let o=h7(e);switch(t){case"hex":return f7(o);case"rgb":return sr(o);case"rgba":return{...sr(o),a:o.a};case"hsl":return N2(o);case"hsla":return{...N2(o),a:o.a};case"hsv":return{h:o.h,s:o.s,v:o.v};case"hsva":return o;default:Ao()}}var ot=(...e)=>d7(k3(e)),R1=(e,t,o)=>Math.min(Math.max(e,t),o),E1=e=>Math.round(e);function Ao(e){throw new Error("You should never get here.")}var A1=class e{constructor(t){this.colorInput=t,typeof t=="string"?this.color={type:"hex",value:t}:"type"in t?this.color=t:"r"in t?"a"in t?this.color={type:"rgba",...t}:this.color={type:"rgb",...t}:"v"in t?"a"in t?this.color={type:"hsva",...t}:this.color={type:"hsv",...t}:"a"in t?this.color={type:"hsla",...t}:this.color={type:"hsl",...t}}getRgb(){return B1(this.color,"rgb")}getHsv(){return B1(this.color,"hsv")}getHsla(){return B1(this.color,"hsla")}getHsva(){return B1(this.color,"hsva")}getHex(){return B1(this.color,"hex")}getHsl(){return B1(this.color,"hsl")}getRgba(){return B1(this.color,"rgba")}format(t="hex"){return m7(this,t)}getContrastingColor(){return new e({type:"hex",value:C7(this.getHex())})}},q2=(e,t)=>{let o=e.getBoundingClientRect(),a,r;if("touches"in t){let d=t.touches[0]||t.changedTouches[0];a=d.clientX,r=d.clientY}else a=t.clientX,r=t.clientY;let l=a-o.left,n=r-o.top,i=R1(l/o.width,0,1),s=R1(n/o.height,0,1);return{left:i,top:s}},pr=({onMove:e,onMoveEnd:t,onKey:o,children:a,className:r,...l})=>{let n=Bo(null),i=Bo(!1),s=Re(f=>{!i.current||!n.current||(f.preventDefault(),e(q2(n.current,f)))},[e]),d=Re(()=>{i.current=!1,t(),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",d)},[s,t]),u=Re(f=>{let x=n.current;x&&(f.preventDefault(),i.current=!0,e(q2(x,f.nativeEvent)),document.addEventListener("mousemove",s),document.addEventListener("mouseup",d),document.addEventListener("touchmove",s,{passive:!1}),document.addEventListener("touchend",d))},[e,s,d]),c=Re(f=>{if(!o)return;let x=f.which||f.keyCode;x<37||x>40||(f.preventDefault(),o({left:x===39?.05:x===37?-.05:0,top:x===40?.05:x===38?-.05:0}))},[o]);return ur(()=>()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",d)},[s,d]),ve.jsx("div",{ref:n,className:ot("rounded-inherit absolute inset-0 touch-none outline-none","focus:[&_.react-colorful-pointer]:scale-110",r),onTouchStart:u,onMouseDown:u,onKeyDown:c,tabIndex:0,role:"slider",...l,children:a})},Cr=({className:e,top:t=.5,left:o,color:a})=>ve.jsx("div",{className:ot("absolute z-[1] h-6 w-6 -translate-x-1/2 -translate-y-1/2 cursor-grab rounded-full border-2 border-white bg-white active:cursor-grabbing","react-colorful-pointer shadow-[0_2px_8px_rgba(0,0,0,0.15)] transition-transform",e),style:{top:`${t*100}%`,left:`${o*100}%`}}),g7=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Re(s=>{t({a:s.left},!1)},[t]),l=Re(s=>{t({a:R1(e.a+s.left,0,1)},!0)},[e.a,t]),n=Eo(()=>new A1({type:"hsva",h:e.h,s:e.s,v:e.v,a:0}).format("hsla"),[e.h,e.s,e.v]),i=Eo(()=>new A1({type:"hsva",h:e.h,s:e.s,v:e.v,a:1}).format("hsla"),[e.h,e.s,e.v]);return ve.jsx("div",{className:ot("relative h-full w-full",o),children:ve.jsxs(pr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Alpha","aria-valuetext":`${E1(e.a*100)}%`,"aria-valuenow":E1(e.a*100),"aria-valuemin":0,"aria-valuemax":100,className:"h-full w-full rounded-lg",children:[ve.jsx("div",{className:"absolute inset-0 rounded-lg bg-white",style:{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><rect x="8" width="8" height="8"/><rect y="8" width="8" height="8"/></svg>')`}}),ve.jsx("div",{className:"absolute inset-0 rounded-lg",style:{backgroundImage:`linear-gradient(90deg, ${n}, ${i})`}}),ve.jsx(Cr,{className:"z-[1]",top:.5,left:e.a,color:""})]})})},v7=({hue:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Re(n=>{let i=E1(R1(360*n.left,0,360));t({h:i},!1)},[t]),l=Re(n=>{t({h:R1(e+n.left*360,0,360)},!0)},[e,t]);return ve.jsx("div",{className:ot("relative h-full w-full",o),children:ve.jsxs(pr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Hue","aria-valuenow":E1(e),"aria-valuemax":360,"aria-valuemin":0,className:"h-full w-full rounded-lg",children:[ve.jsx("div",{className:"absolute inset-0 rounded-lg",style:{background:"linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)"}}),ve.jsx(Cr,{className:"z-[2]",top:.5,left:e/360,color:""})]})})},x7=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Re(i=>{let s=E1(R1(i.left*100,0,100)),d=E1(R1(100-i.top*100,0,100));t({s,v:d},!1)},[t]),l=Re(i=>{t({s:R1(e.s+i.left*100,0,100),v:R1(e.v-i.top*100,0,100)},!0)},[e.s,e.v,t]),n=`hsl(${e.h}, 100%, 50%)`;return ve.jsx("div",{className:ot("relative h-full w-full rounded-xl",o),children:ve.jsxs(pr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Color","aria-valuetext":`Saturation ${E1(e.s)}%, Brightness ${E1(e.v)}%`,className:"rounded-inherit h-full w-full",children:[ve.jsx("div",{className:"rounded-inherit absolute inset-0 rounded-b-none",style:{backgroundColor:n,backgroundImage:"linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, rgba(255, 255, 255, 0))",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.05)"}}),ve.jsx(Cr,{className:"z-[3]",top:1-e.v/100,left:e.s/100,color:""})]})})},rn=y3(null),Zo=()=>{let e=S3(rn);if(!e)throw new Error("ColorPicker compound components must be used within a ColorPicker");return e};function z2(e){return"type"in e?new A1(e):e}var L7=({color:e,onChange:t,className:o,children:a,defaultColor:r,...l})=>{let[n,i]=cr(z2(e??r??{h:340,s:58,v:100,a:1,type:"hsva"})),s=Bo(!1),d=Bo(n);ur(()=>{!s.current&&e&&(d.current=z2(e),i(d.current))},[e]);let u=Re((g,b)=>{let m=new A1({type:"hsva",...d.current.getHsva(),...g});d.current=m,i(m),s.current=!b,t?.(m)},[t]),c=Re(()=>{s.current=!1},[]),f=Re(async()=>{if(!("EyeDropper"in window)){console.log("EyeDropper API not supported");return}try{let g=await new window.EyeDropper().open();g.sRGBHex&&u(B1({type:"hex",value:g.sRGBHex},"hsva"),!0)}catch(g){console.log("EyeDropper cancelled or failed:",g)}},[t]),x={hsva:n.getHsva(),updateHsva:u,handleEyeDropper:f,onFinishedUpdates:c};return ve.jsx(rn.Provider,{value:x,children:ve.jsx("div",{...l,className:ot("relative flex h-[280px] w-[280px] cursor-default flex-col rounded-2xl bg-white shadow-lg select-none",o),children:a})})},w7=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=Zo(),r=Re((l,n)=>{o(l,n)},[o]);return ve.jsx(x7,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},I7=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=Zo(),r=Re((l,n)=>{o(l,n)},[o]);return ve.jsx(v7,{hue:t.h,onChange:r,className:e,onFinishedUpdates:a})},b7=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=Zo(),r=Re((l,n)=>{o(l,n)},[o]);return ve.jsx(g7,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},M7=({className:e,title:t="Pick color from screen",children:o})=>{let{handleEyeDropper:a}=Zo(),[r,l]=cr(!1);return ur(()=>{typeof window<"u"&&"EyeDropper"in window&&l(!0)},[]),r?ve.jsx("button",{onClick:a,className:ot("flex h-10 w-10 flex-shrink-0 cursor-pointer items-center justify-center rounded-lg transition-colors hover:bg-gray-100",e),title:t,children:o}):null},Lt=Object.assign(L7,{Saturation:w7,Hue:I7,Alpha:b7,EyeDropper:M7});function y7(e,t){switch(t){case"hex":return{type:"hex",value:e.getHex()};case"rgb":return{type:"rgb",...e.getRgb()};case"rgba":return{type:"rgba",...e.getRgba()};case"hsl":return{type:"hsl",...e.getHsl()};case"hsla":return{type:"hsla",...e.getHsla()};case"hsv":return{type:"hsv",...e.getHsv()};case"hsva":return{type:"hsva",...e.getHsva()};default:Ao()}}var ln=(e={type:"hex",value:"#ff6b9d"})=>{let[t,o]=cr(()=>{let n=typeof e=="function"?e():e;return{color:new A1(n),type:n.type}}),a=Eo(()=>y7(t.color,t.type),[t.color,t.type]),r=Eo(()=>{let n=t.color.getHsva();return{hex:t.color.getHex(),rgb:t.color.getRgb(),rgba:t.color.getRgba(),hsl:t.color.getHsl(),hsla:t.color.getHsla(),hsv:t.color.getHsv(),hsva:n,alpha:n.a}},[t.color]),l=Re(n=>{try{let i="type"in n?new A1(n):n;o(s=>({color:i,type:s.type}))}catch(i){console.warn("Invalid color input:",n,i)}},[]);return[{colorInput:a,colorState:r},l]};import{createPortal as lu}from"react-dom";import{useRef as c1,useMemo as S7,useEffect as R7,useState as yf,useCallback as Sf}from"react";function nn(e,t,o,a){var r=this,l=c1(null),n=c1(0),i=c1(0),s=c1(null),d=c1([]),u=c1(),c=c1(),f=c1(e),x=c1(!0),g=c1(),b=c1();f.current=e;var m=typeof window<"u",M=!t&&t!==0&&m;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var v=!!(o=o||{}).leading,R=!("trailing"in o)||!!o.trailing,L=!!o.flushOnExit&&R,V="maxWait"in o,B="debounceOnServer"in o&&!!o.debounceOnServer,z=V?Math.max(+o.maxWait||0,t):null,y=S7(function(){var H=function(w){var I=d.current,p=u.current;return d.current=u.current=null,n.current=w,i.current=i.current||w,c.current=f.current.apply(p,I)},j=function(w,I){M&&cancelAnimationFrame(s.current),s.current=M?requestAnimationFrame(w):setTimeout(w,I)},N=function(w){if(!x.current)return!1;var I=w-l.current;return!l.current||I>=t||I<0||V&&w-n.current>=z},J=function(w){return s.current=null,R&&d.current?H(w):(d.current=u.current=null,c.current)},D=function w(){var I=Date.now();if(v&&i.current===n.current&&q(),N(I))return J(I);if(x.current){var p=t-(I-l.current),U=V?Math.min(p,z-(I-n.current)):p;j(w,U)}},q=function(){a&&a({})},S=function(){if(m||B){var w,I=Date.now(),p=N(I);if(d.current=[].slice.call(arguments),u.current=r,l.current=I,L&&!g.current&&(g.current=function(){var U;((U=globalThis.document)==null?void 0:U.visibilityState)==="hidden"&&b.current.flush()},(w=globalThis.document)==null||w.addEventListener==null||w.addEventListener("visibilitychange",g.current)),p){if(!s.current&&x.current)return n.current=l.current,j(D,t),v?H(l.current):c.current;if(V)return j(D,t),H(l.current)}return s.current||j(D,t),c.current}};return S.cancel=function(){var w=s.current;w&&(M?cancelAnimationFrame(s.current):clearTimeout(s.current)),n.current=0,d.current=l.current=u.current=s.current=null,w&&a&&a({})},S.isPending=function(){return!!s.current},S.flush=function(){return s.current?J(Date.now()):c.current},S},[v,V,t,z,R,L,M,m,B,a]);return b.current=y,R7(function(){return x.current=!0,function(){var H;L&&b.current.flush(),g.current&&((H=globalThis.document)==null||H.removeEventListener==null||H.removeEventListener("visibilitychange",g.current),g.current=null),x.current=!1}},[L]),y}import Ve from"react";function Yt(e){let t=e?.parentElement;for(;t;){let{overflowY:o}=getComputedStyle(t);if(o==="auto"||o==="scroll")return t;t=t.parentElement}return null}var sn='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function dn({computePosition:e,onClose:t,autoFocus:o=!0,trapFocus:a=!1}={}){let[r,l]=Ve.useState(!1),[n,i]=Ve.useState({top:0,left:0}),s=Ve.useRef(null),d=Ve.useRef(null),u=Ve.useRef(!1),c=Ve.useRef(e);c.current=e;let f=Ve.useRef(t);f.current=t;let x=Ve.useRef(a);x.current=a;let g=Ve.useCallback((...v)=>{!s.current||!c.current||i(c.current(s.current,...v))},[]),b=Ve.useCallback(()=>{g(),u.current=!0,l(!0)},[g]),m=Ve.useCallback(()=>{f.current&&f.current(),u.current=!1,l(!1),s.current?.focus()},[]),M=Ve.useCallback(()=>{u.current?m():b()},[b,m]);return Ve.useEffect(()=>{if(!r)return;let v=L=>{if(L.key==="Escape"&&(L.preventDefault(),m()),x.current&&L.key==="Tab"){let V=d.current;if(!V)return;let B=Array.from(V.querySelectorAll(sn)).filter(H=>!H.hasAttribute("disabled")),z=B[0],y=B.at(-1);if(!z||!y)return;L.shiftKey&&document.activeElement===z?(L.preventDefault(),y.focus()):!L.shiftKey&&document.activeElement===y&&(L.preventDefault(),z.focus())}},R=L=>{let V=d.current,B=s.current;if(!V||!B)return;let z=typeof L.composedPath=="function"?L.composedPath():[],y=z.includes(V)||L.target instanceof Node&&V.contains(L.target),H=z.includes(B)||L.target instanceof Node&&B.contains(L.target);!y&&!H&&m()};return document.addEventListener("keydown",v),document.addEventListener("mousedown",R),document.addEventListener("touchstart",R),()=>{document.removeEventListener("keydown",v),document.removeEventListener("mousedown",R),document.removeEventListener("touchstart",R)}},[r,m]),Ve.useEffect(()=>{if(!r||!o||!d.current)return;let v=d.current.querySelector(sn);v&&v.focus()},[r,o]),Ve.useEffect(()=>{if(!r||!s.current)return;let v=Yt(s.current);if(!v)return;let R=()=>m();return v.addEventListener("scroll",R,{passive:!0}),()=>v.removeEventListener("scroll",R)},[r,m]),{isOpen:r,open:b,close:m,toggle:M,triggerRef:s,popoverRef:d,position:n,reposition:g}}var H7=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},Fo=H7;var k7={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},un=k7;var P7=e=>Fo(un[e.toLowerCase()],6),cn=P7;var T7=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,V7=e=>{let t;return(t=e.match(T7))?Fo(parseInt(t[1],16),t[1].length):void 0},fn=V7;var _e="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Zf=`(?:${_e}|none)`,at=`${_e}%`,Ff=`(?:${_e}%|none)`,eo=`(?:${_e}%|${_e})`,_7=`(?:${_e}%|${_e}|none)`,pn=`(?:${_e}(deg|grad|rad|turn)|${_e})`,$f=`(?:${_e}(deg|grad|rad|turn)|${_e}|none)`,Z1="\\s*,\\s*";var Nf=new RegExp("^"+_7+"$");var D7=new RegExp(`^rgba?\\(\\s*${_e}${Z1}${_e}${Z1}${_e}\\s*(?:,\\s*${eo}\\s*)?\\)$`),O7=new RegExp(`^rgba?\\(\\s*${at}${Z1}${at}${Z1}${at}\\s*(?:,\\s*${eo}\\s*)?\\)$`),B7=e=>{let t={mode:"rgb"},o;if(o=e.match(D7))o[1]!==void 0&&(t.r=o[1]/255),o[2]!==void 0&&(t.g=o[2]/255),o[3]!==void 0&&(t.b=o[3]/255);else if(o=e.match(O7))o[1]!==void 0&&(t.r=o[1]/100),o[2]!==void 0&&(t.g=o[2]/100),o[3]!==void 0&&(t.b=o[3]/100);else return;return o[4]!==void 0?t.alpha=Math.max(0,Math.min(1,o[4]/100)):o[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+o[5]))),t},Cn=B7;var E7=(e,t)=>e===void 0?void 0:typeof e!="object"?rt(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,$o=E7;var A7=(e="rgb")=>t=>(t=$o(t,e))!==void 0?t.mode===e?t:f1[t.mode][e]?f1[t.mode][e](t):e==="rgb"?f1[t.mode].rgb(t):f1.rgb[e](f1[t.mode].rgb(t)):void 0,Ke=A7;var f1={},mn={},to=[],mr={},Z7=e=>e,ne=e=>(f1[e.mode]={...f1[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{f1[t]||(f1[t]={}),f1[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=Z7)}),mn[e.mode]=e,(e.parse||[]).forEach(t=>{F7(t,e.mode)}),Ke(e.mode)),No=e=>mn[e],F7=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");mr[e]=t}else typeof e=="function"&&to.indexOf(e)<0&&to.push(e)};var hr=/[^\x00-\x7F]|[a-zA-Z_]/,$7=/[^\x00-\x7F]|[-\w]/,k={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},W=0;function Uo(e){let t=e[W],o=e[W+1];return t==="-"||t==="+"?/\d/.test(o)||o==="."&&/\d/.test(e[W+2]):t==="."?/\d/.test(o):/\d/.test(t)}function gr(e){if(W>=e.length)return!1;let t=e[W];if(hr.test(t))return!0;if(t==="-"){if(e.length-W<2)return!1;let o=e[W+1];return!!(o==="-"||hr.test(o))}return!1}var N7={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function oo(e){let t="";if((e[W]==="-"||e[W]==="+")&&(t+=e[W++]),t+=qo(e),e[W]==="."&&/\d/.test(e[W+1])&&(t+=e[W++]+qo(e)),(e[W]==="e"||e[W]==="E")&&((e[W+1]==="-"||e[W+1]==="+")&&/\d/.test(e[W+2])?t+=e[W++]+e[W++]+qo(e):/\d/.test(e[W+1])&&(t+=e[W++]+qo(e))),gr(e)){let o=zo(e);return o==="deg"||o==="rad"||o==="turn"||o==="grad"?{type:k.Hue,value:t*N7[o]}:void 0}return e[W]==="%"?(W++,{type:k.Percentage,value:+t}):{type:k.Number,value:+t}}function qo(e){let t="";for(;/\d/.test(e[W]);)t+=e[W++];return t}function zo(e){let t="";for(;W<e.length&&$7.test(e[W]);)t+=e[W++];return t}function U7(e){let t=zo(e);return e[W]==="("?(W++,{type:k.Function,value:t}):t==="none"?{type:k.None,value:void 0}:{type:k.Ident,value:t}}function q7(e=""){let t=e.trim(),o=[],a;for(W=0;W<t.length;){if(a=t[W++],a===`
2
- `||a===" "||a===" "){for(;W<t.length&&(t[W]===`
3
- `||t[W]===" "||t[W]===" ");)W++;continue}if(a===",")return;if(a===")"){o.push({type:k.ParenClose});continue}if(a==="+"){if(W--,Uo(t)){o.push(oo(t));continue}return}if(a==="-"){if(W--,Uo(t)){o.push(oo(t));continue}if(gr(t)){o.push({type:k.Ident,value:zo(t)});continue}return}if(a==="."){if(W--,Uo(t)){o.push(oo(t));continue}return}if(a==="/"){for(;W<t.length&&(t[W]===`
4
- `||t[W]===" "||t[W]===" ");)W++;let r;if(Uo(t)&&(r=oo(t),r.type!==k.Hue)){o.push({type:k.Alpha,value:r});continue}if(gr(t)&&zo(t)==="none"){o.push({type:k.Alpha,value:{type:k.None,value:void 0}});continue}return}if(/\d/.test(a)){W--,o.push(oo(t));continue}if(hr.test(a)){W--,o.push(U7(t));continue}return}return o}function z7(e){e._i=0;let t=e[e._i++];if(!t||t.type!==k.Function||t.value!=="color"||(t=e[e._i++],t.type!==k.Ident))return;let o=mr[t.value];if(!o)return;let a={mode:o},r=hn(e,!1);if(!r)return;let l=No(o).channels;for(let n=0,i,s;n<l.length;n++)i=r[n],s=l[n],i.type!==k.None&&(a[s]=i.type===k.Number?i.value:i.value/100,s==="alpha"&&(a[s]=Math.max(0,Math.min(1,a[s]))));return a}function hn(e,t){let o=[],a;for(;e._i<e.length;){if(a=e[e._i++],a.type===k.None||a.type===k.Number||a.type===k.Alpha||a.type===k.Percentage||t&&a.type===k.Hue){o.push(a);continue}if(a.type===k.ParenClose){if(e._i<e.length)return;continue}return}if(!(o.length<3||o.length>4)){if(o.length===4){if(o[3].type!==k.Alpha)return;o[3]=o[3].value}return o.length===3&&o.push({type:k.None,value:void 0}),o.every(r=>r.type!==k.Alpha)?o:void 0}}function j7(e,t){e._i=0;let o=e[e._i++];if(!o||o.type!==k.Function)return;let a=hn(e,t);if(a)return a.unshift(o.value),a}var K7=e=>{if(typeof e!="string")return;let t=q7(e),o=t?j7(t,!0):void 0,a,r=0,l=to.length;for(;r<l;)if((a=to[r++](e,o))!==void 0)return a;return t?z7(t):void 0},rt=K7;function G7(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let o={mode:"rgb"},[,a,r,l,n]=t;if(!(a.type===k.Hue||r.type===k.Hue||l.type===k.Hue))return a.type!==k.None&&(o.r=a.type===k.Number?a.value/255:a.value/100),r.type!==k.None&&(o.g=r.type===k.Number?r.value/255:r.value/100),l.type!==k.None&&(o.b=l.type===k.Number?l.value/255:l.value/100),n.type!==k.None&&(o.alpha=Math.min(1,Math.max(0,n.type===k.Number?n.value:n.value/100))),o}var gn=G7;var W7=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,vn=W7;var xn=(e,t,o)=>e+o*(t-e);var X7=e=>{let t=[];for(let o=0;o<e.length-1;o++){let a=e[o],r=e[o+1];a===void 0&&r===void 0?t.push(void 0):a!==void 0&&r!==void 0?t.push([a,r]):t.push(a!==void 0?[a,a]:[r,r])}return t},Ln=e=>t=>{let o=X7(t);return a=>{let r=a*o.length,l=a>=1?o.length-1:Math.max(Math.floor(r),0),n=o[l];return n===void 0?void 0:e(n[0],n[1],r-l)}};var P=Ln(xn);var oe=e=>{let t=!1,o=e.map(a=>a!==void 0?(t=!0,a):1);return t?o:e};var Q7={mode:"rgb",channels:["r","g","b","alpha"],parse:[gn,fn,Cn,cn,vn,"srgb"],serialize:"srgb",interpolate:{r:P,g:P,b:P,alpha:{use:P,fixup:oe}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Ye=Q7;var vr=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),J7=e=>{let t=vr(e.r),o=vr(e.g),a=vr(e.b),r={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*o+.1882286462349947*a,y:.297344975250536*t+.6273635662554661*o+.0752914584939979*a,z:.0270313613864123*t+.0706888525358272*o+.9913375368376386*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},xr=J7;var Lr=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),Y7=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"a98",r:Lr(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*o),g:Lr(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*o),b:Lr(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*o)};return a!==void 0&&(r.alpha=a),r},wr=Y7;var Ir=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},es=({r:e,g:t,b:o,alpha:a})=>{let r={mode:"lrgb",r:Ir(e),g:Ir(t),b:Ir(o)};return a!==void 0&&(r.alpha=a),r},e1=es;var ts=e=>{let{r:t,g:o,b:a,alpha:r}=e1(e),l={mode:"xyz65",x:.4123907992659593*t+.357584339383878*o+.1804807884018343*a,y:.2126390058715102*t+.715168678767756*o+.0721923153607337*a,z:.0193308187155918*t+.119194779794626*o+.9505321522496607*a};return r!==void 0&&(l.alpha=r),l},Ae=ts;var br=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},os=({r:e,g:t,b:o,alpha:a},r="rgb")=>{let l={mode:r,r:br(e),g:br(t),b:br(o)};return a!==void 0&&(l.alpha=a),l},t1=os;var as=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=t1({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*o,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*o,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*o});return a!==void 0&&(r.alpha=a),r},Ze=as;var rs={...Ye,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>wr(Ae(e)),xyz65:wr},toMode:{rgb:e=>Ze(xr(e)),xyz65:xr}},wn=rs;var ls=e=>(e=e%360)<0?e+360:e,fe=ls;var ns=(e,t)=>e.map((o,a,r)=>{if(o===void 0)return o;let l=fe(o);return a===0||e[a-1]===void 0?l:t(l-fe(r[a-1]))}).reduce((o,a)=>!o.length||a===void 0||o[o.length-1]===void 0?(o.push(a),o):(o.push(a+o[o.length-1]),o),[]),Me=e=>ns(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var Le=[-.14861,1.78277,-.29227,-.90649,1.97294,0],In=Math.PI/180,bn=180/Math.PI;var Mn=Le[3]*Le[4],yn=Le[1]*Le[4],Sn=Le[1]*Le[2]-Le[0]*Le[3],is=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(Sn*o+e*Mn-t*yn)/(Sn+Mn-yn),l=o-r,n=(Le[4]*(t-r)-Le[2]*l)/Le[3],i={mode:"cubehelix",l:r,s:r===0||r===1?void 0:Math.sqrt(l*l+n*n)/(Le[4]*r*(1-r))};return i.s&&(i.h=Math.atan2(n,l)*bn-120),a!==void 0&&(i.alpha=a),i},Rn=is;var ss=({h:e,s:t,l:o,alpha:a})=>{let r={mode:"rgb"};e=(e===void 0?0:e+120)*In,o===void 0&&(o=0);let l=t===void 0?0:t*o*(1-o),n=Math.cos(e),i=Math.sin(e);return r.r=o+l*(Le[0]*n+Le[1]*i),r.g=o+l*(Le[2]*n+Le[3]*i),r.b=o+l*(Le[4]*n+Le[5]*i),a!==void 0&&(r.alpha=a),r},Hn=ss;var F1=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let o=fe(e.h),a=fe(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*r},kn=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let o=fe(e.h),a=fe(t.h);return Math.abs(a-o)>180?o-(a-360*Math.sign(a-o)):a-o},$1=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let o=fe(e.h),a=fe(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*r};var ye=e=>{let t=e.reduce((a,r)=>{if(r!==void 0){let l=r*Math.PI/180;a.sin+=Math.sin(l),a.cos+=Math.cos(l)}return a},{sin:0,cos:0}),o=Math.atan2(t.sin,t.cos)*180/Math.PI;return o<0?360+o:o};var ds={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Rn},toMode:{rgb:Hn},interpolate:{h:{use:P,fixup:Me},s:P,l:P,alpha:{use:P,fixup:oe}},difference:{h:F1},average:{h:ye}},Pn=ds;var us=({l:e,a:t,b:o,alpha:a},r="lch")=>{t===void 0&&(t=0),o===void 0&&(o=0);let l=Math.sqrt(t*t+o*o),n={mode:r,l:e,c:l};return l&&(n.h=fe(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(n.alpha=a),n},Ge=us;var cs=({l:e,c:t,h:o,alpha:a},r="lab")=>{o===void 0&&(o=0);let l={mode:r,l:e,a:t?t*Math.cos(o/180*Math.PI):0,b:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(l.alpha=a),l},We=cs;var jo=Math.pow(29,3)/Math.pow(3,3),Ko=Math.pow(6,3)/Math.pow(29,3);var me={X:.9642956764295677,Y:1,Z:.8251046025104602},N1={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},tp=Math.pow(29,3)/Math.pow(3,3),op=Math.pow(6,3)/Math.pow(29,3);var Mr=e=>Math.pow(e,3)>Ko?Math.pow(e,3):(116*e-16)/jo,fs=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+16)/116,l=t/500+r,n=r-o/200,i={mode:"xyz65",x:Mr(l)*N1.X,y:Mr(r)*N1.Y,z:Mr(n)*N1.Z};return a!==void 0&&(i.alpha=a),i},Go=fs;var ps=e=>Ze(Go(e)),U1=ps;var yr=e=>e>Ko?Math.cbrt(e):(jo*e+16)/116,Cs=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=yr(e/N1.X),l=yr(t/N1.Y),n=yr(o/N1.Z),i={mode:"lab65",l:116*l-16,a:500*(r-l),b:200*(l-n)};return a!==void 0&&(i.alpha=a),i},Wo=Cs;var ms=e=>{let t=Wo(Ae(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},q1=ms;var lt=.14444444444444443*Math.PI,wt=Math.cos(lt),It=Math.sin(lt),Xo=100/Math.log(139/100);var hs=({l:e,c:t,h:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"lab65",l:(Math.exp(e*1/Xo)-1)/.0039},l=(Math.exp(.0435*t*1*1)-1)/.075,n=l*Math.cos(o/180*Math.PI-lt),i=l*Math.sin(o/180*Math.PI-lt);return r.a=n*wt-i/.83*It,r.b=n*It+i/.83*wt,a!==void 0&&(r.alpha=a),r},ro=hs;var gs=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=t*wt+o*It,l=.83*(o*wt-t*It),n=Math.sqrt(r*r+l*l),i={mode:"dlch",l:Xo/1*Math.log(1+.0039*e),c:Math.log(1+.075*n)/(.0435*1*1)};return i.c&&(i.h=fe((Math.atan2(l,r)+lt)/Math.PI*180)),a!==void 0&&(i.alpha=a),i},lo=gs;var Tn=e=>ro(Ge(e,"dlch")),Vn=e=>We(lo(e),"dlab"),vs={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Tn,rgb:e=>U1(Tn(e))},fromMode:{lab65:Vn,rgb:e=>Vn(q1(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:P,a:P,b:P,alpha:{use:P,fixup:oe}}},_n=vs;var xs={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:ro,dlab:e=>We(e,"dlab"),rgb:e=>U1(ro(e))},fromMode:{lab65:lo,dlab:e=>Ge(e,"dlch"),rgb:e=>lo(q1(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:P,c:P,h:{use:P,fixup:Me},alpha:{use:P,fixup:oe}},difference:{h:$1},average:{h:ye}},Dn=xs;function Rr({h:e,s:t,i:o,alpha:a}){e=fe(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:o*(1+t*(3/(2-r)-1)),g:o*(1+t*(3*(1-r)/(2-r)-1)),b:o*(1-t)};break;case 1:l={r:o*(1+t*(3*(1-r)/(2-r)-1)),g:o*(1+t*(3/(2-r)-1)),b:o*(1-t)};break;case 2:l={r:o*(1-t),g:o*(1+t*(3/(2-r)-1)),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;case 3:l={r:o*(1-t),g:o*(1+t*(3*(1-r)/(2-r)-1)),b:o*(1+t*(3/(2-r)-1))};break;case 4:l={r:o*(1+t*(3*(1-r)/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3/(2-r)-1))};break;case 5:l={r:o*(1+t*(3/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;default:l={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function Hr({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsi",s:e+t+o===0?0:1-3*l/(e+t+o),i:(e+t+o)/3};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Ls={mode:"hsi",toMode:{rgb:Rr},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Hr},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:P,fixup:Me},s:P,i:P,alpha:{use:P,fixup:oe}},difference:{h:F1},average:{h:ye}},On=Ls;function kr({h:e,s:t,l:o,alpha:a}){e=fe(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=o+t*(o<.5?o:1-o),l=r-(r-o)*2*Math.abs(e/60%2-1),n;switch(Math.floor(e/60)){case 0:n={r,g:l,b:2*o-r};break;case 1:n={r:l,g:r,b:2*o-r};break;case 2:n={r:2*o-r,g:r,b:l};break;case 3:n={r:2*o-r,g:l,b:r};break;case 4:n={r:l,g:2*o-r,b:r};break;case 5:n={r,g:2*o-r,b:l};break;default:n={r:2*o-r,g:2*o-r,b:2*o-r}}return n.mode="rgb",a!==void 0&&(n.alpha=a),n}function Pr({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsl",s:r===l?0:(r-l)/(1-Math.abs(r+l-1)),l:.5*(r+l)};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var ws=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},Bn=ws;var Is=new RegExp(`^hsla?\\(\\s*${pn}${Z1}${at}${Z1}${at}\\s*(?:,\\s*${eo}\\s*)?\\)$`),bs=e=>{let t=e.match(Is);if(!t)return;let o={mode:"hsl"};return t[3]!==void 0?o.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(o.h=Bn(t[1],t[2])),t[4]!==void 0&&(o.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(o.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?o.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(o.alpha=Math.max(0,Math.min(1,+t[7]))),o},En=bs;function Ms(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let o={mode:"hsl"},[,a,r,l,n]=t;if(a.type!==k.None){if(a.type===k.Percentage)return;o.h=a.value}if(r.type!==k.None){if(r.type===k.Hue)return;o.s=r.value/100}if(l.type!==k.None){if(l.type===k.Hue)return;o.l=l.value/100}return n.type!==k.None&&(o.alpha=Math.min(1,Math.max(0,n.type===k.Number?n.value:n.value/100))),o}var An=Ms;var ys={mode:"hsl",toMode:{rgb:kr},fromMode:{rgb:Pr},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[An,En],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:P,fixup:Me},s:P,l:P,alpha:{use:P,fixup:oe}},difference:{h:F1},average:{h:ye}},Qo=ys;function no({h:e,s:t,v:o,alpha:a}){e=fe(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:o,g:o*(1-t*r),b:o*(1-t)};break;case 1:l={r:o*(1-t*r),g:o,b:o*(1-t)};break;case 2:l={r:o*(1-t),g:o,b:o*(1-t*r)};break;case 3:l={r:o*(1-t),g:o*(1-t*r),b:o};break;case 4:l={r:o*(1-t*r),g:o*(1-t),b:o};break;case 5:l={r:o,g:o*(1-t),b:o*(1-t*r)};break;default:l={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function io({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsv",s:r===0?0:1-l/r,v:r};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var Ss={mode:"hsv",toMode:{rgb:no},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:io},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:P,fixup:Me},s:P,v:P,alpha:{use:P,fixup:oe}},difference:{h:F1},average:{h:ye}},Jo=Ss;function Tr({h:e,w:t,b:o,alpha:a}){if(t===void 0&&(t=0),o===void 0&&(o=0),t+o>1){let r=t+o;t/=r,o/=r}return no({h:e,s:o===1?1:1-t/(1-o),v:1-o,alpha:a})}function Vr(e){let t=io(e);if(t===void 0)return;let o=t.s!==void 0?t.s:0,a=t.v!==void 0?t.v:0,r={mode:"hwb",w:(1-o)*a,b:1-a};return t.h!==void 0&&(r.h=t.h),t.alpha!==void 0&&(r.alpha=t.alpha),r}function Rs(e,t){if(!t||t[0]!=="hwb")return;let o={mode:"hwb"},[,a,r,l,n]=t;if(a.type!==k.None){if(a.type===k.Percentage)return;o.h=a.value}if(r.type!==k.None){if(r.type===k.Hue)return;o.w=r.value/100}if(l.type!==k.None){if(l.type===k.Hue)return;o.b=l.value/100}return n.type!==k.None&&(o.alpha=Math.min(1,Math.max(0,n.type===k.Number?n.value:n.value/100))),o}var Zn=Rs;var Hs={mode:"hwb",toMode:{rgb:Tr},fromMode:{rgb:Vr},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Zn],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:P,fixup:Me},w:P,b:P,alpha:{use:P,fixup:oe}},difference:{h:kn},average:{h:ye}},Fn=Hs;var bt=.1593017578125,$n=78.84375,Mt=.8359375,yt=18.8515625,St=18.6875;function Yo(e){if(e<0)return 0;let t=Math.pow(e,1/$n);return 1e4*Math.pow(Math.max(0,t-Mt)/(yt-St*t),1/bt)}function ea(e){if(e<0)return 0;let t=Math.pow(e/1e4,bt);return Math.pow((Mt+yt*t)/(1+St*t),$n)}var _r=e=>Math.max(e/203,0),Ps=({i:e,t,p:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Yo(e+.008609037037932761*t+.11102962500302593*o),l=Yo(e-.00860903703793275*t-.11102962500302599*o),n=Yo(e+.5600313357106791*t-.32062717498731885*o),i={mode:"xyz65",x:_r(2.070152218389422*r-1.3263473389671556*l+.2066510476294051*n),y:_r(.3647385209748074*r+.680566024947227*l-.0453045459220346*n),z:_r(-.049747207535812*r-.0492609666966138*l+1.1880659249923042*n)};return a!==void 0&&(i.alpha=a),i},Dr=Ps;var Or=(e=0)=>Math.max(e*203,0),Ts=({x:e,y:t,z:o,alpha:a})=>{let r=Or(e),l=Or(t),n=Or(o),i=ea(.3592832590121217*r+.6976051147779502*l-.0358915932320289*n),s=ea(-.1920808463704995*r+1.1004767970374323*l+.0753748658519118*n),d=ea(.0070797844607477*r+.0748396662186366*l+.8433265453898765*n),u=.5*i+.5*s,c=1.61376953125*i-3.323486328125*s+1.709716796875*d,f=4.378173828125*i-4.24560546875*s-.132568359375*d,x={mode:"itp",i:u,t:c,p:f};return a!==void 0&&(x.alpha=a),x},Br=Ts;var Vs={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Dr,rgb:e=>Ze(Dr(e))},fromMode:{xyz65:Br,rgb:e=>Br(Ae(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:P,t:P,p:P,alpha:{use:P,fixup:oe}}},Nn=Vs;var _s=134.03437499999998,Ds=16295499532821565e-27,Er=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,bt);return Math.pow((Mt+yt*t)/(1+St*t),_s)},Ar=(e=0)=>Math.max(e*203,0),Os=({x:e,y:t,z:o,alpha:a})=>{e=Ar(e),t=Ar(t),o=Ar(o);let r=1.15*e-.15*o,l=.66*t+.34*e,n=Er(.41478972*r+.579999*l+.014648*o),i=Er(-.20151*r+1.120649*l+.0531008*o),s=Er(-.0166008*r+.2648*l+.6684799*o),d=(n+i)/2,u={mode:"jab",j:.44*d/(1-.56*d)-Ds,a:3.524*n-4.066708*i+.542708*s,b:.199076*n+1.096799*i-1.295875*s};return a!==void 0&&(u.alpha=a),u},ta=Os;var Bs=134.03437499999998,Un=16295499532821565e-27,Zr=e=>{if(e<0)return 0;let t=Math.pow(e,1/Bs);return 1e4*Math.pow((Mt-t)/(St*t-yt),1/bt)},Fr=e=>e/203,Es=({j:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+Un)/(.44+.56*(e+Un)),l=Zr(r+.13860504*t+.058047316*o),n=Zr(r-.13860504*t-.058047316*o),i=Zr(r-.096019242*t-.8118919*o),s={mode:"xyz65",x:Fr(1.661373024652174*l-.914523081304348*n+.23136208173913045*i),y:Fr(-.3250758611844533*l+1.571847026732543*n-.21825383453227928*i),z:Fr(-.090982811*l-.31272829*n+1.5227666*i)};return a!==void 0&&(s.alpha=a),s},oa=Es;var As=e=>{let t=ta(Ae(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},aa=As;var Zs=e=>Ze(oa(e)),ra=Zs;var Fs={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:aa,xyz65:ta},toMode:{rgb:ra,xyz65:oa},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:P,a:P,b:P,alpha:{use:P,fixup:oe}}},qn=Fs;var $s=({j:e,a:t,b:o,alpha:a})=>{t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.sqrt(t*t+o*o),l={mode:"jch",j:e,c:r};return r&&(l.h=fe(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},$r=$s;var Ns=({j:e,c:t,h:o,alpha:a})=>{o===void 0&&(o=0);let r={mode:"jab",j:e,a:t?t*Math.cos(o/180*Math.PI):0,b:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(r.alpha=a),r},Nr=Ns;var Us={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Nr,rgb:e=>ra(Nr(e))},fromMode:{rgb:e=>$r(aa(e)),jab:$r},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:P,fixup:Me},c:P,j:P,alpha:{use:P,fixup:oe}},difference:{h:$1},average:{h:ye}},zn=Us;var z1=Math.pow(29,3)/Math.pow(3,3),Rt=Math.pow(6,3)/Math.pow(29,3);var Ur=e=>Math.pow(e,3)>Rt?Math.pow(e,3):(116*e-16)/z1,qs=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+16)/116,l=t/500+r,n=r-o/200,i={mode:"xyz50",x:Ur(l)*me.X,y:Ur(r)*me.Y,z:Ur(n)*me.Z};return a!==void 0&&(i.alpha=a),i},Ht=qs;var zs=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=t1({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*o,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*o,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*o});return a!==void 0&&(r.alpha=a),r},h1=zs;var js=e=>h1(Ht(e)),la=js;var Ks=e=>{let{r:t,g:o,b:a,alpha:r}=e1(e),l={mode:"xyz50",x:.436065742824811*t+.3851514688337912*o+.14307845442264197*a,y:.22249319175623702*t+.7168870538238823*o+.06061979053616537*a,z:.013923904500943465*t+.09708128566574634*o+.7140993584005155*a};return r!==void 0&&(l.alpha=r),l},g1=Ks;var qr=e=>e>Rt?Math.cbrt(e):(z1*e+16)/116,Gs=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=qr(e/me.X),l=qr(t/me.Y),n=qr(o/me.Z),i={mode:"lab",l:116*l-16,a:500*(r-l),b:200*(l-n)};return a!==void 0&&(i.alpha=a),i},kt=Gs;var Ws=e=>{let t=kt(g1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},na=Ws;function Xs(e,t){if(!t||t[0]!=="lab")return;let o={mode:"lab"},[,a,r,l,n]=t;if(!(a.type===k.Hue||r.type===k.Hue||l.type===k.Hue))return a.type!==k.None&&(o.l=Math.min(Math.max(0,a.value),100)),r.type!==k.None&&(o.a=r.type===k.Number?r.value:r.value*125/100),l.type!==k.None&&(o.b=l.type===k.Number?l.value:l.value*125/100),n.type!==k.None&&(o.alpha=Math.min(1,Math.max(0,n.type===k.Number?n.value:n.value/100))),o}var jn=Xs;var Qs={mode:"lab",toMode:{xyz50:Ht,rgb:la},fromMode:{xyz50:kt,rgb:na},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[jn],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:P,a:P,b:P,alpha:{use:P,fixup:oe}}},Pt=Qs;var Js={...Pt,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Go,rgb:U1},fromMode:{xyz65:Wo,rgb:q1},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},Kn=Js;function Ys(e,t){if(!t||t[0]!=="lch")return;let o={mode:"lch"},[,a,r,l,n]=t;if(a.type!==k.None){if(a.type===k.Hue)return;o.l=Math.min(Math.max(0,a.value),100)}if(r.type!==k.None&&(o.c=Math.max(0,r.type===k.Number?r.value:r.value*150/100)),l.type!==k.None){if(l.type===k.Percentage)return;o.h=l.value}return n.type!==k.None&&(o.alpha=Math.min(1,Math.max(0,n.type===k.Number?n.value:n.value/100))),o}var Gn=Ys;var ed={mode:"lch",toMode:{lab:We,rgb:e=>la(We(e))},fromMode:{rgb:e=>Ge(na(e)),lab:Ge},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Gn],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:P,fixup:Me},c:P,l:P,alpha:{use:P,fixup:oe}},difference:{h:$1},average:{h:ye}},Tt=ed;var td={...Tt,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>We(e,"lab65"),rgb:e=>U1(We(e,"lab65"))},fromMode:{rgb:e=>Ge(q1(e),"lch65"),lab65:e=>Ge(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},Wn=td;var od=({l:e,u:t,v:o,alpha:a})=>{t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.sqrt(t*t+o*o),l={mode:"lchuv",l:e,c:r};return r&&(l.h=fe(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},zr=od;var ad=({l:e,c:t,h:o,alpha:a})=>{o===void 0&&(o=0);let r={mode:"luv",l:e,u:t?t*Math.cos(o/180*Math.PI):0,v:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(r.alpha=a),r},jr=ad;var Xn=(e,t,o)=>4*e/(e+15*t+3*o),Qn=(e,t,o)=>9*t/(e+15*t+3*o),rd=Xn(me.X,me.Y,me.Z),ld=Qn(me.X,me.Y,me.Z),nd=e=>e<=Rt?z1*e:116*Math.cbrt(e)-16,id=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=nd(t/me.Y),l=Xn(e,t,o),n=Qn(e,t,o);!isFinite(l)||!isFinite(n)?r=l=n=0:(l=13*r*(l-rd),n=13*r*(n-ld));let i={mode:"luv",l:r,u:l,v:n};return a!==void 0&&(i.alpha=a),i},so=id;var sd=(e,t,o)=>4*e/(e+15*t+3*o),dd=(e,t,o)=>9*t/(e+15*t+3*o),ud=sd(me.X,me.Y,me.Z),cd=dd(me.X,me.Y,me.Z),fd=({l:e,u:t,v:o,alpha:a})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),o===void 0&&(o=0);let r=t/(13*e)+ud,l=o/(13*e)+cd,n=me.Y*(e<=8?e/z1:Math.pow((e+16)/116,3)),i=n*(9*r)/(4*l),s=n*(12-3*r-20*l)/(4*l),d={mode:"xyz50",x:i,y:n,z:s};return a!==void 0&&(d.alpha=a),d},uo=fd;var pd=e=>zr(so(g1(e))),Cd=e=>h1(uo(jr(e))),md={mode:"lchuv",toMode:{luv:jr,rgb:Cd},fromMode:{rgb:pd,luv:zr},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:P,fixup:Me},c:P,l:P,alpha:{use:P,fixup:oe}},difference:{h:$1},average:{h:ye}},Jn=md;var hd={...Ye,mode:"lrgb",toMode:{rgb:t1},fromMode:{rgb:e1},parse:["srgb-linear"],serialize:"srgb-linear"},Yn=hd;var gd={mode:"luv",toMode:{xyz50:uo,rgb:e=>h1(uo(e))},fromMode:{xyz50:so,rgb:e=>so(g1(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:P,u:P,v:P,alpha:{use:P,fixup:oe}}},e0=gd;var vd=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*o),l=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*o),n=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*o),i={mode:"oklab",l:.210454268309314*r+.7936177747023054*l-.0040720430116193*n,a:1.9779985324311684*r-2.42859224204858*l+.450593709617411*n,b:.0259040424655478*r+.7827717124575296*l-.8086757549230774*n};return a!==void 0&&(i.alpha=a),i},ia=vd;var xd=e=>{let t=ia(e1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},j1=xd;var Ld=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.pow(e+.3963377773761749*t+.2158037573099136*o,3),l=Math.pow(e-.1055613458156586*t-.0638541728258133*o,3),n=Math.pow(e-.0894841775298119*t-1.2914855480194092*o,3),i={mode:"lrgb",r:4.076741636075957*r-3.3077115392580616*l+.2309699031821044*n,g:-1.2684379732850317*r+2.6097573492876887*l-.3413193760026573*n,b:-.0041960761386756*r-.7034186179359362*l+1.7076146940746117*n};return a!==void 0&&(i.alpha=a),i},v1=Ld;var wd=e=>t1(v1(e)),K1=wd;function co(e){let a=1.170873786407767;return .5*(a*e-.206+Math.sqrt((a*e-.206)*(a*e-.206)+4*.03*a*e))}function nt(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function Id(e,t){let o,a,r,l,n,i,s,d;-1.88170328*e-.80936493*t>1?(o=1.19086277,a=1.76576728,r=.59662641,l=.75515197,n=.56771245,i=4.0767416621,s=-3.3077115913,d=.2309699292):1.81444104*e-1.19445276*t>1?(o=.73956515,a=-.45954404,r=.08285427,l=.1254107,n=.14503204,i=-1.2684380046,s=2.6097574011,d=-.3413193965):(o=1.35733652,a=-.00915799,r=-1.1513021,l=-.50559606,n=.00692167,i=-.0041960863,s=-.7034186147,d=1.707614701);let u=o+a*e+r*t+l*e*e+n*e*t,c=.3963377774*e+.2158037573*t,f=-.1055613458*e-.0638541728*t,x=-.0894841775*e-1.291485548*t;{let g=1+u*c,b=1+u*f,m=1+u*x,M=g*g*g,v=b*b*b,R=m*m*m,L=3*c*g*g,V=3*f*b*b,B=3*x*m*m,z=6*c*c*g,y=6*f*f*b,H=6*x*x*m,j=i*M+s*v+d*R,N=i*L+s*V+d*B,J=i*z+s*y+d*H;u=u-j*N/(N*N-.5*j*J)}return u}function Kr(e,t){let o=Id(e,t),a=v1({l:1,a:o*e,b:o*t}),r=Math.cbrt(1/Math.max(a.r,a.g,a.b)),l=r*o;return[r,l]}function bd(e,t,o,a,r,l=null){l||(l=Kr(e,t));let n;if((o-r)*l[1]-(l[0]-r)*a<=0)n=l[1]*r/(a*l[0]+l[1]*(r-o));else{n=l[1]*(r-1)/(a*(l[0]-1)+l[1]*(r-o));{let i=o-r,s=a,d=.3963377774*e+.2158037573*t,u=-.1055613458*e-.0638541728*t,c=-.0894841775*e-1.291485548*t,f=i+s*d,x=i+s*u,g=i+s*c;{let b=r*(1-n)+n*o,m=n*a,M=b+m*d,v=b+m*u,R=b+m*c,L=M*M*M,V=v*v*v,B=R*R*R,z=3*f*M*M,y=3*x*v*v,H=3*g*R*R,j=6*f*f*M,N=6*x*x*v,J=6*g*g*R,D=4.0767416621*L-3.3077115913*V+.2309699292*B-1,q=4.0767416621*z-3.3077115913*y+.2309699292*H,S=4.0767416621*j-3.3077115913*N+.2309699292*J,w=q/(q*q-.5*D*S),I=-D*w,p=-1.2684380046*L+2.6097574011*V-.3413193965*B-1,U=-1.2684380046*z+2.6097574011*y-.3413193965*H,_=-1.2684380046*j+2.6097574011*N-.3413193965*J,A=U/(U*U-.5*p*_),E=-p*A,C=-.0041960863*L-.7034186147*V+1.707614701*B-1,h=-.0041960863*z-.7034186147*y+1.707614701*H,T=-.0041960863*j-.7034186147*N+1.707614701*J,O=h/(h*h-.5*C*T),Z=-C*O;I=w>=0?I:1e6,E=A>=0?E:1e6,Z=O>=0?Z:1e6,n+=Math.min(I,Math.min(E,Z))}}}return n}function fo(e,t,o=null){o||(o=Kr(e,t));let a=o[0],r=o[1];return[r/a,r/(1-a)]}function sa(e,t,o){let a=Kr(t,o),r=bd(t,o,e,1,e,a),l=fo(t,o,a),n=.11516993+1/(7.4477897+4.1590124*o+t*(-2.19557347+1.75198401*o+t*(-2.13704948-10.02301043*o+t*(-4.24894561+5.38770819*o+4.69891013*t)))),i=.11239642+1/(1.6132032-.68124379*o+t*(.40370612+.90148123*o+t*(-.27087943+.6122399*o+t*(.00299215-.45399568*o-.14661872*t)))),s=r/Math.min(e*l[0],(1-e)*l[1]),d=e*n,u=(1-e)*i,c=.9*s*Math.sqrt(Math.sqrt(1/(1/(d*d*d*d)+1/(u*u*u*u))));return d=e*.4,u=(1-e)*.8,[Math.sqrt(1/(1/(d*d)+1/(u*u))),c,r]}function da(e){let t=e.l!==void 0?e.l:0,o=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,r={mode:"okhsl",l:co(t)};e.alpha!==void 0&&(r.alpha=e.alpha);let l=Math.sqrt(o*o+a*a);if(!l)return r.s=0,r;let[n,i,s]=sa(t,o/l,a/l),d;if(l<i){let u=0,c=.8*n,f=1-c/i;d=(l-u)/(c+f*(l-u))*.8}else{let u=i,c=.2*i*i*1.25*1.25/n,f=1-c/(s-i);d=.8+.2*((l-u)/(c+f*(l-u)))}return d&&(r.s=d,r.h=fe(Math.atan2(a,o)*180/Math.PI)),r}function ua(e){let t=e.h!==void 0?e.h:0,o=e.s!==void 0?e.s:0,a=e.l!==void 0?e.l:0,r={mode:"oklab",l:nt(a)};if(e.alpha!==void 0&&(r.alpha=e.alpha),!o||a===1)return r.a=r.b=0,r;let l=Math.cos(t/180*Math.PI),n=Math.sin(t/180*Math.PI),[i,s,d]=sa(r.l,l,n),u,c,f,x;o<.8?(u=1.25*o,c=0,f=.8*i,x=1-f/s):(u=5*(o-.8),c=s,f=.2*s*s*1.25*1.25/i,x=1-f/(d-s));let g=c+u*f/(1-x*u);return r.a=g*l,r.b=g*n,r}var Md={...Qo,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:da,rgb:e=>da(j1(e))},toMode:{oklab:ua,rgb:e=>K1(ua(e))}},t0=Md;function ca(e){let t=e.l!==void 0?e.l:0,o=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,r=Math.sqrt(o*o+a*a),l=r?o/r:1,n=r?a/r:1,[i,s]=fo(l,n),d=.5,u=1-d/i,c=s/(r+t*s),f=c*t,x=c*r,g=nt(f),b=x*g/f,m=v1({l:g,a:l*b,b:n*b}),M=Math.cbrt(1/Math.max(m.r,m.g,m.b,0));t=t/M,r=r/M*co(t)/t,t=co(t);let v={mode:"okhsv",s:r?(d+s)*x/(s*d+s*u*x):0,v:t?t/f:0};return v.s&&(v.h=fe(Math.atan2(a,o)*180/Math.PI)),e.alpha!==void 0&&(v.alpha=e.alpha),v}function fa(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let o=e.h!==void 0?e.h:0,a=e.s!==void 0?e.s:0,r=e.v!==void 0?e.v:0,l=Math.cos(o/180*Math.PI),n=Math.sin(o/180*Math.PI),[i,s]=fo(l,n),d=.5,u=1-d/i,c=1-a*d/(d+s-s*u*a),f=a*s*d/(d+s-s*u*a),x=nt(c),g=f*x/c,b=v1({l:x,a:l*g,b:n*g}),m=Math.cbrt(1/Math.max(b.r,b.g,b.b,0)),M=nt(r*c),v=f*M/c;return t.l=M*m,t.a=v*l*m,t.b=v*n*m,t}var yd={...Jo,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:ca,rgb:e=>ca(j1(e))},toMode:{oklab:fa,rgb:e=>K1(fa(e))}},o0=yd;function Sd(e,t){if(!t||t[0]!=="oklab")return;let o={mode:"oklab"},[,a,r,l,n]=t;if(!(a.type===k.Hue||r.type===k.Hue||l.type===k.Hue))return a.type!==k.None&&(o.l=Math.min(Math.max(0,a.type===k.Number?a.value:a.value/100),1)),r.type!==k.None&&(o.a=r.type===k.Number?r.value:r.value*.4/100),l.type!==k.None&&(o.b=l.type===k.Number?l.value:l.value*.4/100),n.type!==k.None&&(o.alpha=Math.min(1,Math.max(0,n.type===k.Number?n.value:n.value/100))),o}var a0=Sd;var Rd={...Pt,mode:"oklab",toMode:{lrgb:v1,rgb:K1},fromMode:{lrgb:ia,rgb:j1},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[a0],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},r0=Rd;function Hd(e,t){if(!t||t[0]!=="oklch")return;let o={mode:"oklch"},[,a,r,l,n]=t;if(a.type!==k.None){if(a.type===k.Hue)return;o.l=Math.min(Math.max(0,a.type===k.Number?a.value:a.value/100),1)}if(r.type!==k.None&&(o.c=Math.max(0,r.type===k.Number?r.value:r.value*.4/100)),l.type!==k.None){if(l.type===k.Percentage)return;o.h=l.value}return n.type!==k.None&&(o.alpha=Math.min(1,Math.max(0,n.type===k.Number?n.value:n.value/100))),o}var l0=Hd;var kd={...Tt,mode:"oklch",toMode:{oklab:e=>We(e,"oklab"),rgb:e=>K1(We(e,"oklab"))},fromMode:{rgb:e=>Ge(j1(e),"oklch"),oklab:e=>Ge(e,"oklch")},parse:[l0],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},n0=kd;var Pd=e=>{let{r:t,g:o,b:a,alpha:r}=e1(e),l={mode:"xyz65",x:.486570948648216*t+.265667693169093*o+.1982172852343625*a,y:.2289745640697487*t+.6917385218365062*o+.079286914093745*a,z:0*t+.0451133818589026*o+1.043944368900976*a};return r!==void 0&&(l.alpha=r),l},Gr=Pd;var Td=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=t1({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*o,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*o,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*o},"p3");return a!==void 0&&(r.alpha=a),r},Wr=Td;var Vd={...Ye,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>Wr(Ae(e)),xyz65:Wr},toMode:{rgb:e=>Ze(Gr(e)),xyz65:Gr}},i0=Vd;var Xr=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},_d=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"prophoto",r:Xr(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*o),g:Xr(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*o),b:Xr(e*0+t*0+1.2119675456389452*o)};return a!==void 0&&(r.alpha=a),r},Qr=_d;var Jr=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},Dd=e=>{let t=Jr(e.r),o=Jr(e.g),a=Jr(e.b),r={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*o+.0313477341283922*a,y:.2880748288194013*t+.7118352342418731*o+899369387256e-16*a,z:0*t+0*o+.8251046025104602*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},Yr=Dd;var Od={...Ye,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Qr,rgb:e=>Qr(g1(e))},toMode:{xyz50:Yr,rgb:e=>h1(Yr(e))}},s0=Od;var d0=1.09929682680944,Bd=.018053968510807,el=e=>{let t=Math.abs(e);return t>Bd?(Math.sign(e)||1)*(d0*Math.pow(t,.45)-(d0-1)):4.5*e},Ed=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"rec2020",r:el(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*o),g:el(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*o),b:el(e*.0176398574453108-t*.0427706132578085+.9421031212354739*o)};return a!==void 0&&(r.alpha=a),r},tl=Ed;var u0=1.09929682680944,Ad=.018053968510807,ol=(e=0)=>{let t=Math.abs(e);return t<Ad*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+u0-1)/u0,1/.45)},Zd=e=>{let t=ol(e.r),o=ol(e.g),a=ol(e.b),r={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*o+.1688809751641721*a,y:.262700212011267*t+.6779980715188708*o+.059301716469862*a,z:0*t+.0280726930490874*o+1.0609850577107909*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},al=Zd;var Fd={...Ye,mode:"rec2020",fromMode:{xyz65:tl,rgb:e=>tl(Ae(e))},toMode:{xyz65:al,rgb:e=>Ze(al(e))},parse:["rec2020"],serialize:"rec2020"},c0=Fd;var H1=.0037930732552754493,pa=Math.cbrt(H1);var rl=e=>Math.cbrt(e)-pa,$d=e=>{let{r:t,g:o,b:a,alpha:r}=e1(e),l=rl(.3*t+.622*o+.078*a+H1),n=rl(.23*t+.692*o+.078*a+H1),i=rl(.2434226892454782*t+.2047674442449682*o+.5518098665095535*a+H1),s={mode:"xyb",x:(l-n)/2,y:(l+n)/2,b:i-(l+n)/2};return r!==void 0&&(s.alpha=r),s},f0=$d;var ll=e=>Math.pow(e+pa,3),Nd=({x:e,y:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=ll(e+t)-H1,l=ll(t-e)-H1,n=ll(o+t)-H1,i=t1({r:11.031566904639861*r-9.866943908131562*l-.16462299650829934*n,g:-3.2541473810744237*r+4.418770377582723*l-.16462299650829934*n,b:-3.6588512867136815*r+2.7129230459360922*l+1.9459282407775895*n});return a!==void 0&&(i.alpha=a),i},p0=Nd;var Ud={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:p0},fromMode:{rgb:f0},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:P,y:P,b:P,alpha:{use:P,fixup:oe}}},C0=Ud;var qd={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:h1,lab:kt},fromMode:{rgb:g1,lab:Ht},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:P,y:P,z:P,alpha:{use:P,fixup:oe}}},m0=qd;var zd=e=>{let{x:t,y:o,z:a,alpha:r}=e;t===void 0&&(t=0),o===void 0&&(o=0),a===void 0&&(a=0);let l={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*o-.0501922295431356*a,y:.0296278156881593*t+.990434484573249*o-.0170738250293851*a,z:-.0092430581525912*t+.0150551448965779*o+.7518742899580008*a};return r!==void 0&&(l.alpha=r),l},h0=zd;var jd=e=>{let{x:t,y:o,z:a,alpha:r}=e;t===void 0&&(t=0),o===void 0&&(o=0),a===void 0&&(a=0);let l={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*o+.0632593086610217*a,y:-.0283697069632081*t+1.0099954580058226*o+.021041398966943*a,z:.0123140016883199*t-.0205076964334779*o+1.3303659366080753*a};return r!==void 0&&(l.alpha=r),l},g0=jd;var Kd={mode:"xyz65",toMode:{rgb:Ze,xyz50:h0},fromMode:{rgb:Ae,xyz50:g0},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:P,y:P,z:P,alpha:{use:P,fixup:oe}}},v0=Kd;var Gd=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*o,i:.59597799*e-.2741761*t-.32180189*o,q:.21147017*e-.52261711*t+.31114694*o};return a!==void 0&&(r.alpha=a),r},x0=Gd;var Wd=({y:e,i:t,q:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"rgb",r:e+.95608445*t+.6208885*o,g:e-.27137664*t-.6486059*o,b:e-1.10561724*t+1.70250126*o};return a!==void 0&&(r.alpha=a),r},L0=Wd;var Xd={mode:"yiq",toMode:{rgb:L0},fromMode:{rgb:x0},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:P,i:P,q:P,alpha:{use:P,fixup:oe}}},w0=Xd;var Qd=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,Jd=(e=4)=>t=>typeof t=="number"?Qd(t,e):t,I0=Jd;var xx=I0(2);var Lx=Ke("rgb"),wx=Ke("hsl");var nl=e=>{let t=$o(e);if(!t)return;let o=No(t.mode);if(!o.serialize||typeof o.serialize=="string"){let a=`color(${o.serialize||`--${t.mode}`} `;return o.channels.forEach((r,l)=>{r!=="alpha"&&(a+=(l?" ":"")+(t[r]!==void 0?t[r]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(a+=` / ${t.alpha}`),a+")"}if(typeof o.serialize=="function")return o.serialize(t)};var sL=ne(wn),dL=ne(Pn),uL=ne(_n),cL=ne(Dn),fL=ne(On),pL=ne(Qo),CL=ne(Jo),mL=ne(Fn),hL=ne(Nn),gL=ne(qn),vL=ne(zn),xL=ne(Pt),LL=ne(Kn),wL=ne(Tt),IL=ne(Wn),bL=ne(Jn),ML=ne(Yn),yL=ne(e0),SL=ne(t0),RL=ne(o0),HL=ne(r0),kL=ne(n0),PL=ne(i0),TL=ne(s0),VL=ne(c0),_L=ne(Ye),DL=ne(C0),OL=ne(m0),BL=ne(v0),EL=ne(w0);var il=Ke("rgb"),Yd=Ke("hsl"),eu=Ke("oklch"),tu=Ke("oklab"),ou=Ke("lch"),au=Ke("lab"),b0=null;function ru(){return b0??(b0=document.createElement("canvas").getContext("2d")),b0}function M0(e){try{let t=ru();if(!t)return null;t.fillStyle="#000000",t.fillStyle=e;let o=t.fillStyle;t.fillStyle="#ffffff",t.fillStyle=e;let a=t.fillStyle;return o===a?o:null}catch{return null}}function y0(e){if(!e||typeof e!="string")return!1;let t=e.trim();return rt(t)!==void 0?!0:M0(t)!==null}function it(e){let t={r:255,g:255,b:255,a:1};if(!e||typeof e!="string")return t;let o=e.trim(),a=rt(o);if(a){let l=il(a);if(l&&"r"in l&&"g"in l&&"b"in l)return{r:Math.round(Math.min(255,Math.max(0,l.r*255))),g:Math.round(Math.min(255,Math.max(0,l.g*255))),b:Math.round(Math.min(255,Math.max(0,l.b*255))),a:l.alpha??1}}let r=M0(o);if(r){if(r.startsWith("#")){let n=r.slice(1);return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1}}let l=r.match(/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(l&&l[1]!=null&&l[2]!=null&&l[3]!=null)return{r:+l[1],g:+l[2],b:+l[3],a:l[4]!=null?+l[4]:1}}return t}function Vt(e){let t=Math.round(Math.min(255,Math.max(0,e.r))),o=Math.round(Math.min(255,Math.max(0,e.g))),a=Math.round(Math.min(255,Math.max(0,e.b))),r=Math.round(Math.min(1,Math.max(0,e.a))*100)/100;return r>=1?`rgb(${t}, ${o}, ${a})`:`rgba(${t}, ${o}, ${a}, ${r})`}function Ca(e){let t=e.startsWith("#")?e.slice(1):e;return/^[0-9a-fA-F]+$/.test(t)&&[3,4,6,8].includes(t.length)}function po(e){let t=Math.round(Math.min(255,Math.max(0,e.r))),o=Math.round(Math.min(255,Math.max(0,e.g))),a=Math.round(Math.min(255,Math.max(0,e.b))),r=Math.min(1,Math.max(0,e.a)),l=`#${[t,o,a].map(n=>n.toString(16).padStart(2,"0")).join("")}`;return r<1?l+Math.round(r*255).toString(16).padStart(2,"0"):l}function S0(e){return!e||typeof e!="string"?"rgb":rt(e.trim())?.mode??"rgb"}function Fe(e,t){let o={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255,alpha:e.a};switch(t){case"oklch":return eu(o);case"oklab":return tu(o);case"lch":return ou(o);case"lab":return au(o);default:return o}}function sl(e){let t=e?il(e):null;return!t||!("r"in t)||!("g"in t)||!("b"in t)?{r:255,g:255,b:255,a:1}:{r:Math.round(Math.min(255,Math.max(0,t.r*255))),g:Math.round(Math.min(255,Math.max(0,t.g*255))),b:Math.round(Math.min(255,Math.max(0,t.b*255))),a:t.alpha??1}}function dl(e){return e?nl(e):""}function _t(e){let t={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255},o=Yd(t);return o?{h:o.h??0,s:o.s*100,l:o.l*100}:{h:0,s:0,l:0}}function ul(e){let t={mode:"hsl",h:e.h,s:e.s/100,l:e.l/100},o=il(t);return!o||!("r"in o)||!("g"in o)||!("b"in o)?{r:0,g:0,b:0}:{r:Math.round(o.r*255),g:Math.round(o.g*255),b:Math.round(o.b*255)}}import{jsx as Se,jsxs as x1}from"react/jsx-runtime";var cl=16,Dt=4,nu=245,R0=260,iu=200,su="linear-gradient(45deg, #e0e0e0 25%, transparent 25%), linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e0e0e0 75%), linear-gradient(-45deg, transparent 75%, #e0e0e0 75%)",du=["oklch","oklab","lch","lab","hsl"],H0=["oklch","oklab","lch","lab"],fl=["rgb","hsl","oklch","oklab","lch","lab"];function pl(e){let t=S0(e);return du.includes(t)?t:"rgb"}function Co(e,t){let o=_t({r:e.r,g:e.g,b:e.b}),a=Fe(e,"oklch"),r=Fe(e,"oklab"),l=Fe(e,"lch"),n=Fe(e,"lab");return{hex:pu(t,e),r:e.r,g:e.g,b:e.b,h:Math.round(o.h),s:Math.round(o.s),l:Math.round(o.l),a:Math.round(e.a*100),oklch_l:Math.round(a.l*100),oklch_c:Math.round(a.c*1e3)/10,oklch_h:Math.round(a.h||0),oklab_l:Math.round(r.l*100),oklab_a:Math.round(r.a*1e3)/10,oklab_b:Math.round(r.b*1e3)/10,lch_l:Math.round(l.l),lch_c:Math.round(l.c),lch_h:Math.round(l.h||0),lab_l:Math.round(n.l),lab_a:Math.round(n.a),lab_b:Math.round(n.b)}}function ml(e,t){let o=t.a/100;switch(e){case"oklch":return{mode:"oklch",l:t.oklch_l/100,c:t.oklch_c/100,h:t.oklch_h,alpha:o};case"oklab":return{mode:"oklab",l:t.oklab_l/100,a:t.oklab_a/100,b:t.oklab_b/100,alpha:o};case"lch":return{mode:"lch",l:t.lch_l,c:t.lch_c,h:t.lch_h,alpha:o};case"lab":return{mode:"lab",l:t.lab_l,a:t.lab_a,b:t.lab_b,alpha:o};case"hsl":return{mode:"hsl",h:t.h,s:t.s,l:t.l};default:return{mode:"rgb",r:t.r/255,g:t.g/255,b:t.b/255,alpha:o}}}function uu(e){let t=e?.closest(".property-panel-content")??e?.closest(".property-panel");return t?t.getBoundingClientRect():{top:0,bottom:window.innerHeight,left:0,right:window.innerWidth}}function cu(e,t=nu){let o=e.getBoundingClientRect(),a=uu(e),r=a.bottom-o.bottom-Dt,l=o.top-a.top-Dt,i=r<t&&l>=t?o.top-t-Dt:o.bottom+Dt;i=Math.max(a.top+Dt,Math.min(i,a.bottom-t-Dt));let s=o.left;return s+R0>a.right&&(s=a.right-R0-cl),s<a.left+cl&&(s=a.left+cl),{top:i,left:s}}function hl(e){return e!=null&&typeof e=="string"?e:"#ffffff"}function Cl(e){let{r:t,g:o,b:a,a:r}=it(hl(e));return{type:"rgba",r:t,g:o,b:a,a:r}}function fu(e,t){let o=e||Vt(t);return t.a>=1?{backgroundColor:o}:{backgroundColor:o,backgroundImage:`linear-gradient(0deg, ${o}, ${o}), ${su}`,backgroundSize:"100% 100%, 8px 8px, 8px 8px, 8px 8px, 8px 8px",backgroundPosition:"0 0, 0 0, 0 4px, 4px -4px, -4px 0"}}function pu(e,t){let o=typeof e=="string"?e.trim():"";return Ca(o)?o:po(t)}var Cu=e=>e.preventDefault(),mu=e=>{e.key==="Enter"&&e.currentTarget.blur()};function hu(e,t){switch(t.type){case"SET_ALL":return{format:e.format,hex:t.hex,r:t.r,g:t.g,b:t.b,h:t.h,s:t.s,l:t.l,a:t.a,oklch_l:t.oklch_l,oklch_c:t.oklch_c,oklch_h:t.oklch_h,oklab_l:t.oklab_l,oklab_a:t.oklab_a,oklab_b:t.oklab_b,lch_l:t.lch_l,lch_c:t.lch_c,lch_h:t.lch_h,lab_l:t.lab_l,lab_a:t.lab_a,lab_b:t.lab_b};case"SET_RGBA":{let{r:o,g:a,b:r,a:l}=t,n=_t({r:o,g:a,b:r}),i={r:o,g:a,b:r,a:l/100},s=Fe(i,"oklch"),d=Fe(i,"oklab"),u=Fe(i,"lch"),c=Fe(i,"lab");return{...e,hex:po(i),r:o,g:a,b:r,h:Math.round(n.h),s:Math.round(n.s),l:Math.round(n.l),a:l,oklch_l:Math.round(s.l*100),oklch_c:Math.round(s.c*1e3)/10,oklch_h:Math.round(s.h||0),oklab_l:Math.round(d.l*100),oklab_a:Math.round(d.a*1e3)/10,oklab_b:Math.round(d.b*1e3)/10,lch_l:Math.round(u.l),lch_c:Math.round(u.c),lch_h:Math.round(u.h||0),lab_l:Math.round(c.l),lab_a:Math.round(c.a),lab_b:Math.round(c.b)}}case"SET_HEX":return{...e,hex:t.hex};case"SET_CHANNEL":{let o={...e,[t.channel]:t.value},a;if(e.format==="rgb")a={r:o.r,g:o.g,b:o.b,a:o.a/100};else if(e.format==="hsl"){let d=ul({h:o.h,s:o.s,l:o.l});o.r=Math.round(d.r),o.g=Math.round(d.g),o.b=Math.round(d.b),a={r:o.r,g:o.g,b:o.b,a:o.a/100}}else{let d=ml(e.format,o);a=sl(d),o.r=a.r,o.g=a.g,o.b=a.b}let r=_t({r:o.r,g:o.g,b:o.b}),l=Fe(a,"oklch"),n=Fe(a,"oklab"),i=Fe(a,"lch"),s=Fe(a,"lab");return{...o,hex:po(a),h:Math.round(r.h),s:Math.round(r.s),l:Math.round(r.l),oklch_l:Math.round(l.l*100),oklch_c:Math.round(l.c*1e3)/10,oklch_h:Math.round(l.h||0),oklab_l:Math.round(n.l*100),oklab_a:Math.round(n.a*1e3)/10,oklab_b:Math.round(n.b*1e3)/10,lch_l:Math.round(i.l),lch_c:Math.round(i.c),lch_h:Math.round(i.h||0),lab_l:Math.round(s.l),lab_a:Math.round(s.a),lab_b:Math.round(s.b)}}case"SET_FORMAT":return{...e,format:t.format};default:return e}}var gu={placeholder:"Enter color value",ariaValue:"{0} color value",ariaOpenPicker:"{0}, open color picker. Current color: {1}",ariaPicker:"{0} picker",ariaSaturation:"Color saturation and brightness",ariaEyedropper:"Pick color from screen",ariaHue:"Hue, 0 to 360 degrees",ariaAlphaSlider:"Alpha transparency, 0 to 100 percent",ariaHex:"Hexadecimal color value",ariaChannel:"{0} ({1}), {2} to {3}",ariaAlphaInput:"Alpha, 0 to 100 percent",ariaFormatCycle:"Color format: {0}. Click to change format.",titleFormatCycle:"Click to cycle format: RGB, HSL, OKLCH, OKLAB, LCH, LAB"};function ma({label:e,value:t,onChange:o,id:a="color",aria:r}){let l=y1(gu,r),n=`${a}-trigger`,i=`${a}-popover`,s=hl(t),[{colorInput:d,colorState:u},c]=ln(()=>Cl(s)),[f,x]=he.useReducer(hu,s,C=>{let h=it(C),T=Co(h,C);return{format:pl(C),...T}}),g=he.useRef(f);g.current=f;let b=he.useRef(null),m=he.useRef(t),M=he.useRef(o);M.current=o;let v=he.useCallback(C=>{let h=g.current.format,T;if(H0.includes(h)){let O=Fe(C,h);T=dl(O)}else if(h==="hsl"){let O=_t({r:C.r,g:C.g,b:C.b}),Z=Math.round(C.a*100)/100;T=Z>=1?`hsl(${Math.round(O.h)}, ${Math.round(O.s)}%, ${Math.round(O.l)}%)`:`hsla(${Math.round(O.h)}, ${Math.round(O.s)}%, ${Math.round(O.l)}%, ${Z})`}else T=Vt(C);T!==b.current&&(b.current=T,m.current=T,typeof M.current=="function"&&M.current(T))},[]),R=nn(v,iu),L=dn({computePosition:cu,onClose:R.flush,trapFocus:!0});he.useEffect(()=>{let C=hl(t);if(C===m.current)return;m.current=C;let h=it(C);c(Cl(t));let T=Co(h,C),O=pl(C);x({type:"SET_ALL",...T}),O!==g.current.format&&x({type:"SET_FORMAT",format:O})},[t,c]);let V=he.useCallback(C=>{R.cancel();let h=C.target.value;if((!h||!h.startsWith("#"))&&(h="#"+h.replace(/^#+/,"")),Ca(h)){c({type:"hex",value:h});let T=it(h),O=Co(T,h);x({type:"SET_ALL",...O})}else x({type:"SET_HEX",hex:h})},[R,c]),B=he.useCallback(()=>{R.cancel();let C=g.current.hex.trim();if(Ca(C)){let h=it(C),T=Co(h,C);x({type:"SET_ALL",...T}),v(h)}else{let h=g.current;x({type:"SET_HEX",hex:po({r:h.r,g:h.g,b:h.b,a:h.a/100})})}},[R,v]),z=he.useMemo(()=>{switch(f.format){case"hsl":return[{key:"h",label:"H",min:0,max:360},{key:"s",label:"S",min:0,max:100},{key:"l",label:"L",min:0,max:100}];case"oklch":return[{key:"oklch_l",label:"L",min:0,max:100,step:1},{key:"oklch_c",label:"C",min:0,max:40,step:.1},{key:"oklch_h",label:"H",min:0,max:360,step:1}];case"oklab":return[{key:"oklab_l",label:"L",min:0,max:100,step:1},{key:"oklab_a",label:"A",min:-40,max:40,step:.1},{key:"oklab_b",label:"B",min:-40,max:40,step:.1}];case"lch":return[{key:"lch_l",label:"L",min:0,max:100,step:1},{key:"lch_c",label:"C",min:0,max:150,step:1},{key:"lch_h",label:"H",min:0,max:360,step:1}];case"lab":return[{key:"lab_l",label:"L",min:0,max:100,step:1},{key:"lab_a",label:"A",min:-128,max:127,step:1},{key:"lab_b",label:"B",min:-128,max:127,step:1}];default:return[{key:"r",label:"R",min:0,max:255},{key:"g",label:"G",min:0,max:255},{key:"b",label:"B",min:0,max:255}]}},[f.format]),y=he.useCallback((C,h)=>{R.cancel();let T=String(h).trim(),O=["oklch_c","oklab_a","oklab_b"].includes(C),Z=T===""?0:O?parseFloat(T):parseInt(T,10);if(Number.isNaN(Z))return;let Q=g.current,le=z.find(ge=>ge.key===C),Y=0,se=100;le?(Y=le.min,se=le.max):C==="a"?(Y=0,se=100):C==="h"?(Y=0,se=360):Q.format==="rgb"&&(Y=0,se=255);let de=Math.min(se,Math.max(Y,Z));x({type:"SET_CHANNEL",channel:C,value:de});let ie={...Q,[C]:de},ce;if(Q.format==="rgb")ce={r:ie.r,g:ie.g,b:ie.b,a:ie.a/100};else if(Q.format==="hsl"){let ge=ul({h:ie.h,s:ie.s,l:ie.l});ce={r:ge.r,g:ge.g,b:ge.b,a:ie.a/100}}else{let ge=ml(Q.format,ie);ce=sl(ge)}c({type:"rgba",...ce}),v(ce)},[R,c,v,z]),H=he.useCallback(C=>{c(C);let h=C.getRgba();x({type:"SET_RGBA",r:Math.round(h.r),g:Math.round(h.g),b:Math.round(h.b),a:Math.round(h.a*100)}),R({r:h.r,g:h.g,b:h.b,a:h.a})},[c,R]),j=he.useCallback(C=>{let h=C.target.closest('[role="slider"]');h instanceof HTMLElement&&h.focus()},[]);he.useLayoutEffect(()=>{if(!L.isOpen||!L.popoverRef.current)return;let C=L.popoverRef.current.offsetHeight;C<=0||L.reposition(C)},[L.isOpen,L.reposition]);let N=u?.rgba??{r:255,g:255,b:255,a:1},D=he.useCallback(()=>{let C=f.format;if(H0.includes(C)){let h=ml(C,f);return dl(h)}else if(C==="hsl"){let h=_t({r:N.r,g:N.g,b:N.b}),T=Math.round(N.a*100)/100;return T>=1?`hsl(${Math.round(h.h)}, ${Math.round(h.s)}%, ${Math.round(h.l)}%)`:`hsla(${Math.round(h.h)}, ${Math.round(h.s)}%, ${Math.round(h.l)}%, ${T})`}else return Vt(N)},[f,N])(),q=fu(D,N),[S,w]=he.useState(D),I=he.useRef(S);I.current=S,he.useEffect(()=>{w(D)},[D]);let p=he.useCallback(C=>{let h=C.target.value;w(h)},[]),U=he.useCallback(()=>{R.cancel();let C=I.current.trim();if(!C||!y0(C)){w(D);return}let h=it(C),T=Vt(h),O=Vt(N);if(T!==O){c(Cl(C));let Z=Co(h,C),Q=pl(C);x({type:"SET_ALL",...Z}),Q!==g.current.format&&x({type:"SET_FORMAT",format:Q}),C!==b.current&&(b.current=C,m.current=C,typeof M.current=="function"&&M.current(C))}else w(D)},[R,D,N,c]),_=he.useCallback(C=>{C.key==="Enter"&&C.currentTarget.blur()},[]),A=he.useCallback(()=>{let C=fl.indexOf(f.format),h=fl[(C+1)%fl.length]??f.format;x({type:"SET_FORMAT",format:h})},[f.format]),E=he.useMemo(()=>{let C=L.triggerRef.current;if(!C)return document.body;let h=C.getRootNode();return h instanceof ShadowRoot?h:document.body},[L.isOpen,L.triggerRef]);return Se(p1,{label:e,id:a,className:"colorEditor-fieldset",children:x1("div",{className:"colorEditor-wrapper",children:[Se("button",{ref:L.triggerRef,id:n,type:"button",className:"colorEditor-swatch-only",onClick:L.toggle,"aria-expanded":L.isOpen,"aria-haspopup":"dialog","aria-controls":i,"aria-label":je(l.ariaOpenPicker,[e,D]),children:Se("span",{style:q,"aria-hidden":"true",className:"colorEditor-swatch"})}),Se("input",{type:"text",className:"colorEditor-value-input",value:S,onChange:p,onBlur:U,onKeyDown:_,"aria-label":je(l.ariaValue,[e]),placeholder:l.placeholder,spellCheck:"false",autoComplete:"off"}),L.isOpen&&lu(x1("div",{ref:L.popoverRef,id:i,role:"dialog","aria-modal":"true","aria-label":je(l.ariaPicker,[e]),style:{top:L.position.top,left:L.position.left},onDragStart:Cu,onMouseUp:j,className:"colorEditor-popover",children:[x1(Lt,{color:d,onChange:H,className:"colorEditor-picker",children:[Se(Lt.Saturation,{className:"colorEditor-picker-saturation","aria-label":l.ariaSaturation}),x1("div",{className:"colorEditor-picker-toolbar",children:[Se(Lt.EyeDropper,{"aria-label":l.ariaEyedropper,children:Se(Xt,{size:18,"aria-hidden":"true"})}),x1("div",{className:"colorEditor-picker-sliders",children:[Se(Lt.Hue,{className:"h-4 colorEditor-picker-hue","aria-label":l.ariaHue}),Se(Lt.Alpha,{className:"h-4 colorEditor-picker-alpha","aria-label":l.ariaAlphaSlider})]})]})]}),x1("div",{className:"colorEditor-input-wrapper",children:[x1("div",{className:"colorEditor-input-group",children:[Se("input",{type:"text",value:f.hex,onChange:V,onBlur:B,onKeyDown:mu,"aria-label":l.ariaHex,className:"colorEditor-input-hex",spellCheck:"false",autoComplete:"off"}),Se("label",{className:"colorEditor-input-label","aria-hidden":"true",children:"HEX"})]}),x1("div",{className:"colorEditor-channels-wrapper",children:[x1("div",{className:"colorEditor-input-container",children:[z.map(C=>Se("div",{className:"colorEditor-input-group-no-label",children:Se("input",{type:"number",min:C.min,max:C.max,step:C.step||1,value:f[C.key],onChange:h=>y(C.key,h.target.value),onBlur:h=>y(C.key,h.target.value),"aria-label":je(l.ariaChannel,[C.label,f.format.toUpperCase(),C.min,C.max]),"aria-valuemin":C.min,"aria-valuemax":C.max,"aria-valuenow":f[C.key],className:"colorEditor-input-rgba"})},C.key)),Se("div",{className:"colorEditor-input-group-no-label",children:Se("input",{type:"number",min:0,max:100,value:f.a,onChange:C=>y("a",C.target.value),onBlur:C=>y("a",C.target.value),"aria-label":l.ariaAlphaInput,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":f.a,className:"colorEditor-input-rgba"})})]}),Se("div",{className:"colorEditor-format-selector",children:x1("button",{type:"button",className:"colorEditor-format-picker",onClick:A,"aria-label":je(l.ariaFormatCycle,[f.format.toUpperCase()]),"aria-live":"polite",title:l.titleFormatCycle,children:[z.map(C=>Se("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:C.label},C.key)),Se("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:"A"})]})})]})]})]}),E)]})})}import $e from"react";import{jsx as Ot,jsxs as xu}from"react/jsx-runtime";var vu={ariaValue:"{0} value",ariaUnit:"{0} unit"};function L1({label:e,value:t,onChange:o,units:a=Ho,constraints:r=i1,defaultUnit:l="px",placeholder:n=0,id:i="dimension",icon:s,aria:d}){let u=y1(vu,d),c=$e.useMemo(()=>new Set(a.map(D=>D.value)),[a]),f=$e.useMemo(()=>jt(a),[a]),x=$e.useMemo(()=>{if(n==null||n==="")return"";if(typeof n=="number")return String(n);let D=Ee(String(n),l,f);return D.numericValue!==""?String(D.numericValue):String(n)},[n,l,f]),[g,b]=$e.useState(()=>{let D=Ee(t,l,f);return D.numericValue!==""?String(D.numericValue):""}),[m,M]=$e.useState(()=>Ee(t,l,f).unit),v=$e.useRef(o);v.current=o;let R=$e.useRef(t);$e.useEffect(()=>{if(t===R.current)return;R.current=t;let D=Ee(t,l,f);b(D.numericValue!==""?String(D.numericValue):""),M(D.unit)},[t,l,f]);let L=$e.useCallback((D,q)=>{let S=parseFloat(D);if(D===""||isNaN(S)){if(R.current==="")return;R.current="",typeof v.current=="function"&&v.current("");return}let w=s1(S,q,r),I=d1(w,q,r),p=ko(I,q);p!==R.current&&(R.current=p,typeof v.current=="function"&&v.current(p))},[r]),V=$e.useCallback(D=>{let q=D.target.value;b(q);let S=Ee(q,l,f);S.numericValue!==""&&S.unit&&c.has(S.unit)&&S.unit!==m&&M(S.unit)},[l,f,m,c]),B=$e.useCallback(D=>{let q=D.clipboardData.getData("text"),S=Ee(q,l,f);if(S.numericValue!==""&&S.unit&&c.has(S.unit)){D.preventDefault(),b(String(S.numericValue)),M(S.unit);let w=s1(S.numericValue,S.unit,r),I=d1(w,S.unit,r),p=ko(I,S.unit);R.current=p,typeof v.current=="function"&&v.current(p)}},[l,f,c,r]),z=$e.useCallback(()=>{if(g===""){L("",m);return}let D=parseFloat(g);if(isNaN(D)){let w=Ee(t,l,f);b(w.numericValue!==""?String(w.numericValue):"");return}let q=s1(D,m,r),S=d1(q,m,r);b(String(S)),L(String(S),m)},[g,m,t,l,f,r,L]),y=$e.useCallback(D=>{if(D.key==="Enter"){D.currentTarget.blur();return}if(D.key==="ArrowUp"||D.key==="ArrowDown"){D.preventDefault();let q=Po(g,D.key,D.shiftKey,m,r);if(q===null)return;b(q),L(q,m)}},[g,m,r,L]),H=$e.useCallback(D=>{let q=D.target.value;if(!c.has(q))return;if(M(q),g===""){L("",q);return}let S=parseFloat(g);if(isNaN(S))return;let w=s1(S,q,r),I=d1(w,q,r);b(String(I));let p=ko(I,q);R.current=p,typeof v.current=="function"&&v.current(p)},[g,c,r,L]),j=`${i}-input`,N=`${i}-unit`,J=a.some(D=>D.value!=="");return Ot(p1,{label:e,id:i,className:"dimensionEditor-fieldset",children:xu("div",{className:"dimensionEditor-row",children:[s&&Ot("span",{className:"dimensionEditor-icon","aria-hidden":"true",children:Ot(s,{size:14,width:14,height:14})}),Ot("input",{id:j,type:"text",className:s?"dimensionEditor-input dimensionEditor-input--with-icon":"dimensionEditor-input",value:g,placeholder:x,onChange:V,onPaste:B,onBlur:z,onKeyDown:y,"aria-label":je(u.ariaValue,[e]),autoComplete:"off",spellCheck:"false"}),J&&Ot("select",{id:N,className:"dimensionEditor-unit",value:m,onChange:H,"aria-label":je(u.ariaUnit,[e]),children:a.map(D=>Ot("option",{value:D.value,children:D.label},D.value))})]})})}function Ne(e,t){if(e==null)return{};var o={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;o[a]=e[a]}return o}function X(){return X=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)({}).hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},X.apply(null,arguments)}var K=w9(B0(),1),yu=w9(F0(),1);import*as re from"react";import{cloneElement as Sw,Component as Rw,useRef as a1,useCallback as ae,useEffect as w1,useMemo as Bt}from"react";var $0=e=>typeof e=="object"&&e!=null&&e.nodeType===1,N0=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Sa=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let o=getComputedStyle(e,null);return N0(o.overflowY,t)||N0(o.overflowX,t)||(a=>{let r=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(a);return!!r&&(r.clientHeight<a.scrollHeight||r.clientWidth<a.scrollWidth)})(e)}return!1},Ra=(e,t,o,a,r,l,n,i)=>l<e&&n>t||l>e&&n<t?0:l<=e&&i<=o||n>=t&&i>=o?l-e-a:n>t&&i<o||l<e&&i>o?n-t+r:0,Mu=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)},U0=(e,t)=>{var o,a,r,l;if(typeof document>"u")return[];let{scrollMode:n,block:i,inline:s,boundary:d,skipOverflowHiddenElements:u}=t,c=typeof d=="function"?d:w=>w!==d;if(!$0(e))throw new TypeError("Invalid target");let f=document.scrollingElement||document.documentElement,x=[],g=e;for(;$0(g)&&c(g);){if(g=Mu(g),g===f){x.push(g);break}g!=null&&g===document.body&&Sa(g)&&!Sa(document.documentElement)||g!=null&&Sa(g,u)&&x.push(g)}let b=(a=(o=window.visualViewport)==null?void 0:o.width)!=null?a:innerWidth,m=(l=(r=window.visualViewport)==null?void 0:r.height)!=null?l:innerHeight,{scrollX:M,scrollY:v}=window,{height:R,width:L,top:V,right:B,bottom:z,left:y}=e.getBoundingClientRect(),{top:H,right:j,bottom:N,left:J}=(w=>{let I=window.getComputedStyle(w);return{top:parseFloat(I.scrollMarginTop)||0,right:parseFloat(I.scrollMarginRight)||0,bottom:parseFloat(I.scrollMarginBottom)||0,left:parseFloat(I.scrollMarginLeft)||0}})(e),D=i==="start"||i==="nearest"?V-H:i==="end"?z+N:V+R/2-H+N,q=s==="center"?y+L/2-J+j:s==="end"?B+j:y-J,S=[];for(let w=0;w<x.length;w++){let I=x[w],{height:p,width:U,top:_,right:A,bottom:E,left:C}=I.getBoundingClientRect();if(n==="if-needed"&&V>=0&&y>=0&&z<=m&&B<=b&&(I===f&&!Sa(I)||V>=_&&z<=E&&y>=C&&B<=A))return S;let h=getComputedStyle(I),T=parseInt(h.borderLeftWidth,10),O=parseInt(h.borderTopWidth,10),Z=parseInt(h.borderRightWidth,10),Q=parseInt(h.borderBottomWidth,10),le=0,Y=0,se="offsetWidth"in I?I.offsetWidth-I.clientWidth-T-Z:0,de="offsetHeight"in I?I.offsetHeight-I.clientHeight-O-Q:0,ie="offsetWidth"in I?I.offsetWidth===0?0:U/I.offsetWidth:0,ce="offsetHeight"in I?I.offsetHeight===0?0:p/I.offsetHeight:0;if(f===I)le=i==="start"?D:i==="end"?D-m:i==="nearest"?Ra(v,v+m,m,O,Q,v+D,v+D+R,R):D-m/2,Y=s==="start"?q:s==="center"?q-b/2:s==="end"?q-b:Ra(M,M+b,b,T,Z,M+q,M+q+L,L),le=Math.max(0,le+v),Y=Math.max(0,Y+M);else{le=i==="start"?D-_-O:i==="end"?D-E+Q+de:i==="nearest"?Ra(_,E,p,O,Q+de,D,D+R,R):D-(_+p/2)+de/2,Y=s==="start"?q-C-T:s==="center"?q-(C+U/2)+se/2:s==="end"?q-A+Z+se:Ra(C,A,U,T,Z+se,q,q+L,L);let{scrollLeft:ge,scrollTop:ke}=I;le=ce===0?0:Math.max(0,Math.min(ke+le/ce,I.scrollHeight-p/ce+de)),Y=ie===0?0:Math.max(0,Math.min(ge+Y/ie,I.scrollWidth-U/ie+se)),D+=ke-le,q+=ge-Y}S.push({el:I,top:le,left:Y})}return S};var Su=0;function X0(){return String(Su++)}function go(e){var t=re.useRef(e);return t.current=e,t}function Ru(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){t.forEach(function(r){typeof r=="function"?r(a):r&&(r.current=a)})}}function xl(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){for(var r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];return t.some(function(i){return i&&i.apply(void 0,[a].concat(l)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function Q0(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var l=arguments.length,n=new Array(l),i=0;i<l;i++)n[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,n)},t)}return r.cancel=a,r}var Hu=Q0(function(e){J0(e).textContent=""},500);function J0(e){var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}function ku(e,t){if(!(!e||!t)){var o=J0(t);o.textContent=e,Hu(t)}}function Pu(e){var t=e?.getElementById("a11y-status-message");t&&t.remove()}function vo(){}var wl=vo;function ka(e,t){if(!t)return e;var o=Object.keys(e);return o.reduce(function(a,r){return t[r]!==void 0&&(a[r]=t[r]),a},X({},e))}function Tu(e,t){if(e){var o=U0(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});o.forEach(function(a){var r=a.el,l=a.top,n=a.left;r.scrollTop=l,r.scrollLeft=n})}}function q0(e,t,o){var a=e===t||t instanceof o.Node&&e.contains&&e.contains(t);return a}function Vu(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var l=arguments.length,n=new Array(l),i=0;i<l;i++)n[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,n)},t)}return r.cancel=a,r}function xe(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){for(var r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];return t.some(function(i){return i&&i.apply(void 0,[a].concat(l)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function k1(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){t.forEach(function(r){typeof r=="function"?r(a):r&&(r.current=a)})}}function _u(e,t){return e[t]!==void 0}function Pa(e){var t=e.key,o=e.keyCode;return o>=37&&o<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function G1(e,t,o,a,r){r===void 0&&(r=!1);var l=o.length;if(l===0)return-1;var n=l-1;(typeof e!="number"||e<0||e>n)&&(e=t>0?-1:n+1);var i=e+t;i<0?i=r?n:0:i>n&&(i=r?0:n);var s=Et(i,t<0,o,a,r);return s===-1?e>=l?-1:e:s}function Et(e,t,o,a,r){r===void 0&&(r=!1);var l=o.length;if(t){for(var n=e;n>=0;n--)if(!a(o[n],n))return n}else for(var i=e;i<l;i++)if(!a(o[i],i))return i;return r?Et(t?l-1:0,t,o,a):-1}function z0(e,t,o,a){return a===void 0&&(a=!0),o&&t.some(function(r){return r&&(q0(r,e,o)||a&&q0(r,o.document.activeElement,o))})}function Il(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function Du(e,t,o,a){for(var r=e.type,l={},n=Object.keys(o),i=0,s=n;i<s.length;i++){var d=s[i];Ou(d,e,t,o,a),a[d]!==o[d]&&(l[d]=a[d])}t.onStateChange&&Object.keys(l).length&&t.onStateChange(X({type:r},l))}function Ou(e,t,o,a,r){if(r[e]!==a[e]){var l="on"+Il(e)+"Change",n=o[l];if(typeof n=="function"){var i=t.type;n(X({type:i},r))}}}function Y0(e,t,o,a){var r=re.useRef(null),l=re.useRef(void 0),n=go(t),i=re.useCallback(function(f,x){l.current=x,f=ka(f,n.current);var g=e(f,n.current,x),b=n.current.stateReducer(f,X({},x,{changes:g}));return X({},f,b)},[n,e]),s=re.useReducer(i,t,o),d=s[0],u=s[1],c=l.current;return re.useEffect(function(){var f,x=ka((f=r.current)!=null?f:{},n.current),g=c&&r.current&&!a(x,d);g&&Du(c,n.current,x,d),r.current=d},[d,c,a,n]),[d,u]}function bl(e,t,o,a){var r=Y0(e,t,o,a),l=r[0],n=r[1];return[ka(l,t),n]}function Ml(e,t,o,a){if(e!==void 0&&t!==void 0)return[e,t];if(e!==void 0){var r=o.indexOf(e);if(r<0)throw new Error(a);return[e,o.indexOf(e)]}if(t!==void 0){var l=o[t];if(l===void 0)throw new Error(a);return[l,t]}throw new Error(a)}function Ba(){var e=re.useRef(!0);return re.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function Bu(e,t){return t.changes}var Eu={environment:K.default.shape({addEventListener:K.default.func.isRequired,removeEventListener:K.default.func.isRequired,document:K.default.shape({createElement:K.default.func.isRequired,getElementById:K.default.func.isRequired,activeElement:K.default.any.isRequired,body:K.default.any.isRequired}).isRequired,Node:K.default.func.isRequired}),itemToKey:K.default.func,stateReducer:K.default.func};function I1(e,t,o){var a=e["default"+Il(t)];return a!==void 0?a:o[t]}function st(e,t,o){var a=e[t];if(a!==void 0)return a;var r=e["initial"+Il(t)];return r!==void 0?r:I1(e,t,o)}var j0=Q0(function(e,t){ku(e,t)},200);function yl(e,t,o,a){var r=a?.document,l=Ba();re.useEffect(function(){if(!(!e||l||!r)){var n=e(t);j0(n,r)}},o),re.useEffect(function(){return function(){j0.cancel(),Pu(r)}},[r])}var mo=X({},Eu,{getA11yStatusMessage:K.default.func,highlightedIndex:K.default.number,defaultHighlightedIndex:K.default.number,initialHighlightedIndex:K.default.number,isOpen:K.default.bool,defaultIsOpen:K.default.bool,initialIsOpen:K.default.bool,selectedItem:K.default.any,initialSelectedItem:K.default.any,defaultSelectedItem:K.default.any,id:K.default.string,labelId:K.default.string,menuId:K.default.string,getItemId:K.default.func,toggleButtonId:K.default.string,onSelectedItemChange:K.default.func,onHighlightedIndexChange:K.default.func,onStateChange:K.default.func,onIsOpenChange:K.default.func,scrollIntoView:K.default.func}),ho={itemToString:function(t){return t?String(t):""},itemToKey:function(t){return t},stateReducer:Bu,scrollIntoView:Tu,environment:typeof window>"u"?void 0:window},Ue={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""},Au=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?re.useLayoutEffect:re.useEffect;function Zu(e){return/^\S{1}$/.test(e)}function e5(e){var t=st(e,"selectedItem",Ue),o=st(e,"isOpen",Ue),a=Fu(e),r=st(e,"inputValue",Ue);return{highlightedIndex:a<0&&t&&o?e.items.findIndex(function(l){return e.itemToKey(l)===e.itemToKey(t)}):a,isOpen:o,selectedItem:t,inputValue:r}}function dt(e,t,o){var a=e.items,r=e.initialHighlightedIndex,l=e.defaultHighlightedIndex,n=e.isItemDisabled,i=e.itemToKey,s=t.selectedItem,d=t.highlightedIndex;return a.length===0?-1:r!==void 0&&d===r&&!n(a[r],r)?r:l!==void 0&&!n(a[l],l)?l:s?a.findIndex(function(u){return i(s)===i(u)}):o<0&&!n(a[a.length-1],a.length-1)?a.length-1:o>0&&!n(a[0],0)?0:-1}function t5(e,t,o){var a=re.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),r=re.useCallback(function(){return o.map(function(l){return l.current})},[o]);return re.useEffect(function(){if(!e)return vo;function l(){a.current.isTouchEnd=!1,a.current.isMouseDown=!0}function n(u){a.current.isMouseDown=!1,z0(u.target,r(),e)||t()}function i(){a.current.isTouchEnd=!1,a.current.isTouchMove=!1}function s(){a.current.isTouchMove=!0}function d(u){a.current.isTouchEnd=!0,!a.current.isTouchMove&&!z0(u.target,r(),e,!1)&&t()}return e.addEventListener("mousedown",l),e.addEventListener("mouseup",n),e.addEventListener("touchstart",i),e.addEventListener("touchmove",s),e.addEventListener("touchend",d),function(){e.removeEventListener("mousedown",l),e.removeEventListener("mouseup",n),e.removeEventListener("touchstart",i),e.removeEventListener("touchmove",s),e.removeEventListener("touchend",d)}},[e,r,t]),a.current}var Sl=function(){return vo};function o5(e){var t=e.highlightedIndex,o=e.isOpen,a=e.itemRefs,r=e.getItemNodeFromIndex,l=e.menuElement,n=e.scrollIntoView,i=re.useRef(!0);return Au(function(){t<0||!o||!Object.keys(a.current).length||(i.current===!1?i.current=!0:n(r(t),l))},[t]),i}var Rl=vo;function Ta(e,t,o){var a;o===void 0&&(o=!0);var r=((a=e.items)==null?void 0:a.length)&&t>=0;return X({isOpen:!1,highlightedIndex:-1},r&&X({selectedItem:e.items[t],isOpen:I1(e,"isOpen",Ue),highlightedIndex:I1(e,"highlightedIndex",Ue)},o&&{inputValue:e.itemToString(e.items[t])}))}function a5(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Va(e){var t=I1(e,"highlightedIndex",Ue);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function Fu(e){var t=st(e,"highlightedIndex",Ue);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function r5(e,t,o,a){var r=o.type,l;switch(r){case a.ItemMouseMove:l={highlightedIndex:o.disabled?-1:o.index};break;case a.MenuMouseLeave:l={highlightedIndex:-1};break;case a.ToggleButtonClick:case a.FunctionToggleMenu:l={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:dt(t,e,0)};break;case a.FunctionOpenMenu:l={isOpen:!0,highlightedIndex:dt(t,e,0)};break;case a.FunctionCloseMenu:l={isOpen:!1};break;case a.FunctionSetHighlightedIndex:l={highlightedIndex:t.isItemDisabled(t.items[o.highlightedIndex],o.highlightedIndex)?-1:o.highlightedIndex};break;case a.FunctionSetInputValue:l={inputValue:o.inputValue};break;case a.FunctionReset:l={highlightedIndex:Va(t),isOpen:I1(t,"isOpen",Ue),selectedItem:I1(t,"selectedItem",Ue),inputValue:I1(t,"inputValue",Ue)};break;default:throw new Error("Reducer called without proper action type.")}return X({},e,l)}var $u=X({},mo,{items:K.default.array.isRequired,isItemDisabled:K.default.func}),Nu=X({},ho,{isItemDisabled:function(){return!1}});function Uu(e){for(var t=e.keysSoFar,o=e.highlightedIndex,a=e.items,r=e.itemToString,l=e.isItemDisabled,n=t.toLowerCase(),i=0;i<a.length;i++){var s=(i+o+(t.length<2?1:0))%a.length,d=a[s];if(d!==void 0&&r(d).toLowerCase().startsWith(n)&&!l(d,s))return s}return o}var Ha=0,Hl=1,kl=2,_a=3,Pl=4,Tl=5,Vl=6,_l=7,Dl=8,Ol=9,Bl=10,Da=11,l5=12,n5=13,El=14,i5=15,s5=16,d5=17,u5=18,Al=19,Ll=20,c5=21,f5=Object.freeze({__proto__:null,FunctionCloseMenu:d5,FunctionOpenMenu:s5,FunctionReset:c5,FunctionSelectItem:Al,FunctionSetHighlightedIndex:u5,FunctionSetInputValue:Ll,FunctionToggleMenu:i5,ItemClick:El,ItemMouseMove:n5,MenuMouseLeave:l5,ToggleButtonBlur:Da,ToggleButtonClick:Ha,ToggleButtonKeyDownArrowDown:Hl,ToggleButtonKeyDownArrowUp:kl,ToggleButtonKeyDownCharacter:_a,ToggleButtonKeyDownEnd:Vl,ToggleButtonKeyDownEnter:_l,ToggleButtonKeyDownEscape:Pl,ToggleButtonKeyDownHome:Tl,ToggleButtonKeyDownPageDown:Bl,ToggleButtonKeyDownPageUp:Ol,ToggleButtonKeyDownSpaceButton:Dl});function qu(e,t,o){var a,r=o.type,l=o.altKey,n;switch(r){case El:n={isOpen:I1(t,"isOpen",Ue),highlightedIndex:Va(t),selectedItem:t.items[o.index]};break;case _a:{var i=o.key,s=""+e.inputValue+i,d=!e.isOpen&&e.selectedItem?t.items.findIndex(function(x){return t.itemToKey(x)===t.itemToKey(e.selectedItem)}):e.highlightedIndex,u=Uu({keysSoFar:s,highlightedIndex:d,items:t.items,itemToString:t.itemToString,isItemDisabled:t.isItemDisabled});n={inputValue:s,highlightedIndex:u,isOpen:!0}}break;case Hl:{var c=e.isOpen?G1(e.highlightedIndex,1,t.items,t.isItemDisabled):l&&e.selectedItem==null?-1:dt(t,e,1);n={highlightedIndex:c,isOpen:!0}}break;case kl:if(e.isOpen&&l)n=Ta(t,e.highlightedIndex,!1);else{var f=e.isOpen?G1(e.highlightedIndex,-1,t.items,t.isItemDisabled):dt(t,e,-1);n={highlightedIndex:f,isOpen:!0}}break;case _l:case Dl:n=Ta(t,e.highlightedIndex,!1);break;case Tl:n={highlightedIndex:Et(0,!1,t.items,t.isItemDisabled),isOpen:!0};break;case Vl:n={highlightedIndex:Et(t.items.length-1,!0,t.items,t.isItemDisabled),isOpen:!0};break;case Ol:n={highlightedIndex:G1(e.highlightedIndex,-10,t.items,t.isItemDisabled)};break;case Bl:n={highlightedIndex:G1(e.highlightedIndex,10,t.items,t.isItemDisabled)};break;case Pl:n={isOpen:!1,highlightedIndex:-1};break;case Da:n=X({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&{selectedItem:t.items[e.highlightedIndex]});break;case Al:n={selectedItem:o.selectedItem};break;default:return r5(e,t,o,f5)}return X({},e,n)}var zu=X({},re),p5=zu.useId,C5=typeof p5=="function"?ju:Ku;function ju(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,l=e.toggleButtonId,n=e.inputId,i="downshift-"+p5();t||(t=i);var s=re.useMemo(function(){return{labelId:o??t+"-label",menuId:a??t+"-menu",getItemId:r??function(d){return t+"-item-"+d},toggleButtonId:l??t+"-toggle-button",inputId:n??t+"-input"}},[r,t,n,o,a,l]);return s}function Ku(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,l=e.toggleButtonId,n=e.inputId,i=re.useRef(t??"downshift-"+X0()),s=i.current,d=re.useMemo(function(){return{labelId:o??s+"-label",menuId:a??s+"-menu",getItemId:r??function(u){return s+"-item-"+u},toggleButtonId:l??s+"-toggle-button",inputId:n??s+"-input"}},[r,n,o,a,l,s]);return d}var Gu=["onClick"],Wu=["onMouseLeave","refKey","ref"],Xu=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],Qu=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];Ea.stateChangeTypes=f5;function Ea(e){e===void 0&&(e={}),wl(e,Ea,$u);var t=X({},Nu,e),o=t.scrollIntoView,a=t.environment,r=t.getA11yStatusMessage,l=bl(qu,t,e5,a5),n=l[0],i=l[1],s=n.isOpen,d=n.highlightedIndex,u=n.selectedItem,c=n.inputValue,f=a1(null),x=a1(null),g=a1({}),b=a1(null),m=C5(t),M=go({state:n,props:t}),v=ae(function(_){return g.current[m.getItemId(_)]},[m]);yl(r,n,[s,d,u,c],a);var R=o5({menuElement:x.current,highlightedIndex:d,isOpen:s,itemRefs:g,scrollIntoView:o,getItemNodeFromIndex:v});w1(function(){return b.current=Vu(function(_){_({type:Ll,inputValue:""})},500),function(){b.current.cancel()}},[]),w1(function(){c&&b.current(i)},[i,c]),Rl({props:t,state:n}),w1(function(){var _=st(t,"isOpen",Ue);_&&f.current&&f.current.focus()},[]);var L=ae(function(){M.current.state.isOpen&&i({type:Da})},[i,M]),V=Bt(function(){return[x,f]},[]),B=t5(a,L,V),z=Sl("getMenuProps","getToggleButtonProps");w1(function(){s||(g.current={})},[s]);var y=Bt(function(){return{ArrowDown:function(A){A.preventDefault(),i({type:Hl,altKey:A.altKey})},ArrowUp:function(A){A.preventDefault(),i({type:kl,altKey:A.altKey})},Home:function(A){A.preventDefault(),i({type:Tl})},End:function(A){A.preventDefault(),i({type:Vl})},Escape:function(){M.current.state.isOpen&&i({type:Pl})},Enter:function(A){A.preventDefault(),i({type:M.current.state.isOpen?_l:Ha})},PageUp:function(A){M.current.state.isOpen&&(A.preventDefault(),i({type:Ol}))},PageDown:function(A){M.current.state.isOpen&&(A.preventDefault(),i({type:Bl}))}," ":function(A){A.preventDefault();var E=M.current.state;if(!E.isOpen){i({type:Ha});return}E.inputValue?i({type:_a,key:" "}):i({type:Dl})}}},[i,M]),H=ae(function(){i({type:i5})},[i]),j=ae(function(){i({type:d5})},[i]),N=ae(function(){i({type:s5})},[i]),J=ae(function(_){i({type:u5,highlightedIndex:_})},[i]),D=ae(function(_){i({type:Al,selectedItem:_})},[i]),q=ae(function(){i({type:c5})},[i]),S=ae(function(_){i({type:Ll,inputValue:_})},[i]),w=ae(function(_){var A=_===void 0?{}:_,E=A.onClick,C=Ne(A,Gu),h=function(){var O;(O=f.current)==null||O.focus()};return X({id:m.labelId,htmlFor:m.toggleButtonId,onClick:xe(E,h)},C)},[m]),I=ae(function(_,A){var E,C=_===void 0?{}:_,h=C.onMouseLeave,T=C.refKey,O=T===void 0?"ref":T,Z=C.ref,Q=Ne(C,Wu),le=A===void 0?{}:A,Y=le.suppressRefError,se=Y===void 0?!1:Y,de=function(){i({type:l5})};return z("getMenuProps",se,O,x),X((E={},E[O]=k1(Z,function(ie){x.current=ie}),E.id=m.menuId,E.role="listbox",E["aria-labelledby"]=Q&&Q["aria-label"]?void 0:""+m.labelId,E.onMouseLeave=xe(h,de),E),Q)},[i,z,m]),p=ae(function(_,A){var E,C=_===void 0?{}:_,h=C.onBlur,T=C.onClick;C.onPress;var O=C.onKeyDown,Z=C.refKey,Q=Z===void 0?"ref":Z,le=C.ref,Y=Ne(C,Xu),se=A===void 0?{}:A,de=se.suppressRefError,ie=de===void 0?!1:de,ce=M.current.state,ge=function(){i({type:Ha})},ke=function(){ce.isOpen&&!B.isMouseDown&&i({type:Da})},P1=function(De){var Xe=Pa(De);Xe&&y[Xe]?y[Xe](De):Zu(Xe)&&i({type:_a,key:Xe})},Pe=X((E={},E[Q]=k1(le,function(ze){f.current=ze}),E["aria-activedescendant"]=ce.isOpen&&ce.highlightedIndex>-1?m.getItemId(ce.highlightedIndex):"",E["aria-controls"]=m.menuId,E["aria-expanded"]=M.current.state.isOpen,E["aria-haspopup"]="listbox",E["aria-labelledby"]=Y&&Y["aria-label"]?void 0:""+m.labelId,E.id=m.toggleButtonId,E.role="combobox",E.tabIndex=0,E.onBlur=xe(h,ke),E),Y);return Y.disabled||(Pe.onClick=xe(T,ge),Pe.onKeyDown=xe(O,P1)),z("getToggleButtonProps",ie,Q,f),Pe},[i,m,M,B,z,y]),U=ae(function(_){var A,E=_===void 0?{}:_,C=E.item,h=E.index,T=E.onMouseMove,O=E.onClick,Z=E.onMouseDown;E.onPress;var Q=E.refKey,le=Q===void 0?"ref":Q,Y=E.disabled,se=E.ref,de=Ne(E,Qu);Y!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var ie=M.current,ce=ie.state,ge=ie.props,ke=Ml(C,h,ge.items,"Pass either item or index to getItemProps!"),P1=ke[0],Pe=ke[1],ze=ge.isItemDisabled(P1,Pe),De=function(){B.isTouchEnd||Pe===ce.highlightedIndex||(R.current=!1,i({type:n5,index:Pe,disabled:ze}))},Xe=function(){i({type:El,index:Pe})},Zt=function(Ft){return Ft.preventDefault()},Oe=X((A={},A[le]=k1(se,function(r1){r1&&(g.current[m.getItemId(Pe)]=r1)}),A["aria-disabled"]=ze,A["aria-selected"]=P1===ce.selectedItem,A.id=m.getItemId(Pe),A.role="option",A),de);return ze||(Oe.onClick=xe(O,Xe)),Oe.onMouseMove=xe(T,De),Oe.onMouseDown=xe(Z,Zt),Oe},[M,m,B,R,i]);return{getToggleButtonProps:p,getLabelProps:w,getMenuProps:I,getItemProps:U,toggleMenu:H,openMenu:N,closeMenu:j,setHighlightedIndex:J,selectItem:D,reset:q,setInputValue:S,highlightedIndex:d,isOpen:s,selectedItem:u,inputValue:c}}var Zl=0,Fl=1,$l=2,Nl=3,Ul=4,ql=5,zl=6,jl=7,Kl=8,Oa=9,Gl=10,m5=11,h5=12,Wl=13,g5=14,v5=15,x5=16,L5=17,w5=18,Xl=19,I5=20,b5=21,Ql=22,M5=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:Ql,FunctionCloseMenu:L5,FunctionOpenMenu:x5,FunctionReset:b5,FunctionSelectItem:Xl,FunctionSetHighlightedIndex:w5,FunctionSetInputValue:I5,FunctionToggleMenu:v5,InputBlur:Oa,InputChange:Kl,InputClick:Gl,InputKeyDownArrowDown:Zl,InputKeyDownArrowUp:Fl,InputKeyDownEnd:Ul,InputKeyDownEnter:jl,InputKeyDownEscape:$l,InputKeyDownHome:Nl,InputKeyDownPageDown:zl,InputKeyDownPageUp:ql,ItemClick:Wl,ItemMouseMove:h5,MenuMouseLeave:m5,ToggleButtonClick:g5});function Ju(e){var t=e5(e),o=t.selectedItem,a=t.inputValue;return a===""&&o&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(a=e.itemToString(o)),X({},t,{inputValue:a})}var Yu=X({},mo,{items:K.default.array.isRequired,isItemDisabled:K.default.func,inputValue:K.default.string,defaultInputValue:K.default.string,initialInputValue:K.default.string,inputId:K.default.string,onInputValueChange:K.default.func});function e4(e,t,o,a){var r=a1(),l=Y0(e,t,o,a),n=l[0],i=l[1],s=Ba();return w1(function(){if(_u(t,"selectedItem")){if(!s){var d=t.itemToKey(t.selectedItem)!==t.itemToKey(r.current);d&&i({type:Ql,inputValue:t.itemToString(t.selectedItem)})}r.current=n.selectedItem===r.current?t.selectedItem:n.selectedItem}},[n.selectedItem,t.selectedItem]),[ka(n,t),i]}var t4=X({},ho,{isItemDisabled:function(){return!1}});function o4(e,t,o){var a,r=o.type,l=o.altKey,n;switch(r){case Wl:n={isOpen:I1(t,"isOpen",Ue),highlightedIndex:Va(t),selectedItem:t.items[o.index],inputValue:t.itemToString(t.items[o.index])};break;case Zl:e.isOpen?n={highlightedIndex:G1(e.highlightedIndex,1,t.items,t.isItemDisabled,!0)}:n={highlightedIndex:l&&e.selectedItem==null?-1:dt(t,e,1),isOpen:t.items.length>=0};break;case Fl:e.isOpen?l?n=Ta(t,e.highlightedIndex):n={highlightedIndex:G1(e.highlightedIndex,-1,t.items,t.isItemDisabled,!0)}:n={highlightedIndex:dt(t,e,-1),isOpen:t.items.length>=0};break;case jl:n=Ta(t,e.highlightedIndex);break;case $l:n=X({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case ql:n={highlightedIndex:G1(e.highlightedIndex,-10,t.items,t.isItemDisabled,!0)};break;case zl:n={highlightedIndex:G1(e.highlightedIndex,10,t.items,t.isItemDisabled,!0)};break;case Nl:n={highlightedIndex:Et(0,!1,t.items,t.isItemDisabled)};break;case Ul:n={highlightedIndex:Et(t.items.length-1,!0,t.items,t.isItemDisabled)};break;case Oa:n=X({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&o.selectItem&&{selectedItem:t.items[e.highlightedIndex],inputValue:t.itemToString(t.items[e.highlightedIndex])});break;case Kl:n={isOpen:!0,highlightedIndex:Va(t),inputValue:o.inputValue};break;case Gl:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:dt(t,e,0)};break;case Xl:n={selectedItem:o.selectedItem,inputValue:t.itemToString(o.selectedItem)};break;case Ql:n={inputValue:o.inputValue};break;default:return r5(e,t,o,M5)}return X({},e,n)}var a4=["onMouseLeave","refKey","ref"],r4=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],l4=["onClick","onPress","refKey","ref"],n4=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];y5.stateChangeTypes=M5;function y5(e){e===void 0&&(e={}),wl(e,y5,Yu);var t=X({},t4,e),o=t.items,a=t.scrollIntoView,r=t.environment,l=t.getA11yStatusMessage,n=e4(o4,t,Ju,a5),i=n[0],s=n[1],d=i.isOpen,u=i.highlightedIndex,c=i.selectedItem,f=i.inputValue,x=a1(null),g=a1({}),b=a1(null),m=a1(null),M=Ba(),v=C5(t),R=a1(),L=go({state:i,props:t}),V=ae(function(h){return g.current[v.getItemId(h)]},[v]);yl(l,i,[d,u,c,f],r);var B=o5({menuElement:x.current,highlightedIndex:u,isOpen:d,itemRefs:g,scrollIntoView:a,getItemNodeFromIndex:V});Rl({props:t,state:i}),w1(function(){var h=st(t,"isOpen",Ue);h&&b.current&&b.current.focus()},[]),w1(function(){M||(R.current=o.length)});var z=ae(function(){L.current.state.isOpen&&s({type:Oa})},[s,L]),y=Bt(function(){return[x,m,b]},[]),H=t5(r,z,y),j=Sl("getInputProps","getMenuProps");w1(function(){d||(g.current={})},[d]),w1(function(){var h;!d||!(r!=null&&r.document)||!(b!=null&&(h=b.current)!=null&&h.focus)||r.document.activeElement!==b.current&&b.current.focus()},[d,r]);var N=Bt(function(){return{ArrowDown:function(T){T.preventDefault(),s({type:Zl,altKey:T.altKey})},ArrowUp:function(T){T.preventDefault(),s({type:Fl,altKey:T.altKey})},Home:function(T){L.current.state.isOpen&&(T.preventDefault(),s({type:Nl}))},End:function(T){L.current.state.isOpen&&(T.preventDefault(),s({type:Ul}))},Escape:function(T){var O=L.current.state;(O.isOpen||O.inputValue||O.selectedItem||O.highlightedIndex>-1)&&(T.preventDefault(),s({type:$l}))},Enter:function(T){var O=L.current.state;!O.isOpen||T.which===229||(T.preventDefault(),s({type:jl}))},PageUp:function(T){L.current.state.isOpen&&(T.preventDefault(),s({type:ql}))},PageDown:function(T){L.current.state.isOpen&&(T.preventDefault(),s({type:zl}))}}},[s,L]),J=ae(function(h){return X({id:v.labelId,htmlFor:v.inputId},h)},[v]),D=ae(function(h,T){var O,Z=h===void 0?{}:h,Q=Z.onMouseLeave,le=Z.refKey,Y=le===void 0?"ref":le,se=Z.ref,de=Ne(Z,a4),ie=T===void 0?{}:T,ce=ie.suppressRefError,ge=ce===void 0?!1:ce;return j("getMenuProps",ge,Y,x),X((O={},O[Y]=k1(se,function(ke){x.current=ke}),O.id=v.menuId,O.role="listbox",O["aria-labelledby"]=de&&de["aria-label"]?void 0:""+v.labelId,O.onMouseLeave=xe(Q,function(){s({type:m5})}),O),de)},[s,j,v]),q=ae(function(h){var T,O,Z=h===void 0?{}:h,Q=Z.item,le=Z.index,Y=Z.refKey,se=Y===void 0?"ref":Y,de=Z.ref,ie=Z.onMouseMove,ce=Z.onMouseDown,ge=Z.onClick;Z.onPress;var ke=Z.disabled,P1=Ne(Z,r4);ke!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var Pe=L.current,ze=Pe.props,De=Pe.state,Xe=Ml(Q,le,ze.items,"Pass either item or index to getItemProps!"),Zt=Xe[0],Oe=Xe[1],r1=ze.isItemDisabled(Zt,Oe),Ft="onClick",Io=ge,T1=function(){H.isTouchEnd||Oe===De.highlightedIndex||(B.current=!1,s({type:h5,index:Oe,disabled:r1}))},X1=function(){s({type:Wl,index:Oe})},V1=function(z5){return z5.preventDefault()};return X((T={},T[se]=k1(de,function(l1){l1&&(g.current[v.getItemId(Oe)]=l1)}),T["aria-disabled"]=r1,T["aria-selected"]=Oe===De.highlightedIndex,T.id=v.getItemId(Oe),T.role="option",T),!r1&&(O={},O[Ft]=xe(Io,X1),O),{onMouseMove:xe(ie,T1),onMouseDown:xe(ce,V1)},P1)},[s,v,L,H,B]),S=ae(function(h){var T,O=h===void 0?{}:h,Z=O.onClick;O.onPress;var Q=O.refKey,le=Q===void 0?"ref":Q,Y=O.ref,se=Ne(O,l4),de=L.current.state,ie=function(){s({type:g5})};return X((T={},T[le]=k1(Y,function(ce){m.current=ce}),T["aria-controls"]=v.menuId,T["aria-expanded"]=de.isOpen,T.id=v.toggleButtonId,T.tabIndex=-1,T),!se.disabled&&X({},{onClick:xe(Z,ie)}),se)},[s,L,v]),w=ae(function(h,T){var O,Z=h===void 0?{}:h,Q=Z.onKeyDown,le=Z.onChange,Y=Z.onInput,se=Z.onBlur;Z.onChangeText;var de=Z.onClick,ie=Z.refKey,ce=ie===void 0?"ref":ie,ge=Z.ref,ke=Ne(Z,n4),P1=T===void 0?{}:T,Pe=P1.suppressRefError,ze=Pe===void 0?!1:Pe;j("getInputProps",ze,ce,b);var De=L.current.state,Xe=function(V1){var l1=Pa(V1);l1&&N[l1]&&N[l1](V1)},Zt=function(V1){s({type:Kl,inputValue:V1.target.value})},Oe=function(V1){if(r!=null&&r.document&&De.isOpen&&!H.isMouseDown){var l1=V1.relatedTarget===null&&r.document.activeElement!==r.document.body;s({type:Oa,selectItem:!l1})}},r1=function(){s({type:Gl})},Ft="onChange",Io={};if(!ke.disabled){var T1;Io=(T1={},T1[Ft]=xe(le,Y,Zt),T1.onKeyDown=xe(Q,Xe),T1.onBlur=xe(se,Oe),T1.onClick=xe(de,r1),T1)}return X((O={},O[ce]=k1(ge,function(X1){b.current=X1}),O["aria-activedescendant"]=De.isOpen&&De.highlightedIndex>-1?v.getItemId(De.highlightedIndex):"",O["aria-autocomplete"]="list",O["aria-controls"]=v.menuId,O["aria-expanded"]=De.isOpen,O["aria-labelledby"]=ke&&ke["aria-label"]?void 0:v.labelId,O.autoComplete="off",O.id=v.inputId,O.role="combobox",O.value=De.inputValue,O),Io,ke)},[s,v,r,N,L,H,j]),I=ae(function(){s({type:v5})},[s]),p=ae(function(){s({type:L5})},[s]),U=ae(function(){s({type:x5})},[s]),_=ae(function(h){s({type:w5,highlightedIndex:h})},[s]),A=ae(function(h){s({type:Xl,selectedItem:h})},[s]),E=ae(function(h){s({type:I5,inputValue:h})},[s]),C=ae(function(){s({type:b5})},[s]);return{getItemProps:q,getLabelProps:J,getMenuProps:D,getInputProps:w,getToggleButtonProps:S,toggleMenu:I,openMenu:U,closeMenu:p,setHighlightedIndex:_,setInputValue:E,selectItem:A,reset:C,highlightedIndex:u,isOpen:d,selectedItem:c,inputValue:f}}var S5={activeIndex:-1,selectedItems:[]};function K0(e,t){return st(e,t,S5)}function G0(e,t){return I1(e,t,S5)}function i4(e){var t=K0(e,"activeIndex"),o=K0(e,"selectedItems");return{activeIndex:t,selectedItems:o}}function W0(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function s4(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var kw={stateReducer:mo.stateReducer,itemToKey:mo.itemToKey,environment:mo.environment,selectedItems:K.default.array,initialSelectedItems:K.default.array,defaultSelectedItems:K.default.array,getA11yStatusMessage:K.default.func,activeIndex:K.default.number,initialActiveIndex:K.default.number,defaultActiveIndex:K.default.number,onActiveIndexChange:K.default.func,onSelectedItemsChange:K.default.func,keyNavigationNext:K.default.string,keyNavigationPrevious:K.default.string},d4={itemToKey:ho.itemToKey,stateReducer:ho.stateReducer,environment:ho.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},u4=vo,Jl=0,Yl=1,e9=2,t9=3,o9=4,a9=5,r9=6,l9=7,n9=8,i9=9,s9=10,d9=11,u9=12,c4=Object.freeze({__proto__:null,DropdownClick:l9,DropdownKeyDownBackspace:r9,DropdownKeyDownNavigationPrevious:a9,FunctionAddSelectedItem:n9,FunctionRemoveSelectedItem:i9,FunctionReset:u9,FunctionSetActiveIndex:d9,FunctionSetSelectedItems:s9,SelectedItemClick:Jl,SelectedItemKeyDownBackspace:e9,SelectedItemKeyDownDelete:Yl,SelectedItemKeyDownNavigationNext:t9,SelectedItemKeyDownNavigationPrevious:o9});function f4(e,t,o){var a=o.type,r=o.index,l=o.selectedItem,n=e.activeIndex,i=e.selectedItems,s;switch(a){case Jl:s={activeIndex:r};break;case o9:s={activeIndex:n-1<0?0:n-1};break;case t9:s={activeIndex:n+1>=i.length?-1:n+1};break;case e9:case Yl:{if(n<0)break;var d=n;i.length===1?d=-1:n===i.length-1&&(d=i.length-2),s=X({selectedItems:[].concat(i.slice(0,n),i.slice(n+1))},{activeIndex:d});break}case a9:s={activeIndex:i.length-1};break;case r9:s={selectedItems:i.slice(0,i.length-1)};break;case n9:s={selectedItems:[].concat(i,[l])};break;case l9:s={activeIndex:-1};break;case i9:{var u=n,c=i.findIndex(function(g){return t.itemToKey(g)===t.itemToKey(l)});if(c<0)break;i.length===1?u=-1:c===i.length-1&&(u=i.length-2),s={selectedItems:[].concat(i.slice(0,c),i.slice(c+1)),activeIndex:u};break}case s9:{var f=o.selectedItems;s={selectedItems:f};break}case d9:{var x=o.activeIndex;s={activeIndex:x};break}case u9:s={activeIndex:G0(t,"activeIndex"),selectedItems:G0(t,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return X({},e,s)}var p4=["refKey","ref","onClick","onKeyDown","selectedItem","index"],C4=["refKey","ref","onKeyDown","onClick","preventKeyAction"];R5.stateChangeTypes=c4;function R5(e){e===void 0&&(e={}),u4(e,R5);var t=X({},d4,e),o=t.getA11yStatusMessage,a=t.environment,r=t.keyNavigationNext,l=t.keyNavigationPrevious,n=bl(f4,t,i4,s4),i=n[0],s=n[1],d=i.activeIndex,u=i.selectedItems,c=Ba(),f=a1(null),x=a1();x.current=[];var g=go({state:i,props:t});yl(o,i,[d,u],a),w1(function(){c||(d===-1&&f.current?f.current.focus():x.current[d]&&x.current[d].focus())},[d]),Rl({props:t,state:i});var b=Sl("getDropdownProps"),m=Bt(function(){var H;return H={},H[l]=function(){s({type:o9})},H[r]=function(){s({type:t9})},H.Delete=function(){s({type:Yl})},H.Backspace=function(){s({type:e9})},H},[s,r,l]),M=Bt(function(){var H;return H={},H[l]=function(j){W0(j)&&s({type:a9})},H.Backspace=function(N){W0(N)&&s({type:r9})},H},[s,l]),v=ae(function(H){var j,N=H===void 0?{}:H,J=N.refKey,D=J===void 0?"ref":J,q=N.ref,S=N.onClick,w=N.onKeyDown,I=N.selectedItem,p=N.index,U=Ne(N,p4),_=g.current.state,A=Ml(I,p,_.selectedItems,"Pass either item or index to getSelectedItemProps!"),E=A[1],C=E>-1&&E===_.activeIndex,h=function(){s({type:Jl,index:E})},T=function(Z){var Q=Pa(Z);Q&&m[Q]&&m[Q](Z)};return X((j={},j[D]=k1(q,function(O){O&&x.current.push(O)}),j.tabIndex=C?0:-1,j.onClick=xe(S,h),j.onKeyDown=xe(w,T),j),U)},[s,g,m]),R=ae(function(H,j){var N,J=H===void 0?{}:H,D=J.refKey,q=D===void 0?"ref":D,S=J.ref,w=J.onKeyDown,I=J.onClick,p=J.preventKeyAction,U=p===void 0?!1:p,_=Ne(J,C4),A=j===void 0?{}:j,E=A.suppressRefError,C=E===void 0?!1:E;b("getDropdownProps",C,q,f);var h=function(Z){var Q=Pa(Z);Q&&M[Q]&&M[Q](Z)},T=function(){s({type:l9})};return X((N={},N[q]=k1(S,function(O){O&&(f.current=O)}),N),!U&&{onKeyDown:xe(w,h),onClick:xe(I,T)},_)},[s,M,b]),L=ae(function(H){s({type:n9,selectedItem:H})},[s]),V=ae(function(H){s({type:i9,selectedItem:H})},[s]),B=ae(function(H){s({type:s9,selectedItems:H})},[s]),z=ae(function(H){s({type:d9,activeIndex:H})},[s]),y=ae(function(){s({type:u9})},[s]);return{getSelectedItemProps:v,getDropdownProps:R,addSelectedItem:L,removeSelectedItem:V,setSelectedItems:B,setActiveIndex:z,reset:y,selectedItems:u,activeIndex:d}}var c9=0,f9=1,p9=2,C9=3,m9=4,h9=5,g9=6,m4=Object.freeze({__proto__:null,FunctionAddItem:g9,TagClick:c9,TagGroupKeyDownArrowLeft:f9,TagGroupKeyDownArrowRight:p9,TagGroupKeyDownBackspace:m9,TagGroupKeyDownDelete:C9,TagRemoveClick:h9});function h4(e,t,o){var a=o.type,r;switch(a){case c9:r={activeIndex:o.index};break;case f9:r={activeIndex:e.activeIndex===0?e.items.length-1:e.activeIndex-1};break;case p9:r={activeIndex:e.activeIndex===e.items.length-1?0:e.activeIndex+1};break;case m9:case C9:{var l=[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),n=l.length===0?-1:l.length===e.activeIndex?e.activeIndex-1:e.activeIndex;r={items:[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),activeIndex:n};break}case h9:{var i=[].concat(e.items.slice(0,o.index),e.items.slice(o.index+1)),s=i.length===0?-1:i.length===o.index?o.index-1:o.index;r={items:i,activeIndex:s}}break;case g9:{var d=[];o.index===void 0?d=[].concat(e.items,[o.item]):d=[].concat(e.items.slice(0,o.index),[o.item],e.items.slice(o.index));var u=e.activeIndex===-1?d.length-1:e.activeIndex;r={items:d,activeIndex:u};break}default:throw new Error("Invalid useTagGroup reducer action.")}return X({},e,r)}var g4=X({},re),H5=g4.useId,v4=typeof H5=="function"?x4:L4;function x4(e){var t=e.id,o=e.tagGroupId,a=e.getTagId,r="downshift-"+H5();t||(t=r);var l=re.useMemo(function(){return{tagGroupId:o??t+"-tag-group",getTagId:a??function(n){return t+"-tag-"+n}}},[a,t,o]);return l}function L4(e){var t=e.id,o=e.getTagId,a=e.tagGroupId,r=re.useRef(t??"downshift-"+X0()),l=r.current,n=re.useMemo(function(){return{tagGroupId:a??l+"-tag-group",getTagId:o??function(i){return l+"-tag-"+i}}},[o,l,a]);return n}function w4(e){var t,o,a,r,l=(t=(o=e.items)!=null?o:e.initialItems)!=null?t:[],n=(a=(r=e.activeIndex)!=null?r:e.initialActiveIndex)!=null?a:l.length===0?-1:0;return{activeIndex:n,items:l}}function I4(e,t){return e.activeIndex===t.activeIndex&&e.items===t.items}var k5="tag-group-a11y-description";function b4(e,t){re.useEffect(function(){if(e){var o=e.createElement("div");return o.setAttribute("id",k5),o.style.display="none",o.textContent=t,e.body.appendChild(o),function(){o.remove()}}},[t,e])}function M4(e){return X({stateReducer:function(o,a){var r=a.changes;return r},environment:typeof window>"u"?void 0:window,removeElementDescription:"Press Delete or Backspace to remove tag."},e)}function y4(e,t,o){var a=re.useRef({}),r=re.useRef(e),l=re.useRef(t);return re.useEffect(function(){if(e!==-1&&r.current!==-1&&e!==r.current||l.current===t+1){var n;(n=a.current[o(e)])==null||n.focus()}r.current=e,l.current=t},[e,o,t]),a}var S4={isItemDisabled:K.default.func},R4=["onKeyDown"],H4=["index","refKey","ref","onClick"],k4=["index","onClick"],P5=function(t){var o;t===void 0&&(t={}),wl(t,P5,S4);var a=M4(t),r=bl(h4,a,w4,I4),l=r[0],n=r[1],i=l.activeIndex,s=l.items,d=go({state:l,props:a}),u=v4({getTagId:a.getTagId,id:a.id,tagGroupId:a.tagGroupId});b4((o=a.environment)==null?void 0:o.document,a.removeElementDescription);var c=y4(i,s.length,u.getTagId),f=ae(function(m){var M=m??{},v=M.onKeyDown,R=Ne(M,R4),L=function(z){switch(z.key){case"ArrowLeft":n({type:f9});break;case"ArrowRight":n({type:p9});break;case"Delete":n({type:C9});break;case"Backspace":n({type:m9});break}},V=X({id:u.tagGroupId,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions",role:"listbox",onKeyDown:xl(v,L)},R);return V},[n,u.tagGroupId]),x=ae(function(m){var M,v=m.index,R=m.refKey,L=R===void 0?"ref":R,V=m.ref,B=m.onClick,z=Ne(m,H4);if(!Number.isInteger(v)||v<0)throw new Error("Pass correct item index to getTagProps!");var y=d.current.state,H=function(){n({type:c9,index:v})},j=u.getTagId(v);return X((M={"aria-describedby":k5},M[L]=Ru(V,function(N){N&&(c.current[j]=N)}),M["aria-labelledby"]=j,M.role="option",M.id=j,M.onClick=xl(B,H),M.tabIndex=y.activeIndex===v?0:-1,M),z)},[n,u,d,c]),g=ae(function(m){var M=m.index,v=m.onClick,R=Ne(m,k4);if(!Number.isInteger(M)||M<0)throw new Error("Pass correct item index to getTagRemoveProps!");var L=function(y){y.stopPropagation(),n({type:h9,index:M})},V=u.getTagId(M),B=V+"-remove";return X({id:B,tabIndex:-1,"aria-labelledby":B+" "+V,onClick:xl(v,L)},R)},[u,n]),b=ae(function(m,M){n({type:g9,item:m,index:M})},[n]);return{activeIndex:i,addItem:b,getTagGroupProps:f,getTagProps:x,getTagRemoveProps:g,items:s}};P5.stateChangeTypes=m4;import xo from"react";import{createPortal as P4}from"react-dom";import{jsx as ut,jsxs as T5}from"react/jsx-runtime";var T4=260,Aa=4,V4=ut(U9,{width:9,height:9}),_4=ut(q9,{width:9,height:9});function D4(e){let t=e.getBoundingClientRect(),o=Yt(e),a=o?o.getBoundingClientRect():{top:0,bottom:window.innerHeight},r=a.bottom-t.bottom-Aa,l=t.top-a.top-Aa,n=r<T4&&l>r;return{top:n?t.top-Aa:t.bottom+Aa,left:t.left,width:t.width,openAbove:n}}function At({label:e,options:t,selectedItem:o,onChange:a,id:r="picklist",getOptionStyle:l,getTriggerStyle:n}){let[i,s]=xo.useState({top:0,left:0,width:0,openAbove:!1}),d=xo.useRef(null),u=`${r}-legend`,{isOpen:c,closeMenu:f,highlightedIndex:x,getToggleButtonProps:g,getMenuProps:b,getItemProps:m}=Ea({items:t,itemToString:V=>V?V.label:"",selectedItem:o,onSelectedItemChange:({selectedItem:V})=>{typeof a=="function"&&V&&V.value!==o?.value&&a(V.value)},onIsOpenChange:({isOpen:V})=>{V&&d.current&&s(D4(d.current))},id:r,labelId:u});xo.useEffect(()=>{if(!c||!d.current)return;let V=Yt(d.current);if(!V)return;let B=()=>f();return V.addEventListener("scroll",B,{passive:!0}),()=>V.removeEventListener("scroll",B)},[c,f]);let M="picklistEditor-dropdown"+(c?" picklistEditor-dropdown--open":""),v=c?{top:i.top,left:i.left,width:i.width,...i.openAbove?{transform:"translateY(-100%)"}:void 0}:void 0,[R,L]=xo.useState(null);return xo.useLayoutEffect(()=>{let B=d.current?.getRootNode();L(B instanceof ShadowRoot?B:document.body)},[]),ut(p1,{label:e,id:r,className:"picklistEditor-fieldset",children:T5("div",{className:"picklistEditor-wrapper",children:[T5("button",{type:"button",className:"picklistEditor-trigger",style:n?n(o):void 0,...g({ref:d}),children:[ut("span",{className:"picklistEditor-trigger-label",children:o?.label??"Default"}),ut("span",{className:"picklistEditor-trigger-chevron","aria-hidden":"true",children:c?_4:V4})]}),P4(ut("ul",{className:M,style:v,...b(),children:c&&t.map((V,B)=>ut("li",{className:"picklistEditor-option"+(x===B?" picklistEditor-option--highlighted":"")+(o?.value===V.value?" picklistEditor-option--selected":""),style:l?l(V):void 0,...m({item:V,index:B}),children:V.label},V.value||"default"))}),R??document.body)]})})}import{jsx as Z4}from"react/jsx-runtime";var O4=[{value:"",label:"Default"},{value:"Arial, sans-serif",label:"Arial"},{value:"Helvetica, sans-serif",label:"Helvetica"},{value:"Verdana, sans-serif",label:"Verdana"},{value:"Tahoma, sans-serif",label:"Tahoma"},{value:"'Trebuchet MS', sans-serif",label:"Trebuchet MS"},{value:"'Lucida Sans Unicode', sans-serif",label:"Lucida Sans"},{value:"Georgia, serif",label:"Georgia"},{value:"'Times New Roman', serif",label:"Times New Roman"},{value:"'Palatino Linotype', serif",label:"Palatino"},{value:"'Courier New', monospace",label:"Courier New"},{value:"'Lucida Console', monospace",label:"Lucida Console"}];function B4(e,t){if(!e)return null;let o=e.replace(/['"]/g,""),a=(o.split(",")[0]??"").trim();for(let r of t){if(!r.value)continue;let l=r.value.replace(/['"]/g,"");if(o.indexOf(l)!==-1||l.indexOf(a)!==-1)return r}return null}var E4=e=>e.value?{fontFamily:e.value}:void 0,A4=e=>e?.value?{fontFamily:e.value}:void 0;function V5({label:e="Font family",value:t,options:o,onChange:a,matchOption:r=B4,id:l="font-family",optionLabels:n}){let i=o??O4.map(d=>d.value===""?{...d,label:n?.default??d.label}:d),s=r(t,i)??i[0]??null;return Z4(At,{label:e,options:i,selectedItem:s,onChange:a,id:l,getOptionStyle:E4,getTriggerStyle:A4})}import{jsx as v9}from"react/jsx-runtime";var F4=[{value:"normal",labelKey:"normal",defaultLabel:"Normal",icon:v9(R9,{width:14,height:14})},{value:"italic",labelKey:"italic",defaultLabel:"Italic",icon:v9(S9,{width:14,height:14})}];function _5({label:e="Font Style",value:t,onChange:o,id:a="font-style",optionLabels:r}){let l=F4.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return v9(C1,{label:e,options:l,value:t||"normal",onChange:o,id:a})}import{jsx as q4}from"react/jsx-runtime";var $4=[{value:"",labelKey:"default",defaultWord:"Default"},{value:"100",labelKey:"thin",defaultWord:"Thin"},{value:"200",labelKey:"extraLight",defaultWord:"Extra Light"},{value:"300",labelKey:"light",defaultWord:"Light"},{value:"400",labelKey:"regular",defaultWord:"Regular"},{value:"500",labelKey:"medium",defaultWord:"Medium"},{value:"600",labelKey:"semiBold",defaultWord:"Semi Bold"},{value:"700",labelKey:"bold",defaultWord:"Bold"},{value:"800",labelKey:"extraBold",defaultWord:"Extra Bold"},{value:"900",labelKey:"black",defaultWord:"Black"}];function N4(e){return $4.map(t=>{let o=e?.[t.labelKey]??t.defaultWord;return{value:t.value,label:t.value?`${o} (${t.value})`:o}})}function U4(e,t){if(!e)return null;let o=String(e).trim();return t.find(a=>a.value===o)??null}function D5({label:e="Font weight",value:t,options:o,onChange:a,matchOption:r=U4,id:l="font-weight",optionLabels:n}){let i=o??N4(n),s=r(t,i)??i[0]??null;return q4(At,{label:e,options:i,selectedItem:s,onChange:a,id:l})}import{jsx as G4}from"react/jsx-runtime";var z4=[{value:"",labelKey:"default",defaultLabel:"Default"},{value:"visible",labelKey:"visible",defaultLabel:"Visible"},{value:"hidden",labelKey:"hidden",defaultLabel:"Hidden"},{value:"scroll",labelKey:"scroll",defaultLabel:"Scroll"},{value:"auto",labelKey:"auto",defaultLabel:"Auto"}];function j4(e){return z4.map(t=>({value:t.value,label:e?.[t.labelKey]??t.defaultLabel}))}function K4(e,t){if(!e)return null;let o=String(e).trim().toLowerCase();return t.find(a=>a.value===o)??null}function O5({label:e="Overflow",value:t,onChange:o,id:a="overflow",optionLabels:r}){let l=j4(r),n=K4(t,l)??l[0]??null;return G4(At,{label:e,options:l,selectedItem:n,onChange:o,id:a})}import{jsx as Lo}from"react/jsx-runtime";var W4=[{value:"left",labelKey:"left",defaultLabel:"Left",icon:Lo($9,{width:14,height:14})},{value:"center",labelKey:"center",defaultLabel:"Center",icon:Lo(Z9,{width:14,height:14})},{value:"right",labelKey:"right",defaultLabel:"Right",icon:Lo(N9,{width:14,height:14})},{value:"justify",labelKey:"justify",defaultLabel:"Justify",icon:Lo(F9,{width:14,height:14})}],X4={start:"left",end:"right"};function B5({label:e="Text Align",value:t,onChange:o,id:a="text-align",optionLabels:r}){let l=X4[t||""]||t||"left",n=W4.map(i=>({value:i.value,label:r?.[i.labelKey]??i.defaultLabel,icon:i.icon}));return Lo(C1,{label:e,options:n,value:l,onChange:o,id:a})}import{jsx as Za}from"react/jsx-runtime";var E5=[{value:"none",labelKey:"none",defaultLabel:"None",icon:Za(ct,{width:14,height:14})},{value:"underline",labelKey:"underline",defaultLabel:"Underline",icon:Za(z9,{width:14,height:14})},{value:"line-through",labelKey:"lineThrough",defaultLabel:"Line Through",icon:Za(A9,{width:14,height:14})}];function Q4(e){if(!e)return"none";for(let t of E5)if(e===t.value||e.startsWith(t.value+" "))return t.value;return"none"}function A5({label:e="Text Decoration",value:t,onChange:o,id:a="text-decoration",optionLabels:r}){let l=E5.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Za(C1,{label:e,options:l,value:Q4(t),onChange:o,id:a})}import{jsx as wo}from"react/jsx-runtime";var J4=[{value:"none",labelKey:"none",defaultLabel:"None",icon:wo(ct,{width:14,height:14})},{value:"uppercase",labelKey:"uppercase",defaultLabel:"Uppercase",icon:wo(_9,{width:14,height:14})},{value:"lowercase",labelKey:"lowercase",defaultLabel:"Lowercase",icon:wo(V9,{width:14,height:14})},{value:"capitalize",labelKey:"capitalize",defaultLabel:"Capitalize",icon:wo(T9,{width:14,height:14})}];function Z5({label:e="Text Transform",value:t,onChange:o,id:a="text-transform",optionLabels:r}){let l=J4.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return wo(C1,{label:e,options:l,value:t||"none",onChange:o,id:a})}var W1={CHANGED:"history-changed",COMMAND_PUSHED:"command-pushed",COMMAND_UNDONE:"command-undone",COMMAND_REDONE:"command-redone",CLEARED:"history-cleared"},Fa=class{constructor(t={}){Q1(this,"undoStack",[]);Q1(this,"redoStack",[]);Q1(this,"maxHistorySize");Q1(this,"listeners",new Set);Q1(this,"_isProcessing",!1);Q1(this,"commandExecutor");if(this.maxHistorySize=t.maxHistorySize??200,!t.commandExecutor)throw new Error("CommandExecutor is required");this.commandExecutor=t.commandExecutor}createCommand(t,o,a,r){return Object.freeze({id:this._generateCommandId(),type:t,oldValue:o,newValue:a,data:r})}_generateCommandId(){return`cmd-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}subscribe(t){if(typeof t!="function")throw new Error("Listener must be a function");return this.listeners.add(t),()=>{this.listeners.delete(t)}}_notify(t,o={}){if(this.listeners.size===0)return;let a=Object.freeze({type:t,timestamp:Date.now(),canUndo:this.canUndo(),canRedo:this.canRedo(),undoCount:this.getUndoCount(),redoCount:this.getRedoCount(),...o}),r=Array.from(this.listeners);for(let l of r)try{l(a)}catch(n){console.error("[HistoryManager] Error in listener:",n)}}pushCommand(t){if(!t||typeof t!="object")throw new Error("Invalid command: must be an object");if(!t.type)throw new Error("Invalid command: missing required fields (type)");if(this._isProcessing){console.warn("[HistoryManager] pushCommand called during processing, ignoring");return}this.undoStack.push(t),this.redoStack=[],this._trimStack(),this._notify(W1.COMMAND_PUSHED,{command:t}),this._notify(W1.CHANGED)}_trimStack(){if(this.undoStack.length>this.maxHistorySize){let t=this.undoStack.length-this.maxHistorySize;this.undoStack.splice(0,t)}}_applyCommand(t,o){if(!this.commandExecutor.canHandle(t.type))return console.warn("[HistoryManager] No executor for command type:",t.type),!1;try{return this.commandExecutor.execute(t,o)}catch(a){return console.error("[HistoryManager] Error applying command:",a,t),!1}}_createInverseCommand(t,o){let a=this.commandExecutor.getCurrentValue(t);return Object.freeze({id:this._generateCommandId(),type:t.type,oldValue:o?t.oldValue:a,newValue:o?a:t.newValue,data:t.data})}undo(){if(this._isProcessing)return console.warn("[HistoryManager] undo called during processing, ignoring"),!1;if(!this.canUndo())return!1;this._isProcessing=!0;try{let t=this.undoStack.pop(),o=this._applyCommand(t,!0);if(o){let a=this._createInverseCommand(t,!1);this.redoStack.push(a)}else this.undoStack.push(t),console.warn("[HistoryManager] Undo failed, command restored to stack");return this._notify(W1.COMMAND_UNDONE,{command:t,appliedValue:t.oldValue}),this._notify(W1.CHANGED),o}finally{this._isProcessing=!1}}redo(){if(this._isProcessing)return console.warn("[HistoryManager] redo called during processing, ignoring"),!1;if(!this.canRedo())return!1;this._isProcessing=!0;try{let t=this.redoStack.pop();if(!t)return console.warn("[HistoryManager] No command to redo"),!1;let o=this._applyCommand(t,!1);if(o){let a=this._createInverseCommand(t,!0);this.undoStack.push(a),this._trimStack()}else this.redoStack.push(t),console.warn("[HistoryManager] Redo failed, command restored to stack");return this._notify(W1.COMMAND_REDONE,{command:t,appliedValue:t.newValue}),this._notify(W1.CHANGED),o}finally{this._isProcessing=!1}}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}clear(){this.undoStack=[],this.redoStack=[],this._notify(W1.CLEARED),this._notify(W1.CHANGED)}getUndoCount(){return this.undoStack.length}getRedoCount(){return this.redoStack.length}getUndoStackSnapshot(){return this.undoStack.map(t=>({type:t.type,oldValue:t.oldValue,newValue:t.newValue,data:t.data}))}};var Y4=(e,t)=>{let o=t?e.oldValue:e.newValue;return typeof o=="string"?o:String(o??"")},F5=e=>{if(!e||typeof e!="object")return;let t=e;if(!(typeof t.sourceFile!="string"||typeof t.lineNumber!="number"||typeof t.columnNumber!="number"))return{sourceFile:t.sourceFile,lineNumber:t.lineNumber,columnNumber:t.columnNumber}},e8=e=>typeof e=="object"&&e!==null&&"property"in e&&typeof e.property=="string",$5=(e,t)=>{let o=new Map;return{execute:(a,r)=>{let l=Y4(a,r);o.set(a.id,l);try{if(a.type==="style"&&e8(a.data)){let n=F5(a.data);return e(a.data.property,l,n),!0}else if(a.type==="text"){let n=F5(a.data);return t(l,n),!0}}catch{return!1}return!1},getCurrentValue:a=>o.get(a.id)??a.newValue,canHandle:a=>a==="style"||a==="text"}};function N5(e,t){let o=$5(e,t),a=new Fa({commandExecutor:o});return{recordStyleChange(r,l,n,i){let s=a.createCommand("style",l,n,{...i,property:r});a.pushCommand(s)},recordTextChange(r,l,n){let i=a.createCommand("text",r,l,{...n});a.pushCommand(i)},undo:()=>a.undo(),redo:()=>a.redo(),canUndo:()=>a.canUndo(),canRedo:()=>a.canRedo(),subscribe:r=>a.subscribe(r),getHistoryStack:()=>a.getUndoStackSnapshot(),clear:()=>a.clear()}}import{jsx as te,jsxs as qe}from"react/jsx-runtime";var o8="This element's text can be edited inline.",a8="This element's text cannot be edited inline because it contains dynamic content.",r8={opacity:.4},l8=new Set(W9),n8={general:{headerTitle:"Selected Element",emptyPlaceholder:"Click on an element in the preview to select it.",inlineEditEditable:o8,inlineEditNonEditable:a8,addToChatContext:"Add to chat as context",ariaPropertyPanel:"Property panel",ariaSelectedComponent:"Selected component",ariaElementStyling:"Element styling"},sections:{background:"Background",spacing:"Spacing",border:"Border",typography:"Typography",elementDimensions:"Element Dimensions"},instances:{backgroundColor:"Background Color",padding:"Padding",margin:"Margin",borderRadius:"Border Radius",borderWeight:"Border Weight",borderStyle:"Border Style",borderColor:"Border Color",fontFamily:"Font Family",fontSize:"Font Size",fontWeight:"Font Weight",fontStyle:"Font Style",textColor:"Text Color",textAlignment:"Text Alignment",textFormatting:"Text Formatting",textTransform:"Text Transform",lineHeight:"Line Height",letterSpacing:"Letter Spacing",width:"Width",minWidth:"Minimum Width",maxWidth:"Maximum Width",height:"Height",minHeight:"Minimum Height",maxHeight:"Maximum Height",overflow:"Overflow"}};function i8({size:e=16}){return te("svg",{width:e,height:e,viewBox:"-1 0 252 302",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:te("path",{d:"M57 49Q67 49 74 42Q81 35 81 25Q81 15 74 8Q67 1 57 1Q47 1 40 8Q33 15 33 25Q33 35 40 42Q47 49 57 49ZM193 49Q203 49 210 42Q217 35 217 25Q217 15 210 8Q203 1 193 1Q183 1 176 8Q169 15 169 25Q169 35 176 42Q183 49 193 49ZM125 301Q100 301 71 292Q47 285 26 274Q7 265 3.5 259.5Q0 254 1 249Q13 216 20 189Q24 171 26 157V147Q28 120 30 105Q34 78 40 65Q48 48 63 39Q85 27 125 27Q165 27 186 39Q201 47 209 65Q216 78 220 105Q222 120 224 147V157Q226 171 230 189Q237 216 248 249Q250 254 246.5 259.5Q243 265 224 274Q203 285 179 292Q150 301 125 301ZM23 249Q39 259 63 268Q97 280 125 280Q153 280 187 268Q210 259 227 249Q216 219 210 194Q205 174 204 159L203 148Q199 91 191 73Q188 66 184 62Q177 56 165 52Q150 48 125 48Q90 48 73 57Q64 63 59 73Q51 91 47 148L46 158Q45 174 40 194Q34 220 23 249ZM124 248Q113 248 102 244Q84 236 76 217Q72 209 71 201Q70 193 70 179Q70 163 73 151Q76 142 81.5 134Q87 126 98 120Q109 114 125.5 114Q142 114 152 120Q164 127 169 134.5Q174 142 177 151Q180 163 180 178.5Q180 194 179 200Q178 209 174 218Q167 232 154.5 240Q142 248 126 248ZM124 228H126Q147 228 156 209Q158 203 159 197.5Q160 192 160 179Q160 166 157 157Q155 151 152 146.5Q149 142 141 138Q136 134 125 134Q114 134 107.5 138Q101 142 98 146.5Q95 151 93 157Q90 166 90 178.5Q90 191 91 197Q92 203 94 209Q99 221 111 225Q117 228 124 228ZM195 81Q192 79 190 78Q170 70 146 76Q134 80 125.5 80Q117 80 104 76Q80 70 60 78Q58 79 55 81Q50 84 51 89L55 112Q56 117 59.5 120.5Q63 124 68 125Q83 126 99 126Q111 126 115 114L122 92Q122 91 124 89L125 88L126 89Q128 91 128 92L135 114Q139 126 152 126Q167 126 182 125Q187 124 190.5 120.5Q194 117 195 112L199 89Q200 84 195 81ZM141 192Q137 190 133 193V171Q138 169 141 165Q143 163 144 161Q145 159 145 156.5Q145 154 143.5 152Q142 150 140 148.5Q138 147 134 146Q130 145 125.5 145Q121 145 116 146Q111 147 109 149Q107 151 106 153Q105 155 105 157Q105 159 106 161Q107 163 109.5 166Q112 169 116 171H117V193Q113 190 109 191.5Q105 193 104 196Q103 199 105 202Q108 210 117 213Q124 216 133 213L134 212Q143 209 146 202Q147 199 145.5 196Q144 193 141 192Z"})})}function s8(e,t){let o=e[t];return o!=null?String(o):""}function U5(e){if(!(!e||!e.name||!e.debugSource))return{sourceFile:e.debugSource.sourceFile,lineNumber:e.debugSource.lineNumber,columnNumber:e.debugSource.columnNumber,componentName:e.name}}function d8({component:e,onOpenSourceFile:t,showOpenSourceFile:o,generalLabels:a}){if(!e||!e.name)return te("section",{id:"property-panel-selected-component",className:"property-panel-selected-component",children:te("p",{className:"property-panel-selected-component-placeholder",id:"component-info",children:a.emptyPlaceholder})});let r=e.tagName?e.tagName.toLowerCase():"",l=r?`${e.name} > ${r}`:e.name,n=null;if(o&&e.debugSource){let{sourceFile:i,lineNumber:s,columnNumber:d}=e.debugSource,u=i.split("/").pop()||i,c=`:${s}:${d}`;n=qe("a",{href:"#",className:"property-panel-selected-component-source",onClick:x=>{x.preventDefault(),t?.({sourceFile:i,lineNumber:s,columnNumber:d})},title:`${i}${c}`,children:[u,c]})}return te("section",{id:"property-panel-selected-component",className:"property-panel-selected-component","aria-label":a.ariaSelectedComponent,children:qe("div",{id:"component-info",className:"property-panel-selected-component-info",children:[te("span",{className:"property-panel-selected-component-name",children:l}),n&&qe("span",{className:"property-panel-selected-component-source-row",children:["\u21B3 ",n]})]})})}function u8({styles:e,computedStyles:t,hasSelection:o,onStyleChange:a,generalLabels:r,sectionLabels:l,instanceLabels:n,editorLabels:i}){let s=o?"visible":"";return te("section",{className:"property-panel-style-properties-container"+(s?" "+s:""),"aria-label":r.ariaElementStyling,"aria-hidden":!o,children:qe("div",{className:"property-panel-style-properties",children:[te(ft,{title:l.background,children:te(ma,{label:n.backgroundColor,value:e.backgroundColor||t.backgroundColor||"#ffffff",onChange:d=>a("backgroundColor",d),id:"design-bg-color"})}),qe(ft,{title:l.spacing,children:[te(Wt,{label:n.padding,id:"design-padding",value:e.padding,placeholder:t.padding,onChange:d=>a("padding",d),...Kt.padding,aria:i?.boxDimension}),te(Wt,{label:n.margin,id:"design-margin",value:e.margin,placeholder:t.margin,onChange:d=>a("margin",d),...Kt.margin,allowAuto:!0,aria:i?.boxDimension})]}),qe(ft,{title:l.border,children:[te(Wt,{label:n.borderRadius,id:"design-border-radius",value:e.borderRadius,placeholder:t.borderRadius,onChange:d=>a("borderRadius",d),...Kt.borderRadius,aria:i?.boxDimension}),te(Wt,{label:n.borderWeight,id:"design-border-width",value:e.borderWidth,placeholder:t.borderWidth,onChange:d=>a("borderWidth",d),...Kt.borderWidth,aria:i?.boxDimension}),te(M2,{label:n.borderStyle,id:"design-border-style",value:e.borderStyle||t.borderStyle,onChange:d=>a("borderStyle",d),optionLabels:i?.borderStyle?.options}),te(ma,{label:n.borderColor,value:e.borderColor||t.borderColor||"#000000",onChange:d=>a("borderColor",d),id:"design-border-color",aria:i?.color})]}),qe(ft,{title:l.typography,children:[te(V5,{label:n.fontFamily,id:"design-font-family",value:e.fontFamily||t.fontFamily,onChange:d=>a("fontFamily",d),optionLabels:i?.fontFamily?.options}),te(L1,{label:n.fontSize,id:"design-font-size",value:e.fontSize,placeholder:t.fontSize,onChange:d=>a("fontSize",d),...m1.fontSize,aria:i?.dimension}),te(D5,{label:n.fontWeight,id:"design-font-weight",value:e.fontWeight||t.fontWeight,onChange:d=>a("fontWeight",d),optionLabels:i?.fontWeight?.options}),te(_5,{label:n.fontStyle,id:"design-font-style",value:e.fontStyle||t.fontStyle,onChange:d=>a("fontStyle",d),optionLabels:i?.fontStyle?.options}),te(ma,{label:n.textColor,value:e.color||t.color||"#000000",onChange:d=>a("color",d),id:"design-text-color",aria:i?.color}),te(B5,{label:n.textAlignment,id:"design-text-align",value:e.textAlign||t.textAlign,onChange:d=>a("textAlign",d),optionLabels:i?.textAlignment?.options}),te(A5,{label:n.textFormatting,id:"design-text-decoration",value:e.textDecoration||t.textDecoration,onChange:d=>a("textDecoration",d),optionLabels:i?.textDecoration?.options}),te(Z5,{label:n.textTransform,id:"design-text-transform",value:e.textTransform||t.textTransform,onChange:d=>a("textTransform",d),optionLabels:i?.textTransform?.options}),te(L1,{label:n.lineHeight,id:"design-line-height",value:e.lineHeight,placeholder:t.lineHeight,onChange:d=>a("lineHeight",d),...m1.lineHeight,aria:i?.dimension}),te(L1,{label:n.letterSpacing,id:"design-letter-spacing",value:e.letterSpacing,placeholder:t.letterSpacing,onChange:d=>a("letterSpacing",d),...m1.letterSpacing,aria:i?.dimension})]}),qe(ft,{title:l.elementDimensions,children:[te(L1,{label:n.width,id:"design-width",value:e.width,placeholder:t.width,onChange:d=>a("width",d),...m1.width,aria:i?.dimension}),qe("div",{className:"property-panel-row-2col",children:[te(L1,{label:n.minWidth,id:"design-min-width",value:e.minWidth,placeholder:t.minWidth,onChange:d=>a("minWidth",d),...m1.minWidth,aria:i?.dimension}),te(L1,{label:n.maxWidth,id:"design-max-width",value:e.maxWidth,placeholder:t.maxWidth,onChange:d=>a("maxWidth",d),...m1.maxWidth,aria:i?.dimension})]}),te(L1,{label:n.height,id:"design-height",value:e.height,placeholder:t.height,onChange:d=>a("height",d),...m1.height,aria:i?.dimension}),qe("div",{className:"property-panel-row-2col",children:[te(L1,{label:n.minHeight,id:"design-min-height",value:e.minHeight,placeholder:t.minHeight,onChange:d=>a("minHeight",d),...m1.minHeight,aria:i?.dimension}),te(L1,{label:n.maxHeight,id:"design-max-height",value:e.maxHeight,placeholder:t.maxHeight,onChange:d=>a("maxHeight",d),...m1.maxHeight,aria:i?.dimension})]}),te(O5,{label:n.overflow,id:"design-overflow",value:e.overflow||t.overflow,onChange:d=>a("overflow",d),optionLabels:i?.overflow?.options})]})]})})}var L9=["width","minWidth","maxWidth","height","minHeight","maxHeight","overflow","padding","margin","backgroundColor","borderWidth","borderStyle","borderColor","borderRadius","color","fontFamily","fontSize","fontWeight","fontStyle","lineHeight","letterSpacing","textAlign","textDecoration","textTransform"],x9=Object.fromEntries(L9.map(e=>[e,""])),q5=He.forwardRef(function(t,o){let{component:a,styles:r,onStyleChange:l,onTextChange:n,onHistoryStateChange:i,onAddToChatContext:s,onOpenSourceFile:d,showAddToChatContext:u=!0,showOpenSourceFile:c=!0,labels:f}=t,x=y1(n8,f),[g,b]=He.useState(x9),[m,M]=He.useState(x9),[v,R]=He.useState(()=>new Set),L=He.useRef(v);L.current=v;let V=He.useRef(g);V.current=g;let B=He.useRef(l);B.current=l;let z=He.useRef(n);z.current=n;let y=He.useRef(null);y.current||(y.current=N5((p,U,_)=>B.current(p,U,_),(p,U)=>z.current?.(p,U)));let H=y.current,j=He.useRef(i);j.current=i,He.useEffect(()=>{let p=_=>{j.current?.({canUndo:_.canUndo,canRedo:_.canRedo});let A=_.type==="command-undone"||_.type==="command-redone",E=_.command?.data?.property;if(A&&typeof E=="string"){let C=typeof _.appliedValue=="string"?_.appliedValue:"";b(h=>({...h,[E]:C})),R(h=>{let T=new Set(h);return T.add(E),T})}},U=H.subscribe(p);return j.current?.({canUndo:H.canUndo(),canRedo:H.canRedo()}),U},[H]),He.useImperativeHandle(o,()=>({undo:()=>H.undo(),redo:()=>H.redo(),clearHistory:()=>H.clear(),getHistoryStack:()=>H.getHistoryStack(),recordTextChange:(p,U,_)=>H.recordTextChange(p,U,_),canUndo:()=>H.canUndo(),canRedo:()=>H.canRedo()}),[H]),He.useEffect(()=>{let p=r||{},U=L.current;b(_=>{let A={..._};for(let E of L9){let C=p[E];C!=null&&!U.has(E)&&(A[E]=C.inline??_[E]??"")}return A}),M(_=>{let A={..._};for(let E of L9){let C=p[E];C!=null&&(A[E]=C.computed??_[E]??"")}return A})},[r]);let N=a?`${a.name}-${a.tagName??""}-${a.debugSource?.lineNumber??""}-${a.debugSource?.columnNumber??""}`:"none";He.useEffect(()=>{b(x9),R(new Set)},[N]);let J=He.useCallback((p,U)=>{l(p,U);let _=s8(V.current,p),A=U5(a);H.recordStyleChange(p,_,U,A),b(E=>({...E,[p]:U})),R(E=>{let C=new Set(E);return C.add(p),C})},[l,H,a]),D=!!(a&&a.name),q=g,S=He.useCallback(()=>{let p=U5(a);p&&s?.(p)},[a,s]),w=D&&a&&a.tagName&&l8.has(a.tagName.toUpperCase()),I=a?.hasNonEditableText?x.general.inlineEditNonEditable:x.general.inlineEditEditable;return qe("div",{role:"complementary","aria-label":x.general.ariaPropertyPanel,className:"property-panel-container",children:[qe("header",{className:"property-panel-header",children:[te("h2",{id:"design-property-panel-title",className:"property-panel-title",children:x.general.headerTitle}),D&&qe("div",{className:"property-panel-header-actions",children:[w&&te("span",{className:"property-panel-selected-component-action property-panel-selected-component-action-help","data-tooltip":I,"aria-label":I,children:te(P9,{width:14,height:14,style:a.hasNonEditableText?r8:void 0})}),u&&te("button",{type:"button",className:"property-panel-selected-component-action",onClick:S,"data-tooltip":x.general.addToChatContext,"aria-label":x.general.addToChatContext,children:te(i8,{size:14})})]})]}),qe("div",{className:"property-panel-content","aria-labelledby":"design-property-panel-title",children:[te(d8,{component:a,onOpenSourceFile:d,showOpenSourceFile:c,generalLabels:x.general}),te(u8,{styles:q,computedStyles:m,hasSelection:D,onStyleChange:J,generalLabels:x.general,sectionLabels:x.sections,instanceLabels:x.instances,editorLabels:f?.editors},N)]})]})});function c8(e,t,o){if(!e)return;t8(e).render(He.createElement(q5,{...t,ref:o}))}export{q5 as DesignPropertyPanel,y2 as REQUIRED_LABEL_KEYS,je as interpolate,c8 as mountDesignPropertyPanel,f3 as validateLabels};
1
+ var Y5=Object.create;var za=Object.defineProperty;var ei=Object.getOwnPropertyDescriptor;var ti=Object.getOwnPropertyNames;var oi=Object.getPrototypeOf,ai=Object.prototype.hasOwnProperty;var ri=(e,t,o)=>t in e?za(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var zt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var li=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ti(t))!ai.call(e,r)&&r!==o&&za(e,r,{get:()=>t[r],enumerable:!(a=ei(t,r))||a.enumerable});return e};var kn=(e,t,o)=>(o=e!=null?Y5(oi(e)):{},li(t||!e||!e.__esModule?za(o,"default",{value:e,enumerable:!0}):o,e));var et=(e,t,o)=>ri(e,typeof t!="symbol"?t+"":t,o);var B0=zt((kw,E0)=>{"use strict";var Ru="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";E0.exports=Ru});var $0=zt((Pw,F0)=>{"use strict";var Hu=B0();function A0(){}function Z0(){}Z0.resetWarningCache=A0;F0.exports=function(){function e(a,r,l,n,i,s){if(s!==Hu){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var o={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Z0,resetWarningCache:A0};return o.PropTypes=o,o}});var U0=zt((_w,N0)=>{N0.exports=$0()();var Tw,Vw});var z0=zt(fe=>{"use strict";var wl=Symbol.for("react.element"),Il=Symbol.for("react.portal"),La=Symbol.for("react.fragment"),wa=Symbol.for("react.strict_mode"),Ia=Symbol.for("react.profiler"),ba=Symbol.for("react.provider"),ya=Symbol.for("react.context"),ku=Symbol.for("react.server_context"),Ma=Symbol.for("react.forward_ref"),Sa=Symbol.for("react.suspense"),Ra=Symbol.for("react.suspense_list"),Ha=Symbol.for("react.memo"),ka=Symbol.for("react.lazy"),Pu=Symbol.for("react.offscreen"),q0;q0=Symbol.for("react.module.reference");function n1(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case wl:switch(e=e.type,e){case La:case Ia:case wa:case Sa:case Ra:return e;default:switch(e=e&&e.$$typeof,e){case ku:case ya:case Ma:case ka:case Ha:case ba:return e;default:return t}}case Il:return t}}}fe.ContextConsumer=ya;fe.ContextProvider=ba;fe.Element=wl;fe.ForwardRef=Ma;fe.Fragment=La;fe.Lazy=ka;fe.Memo=Ha;fe.Portal=Il;fe.Profiler=Ia;fe.StrictMode=wa;fe.Suspense=Sa;fe.SuspenseList=Ra;fe.isAsyncMode=function(){return!1};fe.isConcurrentMode=function(){return!1};fe.isContextConsumer=function(e){return n1(e)===ya};fe.isContextProvider=function(e){return n1(e)===ba};fe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===wl};fe.isForwardRef=function(e){return n1(e)===Ma};fe.isFragment=function(e){return n1(e)===La};fe.isLazy=function(e){return n1(e)===ka};fe.isMemo=function(e){return n1(e)===Ha};fe.isPortal=function(e){return n1(e)===Il};fe.isProfiler=function(e){return n1(e)===Ia};fe.isStrictMode=function(e){return n1(e)===wa};fe.isSuspense=function(e){return n1(e)===Sa};fe.isSuspenseList=function(e){return n1(e)===Ra};fe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===La||e===Ia||e===wa||e===Sa||e===Ra||e===Pu||typeof e=="object"&&e!==null&&(e.$$typeof===ka||e.$$typeof===Ha||e.$$typeof===ba||e.$$typeof===ya||e.$$typeof===Ma||e.$$typeof===q0||e.getModuleId!==void 0)};fe.typeOf=n1});var K0=zt((Ow,j0)=>{"use strict";j0.exports=z0()});import{forwardRef as me,createElement as X}from"react";function he(e,t){if(e==null)return{};var o={},a=Object.keys(e),r,l;for(l=0;l<a.length;l++)r=a[l],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var ni=["color"],Pn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,ni);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M0 7.5C0 7.22386 0.223858 7 0.5 7H3C3.27614 7 3.5 7.22386 3.5 7.5C3.5 7.77614 3.27614 8 3 8H0.5C0.223858 8 0 7.77614 0 7.5ZM5.75 7.5C5.75 7.22386 5.97386 7 6.25 7H8.75C9.02614 7 9.25 7.22386 9.25 7.5C9.25 7.77614 9.02614 8 8.75 8H6.25C5.97386 8 5.75 7.77614 5.75 7.5ZM12 7C11.7239 7 11.5 7.22386 11.5 7.5C11.5 7.77614 11.7239 8 12 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),ii=["color"],Tn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,ii);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M1.5 6.625C1.01675 6.625 0.625 7.01675 0.625 7.5C0.625 7.98325 1.01675 8.375 1.5 8.375C1.98325 8.375 2.375 7.98325 2.375 7.5C2.375 7.01675 1.98325 6.625 1.5 6.625ZM5.5 6.625C5.01675 6.625 4.625 7.01675 4.625 7.5C4.625 7.98325 5.01675 8.375 5.5 8.375C5.98325 8.375 6.375 7.98325 6.375 7.5C6.375 7.01675 5.98325 6.625 5.5 6.625ZM9.5 6.625C9.01675 6.625 8.625 7.01675 8.625 7.5C8.625 7.98325 9.01675 8.375 9.5 8.375C9.98325 8.375 10.375 7.98325 10.375 7.5C10.375 7.01675 9.98325 6.625 9.5 6.625ZM12.625 7.5C12.625 7.01675 13.0168 6.625 13.5 6.625C13.9832 6.625 14.375 7.01675 14.375 7.5C14.375 7.98325 13.9832 8.375 13.5 8.375C13.0168 8.375 12.625 7.98325 12.625 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var si=["color"],Vn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,si);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M1.25 7.5C1.25 7.22386 1.47386 7 1.75 7H13.25C13.5261 7 13.75 7.22386 13.75 7.5C13.75 7.77614 13.5261 8 13.25 8H1.75C1.47386 8 1.25 7.77614 1.25 7.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var di=["color"],_n=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,di);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var ui=["color"],mt=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,ui);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var ci=["color"],Dn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,ci);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M5.67494 3.50017C5.67494 3.25164 5.87641 3.05017 6.12494 3.05017H10.6249C10.8735 3.05017 11.0749 3.25164 11.0749 3.50017C11.0749 3.7487 10.8735 3.95017 10.6249 3.95017H9.00587L7.2309 11.05H8.87493C9.12345 11.05 9.32493 11.2515 9.32493 11.5C9.32493 11.7486 9.12345 11.95 8.87493 11.95H4.37493C4.1264 11.95 3.92493 11.7486 3.92493 11.5C3.92493 11.2515 4.1264 11.05 4.37493 11.05H5.99397L7.76894 3.95017H6.12494C5.87641 3.95017 5.67494 3.7487 5.67494 3.50017Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),fi=["color"],On=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,fi);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M4.79993 3.50017C4.79993 3.25164 5.0014 3.05017 5.24993 3.05017H9.74993C9.99845 3.05017 10.1999 3.25164 10.1999 3.50017C10.1999 3.7487 9.99845 3.95017 9.74993 3.95017H8.09993V11.05H9.74994C9.99847 11.05 10.1999 11.2515 10.1999 11.5C10.1999 11.7486 9.99847 11.95 9.74994 11.95H5.24994C5.00141 11.95 4.79994 11.7486 4.79994 11.5C4.79994 11.2515 5.00141 11.05 5.24994 11.05H6.89993V3.95017H5.24993C5.0014 3.95017 4.79993 3.7487 4.79993 3.50017Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),pi=["color"],En=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,pi);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M2.78233 2.21707C2.70732 2.14206 2.60557 2.09991 2.49949 2.09991C2.3934 2.09991 2.29166 2.14206 2.21664 2.21707L0.216645 4.21707C0.0604351 4.37328 0.0604351 4.62655 0.216645 4.78276C0.372855 4.93897 0.626121 4.93897 0.78233 4.78276L2.09949 3.4656L2.09949 11.5342L0.78233 10.2171C0.62612 10.0609 0.372854 10.0609 0.216645 10.2171C0.0604349 10.3733 0.0604349 10.6265 0.216645 10.7828L2.21664 12.7828C2.29166 12.8578 2.3934 12.8999 2.49949 12.8999C2.60557 12.8999 2.70731 12.8578 2.78233 12.7828L4.78233 10.7828C4.93854 10.6265 4.93854 10.3733 4.78233 10.2171C4.62612 10.0609 4.37285 10.0609 4.21664 10.2171L2.89949 11.5342L2.89949 3.4656L4.21664 4.78276C4.37285 4.93897 4.62612 4.93897 4.78233 4.78276C4.93854 4.62655 4.93854 4.37328 4.78233 4.21707L2.78233 2.21707ZM10.5 2.74997C10.7107 2.74997 10.8988 2.88211 10.9703 3.08036L13.9703 11.3999C14.064 11.6597 13.9293 11.9462 13.6696 12.0399C13.4098 12.1336 13.1233 11.9989 13.0296 11.7392L12.0477 9.016H8.95228L7.97033 11.7392C7.87666 11.9989 7.59013 12.1336 7.33036 12.0399C7.07059 11.9462 6.93595 11.6597 7.02962 11.3999L10.0296 3.08036C10.1011 2.88211 10.2892 2.74997 10.5 2.74997ZM10.5 4.72396L11.7412 8.166H9.25879L10.5 4.72396Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ci=["color"],Bn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,Ci);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M7.1813 1.68179C7.35704 1.50605 7.64196 1.50605 7.8177 1.68179L10.3177 4.18179C10.4934 4.35753 10.4934 4.64245 10.3177 4.81819C10.142 4.99392 9.85704 4.99392 9.6813 4.81819L7.9495 3.08638L7.9495 11.9136L9.6813 10.1818C9.85704 10.0061 10.142 10.0061 10.3177 10.1818C10.4934 10.3575 10.4934 10.6424 10.3177 10.8182L7.8177 13.3182C7.73331 13.4026 7.61885 13.45 7.4995 13.45C7.38015 13.45 7.26569 13.4026 7.1813 13.3182L4.6813 10.8182C4.50557 10.6424 4.50557 10.3575 4.6813 10.1818C4.85704 10.0061 5.14196 10.0061 5.3177 10.1818L7.0495 11.9136L7.0495 3.08638L5.3177 4.81819C5.14196 4.99392 4.85704 4.99392 4.6813 4.81819C4.50557 4.64245 4.50557 4.35753 4.6813 4.18179L7.1813 1.68179Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var mi=["color"],An=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,mi);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M6.5 1C6.22386 1 6 1.22386 6 1.5C6 1.77614 6.22386 2 6.5 2C7.12671 2 7.45718 2.20028 7.65563 2.47812C7.8781 2.78957 8 3.28837 8 4V11C8 11.7116 7.8781 12.2104 7.65563 12.5219C7.45718 12.7997 7.12671 13 6.5 13C6.22386 13 6 13.2239 6 13.5C6 13.7761 6.22386 14 6.5 14C7.37329 14 8.04282 13.7003 8.46937 13.1031C8.47976 13.0886 8.48997 13.0739 8.5 13.0591C8.51003 13.0739 8.52024 13.0886 8.53063 13.1031C8.95718 13.7003 9.62671 14 10.5 14C10.7761 14 11 13.7761 11 13.5C11 13.2239 10.7761 13 10.5 13C9.87329 13 9.54282 12.7997 9.34437 12.5219C9.1219 12.2104 9 11.7116 9 11V4C9 3.28837 9.1219 2.78957 9.34437 2.47812C9.54282 2.20028 9.87329 2 10.5 2C10.7761 2 11 1.77614 11 1.5C11 1.22386 10.7761 1 10.5 1C9.62671 1 8.95718 1.29972 8.53063 1.89688C8.52024 1.91143 8.51003 1.92611 8.5 1.9409C8.48997 1.92611 8.47976 1.91143 8.46937 1.89688C8.04282 1.29972 7.37329 1 6.5 1ZM14 5H11V4H14C14.5523 4 15 4.44772 15 5V10C15 10.5523 14.5523 11 14 11H11V10H14V5ZM6 4V5H1L1 10H6V11H1C0.447715 11 0 10.5523 0 10V5C0 4.44772 0.447715 4 1 4H6Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var hi=["color"],Zn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,hi);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M3.68979 2.75C3.89667 2.74979 4.08232 2.87701 4.15679 3.07003L7.36662 11.39C7.46602 11.6477 7.33774 11.9371 7.0801 12.0365C6.82247 12.1359 6.53304 12.0076 6.43365 11.75L5.3825 9.02537H2.01133L0.966992 11.749C0.868128 12.0068 0.578964 12.1357 0.321126 12.0369C0.0632878 11.938 -0.0655864 11.6488 0.0332774 11.391L3.22344 3.07099C3.29751 2.87782 3.4829 2.75021 3.68979 2.75ZM3.69174 4.64284L5.05458 8.17537H2.33724L3.69174 4.64284ZM10.8989 5.20703C9.25818 5.20703 8.00915 6.68569 8.00915 8.60972C8.00915 10.6337 9.35818 12.0124 10.8989 12.0124C11.7214 12.0124 12.5744 11.6692 13.1543 11.0219V11.53C13.1543 11.7785 13.3557 11.98 13.6043 11.98C13.8528 11.98 14.0543 11.7785 14.0543 11.53V5.72C14.0543 5.47147 13.8528 5.27 13.6043 5.27C13.3557 5.27 13.1543 5.47147 13.1543 5.72V6.22317C12.6054 5.60095 11.7924 5.20703 10.8989 5.20703ZM13.1543 9.79823V7.30195C12.7639 6.58101 11.9414 6.05757 11.0868 6.05757C10.1088 6.05757 9.03503 6.96581 9.03503 8.60955C9.03503 10.1533 10.0088 11.1615 11.0868 11.1615C11.9701 11.1615 12.7719 10.4952 13.1543 9.79823Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),gi=["color"],Fn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,gi);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M3.69899 5.20703C2.05823 5.20703 0.809204 6.68569 0.809204 8.60972C0.809204 10.6337 2.15823 12.0124 3.69899 12.0124C4.52126 12.0124 5.37402 11.6693 5.9539 11.0223V11.53C5.9539 11.7785 6.15537 11.98 6.4039 11.98C6.65243 11.98 6.8539 11.7785 6.8539 11.53V5.72001C6.8539 5.47149 6.65243 5.27001 6.4039 5.27001C6.15537 5.27001 5.9539 5.47149 5.9539 5.72001V6.22269C5.40506 5.60075 4.59218 5.20703 3.69899 5.20703ZM5.9539 9.799V7.30117C5.56339 6.58064 4.74118 6.05757 3.8868 6.05757C2.9089 6.05757 1.83508 6.96581 1.83508 8.60955C1.83508 10.1533 2.80889 11.1615 3.8868 11.1615C4.76984 11.1615 5.57141 10.4957 5.9539 9.799ZM10.799 5.20703C9.15823 5.20703 7.9092 6.68569 7.9092 8.60972C7.9092 10.6337 9.25823 12.0124 10.799 12.0124C11.6215 12.0124 12.4744 11.6692 13.0543 11.0218V11.53C13.0543 11.7785 13.2558 11.98 13.5043 11.98C13.7529 11.98 13.9543 11.7785 13.9543 11.53V5.72C13.9543 5.47147 13.7529 5.27 13.5043 5.27C13.2558 5.27 13.0543 5.47147 13.0543 5.72V6.22318C12.5055 5.60095 11.6924 5.20703 10.799 5.20703ZM13.0543 9.79822V7.30196C12.664 6.58102 11.8415 6.05757 10.9868 6.05757C10.0089 6.05757 8.93508 6.96581 8.93508 8.60955C8.93508 10.1533 9.90889 11.1615 10.9868 11.1615C11.8702 11.1615 12.672 10.4952 13.0543 9.79822Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var vi=["color"],$n=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,vi);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M3.6255 2.75C3.83478 2.75 4.02192 2.88034 4.09448 3.07664L7.16985 11.3962C7.2656 11.6552 7.13324 11.9428 6.87423 12.0386C6.61522 12.1343 6.32763 12.002 6.23188 11.7429L5.22387 9.01603H2.02712L1.01911 11.7429C0.923362 12.002 0.635774 12.1343 0.376762 12.0386C0.117749 11.9428 -0.0146052 11.6552 0.0811401 11.3962L3.15651 3.07664C3.22908 2.88034 3.41621 2.75 3.6255 2.75ZM3.6255 4.69207L4.90966 8.16603H2.34133L3.6255 4.69207ZM11.3719 2.75C11.5811 2.75 11.7683 2.88034 11.8408 3.07664L14.9162 11.3962C15.012 11.6552 14.8796 11.9428 14.6206 12.0386C14.3616 12.1343 14.074 12.002 13.9782 11.7429L12.9702 9.01603H9.77348L8.76547 11.7429C8.66972 12.002 8.38213 12.1343 8.12312 12.0386C7.86411 11.9428 7.73175 11.6552 7.8275 11.3962L10.9029 3.07664C10.9754 2.88034 11.1626 2.75 11.3719 2.75ZM11.3719 4.69207L12.656 8.16603H10.0877L11.3719 4.69207Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),xi=["color"],Nn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,xi);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M4.55293 0.999969C4.75295 0.999969 4.93372 1.11917 5.0125 1.30301L8.01106 8.29982C8.11984 8.55363 8.00226 8.84757 7.74844 8.95635C7.49463 9.06512 7.20069 8.94754 7.09191 8.69373L6.11613 6.41685H2.98973L2.01395 8.69373C1.90517 8.94754 1.61123 9.06512 1.35742 8.95635C1.1036 8.84757 0.986023 8.55363 1.0948 8.29982L4.09336 1.30301C4.17214 1.11917 4.35291 0.999969 4.55293 0.999969ZM4.55293 2.76929L5.75186 5.56685H3.354L4.55293 2.76929ZM11.0562 9.00214C11.2617 9.00214 11.4463 8.87633 11.5215 8.68502L14.2733 1.68299C14.3743 1.42598 14.2478 1.13575 13.9908 1.03475C13.7338 0.933747 13.4436 1.06021 13.3426 1.31722L11.0562 7.13514L8.76973 1.31722C8.66873 1.06021 8.3785 0.933747 8.1215 1.03475C7.86449 1.13575 7.73802 1.42598 7.83902 1.68299L10.5908 8.68502C10.666 8.87633 10.8506 9.00214 11.0562 9.00214ZM14.9537 12.4999C14.9537 12.606 14.9115 12.7077 14.8365 12.7828L12.8365 14.7828C12.6803 14.939 12.4271 14.939 12.2708 14.7828C12.1146 14.6265 12.1146 14.3733 12.2708 14.2171L13.588 12.8999H1.51937L2.83653 14.2171C2.99274 14.3733 2.99274 14.6265 2.83653 14.7828C2.68032 14.939 2.42705 14.939 2.27084 14.7828L0.270843 12.7828C0.195828 12.7077 0.153687 12.606 0.153687 12.4999C0.153687 12.3938 0.195828 12.2921 0.270843 12.2171L2.27084 10.2171C2.42705 10.0609 2.68032 10.0609 2.83653 10.2171C2.99274 10.3733 2.99274 10.6265 2.83653 10.7828L1.51937 12.0999L13.588 12.0999L12.2708 10.7828C12.1146 10.6265 12.1146 10.3733 12.2708 10.2171C12.4271 10.0609 12.6803 10.0609 12.8365 10.2171L14.8365 12.2171C14.9115 12.2921 14.9537 12.3938 14.9537 12.4999Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Li=["color"],Un=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,Li);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M3.78233 2.21713C3.70732 2.14212 3.60557 2.09998 3.49949 2.09998C3.3934 2.09998 3.29166 2.14212 3.21664 2.21713L1.21664 4.21713C1.06044 4.37334 1.06044 4.62661 1.21664 4.78282C1.37285 4.93903 1.62612 4.93903 1.78233 4.78282L3.09949 3.46566L3.09949 11.5343L1.78233 10.2171C1.62612 10.0609 1.37285 10.0609 1.21664 10.2171C1.06043 10.3733 1.06043 10.6266 1.21664 10.7828L3.21664 12.7828C3.29166 12.8578 3.3934 12.9 3.49949 12.9C3.60557 12.9 3.70731 12.8578 3.78233 12.7828L5.78233 10.7828C5.93854 10.6266 5.93854 10.3733 5.78233 10.2171C5.62612 10.0609 5.37285 10.0609 5.21664 10.2171L3.89949 11.5343L3.89949 3.46566L5.21664 4.78282C5.37285 4.93903 5.62612 4.93903 5.78233 4.78282C5.93854 4.62661 5.93854 4.37334 5.78233 4.21713L3.78233 2.21713ZM8.49998 3.99997C8.22383 3.99997 7.99998 4.22382 7.99998 4.49997C7.99998 4.77611 8.22383 4.99997 8.49998 4.99997H14.5C14.7761 4.99997 15 4.77611 15 4.49997C15 4.22382 14.7761 3.99997 14.5 3.99997H8.49998ZM7.99998 7.49997C7.99998 7.22382 8.22383 6.99997 8.49998 6.99997H14.5C14.7761 6.99997 15 7.22382 15 7.49997C15 7.77611 14.7761 7.99997 14.5 7.99997H8.49998C8.22383 7.99997 7.99998 7.77611 7.99998 7.49997ZM8.49998 9.99997C8.22383 9.99997 7.99998 10.2238 7.99998 10.5C7.99998 10.7761 8.22383 11 8.49998 11H14.5C14.7761 11 15 10.7761 15 10.5C15 10.2238 14.7761 9.99997 14.5 9.99997H8.49998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),wi=["color"],qn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,wi);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M4.62471 4.00001L4.56402 4.00001C4.04134 3.99993 3.70687 3.99988 3.4182 4.055C2.2379 4.28039 1.29846 5.17053 1.05815 6.33035C0.999538 6.61321 0.999604 6.93998 0.999703 7.43689L0.999711 7.50001L0.999703 7.56313C0.999604 8.06004 0.999538 8.38681 1.05815 8.66967C1.29846 9.8295 2.2379 10.7196 3.4182 10.945C3.70688 11.0001 4.04135 11.0001 4.56403 11L4.62471 11H5.49971C5.77585 11 5.99971 10.7762 5.99971 10.5C5.99971 10.2239 5.77585 10 5.49971 10H4.62471C4.02084 10 3.78907 9.99777 3.60577 9.96277C2.80262 9.8094 2.19157 9.21108 2.03735 8.46678C2.00233 8.29778 1.99971 8.08251 1.99971 7.50001C1.99971 6.91752 2.00233 6.70225 2.03735 6.53324C2.19157 5.78895 2.80262 5.19062 3.60577 5.03725C3.78907 5.00225 4.02084 5.00001 4.62471 5.00001H5.49971C5.77585 5.00001 5.99971 4.77615 5.99971 4.50001C5.99971 4.22387 5.77585 4.00001 5.49971 4.00001H4.62471ZM10.3747 5.00001C10.9786 5.00001 11.2104 5.00225 11.3937 5.03725C12.1968 5.19062 12.8079 5.78895 12.9621 6.53324C12.9971 6.70225 12.9997 6.91752 12.9997 7.50001C12.9997 8.08251 12.9971 8.29778 12.9621 8.46678C12.8079 9.21108 12.1968 9.8094 11.3937 9.96277C11.2104 9.99777 10.9786 10 10.3747 10H9.49971C9.22357 10 8.99971 10.2239 8.99971 10.5C8.99971 10.7762 9.22357 11 9.49971 11H10.3747L10.4354 11C10.9581 11.0001 11.2925 11.0001 11.5812 10.945C12.7615 10.7196 13.701 9.8295 13.9413 8.66967C13.9999 8.38681 13.9998 8.06005 13.9997 7.56314L13.9997 7.50001L13.9997 7.43688C13.9998 6.93998 13.9999 6.61321 13.9413 6.33035C13.701 5.17053 12.7615 4.28039 11.5812 4.055C11.2925 3.99988 10.9581 3.99993 10.4354 4.00001L10.3747 4.00001H9.49971C9.22357 4.00001 8.99971 4.22387 8.99971 4.50001C8.99971 4.77615 9.22357 5.00001 9.49971 5.00001H10.3747ZM5.00038 7C4.72424 7 4.50038 7.22386 4.50038 7.5C4.50038 7.77614 4.72424 8 5.00038 8H10.0004C10.2765 8 10.5004 7.77614 10.5004 7.5C10.5004 7.22386 10.2765 7 10.0004 7H5.00038Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ii=["color"],zn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,Ii);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M4.56427 3.99988C4.58422 3.99989 4.60445 3.99989 4.62496 3.99989H5.49996C5.7761 3.99989 5.99996 4.22375 5.99996 4.49989C5.99996 4.77603 5.7761 4.99989 5.49996 4.99989H4.62496C4.02108 4.99989 3.78932 5.00213 3.60601 5.03713C2.80287 5.1905 2.19181 5.78883 2.03759 6.53312C2.00257 6.70212 1.99996 6.91739 1.99996 7.49989C1.99996 8.08239 2.00257 8.29766 2.03759 8.46666C2.19181 9.21095 2.80287 9.80928 3.60601 9.96265C3.78932 9.99765 4.02108 9.99989 4.62496 9.99989H5.49996C5.7761 9.99989 5.99996 10.2237 5.99996 10.4999C5.99996 10.776 5.7761 10.9999 5.49996 10.9999H4.62496C4.60445 10.9999 4.58422 10.9999 4.56427 10.9999C4.04159 11 3.70712 11 3.41845 10.9449C2.23814 10.7195 1.29871 9.82937 1.05839 8.66955C0.999782 8.38669 0.999848 8.05992 0.999947 7.56301C0.999951 7.54227 0.999955 7.52123 0.999955 7.49989C0.999955 7.47855 0.999951 7.45751 0.999947 7.43677C0.999848 6.93986 0.999782 6.61309 1.05839 6.33023C1.29871 5.17041 2.23814 4.28027 3.41845 4.05488C3.70712 3.99976 4.04159 3.99981 4.56427 3.99988ZM11.3939 5.03713C11.2106 5.00213 10.9788 4.99989 10.375 4.99989H9.49996C9.22381 4.99989 8.99996 4.77603 8.99996 4.49989C8.99996 4.22375 9.22381 3.99989 9.49996 3.99989H10.375C10.3955 3.99989 10.4157 3.99989 10.4356 3.99988C10.9583 3.99981 11.2928 3.99976 11.5815 4.05488C12.7618 4.28027 13.7012 5.17041 13.9415 6.33023C14.0001 6.61309 14.0001 6.93985 14 7.43676C14 7.4575 14 7.47854 14 7.49989C14 7.52124 14 7.54228 14 7.56302C14.0001 8.05992 14.0001 8.38669 13.9415 8.66955C13.7012 9.82937 12.7618 10.7195 11.5815 10.9449C11.2928 11 10.9583 11 10.4356 10.9999C10.4157 10.9999 10.3955 10.9999 10.375 10.9999H9.49996C9.22381 10.9999 8.99996 10.776 8.99996 10.4999C8.99996 10.2237 9.22381 9.99989 9.49996 9.99989H10.375C10.9788 9.99989 11.2106 9.99765 11.3939 9.96265C12.197 9.80928 12.8081 9.21095 12.9623 8.46666C12.9973 8.29766 13 8.08239 13 7.49989C13 6.91739 12.9973 6.70212 12.9623 6.53312C12.8081 5.78883 12.197 5.1905 11.3939 5.03713Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var bi=["color"],jn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,bi);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M5.00003 3.25C5.00003 2.97386 4.77617 2.75 4.50003 2.75C4.22389 2.75 4.00003 2.97386 4.00003 3.25V7.10003H2.49998C2.27906 7.10003 2.09998 7.27912 2.09998 7.50003C2.09998 7.72094 2.27906 7.90003 2.49998 7.90003H4.00003V8.55C4.00003 10.483 5.56703 12.05 7.50003 12.05C9.43303 12.05 11 10.483 11 8.55V7.90003H12.5C12.7209 7.90003 12.9 7.72094 12.9 7.50003C12.9 7.27912 12.7209 7.10003 12.5 7.10003H11V3.25C11 2.97386 10.7762 2.75 10.5 2.75C10.2239 2.75 10 2.97386 10 3.25V7.10003H5.00003V3.25ZM5.00003 7.90003V8.55C5.00003 9.93071 6.11932 11.05 7.50003 11.05C8.88074 11.05 10 9.93071 10 8.55V7.90003H5.00003Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var yi=["color"],Kn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,yi);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Mi=["color"],Gn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,Mi);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))}),Si=["color"],Wn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,Si);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ri=["color"],Xn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,Ri);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Hi=["color"],Qn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,Hi);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M4 6H11L7.5 10.5L4 6Z",fill:a}))});var ki=["color"],Jn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,ki);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M4 9H11L7.5 4.5L4 9Z",fill:a}))});var Pi=["color"],Yn=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,Pi);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M5.00001 2.75C5.00001 2.47386 4.77615 2.25 4.50001 2.25C4.22387 2.25 4.00001 2.47386 4.00001 2.75V8.05C4.00001 9.983 5.56702 11.55 7.50001 11.55C9.43301 11.55 11 9.983 11 8.05V2.75C11 2.47386 10.7762 2.25 10.5 2.25C10.2239 2.25 10 2.47386 10 2.75V8.05C10 9.43071 8.88072 10.55 7.50001 10.55C6.1193 10.55 5.00001 9.43071 5.00001 8.05V2.75ZM3.49998 13.1001C3.27906 13.1001 3.09998 13.2791 3.09998 13.5001C3.09998 13.721 3.27906 13.9001 3.49998 13.9001H11.5C11.7209 13.9001 11.9 13.721 11.9 13.5001C11.9 13.2791 11.7209 13.1001 11.5 13.1001H3.49998Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var Ti=["color"],e9=me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=he(e,Ti);return X("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),X("path",{d:"M4.81812 4.68161C4.99386 4.85734 4.99386 5.14227 4.81812 5.318L3.08632 7.0498H11.9135L10.1817 5.318C10.006 5.14227 10.006 4.85734 10.1817 4.68161C10.3575 4.50587 10.6424 4.50587 10.8181 4.68161L13.3181 7.18161C13.4939 7.35734 13.4939 7.64227 13.3181 7.818L10.8181 10.318C10.6424 10.4937 10.3575 10.4937 10.1817 10.318C10.006 10.1423 10.006 9.85734 10.1817 9.68161L11.9135 7.9498H3.08632L4.81812 9.68161C4.99386 9.85734 4.99386 10.1423 4.81812 10.318C4.64239 10.4937 4.35746 10.4937 4.18173 10.318L1.68173 7.818C1.50599 7.64227 1.50599 7.35734 1.68173 7.18161L4.18173 4.68161C4.35746 4.50587 4.64239 4.50587 4.81812 4.68161Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});import Me from"react";import{createRoot as g8}from"react-dom/client";import t9 from"react";import{jsx as ja,jsxs as o9}from"react/jsx-runtime";function tt({title:e,defaultOpen:t=!0,children:o}){let[a,r]=t9.useState(t),l=t9.useCallback(n=>{r(n.currentTarget.open)},[]);return o9("details",{className:"property-panel-section",open:a,onToggle:l,children:[o9("summary",{className:"property-panel-section-trigger",children:[ja("span",{children:e}),ja(_n,{className:"property-panel-section-chevron",width:12,height:12,"aria-hidden":"true"})]}),ja("div",{className:"property-panel-section-content",children:o})]})}var a9=["H1","H2","H3","H4","H5","H6","P","SPAN","A","BUTTON","LABEL"];import u1 from"react";import*as R1 from"react";import{jsx as Vi}from"react/jsx-runtime";function ht(e,t=[]){let o=[];function a(l,n){let i=R1.createContext(n),s=o.length;o=[...o,n];let d=p=>{let{scope:C,children:c,...x}=p,w=C?.[e]?.[s]||i,h=R1.useMemo(()=>x,Object.values(x));return Vi(w.Provider,{value:h,children:c})};d.displayName=l+"Provider";function u(p,C){let c=C?.[e]?.[s]||i,x=R1.useContext(c);if(x)return x;if(n!==void 0)return n;throw new Error(`\`${p}\` must be used within \`${l}\``)}return[d,u]}let r=()=>{let l=o.map(n=>R1.createContext(n));return function(i){let s=i?.[e]||l;return R1.useMemo(()=>({[`__scope${e}`]:{...i,[e]:s}}),[i,s])}};return r.scopeName=e,[a,_i(r,...t)]}function _i(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let a=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(l){let n=a.reduce((i,{useScope:s,scopeName:d})=>{let p=s(l)[`__scope${d}`];return{...i,...p}},{});return R1.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return o.scopeName=t.scopeName,o}import*as i9 from"react";import*as Zi from"react-dom";import*as be from"react";import*as l9 from"react";function r9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ka(...e){return t=>{let o=!1,a=e.map(r=>{let l=r9(r,t);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let r=0;r<a.length;r++){let l=a[r];typeof l=="function"?l():r9(e[r],null)}}}}function jt(...e){return l9.useCallback(Ka(...e),e)}import{Fragment as K8,jsx as n9}from"react/jsx-runtime";function Kt(e){let t=Di(e),o=be.forwardRef((a,r)=>{let{children:l,...n}=a,i=be.Children.toArray(l),s=i.find(Ei);if(s){let d=s.props.children,u=i.map(p=>p===s?be.Children.count(d)>1?be.Children.only(null):be.isValidElement(d)?d.props.children:null:p);return n9(t,{...n,ref:r,children:be.isValidElement(d)?be.cloneElement(d,void 0,u):null})}return n9(t,{...n,ref:r,children:l})});return o.displayName=`${e}.Slot`,o}function Di(e){let t=be.forwardRef((o,a)=>{let{children:r,...l}=o;if(be.isValidElement(r)){let n=Ai(r),i=Bi(l,r.props);return r.type!==be.Fragment&&(i.ref=a?Ka(a,n):n),be.cloneElement(r,i)}return be.Children.count(r)>1?be.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Oi=Symbol("radix.slottable");function Ei(e){return be.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Oi}function Bi(e,t){let o={...t};for(let a in t){let r=e[a],l=t[a];/^on[A-Z]/.test(a)?r&&l?o[a]=(...i)=>{let s=l(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...l}:a==="className"&&(o[a]=[r,l].filter(Boolean).join(" "))}return{...e,...o}}function Ai(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}import{jsx as Fi}from"react/jsx-runtime";var $i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],E1=$i.reduce((e,t)=>{let o=Kt(`Primitive.${t}`),a=i9.forwardRef((r,l)=>{let{asChild:n,...i}=r,s=n?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Fi(s,{...i,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});import*as Se from"react";var J8=!!(typeof window<"u"&&window.document&&window.document.createElement);function H1(e,t,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e?.(r),o===!1||!r.defaultPrevented)return t?.(r)}}import ot from"react";import{jsx as Ga}from"react/jsx-runtime";import dc from"react";import{jsx as cc}from"react/jsx-runtime";function s9(e){let t=e+"CollectionProvider",[o,a]=ht(t),[r,l]=o(t,{collectionRef:{current:null},itemMap:new Map}),n=w=>{let{scope:h,children:M}=w,v=ot.useRef(null),T=ot.useRef(new Map).current;return Ga(r,{scope:h,itemMap:T,collectionRef:v,children:M})};n.displayName=t;let i=e+"CollectionSlot",s=Kt(i),d=ot.forwardRef((w,h)=>{let{scope:M,children:v}=w,T=l(i,M),g=jt(h,T.collectionRef);return Ga(s,{ref:g,children:v})});d.displayName=i;let u=e+"CollectionItemSlot",p="data-radix-collection-item",C=Kt(u),c=ot.forwardRef((w,h)=>{let{scope:M,children:v,...T}=w,g=ot.useRef(null),O=jt(h,g),P=l(u,M);return ot.useEffect(()=>(P.itemMap.set(g,{ref:g,...T}),()=>void P.itemMap.delete(g))),Ga(C,{[p]:"",ref:O,children:v})});c.displayName=u;function x(w){let h=l(e+"CollectionConsumer",w);return ot.useCallback(()=>{let v=h.collectionRef.current;if(!v)return[];let T=Array.from(v.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((P,z)=>T.indexOf(P.ref.current)-T.indexOf(z.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:n,Slot:d,ItemSlot:c},x,a]}import*as Wa from"react";import*as d9 from"react";var Ro=globalThis?.document?d9.useLayoutEffect:()=>{};var Ni=Wa[" useId ".trim().toString()]||(()=>{}),Ui=0;function u9(e){let[t,o]=Wa.useState(Ni());return Ro(()=>{e||o(a=>a??String(Ui++))},[e]),e||(t?`radix-${t}`:"")}import*as gt from"react";function c9(e){let t=gt.useRef(e);return gt.useEffect(()=>{t.current=e}),gt.useMemo(()=>(...o)=>t.current?.(...o),[])}import*as e1 from"react";import*as Ho from"react";var qi=e1[" useInsertionEffect ".trim().toString()]||Ro;function at({prop:e,defaultProp:t,onChange:o=()=>{},caller:a}){let[r,l,n]=zi({defaultProp:t,onChange:o}),i=e!==void 0,s=i?e:r;{let u=e1.useRef(e!==void 0);e1.useEffect(()=>{let p=u.current;p!==i&&console.warn(`${a} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=i},[i,a])}let d=e1.useCallback(u=>{if(i){let p=ji(u)?u(e):u;p!==e&&n.current?.(p)}else l(u)},[i,e,l,n]);return[s,d]}function zi({defaultProp:e,onChange:t}){let[o,a]=e1.useState(e),r=e1.useRef(o),l=e1.useRef(t);return qi(()=>{l.current=t},[t]),e1.useEffect(()=>{r.current!==o&&(l.current?.(o),r.current=o)},[o,r]),[o,a,l]}function ji(e){return typeof e=="function"}var xc=Symbol("RADIX:SYNC_STATE");import*as ko from"react";import{jsx as Ic}from"react/jsx-runtime";var Ki=ko.createContext(void 0);function Po(e){let t=ko.useContext(Ki);return e||t||"ltr"}import{jsx as rt}from"react/jsx-runtime";var Xa="rovingFocusGroup.onEntryFocus",Gi={bubbles:!1,cancelable:!0},Gt="RovingFocusGroup",[Qa,f9,Wi]=s9(Gt),[Xi,Ja]=ht(Gt,[Wi]),[Qi,Ji]=Xi(Gt),p9=Se.forwardRef((e,t)=>rt(Qa.Provider,{scope:e.__scopeRovingFocusGroup,children:rt(Qa.Slot,{scope:e.__scopeRovingFocusGroup,children:rt(Yi,{...e,ref:t})})}));p9.displayName=Gt;var Yi=Se.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:a,loop:r=!1,dir:l,currentTabStopId:n,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:s,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...p}=e,C=Se.useRef(null),c=jt(t,C),x=Po(l),[w,h]=at({prop:n,defaultProp:i??null,onChange:s,caller:Gt}),[M,v]=Se.useState(!1),T=c9(d),g=f9(o),O=Se.useRef(!1),[P,z]=Se.useState(0);return Se.useEffect(()=>{let S=C.current;if(S)return S.addEventListener(Xa,T),()=>S.removeEventListener(Xa,T)},[T]),rt(Qi,{scope:o,orientation:a,dir:x,loop:r,currentTabStopId:w,onItemFocus:Se.useCallback(S=>h(S),[h]),onItemShiftTab:Se.useCallback(()=>v(!0),[]),onFocusableItemAdd:Se.useCallback(()=>z(S=>S+1),[]),onFocusableItemRemove:Se.useCallback(()=>z(S=>S-1),[]),children:rt(E1.div,{tabIndex:M||P===0?-1:0,"data-orientation":a,...p,ref:c,style:{outline:"none",...e.style},onMouseDown:H1(e.onMouseDown,()=>{O.current=!0}),onFocus:H1(e.onFocus,S=>{let A=!O.current;if(S.target===S.currentTarget&&A&&!M){let j=new CustomEvent(Xa,Gi);if(S.currentTarget.dispatchEvent(j),!j.defaultPrevented){let $=g().filter(I=>I.focusable),K=$.find(I=>I.active),B=$.find(I=>I.id===w),R=[K,B,...$].filter(Boolean).map(I=>I.ref.current);h9(R,u)}}O.current=!1}),onBlur:H1(e.onBlur,()=>v(!1))})})}),C9="RovingFocusGroupItem",m9=Se.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:a=!0,active:r=!1,tabStopId:l,children:n,...i}=e,s=u9(),d=l||s,u=Ji(C9,o),p=u.currentTabStopId===d,C=f9(o),{onFocusableItemAdd:c,onFocusableItemRemove:x,currentTabStopId:w}=u;return Se.useEffect(()=>{if(a)return c(),()=>x()},[a,c,x]),rt(Qa.ItemSlot,{scope:o,id:d,focusable:a,active:r,children:rt(E1.span,{tabIndex:p?0:-1,"data-orientation":u.orientation,...i,ref:t,onMouseDown:H1(e.onMouseDown,h=>{a?u.onItemFocus(d):h.preventDefault()}),onFocus:H1(e.onFocus,()=>u.onItemFocus(d)),onKeyDown:H1(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){u.onItemShiftTab();return}if(h.target!==h.currentTarget)return;let M=os(h,u.orientation,u.dir);if(M!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let T=C().filter(g=>g.focusable).map(g=>g.ref.current);if(M==="last")T.reverse();else if(M==="prev"||M==="next"){M==="prev"&&T.reverse();let g=T.indexOf(h.currentTarget);T=u.loop?as(T,g+1):T.slice(g+1)}setTimeout(()=>h9(T))}}),children:typeof n=="function"?n({isCurrentTabStop:p,hasTabStop:w!=null}):n})})});m9.displayName=C9;var es={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ts(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function os(e,t,o){let a=ts(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return es[a]}function h9(e,t=!1){let o=document.activeElement;for(let a of e)if(a===o||(a.focus({preventScroll:t}),document.activeElement!==o))return}function as(e,t){return e.map((o,a)=>e[(t+a)%e.length])}var g9=p9,v9=m9;import*as x9 from"react";import{jsx as ls}from"react/jsx-runtime";var L9="Toggle",Ya=x9.forwardRef((e,t)=>{let{pressed:o,defaultPressed:a,onPressedChange:r,...l}=e,[n,i]=at({prop:o,onChange:r,defaultProp:a??!1,caller:L9});return ls(E1.button,{type:"button","aria-pressed":n,"data-state":n?"on":"off","data-disabled":e.disabled?"":void 0,...l,ref:t,onClick:H1(e.onClick,()=>{e.disabled||i(!n)})})});Ya.displayName=L9;import{jsx as Fe}from"react/jsx-runtime";var B1="ToggleGroup",[I9,Kc]=ht(B1,[Ja]),b9=Ja(),er=u1.forwardRef((e,t)=>{let{type:o,...a}=e;if(o==="single")return Fe(ns,{...a,ref:t});if(o==="multiple")return Fe(is,{...a,ref:t});throw new Error(`Missing prop \`type\` expected on \`${B1}\``)});er.displayName=B1;var[y9,M9]=I9(B1),ns=u1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...l}=e,[n,i]=at({prop:o,defaultProp:a??"",onChange:r,caller:B1});return Fe(y9,{scope:e.__scopeToggleGroup,type:"single",value:u1.useMemo(()=>n?[n]:[],[n]),onItemActivate:i,onItemDeactivate:u1.useCallback(()=>i(""),[i]),children:Fe(S9,{...l,ref:t})})}),is=u1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...l}=e,[n,i]=at({prop:o,defaultProp:a??[],onChange:r,caller:B1}),s=u1.useCallback(u=>i((p=[])=>[...p,u]),[i]),d=u1.useCallback(u=>i((p=[])=>p.filter(C=>C!==u)),[i]);return Fe(y9,{scope:e.__scopeToggleGroup,type:"multiple",value:n,onItemActivate:s,onItemDeactivate:d,children:Fe(S9,{...l,ref:t})})});er.displayName=B1;var[ss,ds]=I9(B1),S9=u1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,disabled:a=!1,rovingFocus:r=!0,orientation:l,dir:n,loop:i=!0,...s}=e,d=b9(o),u=Po(n),p={role:"group",dir:u,...s};return Fe(ss,{scope:o,rovingFocus:r,disabled:a,children:r?Fe(g9,{asChild:!0,...d,orientation:l,dir:u,loop:i,children:Fe(E1.div,{...p,ref:t})}):Fe(E1.div,{...p,ref:t})})}),To="ToggleGroupItem",R9=u1.forwardRef((e,t)=>{let o=M9(To,e.__scopeToggleGroup),a=ds(To,e.__scopeToggleGroup),r=b9(e.__scopeToggleGroup),l=o.value.includes(e.value),n=a.disabled||e.disabled,i={...e,pressed:l,disabled:n},s=u1.useRef(null);return a.rovingFocus?Fe(v9,{asChild:!0,...r,focusable:!n,active:l,ref:s,children:Fe(w9,{...i,ref:t})}):Fe(w9,{...i,ref:t})});R9.displayName=To;var w9=u1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,value:a,...r}=e,l=M9(To,o),n={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=l.type==="single"?n:void 0;return Fe(Ya,{...i,...r,ref:t,onPressedChange:s=>{s?l.onItemActivate(a):l.onItemDeactivate(a)}})}),H9=er,k9=R9;import ms from"react";import{jsx as ps,jsxs as Cs}from"react/jsx-runtime";var cs={border:"none",margin:0,padding:0,minWidth:0},fs={color:"var(--dmp-color-foreground)",fontSize:"var(--dmp-font-size-label)",display:"block",marginBottom:"5px",padding:0};function t1({label:e,id:t,className:o,children:a}){let r=`${t}-legend`;return Cs("fieldset",{style:cs,className:o,"aria-labelledby":r,children:[ps("legend",{id:r,style:fs,children:e}),a]})}import{jsx as tr}from"react/jsx-runtime";function v1({label:e,options:t,value:o,onChange:a,id:r="radio-group"}){let l=ms.useCallback(n=>{n&&typeof a=="function"&&a(n)},[a]);return tr(t1,{label:e,id:r,className:"radioGroupEditor-fieldset",children:tr(H9,{type:"single",value:o,onValueChange:l,className:"radioGroupEditor-root","aria-label":e,children:t.map(n=>tr(k9,{value:n.value,className:"radioGroupEditor-item","aria-label":n.label,title:n.label,children:n.icon??n.label},n.value))})})}import{jsx as Wt}from"react/jsx-runtime";var T9=[{value:"none",labelKey:"none",defaultLabel:"None",icon:Wt(mt,{width:14,height:14})},{value:"solid",labelKey:"solid",defaultLabel:"Solid",icon:Wt(Vn,{width:14,height:14})},{value:"dashed",labelKey:"dashed",defaultLabel:"Dashed",icon:Wt(Pn,{width:14,height:14})},{value:"dotted",labelKey:"dotted",defaultLabel:"Dotted",icon:Wt(Tn,{width:14,height:14})}],P9=new Set(T9.map(e=>e.value));function hs(e){if(!e)return"none";if(P9.has(e))return e;let t=e.split(/\s+/)[0]??"";return P9.has(t)?t:"none"}function V9({label:e="Border Style",value:t,onChange:o,id:a="border-style",optionLabels:r}){let l=T9.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Wt(v1,{label:e,options:l,value:hs(t),onChange:o,id:a})}import Oe from"react";function Te(e,t){return e.replace(/\{(\d+)\}/g,(o,a)=>{let r=t[Number(a)];return r===void 0?o:String(r)})}function c1(e,t){if(t==null||typeof t!="object"||typeof e!="object")return e;let o={...e},a=t;for(let r of Object.keys(o)){let l=o[r],n=a[r];l!==null&&typeof l=="object"&&!Array.isArray(l)?o[r]=c1(l,n):typeof n=="string"&&(o[r]=n)}return o}var _9=[{path:"general.headerTitle"},{path:"general.emptyPlaceholder"},{path:"general.inlineEditEditable"},{path:"general.inlineEditNonEditable"},{path:"general.addToChatContext"},{path:"general.ariaPropertyPanel"},{path:"general.ariaSelectedComponent"},{path:"general.ariaElementStyling"},{path:"sections.imageSource"},{path:"sections.background"},{path:"sections.spacing"},{path:"sections.border"},{path:"sections.typography"},{path:"sections.elementDimensions"},{path:"instances.imageSource"},{path:"instances.backgroundColor"},{path:"instances.padding"},{path:"instances.margin"},{path:"instances.borderRadius"},{path:"instances.borderWeight"},{path:"instances.borderStyle"},{path:"instances.borderColor"},{path:"instances.fontFamily"},{path:"instances.fontSize"},{path:"instances.fontWeight"},{path:"instances.fontStyle"},{path:"instances.textColor"},{path:"instances.textAlignment"},{path:"instances.textFormatting"},{path:"instances.textTransform"},{path:"instances.lineHeight"},{path:"instances.letterSpacing"},{path:"instances.width"},{path:"instances.minWidth"},{path:"instances.maxWidth"},{path:"instances.height"},{path:"instances.minHeight"},{path:"instances.maxHeight"},{path:"instances.overflow"},{path:"editors.image.tabCms"},{path:"editors.image.tabLocal"},{path:"editors.image.tabUrl"},{path:"editors.image.ariaTablist"},{path:"editors.image.clearImage"},{path:"editors.image.chooseFile"},{path:"editors.image.ariaChooseFile"},{path:"editors.image.useThisImage"},{path:"editors.image.ariaImageUrl"},{path:"editors.image.urlPlaceholder"},{path:"editors.image.previewAlt"},{path:"editors.image.altText"},{path:"editors.image.altPlaceholder"},{path:"editors.image.width"},{path:"editors.image.height"},{path:"editors.image.autoPlaceholder"},{path:"editors.image.workspace"},{path:"editors.image.selectWorkspace"},{path:"editors.image.selectImage"},{path:"editors.image.loadingWorkspaces"},{path:"editors.image.noWorkspaces"},{path:"editors.image.loadingImages"},{path:"editors.image.noImages"},{path:"editors.image.loadingMore"},{path:"editors.image.untitled"},{path:"editors.image.downloadingImage"},{path:"editors.image.downloadFailed"},{path:"editors.image.closePicker"},{path:"editors.image.cancel"},{path:"editors.image.done"},{path:"editors.image.pickerTitle",placeholders:[0]},{path:"editors.image.pickerError",placeholders:[0]},{path:"editors.boxDimension.sides.top"},{path:"editors.boxDimension.sides.right"},{path:"editors.boxDimension.sides.bottom"},{path:"editors.boxDimension.sides.left"},{path:"editors.boxDimension.corners.topLeft"},{path:"editors.boxDimension.corners.topRight"},{path:"editors.boxDimension.corners.bottomRight"},{path:"editors.boxDimension.corners.bottomLeft"},{path:"editors.boxDimension.linkSides"},{path:"editors.boxDimension.unlinkSides"},{path:"editors.boxDimension.ariaUnit",placeholders:[0]},{path:"editors.boxDimension.ariaSide",placeholders:[0,1]},{path:"editors.dimension.ariaValue",placeholders:[0]},{path:"editors.dimension.ariaUnit",placeholders:[0]},{path:"editors.color.placeholder"},{path:"editors.color.ariaValue",placeholders:[0]},{path:"editors.color.ariaOpenPicker",placeholders:[0,1]},{path:"editors.color.ariaPicker",placeholders:[0]},{path:"editors.color.ariaSaturation"},{path:"editors.color.ariaEyedropper"},{path:"editors.color.ariaHue"},{path:"editors.color.ariaAlphaSlider"},{path:"editors.color.ariaHex"},{path:"editors.color.ariaChannel",placeholders:[0,1,2,3]},{path:"editors.color.ariaAlphaInput"},{path:"editors.color.ariaFormatCycle",placeholders:[0]},{path:"editors.color.titleFormatCycle"},{path:"editors.fontWeight.options.default"},{path:"editors.fontWeight.options.thin"},{path:"editors.fontWeight.options.extraLight"},{path:"editors.fontWeight.options.light"},{path:"editors.fontWeight.options.regular"},{path:"editors.fontWeight.options.medium"},{path:"editors.fontWeight.options.semiBold"},{path:"editors.fontWeight.options.bold"},{path:"editors.fontWeight.options.extraBold"},{path:"editors.fontWeight.options.black"},{path:"editors.fontStyle.options.normal"},{path:"editors.fontStyle.options.italic"},{path:"editors.borderStyle.options.none"},{path:"editors.borderStyle.options.solid"},{path:"editors.borderStyle.options.dashed"},{path:"editors.borderStyle.options.dotted"},{path:"editors.overflow.options.default"},{path:"editors.overflow.options.visible"},{path:"editors.overflow.options.hidden"},{path:"editors.overflow.options.scroll"},{path:"editors.overflow.options.auto"},{path:"editors.textAlignment.options.left"},{path:"editors.textAlignment.options.center"},{path:"editors.textAlignment.options.right"},{path:"editors.textAlignment.options.justify"},{path:"editors.textDecoration.options.none"},{path:"editors.textDecoration.options.underline"},{path:"editors.textDecoration.options.lineThrough"},{path:"editors.textTransform.options.none"},{path:"editors.textTransform.options.uppercase"},{path:"editors.textTransform.options.lowercase"},{path:"editors.textTransform.options.capitalize"},{path:"editors.fontFamily.options.default"}];function gs(e,t){return t.split(".").reduce((o,a)=>{if(o&&typeof o=="object")return o[a]},e)}function vs(e){let t=new Set;for(let o of e.matchAll(/\{(\d+)\}/g))t.add(Number(o[1]));return Array.from(t).sort((o,a)=>o-a)}function xs(e){let t=[];if(!e||typeof e!="object")return["labels is not an object"];for(let o of _9){let{path:a,placeholders:r}=o,l=gs(e,a);if(typeof l!="string"){t.push(`missing or non-string label: ${a}`);continue}if(r){let n=vs(l),i=[...r].sort((d,u)=>d-u);(n.length!==i.length||n.some((d,u)=>d!==i[u]))&&t.push(`placeholder mismatch at ${a}: expected {${i.join(",")}}, got {${n.join(",")}}`)}}return t}var Vo=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"},{value:"pt",label:"pt"},{value:"vw",label:"vw"},{value:"vh",label:"vh"},{value:"vmin",label:"vmin"},{value:"vmax",label:"vmax"},{value:"ch",label:"ch"},{value:"ex",label:"ex"},{value:"cm",label:"cm"},{value:"mm",label:"mm"},{value:"in",label:"in"},{value:"pc",label:"pc"}],f1={px:{min:0,max:1e4,step:1,decimals:1},em:{min:0,max:100,step:.1,decimals:3},rem:{min:0,max:100,step:.1,decimals:3},"%":{min:0,max:1e3,step:1,decimals:2},pt:{min:0,max:1e4,step:1,decimals:1},vw:{min:0,max:100,step:.1,decimals:1},vh:{min:0,max:100,step:.1,decimals:1},vmin:{min:0,max:100,step:.1,decimals:1},vmax:{min:0,max:100,step:.1,decimals:1},ch:{min:0,max:100,step:.1,decimals:1},ex:{min:0,max:100,step:.1,decimals:1},cm:{min:0,max:100,step:.1,decimals:2},mm:{min:0,max:1e3,step:1,decimals:1},in:{min:0,max:50,step:.01,decimals:2},pc:{min:0,max:500,step:1,decimals:0}},Ls=f1.px??{min:0,max:1e4,step:1,decimals:0};function Xt(e){let t=e.map(o=>o.value).join("|");return new RegExp(`^(-?\\d*\\.?\\d+)\\s*(${t})$`)}var ws=Xt(Vo);function $e(e,t="px",o=ws){if(e==null||e==="")return{numericValue:"",unit:t};let a=String(e).trim();if(a==="")return{numericValue:"",unit:t};let r=a.match(o);if(r&&r[1]!=null&&r[2]!=null)return{numericValue:parseFloat(r[1]),unit:r[2]};let l=parseFloat(a);return isNaN(l)?{numericValue:"",unit:t}:{numericValue:l,unit:t}}function or(e,t=f1){return t[e]||Ls}function p1(e,t,o=f1){let a=or(t,o);return Math.min(a.max,Math.max(a.min,e))}function C1(e,t,o=f1){if(e===""||e==null||isNaN(e))return"";let a=or(t,o);return Number(Number(e).toFixed(a.decimals))}function _o(e,t){return e===""||e==null||isNaN(e)?"":`${e}${t}`}function Do(e,t,o,a,r=f1){let l=parseFloat(e)||0,n=or(a,r),i=o?10:1,s=(t==="ArrowUp"?1:-1)*n.step*i,d=p1(l+s,a,r);return String(C1(d,a,r))}function ar({top:e,right:t,bottom:o,left:a}){return`${e||"0px"} ${t||"0px"} ${o||"0px"} ${a||"0px"}`}function vt(e){let t={top:"",right:"",bottom:"",left:""};if(!e||typeof e!="string")return t;let o=e.trim().split(/\s+/),[a="",r="",l="",n=""]=o;return o.length===0||o.length===1&&a===""?t:o.length===1?{top:a,right:a,bottom:a,left:a}:o.length===2?{top:a,right:r,bottom:a,left:r}:o.length===3?{top:a,right:r,bottom:l,left:r}:{top:a,right:r,bottom:l,left:n}}function o1(...e){return Vo.filter(t=>e.includes(t.value))}var x1={width:{units:o1("px","em","rem","vw","ch","%"),icon:e9},minWidth:{units:o1("px","em","rem","vw","ch","%")},maxWidth:{units:o1("px","em","rem","vw","ch","%")},height:{units:o1("px","em","rem","vh","%"),icon:Bn},minHeight:{units:o1("px","em","rem","vh","%")},maxHeight:{units:o1("px","em","rem","vh","%")},fontSize:{units:o1("px","em","rem","%","pt"),constraints:{...f1,px:{min:0,max:1e3,step:1,decimals:0},"%":{min:0,max:1e3,step:1,decimals:0}},icon:En},lineHeight:{units:[],defaultUnit:"",constraints:{"":{min:0,max:10,step:.1,decimals:2}},icon:Un},letterSpacing:{units:o1("px","em","rem"),constraints:{...f1,px:{min:-100,max:1e3,step:.5,decimals:1},em:{min:-10,max:100,step:.01,decimals:3},rem:{min:-10,max:100,step:.01,decimals:3}},icon:Nn}},Qt={padding:{units:o1("px","em","rem","%")},margin:{units:o1("px","em","rem","%")},borderRadius:{units:o1("px","em","rem","%"),sideLabelKind:"corners"},borderWidth:{units:o1("px","em","rem")}};import{jsx as m1,jsxs as Oo}from"react/jsx-runtime";var Is=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],xt=["top","right","bottom","left"],bs={sides:{top:"Top",right:"Right",bottom:"Bottom",left:"Left"},corners:{topLeft:"Top Left",topRight:"Top Right",bottomRight:"Bottom Right",bottomLeft:"Bottom Left"},linkSides:"Link all sides",unlinkSides:"Unlink sides",ariaUnit:"{0} unit",ariaSide:"{0} {1}"};function ys(e,t){return t==="corners"?[e.corners.topLeft,e.corners.topRight,e.corners.bottomRight,e.corners.bottomLeft]:[e.sides.top,e.sides.right,e.sides.bottom,e.sides.left]}var Ms=m1(qn,{width:14,height:14}),Ss=m1(zn,{width:14,height:14});function Jt(e){return typeof e=="string"&&e.trim().toLowerCase()==="auto"}function rr(e,t,o){let a={top:"",right:"",bottom:"",left:""};for(let r of xt){let l=e[r];if(l==null||l==="")a[r]="";else if(Jt(l))a[r]="auto";else{let n=$e(String(l),t,o);a[r]=n.numericValue!==""?String(n.numericValue):""}}return a}function lr(e){let t=e.top||"";return t===(e.right||"")&&t===(e.bottom||"")&&t===(e.left||"")}function D9(e,t,o){for(let a of xt){let r=e[a];if(r!=null&&r!==""&&r!=="0"){let l=$e(String(r),"px",t);if(l.unit&&o.has(l.unit))return l.unit}}return"px"}function Rs(e,t,o){if(Jt(e))return"auto";let a=parseFloat(e);if(e===""||isNaN(a))return"";let r=p1(a,t,o);return`${C1(r,t,o)}${t}`}function O9(e){if(!e)return"";let t=vt(e);return!t.top&&!t.right&&!t.bottom&&!t.left?"":ar(t)}function Yt({label:e,value:t="",onChange:o,id:a="",units:r=Is,constraints:l=f1,allowAuto:n=!1,sideLabelKind:i="sides",sideIcons:s,placeholder:d="",aria:u}){let p=c1(bs,u),C=ys(p,i),c=Oe.useRef(o);c.current=o;let x=Oe.useMemo(()=>Xt(r),[r]),w=Oe.useMemo(()=>new Set(r.map(R=>R.value)),[r]),h=Oe.useMemo(()=>{if(!d)return{top:"0",right:"0",bottom:"0",left:"0"};let R=vt(d),I={top:"0",right:"0",bottom:"0",left:"0"};for(let b of xt){let L=R[b];if(!L||L==="")I[b]="0";else{let Z=$e(L,"px",x);I[b]=Z.numericValue!==""?String(Z.numericValue):"0"}}return I},[d,x]),M=Oe.useMemo(()=>vt(t),[]),[v,T]=Oe.useState(()=>D9(M,x,w)),[g,O]=Oe.useState(()=>rr(M,v,x)),[P,z]=Oe.useState(()=>lr(g)),S=Oe.useRef(O9(t));Oe.useEffect(()=>{if(t===S.current)return;let R=O9(t);if(R===S.current)return;S.current=R;let I=vt(t),b=D9(I,x,w);T(b);let L=rr(I,b,x);O(L),z(lr(L))},[t,x,w]);let A=Oe.useCallback((R,I)=>{let b={top:"",right:"",bottom:"",left:""},L=!0;for(let _ of xt)b[_]=Rs(R[_],I,l),b[_]!==""&&(L=!1);let Z=L?"":ar(b);Z!==S.current&&(S.current=Z,typeof c.current=="function"&&c.current(Z))},[l]),j=Oe.useCallback((R,I)=>{O(P?{top:I,right:I,bottom:I,left:I}:L=>({...L,[R]:I}));let b=$e(I,v,x);b.numericValue!==""&&b.unit&&w.has(b.unit)&&b.unit!==v&&T(b.unit)},[P,v,x,w]),$=Oe.useCallback((R,I)=>{let b=I.clipboardData.getData("text"),L=$e(b,v,x);if(L.numericValue!==""&&L.unit&&w.has(L.unit)){I.preventDefault();let Z=p1(L.numericValue,L.unit,l),_=String(C1(Z,L.unit,l)),F=P?{top:_,right:_,bottom:_,left:_}:{...g,[R]:_};O(F),L.unit!==v&&T(L.unit),A(F,L.unit)}},[P,g,v,x,w,l,A]),K=Oe.useCallback(R=>{let I=g[R];if(I===""){let F=P?{top:"",right:"",bottom:"",left:""}:{...g,[R]:""};O(F),A(F,v);return}if(n&&Jt(I)){let F="auto",D=P?{top:F,right:F,bottom:F,left:F}:{...g,[R]:F};O(D),A(D,v);return}let b=parseFloat(I);if(isNaN(b)){let F=vt(S.current);O(rr(F,v,x));return}let L=p1(b,v,l),Z=String(C1(L,v,l)),_=P?{top:Z,right:Z,bottom:Z,left:Z}:{...g,[R]:Z};O(_),A(_,v)},[g,P,v,x,l,A,n]),B=Oe.useCallback((R,I)=>{if(I.key==="Enter"){I.currentTarget.blur();return}if(I.key==="ArrowUp"||I.key==="ArrowDown"){if(Jt(g[R]))return;I.preventDefault();let b=Do(g[R],I.key,I.shiftKey,v,l);if(b===null)return;let L=P?{top:b,right:b,bottom:b,left:b}:{...g,[R]:b};O(L),A(L,v)}},[g,P,v,l,A]),N=Oe.useCallback(R=>{let I=R.target.value;if(!w.has(I))return;T(I);let b={top:"",right:"",bottom:"",left:""};for(let L of xt){let Z=g[L];if(Jt(Z))b[L]="auto";else if(Z!==""){let _=parseFloat(Z);if(isNaN(_))b[L]=Z;else{let F=p1(_,I,l);b[L]=String(C1(F,I,l))}}else b[L]=""}O(b),A(b,I)},[g,w,l,A]);return Oo(t1,{label:e,id:a,className:"boxDimensionEditor-fieldset",children:[m1("div",{className:"boxDimensionEditor-header",children:Oo("div",{className:"boxDimensionEditor-controls",children:[m1("button",{type:"button",className:"boxDimensionEditor-link-btn"+(P?" boxDimensionEditor-link-btn--active":""),onClick:()=>{if(!P){let R=g.top;if(!lr(g)){let I={top:R,right:R,bottom:R,left:R};O(I),A(I,v)}}z(R=>!R)},"aria-label":P?p.unlinkSides:p.linkSides,"aria-pressed":P,title:P?p.unlinkSides:p.linkSides,children:P?Ms:Ss}),m1("select",{className:"boxDimensionEditor-unit",value:v,onChange:N,"aria-label":Te(p.ariaUnit,[e]),children:r.map(R=>m1("option",{value:R.value,children:R.label},R.value))})]})}),m1("div",{className:"boxDimensionEditor-grid",children:xt.map((R,I)=>{let b=s&&s[I];return Oo("div",{className:"boxDimensionEditor-cell",children:[m1("label",{htmlFor:`${a}-${R}`,className:"boxDimensionEditor-label",children:C[I]}),Oo("div",{className:"boxDimensionEditor-input-row",children:[b&&m1("span",{className:"boxDimensionEditor-input-icon","aria-hidden":"true",children:m1(b,{size:12,width:12,height:12})}),m1("input",{id:`${a}-${R}`,type:"text",className:b?"boxDimensionEditor-input boxDimensionEditor-input--with-icon":"boxDimensionEditor-input",value:g[R],placeholder:h[R],onChange:L=>j(R,L.target.value),onPaste:L=>$(R,L),onBlur:()=>K(R),onKeyDown:L=>B(R,L),"aria-label":Te(p.ariaSide,[e,C[I]??""]),autoComplete:"off",spellCheck:"false"})]})]},R)})})]})}import{forwardRef as ks,createElement as Ps}from"react";var Eo=(...e)=>e.filter((t,o,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===o).join(" ").trim();var E9=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var B9=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,a)=>a?a.toUpperCase():o.toLowerCase());var nr=e=>{let t=B9(e);return t.charAt(0).toUpperCase()+t.slice(1)};import{forwardRef as Hs,createElement as F9}from"react";var A9={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Z9=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var $9=Hs(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:r="",children:l,iconNode:n,...i},s)=>F9("svg",{ref:s,...A9,width:t,height:t,stroke:e,strokeWidth:a?Number(o)*24/Number(t):o,className:Eo("lucide",r),...!l&&!Z9(i)&&{"aria-hidden":"true"},...i},[...n.map(([d,u])=>F9(d,u)),...Array.isArray(l)?l:[l]]));var N9=(e,t)=>{let o=ks(({className:a,...r},l)=>Ps($9,{ref:l,iconNode:t,className:Eo(`lucide-${E9(nr(e))}`,`lucide-${e}`,a),...r}));return o.displayName=nr(e),o};var Ts=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],eo=N9("pipette",Ts);import ve from"react";import{useRef as Fo,useCallback as Ve,useEffect as Cr,useMemo as $o,useState as mr,createContext as Vs,useContext as _s}from"react";var U9={exports:{}},to={};var q9;function Ds(){if(q9)return to;q9=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(a,r,l){var n=null;if(l!==void 0&&(n=""+l),r.key!==void 0&&(n=""+r.key),"key"in r){l={};for(var i in r)i!=="key"&&(l[i]=r[i])}else l=r;return r=l.ref,{$$typeof:e,type:a,key:n,ref:r!==void 0?r:null,props:l}}return to.Fragment=t,to.jsx=o,to.jsxs=o,to}var z9;function Os(){return z9||(z9=1,U9.exports=Ds()),U9.exports}var Le=Os();function e2(e){var t,o,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=e2(e[t]))&&(a&&(a+=" "),a+=o)}else for(o in e)e[o]&&(a&&(a+=" "),a+=o);return a}function Es(){for(var e,t,o=0,a="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=e2(e))&&(a&&(a+=" "),a+=t);return a}var hr="-",Bs=e=>{let t=Zs(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:r=>{let l=r.split(hr);return l[0]===""&&l.length!==1&&l.shift(),t2(l,t)||As(r)},getConflictingClassGroupIds:(r,l)=>{let n=o[r]||[];return l&&a[r]?[...n,...a[r]]:n}}},t2=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),r=a?t2(e.slice(1),a):void 0;if(r)return r;if(t.validators.length===0)return;let l=e.join(hr);return t.validators.find(({validator:n})=>n(l))?.classGroupId},j9=/^\[(.+)\]$/,As=e=>{if(j9.test(e)){let t=j9.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},Zs=e=>{let{theme:t,classGroups:o}=e,a={nextPart:new Map,validators:[]};for(let r in o)dr(o[r],a,r,t);return a},dr=(e,t,o,a)=>{e.forEach(r=>{if(typeof r=="string"){let l=r===""?t:K9(t,r);l.classGroupId=o;return}if(typeof r=="function"){if(Fs(r)){dr(r(a),t,o,a);return}t.validators.push({validator:r,classGroupId:o});return}Object.entries(r).forEach(([l,n])=>{dr(n,K9(t,l),o,a)})})},K9=(e,t)=>{let o=e;return t.split(hr).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},Fs=e=>e.isThemeGetter,$s=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,r=(l,n)=>{o.set(l,n),t++,t>e&&(t=0,a=o,o=new Map)};return{get(l){let n=o.get(l);if(n!==void 0)return n;if((n=a.get(l))!==void 0)return r(l,n),n},set(l,n){o.has(l)?o.set(l,n):r(l,n)}}},ur="!",cr=":",Ns=cr.length,Us=e=>{let{prefix:t,experimentalParseClassName:o}=e,a=r=>{let l=[],n=0,i=0,s=0,d;for(let x=0;x<r.length;x++){let w=r[x];if(n===0&&i===0){if(w===cr){l.push(r.slice(s,x)),s=x+Ns;continue}if(w==="/"){d=x;continue}}w==="["?n++:w==="]"?n--:w==="("?i++:w===")"&&i--}let u=l.length===0?r:r.substring(s),p=qs(u),C=p!==u,c=d&&d>s?d-s:void 0;return{modifiers:l,hasImportantModifier:C,baseClassName:p,maybePostfixModifierPosition:c}};if(t){let r=t+cr,l=a;a=n=>n.startsWith(r)?l(n.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:n,maybePostfixModifierPosition:void 0}}if(o){let r=a;a=l=>o({className:l,parseClassName:r})}return a},qs=e=>e.endsWith(ur)?e.substring(0,e.length-1):e.startsWith(ur)?e.substring(1):e,zs=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;let a=[],r=[];return o.forEach(l=>{l[0]==="["||t[l]?(a.push(...r.sort(),l),r=[]):r.push(l)}),a.push(...r.sort()),a}},js=e=>({cache:$s(e.cacheSize),parseClassName:Us(e),sortModifiers:zs(e),...Bs(e)}),Ks=/\s+/,Gs=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:l}=t,n=[],i=e.trim().split(Ks),s="";for(let d=i.length-1;d>=0;d-=1){let u=i[d],{isExternal:p,modifiers:C,hasImportantModifier:c,baseClassName:x,maybePostfixModifierPosition:w}=o(u);if(p){s=u+(s.length>0?" "+s:s);continue}let h=!!w,M=a(h?x.substring(0,w):x);if(!M){if(!h){s=u+(s.length>0?" "+s:s);continue}if(M=a(x),!M){s=u+(s.length>0?" "+s:s);continue}h=!1}let v=l(C).join(":"),T=c?v+ur:v,g=T+M;if(n.includes(g))continue;n.push(g);let O=r(M,h);for(let P=0;P<O.length;++P){let z=O[P];n.push(T+z)}s=u+(s.length>0?" "+s:s)}return s};function Ws(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=o2(t))&&(a&&(a+=" "),a+=o);return a}var o2=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=o2(e[a]))&&(o&&(o+=" "),o+=t);return o};function Xs(e,...t){let o,a,r,l=n;function n(s){let d=t.reduce((u,p)=>p(u),e());return o=js(d),a=o.cache.get,r=o.cache.set,l=i,i(s)}function i(s){let d=a(s);if(d)return d;let u=Gs(s,o);return r(s,u),u}return function(){return l(Ws.apply(null,arguments))}}var ye=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},a2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,r2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Qs=/^\d+\/\d+$/,Js=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ys=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,e3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,t3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,o3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lt=e=>Qs.test(e),re=e=>!!e&&!Number.isNaN(Number(e)),A1=e=>!!e&&Number.isInteger(Number(e)),ir=e=>e.endsWith("%")&&re(e.slice(0,-1)),k1=e=>Js.test(e),a3=()=>!0,r3=e=>Ys.test(e)&&!e3.test(e),l2=()=>!1,l3=e=>t3.test(e),n3=e=>o3.test(e),i3=e=>!U(e)&&!q(e),s3=e=>wt(e,s2,l2),U=e=>a2.test(e),lt=e=>wt(e,d2,r3),sr=e=>wt(e,p3,re),G9=e=>wt(e,n2,l2),d3=e=>wt(e,i2,n3),Bo=e=>wt(e,u2,l3),q=e=>r2.test(e),oo=e=>It(e,d2),u3=e=>It(e,C3),W9=e=>It(e,n2),c3=e=>It(e,s2),f3=e=>It(e,i2),Ao=e=>It(e,u2,!0),wt=(e,t,o)=>{let a=a2.exec(e);return a?a[1]?t(a[1]):o(a[2]):!1},It=(e,t,o=!1)=>{let a=r2.exec(e);return a?a[1]?t(a[1]):o:!1},n2=e=>e==="position"||e==="percentage",i2=e=>e==="image"||e==="url",s2=e=>e==="length"||e==="size"||e==="bg-size",d2=e=>e==="length",p3=e=>e==="number",C3=e=>e==="family-name",u2=e=>e==="shadow",m3=()=>{let e=ye("color"),t=ye("font"),o=ye("text"),a=ye("font-weight"),r=ye("tracking"),l=ye("leading"),n=ye("breakpoint"),i=ye("container"),s=ye("spacing"),d=ye("radius"),u=ye("shadow"),p=ye("inset-shadow"),C=ye("text-shadow"),c=ye("drop-shadow"),x=ye("blur"),w=ye("perspective"),h=ye("aspect"),M=ye("ease"),v=ye("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],g=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],O=()=>[...g(),q,U],P=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],S=()=>[q,U,s],A=()=>[Lt,"full","auto",...S()],j=()=>[A1,"none","subgrid",q,U],$=()=>["auto",{span:["full",A1,q,U]},A1,q,U],K=()=>[A1,"auto",q,U],B=()=>["auto","min","max","fr",q,U],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...S()],b=()=>[Lt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],L=()=>[e,q,U],Z=()=>[...g(),W9,G9,{position:[q,U]}],_=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",c3,s3,{size:[q,U]}],D=()=>[ir,oo,lt],m=()=>["","none","full",d,q,U],f=()=>["",re,oo,lt],k=()=>["solid","dashed","dotted","double"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],y=()=>[re,ir,W9,G9],G=()=>["","none",x,q,U],ee=()=>["none",re,q,U],oe=()=>["none",re,q,U],ue=()=>[re,q,U],ce=()=>[Lt,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[k1],breakpoint:[k1],color:[a3],container:[k1],"drop-shadow":[k1],ease:["in","out","in-out"],font:[i3],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[k1],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[k1],shadow:[k1],spacing:["px",re],text:[k1],"text-shadow":[k1],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lt,U,q,h]}],container:["container"],columns:[{columns:[re,U,q,i]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:O()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[A1,"auto",q,U]}],basis:[{basis:[Lt,"full","auto",i,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,Lt,"auto","initial","none",U]}],grow:[{grow:["",re,q,U]}],shrink:[{shrink:["",re,q,U]}],order:[{order:[A1,"first","last","none",q,U]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:b()}],w:[{w:[i,"screen",...b()]}],"min-w":[{"min-w":[i,"screen","none",...b()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[n]},...b()]}],h:[{h:["screen","lh",...b()]}],"min-h":[{"min-h":["screen","lh","none",...b()]}],"max-h":[{"max-h":["screen","lh",...b()]}],"font-size":[{text:["base",o,oo,lt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,q,sr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ir,U]}],"font-family":[{font:[u3,U,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[r,q,U]}],"line-clamp":[{"line-clamp":[re,"none",q,sr]}],leading:[{leading:[l,...S()]}],"list-image":[{"list-image":["none",q,U]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",q,U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",q,lt]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[re,"auto",q,U]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",q,U]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",q,U]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:_()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},A1,q,U],radial:["",q,U],conic:[A1,q,U]},f3,d3]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:D()}],"gradient-via-pos":[{via:D()}],"gradient-to-pos":[{to:D()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:m()}],"rounded-s":[{"rounded-s":m()}],"rounded-e":[{"rounded-e":m()}],"rounded-t":[{"rounded-t":m()}],"rounded-r":[{"rounded-r":m()}],"rounded-b":[{"rounded-b":m()}],"rounded-l":[{"rounded-l":m()}],"rounded-ss":[{"rounded-ss":m()}],"rounded-se":[{"rounded-se":m()}],"rounded-ee":[{"rounded-ee":m()}],"rounded-es":[{"rounded-es":m()}],"rounded-tl":[{"rounded-tl":m()}],"rounded-tr":[{"rounded-tr":m()}],"rounded-br":[{"rounded-br":m()}],"rounded-bl":[{"rounded-bl":m()}],"border-w":[{border:f()}],"border-w-x":[{"border-x":f()}],"border-w-y":[{"border-y":f()}],"border-w-s":[{"border-s":f()}],"border-w-e":[{"border-e":f()}],"border-w-t":[{"border-t":f()}],"border-w-r":[{"border-r":f()}],"border-w-b":[{"border-b":f()}],"border-w-l":[{"border-l":f()}],"divide-x":[{"divide-x":f()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":f()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...k(),"hidden","none"]}],"divide-style":[{divide:[...k(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...k(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,q,U]}],"outline-w":[{outline:["",re,oo,lt]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",u,Ao,Bo]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",p,Ao,Bo]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:f()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[re,lt]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":f()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",C,Ao,Bo]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[re,q,U]}],"mix-blend":[{"mix-blend":[...H(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":H()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[re]}],"mask-image-linear-from-pos":[{"mask-linear-from":y()}],"mask-image-linear-to-pos":[{"mask-linear-to":y()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":y()}],"mask-image-t-to-pos":[{"mask-t-to":y()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":y()}],"mask-image-r-to-pos":[{"mask-r-to":y()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":y()}],"mask-image-b-to-pos":[{"mask-b-to":y()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":y()}],"mask-image-l-to-pos":[{"mask-l-to":y()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":y()}],"mask-image-x-to-pos":[{"mask-x-to":y()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":y()}],"mask-image-y-to-pos":[{"mask-y-to":y()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[q,U]}],"mask-image-radial-from-pos":[{"mask-radial-from":y()}],"mask-image-radial-to-pos":[{"mask-radial-to":y()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":g()}],"mask-image-conic-pos":[{"mask-conic":[re]}],"mask-image-conic-from-pos":[{"mask-conic-from":y()}],"mask-image-conic-to-pos":[{"mask-conic-to":y()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:_()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",q,U]}],filter:[{filter:["","none",q,U]}],blur:[{blur:G()}],brightness:[{brightness:[re,q,U]}],contrast:[{contrast:[re,q,U]}],"drop-shadow":[{"drop-shadow":["","none",c,Ao,Bo]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",re,q,U]}],"hue-rotate":[{"hue-rotate":[re,q,U]}],invert:[{invert:["",re,q,U]}],saturate:[{saturate:[re,q,U]}],sepia:[{sepia:["",re,q,U]}],"backdrop-filter":[{"backdrop-filter":["","none",q,U]}],"backdrop-blur":[{"backdrop-blur":G()}],"backdrop-brightness":[{"backdrop-brightness":[re,q,U]}],"backdrop-contrast":[{"backdrop-contrast":[re,q,U]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,q,U]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,q,U]}],"backdrop-invert":[{"backdrop-invert":["",re,q,U]}],"backdrop-opacity":[{"backdrop-opacity":[re,q,U]}],"backdrop-saturate":[{"backdrop-saturate":[re,q,U]}],"backdrop-sepia":[{"backdrop-sepia":["",re,q,U]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",q,U]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",q,U]}],ease:[{ease:["linear","initial",M,q,U]}],delay:[{delay:[re,q,U]}],animate:[{animate:["none",v,q,U]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,q,U]}],"perspective-origin":[{"perspective-origin":O()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[q,U,"","none","gpu","cpu"]}],"transform-origin":[{origin:O()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",q,U]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",q,U]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[re,oo,lt,sr]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},h3=Xs(m3),g3=(e,t,o)=>Math.min(Math.max(e,t),o),Zo=e=>Math.round(g3(e,0,255)),c2=e=>{let t=e.replace("#",""),o=parseInt(t,16);return{r:o>>16&255,g:o>>8&255,b:o&255}},v3=({r:e,g:t,b:o})=>{let a=r=>Zo(r).toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(o)}`},fr=({h:e,s:t,v:o})=>{e=e/360,t=t/100,o=o/100;let a=Math.floor(e*6),r=e*6-a,l=o*(1-t),n=o*(1-r*t),i=o*(1-(1-r)*t),s,d,u;switch(a%6){case 0:s=o,d=i,u=l;break;case 1:s=n,d=o,u=l;break;case 2:s=l,d=o,u=i;break;case 3:s=l,d=n,u=o;break;case 4:s=i,d=l,u=o;break;case 5:s=o,d=l,u=n;break;default:s=d=u=0}return{r:Zo(s*255),g:Zo(d*255),b:Zo(u*255)}},pr=({r:e,g:t,b:o})=>{e/=255,t/=255,o/=255;let a=Math.max(e,t,o),r=Math.min(e,t,o),l=a-r,n=0,i=a===0?0:l/a,s=a;if(l!==0)switch(a){case e:n=((t-o)/l+(t<o?6:0))/6;break;case t:n=((o-e)/l+2)/6;break;case o:n=((e-t)/l+4)/6;break}return{h:Math.round(n*360),s:Math.round(i*100),v:Math.round(s*100)}},x3=e=>v3(fr(e)),L3=e=>pr(c2(e));var X9=({h:e,s:t,v:o})=>{let a=o*(2-t/100)/2,r=a!==0&&a!==100?(o-a)/Math.min(a,100-a)*100:0;return{h:e,s:Math.round(r),l:Math.round(a)}},Q9=({h:e,s:t,l:o})=>{let a=o+t*Math.min(o,100-o)/100,r=a===0?0:2*(1-o/a)*100;return{h:e,s:Math.round(r),v:Math.round(a)}},w3=e=>{let{r:t,g:o,b:a}=c2(e);return(.299*t+.587*o+.114*a)/255>.5?"#000000":"#ffffff"};var I3=(e,t="hex")=>{switch(t){case"hex":return e.getHex();case"rgb":let o=e.getRgb();return`rgb(${o.r}, ${o.g}, ${o.b})`;case"rgba":let a=e.getRgba();return`rgba(${a.r}, ${a.g}, ${a.b}, ${a.a})`;case"hsl":let r=e.getHsl();return`hsl(${r.h}, ${r.s}%, ${r.l}%)`;case"hsla":let l=e.getHsla();return`hsla(${l.h}, ${l.s}%, ${l.l}%, ${l.a})`;default:No()}};function b3(e){switch(e.type){case"hex":return{...L3(e.value),a:1};case"rgb":return{...pr(e),a:1};case"rgba":return{...pr(e),a:e.a};case"hsl":return{...Q9(e),a:1};case"hsla":return{...Q9(e),a:1};case"hsv":return{...e,a:1};case"hsva":return{...e};default:No()}}function Z1(e,t){let o=b3(e);switch(t){case"hex":return x3(o);case"rgb":return fr(o);case"rgba":return{...fr(o),a:o.a};case"hsl":return X9(o);case"hsla":return{...X9(o),a:o.a};case"hsv":return{h:o.h,s:o.s,v:o.v};case"hsva":return o;default:No()}}var nt=(...e)=>h3(Es(e)),P1=(e,t,o)=>Math.min(Math.max(e,t),o),F1=e=>Math.round(e);function No(e){throw new Error("You should never get here.")}var $1=class e{constructor(t){this.colorInput=t,typeof t=="string"?this.color={type:"hex",value:t}:"type"in t?this.color=t:"r"in t?"a"in t?this.color={type:"rgba",...t}:this.color={type:"rgb",...t}:"v"in t?"a"in t?this.color={type:"hsva",...t}:this.color={type:"hsv",...t}:"a"in t?this.color={type:"hsla",...t}:this.color={type:"hsl",...t}}getRgb(){return Z1(this.color,"rgb")}getHsv(){return Z1(this.color,"hsv")}getHsla(){return Z1(this.color,"hsla")}getHsva(){return Z1(this.color,"hsva")}getHex(){return Z1(this.color,"hex")}getHsl(){return Z1(this.color,"hsl")}getRgba(){return Z1(this.color,"rgba")}format(t="hex"){return I3(this,t)}getContrastingColor(){return new e({type:"hex",value:w3(this.getHex())})}},J9=(e,t)=>{let o=e.getBoundingClientRect(),a,r;if("touches"in t){let d=t.touches[0]||t.changedTouches[0];a=d.clientX,r=d.clientY}else a=t.clientX,r=t.clientY;let l=a-o.left,n=r-o.top,i=P1(l/o.width,0,1),s=P1(n/o.height,0,1);return{left:i,top:s}},gr=({onMove:e,onMoveEnd:t,onKey:o,children:a,className:r,...l})=>{let n=Fo(null),i=Fo(!1),s=Ve(C=>{!i.current||!n.current||(C.preventDefault(),e(J9(n.current,C)))},[e]),d=Ve(()=>{i.current=!1,t(),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",d)},[s,t]),u=Ve(C=>{let c=n.current;c&&(C.preventDefault(),i.current=!0,e(J9(c,C.nativeEvent)),document.addEventListener("mousemove",s),document.addEventListener("mouseup",d),document.addEventListener("touchmove",s,{passive:!1}),document.addEventListener("touchend",d))},[e,s,d]),p=Ve(C=>{if(!o)return;let c=C.which||C.keyCode;c<37||c>40||(C.preventDefault(),o({left:c===39?.05:c===37?-.05:0,top:c===40?.05:c===38?-.05:0}))},[o]);return Cr(()=>()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",d)},[s,d]),Le.jsx("div",{ref:n,className:nt("rounded-inherit absolute inset-0 touch-none outline-none","focus:[&_.react-colorful-pointer]:scale-110",r),onTouchStart:u,onMouseDown:u,onKeyDown:p,tabIndex:0,role:"slider",...l,children:a})},vr=({className:e,top:t=.5,left:o,color:a})=>Le.jsx("div",{className:nt("absolute z-[1] h-6 w-6 -translate-x-1/2 -translate-y-1/2 cursor-grab rounded-full border-2 border-white bg-white active:cursor-grabbing","react-colorful-pointer shadow-[0_2px_8px_rgba(0,0,0,0.15)] transition-transform",e),style:{top:`${t*100}%`,left:`${o*100}%`}}),y3=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Ve(s=>{t({a:s.left},!1)},[t]),l=Ve(s=>{t({a:P1(e.a+s.left,0,1)},!0)},[e.a,t]),n=$o(()=>new $1({type:"hsva",h:e.h,s:e.s,v:e.v,a:0}).format("hsla"),[e.h,e.s,e.v]),i=$o(()=>new $1({type:"hsva",h:e.h,s:e.s,v:e.v,a:1}).format("hsla"),[e.h,e.s,e.v]);return Le.jsx("div",{className:nt("relative h-full w-full",o),children:Le.jsxs(gr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Alpha","aria-valuetext":`${F1(e.a*100)}%`,"aria-valuenow":F1(e.a*100),"aria-valuemin":0,"aria-valuemax":100,className:"h-full w-full rounded-lg",children:[Le.jsx("div",{className:"absolute inset-0 rounded-lg bg-white",style:{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><rect x="8" width="8" height="8"/><rect y="8" width="8" height="8"/></svg>')`}}),Le.jsx("div",{className:"absolute inset-0 rounded-lg",style:{backgroundImage:`linear-gradient(90deg, ${n}, ${i})`}}),Le.jsx(vr,{className:"z-[1]",top:.5,left:e.a,color:""})]})})},M3=({hue:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Ve(n=>{let i=F1(P1(360*n.left,0,360));t({h:i},!1)},[t]),l=Ve(n=>{t({h:P1(e+n.left*360,0,360)},!0)},[e,t]);return Le.jsx("div",{className:nt("relative h-full w-full",o),children:Le.jsxs(gr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Hue","aria-valuenow":F1(e),"aria-valuemax":360,"aria-valuemin":0,className:"h-full w-full rounded-lg",children:[Le.jsx("div",{className:"absolute inset-0 rounded-lg",style:{background:"linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)"}}),Le.jsx(vr,{className:"z-[2]",top:.5,left:e/360,color:""})]})})},S3=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=Ve(i=>{let s=F1(P1(i.left*100,0,100)),d=F1(P1(100-i.top*100,0,100));t({s,v:d},!1)},[t]),l=Ve(i=>{t({s:P1(e.s+i.left*100,0,100),v:P1(e.v-i.top*100,0,100)},!0)},[e.s,e.v,t]),n=`hsl(${e.h}, 100%, 50%)`;return Le.jsx("div",{className:nt("relative h-full w-full rounded-xl",o),children:Le.jsxs(gr,{onMove:r,onMoveEnd:a,onKey:l,"aria-label":"Color","aria-valuetext":`Saturation ${F1(e.s)}%, Brightness ${F1(e.v)}%`,className:"rounded-inherit h-full w-full",children:[Le.jsx("div",{className:"rounded-inherit absolute inset-0 rounded-b-none",style:{backgroundColor:n,backgroundImage:"linear-gradient(to top, #000, rgba(0, 0, 0, 0)), linear-gradient(to right, #fff, rgba(255, 255, 255, 0))",boxShadow:"inset 0 0 0 1px rgba(0, 0, 0, 0.05)"}}),Le.jsx(vr,{className:"z-[3]",top:1-e.v/100,left:e.s/100,color:""})]})})},f2=Vs(null),Uo=()=>{let e=_s(f2);if(!e)throw new Error("ColorPicker compound components must be used within a ColorPicker");return e};function Y9(e){return"type"in e?new $1(e):e}var R3=({color:e,onChange:t,className:o,children:a,defaultColor:r,...l})=>{let[n,i]=mr(Y9(e??r??{h:340,s:58,v:100,a:1,type:"hsva"})),s=Fo(!1),d=Fo(n);Cr(()=>{!s.current&&e&&(d.current=Y9(e),i(d.current))},[e]);let u=Ve((x,w)=>{let h=new $1({type:"hsva",...d.current.getHsva(),...x});d.current=h,i(h),s.current=!w,t?.(h)},[t]),p=Ve(()=>{s.current=!1},[]),C=Ve(async()=>{if(!("EyeDropper"in window)){console.log("EyeDropper API not supported");return}try{let x=await new window.EyeDropper().open();x.sRGBHex&&u(Z1({type:"hex",value:x.sRGBHex},"hsva"),!0)}catch(x){console.log("EyeDropper cancelled or failed:",x)}},[t]),c={hsva:n.getHsva(),updateHsva:u,handleEyeDropper:C,onFinishedUpdates:p};return Le.jsx(f2.Provider,{value:c,children:Le.jsx("div",{...l,className:nt("relative flex h-[280px] w-[280px] cursor-default flex-col rounded-2xl bg-white shadow-lg select-none",o),children:a})})},H3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=Uo(),r=Ve((l,n)=>{o(l,n)},[o]);return Le.jsx(S3,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},k3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=Uo(),r=Ve((l,n)=>{o(l,n)},[o]);return Le.jsx(M3,{hue:t.h,onChange:r,className:e,onFinishedUpdates:a})},P3=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=Uo(),r=Ve((l,n)=>{o(l,n)},[o]);return Le.jsx(y3,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},T3=({className:e,title:t="Pick color from screen",children:o})=>{let{handleEyeDropper:a}=Uo(),[r,l]=mr(!1);return Cr(()=>{typeof window<"u"&&"EyeDropper"in window&&l(!0)},[]),r?Le.jsx("button",{onClick:a,className:nt("flex h-10 w-10 flex-shrink-0 cursor-pointer items-center justify-center rounded-lg transition-colors hover:bg-gray-100",e),title:t,children:o}):null},bt=Object.assign(R3,{Saturation:H3,Hue:k3,Alpha:P3,EyeDropper:T3});function V3(e,t){switch(t){case"hex":return{type:"hex",value:e.getHex()};case"rgb":return{type:"rgb",...e.getRgb()};case"rgba":return{type:"rgba",...e.getRgba()};case"hsl":return{type:"hsl",...e.getHsl()};case"hsla":return{type:"hsla",...e.getHsla()};case"hsv":return{type:"hsv",...e.getHsv()};case"hsva":return{type:"hsva",...e.getHsva()};default:No()}}var p2=(e={type:"hex",value:"#ff6b9d"})=>{let[t,o]=mr(()=>{let n=typeof e=="function"?e():e;return{color:new $1(n),type:n.type}}),a=$o(()=>V3(t.color,t.type),[t.color,t.type]),r=$o(()=>{let n=t.color.getHsva();return{hex:t.color.getHex(),rgb:t.color.getRgb(),rgba:t.color.getRgba(),hsl:t.color.getHsl(),hsla:t.color.getHsla(),hsv:t.color.getHsv(),hsva:n,alpha:n.a}},[t.color]),l=Ve(n=>{try{let i="type"in n?new $1(n):n;o(s=>({color:i,type:s.type}))}catch(i){console.warn("Invalid color input:",n,i)}},[]);return[{colorInput:a,colorState:r},l]};import{createPortal as fu}from"react-dom";import{useRef as h1,useMemo as _3,useEffect as D3,useState as $f,useCallback as Nf}from"react";function C2(e,t,o,a){var r=this,l=h1(null),n=h1(0),i=h1(0),s=h1(null),d=h1([]),u=h1(),p=h1(),C=h1(e),c=h1(!0),x=h1(),w=h1();C.current=e;var h=typeof window<"u",M=!t&&t!==0&&h;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var v=!!(o=o||{}).leading,T=!("trailing"in o)||!!o.trailing,g=!!o.flushOnExit&&T,O="maxWait"in o,P="debounceOnServer"in o&&!!o.debounceOnServer,z=O?Math.max(+o.maxWait||0,t):null,S=_3(function(){var A=function(I){var b=d.current,L=u.current;return d.current=u.current=null,n.current=I,i.current=i.current||I,p.current=C.current.apply(L,b)},j=function(I,b){M&&cancelAnimationFrame(s.current),s.current=M?requestAnimationFrame(I):setTimeout(I,b)},$=function(I){if(!c.current)return!1;var b=I-l.current;return!l.current||b>=t||b<0||O&&I-n.current>=z},K=function(I){return s.current=null,T&&d.current?A(I):(d.current=u.current=null,p.current)},B=function I(){var b=Date.now();if(v&&i.current===n.current&&N(),$(b))return K(b);if(c.current){var L=t-(b-l.current),Z=O?Math.min(L,z-(b-n.current)):L;j(I,Z)}},N=function(){a&&a({})},R=function(){if(h||P){var I,b=Date.now(),L=$(b);if(d.current=[].slice.call(arguments),u.current=r,l.current=b,g&&!x.current&&(x.current=function(){var Z;((Z=globalThis.document)==null?void 0:Z.visibilityState)==="hidden"&&w.current.flush()},(I=globalThis.document)==null||I.addEventListener==null||I.addEventListener("visibilitychange",x.current)),L){if(!s.current&&c.current)return n.current=l.current,j(B,t),v?A(l.current):p.current;if(O)return j(B,t),A(l.current)}return s.current||j(B,t),p.current}};return R.cancel=function(){var I=s.current;I&&(M?cancelAnimationFrame(s.current):clearTimeout(s.current)),n.current=0,d.current=l.current=u.current=s.current=null,I&&a&&a({})},R.isPending=function(){return!!s.current},R.flush=function(){return s.current?K(Date.now()):p.current},R},[v,O,t,z,T,g,M,h,P,a]);return w.current=S,D3(function(){return c.current=!0,function(){var A;g&&w.current.flush(),x.current&&((A=globalThis.document)==null||A.removeEventListener==null||A.removeEventListener("visibilitychange",x.current),x.current=null),c.current=!1}},[g]),S}import Ee from"react";function ao(e){let t=e?.parentElement;for(;t;){let{overflowY:o}=getComputedStyle(t);if(o==="auto"||o==="scroll")return t;t=t.parentElement}return null}var m2='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function h2({computePosition:e,onClose:t,autoFocus:o=!0,trapFocus:a=!1}={}){let[r,l]=Ee.useState(!1),[n,i]=Ee.useState({top:0,left:0}),s=Ee.useRef(null),d=Ee.useRef(null),u=Ee.useRef(!1),p=Ee.useRef(e);p.current=e;let C=Ee.useRef(t);C.current=t;let c=Ee.useRef(a);c.current=a;let x=Ee.useCallback((...v)=>{!s.current||!p.current||i(p.current(s.current,...v))},[]),w=Ee.useCallback(()=>{x(),u.current=!0,l(!0)},[x]),h=Ee.useCallback(()=>{C.current&&C.current(),u.current=!1,l(!1),s.current?.focus()},[]),M=Ee.useCallback(()=>{u.current?h():w()},[w,h]);return Ee.useEffect(()=>{if(!r)return;let v=g=>{if(g.key==="Escape"&&(g.preventDefault(),h()),c.current&&g.key==="Tab"){let O=d.current;if(!O)return;let P=Array.from(O.querySelectorAll(m2)).filter(A=>!A.hasAttribute("disabled")),z=P[0],S=P.at(-1);if(!z||!S)return;g.shiftKey&&document.activeElement===z?(g.preventDefault(),S.focus()):!g.shiftKey&&document.activeElement===S&&(g.preventDefault(),z.focus())}},T=g=>{let O=d.current,P=s.current;if(!O||!P)return;let z=typeof g.composedPath=="function"?g.composedPath():[],S=z.includes(O)||g.target instanceof Node&&O.contains(g.target),A=z.includes(P)||g.target instanceof Node&&P.contains(g.target);!S&&!A&&h()};return document.addEventListener("keydown",v),document.addEventListener("mousedown",T),document.addEventListener("touchstart",T),()=>{document.removeEventListener("keydown",v),document.removeEventListener("mousedown",T),document.removeEventListener("touchstart",T)}},[r,h]),Ee.useEffect(()=>{if(!r||!o||!d.current)return;let v=d.current.querySelector(m2);v&&v.focus()},[r,o]),Ee.useEffect(()=>{if(!r||!s.current)return;let v=ao(s.current);if(!v)return;let T=()=>h();return v.addEventListener("scroll",T,{passive:!0}),()=>v.removeEventListener("scroll",T)},[r,h]),{isOpen:r,open:w,close:h,toggle:M,triggerRef:s,popoverRef:d,position:n,reposition:x}}var O3=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},qo=O3;var E3={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},g2=E3;var B3=e=>qo(g2[e.toLowerCase()],6),v2=B3;var A3=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Z3=e=>{let t;return(t=e.match(A3))?qo(parseInt(t[1],16),t[1].length):void 0},x2=Z3;var Be="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",t6=`(?:${Be}|none)`,it=`${Be}%`,o6=`(?:${Be}%|none)`,ro=`(?:${Be}%|${Be})`,F3=`(?:${Be}%|${Be}|none)`,L2=`(?:${Be}(deg|grad|rad|turn)|${Be})`,a6=`(?:${Be}(deg|grad|rad|turn)|${Be}|none)`,N1="\\s*,\\s*";var r6=new RegExp("^"+F3+"$");var $3=new RegExp(`^rgba?\\(\\s*${Be}${N1}${Be}${N1}${Be}\\s*(?:,\\s*${ro}\\s*)?\\)$`),N3=new RegExp(`^rgba?\\(\\s*${it}${N1}${it}${N1}${it}\\s*(?:,\\s*${ro}\\s*)?\\)$`),U3=e=>{let t={mode:"rgb"},o;if(o=e.match($3))o[1]!==void 0&&(t.r=o[1]/255),o[2]!==void 0&&(t.g=o[2]/255),o[3]!==void 0&&(t.b=o[3]/255);else if(o=e.match(N3))o[1]!==void 0&&(t.r=o[1]/100),o[2]!==void 0&&(t.g=o[2]/100),o[3]!==void 0&&(t.b=o[3]/100);else return;return o[4]!==void 0?t.alpha=Math.max(0,Math.min(1,o[4]/100)):o[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+o[5]))),t},w2=U3;var q3=(e,t)=>e===void 0?void 0:typeof e!="object"?st(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,zo=q3;var z3=(e="rgb")=>t=>(t=zo(t,e))!==void 0?t.mode===e?t:g1[t.mode][e]?g1[t.mode][e](t):e==="rgb"?g1[t.mode].rgb(t):g1.rgb[e](g1[t.mode].rgb(t)):void 0,Xe=z3;var g1={},I2={},lo=[],xr={},j3=e=>e,se=e=>(g1[e.mode]={...g1[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{g1[t]||(g1[t]={}),g1[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=j3)}),I2[e.mode]=e,(e.parse||[]).forEach(t=>{K3(t,e.mode)}),Xe(e.mode)),jo=e=>I2[e],K3=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");xr[e]=t}else typeof e=="function"&&lo.indexOf(e)<0&&lo.push(e)};var Lr=/[^\x00-\x7F]|[a-zA-Z_]/,G3=/[^\x00-\x7F]|[-\w]/,V={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},Q=0;function Ko(e){let t=e[Q],o=e[Q+1];return t==="-"||t==="+"?/\d/.test(o)||o==="."&&/\d/.test(e[Q+2]):t==="."?/\d/.test(o):/\d/.test(t)}function wr(e){if(Q>=e.length)return!1;let t=e[Q];if(Lr.test(t))return!0;if(t==="-"){if(e.length-Q<2)return!1;let o=e[Q+1];return!!(o==="-"||Lr.test(o))}return!1}var W3={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function no(e){let t="";if((e[Q]==="-"||e[Q]==="+")&&(t+=e[Q++]),t+=Go(e),e[Q]==="."&&/\d/.test(e[Q+1])&&(t+=e[Q++]+Go(e)),(e[Q]==="e"||e[Q]==="E")&&((e[Q+1]==="-"||e[Q+1]==="+")&&/\d/.test(e[Q+2])?t+=e[Q++]+e[Q++]+Go(e):/\d/.test(e[Q+1])&&(t+=e[Q++]+Go(e))),wr(e)){let o=Wo(e);return o==="deg"||o==="rad"||o==="turn"||o==="grad"?{type:V.Hue,value:t*W3[o]}:void 0}return e[Q]==="%"?(Q++,{type:V.Percentage,value:+t}):{type:V.Number,value:+t}}function Go(e){let t="";for(;/\d/.test(e[Q]);)t+=e[Q++];return t}function Wo(e){let t="";for(;Q<e.length&&G3.test(e[Q]);)t+=e[Q++];return t}function X3(e){let t=Wo(e);return e[Q]==="("?(Q++,{type:V.Function,value:t}):t==="none"?{type:V.None,value:void 0}:{type:V.Ident,value:t}}function Q3(e=""){let t=e.trim(),o=[],a;for(Q=0;Q<t.length;){if(a=t[Q++],a===`
2
+ `||a===" "||a===" "){for(;Q<t.length&&(t[Q]===`
3
+ `||t[Q]===" "||t[Q]===" ");)Q++;continue}if(a===",")return;if(a===")"){o.push({type:V.ParenClose});continue}if(a==="+"){if(Q--,Ko(t)){o.push(no(t));continue}return}if(a==="-"){if(Q--,Ko(t)){o.push(no(t));continue}if(wr(t)){o.push({type:V.Ident,value:Wo(t)});continue}return}if(a==="."){if(Q--,Ko(t)){o.push(no(t));continue}return}if(a==="/"){for(;Q<t.length&&(t[Q]===`
4
+ `||t[Q]===" "||t[Q]===" ");)Q++;let r;if(Ko(t)&&(r=no(t),r.type!==V.Hue)){o.push({type:V.Alpha,value:r});continue}if(wr(t)&&Wo(t)==="none"){o.push({type:V.Alpha,value:{type:V.None,value:void 0}});continue}return}if(/\d/.test(a)){Q--,o.push(no(t));continue}if(Lr.test(a)){Q--,o.push(X3(t));continue}return}return o}function J3(e){e._i=0;let t=e[e._i++];if(!t||t.type!==V.Function||t.value!=="color"||(t=e[e._i++],t.type!==V.Ident))return;let o=xr[t.value];if(!o)return;let a={mode:o},r=b2(e,!1);if(!r)return;let l=jo(o).channels;for(let n=0,i,s;n<l.length;n++)i=r[n],s=l[n],i.type!==V.None&&(a[s]=i.type===V.Number?i.value:i.value/100,s==="alpha"&&(a[s]=Math.max(0,Math.min(1,a[s]))));return a}function b2(e,t){let o=[],a;for(;e._i<e.length;){if(a=e[e._i++],a.type===V.None||a.type===V.Number||a.type===V.Alpha||a.type===V.Percentage||t&&a.type===V.Hue){o.push(a);continue}if(a.type===V.ParenClose){if(e._i<e.length)return;continue}return}if(!(o.length<3||o.length>4)){if(o.length===4){if(o[3].type!==V.Alpha)return;o[3]=o[3].value}return o.length===3&&o.push({type:V.None,value:void 0}),o.every(r=>r.type!==V.Alpha)?o:void 0}}function Y3(e,t){e._i=0;let o=e[e._i++];if(!o||o.type!==V.Function)return;let a=b2(e,t);if(a)return a.unshift(o.value),a}var e7=e=>{if(typeof e!="string")return;let t=Q3(e),o=t?Y3(t,!0):void 0,a,r=0,l=lo.length;for(;r<l;)if((a=lo[r++](e,o))!==void 0)return a;return t?J3(t):void 0},st=e7;function t7(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let o={mode:"rgb"},[,a,r,l,n]=t;if(!(a.type===V.Hue||r.type===V.Hue||l.type===V.Hue))return a.type!==V.None&&(o.r=a.type===V.Number?a.value/255:a.value/100),r.type!==V.None&&(o.g=r.type===V.Number?r.value/255:r.value/100),l.type!==V.None&&(o.b=l.type===V.Number?l.value/255:l.value/100),n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var y2=t7;var o7=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,M2=o7;var S2=(e,t,o)=>e+o*(t-e);var a7=e=>{let t=[];for(let o=0;o<e.length-1;o++){let a=e[o],r=e[o+1];a===void 0&&r===void 0?t.push(void 0):a!==void 0&&r!==void 0?t.push([a,r]):t.push(a!==void 0?[a,a]:[r,r])}return t},R2=e=>t=>{let o=a7(t);return a=>{let r=a*o.length,l=a>=1?o.length-1:Math.max(Math.floor(r),0),n=o[l];return n===void 0?void 0:e(n[0],n[1],r-l)}};var E=R2(S2);var le=e=>{let t=!1,o=e.map(a=>a!==void 0?(t=!0,a):1);return t?o:e};var r7={mode:"rgb",channels:["r","g","b","alpha"],parse:[y2,x2,w2,v2,M2,"srgb"],serialize:"srgb",interpolate:{r:E,g:E,b:E,alpha:{use:E,fixup:le}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},a1=r7;var Ir=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),l7=e=>{let t=Ir(e.r),o=Ir(e.g),a=Ir(e.b),r={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*o+.1882286462349947*a,y:.297344975250536*t+.6273635662554661*o+.0752914584939979*a,z:.0270313613864123*t+.0706888525358272*o+.9913375368376386*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},br=l7;var yr=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),n7=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"a98",r:yr(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*o),g:yr(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*o),b:yr(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*o)};return a!==void 0&&(r.alpha=a),r},Mr=n7;var Sr=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},i7=({r:e,g:t,b:o,alpha:a})=>{let r={mode:"lrgb",r:Sr(e),g:Sr(t),b:Sr(o)};return a!==void 0&&(r.alpha=a),r},r1=i7;var s7=e=>{let{r:t,g:o,b:a,alpha:r}=r1(e),l={mode:"xyz65",x:.4123907992659593*t+.357584339383878*o+.1804807884018343*a,y:.2126390058715102*t+.715168678767756*o+.0721923153607337*a,z:.0193308187155918*t+.119194779794626*o+.9505321522496607*a};return r!==void 0&&(l.alpha=r),l},Ne=s7;var Rr=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},d7=({r:e,g:t,b:o,alpha:a},r="rgb")=>{let l={mode:r,r:Rr(e),g:Rr(t),b:Rr(o)};return a!==void 0&&(l.alpha=a),l},l1=d7;var u7=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=l1({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*o,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*o,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*o});return a!==void 0&&(r.alpha=a),r},Ue=u7;var c7={...a1,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Mr(Ne(e)),xyz65:Mr},toMode:{rgb:e=>Ue(br(e)),xyz65:br}},H2=c7;var f7=e=>(e=e%360)<0?e+360:e,Ce=f7;var p7=(e,t)=>e.map((o,a,r)=>{if(o===void 0)return o;let l=Ce(o);return a===0||e[a-1]===void 0?l:t(l-Ce(r[a-1]))}).reduce((o,a)=>!o.length||a===void 0||o[o.length-1]===void 0?(o.push(a),o):(o.push(a+o[o.length-1]),o),[]),Re=e=>p7(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var Ie=[-.14861,1.78277,-.29227,-.90649,1.97294,0],k2=Math.PI/180,P2=180/Math.PI;var T2=Ie[3]*Ie[4],V2=Ie[1]*Ie[4],_2=Ie[1]*Ie[2]-Ie[0]*Ie[3],C7=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(_2*o+e*T2-t*V2)/(_2+T2-V2),l=o-r,n=(Ie[4]*(t-r)-Ie[2]*l)/Ie[3],i={mode:"cubehelix",l:r,s:r===0||r===1?void 0:Math.sqrt(l*l+n*n)/(Ie[4]*r*(1-r))};return i.s&&(i.h=Math.atan2(n,l)*P2-120),a!==void 0&&(i.alpha=a),i},D2=C7;var m7=({h:e,s:t,l:o,alpha:a})=>{let r={mode:"rgb"};e=(e===void 0?0:e+120)*k2,o===void 0&&(o=0);let l=t===void 0?0:t*o*(1-o),n=Math.cos(e),i=Math.sin(e);return r.r=o+l*(Ie[0]*n+Ie[1]*i),r.g=o+l*(Ie[2]*n+Ie[3]*i),r.b=o+l*(Ie[4]*n+Ie[5]*i),a!==void 0&&(r.alpha=a),r},O2=m7;var U1=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let o=Ce(e.h),a=Ce(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*r},E2=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let o=Ce(e.h),a=Ce(t.h);return Math.abs(a-o)>180?o-(a-360*Math.sign(a-o)):a-o},q1=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let o=Ce(e.h),a=Ce(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*r};var He=e=>{let t=e.reduce((a,r)=>{if(r!==void 0){let l=r*Math.PI/180;a.sin+=Math.sin(l),a.cos+=Math.cos(l)}return a},{sin:0,cos:0}),o=Math.atan2(t.sin,t.cos)*180/Math.PI;return o<0?360+o:o};var h7={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:D2},toMode:{rgb:O2},interpolate:{h:{use:E,fixup:Re},s:E,l:E,alpha:{use:E,fixup:le}},difference:{h:U1},average:{h:He}},B2=h7;var g7=({l:e,a:t,b:o,alpha:a},r="lch")=>{t===void 0&&(t=0),o===void 0&&(o=0);let l=Math.sqrt(t*t+o*o),n={mode:r,l:e,c:l};return l&&(n.h=Ce(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(n.alpha=a),n},Qe=g7;var v7=({l:e,c:t,h:o,alpha:a},r="lab")=>{o===void 0&&(o=0);let l={mode:r,l:e,a:t?t*Math.cos(o/180*Math.PI):0,b:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(l.alpha=a),l},Je=v7;var Xo=Math.pow(29,3)/Math.pow(3,3),Qo=Math.pow(6,3)/Math.pow(29,3);var ge={X:.9642956764295677,Y:1,Z:.8251046025104602},z1={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},gp=Math.pow(29,3)/Math.pow(3,3),vp=Math.pow(6,3)/Math.pow(29,3);var Hr=e=>Math.pow(e,3)>Qo?Math.pow(e,3):(116*e-16)/Xo,x7=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+16)/116,l=t/500+r,n=r-o/200,i={mode:"xyz65",x:Hr(l)*z1.X,y:Hr(r)*z1.Y,z:Hr(n)*z1.Z};return a!==void 0&&(i.alpha=a),i},Jo=x7;var L7=e=>Ue(Jo(e)),j1=L7;var kr=e=>e>Qo?Math.cbrt(e):(Xo*e+16)/116,w7=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=kr(e/z1.X),l=kr(t/z1.Y),n=kr(o/z1.Z),i={mode:"lab65",l:116*l-16,a:500*(r-l),b:200*(l-n)};return a!==void 0&&(i.alpha=a),i},Yo=w7;var I7=e=>{let t=Yo(Ne(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},K1=I7;var dt=.14444444444444443*Math.PI,yt=Math.cos(dt),Mt=Math.sin(dt),ea=100/Math.log(139/100);var b7=({l:e,c:t,h:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"lab65",l:(Math.exp(e*1/ea)-1)/.0039},l=(Math.exp(.0435*t*1*1)-1)/.075,n=l*Math.cos(o/180*Math.PI-dt),i=l*Math.sin(o/180*Math.PI-dt);return r.a=n*yt-i/.83*Mt,r.b=n*Mt+i/.83*yt,a!==void 0&&(r.alpha=a),r},so=b7;var y7=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=t*yt+o*Mt,l=.83*(o*yt-t*Mt),n=Math.sqrt(r*r+l*l),i={mode:"dlch",l:ea/1*Math.log(1+.0039*e),c:Math.log(1+.075*n)/(.0435*1*1)};return i.c&&(i.h=Ce((Math.atan2(l,r)+dt)/Math.PI*180)),a!==void 0&&(i.alpha=a),i},uo=y7;var A2=e=>so(Qe(e,"dlch")),Z2=e=>Je(uo(e),"dlab"),M7={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:A2,rgb:e=>j1(A2(e))},fromMode:{lab65:Z2,rgb:e=>Z2(K1(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:E,a:E,b:E,alpha:{use:E,fixup:le}}},F2=M7;var S7={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:so,dlab:e=>Je(e,"dlab"),rgb:e=>j1(so(e))},fromMode:{lab65:uo,dlab:e=>Qe(e,"dlch"),rgb:e=>uo(K1(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:E,c:E,h:{use:E,fixup:Re},alpha:{use:E,fixup:le}},difference:{h:q1},average:{h:He}},$2=S7;function Tr({h:e,s:t,i:o,alpha:a}){e=Ce(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:o*(1+t*(3/(2-r)-1)),g:o*(1+t*(3*(1-r)/(2-r)-1)),b:o*(1-t)};break;case 1:l={r:o*(1+t*(3*(1-r)/(2-r)-1)),g:o*(1+t*(3/(2-r)-1)),b:o*(1-t)};break;case 2:l={r:o*(1-t),g:o*(1+t*(3/(2-r)-1)),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;case 3:l={r:o*(1-t),g:o*(1+t*(3*(1-r)/(2-r)-1)),b:o*(1+t*(3/(2-r)-1))};break;case 4:l={r:o*(1+t*(3*(1-r)/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3/(2-r)-1))};break;case 5:l={r:o*(1+t*(3/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;default:l={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function Vr({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsi",s:e+t+o===0?0:1-3*l/(e+t+o),i:(e+t+o)/3};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var R7={mode:"hsi",toMode:{rgb:Tr},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Vr},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:E,fixup:Re},s:E,i:E,alpha:{use:E,fixup:le}},difference:{h:U1},average:{h:He}},N2=R7;function _r({h:e,s:t,l:o,alpha:a}){e=Ce(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=o+t*(o<.5?o:1-o),l=r-(r-o)*2*Math.abs(e/60%2-1),n;switch(Math.floor(e/60)){case 0:n={r,g:l,b:2*o-r};break;case 1:n={r:l,g:r,b:2*o-r};break;case 2:n={r:2*o-r,g:r,b:l};break;case 3:n={r:2*o-r,g:l,b:r};break;case 4:n={r:l,g:2*o-r,b:r};break;case 5:n={r,g:2*o-r,b:l};break;default:n={r:2*o-r,g:2*o-r,b:2*o-r}}return n.mode="rgb",a!==void 0&&(n.alpha=a),n}function Dr({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsl",s:r===l?0:(r-l)/(1-Math.abs(r+l-1)),l:.5*(r+l)};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var H7=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},U2=H7;var k7=new RegExp(`^hsla?\\(\\s*${L2}${N1}${it}${N1}${it}\\s*(?:,\\s*${ro}\\s*)?\\)$`),P7=e=>{let t=e.match(k7);if(!t)return;let o={mode:"hsl"};return t[3]!==void 0?o.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(o.h=U2(t[1],t[2])),t[4]!==void 0&&(o.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(o.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?o.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(o.alpha=Math.max(0,Math.min(1,+t[7]))),o},q2=P7;function T7(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let o={mode:"hsl"},[,a,r,l,n]=t;if(a.type!==V.None){if(a.type===V.Percentage)return;o.h=a.value}if(r.type!==V.None){if(r.type===V.Hue)return;o.s=r.value/100}if(l.type!==V.None){if(l.type===V.Hue)return;o.l=l.value/100}return n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var z2=T7;var V7={mode:"hsl",toMode:{rgb:_r},fromMode:{rgb:Dr},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[z2,q2],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:E,fixup:Re},s:E,l:E,alpha:{use:E,fixup:le}},difference:{h:U1},average:{h:He}},ta=V7;function co({h:e,s:t,v:o,alpha:a}){e=Ce(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r:o,g:o*(1-t*r),b:o*(1-t)};break;case 1:l={r:o*(1-t*r),g:o,b:o*(1-t)};break;case 2:l={r:o*(1-t),g:o,b:o*(1-t*r)};break;case 3:l={r:o*(1-t),g:o*(1-t*r),b:o};break;case 4:l={r:o*(1-t*r),g:o*(1-t),b:o};break;case 5:l={r:o,g:o*(1-t),b:o*(1-t*r)};break;default:l={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function fo({r:e,g:t,b:o,alpha:a}){e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.max(e,t,o),l=Math.min(e,t,o),n={mode:"hsv",s:r===0?0:1-l/r,v:r};return r-l!==0&&(n.h=(r===e?(t-o)/(r-l)+(t<o)*6:r===t?(o-e)/(r-l)+2:(e-t)/(r-l)+4)*60),a!==void 0&&(n.alpha=a),n}var _7={mode:"hsv",toMode:{rgb:co},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:fo},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:E,fixup:Re},s:E,v:E,alpha:{use:E,fixup:le}},difference:{h:U1},average:{h:He}},oa=_7;function Or({h:e,w:t,b:o,alpha:a}){if(t===void 0&&(t=0),o===void 0&&(o=0),t+o>1){let r=t+o;t/=r,o/=r}return co({h:e,s:o===1?1:1-t/(1-o),v:1-o,alpha:a})}function Er(e){let t=fo(e);if(t===void 0)return;let o=t.s!==void 0?t.s:0,a=t.v!==void 0?t.v:0,r={mode:"hwb",w:(1-o)*a,b:1-a};return t.h!==void 0&&(r.h=t.h),t.alpha!==void 0&&(r.alpha=t.alpha),r}function D7(e,t){if(!t||t[0]!=="hwb")return;let o={mode:"hwb"},[,a,r,l,n]=t;if(a.type!==V.None){if(a.type===V.Percentage)return;o.h=a.value}if(r.type!==V.None){if(r.type===V.Hue)return;o.w=r.value/100}if(l.type!==V.None){if(l.type===V.Hue)return;o.b=l.value/100}return n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var j2=D7;var O7={mode:"hwb",toMode:{rgb:Or},fromMode:{rgb:Er},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[j2],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:E,fixup:Re},w:E,b:E,alpha:{use:E,fixup:le}},difference:{h:E2},average:{h:He}},K2=O7;var St=.1593017578125,G2=78.84375,Rt=.8359375,Ht=18.8515625,kt=18.6875;function aa(e){if(e<0)return 0;let t=Math.pow(e,1/G2);return 1e4*Math.pow(Math.max(0,t-Rt)/(Ht-kt*t),1/St)}function ra(e){if(e<0)return 0;let t=Math.pow(e/1e4,St);return Math.pow((Rt+Ht*t)/(1+kt*t),G2)}var Br=e=>Math.max(e/203,0),B7=({i:e,t,p:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=aa(e+.008609037037932761*t+.11102962500302593*o),l=aa(e-.00860903703793275*t-.11102962500302599*o),n=aa(e+.5600313357106791*t-.32062717498731885*o),i={mode:"xyz65",x:Br(2.070152218389422*r-1.3263473389671556*l+.2066510476294051*n),y:Br(.3647385209748074*r+.680566024947227*l-.0453045459220346*n),z:Br(-.049747207535812*r-.0492609666966138*l+1.1880659249923042*n)};return a!==void 0&&(i.alpha=a),i},Ar=B7;var Zr=(e=0)=>Math.max(e*203,0),A7=({x:e,y:t,z:o,alpha:a})=>{let r=Zr(e),l=Zr(t),n=Zr(o),i=ra(.3592832590121217*r+.6976051147779502*l-.0358915932320289*n),s=ra(-.1920808463704995*r+1.1004767970374323*l+.0753748658519118*n),d=ra(.0070797844607477*r+.0748396662186366*l+.8433265453898765*n),u=.5*i+.5*s,p=1.61376953125*i-3.323486328125*s+1.709716796875*d,C=4.378173828125*i-4.24560546875*s-.132568359375*d,c={mode:"itp",i:u,t:p,p:C};return a!==void 0&&(c.alpha=a),c},Fr=A7;var Z7={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Ar,rgb:e=>Ue(Ar(e))},fromMode:{xyz65:Fr,rgb:e=>Fr(Ne(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:E,t:E,p:E,alpha:{use:E,fixup:le}}},W2=Z7;var F7=134.03437499999998,$7=16295499532821565e-27,$r=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,St);return Math.pow((Rt+Ht*t)/(1+kt*t),F7)},Nr=(e=0)=>Math.max(e*203,0),N7=({x:e,y:t,z:o,alpha:a})=>{e=Nr(e),t=Nr(t),o=Nr(o);let r=1.15*e-.15*o,l=.66*t+.34*e,n=$r(.41478972*r+.579999*l+.014648*o),i=$r(-.20151*r+1.120649*l+.0531008*o),s=$r(-.0166008*r+.2648*l+.6684799*o),d=(n+i)/2,u={mode:"jab",j:.44*d/(1-.56*d)-$7,a:3.524*n-4.066708*i+.542708*s,b:.199076*n+1.096799*i-1.295875*s};return a!==void 0&&(u.alpha=a),u},la=N7;var U7=134.03437499999998,X2=16295499532821565e-27,Ur=e=>{if(e<0)return 0;let t=Math.pow(e,1/U7);return 1e4*Math.pow((Rt-t)/(kt*t-Ht),1/St)},qr=e=>e/203,q7=({j:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+X2)/(.44+.56*(e+X2)),l=Ur(r+.13860504*t+.058047316*o),n=Ur(r-.13860504*t-.058047316*o),i=Ur(r-.096019242*t-.8118919*o),s={mode:"xyz65",x:qr(1.661373024652174*l-.914523081304348*n+.23136208173913045*i),y:qr(-.3250758611844533*l+1.571847026732543*n-.21825383453227928*i),z:qr(-.090982811*l-.31272829*n+1.5227666*i)};return a!==void 0&&(s.alpha=a),s},na=q7;var z7=e=>{let t=la(Ne(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ia=z7;var j7=e=>Ue(na(e)),sa=j7;var K7={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:ia,xyz65:la},toMode:{rgb:sa,xyz65:na},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:E,a:E,b:E,alpha:{use:E,fixup:le}}},Q2=K7;var G7=({j:e,a:t,b:o,alpha:a})=>{t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.sqrt(t*t+o*o),l={mode:"jch",j:e,c:r};return r&&(l.h=Ce(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},zr=G7;var W7=({j:e,c:t,h:o,alpha:a})=>{o===void 0&&(o=0);let r={mode:"jab",j:e,a:t?t*Math.cos(o/180*Math.PI):0,b:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(r.alpha=a),r},jr=W7;var X7={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:jr,rgb:e=>sa(jr(e))},fromMode:{rgb:e=>zr(ia(e)),jab:zr},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:E,fixup:Re},c:E,j:E,alpha:{use:E,fixup:le}},difference:{h:q1},average:{h:He}},J2=X7;var G1=Math.pow(29,3)/Math.pow(3,3),Pt=Math.pow(6,3)/Math.pow(29,3);var Kr=e=>Math.pow(e,3)>Pt?Math.pow(e,3):(116*e-16)/G1,Q7=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=(e+16)/116,l=t/500+r,n=r-o/200,i={mode:"xyz50",x:Kr(l)*ge.X,y:Kr(r)*ge.Y,z:Kr(n)*ge.Z};return a!==void 0&&(i.alpha=a),i},Tt=Q7;var J7=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=l1({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*o,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*o,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*o});return a!==void 0&&(r.alpha=a),r},L1=J7;var Y7=e=>L1(Tt(e)),da=Y7;var ed=e=>{let{r:t,g:o,b:a,alpha:r}=r1(e),l={mode:"xyz50",x:.436065742824811*t+.3851514688337912*o+.14307845442264197*a,y:.22249319175623702*t+.7168870538238823*o+.06061979053616537*a,z:.013923904500943465*t+.09708128566574634*o+.7140993584005155*a};return r!==void 0&&(l.alpha=r),l},w1=ed;var Gr=e=>e>Pt?Math.cbrt(e):(G1*e+16)/116,td=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Gr(e/ge.X),l=Gr(t/ge.Y),n=Gr(o/ge.Z),i={mode:"lab",l:116*l-16,a:500*(r-l),b:200*(l-n)};return a!==void 0&&(i.alpha=a),i},Vt=td;var od=e=>{let t=Vt(w1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ua=od;function ad(e,t){if(!t||t[0]!=="lab")return;let o={mode:"lab"},[,a,r,l,n]=t;if(!(a.type===V.Hue||r.type===V.Hue||l.type===V.Hue))return a.type!==V.None&&(o.l=Math.min(Math.max(0,a.value),100)),r.type!==V.None&&(o.a=r.type===V.Number?r.value:r.value*125/100),l.type!==V.None&&(o.b=l.type===V.Number?l.value:l.value*125/100),n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var Y2=ad;var rd={mode:"lab",toMode:{xyz50:Tt,rgb:da},fromMode:{xyz50:Vt,rgb:ua},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Y2],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:E,a:E,b:E,alpha:{use:E,fixup:le}}},_t=rd;var ld={..._t,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Jo,rgb:j1},fromMode:{xyz65:Yo,rgb:K1},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},e0=ld;function nd(e,t){if(!t||t[0]!=="lch")return;let o={mode:"lch"},[,a,r,l,n]=t;if(a.type!==V.None){if(a.type===V.Hue)return;o.l=Math.min(Math.max(0,a.value),100)}if(r.type!==V.None&&(o.c=Math.max(0,r.type===V.Number?r.value:r.value*150/100)),l.type!==V.None){if(l.type===V.Percentage)return;o.h=l.value}return n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var t0=nd;var id={mode:"lch",toMode:{lab:Je,rgb:e=>da(Je(e))},fromMode:{rgb:e=>Qe(ua(e)),lab:Qe},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[t0],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:E,fixup:Re},c:E,l:E,alpha:{use:E,fixup:le}},difference:{h:q1},average:{h:He}},Dt=id;var sd={...Dt,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Je(e,"lab65"),rgb:e=>j1(Je(e,"lab65"))},fromMode:{rgb:e=>Qe(K1(e),"lch65"),lab65:e=>Qe(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},o0=sd;var dd=({l:e,u:t,v:o,alpha:a})=>{t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.sqrt(t*t+o*o),l={mode:"lchuv",l:e,c:r};return r&&(l.h=Ce(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},Wr=dd;var ud=({l:e,c:t,h:o,alpha:a})=>{o===void 0&&(o=0);let r={mode:"luv",l:e,u:t?t*Math.cos(o/180*Math.PI):0,v:t?t*Math.sin(o/180*Math.PI):0};return a!==void 0&&(r.alpha=a),r},Xr=ud;var a0=(e,t,o)=>4*e/(e+15*t+3*o),r0=(e,t,o)=>9*t/(e+15*t+3*o),cd=a0(ge.X,ge.Y,ge.Z),fd=r0(ge.X,ge.Y,ge.Z),pd=e=>e<=Pt?G1*e:116*Math.cbrt(e)-16,Cd=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=pd(t/ge.Y),l=a0(e,t,o),n=r0(e,t,o);!isFinite(l)||!isFinite(n)?r=l=n=0:(l=13*r*(l-cd),n=13*r*(n-fd));let i={mode:"luv",l:r,u:l,v:n};return a!==void 0&&(i.alpha=a),i},po=Cd;var md=(e,t,o)=>4*e/(e+15*t+3*o),hd=(e,t,o)=>9*t/(e+15*t+3*o),gd=md(ge.X,ge.Y,ge.Z),vd=hd(ge.X,ge.Y,ge.Z),xd=({l:e,u:t,v:o,alpha:a})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),o===void 0&&(o=0);let r=t/(13*e)+gd,l=o/(13*e)+vd,n=ge.Y*(e<=8?e/G1:Math.pow((e+16)/116,3)),i=n*(9*r)/(4*l),s=n*(12-3*r-20*l)/(4*l),d={mode:"xyz50",x:i,y:n,z:s};return a!==void 0&&(d.alpha=a),d},Co=xd;var Ld=e=>Wr(po(w1(e))),wd=e=>L1(Co(Xr(e))),Id={mode:"lchuv",toMode:{luv:Xr,rgb:wd},fromMode:{rgb:Ld,luv:Wr},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:E,fixup:Re},c:E,l:E,alpha:{use:E,fixup:le}},difference:{h:q1},average:{h:He}},l0=Id;var bd={...a1,mode:"lrgb",toMode:{rgb:l1},fromMode:{rgb:r1},parse:["srgb-linear"],serialize:"srgb-linear"},n0=bd;var yd={mode:"luv",toMode:{xyz50:Co,rgb:e=>L1(Co(e))},fromMode:{xyz50:po,rgb:e=>po(w1(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:E,u:E,v:E,alpha:{use:E,fixup:le}}},i0=yd;var Md=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*o),l=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*o),n=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*o),i={mode:"oklab",l:.210454268309314*r+.7936177747023054*l-.0040720430116193*n,a:1.9779985324311684*r-2.42859224204858*l+.450593709617411*n,b:.0259040424655478*r+.7827717124575296*l-.8086757549230774*n};return a!==void 0&&(i.alpha=a),i},ca=Md;var Sd=e=>{let t=ca(r1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},W1=Sd;var Rd=({l:e,a:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.pow(e+.3963377773761749*t+.2158037573099136*o,3),l=Math.pow(e-.1055613458156586*t-.0638541728258133*o,3),n=Math.pow(e-.0894841775298119*t-1.2914855480194092*o,3),i={mode:"lrgb",r:4.076741636075957*r-3.3077115392580616*l+.2309699031821044*n,g:-1.2684379732850317*r+2.6097573492876887*l-.3413193760026573*n,b:-.0041960761386756*r-.7034186179359362*l+1.7076146940746117*n};return a!==void 0&&(i.alpha=a),i},I1=Rd;var Hd=e=>l1(I1(e)),X1=Hd;function mo(e){let a=1.170873786407767;return .5*(a*e-.206+Math.sqrt((a*e-.206)*(a*e-.206)+4*.03*a*e))}function ut(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function kd(e,t){let o,a,r,l,n,i,s,d;-1.88170328*e-.80936493*t>1?(o=1.19086277,a=1.76576728,r=.59662641,l=.75515197,n=.56771245,i=4.0767416621,s=-3.3077115913,d=.2309699292):1.81444104*e-1.19445276*t>1?(o=.73956515,a=-.45954404,r=.08285427,l=.1254107,n=.14503204,i=-1.2684380046,s=2.6097574011,d=-.3413193965):(o=1.35733652,a=-.00915799,r=-1.1513021,l=-.50559606,n=.00692167,i=-.0041960863,s=-.7034186147,d=1.707614701);let u=o+a*e+r*t+l*e*e+n*e*t,p=.3963377774*e+.2158037573*t,C=-.1055613458*e-.0638541728*t,c=-.0894841775*e-1.291485548*t;{let x=1+u*p,w=1+u*C,h=1+u*c,M=x*x*x,v=w*w*w,T=h*h*h,g=3*p*x*x,O=3*C*w*w,P=3*c*h*h,z=6*p*p*x,S=6*C*C*w,A=6*c*c*h,j=i*M+s*v+d*T,$=i*g+s*O+d*P,K=i*z+s*S+d*A;u=u-j*$/($*$-.5*j*K)}return u}function Qr(e,t){let o=kd(e,t),a=I1({l:1,a:o*e,b:o*t}),r=Math.cbrt(1/Math.max(a.r,a.g,a.b)),l=r*o;return[r,l]}function Pd(e,t,o,a,r,l=null){l||(l=Qr(e,t));let n;if((o-r)*l[1]-(l[0]-r)*a<=0)n=l[1]*r/(a*l[0]+l[1]*(r-o));else{n=l[1]*(r-1)/(a*(l[0]-1)+l[1]*(r-o));{let i=o-r,s=a,d=.3963377774*e+.2158037573*t,u=-.1055613458*e-.0638541728*t,p=-.0894841775*e-1.291485548*t,C=i+s*d,c=i+s*u,x=i+s*p;{let w=r*(1-n)+n*o,h=n*a,M=w+h*d,v=w+h*u,T=w+h*p,g=M*M*M,O=v*v*v,P=T*T*T,z=3*C*M*M,S=3*c*v*v,A=3*x*T*T,j=6*C*C*M,$=6*c*c*v,K=6*x*x*T,B=4.0767416621*g-3.3077115913*O+.2309699292*P-1,N=4.0767416621*z-3.3077115913*S+.2309699292*A,R=4.0767416621*j-3.3077115913*$+.2309699292*K,I=N/(N*N-.5*B*R),b=-B*I,L=-1.2684380046*g+2.6097574011*O-.3413193965*P-1,Z=-1.2684380046*z+2.6097574011*S-.3413193965*A,_=-1.2684380046*j+2.6097574011*$-.3413193965*K,F=Z/(Z*Z-.5*L*_),D=-L*F,m=-.0041960863*g-.7034186147*O+1.707614701*P-1,f=-.0041960863*z-.7034186147*S+1.707614701*A,k=-.0041960863*j-.7034186147*$+1.707614701*K,H=f/(f*f-.5*m*k),y=-m*H;b=I>=0?b:1e6,D=F>=0?D:1e6,y=H>=0?y:1e6,n+=Math.min(b,Math.min(D,y))}}}return n}function ho(e,t,o=null){o||(o=Qr(e,t));let a=o[0],r=o[1];return[r/a,r/(1-a)]}function fa(e,t,o){let a=Qr(t,o),r=Pd(t,o,e,1,e,a),l=ho(t,o,a),n=.11516993+1/(7.4477897+4.1590124*o+t*(-2.19557347+1.75198401*o+t*(-2.13704948-10.02301043*o+t*(-4.24894561+5.38770819*o+4.69891013*t)))),i=.11239642+1/(1.6132032-.68124379*o+t*(.40370612+.90148123*o+t*(-.27087943+.6122399*o+t*(.00299215-.45399568*o-.14661872*t)))),s=r/Math.min(e*l[0],(1-e)*l[1]),d=e*n,u=(1-e)*i,p=.9*s*Math.sqrt(Math.sqrt(1/(1/(d*d*d*d)+1/(u*u*u*u))));return d=e*.4,u=(1-e)*.8,[Math.sqrt(1/(1/(d*d)+1/(u*u))),p,r]}function pa(e){let t=e.l!==void 0?e.l:0,o=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,r={mode:"okhsl",l:mo(t)};e.alpha!==void 0&&(r.alpha=e.alpha);let l=Math.sqrt(o*o+a*a);if(!l)return r.s=0,r;let[n,i,s]=fa(t,o/l,a/l),d;if(l<i){let u=0,p=.8*n,C=1-p/i;d=(l-u)/(p+C*(l-u))*.8}else{let u=i,p=.2*i*i*1.25*1.25/n,C=1-p/(s-i);d=.8+.2*((l-u)/(p+C*(l-u)))}return d&&(r.s=d,r.h=Ce(Math.atan2(a,o)*180/Math.PI)),r}function Ca(e){let t=e.h!==void 0?e.h:0,o=e.s!==void 0?e.s:0,a=e.l!==void 0?e.l:0,r={mode:"oklab",l:ut(a)};if(e.alpha!==void 0&&(r.alpha=e.alpha),!o||a===1)return r.a=r.b=0,r;let l=Math.cos(t/180*Math.PI),n=Math.sin(t/180*Math.PI),[i,s,d]=fa(r.l,l,n),u,p,C,c;o<.8?(u=1.25*o,p=0,C=.8*i,c=1-C/s):(u=5*(o-.8),p=s,C=.2*s*s*1.25*1.25/i,c=1-C/(d-s));let x=p+u*C/(1-c*u);return r.a=x*l,r.b=x*n,r}var Td={...ta,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:pa,rgb:e=>pa(W1(e))},toMode:{oklab:Ca,rgb:e=>X1(Ca(e))}},s0=Td;function ma(e){let t=e.l!==void 0?e.l:0,o=e.a!==void 0?e.a:0,a=e.b!==void 0?e.b:0,r=Math.sqrt(o*o+a*a),l=r?o/r:1,n=r?a/r:1,[i,s]=ho(l,n),d=.5,u=1-d/i,p=s/(r+t*s),C=p*t,c=p*r,x=ut(C),w=c*x/C,h=I1({l:x,a:l*w,b:n*w}),M=Math.cbrt(1/Math.max(h.r,h.g,h.b,0));t=t/M,r=r/M*mo(t)/t,t=mo(t);let v={mode:"okhsv",s:r?(d+s)*c/(s*d+s*u*c):0,v:t?t/C:0};return v.s&&(v.h=Ce(Math.atan2(a,o)*180/Math.PI)),e.alpha!==void 0&&(v.alpha=e.alpha),v}function ha(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let o=e.h!==void 0?e.h:0,a=e.s!==void 0?e.s:0,r=e.v!==void 0?e.v:0,l=Math.cos(o/180*Math.PI),n=Math.sin(o/180*Math.PI),[i,s]=ho(l,n),d=.5,u=1-d/i,p=1-a*d/(d+s-s*u*a),C=a*s*d/(d+s-s*u*a),c=ut(p),x=C*c/p,w=I1({l:c,a:l*x,b:n*x}),h=Math.cbrt(1/Math.max(w.r,w.g,w.b,0)),M=ut(r*p),v=C*M/p;return t.l=M*h,t.a=v*l*h,t.b=v*n*h,t}var Vd={...oa,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:ma,rgb:e=>ma(W1(e))},toMode:{oklab:ha,rgb:e=>X1(ha(e))}},d0=Vd;function _d(e,t){if(!t||t[0]!=="oklab")return;let o={mode:"oklab"},[,a,r,l,n]=t;if(!(a.type===V.Hue||r.type===V.Hue||l.type===V.Hue))return a.type!==V.None&&(o.l=Math.min(Math.max(0,a.type===V.Number?a.value:a.value/100),1)),r.type!==V.None&&(o.a=r.type===V.Number?r.value:r.value*.4/100),l.type!==V.None&&(o.b=l.type===V.Number?l.value:l.value*.4/100),n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var u0=_d;var Dd={..._t,mode:"oklab",toMode:{lrgb:I1,rgb:X1},fromMode:{lrgb:ca,rgb:W1},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[u0],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},c0=Dd;function Od(e,t){if(!t||t[0]!=="oklch")return;let o={mode:"oklch"},[,a,r,l,n]=t;if(a.type!==V.None){if(a.type===V.Hue)return;o.l=Math.min(Math.max(0,a.type===V.Number?a.value:a.value/100),1)}if(r.type!==V.None&&(o.c=Math.max(0,r.type===V.Number?r.value:r.value*.4/100)),l.type!==V.None){if(l.type===V.Percentage)return;o.h=l.value}return n.type!==V.None&&(o.alpha=Math.min(1,Math.max(0,n.type===V.Number?n.value:n.value/100))),o}var f0=Od;var Ed={...Dt,mode:"oklch",toMode:{oklab:e=>Je(e,"oklab"),rgb:e=>X1(Je(e,"oklab"))},fromMode:{rgb:e=>Qe(W1(e),"oklch"),oklab:e=>Qe(e,"oklch")},parse:[f0],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},p0=Ed;var Bd=e=>{let{r:t,g:o,b:a,alpha:r}=r1(e),l={mode:"xyz65",x:.486570948648216*t+.265667693169093*o+.1982172852343625*a,y:.2289745640697487*t+.6917385218365062*o+.079286914093745*a,z:0*t+.0451133818589026*o+1.043944368900976*a};return r!==void 0&&(l.alpha=r),l},Jr=Bd;var Ad=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=l1({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*o,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*o,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*o},"p3");return a!==void 0&&(r.alpha=a),r},Yr=Ad;var Zd={...a1,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>Yr(Ne(e)),xyz65:Yr},toMode:{rgb:e=>Ue(Jr(e)),xyz65:Jr}},C0=Zd;var el=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},Fd=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"prophoto",r:el(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*o),g:el(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*o),b:el(e*0+t*0+1.2119675456389452*o)};return a!==void 0&&(r.alpha=a),r},tl=Fd;var ol=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},$d=e=>{let t=ol(e.r),o=ol(e.g),a=ol(e.b),r={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*o+.0313477341283922*a,y:.2880748288194013*t+.7118352342418731*o+899369387256e-16*a,z:0*t+0*o+.8251046025104602*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},al=$d;var Nd={...a1,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:tl,rgb:e=>tl(w1(e))},toMode:{xyz50:al,rgb:e=>L1(al(e))}},m0=Nd;var h0=1.09929682680944,Ud=.018053968510807,rl=e=>{let t=Math.abs(e);return t>Ud?(Math.sign(e)||1)*(h0*Math.pow(t,.45)-(h0-1)):4.5*e},qd=({x:e,y:t,z:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"rec2020",r:rl(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*o),g:rl(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*o),b:rl(e*.0176398574453108-t*.0427706132578085+.9421031212354739*o)};return a!==void 0&&(r.alpha=a),r},ll=qd;var g0=1.09929682680944,zd=.018053968510807,nl=(e=0)=>{let t=Math.abs(e);return t<zd*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+g0-1)/g0,1/.45)},jd=e=>{let t=nl(e.r),o=nl(e.g),a=nl(e.b),r={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*o+.1688809751641721*a,y:.262700212011267*t+.6779980715188708*o+.059301716469862*a,z:0*t+.0280726930490874*o+1.0609850577107909*a};return e.alpha!==void 0&&(r.alpha=e.alpha),r},il=jd;var Kd={...a1,mode:"rec2020",fromMode:{xyz65:ll,rgb:e=>ll(Ne(e))},toMode:{xyz65:il,rgb:e=>Ue(il(e))},parse:["rec2020"],serialize:"rec2020"},v0=Kd;var T1=.0037930732552754493,ga=Math.cbrt(T1);var sl=e=>Math.cbrt(e)-ga,Gd=e=>{let{r:t,g:o,b:a,alpha:r}=r1(e),l=sl(.3*t+.622*o+.078*a+T1),n=sl(.23*t+.692*o+.078*a+T1),i=sl(.2434226892454782*t+.2047674442449682*o+.5518098665095535*a+T1),s={mode:"xyb",x:(l-n)/2,y:(l+n)/2,b:i-(l+n)/2};return r!==void 0&&(s.alpha=r),s},x0=Gd;var dl=e=>Math.pow(e+ga,3),Wd=({x:e,y:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=dl(e+t)-T1,l=dl(t-e)-T1,n=dl(o+t)-T1,i=l1({r:11.031566904639861*r-9.866943908131562*l-.16462299650829934*n,g:-3.2541473810744237*r+4.418770377582723*l-.16462299650829934*n,b:-3.6588512867136815*r+2.7129230459360922*l+1.9459282407775895*n});return a!==void 0&&(i.alpha=a),i},L0=Wd;var Xd={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:L0},fromMode:{rgb:x0},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:E,y:E,b:E,alpha:{use:E,fixup:le}}},w0=Xd;var Qd={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:L1,lab:Vt},fromMode:{rgb:w1,lab:Tt},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:E,y:E,z:E,alpha:{use:E,fixup:le}}},I0=Qd;var Jd=e=>{let{x:t,y:o,z:a,alpha:r}=e;t===void 0&&(t=0),o===void 0&&(o=0),a===void 0&&(a=0);let l={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*o-.0501922295431356*a,y:.0296278156881593*t+.990434484573249*o-.0170738250293851*a,z:-.0092430581525912*t+.0150551448965779*o+.7518742899580008*a};return r!==void 0&&(l.alpha=r),l},b0=Jd;var Yd=e=>{let{x:t,y:o,z:a,alpha:r}=e;t===void 0&&(t=0),o===void 0&&(o=0),a===void 0&&(a=0);let l={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*o+.0632593086610217*a,y:-.0283697069632081*t+1.0099954580058226*o+.021041398966943*a,z:.0123140016883199*t-.0205076964334779*o+1.3303659366080753*a};return r!==void 0&&(l.alpha=r),l},y0=Yd;var eu={mode:"xyz65",toMode:{rgb:Ue,xyz50:b0},fromMode:{rgb:Ne,xyz50:y0},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:E,y:E,z:E,alpha:{use:E,fixup:le}}},M0=eu;var tu=({r:e,g:t,b:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*o,i:.59597799*e-.2741761*t-.32180189*o,q:.21147017*e-.52261711*t+.31114694*o};return a!==void 0&&(r.alpha=a),r},S0=tu;var ou=({y:e,i:t,q:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r={mode:"rgb",r:e+.95608445*t+.6208885*o,g:e-.27137664*t-.6486059*o,b:e-1.10561724*t+1.70250126*o};return a!==void 0&&(r.alpha=a),r},R0=ou;var au={mode:"yiq",toMode:{rgb:R0},fromMode:{rgb:S0},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:E,i:E,q:E,alpha:{use:E,fixup:le}}},H0=au;var ru=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,lu=(e=4)=>t=>typeof t=="number"?ru(t,e):t,k0=lu;var Ox=k0(2);var Ex=Xe("rgb"),Bx=Xe("hsl");var ul=e=>{let t=zo(e);if(!t)return;let o=jo(t.mode);if(!o.serialize||typeof o.serialize=="string"){let a=`color(${o.serialize||`--${t.mode}`} `;return o.channels.forEach((r,l)=>{r!=="alpha"&&(a+=(l?" ":"")+(t[r]!==void 0?t[r]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(a+=` / ${t.alpha}`),a+")"}if(typeof o.serialize=="function")return o.serialize(t)};var yL=se(H2),ML=se(B2),SL=se(F2),RL=se($2),HL=se(N2),kL=se(ta),PL=se(oa),TL=se(K2),VL=se(W2),_L=se(Q2),DL=se(J2),OL=se(_t),EL=se(e0),BL=se(Dt),AL=se(o0),ZL=se(l0),FL=se(n0),$L=se(i0),NL=se(s0),UL=se(d0),qL=se(c0),zL=se(p0),jL=se(C0),KL=se(m0),GL=se(v0),WL=se(a1),XL=se(w0),QL=se(I0),JL=se(M0),YL=se(H0);var cl=Xe("rgb"),nu=Xe("hsl"),iu=Xe("oklch"),su=Xe("oklab"),du=Xe("lch"),uu=Xe("lab"),P0=null;function cu(){return P0??(P0=document.createElement("canvas").getContext("2d")),P0}function T0(e){try{let t=cu();if(!t)return null;t.fillStyle="#000000",t.fillStyle=e;let o=t.fillStyle;t.fillStyle="#ffffff",t.fillStyle=e;let a=t.fillStyle;return o===a?o:null}catch{return null}}function V0(e){if(!e||typeof e!="string")return!1;let t=e.trim();return st(t)!==void 0?!0:T0(t)!==null}function ct(e){let t={r:255,g:255,b:255,a:1};if(!e||typeof e!="string")return t;let o=e.trim(),a=st(o);if(a){let l=cl(a);if(l&&"r"in l&&"g"in l&&"b"in l)return{r:Math.round(Math.min(255,Math.max(0,l.r*255))),g:Math.round(Math.min(255,Math.max(0,l.g*255))),b:Math.round(Math.min(255,Math.max(0,l.b*255))),a:l.alpha??1}}let r=T0(o);if(r){if(r.startsWith("#")){let n=r.slice(1);return{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:1}}let l=r.match(/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(l&&l[1]!=null&&l[2]!=null&&l[3]!=null)return{r:+l[1],g:+l[2],b:+l[3],a:l[4]!=null?+l[4]:1}}return t}function Ot(e){let t=Math.round(Math.min(255,Math.max(0,e.r))),o=Math.round(Math.min(255,Math.max(0,e.g))),a=Math.round(Math.min(255,Math.max(0,e.b))),r=Math.round(Math.min(1,Math.max(0,e.a))*100)/100;return r>=1?`rgb(${t}, ${o}, ${a})`:`rgba(${t}, ${o}, ${a}, ${r})`}function va(e){let t=e.startsWith("#")?e.slice(1):e;return/^[0-9a-fA-F]+$/.test(t)&&[3,4,6,8].includes(t.length)}function go(e){let t=Math.round(Math.min(255,Math.max(0,e.r))),o=Math.round(Math.min(255,Math.max(0,e.g))),a=Math.round(Math.min(255,Math.max(0,e.b))),r=Math.min(1,Math.max(0,e.a)),l=`#${[t,o,a].map(n=>n.toString(16).padStart(2,"0")).join("")}`;return r<1?l+Math.round(r*255).toString(16).padStart(2,"0"):l}function _0(e){return!e||typeof e!="string"?"rgb":st(e.trim())?.mode??"rgb"}function qe(e,t){let o={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255,alpha:e.a};switch(t){case"oklch":return iu(o);case"oklab":return su(o);case"lch":return du(o);case"lab":return uu(o);default:return o}}function fl(e){let t=e?cl(e):null;return!t||!("r"in t)||!("g"in t)||!("b"in t)?{r:255,g:255,b:255,a:1}:{r:Math.round(Math.min(255,Math.max(0,t.r*255))),g:Math.round(Math.min(255,Math.max(0,t.g*255))),b:Math.round(Math.min(255,Math.max(0,t.b*255))),a:t.alpha??1}}function pl(e){return e?ul(e):""}function Et(e){let t={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255},o=nu(t);return o?{h:o.h??0,s:o.s*100,l:o.l*100}:{h:0,s:0,l:0}}function Cl(e){let t={mode:"hsl",h:e.h,s:e.s/100,l:e.l/100},o=cl(t);return!o||!("r"in o)||!("g"in o)||!("b"in o)?{r:0,g:0,b:0}:{r:Math.round(o.r*255),g:Math.round(o.g*255),b:Math.round(o.b*255)}}import{jsx as ke,jsxs as b1}from"react/jsx-runtime";var ml=16,Bt=4,pu=245,D0=260,Cu=200,mu="linear-gradient(45deg, #e0e0e0 25%, transparent 25%), linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e0e0e0 75%), linear-gradient(-45deg, transparent 75%, #e0e0e0 75%)",hu=["oklch","oklab","lch","lab","hsl"],O0=["oklch","oklab","lch","lab"],hl=["rgb","hsl","oklch","oklab","lch","lab"];function gl(e){let t=_0(e);return hu.includes(t)?t:"rgb"}function vo(e,t){let o=Et({r:e.r,g:e.g,b:e.b}),a=qe(e,"oklch"),r=qe(e,"oklab"),l=qe(e,"lch"),n=qe(e,"lab");return{hex:Lu(t,e),r:e.r,g:e.g,b:e.b,h:Math.round(o.h),s:Math.round(o.s),l:Math.round(o.l),a:Math.round(e.a*100),oklch_l:Math.round(a.l*100),oklch_c:Math.round(a.c*1e3)/10,oklch_h:Math.round(a.h||0),oklab_l:Math.round(r.l*100),oklab_a:Math.round(r.a*1e3)/10,oklab_b:Math.round(r.b*1e3)/10,lch_l:Math.round(l.l),lch_c:Math.round(l.c),lch_h:Math.round(l.h||0),lab_l:Math.round(n.l),lab_a:Math.round(n.a),lab_b:Math.round(n.b)}}function xl(e,t){let o=t.a/100;switch(e){case"oklch":return{mode:"oklch",l:t.oklch_l/100,c:t.oklch_c/100,h:t.oklch_h,alpha:o};case"oklab":return{mode:"oklab",l:t.oklab_l/100,a:t.oklab_a/100,b:t.oklab_b/100,alpha:o};case"lch":return{mode:"lch",l:t.lch_l,c:t.lch_c,h:t.lch_h,alpha:o};case"lab":return{mode:"lab",l:t.lab_l,a:t.lab_a,b:t.lab_b,alpha:o};case"hsl":return{mode:"hsl",h:t.h,s:t.s,l:t.l};default:return{mode:"rgb",r:t.r/255,g:t.g/255,b:t.b/255,alpha:o}}}function gu(e){let t=e?.closest(".property-panel-content")??e?.closest(".property-panel");return t?t.getBoundingClientRect():{top:0,bottom:window.innerHeight,left:0,right:window.innerWidth}}function vu(e,t=pu){let o=e.getBoundingClientRect(),a=gu(e),r=a.bottom-o.bottom-Bt,l=o.top-a.top-Bt,i=r<t&&l>=t?o.top-t-Bt:o.bottom+Bt;i=Math.max(a.top+Bt,Math.min(i,a.bottom-t-Bt));let s=o.left;return s+D0>a.right&&(s=a.right-D0-ml),s<a.left+ml&&(s=a.left+ml),{top:i,left:s}}function Ll(e){return e!=null&&typeof e=="string"?e:"#ffffff"}function vl(e){let{r:t,g:o,b:a,a:r}=ct(Ll(e));return{type:"rgba",r:t,g:o,b:a,a:r}}function xu(e,t){let o=e||Ot(t);return t.a>=1?{backgroundColor:o}:{backgroundColor:o,backgroundImage:`linear-gradient(0deg, ${o}, ${o}), ${mu}`,backgroundSize:"100% 100%, 8px 8px, 8px 8px, 8px 8px, 8px 8px",backgroundPosition:"0 0, 0 0, 0 4px, 4px -4px, -4px 0"}}function Lu(e,t){let o=typeof e=="string"?e.trim():"";return va(o)?o:go(t)}var wu=e=>e.preventDefault(),Iu=e=>{e.key==="Enter"&&e.currentTarget.blur()};function bu(e,t){switch(t.type){case"SET_ALL":return{format:e.format,hex:t.hex,r:t.r,g:t.g,b:t.b,h:t.h,s:t.s,l:t.l,a:t.a,oklch_l:t.oklch_l,oklch_c:t.oklch_c,oklch_h:t.oklch_h,oklab_l:t.oklab_l,oklab_a:t.oklab_a,oklab_b:t.oklab_b,lch_l:t.lch_l,lch_c:t.lch_c,lch_h:t.lch_h,lab_l:t.lab_l,lab_a:t.lab_a,lab_b:t.lab_b};case"SET_RGBA":{let{r:o,g:a,b:r,a:l}=t,n=Et({r:o,g:a,b:r}),i={r:o,g:a,b:r,a:l/100},s=qe(i,"oklch"),d=qe(i,"oklab"),u=qe(i,"lch"),p=qe(i,"lab");return{...e,hex:go(i),r:o,g:a,b:r,h:Math.round(n.h),s:Math.round(n.s),l:Math.round(n.l),a:l,oklch_l:Math.round(s.l*100),oklch_c:Math.round(s.c*1e3)/10,oklch_h:Math.round(s.h||0),oklab_l:Math.round(d.l*100),oklab_a:Math.round(d.a*1e3)/10,oklab_b:Math.round(d.b*1e3)/10,lch_l:Math.round(u.l),lch_c:Math.round(u.c),lch_h:Math.round(u.h||0),lab_l:Math.round(p.l),lab_a:Math.round(p.a),lab_b:Math.round(p.b)}}case"SET_HEX":return{...e,hex:t.hex};case"SET_CHANNEL":{let o={...e,[t.channel]:t.value},a;if(e.format==="rgb")a={r:o.r,g:o.g,b:o.b,a:o.a/100};else if(e.format==="hsl"){let d=Cl({h:o.h,s:o.s,l:o.l});o.r=Math.round(d.r),o.g=Math.round(d.g),o.b=Math.round(d.b),a={r:o.r,g:o.g,b:o.b,a:o.a/100}}else{let d=xl(e.format,o);a=fl(d),o.r=a.r,o.g=a.g,o.b=a.b}let r=Et({r:o.r,g:o.g,b:o.b}),l=qe(a,"oklch"),n=qe(a,"oklab"),i=qe(a,"lch"),s=qe(a,"lab");return{...o,hex:go(a),h:Math.round(r.h),s:Math.round(r.s),l:Math.round(r.l),oklch_l:Math.round(l.l*100),oklch_c:Math.round(l.c*1e3)/10,oklch_h:Math.round(l.h||0),oklab_l:Math.round(n.l*100),oklab_a:Math.round(n.a*1e3)/10,oklab_b:Math.round(n.b*1e3)/10,lch_l:Math.round(i.l),lch_c:Math.round(i.c),lch_h:Math.round(i.h||0),lab_l:Math.round(s.l),lab_a:Math.round(s.a),lab_b:Math.round(s.b)}}case"SET_FORMAT":return{...e,format:t.format};default:return e}}var yu={placeholder:"Enter color value",ariaValue:"{0} color value",ariaOpenPicker:"{0}, open color picker. Current color: {1}",ariaPicker:"{0} picker",ariaSaturation:"Color saturation and brightness",ariaEyedropper:"Pick color from screen",ariaHue:"Hue, 0 to 360 degrees",ariaAlphaSlider:"Alpha transparency, 0 to 100 percent",ariaHex:"Hexadecimal color value",ariaChannel:"{0} ({1}), {2} to {3}",ariaAlphaInput:"Alpha, 0 to 100 percent",ariaFormatCycle:"Color format: {0}. Click to change format.",titleFormatCycle:"Click to cycle format: RGB, HSL, OKLCH, OKLAB, LCH, LAB"};function xa({label:e,value:t,onChange:o,id:a="color",aria:r}){let l=c1(yu,r),n=`${a}-trigger`,i=`${a}-popover`,s=Ll(t),[{colorInput:d,colorState:u},p]=p2(()=>vl(s)),[C,c]=ve.useReducer(bu,s,m=>{let f=ct(m),k=vo(f,m);return{format:gl(m),...k}}),x=ve.useRef(C);x.current=C;let w=ve.useRef(null),h=ve.useRef(t),M=ve.useRef(o);M.current=o;let v=ve.useCallback(m=>{let f=x.current.format,k;if(O0.includes(f)){let H=qe(m,f);k=pl(H)}else if(f==="hsl"){let H=Et({r:m.r,g:m.g,b:m.b}),y=Math.round(m.a*100)/100;k=y>=1?`hsl(${Math.round(H.h)}, ${Math.round(H.s)}%, ${Math.round(H.l)}%)`:`hsla(${Math.round(H.h)}, ${Math.round(H.s)}%, ${Math.round(H.l)}%, ${y})`}else k=Ot(m);k!==w.current&&(w.current=k,h.current=k,typeof M.current=="function"&&M.current(k))},[]),T=C2(v,Cu),g=h2({computePosition:vu,onClose:T.flush,trapFocus:!0});ve.useEffect(()=>{let m=Ll(t);if(m===h.current)return;h.current=m;let f=ct(m);p(vl(t));let k=vo(f,m),H=gl(m);c({type:"SET_ALL",...k}),H!==x.current.format&&c({type:"SET_FORMAT",format:H})},[t,p]);let O=ve.useCallback(m=>{T.cancel();let f=m.target.value;if((!f||!f.startsWith("#"))&&(f="#"+f.replace(/^#+/,"")),va(f)){p({type:"hex",value:f});let k=ct(f),H=vo(k,f);c({type:"SET_ALL",...H})}else c({type:"SET_HEX",hex:f})},[T,p]),P=ve.useCallback(()=>{T.cancel();let m=x.current.hex.trim();if(va(m)){let f=ct(m),k=vo(f,m);c({type:"SET_ALL",...k}),v(f)}else{let f=x.current;c({type:"SET_HEX",hex:go({r:f.r,g:f.g,b:f.b,a:f.a/100})})}},[T,v]),z=ve.useMemo(()=>{switch(C.format){case"hsl":return[{key:"h",label:"H",min:0,max:360},{key:"s",label:"S",min:0,max:100},{key:"l",label:"L",min:0,max:100}];case"oklch":return[{key:"oklch_l",label:"L",min:0,max:100,step:1},{key:"oklch_c",label:"C",min:0,max:40,step:.1},{key:"oklch_h",label:"H",min:0,max:360,step:1}];case"oklab":return[{key:"oklab_l",label:"L",min:0,max:100,step:1},{key:"oklab_a",label:"A",min:-40,max:40,step:.1},{key:"oklab_b",label:"B",min:-40,max:40,step:.1}];case"lch":return[{key:"lch_l",label:"L",min:0,max:100,step:1},{key:"lch_c",label:"C",min:0,max:150,step:1},{key:"lch_h",label:"H",min:0,max:360,step:1}];case"lab":return[{key:"lab_l",label:"L",min:0,max:100,step:1},{key:"lab_a",label:"A",min:-128,max:127,step:1},{key:"lab_b",label:"B",min:-128,max:127,step:1}];default:return[{key:"r",label:"R",min:0,max:255},{key:"g",label:"G",min:0,max:255},{key:"b",label:"B",min:0,max:255}]}},[C.format]),S=ve.useCallback((m,f)=>{T.cancel();let k=String(f).trim(),H=["oklch_c","oklab_a","oklab_b"].includes(m),y=k===""?0:H?parseFloat(k):parseInt(k,10);if(Number.isNaN(y))return;let G=x.current,ee=z.find(xe=>xe.key===m),oe=0,ue=100;ee?(oe=ee.min,ue=ee.max):m==="a"?(oe=0,ue=100):m==="h"?(oe=0,ue=360):G.format==="rgb"&&(oe=0,ue=255);let ce=Math.min(ue,Math.max(oe,y));c({type:"SET_CHANNEL",channel:m,value:ce});let de={...G,[m]:ce},pe;if(G.format==="rgb")pe={r:de.r,g:de.g,b:de.b,a:de.a/100};else if(G.format==="hsl"){let xe=Cl({h:de.h,s:de.s,l:de.l});pe={r:xe.r,g:xe.g,b:xe.b,a:de.a/100}}else{let xe=xl(G.format,de);pe=fl(xe)}p({type:"rgba",...pe}),v(pe)},[T,p,v,z]),A=ve.useCallback(m=>{p(m);let f=m.getRgba();c({type:"SET_RGBA",r:Math.round(f.r),g:Math.round(f.g),b:Math.round(f.b),a:Math.round(f.a*100)}),T({r:f.r,g:f.g,b:f.b,a:f.a})},[p,T]),j=ve.useCallback(m=>{let f=m.target.closest('[role="slider"]');f instanceof HTMLElement&&f.focus()},[]);ve.useLayoutEffect(()=>{if(!g.isOpen||!g.popoverRef.current)return;let m=g.popoverRef.current.offsetHeight;m<=0||g.reposition(m)},[g.isOpen,g.reposition]);let $=u?.rgba??{r:255,g:255,b:255,a:1},B=ve.useCallback(()=>{let m=C.format;if(O0.includes(m)){let f=xl(m,C);return pl(f)}else if(m==="hsl"){let f=Et({r:$.r,g:$.g,b:$.b}),k=Math.round($.a*100)/100;return k>=1?`hsl(${Math.round(f.h)}, ${Math.round(f.s)}%, ${Math.round(f.l)}%)`:`hsla(${Math.round(f.h)}, ${Math.round(f.s)}%, ${Math.round(f.l)}%, ${k})`}else return Ot($)},[C,$])(),N=xu(B,$),[R,I]=ve.useState(B),b=ve.useRef(R);b.current=R,ve.useEffect(()=>{I(B)},[B]);let L=ve.useCallback(m=>{let f=m.target.value;I(f)},[]),Z=ve.useCallback(()=>{T.cancel();let m=b.current.trim();if(!m||!V0(m)){I(B);return}let f=ct(m),k=Ot(f),H=Ot($);if(k!==H){p(vl(m));let y=vo(f,m),G=gl(m);c({type:"SET_ALL",...y}),G!==x.current.format&&c({type:"SET_FORMAT",format:G}),m!==w.current&&(w.current=m,h.current=m,typeof M.current=="function"&&M.current(m))}else I(B)},[T,B,$,p]),_=ve.useCallback(m=>{m.key==="Enter"&&m.currentTarget.blur()},[]),F=ve.useCallback(()=>{let m=hl.indexOf(C.format),f=hl[(m+1)%hl.length]??C.format;c({type:"SET_FORMAT",format:f})},[C.format]),D=ve.useMemo(()=>{let m=g.triggerRef.current;if(!m)return document.body;let f=m.getRootNode();return f instanceof ShadowRoot?f:document.body},[g.isOpen,g.triggerRef]);return ke(t1,{label:e,id:a,className:"colorEditor-fieldset",children:b1("div",{className:"colorEditor-wrapper",children:[ke("button",{ref:g.triggerRef,id:n,type:"button",className:"colorEditor-swatch-only",onClick:g.toggle,"aria-expanded":g.isOpen,"aria-haspopup":"dialog","aria-controls":i,"aria-label":Te(l.ariaOpenPicker,[e,B]),children:ke("span",{style:N,"aria-hidden":"true",className:"colorEditor-swatch"})}),ke("input",{type:"text",className:"colorEditor-value-input",value:R,onChange:L,onBlur:Z,onKeyDown:_,"aria-label":Te(l.ariaValue,[e]),placeholder:l.placeholder,spellCheck:"false",autoComplete:"off"}),g.isOpen&&fu(b1("div",{ref:g.popoverRef,id:i,role:"dialog","aria-modal":"true","aria-label":Te(l.ariaPicker,[e]),style:{top:g.position.top,left:g.position.left},onDragStart:wu,onMouseUp:j,className:"colorEditor-popover",children:[b1(bt,{color:d,onChange:A,className:"colorEditor-picker",children:[ke(bt.Saturation,{className:"colorEditor-picker-saturation","aria-label":l.ariaSaturation}),b1("div",{className:"colorEditor-picker-toolbar",children:[ke(bt.EyeDropper,{"aria-label":l.ariaEyedropper,children:ke(eo,{size:18,"aria-hidden":"true"})}),b1("div",{className:"colorEditor-picker-sliders",children:[ke(bt.Hue,{className:"h-4 colorEditor-picker-hue","aria-label":l.ariaHue}),ke(bt.Alpha,{className:"h-4 colorEditor-picker-alpha","aria-label":l.ariaAlphaSlider})]})]})]}),b1("div",{className:"colorEditor-input-wrapper",children:[b1("div",{className:"colorEditor-input-group",children:[ke("input",{type:"text",value:C.hex,onChange:O,onBlur:P,onKeyDown:Iu,"aria-label":l.ariaHex,className:"colorEditor-input-hex",spellCheck:"false",autoComplete:"off"}),ke("label",{className:"colorEditor-input-label","aria-hidden":"true",children:"HEX"})]}),b1("div",{className:"colorEditor-channels-wrapper",children:[b1("div",{className:"colorEditor-input-container",children:[z.map(m=>ke("div",{className:"colorEditor-input-group-no-label",children:ke("input",{type:"number",min:m.min,max:m.max,step:m.step||1,value:C[m.key],onChange:f=>S(m.key,f.target.value),onBlur:f=>S(m.key,f.target.value),"aria-label":Te(l.ariaChannel,[m.label,C.format.toUpperCase(),m.min,m.max]),"aria-valuemin":m.min,"aria-valuemax":m.max,"aria-valuenow":C[m.key],className:"colorEditor-input-rgba"})},m.key)),ke("div",{className:"colorEditor-input-group-no-label",children:ke("input",{type:"number",min:0,max:100,value:C.a,onChange:m=>S("a",m.target.value),onBlur:m=>S("a",m.target.value),"aria-label":l.ariaAlphaInput,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":C.a,className:"colorEditor-input-rgba"})})]}),ke("div",{className:"colorEditor-format-selector",children:b1("button",{type:"button",className:"colorEditor-format-picker",onClick:F,"aria-label":Te(l.ariaFormatCycle,[C.format.toUpperCase()]),"aria-live":"polite",title:l.titleFormatCycle,children:[z.map(m=>ke("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:m.label},m.key)),ke("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:"A"})]})})]})]})]}),D)]})})}import ze from"react";import{jsx as At,jsxs as Su}from"react/jsx-runtime";var Mu={ariaValue:"{0} value",ariaUnit:"{0} unit"};function y1({label:e,value:t,onChange:o,units:a=Vo,constraints:r=f1,defaultUnit:l="px",placeholder:n=0,id:i="dimension",icon:s,aria:d}){let u=c1(Mu,d),p=ze.useMemo(()=>new Set(a.map(B=>B.value)),[a]),C=ze.useMemo(()=>Xt(a),[a]),c=ze.useMemo(()=>{if(n==null||n==="")return"";if(typeof n=="number")return String(n);let B=$e(String(n),l,C);return B.numericValue!==""?String(B.numericValue):String(n)},[n,l,C]),[x,w]=ze.useState(()=>{let B=$e(t,l,C);return B.numericValue!==""?String(B.numericValue):""}),[h,M]=ze.useState(()=>$e(t,l,C).unit),v=ze.useRef(o);v.current=o;let T=ze.useRef(t);ze.useEffect(()=>{if(t===T.current)return;T.current=t;let B=$e(t,l,C);w(B.numericValue!==""?String(B.numericValue):""),M(B.unit)},[t,l,C]);let g=ze.useCallback((B,N)=>{let R=parseFloat(B);if(B===""||isNaN(R)){if(T.current==="")return;T.current="",typeof v.current=="function"&&v.current("");return}let I=p1(R,N,r),b=C1(I,N,r),L=_o(b,N);L!==T.current&&(T.current=L,typeof v.current=="function"&&v.current(L))},[r]),O=ze.useCallback(B=>{let N=B.target.value;w(N);let R=$e(N,l,C);R.numericValue!==""&&R.unit&&p.has(R.unit)&&R.unit!==h&&M(R.unit)},[l,C,h,p]),P=ze.useCallback(B=>{let N=B.clipboardData.getData("text"),R=$e(N,l,C);if(R.numericValue!==""&&R.unit&&p.has(R.unit)){B.preventDefault(),w(String(R.numericValue)),M(R.unit);let I=p1(R.numericValue,R.unit,r),b=C1(I,R.unit,r),L=_o(b,R.unit);T.current=L,typeof v.current=="function"&&v.current(L)}},[l,C,p,r]),z=ze.useCallback(()=>{if(x===""){g("",h);return}let B=parseFloat(x);if(isNaN(B)){let I=$e(t,l,C);w(I.numericValue!==""?String(I.numericValue):"");return}let N=p1(B,h,r),R=C1(N,h,r);w(String(R)),g(String(R),h)},[x,h,t,l,C,r,g]),S=ze.useCallback(B=>{if(B.key==="Enter"){B.currentTarget.blur();return}if(B.key==="ArrowUp"||B.key==="ArrowDown"){B.preventDefault();let N=Do(x,B.key,B.shiftKey,h,r);if(N===null)return;w(N),g(N,h)}},[x,h,r,g]),A=ze.useCallback(B=>{let N=B.target.value;if(!p.has(N))return;if(M(N),x===""){g("",N);return}let R=parseFloat(x);if(isNaN(R))return;let I=p1(R,N,r),b=C1(I,N,r);w(String(b));let L=_o(b,N);T.current=L,typeof v.current=="function"&&v.current(L)},[x,p,r,g]),j=`${i}-input`,$=`${i}-unit`,K=a.some(B=>B.value!=="");return At(t1,{label:e,id:i,className:"dimensionEditor-fieldset",children:Su("div",{className:"dimensionEditor-row",children:[s&&At("span",{className:"dimensionEditor-icon","aria-hidden":"true",children:At(s,{size:14,width:14,height:14})}),At("input",{id:j,type:"text",className:s?"dimensionEditor-input dimensionEditor-input--with-icon":"dimensionEditor-input",value:x,placeholder:c,onChange:O,onPaste:P,onBlur:z,onKeyDown:S,"aria-label":Te(u.ariaValue,[e]),autoComplete:"off",spellCheck:"false"}),K&&At("select",{id:$,className:"dimensionEditor-unit",value:h,onChange:A,"aria-label":Te(u.ariaUnit,[e]),children:a.map(B=>At("option",{value:B.value,children:B.label},B.value))})]})})}function je(e,t){if(e==null)return{};var o={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;o[a]=e[a]}return o}function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)({}).hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},Y.apply(null,arguments)}var W=kn(U0(),1),Vu=kn(K0(),1);import*as ie from"react";import{cloneElement as Nw,Component as Uw,useRef as i1,useCallback as ne,useEffect as M1,useMemo as Zt}from"react";var G0=e=>typeof e=="object"&&e!=null&&e.nodeType===1,W0=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Pa=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let o=getComputedStyle(e,null);return W0(o.overflowY,t)||W0(o.overflowX,t)||(a=>{let r=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(a);return!!r&&(r.clientHeight<a.scrollHeight||r.clientWidth<a.scrollWidth)})(e)}return!1},Ta=(e,t,o,a,r,l,n,i)=>l<e&&n>t||l>e&&n<t?0:l<=e&&i<=o||n>=t&&i>=o?l-e-a:n>t&&i<o||l<e&&i>o?n-t+r:0,Tu=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)},X0=(e,t)=>{var o,a,r,l;if(typeof document>"u")return[];let{scrollMode:n,block:i,inline:s,boundary:d,skipOverflowHiddenElements:u}=t,p=typeof d=="function"?d:I=>I!==d;if(!G0(e))throw new TypeError("Invalid target");let C=document.scrollingElement||document.documentElement,c=[],x=e;for(;G0(x)&&p(x);){if(x=Tu(x),x===C){c.push(x);break}x!=null&&x===document.body&&Pa(x)&&!Pa(document.documentElement)||x!=null&&Pa(x,u)&&c.push(x)}let w=(a=(o=window.visualViewport)==null?void 0:o.width)!=null?a:innerWidth,h=(l=(r=window.visualViewport)==null?void 0:r.height)!=null?l:innerHeight,{scrollX:M,scrollY:v}=window,{height:T,width:g,top:O,right:P,bottom:z,left:S}=e.getBoundingClientRect(),{top:A,right:j,bottom:$,left:K}=(I=>{let b=window.getComputedStyle(I);return{top:parseFloat(b.scrollMarginTop)||0,right:parseFloat(b.scrollMarginRight)||0,bottom:parseFloat(b.scrollMarginBottom)||0,left:parseFloat(b.scrollMarginLeft)||0}})(e),B=i==="start"||i==="nearest"?O-A:i==="end"?z+$:O+T/2-A+$,N=s==="center"?S+g/2-K+j:s==="end"?P+j:S-K,R=[];for(let I=0;I<c.length;I++){let b=c[I],{height:L,width:Z,top:_,right:F,bottom:D,left:m}=b.getBoundingClientRect();if(n==="if-needed"&&O>=0&&S>=0&&z<=h&&P<=w&&(b===C&&!Pa(b)||O>=_&&z<=D&&S>=m&&P<=F))return R;let f=getComputedStyle(b),k=parseInt(f.borderLeftWidth,10),H=parseInt(f.borderTopWidth,10),y=parseInt(f.borderRightWidth,10),G=parseInt(f.borderBottomWidth,10),ee=0,oe=0,ue="offsetWidth"in b?b.offsetWidth-b.clientWidth-k-y:0,ce="offsetHeight"in b?b.offsetHeight-b.clientHeight-H-G:0,de="offsetWidth"in b?b.offsetWidth===0?0:Z/b.offsetWidth:0,pe="offsetHeight"in b?b.offsetHeight===0?0:L/b.offsetHeight:0;if(C===b)ee=i==="start"?B:i==="end"?B-h:i==="nearest"?Ta(v,v+h,h,H,G,v+B,v+B+T,T):B-h/2,oe=s==="start"?N:s==="center"?N-w/2:s==="end"?N-w:Ta(M,M+w,w,k,y,M+N,M+N+g,g),ee=Math.max(0,ee+v),oe=Math.max(0,oe+M);else{ee=i==="start"?B-_-H:i==="end"?B-D+G+ce:i==="nearest"?Ta(_,D,L,H,G+ce,B,B+T,T):B-(_+L/2)+ce/2,oe=s==="start"?N-m-k:s==="center"?N-(m+Z/2)+ue/2:s==="end"?N-F+y+ue:Ta(m,F,Z,k,y+ue,N,N+g,g);let{scrollLeft:xe,scrollTop:_e}=b;ee=pe===0?0:Math.max(0,Math.min(_e+ee/pe,b.scrollHeight-L/pe+ce)),oe=de===0?0:Math.max(0,Math.min(xe+oe/de,b.scrollWidth-Z/de+ue)),B+=_e-ee,N+=xe-oe}R.push({el:b,top:ee,left:oe})}return R};var _u=0;function a5(){return String(_u++)}function wo(e){var t=ie.useRef(e);return t.current=e,t}function Du(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){t.forEach(function(r){typeof r=="function"?r(a):r&&(r.current=a)})}}function bl(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){for(var r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];return t.some(function(i){return i&&i.apply(void 0,[a].concat(l)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function r5(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var l=arguments.length,n=new Array(l),i=0;i<l;i++)n[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,n)},t)}return r.cancel=a,r}var Ou=r5(function(e){l5(e).textContent=""},500);function l5(e){var t=e.getElementById("a11y-status-message");return t||(t=e.createElement("div"),t.setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}function Eu(e,t){if(!(!e||!t)){var o=l5(t);o.textContent=e,Ou(t)}}function Bu(e){var t=e?.getElementById("a11y-status-message");t&&t.remove()}function Io(){}var Ml=Io;function _a(e,t){if(!t)return e;var o=Object.keys(e);return o.reduce(function(a,r){return t[r]!==void 0&&(a[r]=t[r]),a},Y({},e))}function Au(e,t){if(e){var o=X0(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});o.forEach(function(a){var r=a.el,l=a.top,n=a.left;r.scrollTop=l,r.scrollLeft=n})}}function Q0(e,t,o){var a=e===t||t instanceof o.Node&&e.contains&&e.contains(t);return a}function Zu(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var l=arguments.length,n=new Array(l),i=0;i<l;i++)n[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,n)},t)}return r.cancel=a,r}function we(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){for(var r=arguments.length,l=new Array(r>1?r-1:0),n=1;n<r;n++)l[n-1]=arguments[n];return t.some(function(i){return i&&i.apply(void 0,[a].concat(l)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function V1(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(a){t.forEach(function(r){typeof r=="function"?r(a):r&&(r.current=a)})}}function Fu(e,t){return e[t]!==void 0}function Da(e){var t=e.key,o=e.keyCode;return o>=37&&o<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function Q1(e,t,o,a,r){r===void 0&&(r=!1);var l=o.length;if(l===0)return-1;var n=l-1;(typeof e!="number"||e<0||e>n)&&(e=t>0?-1:n+1);var i=e+t;i<0?i=r?n:0:i>n&&(i=r?0:n);var s=Ft(i,t<0,o,a,r);return s===-1?e>=l?-1:e:s}function Ft(e,t,o,a,r){r===void 0&&(r=!1);var l=o.length;if(t){for(var n=e;n>=0;n--)if(!a(o[n],n))return n}else for(var i=e;i<l;i++)if(!a(o[i],i))return i;return r?Ft(t?l-1:0,t,o,a):-1}function J0(e,t,o,a){return a===void 0&&(a=!0),o&&t.some(function(r){return r&&(Q0(r,e,o)||a&&Q0(r,o.document.activeElement,o))})}function Sl(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function $u(e,t,o,a){for(var r=e.type,l={},n=Object.keys(o),i=0,s=n;i<s.length;i++){var d=s[i];Nu(d,e,t,o,a),a[d]!==o[d]&&(l[d]=a[d])}t.onStateChange&&Object.keys(l).length&&t.onStateChange(Y({type:r},l))}function Nu(e,t,o,a,r){if(r[e]!==a[e]){var l="on"+Sl(e)+"Change",n=o[l];if(typeof n=="function"){var i=t.type;n(Y({type:i},r))}}}function n5(e,t,o,a){var r=ie.useRef(null),l=ie.useRef(void 0),n=wo(t),i=ie.useCallback(function(C,c){l.current=c,C=_a(C,n.current);var x=e(C,n.current,c),w=n.current.stateReducer(C,Y({},c,{changes:x}));return Y({},C,w)},[n,e]),s=ie.useReducer(i,t,o),d=s[0],u=s[1],p=l.current;return ie.useEffect(function(){var C,c=_a((C=r.current)!=null?C:{},n.current),x=p&&r.current&&!a(c,d);x&&$u(p,n.current,c,d),r.current=d},[d,p,a,n]),[d,u]}function Rl(e,t,o,a){var r=n5(e,t,o,a),l=r[0],n=r[1];return[_a(l,t),n]}function Hl(e,t,o,a){if(e!==void 0&&t!==void 0)return[e,t];if(e!==void 0){var r=o.indexOf(e);if(r<0)throw new Error(a);return[e,o.indexOf(e)]}if(t!==void 0){var l=o[t];if(l===void 0)throw new Error(a);return[l,t]}throw new Error(a)}function Fa(){var e=ie.useRef(!0);return ie.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function Uu(e,t){return t.changes}var qu={environment:W.default.shape({addEventListener:W.default.func.isRequired,removeEventListener:W.default.func.isRequired,document:W.default.shape({createElement:W.default.func.isRequired,getElementById:W.default.func.isRequired,activeElement:W.default.any.isRequired,body:W.default.any.isRequired}).isRequired,Node:W.default.func.isRequired}),itemToKey:W.default.func,stateReducer:W.default.func};function S1(e,t,o){var a=e["default"+Sl(t)];return a!==void 0?a:o[t]}function ft(e,t,o){var a=e[t];if(a!==void 0)return a;var r=e["initial"+Sl(t)];return r!==void 0?r:S1(e,t,o)}var Y0=r5(function(e,t){Eu(e,t)},200);function kl(e,t,o,a){var r=a?.document,l=Fa();ie.useEffect(function(){if(!(!e||l||!r)){var n=e(t);Y0(n,r)}},o),ie.useEffect(function(){return function(){Y0.cancel(),Bu(r)}},[r])}var xo=Y({},qu,{getA11yStatusMessage:W.default.func,highlightedIndex:W.default.number,defaultHighlightedIndex:W.default.number,initialHighlightedIndex:W.default.number,isOpen:W.default.bool,defaultIsOpen:W.default.bool,initialIsOpen:W.default.bool,selectedItem:W.default.any,initialSelectedItem:W.default.any,defaultSelectedItem:W.default.any,id:W.default.string,labelId:W.default.string,menuId:W.default.string,getItemId:W.default.func,toggleButtonId:W.default.string,onSelectedItemChange:W.default.func,onHighlightedIndexChange:W.default.func,onStateChange:W.default.func,onIsOpenChange:W.default.func,scrollIntoView:W.default.func}),Lo={itemToString:function(t){return t?String(t):""},itemToKey:function(t){return t},stateReducer:Uu,scrollIntoView:Au,environment:typeof window>"u"?void 0:window},Ke={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""},zu=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?ie.useLayoutEffect:ie.useEffect;function ju(e){return/^\S{1}$/.test(e)}function i5(e){var t=ft(e,"selectedItem",Ke),o=ft(e,"isOpen",Ke),a=Ku(e),r=ft(e,"inputValue",Ke);return{highlightedIndex:a<0&&t&&o?e.items.findIndex(function(l){return e.itemToKey(l)===e.itemToKey(t)}):a,isOpen:o,selectedItem:t,inputValue:r}}function pt(e,t,o){var a=e.items,r=e.initialHighlightedIndex,l=e.defaultHighlightedIndex,n=e.isItemDisabled,i=e.itemToKey,s=t.selectedItem,d=t.highlightedIndex;return a.length===0?-1:r!==void 0&&d===r&&!n(a[r],r)?r:l!==void 0&&!n(a[l],l)?l:s?a.findIndex(function(u){return i(s)===i(u)}):o<0&&!n(a[a.length-1],a.length-1)?a.length-1:o>0&&!n(a[0],0)?0:-1}function s5(e,t,o){var a=ie.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),r=ie.useCallback(function(){return o.map(function(l){return l.current})},[o]);return ie.useEffect(function(){if(!e)return Io;function l(){a.current.isTouchEnd=!1,a.current.isMouseDown=!0}function n(u){a.current.isMouseDown=!1,J0(u.target,r(),e)||t()}function i(){a.current.isTouchEnd=!1,a.current.isTouchMove=!1}function s(){a.current.isTouchMove=!0}function d(u){a.current.isTouchEnd=!0,!a.current.isTouchMove&&!J0(u.target,r(),e,!1)&&t()}return e.addEventListener("mousedown",l),e.addEventListener("mouseup",n),e.addEventListener("touchstart",i),e.addEventListener("touchmove",s),e.addEventListener("touchend",d),function(){e.removeEventListener("mousedown",l),e.removeEventListener("mouseup",n),e.removeEventListener("touchstart",i),e.removeEventListener("touchmove",s),e.removeEventListener("touchend",d)}},[e,r,t]),a.current}var Pl=function(){return Io};function d5(e){var t=e.highlightedIndex,o=e.isOpen,a=e.itemRefs,r=e.getItemNodeFromIndex,l=e.menuElement,n=e.scrollIntoView,i=ie.useRef(!0);return zu(function(){t<0||!o||!Object.keys(a.current).length||(i.current===!1?i.current=!0:n(r(t),l))},[t]),i}var Tl=Io;function Oa(e,t,o){var a;o===void 0&&(o=!0);var r=((a=e.items)==null?void 0:a.length)&&t>=0;return Y({isOpen:!1,highlightedIndex:-1},r&&Y({selectedItem:e.items[t],isOpen:S1(e,"isOpen",Ke),highlightedIndex:S1(e,"highlightedIndex",Ke)},o&&{inputValue:e.itemToString(e.items[t])}))}function u5(e,t){return e.isOpen===t.isOpen&&e.inputValue===t.inputValue&&e.highlightedIndex===t.highlightedIndex&&e.selectedItem===t.selectedItem}function Ea(e){var t=S1(e,"highlightedIndex",Ke);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function Ku(e){var t=ft(e,"highlightedIndex",Ke);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function c5(e,t,o,a){var r=o.type,l;switch(r){case a.ItemMouseMove:l={highlightedIndex:o.disabled?-1:o.index};break;case a.MenuMouseLeave:l={highlightedIndex:-1};break;case a.ToggleButtonClick:case a.FunctionToggleMenu:l={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:pt(t,e,0)};break;case a.FunctionOpenMenu:l={isOpen:!0,highlightedIndex:pt(t,e,0)};break;case a.FunctionCloseMenu:l={isOpen:!1};break;case a.FunctionSetHighlightedIndex:l={highlightedIndex:t.isItemDisabled(t.items[o.highlightedIndex],o.highlightedIndex)?-1:o.highlightedIndex};break;case a.FunctionSetInputValue:l={inputValue:o.inputValue};break;case a.FunctionReset:l={highlightedIndex:Ea(t),isOpen:S1(t,"isOpen",Ke),selectedItem:S1(t,"selectedItem",Ke),inputValue:S1(t,"inputValue",Ke)};break;default:throw new Error("Reducer called without proper action type.")}return Y({},e,l)}var Gu=Y({},xo,{items:W.default.array.isRequired,isItemDisabled:W.default.func}),Wu=Y({},Lo,{isItemDisabled:function(){return!1}});function Xu(e){for(var t=e.keysSoFar,o=e.highlightedIndex,a=e.items,r=e.itemToString,l=e.isItemDisabled,n=t.toLowerCase(),i=0;i<a.length;i++){var s=(i+o+(t.length<2?1:0))%a.length,d=a[s];if(d!==void 0&&r(d).toLowerCase().startsWith(n)&&!l(d,s))return s}return o}var Va=0,Vl=1,_l=2,Ba=3,Dl=4,Ol=5,El=6,Bl=7,Al=8,Zl=9,Fl=10,Aa=11,f5=12,p5=13,$l=14,C5=15,m5=16,h5=17,g5=18,Nl=19,yl=20,v5=21,x5=Object.freeze({__proto__:null,FunctionCloseMenu:h5,FunctionOpenMenu:m5,FunctionReset:v5,FunctionSelectItem:Nl,FunctionSetHighlightedIndex:g5,FunctionSetInputValue:yl,FunctionToggleMenu:C5,ItemClick:$l,ItemMouseMove:p5,MenuMouseLeave:f5,ToggleButtonBlur:Aa,ToggleButtonClick:Va,ToggleButtonKeyDownArrowDown:Vl,ToggleButtonKeyDownArrowUp:_l,ToggleButtonKeyDownCharacter:Ba,ToggleButtonKeyDownEnd:El,ToggleButtonKeyDownEnter:Bl,ToggleButtonKeyDownEscape:Dl,ToggleButtonKeyDownHome:Ol,ToggleButtonKeyDownPageDown:Fl,ToggleButtonKeyDownPageUp:Zl,ToggleButtonKeyDownSpaceButton:Al});function Qu(e,t,o){var a,r=o.type,l=o.altKey,n;switch(r){case $l:n={isOpen:S1(t,"isOpen",Ke),highlightedIndex:Ea(t),selectedItem:t.items[o.index]};break;case Ba:{var i=o.key,s=""+e.inputValue+i,d=!e.isOpen&&e.selectedItem?t.items.findIndex(function(c){return t.itemToKey(c)===t.itemToKey(e.selectedItem)}):e.highlightedIndex,u=Xu({keysSoFar:s,highlightedIndex:d,items:t.items,itemToString:t.itemToString,isItemDisabled:t.isItemDisabled});n={inputValue:s,highlightedIndex:u,isOpen:!0}}break;case Vl:{var p=e.isOpen?Q1(e.highlightedIndex,1,t.items,t.isItemDisabled):l&&e.selectedItem==null?-1:pt(t,e,1);n={highlightedIndex:p,isOpen:!0}}break;case _l:if(e.isOpen&&l)n=Oa(t,e.highlightedIndex,!1);else{var C=e.isOpen?Q1(e.highlightedIndex,-1,t.items,t.isItemDisabled):pt(t,e,-1);n={highlightedIndex:C,isOpen:!0}}break;case Bl:case Al:n=Oa(t,e.highlightedIndex,!1);break;case Ol:n={highlightedIndex:Ft(0,!1,t.items,t.isItemDisabled),isOpen:!0};break;case El:n={highlightedIndex:Ft(t.items.length-1,!0,t.items,t.isItemDisabled),isOpen:!0};break;case Zl:n={highlightedIndex:Q1(e.highlightedIndex,-10,t.items,t.isItemDisabled)};break;case Fl:n={highlightedIndex:Q1(e.highlightedIndex,10,t.items,t.isItemDisabled)};break;case Dl:n={isOpen:!1,highlightedIndex:-1};break;case Aa:n=Y({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&{selectedItem:t.items[e.highlightedIndex]});break;case Nl:n={selectedItem:o.selectedItem};break;default:return c5(e,t,o,x5)}return Y({},e,n)}var Ju=Y({},ie),L5=Ju.useId,w5=typeof L5=="function"?Yu:e4;function Yu(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,l=e.toggleButtonId,n=e.inputId,i="downshift-"+L5();t||(t=i);var s=ie.useMemo(function(){return{labelId:o??t+"-label",menuId:a??t+"-menu",getItemId:r??function(d){return t+"-item-"+d},toggleButtonId:l??t+"-toggle-button",inputId:n??t+"-input"}},[r,t,n,o,a,l]);return s}function e4(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,l=e.toggleButtonId,n=e.inputId,i=ie.useRef(t??"downshift-"+a5()),s=i.current,d=ie.useMemo(function(){return{labelId:o??s+"-label",menuId:a??s+"-menu",getItemId:r??function(u){return s+"-item-"+u},toggleButtonId:l??s+"-toggle-button",inputId:n??s+"-input"}},[r,n,o,a,l,s]);return d}var t4=["onClick"],o4=["onMouseLeave","refKey","ref"],a4=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],r4=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];$a.stateChangeTypes=x5;function $a(e){e===void 0&&(e={}),Ml(e,$a,Gu);var t=Y({},Wu,e),o=t.scrollIntoView,a=t.environment,r=t.getA11yStatusMessage,l=Rl(Qu,t,i5,u5),n=l[0],i=l[1],s=n.isOpen,d=n.highlightedIndex,u=n.selectedItem,p=n.inputValue,C=i1(null),c=i1(null),x=i1({}),w=i1(null),h=w5(t),M=wo({state:n,props:t}),v=ne(function(_){return x.current[h.getItemId(_)]},[h]);kl(r,n,[s,d,u,p],a);var T=d5({menuElement:c.current,highlightedIndex:d,isOpen:s,itemRefs:x,scrollIntoView:o,getItemNodeFromIndex:v});M1(function(){return w.current=Zu(function(_){_({type:yl,inputValue:""})},500),function(){w.current.cancel()}},[]),M1(function(){p&&w.current(i)},[i,p]),Tl({props:t,state:n}),M1(function(){var _=ft(t,"isOpen",Ke);_&&C.current&&C.current.focus()},[]);var g=ne(function(){M.current.state.isOpen&&i({type:Aa})},[i,M]),O=Zt(function(){return[c,C]},[]),P=s5(a,g,O),z=Pl("getMenuProps","getToggleButtonProps");M1(function(){s||(x.current={})},[s]);var S=Zt(function(){return{ArrowDown:function(F){F.preventDefault(),i({type:Vl,altKey:F.altKey})},ArrowUp:function(F){F.preventDefault(),i({type:_l,altKey:F.altKey})},Home:function(F){F.preventDefault(),i({type:Ol})},End:function(F){F.preventDefault(),i({type:El})},Escape:function(){M.current.state.isOpen&&i({type:Dl})},Enter:function(F){F.preventDefault(),i({type:M.current.state.isOpen?Bl:Va})},PageUp:function(F){M.current.state.isOpen&&(F.preventDefault(),i({type:Zl}))},PageDown:function(F){M.current.state.isOpen&&(F.preventDefault(),i({type:Fl}))}," ":function(F){F.preventDefault();var D=M.current.state;if(!D.isOpen){i({type:Va});return}D.inputValue?i({type:Ba,key:" "}):i({type:Al})}}},[i,M]),A=ne(function(){i({type:C5})},[i]),j=ne(function(){i({type:h5})},[i]),$=ne(function(){i({type:m5})},[i]),K=ne(function(_){i({type:g5,highlightedIndex:_})},[i]),B=ne(function(_){i({type:Nl,selectedItem:_})},[i]),N=ne(function(){i({type:v5})},[i]),R=ne(function(_){i({type:yl,inputValue:_})},[i]),I=ne(function(_){var F=_===void 0?{}:_,D=F.onClick,m=je(F,t4),f=function(){var H;(H=C.current)==null||H.focus()};return Y({id:h.labelId,htmlFor:h.toggleButtonId,onClick:we(D,f)},m)},[h]),b=ne(function(_,F){var D,m=_===void 0?{}:_,f=m.onMouseLeave,k=m.refKey,H=k===void 0?"ref":k,y=m.ref,G=je(m,o4),ee=F===void 0?{}:F,oe=ee.suppressRefError,ue=oe===void 0?!1:oe,ce=function(){i({type:f5})};return z("getMenuProps",ue,H,c),Y((D={},D[H]=V1(y,function(de){c.current=de}),D.id=h.menuId,D.role="listbox",D["aria-labelledby"]=G&&G["aria-label"]?void 0:""+h.labelId,D.onMouseLeave=we(f,ce),D),G)},[i,z,h]),L=ne(function(_,F){var D,m=_===void 0?{}:_,f=m.onBlur,k=m.onClick;m.onPress;var H=m.onKeyDown,y=m.refKey,G=y===void 0?"ref":y,ee=m.ref,oe=je(m,a4),ue=F===void 0?{}:F,ce=ue.suppressRefError,de=ce===void 0?!1:ce,pe=M.current.state,xe=function(){i({type:Va})},_e=function(){pe.isOpen&&!P.isMouseDown&&i({type:Aa})},_1=function(Ae){var Ye=Da(Ae);Ye&&S[Ye]?S[Ye](Ae):ju(Ye)&&i({type:Ba,key:Ye})},De=Y((D={},D[G]=V1(ee,function(We){C.current=We}),D["aria-activedescendant"]=pe.isOpen&&pe.highlightedIndex>-1?h.getItemId(pe.highlightedIndex):"",D["aria-controls"]=h.menuId,D["aria-expanded"]=M.current.state.isOpen,D["aria-haspopup"]="listbox",D["aria-labelledby"]=oe&&oe["aria-label"]?void 0:""+h.labelId,D.id=h.toggleButtonId,D.role="combobox",D.tabIndex=0,D.onBlur=we(f,_e),D),oe);return oe.disabled||(De.onClick=we(k,xe),De.onKeyDown=we(H,_1)),z("getToggleButtonProps",de,G,C),De},[i,h,M,P,z,S]),Z=ne(function(_){var F,D=_===void 0?{}:_,m=D.item,f=D.index,k=D.onMouseMove,H=D.onClick,y=D.onMouseDown;D.onPress;var G=D.refKey,ee=G===void 0?"ref":G,oe=D.disabled,ue=D.ref,ce=je(D,r4);oe!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var de=M.current,pe=de.state,xe=de.props,_e=Hl(m,f,xe.items,"Pass either item or index to getItemProps!"),_1=_e[0],De=_e[1],We=xe.isItemDisabled(_1,De),Ae=function(){P.isTouchEnd||De===pe.highlightedIndex||(T.current=!1,i({type:p5,index:De,disabled:We}))},Ye=function(){i({type:$l,index:De})},Ut=function(qt){return qt.preventDefault()},Ze=Y((F={},F[ee]=V1(ue,function(s1){s1&&(x.current[h.getItemId(De)]=s1)}),F["aria-disabled"]=We,F["aria-selected"]=_1===pe.selectedItem,F.id=h.getItemId(De),F.role="option",F),ce);return We||(Ze.onClick=we(H,Ye)),Ze.onMouseMove=we(k,Ae),Ze.onMouseDown=we(y,Ut),Ze},[M,h,P,T,i]);return{getToggleButtonProps:L,getLabelProps:I,getMenuProps:b,getItemProps:Z,toggleMenu:A,openMenu:$,closeMenu:j,setHighlightedIndex:K,selectItem:B,reset:N,setInputValue:R,highlightedIndex:d,isOpen:s,selectedItem:u,inputValue:p}}var Ul=0,ql=1,zl=2,jl=3,Kl=4,Gl=5,Wl=6,Xl=7,Ql=8,Za=9,Jl=10,I5=11,b5=12,Yl=13,y5=14,M5=15,S5=16,R5=17,H5=18,en=19,k5=20,P5=21,tn=22,T5=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:tn,FunctionCloseMenu:R5,FunctionOpenMenu:S5,FunctionReset:P5,FunctionSelectItem:en,FunctionSetHighlightedIndex:H5,FunctionSetInputValue:k5,FunctionToggleMenu:M5,InputBlur:Za,InputChange:Ql,InputClick:Jl,InputKeyDownArrowDown:Ul,InputKeyDownArrowUp:ql,InputKeyDownEnd:Kl,InputKeyDownEnter:Xl,InputKeyDownEscape:zl,InputKeyDownHome:jl,InputKeyDownPageDown:Wl,InputKeyDownPageUp:Gl,ItemClick:Yl,ItemMouseMove:b5,MenuMouseLeave:I5,ToggleButtonClick:y5});function l4(e){var t=i5(e),o=t.selectedItem,a=t.inputValue;return a===""&&o&&e.defaultInputValue===void 0&&e.initialInputValue===void 0&&e.inputValue===void 0&&(a=e.itemToString(o)),Y({},t,{inputValue:a})}var n4=Y({},xo,{items:W.default.array.isRequired,isItemDisabled:W.default.func,inputValue:W.default.string,defaultInputValue:W.default.string,initialInputValue:W.default.string,inputId:W.default.string,onInputValueChange:W.default.func});function i4(e,t,o,a){var r=i1(),l=n5(e,t,o,a),n=l[0],i=l[1],s=Fa();return M1(function(){if(Fu(t,"selectedItem")){if(!s){var d=t.itemToKey(t.selectedItem)!==t.itemToKey(r.current);d&&i({type:tn,inputValue:t.itemToString(t.selectedItem)})}r.current=n.selectedItem===r.current?t.selectedItem:n.selectedItem}},[n.selectedItem,t.selectedItem]),[_a(n,t),i]}var s4=Y({},Lo,{isItemDisabled:function(){return!1}});function d4(e,t,o){var a,r=o.type,l=o.altKey,n;switch(r){case Yl:n={isOpen:S1(t,"isOpen",Ke),highlightedIndex:Ea(t),selectedItem:t.items[o.index],inputValue:t.itemToString(t.items[o.index])};break;case Ul:e.isOpen?n={highlightedIndex:Q1(e.highlightedIndex,1,t.items,t.isItemDisabled,!0)}:n={highlightedIndex:l&&e.selectedItem==null?-1:pt(t,e,1),isOpen:t.items.length>=0};break;case ql:e.isOpen?l?n=Oa(t,e.highlightedIndex):n={highlightedIndex:Q1(e.highlightedIndex,-1,t.items,t.isItemDisabled,!0)}:n={highlightedIndex:pt(t,e,-1),isOpen:t.items.length>=0};break;case Xl:n=Oa(t,e.highlightedIndex);break;case zl:n=Y({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Gl:n={highlightedIndex:Q1(e.highlightedIndex,-10,t.items,t.isItemDisabled,!0)};break;case Wl:n={highlightedIndex:Q1(e.highlightedIndex,10,t.items,t.isItemDisabled,!0)};break;case jl:n={highlightedIndex:Ft(0,!1,t.items,t.isItemDisabled)};break;case Kl:n={highlightedIndex:Ft(t.items.length-1,!0,t.items,t.isItemDisabled)};break;case Za:n=Y({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&o.selectItem&&{selectedItem:t.items[e.highlightedIndex],inputValue:t.itemToString(t.items[e.highlightedIndex])});break;case Ql:n={isOpen:!0,highlightedIndex:Ea(t),inputValue:o.inputValue};break;case Jl:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:pt(t,e,0)};break;case en:n={selectedItem:o.selectedItem,inputValue:t.itemToString(o.selectedItem)};break;case tn:n={inputValue:o.inputValue};break;default:return c5(e,t,o,T5)}return Y({},e,n)}var u4=["onMouseLeave","refKey","ref"],c4=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],f4=["onClick","onPress","refKey","ref"],p4=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];V5.stateChangeTypes=T5;function V5(e){e===void 0&&(e={}),Ml(e,V5,n4);var t=Y({},s4,e),o=t.items,a=t.scrollIntoView,r=t.environment,l=t.getA11yStatusMessage,n=i4(d4,t,l4,u5),i=n[0],s=n[1],d=i.isOpen,u=i.highlightedIndex,p=i.selectedItem,C=i.inputValue,c=i1(null),x=i1({}),w=i1(null),h=i1(null),M=Fa(),v=w5(t),T=i1(),g=wo({state:i,props:t}),O=ne(function(f){return x.current[v.getItemId(f)]},[v]);kl(l,i,[d,u,p,C],r);var P=d5({menuElement:c.current,highlightedIndex:u,isOpen:d,itemRefs:x,scrollIntoView:a,getItemNodeFromIndex:O});Tl({props:t,state:i}),M1(function(){var f=ft(t,"isOpen",Ke);f&&w.current&&w.current.focus()},[]),M1(function(){M||(T.current=o.length)});var z=ne(function(){g.current.state.isOpen&&s({type:Za})},[s,g]),S=Zt(function(){return[c,h,w]},[]),A=s5(r,z,S),j=Pl("getInputProps","getMenuProps");M1(function(){d||(x.current={})},[d]),M1(function(){var f;!d||!(r!=null&&r.document)||!(w!=null&&(f=w.current)!=null&&f.focus)||r.document.activeElement!==w.current&&w.current.focus()},[d,r]);var $=Zt(function(){return{ArrowDown:function(k){k.preventDefault(),s({type:Ul,altKey:k.altKey})},ArrowUp:function(k){k.preventDefault(),s({type:ql,altKey:k.altKey})},Home:function(k){g.current.state.isOpen&&(k.preventDefault(),s({type:jl}))},End:function(k){g.current.state.isOpen&&(k.preventDefault(),s({type:Kl}))},Escape:function(k){var H=g.current.state;(H.isOpen||H.inputValue||H.selectedItem||H.highlightedIndex>-1)&&(k.preventDefault(),s({type:zl}))},Enter:function(k){var H=g.current.state;!H.isOpen||k.which===229||(k.preventDefault(),s({type:Xl}))},PageUp:function(k){g.current.state.isOpen&&(k.preventDefault(),s({type:Gl}))},PageDown:function(k){g.current.state.isOpen&&(k.preventDefault(),s({type:Wl}))}}},[s,g]),K=ne(function(f){return Y({id:v.labelId,htmlFor:v.inputId},f)},[v]),B=ne(function(f,k){var H,y=f===void 0?{}:f,G=y.onMouseLeave,ee=y.refKey,oe=ee===void 0?"ref":ee,ue=y.ref,ce=je(y,u4),de=k===void 0?{}:k,pe=de.suppressRefError,xe=pe===void 0?!1:pe;return j("getMenuProps",xe,oe,c),Y((H={},H[oe]=V1(ue,function(_e){c.current=_e}),H.id=v.menuId,H.role="listbox",H["aria-labelledby"]=ce&&ce["aria-label"]?void 0:""+v.labelId,H.onMouseLeave=we(G,function(){s({type:I5})}),H),ce)},[s,j,v]),N=ne(function(f){var k,H,y=f===void 0?{}:f,G=y.item,ee=y.index,oe=y.refKey,ue=oe===void 0?"ref":oe,ce=y.ref,de=y.onMouseMove,pe=y.onMouseDown,xe=y.onClick;y.onPress;var _e=y.disabled,_1=je(y,c4);_e!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var De=g.current,We=De.props,Ae=De.state,Ye=Hl(G,ee,We.items,"Pass either item or index to getItemProps!"),Ut=Ye[0],Ze=Ye[1],s1=We.isItemDisabled(Ut,Ze),qt="onClick",So=xe,D1=function(){A.isTouchEnd||Ze===Ae.highlightedIndex||(P.current=!1,s({type:b5,index:Ze,disabled:s1}))},Y1=function(){s({type:Yl,index:Ze})},O1=function(J5){return J5.preventDefault()};return Y((k={},k[ue]=V1(ce,function(d1){d1&&(x.current[v.getItemId(Ze)]=d1)}),k["aria-disabled"]=s1,k["aria-selected"]=Ze===Ae.highlightedIndex,k.id=v.getItemId(Ze),k.role="option",k),!s1&&(H={},H[qt]=we(So,Y1),H),{onMouseMove:we(de,D1),onMouseDown:we(pe,O1)},_1)},[s,v,g,A,P]),R=ne(function(f){var k,H=f===void 0?{}:f,y=H.onClick;H.onPress;var G=H.refKey,ee=G===void 0?"ref":G,oe=H.ref,ue=je(H,f4),ce=g.current.state,de=function(){s({type:y5})};return Y((k={},k[ee]=V1(oe,function(pe){h.current=pe}),k["aria-controls"]=v.menuId,k["aria-expanded"]=ce.isOpen,k.id=v.toggleButtonId,k.tabIndex=-1,k),!ue.disabled&&Y({},{onClick:we(y,de)}),ue)},[s,g,v]),I=ne(function(f,k){var H,y=f===void 0?{}:f,G=y.onKeyDown,ee=y.onChange,oe=y.onInput,ue=y.onBlur;y.onChangeText;var ce=y.onClick,de=y.refKey,pe=de===void 0?"ref":de,xe=y.ref,_e=je(y,p4),_1=k===void 0?{}:k,De=_1.suppressRefError,We=De===void 0?!1:De;j("getInputProps",We,pe,w);var Ae=g.current.state,Ye=function(O1){var d1=Da(O1);d1&&$[d1]&&$[d1](O1)},Ut=function(O1){s({type:Ql,inputValue:O1.target.value})},Ze=function(O1){if(r!=null&&r.document&&Ae.isOpen&&!A.isMouseDown){var d1=O1.relatedTarget===null&&r.document.activeElement!==r.document.body;s({type:Za,selectItem:!d1})}},s1=function(){s({type:Jl})},qt="onChange",So={};if(!_e.disabled){var D1;So=(D1={},D1[qt]=we(ee,oe,Ut),D1.onKeyDown=we(G,Ye),D1.onBlur=we(ue,Ze),D1.onClick=we(ce,s1),D1)}return Y((H={},H[pe]=V1(xe,function(Y1){w.current=Y1}),H["aria-activedescendant"]=Ae.isOpen&&Ae.highlightedIndex>-1?v.getItemId(Ae.highlightedIndex):"",H["aria-autocomplete"]="list",H["aria-controls"]=v.menuId,H["aria-expanded"]=Ae.isOpen,H["aria-labelledby"]=_e&&_e["aria-label"]?void 0:v.labelId,H.autoComplete="off",H.id=v.inputId,H.role="combobox",H.value=Ae.inputValue,H),So,_e)},[s,v,r,$,g,A,j]),b=ne(function(){s({type:M5})},[s]),L=ne(function(){s({type:R5})},[s]),Z=ne(function(){s({type:S5})},[s]),_=ne(function(f){s({type:H5,highlightedIndex:f})},[s]),F=ne(function(f){s({type:en,selectedItem:f})},[s]),D=ne(function(f){s({type:k5,inputValue:f})},[s]),m=ne(function(){s({type:P5})},[s]);return{getItemProps:N,getLabelProps:K,getMenuProps:B,getInputProps:I,getToggleButtonProps:R,toggleMenu:b,openMenu:Z,closeMenu:L,setHighlightedIndex:_,setInputValue:D,selectItem:F,reset:m,highlightedIndex:u,isOpen:d,selectedItem:p,inputValue:C}}var _5={activeIndex:-1,selectedItems:[]};function e5(e,t){return ft(e,t,_5)}function t5(e,t){return S1(e,t,_5)}function C4(e){var t=e5(e,"activeIndex"),o=e5(e,"selectedItems");return{activeIndex:t,selectedItems:o}}function o5(e){if(e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)return!1;var t=e.target;return!(t instanceof HTMLInputElement&&t.value!==""&&(t.selectionStart!==0||t.selectionEnd!==0))}function m4(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var zw={stateReducer:xo.stateReducer,itemToKey:xo.itemToKey,environment:xo.environment,selectedItems:W.default.array,initialSelectedItems:W.default.array,defaultSelectedItems:W.default.array,getA11yStatusMessage:W.default.func,activeIndex:W.default.number,initialActiveIndex:W.default.number,defaultActiveIndex:W.default.number,onActiveIndexChange:W.default.func,onSelectedItemsChange:W.default.func,keyNavigationNext:W.default.string,keyNavigationPrevious:W.default.string},h4={itemToKey:Lo.itemToKey,stateReducer:Lo.stateReducer,environment:Lo.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},g4=Io,on=0,an=1,rn=2,ln=3,nn=4,sn=5,dn=6,un=7,cn=8,fn=9,pn=10,Cn=11,mn=12,v4=Object.freeze({__proto__:null,DropdownClick:un,DropdownKeyDownBackspace:dn,DropdownKeyDownNavigationPrevious:sn,FunctionAddSelectedItem:cn,FunctionRemoveSelectedItem:fn,FunctionReset:mn,FunctionSetActiveIndex:Cn,FunctionSetSelectedItems:pn,SelectedItemClick:on,SelectedItemKeyDownBackspace:rn,SelectedItemKeyDownDelete:an,SelectedItemKeyDownNavigationNext:ln,SelectedItemKeyDownNavigationPrevious:nn});function x4(e,t,o){var a=o.type,r=o.index,l=o.selectedItem,n=e.activeIndex,i=e.selectedItems,s;switch(a){case on:s={activeIndex:r};break;case nn:s={activeIndex:n-1<0?0:n-1};break;case ln:s={activeIndex:n+1>=i.length?-1:n+1};break;case rn:case an:{if(n<0)break;var d=n;i.length===1?d=-1:n===i.length-1&&(d=i.length-2),s=Y({selectedItems:[].concat(i.slice(0,n),i.slice(n+1))},{activeIndex:d});break}case sn:s={activeIndex:i.length-1};break;case dn:s={selectedItems:i.slice(0,i.length-1)};break;case cn:s={selectedItems:[].concat(i,[l])};break;case un:s={activeIndex:-1};break;case fn:{var u=n,p=i.findIndex(function(x){return t.itemToKey(x)===t.itemToKey(l)});if(p<0)break;i.length===1?u=-1:p===i.length-1&&(u=i.length-2),s={selectedItems:[].concat(i.slice(0,p),i.slice(p+1)),activeIndex:u};break}case pn:{var C=o.selectedItems;s={selectedItems:C};break}case Cn:{var c=o.activeIndex;s={activeIndex:c};break}case mn:s={activeIndex:t5(t,"activeIndex"),selectedItems:t5(t,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return Y({},e,s)}var L4=["refKey","ref","onClick","onKeyDown","selectedItem","index"],w4=["refKey","ref","onKeyDown","onClick","preventKeyAction"];D5.stateChangeTypes=v4;function D5(e){e===void 0&&(e={}),g4(e,D5);var t=Y({},h4,e),o=t.getA11yStatusMessage,a=t.environment,r=t.keyNavigationNext,l=t.keyNavigationPrevious,n=Rl(x4,t,C4,m4),i=n[0],s=n[1],d=i.activeIndex,u=i.selectedItems,p=Fa(),C=i1(null),c=i1();c.current=[];var x=wo({state:i,props:t});kl(o,i,[d,u],a),M1(function(){p||(d===-1&&C.current?C.current.focus():c.current[d]&&c.current[d].focus())},[d]),Tl({props:t,state:i});var w=Pl("getDropdownProps"),h=Zt(function(){var A;return A={},A[l]=function(){s({type:nn})},A[r]=function(){s({type:ln})},A.Delete=function(){s({type:an})},A.Backspace=function(){s({type:rn})},A},[s,r,l]),M=Zt(function(){var A;return A={},A[l]=function(j){o5(j)&&s({type:sn})},A.Backspace=function($){o5($)&&s({type:dn})},A},[s,l]),v=ne(function(A){var j,$=A===void 0?{}:A,K=$.refKey,B=K===void 0?"ref":K,N=$.ref,R=$.onClick,I=$.onKeyDown,b=$.selectedItem,L=$.index,Z=je($,L4),_=x.current.state,F=Hl(b,L,_.selectedItems,"Pass either item or index to getSelectedItemProps!"),D=F[1],m=D>-1&&D===_.activeIndex,f=function(){s({type:on,index:D})},k=function(y){var G=Da(y);G&&h[G]&&h[G](y)};return Y((j={},j[B]=V1(N,function(H){H&&c.current.push(H)}),j.tabIndex=m?0:-1,j.onClick=we(R,f),j.onKeyDown=we(I,k),j),Z)},[s,x,h]),T=ne(function(A,j){var $,K=A===void 0?{}:A,B=K.refKey,N=B===void 0?"ref":B,R=K.ref,I=K.onKeyDown,b=K.onClick,L=K.preventKeyAction,Z=L===void 0?!1:L,_=je(K,w4),F=j===void 0?{}:j,D=F.suppressRefError,m=D===void 0?!1:D;w("getDropdownProps",m,N,C);var f=function(y){var G=Da(y);G&&M[G]&&M[G](y)},k=function(){s({type:un})};return Y(($={},$[N]=V1(R,function(H){H&&(C.current=H)}),$),!Z&&{onKeyDown:we(I,f),onClick:we(b,k)},_)},[s,M,w]),g=ne(function(A){s({type:cn,selectedItem:A})},[s]),O=ne(function(A){s({type:fn,selectedItem:A})},[s]),P=ne(function(A){s({type:pn,selectedItems:A})},[s]),z=ne(function(A){s({type:Cn,activeIndex:A})},[s]),S=ne(function(){s({type:mn})},[s]);return{getSelectedItemProps:v,getDropdownProps:T,addSelectedItem:g,removeSelectedItem:O,setSelectedItems:P,setActiveIndex:z,reset:S,selectedItems:u,activeIndex:d}}var hn=0,gn=1,vn=2,xn=3,Ln=4,wn=5,In=6,I4=Object.freeze({__proto__:null,FunctionAddItem:In,TagClick:hn,TagGroupKeyDownArrowLeft:gn,TagGroupKeyDownArrowRight:vn,TagGroupKeyDownBackspace:Ln,TagGroupKeyDownDelete:xn,TagRemoveClick:wn});function b4(e,t,o){var a=o.type,r;switch(a){case hn:r={activeIndex:o.index};break;case gn:r={activeIndex:e.activeIndex===0?e.items.length-1:e.activeIndex-1};break;case vn:r={activeIndex:e.activeIndex===e.items.length-1?0:e.activeIndex+1};break;case Ln:case xn:{var l=[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),n=l.length===0?-1:l.length===e.activeIndex?e.activeIndex-1:e.activeIndex;r={items:[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),activeIndex:n};break}case wn:{var i=[].concat(e.items.slice(0,o.index),e.items.slice(o.index+1)),s=i.length===0?-1:i.length===o.index?o.index-1:o.index;r={items:i,activeIndex:s}}break;case In:{var d=[];o.index===void 0?d=[].concat(e.items,[o.item]):d=[].concat(e.items.slice(0,o.index),[o.item],e.items.slice(o.index));var u=e.activeIndex===-1?d.length-1:e.activeIndex;r={items:d,activeIndex:u};break}default:throw new Error("Invalid useTagGroup reducer action.")}return Y({},e,r)}var y4=Y({},ie),O5=y4.useId,M4=typeof O5=="function"?S4:R4;function S4(e){var t=e.id,o=e.tagGroupId,a=e.getTagId,r="downshift-"+O5();t||(t=r);var l=ie.useMemo(function(){return{tagGroupId:o??t+"-tag-group",getTagId:a??function(n){return t+"-tag-"+n}}},[a,t,o]);return l}function R4(e){var t=e.id,o=e.getTagId,a=e.tagGroupId,r=ie.useRef(t??"downshift-"+a5()),l=r.current,n=ie.useMemo(function(){return{tagGroupId:a??l+"-tag-group",getTagId:o??function(i){return l+"-tag-"+i}}},[o,l,a]);return n}function H4(e){var t,o,a,r,l=(t=(o=e.items)!=null?o:e.initialItems)!=null?t:[],n=(a=(r=e.activeIndex)!=null?r:e.initialActiveIndex)!=null?a:l.length===0?-1:0;return{activeIndex:n,items:l}}function k4(e,t){return e.activeIndex===t.activeIndex&&e.items===t.items}var E5="tag-group-a11y-description";function P4(e,t){ie.useEffect(function(){if(e){var o=e.createElement("div");return o.setAttribute("id",E5),o.style.display="none",o.textContent=t,e.body.appendChild(o),function(){o.remove()}}},[t,e])}function T4(e){return Y({stateReducer:function(o,a){var r=a.changes;return r},environment:typeof window>"u"?void 0:window,removeElementDescription:"Press Delete or Backspace to remove tag."},e)}function V4(e,t,o){var a=ie.useRef({}),r=ie.useRef(e),l=ie.useRef(t);return ie.useEffect(function(){if(e!==-1&&r.current!==-1&&e!==r.current||l.current===t+1){var n;(n=a.current[o(e)])==null||n.focus()}r.current=e,l.current=t},[e,o,t]),a}var _4={isItemDisabled:W.default.func},D4=["onKeyDown"],O4=["index","refKey","ref","onClick"],E4=["index","onClick"],B5=function(t){var o;t===void 0&&(t={}),Ml(t,B5,_4);var a=T4(t),r=Rl(b4,a,H4,k4),l=r[0],n=r[1],i=l.activeIndex,s=l.items,d=wo({state:l,props:a}),u=M4({getTagId:a.getTagId,id:a.id,tagGroupId:a.tagGroupId});P4((o=a.environment)==null?void 0:o.document,a.removeElementDescription);var p=V4(i,s.length,u.getTagId),C=ne(function(h){var M=h??{},v=M.onKeyDown,T=je(M,D4),g=function(z){switch(z.key){case"ArrowLeft":n({type:gn});break;case"ArrowRight":n({type:vn});break;case"Delete":n({type:xn});break;case"Backspace":n({type:Ln});break}},O=Y({id:u.tagGroupId,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions",role:"listbox",onKeyDown:bl(v,g)},T);return O},[n,u.tagGroupId]),c=ne(function(h){var M,v=h.index,T=h.refKey,g=T===void 0?"ref":T,O=h.ref,P=h.onClick,z=je(h,O4);if(!Number.isInteger(v)||v<0)throw new Error("Pass correct item index to getTagProps!");var S=d.current.state,A=function(){n({type:hn,index:v})},j=u.getTagId(v);return Y((M={"aria-describedby":E5},M[g]=Du(O,function($){$&&(p.current[j]=$)}),M["aria-labelledby"]=j,M.role="option",M.id=j,M.onClick=bl(P,A),M.tabIndex=S.activeIndex===v?0:-1,M),z)},[n,u,d,p]),x=ne(function(h){var M=h.index,v=h.onClick,T=je(h,E4);if(!Number.isInteger(M)||M<0)throw new Error("Pass correct item index to getTagRemoveProps!");var g=function(S){S.stopPropagation(),n({type:wn,index:M})},O=u.getTagId(M),P=O+"-remove";return Y({id:P,tabIndex:-1,"aria-labelledby":P+" "+O,onClick:bl(v,g)},T)},[u,n]),w=ne(function(h,M){n({type:In,item:h,index:M})},[n]);return{activeIndex:i,addItem:w,getTagGroupProps:C,getTagProps:c,getTagRemoveProps:x,items:s}};B5.stateChangeTypes=I4;import bo from"react";import{createPortal as B4}from"react-dom";import{jsx as Ct,jsxs as A5}from"react/jsx-runtime";var A4=260,Na=4,Z4=Ct(Qn,{width:9,height:9}),F4=Ct(Jn,{width:9,height:9});function $4(e){let t=e.getBoundingClientRect(),o=ao(e),a=o?o.getBoundingClientRect():{top:0,bottom:window.innerHeight},r=a.bottom-t.bottom-Na,l=t.top-a.top-Na,n=r<A4&&l>r;return{top:n?t.top-Na:t.bottom+Na,left:t.left,width:t.width,openAbove:n}}function $t({label:e,options:t,selectedItem:o,onChange:a,id:r="picklist",getOptionStyle:l,getTriggerStyle:n}){let[i,s]=bo.useState({top:0,left:0,width:0,openAbove:!1}),d=bo.useRef(null),u=`${r}-legend`,{isOpen:p,closeMenu:C,highlightedIndex:c,getToggleButtonProps:x,getMenuProps:w,getItemProps:h}=$a({items:t,itemToString:O=>O?O.label:"",selectedItem:o,onSelectedItemChange:({selectedItem:O})=>{typeof a=="function"&&O&&O.value!==o?.value&&a(O.value)},onIsOpenChange:({isOpen:O})=>{O&&d.current&&s($4(d.current))},id:r,labelId:u});bo.useEffect(()=>{if(!p||!d.current)return;let O=ao(d.current);if(!O)return;let P=()=>C();return O.addEventListener("scroll",P,{passive:!0}),()=>O.removeEventListener("scroll",P)},[p,C]);let M="picklistEditor-dropdown"+(p?" picklistEditor-dropdown--open":""),v=p?{top:i.top,left:i.left,width:i.width,...i.openAbove?{transform:"translateY(-100%)"}:void 0}:void 0,[T,g]=bo.useState(null);return bo.useLayoutEffect(()=>{let P=d.current?.getRootNode();g(P instanceof ShadowRoot?P:document.body)},[]),Ct(t1,{label:e,id:r,className:"picklistEditor-fieldset",children:A5("div",{className:"picklistEditor-wrapper",children:[A5("button",{type:"button",className:"picklistEditor-trigger",style:n?n(o):void 0,...x({ref:d}),children:[Ct("span",{className:"picklistEditor-trigger-label",children:o?.label??"Default"}),Ct("span",{className:"picklistEditor-trigger-chevron","aria-hidden":"true",children:p?F4:Z4})]}),B4(Ct("ul",{className:M,style:v,...w(),children:p&&t.map((O,P)=>Ct("li",{className:"picklistEditor-option"+(c===P?" picklistEditor-option--highlighted":"")+(o?.value===O.value?" picklistEditor-option--selected":""),style:l?l(O):void 0,...h({item:O,index:P}),children:O.label},O.value||"default"))}),T??document.body)]})})}import{jsx as j4}from"react/jsx-runtime";var N4=[{value:"",label:"Default"},{value:"Arial, sans-serif",label:"Arial"},{value:"Helvetica, sans-serif",label:"Helvetica"},{value:"Verdana, sans-serif",label:"Verdana"},{value:"Tahoma, sans-serif",label:"Tahoma"},{value:"'Trebuchet MS', sans-serif",label:"Trebuchet MS"},{value:"'Lucida Sans Unicode', sans-serif",label:"Lucida Sans"},{value:"Georgia, serif",label:"Georgia"},{value:"'Times New Roman', serif",label:"Times New Roman"},{value:"'Palatino Linotype', serif",label:"Palatino"},{value:"'Courier New', monospace",label:"Courier New"},{value:"'Lucida Console', monospace",label:"Lucida Console"}];function U4(e,t){if(!e)return null;let o=e.replace(/['"]/g,""),a=(o.split(",")[0]??"").trim();for(let r of t){if(!r.value)continue;let l=r.value.replace(/['"]/g,"");if(o.indexOf(l)!==-1||l.indexOf(a)!==-1)return r}return null}var q4=e=>e.value?{fontFamily:e.value}:void 0,z4=e=>e?.value?{fontFamily:e.value}:void 0;function Z5({label:e="Font family",value:t,options:o,onChange:a,matchOption:r=U4,id:l="font-family",optionLabels:n}){let i=o??N4.map(d=>d.value===""?{...d,label:n?.default??d.label}:d),s=r(t,i)??i[0]??null;return j4($t,{label:e,options:i,selectedItem:s,onChange:a,id:l,getOptionStyle:q4,getTriggerStyle:z4})}import{jsx as bn}from"react/jsx-runtime";var K4=[{value:"normal",labelKey:"normal",defaultLabel:"Normal",icon:bn(On,{width:14,height:14})},{value:"italic",labelKey:"italic",defaultLabel:"Italic",icon:bn(Dn,{width:14,height:14})}];function F5({label:e="Font Style",value:t,onChange:o,id:a="font-style",optionLabels:r}){let l=K4.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return bn(v1,{label:e,options:l,value:t||"normal",onChange:o,id:a})}import{jsx as Q4}from"react/jsx-runtime";var G4=[{value:"",labelKey:"default",defaultWord:"Default"},{value:"100",labelKey:"thin",defaultWord:"Thin"},{value:"200",labelKey:"extraLight",defaultWord:"Extra Light"},{value:"300",labelKey:"light",defaultWord:"Light"},{value:"400",labelKey:"regular",defaultWord:"Regular"},{value:"500",labelKey:"medium",defaultWord:"Medium"},{value:"600",labelKey:"semiBold",defaultWord:"Semi Bold"},{value:"700",labelKey:"bold",defaultWord:"Bold"},{value:"800",labelKey:"extraBold",defaultWord:"Extra Bold"},{value:"900",labelKey:"black",defaultWord:"Black"}];function W4(e){return G4.map(t=>{let o=e?.[t.labelKey]??t.defaultWord;return{value:t.value,label:t.value?`${o} (${t.value})`:o}})}function X4(e,t){if(!e)return null;let o=String(e).trim();return t.find(a=>a.value===o)??null}function $5({label:e="Font weight",value:t,options:o,onChange:a,matchOption:r=X4,id:l="font-weight",optionLabels:n}){let i=o??W4(n),s=r(t,i)??i[0]??null;return Q4($t,{label:e,options:i,selectedItem:s,onChange:a,id:l})}import te from"react";import{createPortal as J4}from"react-dom";import{jsx as J,jsxs as Pe}from"react/jsx-runtime";var Y4={tabCms:"CMS",tabLocal:"Local",tabUrl:"URL",ariaTablist:"Image source",clearImage:"Clear image",chooseFile:"Choose File...",ariaChooseFile:"Choose an image file from your computer",useThisImage:"Use This Image",ariaImageUrl:"Image URL",urlPlaceholder:"https://example.com/image.png",previewAlt:"Preview",altText:"Alt Text",altPlaceholder:"Describe the image",width:"Width",height:"Height",autoPlaceholder:"auto",workspace:"Workspace",selectWorkspace:"Select a workspace...",selectImage:"Select an Image",loadingWorkspaces:"Loading workspaces...",noWorkspaces:"No CMS workspaces found",loadingImages:"Loading images...",noImages:"No images in this workspace",loadingMore:"Loading more...",untitled:"Untitled",downloadingImage:"Downloading image...",downloadFailed:"Download failed",closePicker:"Close",cancel:"Cancel",done:"Done",pickerTitle:"Select an image from {0}",pickerError:"Error: {0}"},Nt=["cms","local","url"];function e8({labels:e,workspaceName:t,folderId:o,portalTarget:a,folderItemsResult:r,contentDetail:l,thumbnailResult:n,onFetchFolderItems:i,onFetchContentDetail:s,onFetchThumbnail:d,onCancel:u,onConfirm:p}){let[C,c]=te.useState([]),[x,w]=te.useState(0),[h,M]=te.useState(!0),[v,T]=te.useState(!1),[g,O]=te.useState(null),[P,z]=te.useState(null),[S,A]=te.useState({}),[j,$]=te.useState({}),K=te.useRef(new Set),B=te.useRef(new Set),N=te.useCallback(Z=>{v||typeof i=="function"&&(T(!0),O(null),i(o,Z,20))},[o,v,i]);te.useEffect(()=>{N(0)},[o]),te.useEffect(()=>{let Z=_=>{_.key==="Escape"&&(_.stopPropagation(),u())};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[u]);let R=te.useRef(null);te.useEffect(()=>{R.current?.focus()},[]),te.useEffect(()=>{if(!r)return;let Z=(r.items??[]).map(_=>({contentKey:_.contentKey,title:_.title??e.untitled,mimeType:_.mimeType??"image/png"}));c(_=>r.page===0?Z:[..._,...Z]),M(!!r.hasMore),w(r.page??0),T(!1),r.error&&O(String(r.error))},[r]),te.useEffect(()=>{if(!l)return;let Z=l.contentKey;if(!Z||l.error)return;let _=l.url??"",F=l.mimeType??"image/png",D=l.title??"";A(m=>m[Z]?m:{...m,[Z]:{url:_,mimeType:F,title:D}}),_&&!B.current.has(Z)&&typeof d=="function"&&(B.current.add(Z),d(Z,_,F))},[l,d]),te.useEffect(()=>{if(!n)return;let{imageId:Z,thumbnailUrl:_}=n;Z&&_&&$(F=>({...F,[Z]:_}))},[n]);let I=te.useRef(null);te.useEffect(()=>{let Z=I.current;if(!Z||!h||v)return;let _=new IntersectionObserver(F=>{F.some(m=>m.isIntersecting)&&N(x+1)});return _.observe(Z),()=>_.disconnect()},[h,v,x,N]);let b=te.useCallback(Z=>{K.current.has(Z)||typeof s=="function"&&(K.current.add(Z),s(Z))},[s]),L=()=>{if(!P)return;let Z=S[P],_=C.find(F=>F.contentKey===P);!Z||!_||p({contentKey:P,title:_.title,url:Z.url,mimeType:Z.mimeType||_.mimeType})};return J4(J("div",{ref:R,tabIndex:-1,className:"cmsPicker-overlay",role:"dialog","aria-modal":"true","aria-label":Te(e.pickerTitle,[t]),onClick:Z=>{Z.target===Z.currentTarget&&u()},children:Pe("div",{className:"cmsPicker-dialog",children:[Pe("div",{className:"cmsPicker-header",children:[J("span",{className:"cmsPicker-title",children:Te(e.pickerTitle,[t])}),J("button",{type:"button",className:"cmsPicker-close",onClick:u,"aria-label":e.closePicker,title:e.closePicker,children:"\u2715"})]}),Pe("div",{className:"cmsPicker-body",children:[C.length===0&&v&&J("div",{className:"cmsPicker-empty",children:e.loadingImages}),C.length===0&&!v&&!g&&J("div",{className:"cmsPicker-empty",children:e.noImages}),g&&J("div",{className:"cmsPicker-empty",children:Te(e.pickerError,[g])}),Pe("div",{className:"cmsPicker-grid",children:[C.map(Z=>J(t8,{item:Z,selected:P===Z.contentKey,thumbnailDataUrl:j[Z.contentKey],onIntersect:()=>b(Z.contentKey),onClick:()=>z(Z.contentKey)},Z.contentKey)),h&&J("div",{className:"cmsPicker-sentinel",ref:I,children:v?e.loadingMore:""})]})]}),Pe("div",{className:"cmsPicker-footer",children:[J("button",{type:"button",className:"cmsPicker-btn",onClick:u,children:e.cancel}),J("button",{type:"button",className:"cmsPicker-btn cmsPicker-btn--primary",disabled:!P||!S[P??""],onClick:L,children:e.done})]})]})}),a)}function t8({item:e,selected:t,thumbnailDataUrl:o,onIntersect:a,onClick:r}){let l=te.useRef(null),n=te.useRef(!1);return te.useEffect(()=>{let i=l.current;if(!i||n.current)return;let s=new IntersectionObserver(d=>{d.some(p=>p.isIntersecting)&&!n.current&&(n.current=!0,a(),s.disconnect())});return s.observe(i),()=>s.disconnect()},[a]),Pe("button",{ref:l,type:"button",className:`cmsPicker-thumb${t?" cmsPicker-thumb--selected":""}`,onClick:r,title:e.title,"aria-pressed":t,children:[J("div",{className:"cmsPicker-thumb-img",children:o?J("img",{src:o,alt:e.title}):J("div",{className:"cmsPicker-thumb-placeholder","aria-hidden":"true",children:"\u2026"})}),J("span",{className:"cmsPicker-thumb-label",children:e.title})]})}function o8({labels:e,spaces:t,spacesLoading:o,selectedSpaceId:a,onSpaceSelect:r,onOpenPicker:l}){return o?J("div",{className:"imageEditor-cms",children:J("div",{className:"imageEditor-cms-loading",children:e.loadingWorkspaces})}):t.length===0?J("div",{className:"imageEditor-cms",children:J("div",{className:"imageEditor-cms-empty",children:e.noWorkspaces})}):Pe("div",{className:"imageEditor-cms",children:[Pe("div",{className:"imageEditor-cms-channel",children:[J("label",{className:"imageEditor-cms-channel-label",htmlFor:"cms-space-select",children:e.workspace}),Pe("select",{id:"cms-space-select",className:"imageEditor-input imageEditor-cms-channel-select",value:a,onChange:n=>r(n.target.value),children:[J("option",{value:"",children:e.selectWorkspace}),t.map(n=>J("option",{value:n.id,children:n.name},n.id))]})]}),J("button",{type:"button",className:"imageEditor-cms-pick-btn",onClick:l,disabled:!a,children:e.selectImage})]})}function a8({labels:e,preview:t,onPick:o,onApply:a}){return Pe("div",{className:"imageEditor-local",children:[J("button",{className:"imageEditor-local-pick",onClick:o,type:"button","aria-label":e.ariaChooseFile,"aria-haspopup":"dialog",children:e.chooseFile}),t&&Pe("div",{className:"imageEditor-local-preview",children:[J("img",{src:t.webviewUri,alt:t.fileName,className:"imageEditor-preview-thumb"}),J("span",{className:"imageEditor-local-filename",children:t.fileName}),J("button",{className:"imageEditor-local-apply",onClick:()=>a(t.devUrl||t.webviewUri),type:"button",children:e.useThisImage})]})]})}function N5({src:e,alt:t,className:o}){let[a,r]=te.useState(!1);return te.useEffect(()=>{r(!1)},[e]),a?null:J("img",{src:e,alt:t,className:o,onError:()=>r(!0)})}function r8({labels:e,input:t,onInputChange:o,onApply:a,currentUrl:r}){return Pe("div",{className:"imageEditor-url",children:[J("input",{type:"text",value:t,"aria-label":e.ariaImageUrl,placeholder:e.urlPlaceholder,className:"imageEditor-input",onChange:l=>o(l.target.value),onKeyDown:l=>{l.key==="Enter"&&t&&a(t)},onBlur:()=>{t&&t!==r&&a(t)}}),t&&J("div",{className:"imageEditor-url-preview",children:J(N5,{src:t,alt:e.previewAlt,className:"imageEditor-preview-thumb"})})]})}function yn({id:e,label:t,value:o,type:a,inputMode:r,placeholder:l,onCommit:n}){let[i,s]=te.useState(o),d=te.useRef(n);d.current=n;let u=te.useRef(o);te.useEffect(()=>{o!==u.current&&(u.current=o,s(o))},[o]);let p=()=>{i!==o&&(u.current=i,d.current(i))};return Pe("div",{className:"imageEditor-attr",children:[J("label",{className:"imageEditor-attr-label",htmlFor:e,children:t}),J("input",{id:e,type:a,inputMode:r,value:i,placeholder:l,className:"imageEditor-input",onChange:C=>s(C.target.value),onKeyDown:C=>{C.key==="Enter"&&p()},onBlur:p})]})}function l8({labels:e,attributes:t,onAttributeChange:o}){return Pe("div",{className:"imageEditor-attrs",children:[J(yn,{id:"design-img-alt",label:e.altText,type:"text",value:t.alt,placeholder:e.altPlaceholder,onCommit:a=>o("alt",a)}),Pe("div",{className:"imageEditor-attrs-row",children:[J(yn,{id:"design-img-width",label:e.width,type:"number",inputMode:"numeric",value:t.width,placeholder:e.autoPlaceholder,onCommit:a=>o("width",a)}),J(yn,{id:"design-img-height",label:e.height,type:"number",inputMode:"numeric",value:t.height,placeholder:e.autoPlaceholder,onCommit:a=>o("height",a)})]})]})}function U5({label:e,value:t,onChange:o,id:a="image",attributes:r,onAttributeChange:l,cmsSpaces:n,cmsSpacesLoading:i,onFetchCmsSpaces:s,cmsFolderItemsResult:d,onFetchCmsFolderItems:u,cmsContentDetail:p,onFetchCmsContentDetail:C,cmsThumbnailResult:c,onFetchCmsThumbnail:x,onImportCmsImage:w,cmsImportResult:h,onPickLocalFile:M,localPreview:v,imageLabels:T}){let g=c1(Y4,T),O={cms:g.tabCms,local:g.tabLocal,url:g.tabUrl},[P,z]=te.useState("cms"),[S,A]=te.useState(""),[j,$]=te.useState(!1),[K,B]=te.useState(""),[N,R]=te.useState("idle"),I=te.useRef(null),b=te.useRef(null),L=te.useCallback(()=>{let y=b.current?.getRootNode();return y instanceof ShadowRoot?y:document.body},[]),Z=te.useRef({}),_=te.useCallback(y=>{z(y),Z.current[y]?.focus()},[]),F=te.useCallback((y,G)=>{let ee=null;switch(y.key){case"ArrowRight":ee=(G+1)%Nt.length;break;case"ArrowLeft":ee=(G-1+Nt.length)%Nt.length;break;case"Home":ee=0;break;case"End":ee=Nt.length-1;break;default:return}y.preventDefault();let oe=Nt[ee];oe&&_(oe)},[_]),D=n??[],m=i??!1,f=t||"";te.useEffect(()=>{if(h)if(h.success&&h.devUrl)o(h.devUrl),R("success");else{let y=I.current?.url;y?(o(y),R("success")):R("error")}},[h,o]),te.useEffect(()=>{P==="cms"&&D.length===0&&!m&&typeof s=="function"&&s()},[P]);let k=te.useMemo(()=>D.find(y=>y.id===S)??null,[D,S]),H=te.useCallback(y=>{let G={id:y.contentKey,title:y.title,url:y.url,thumbnailUrl:"",contentType:y.mimeType};I.current=G,$(!1),typeof w=="function"&&G.url?(R("importing"),w(G)):G.url&&o(G.url)},[o,w]);return J(t1,{label:e,id:a,className:"imageEditor-fieldset",children:Pe("div",{ref:b,className:"imageEditor-root",children:[f&&Pe("div",{className:"imageEditor-current",children:[J(N5,{src:f,alt:"",className:"imageEditor-current-thumb"}),J("span",{className:"imageEditor-current-url",title:f,children:f.length>30?`...${f.slice(-30)}`:f}),J("button",{className:"imageEditor-clear",onClick:()=>o(""),title:g.clearImage,"aria-label":g.clearImage,type:"button",children:"\u2715"})]}),J("div",{className:"imageEditor-tabs",role:"tablist","aria-label":g.ariaTablist,children:Nt.map((y,G)=>J("button",{id:`${a}-tab-${y}`,ref:ee=>{Z.current[y]=ee},role:"tab",type:"button","aria-selected":P===y,"aria-controls":`${a}-tabpanel`,tabIndex:P===y?0:-1,className:`imageEditor-tab${P===y?" imageEditor-tab--active":""}`,onClick:()=>z(y),onKeyDown:ee=>F(ee,G),children:O[y]},y))}),Pe("div",{className:"imageEditor-tab-content",role:"tabpanel",id:`${a}-tabpanel`,"aria-labelledby":`${a}-tab-${P}`,children:[P==="cms"&&J(o8,{labels:g,spaces:D,spacesLoading:m,selectedSpaceId:S,onSpaceSelect:A,onOpenPicker:()=>$(!0)}),P==="cms"&&N==="importing"&&J("div",{className:"imageEditor-cms-loading",children:g.downloadingImage}),P==="cms"&&N==="error"&&J("div",{className:"imageEditor-cms-empty",children:g.downloadFailed}),P==="local"&&J(a8,{labels:g,preview:v,onPick:()=>M?.(),onApply:y=>o(y)}),P==="url"&&J(r8,{labels:g,input:K,onInputChange:B,onApply:o,currentUrl:f})]}),r&&l&&J(l8,{labels:g,attributes:r,onAttributeChange:l}),j&&k&&J(e8,{labels:g,workspaceName:k.name,folderId:k.rootFolderId,portalTarget:L(),folderItemsResult:d,contentDetail:p,thumbnailResult:c,onFetchFolderItems:u,onFetchContentDetail:C,onFetchThumbnail:x,onCancel:()=>$(!1),onConfirm:H})]})})}import{jsx as d8}from"react/jsx-runtime";var n8=[{value:"",labelKey:"default",defaultLabel:"Default"},{value:"visible",labelKey:"visible",defaultLabel:"Visible"},{value:"hidden",labelKey:"hidden",defaultLabel:"Hidden"},{value:"scroll",labelKey:"scroll",defaultLabel:"Scroll"},{value:"auto",labelKey:"auto",defaultLabel:"Auto"}];function i8(e){return n8.map(t=>({value:t.value,label:e?.[t.labelKey]??t.defaultLabel}))}function s8(e,t){if(!e)return null;let o=String(e).trim().toLowerCase();return t.find(a=>a.value===o)??null}function q5({label:e="Overflow",value:t,onChange:o,id:a="overflow",optionLabels:r}){let l=i8(r),n=s8(t,l)??l[0]??null;return d8($t,{label:e,options:l,selectedItem:n,onChange:o,id:a})}import{jsx as yo}from"react/jsx-runtime";var u8=[{value:"left",labelKey:"left",defaultLabel:"Left",icon:yo(Wn,{width:14,height:14})},{value:"center",labelKey:"center",defaultLabel:"Center",icon:yo(Kn,{width:14,height:14})},{value:"right",labelKey:"right",defaultLabel:"Right",icon:yo(Xn,{width:14,height:14})},{value:"justify",labelKey:"justify",defaultLabel:"Justify",icon:yo(Gn,{width:14,height:14})}],c8={start:"left",end:"right"};function z5({label:e="Text Align",value:t,onChange:o,id:a="text-align",optionLabels:r}){let l=c8[t||""]||t||"left",n=u8.map(i=>({value:i.value,label:r?.[i.labelKey]??i.defaultLabel,icon:i.icon}));return yo(v1,{label:e,options:n,value:l,onChange:o,id:a})}import{jsx as Ua}from"react/jsx-runtime";var j5=[{value:"none",labelKey:"none",defaultLabel:"None",icon:Ua(mt,{width:14,height:14})},{value:"underline",labelKey:"underline",defaultLabel:"Underline",icon:Ua(Yn,{width:14,height:14})},{value:"line-through",labelKey:"lineThrough",defaultLabel:"Line Through",icon:Ua(jn,{width:14,height:14})}];function f8(e){if(!e)return"none";for(let t of j5)if(e===t.value||e.startsWith(t.value+" "))return t.value;return"none"}function K5({label:e="Text Decoration",value:t,onChange:o,id:a="text-decoration",optionLabels:r}){let l=j5.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Ua(v1,{label:e,options:l,value:f8(t),onChange:o,id:a})}import{jsx as Mo}from"react/jsx-runtime";var p8=[{value:"none",labelKey:"none",defaultLabel:"None",icon:Mo(mt,{width:14,height:14})},{value:"uppercase",labelKey:"uppercase",defaultLabel:"Uppercase",icon:Mo($n,{width:14,height:14})},{value:"lowercase",labelKey:"lowercase",defaultLabel:"Lowercase",icon:Mo(Fn,{width:14,height:14})},{value:"capitalize",labelKey:"capitalize",defaultLabel:"Capitalize",icon:Mo(Zn,{width:14,height:14})}];function G5({label:e="Text Transform",value:t,onChange:o,id:a="text-transform",optionLabels:r}){let l=p8.map(n=>({value:n.value,label:r?.[n.labelKey]??n.defaultLabel,icon:n.icon}));return Mo(v1,{label:e,options:l,value:t||"none",onChange:o,id:a})}var J1={CHANGED:"history-changed",COMMAND_PUSHED:"command-pushed",COMMAND_UNDONE:"command-undone",COMMAND_REDONE:"command-redone",CLEARED:"history-cleared"},qa=class{constructor(t={}){et(this,"undoStack",[]);et(this,"redoStack",[]);et(this,"maxHistorySize");et(this,"listeners",new Set);et(this,"_isProcessing",!1);et(this,"commandExecutor");if(this.maxHistorySize=t.maxHistorySize??200,!t.commandExecutor)throw new Error("CommandExecutor is required");this.commandExecutor=t.commandExecutor}createCommand(t,o,a,r){return Object.freeze({id:this._generateCommandId(),type:t,oldValue:o,newValue:a,data:r})}_generateCommandId(){return`cmd-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}subscribe(t){if(typeof t!="function")throw new Error("Listener must be a function");return this.listeners.add(t),()=>{this.listeners.delete(t)}}_notify(t,o={}){if(this.listeners.size===0)return;let a=Object.freeze({type:t,timestamp:Date.now(),canUndo:this.canUndo(),canRedo:this.canRedo(),undoCount:this.getUndoCount(),redoCount:this.getRedoCount(),...o}),r=Array.from(this.listeners);for(let l of r)try{l(a)}catch(n){console.error("[HistoryManager] Error in listener:",n)}}pushCommand(t){if(!t||typeof t!="object")throw new Error("Invalid command: must be an object");if(!t.type)throw new Error("Invalid command: missing required fields (type)");if(this._isProcessing){console.warn("[HistoryManager] pushCommand called during processing, ignoring");return}this.undoStack.push(t),this.redoStack=[],this._trimStack(),this._notify(J1.COMMAND_PUSHED,{command:t}),this._notify(J1.CHANGED)}_trimStack(){if(this.undoStack.length>this.maxHistorySize){let t=this.undoStack.length-this.maxHistorySize;this.undoStack.splice(0,t)}}_applyCommand(t,o){if(!this.commandExecutor.canHandle(t.type))return console.warn("[HistoryManager] No executor for command type:",t.type),!1;try{return this.commandExecutor.execute(t,o)}catch(a){return console.error("[HistoryManager] Error applying command:",a,t),!1}}_createInverseCommand(t,o){let a=this.commandExecutor.getCurrentValue(t);return Object.freeze({id:this._generateCommandId(),type:t.type,oldValue:o?t.oldValue:a,newValue:o?a:t.newValue,data:t.data})}undo(){if(this._isProcessing)return console.warn("[HistoryManager] undo called during processing, ignoring"),!1;if(!this.canUndo())return!1;this._isProcessing=!0;try{let t=this.undoStack.pop(),o=this._applyCommand(t,!0);if(o){let a=this._createInverseCommand(t,!1);this.redoStack.push(a)}else this.undoStack.push(t),console.warn("[HistoryManager] Undo failed, command restored to stack");return this._notify(J1.COMMAND_UNDONE,{command:t,appliedValue:t.oldValue}),this._notify(J1.CHANGED),o}finally{this._isProcessing=!1}}redo(){if(this._isProcessing)return console.warn("[HistoryManager] redo called during processing, ignoring"),!1;if(!this.canRedo())return!1;this._isProcessing=!0;try{let t=this.redoStack.pop();if(!t)return console.warn("[HistoryManager] No command to redo"),!1;let o=this._applyCommand(t,!1);if(o){let a=this._createInverseCommand(t,!0);this.undoStack.push(a),this._trimStack()}else this.redoStack.push(t),console.warn("[HistoryManager] Redo failed, command restored to stack");return this._notify(J1.COMMAND_REDONE,{command:t,appliedValue:t.newValue}),this._notify(J1.CHANGED),o}finally{this._isProcessing=!1}}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}clear(){this.undoStack=[],this.redoStack=[],this._notify(J1.CLEARED),this._notify(J1.CHANGED)}getUndoCount(){return this.undoStack.length}getRedoCount(){return this.redoStack.length}getUndoStackSnapshot(){return this.undoStack.map(t=>({type:t.type,oldValue:t.oldValue,newValue:t.newValue,data:t.data}))}};var C8=(e,t)=>{let o=t?e.oldValue:e.newValue;return typeof o=="string"?o:String(o??"")},Mn=e=>{if(!e||typeof e!="object")return;let t=e;if(!(typeof t.sourceFile!="string"||typeof t.lineNumber!="number"||typeof t.columnNumber!="number"))return{sourceFile:t.sourceFile,lineNumber:t.lineNumber,columnNumber:t.columnNumber}},m8=e=>typeof e=="object"&&e!==null&&"property"in e&&typeof e.property=="string",h8=e=>typeof e=="object"&&e!==null&&"tag"in e&&typeof e.tag=="string"&&"attribute"in e&&typeof e.attribute=="string",W5=(e,t,o)=>{let a=new Map;return{execute:(r,l)=>{let n=C8(r,l);a.set(r.id,n);try{if(r.type==="style"&&m8(r.data)){let i=Mn(r.data);return e(r.data.property,n,i),!0}else if(r.type==="text"){let i=Mn(r.data);return t(n,i),!0}else if(r.type==="media"&&h8(r.data)){if(!o)return!1;let i=Mn(r.data);return o(r.data.tag,{[r.data.attribute]:n},i),!0}}catch{return!1}return!1},getCurrentValue:r=>a.get(r.id)??r.newValue,canHandle:r=>r==="style"||r==="text"||r==="media"&&typeof o=="function"}};function X5(e,t,o){let a=W5(e,t,o),r=new qa({commandExecutor:a});return{recordStyleChange(l,n,i,s){let d=r.createCommand("style",n,i,{...s,property:l});r.pushCommand(d)},recordTextChange(l,n,i){let s=r.createCommand("text",l,n,{...i});r.pushCommand(s)},recordMediaChange(l,n,i,s,d){let u=r.createCommand("media",i,s,{...d,tag:l,attribute:n});r.pushCommand(u)},undo:()=>r.undo(),redo:()=>r.redo(),canUndo:()=>r.canUndo(),canRedo:()=>r.canRedo(),subscribe:l=>r.subscribe(l),getHistoryStack:()=>r.getUndoStackSnapshot(),clear:()=>r.clear()}}import{jsx as ae,jsxs as Ge}from"react/jsx-runtime";var v8="This element's text can be edited inline.",x8="This element's text cannot be edited inline because it contains dynamic content.",L8={opacity:.4},w8=new Set(a9),I8={general:{headerTitle:"Selected Element",emptyPlaceholder:"Click on an element in the preview to select it.",inlineEditEditable:v8,inlineEditNonEditable:x8,addToChatContext:"Add to chat as context",ariaPropertyPanel:"Property panel",ariaSelectedComponent:"Selected component",ariaElementStyling:"Element styling"},sections:{imageSource:"Image Source",background:"Background",spacing:"Spacing",border:"Border",typography:"Typography",elementDimensions:"Element Dimensions"},instances:{imageSource:"Source",backgroundColor:"Background Color",padding:"Padding",margin:"Margin",borderRadius:"Border Radius",borderWeight:"Border Weight",borderStyle:"Border Style",borderColor:"Border Color",fontFamily:"Font Family",fontSize:"Font Size",fontWeight:"Font Weight",fontStyle:"Font Style",textColor:"Text Color",textAlignment:"Text Alignment",textFormatting:"Text Formatting",textTransform:"Text Transform",lineHeight:"Line Height",letterSpacing:"Letter Spacing",width:"Width",minWidth:"Minimum Width",maxWidth:"Maximum Width",height:"Height",minHeight:"Minimum Height",maxHeight:"Maximum Height",overflow:"Overflow"}};function b8({size:e=16}){return ae("svg",{width:e,height:e,viewBox:"-1 0 252 302",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:ae("path",{d:"M57 49Q67 49 74 42Q81 35 81 25Q81 15 74 8Q67 1 57 1Q47 1 40 8Q33 15 33 25Q33 35 40 42Q47 49 57 49ZM193 49Q203 49 210 42Q217 35 217 25Q217 15 210 8Q203 1 193 1Q183 1 176 8Q169 15 169 25Q169 35 176 42Q183 49 193 49ZM125 301Q100 301 71 292Q47 285 26 274Q7 265 3.5 259.5Q0 254 1 249Q13 216 20 189Q24 171 26 157V147Q28 120 30 105Q34 78 40 65Q48 48 63 39Q85 27 125 27Q165 27 186 39Q201 47 209 65Q216 78 220 105Q222 120 224 147V157Q226 171 230 189Q237 216 248 249Q250 254 246.5 259.5Q243 265 224 274Q203 285 179 292Q150 301 125 301ZM23 249Q39 259 63 268Q97 280 125 280Q153 280 187 268Q210 259 227 249Q216 219 210 194Q205 174 204 159L203 148Q199 91 191 73Q188 66 184 62Q177 56 165 52Q150 48 125 48Q90 48 73 57Q64 63 59 73Q51 91 47 148L46 158Q45 174 40 194Q34 220 23 249ZM124 248Q113 248 102 244Q84 236 76 217Q72 209 71 201Q70 193 70 179Q70 163 73 151Q76 142 81.5 134Q87 126 98 120Q109 114 125.5 114Q142 114 152 120Q164 127 169 134.5Q174 142 177 151Q180 163 180 178.5Q180 194 179 200Q178 209 174 218Q167 232 154.5 240Q142 248 126 248ZM124 228H126Q147 228 156 209Q158 203 159 197.5Q160 192 160 179Q160 166 157 157Q155 151 152 146.5Q149 142 141 138Q136 134 125 134Q114 134 107.5 138Q101 142 98 146.5Q95 151 93 157Q90 166 90 178.5Q90 191 91 197Q92 203 94 209Q99 221 111 225Q117 228 124 228ZM195 81Q192 79 190 78Q170 70 146 76Q134 80 125.5 80Q117 80 104 76Q80 70 60 78Q58 79 55 81Q50 84 51 89L55 112Q56 117 59.5 120.5Q63 124 68 125Q83 126 99 126Q111 126 115 114L122 92Q122 91 124 89L125 88L126 89Q128 91 128 92L135 114Q139 126 152 126Q167 126 182 125Q187 124 190.5 120.5Q194 117 195 112L199 89Q200 84 195 81ZM141 192Q137 190 133 193V171Q138 169 141 165Q143 163 144 161Q145 159 145 156.5Q145 154 143.5 152Q142 150 140 148.5Q138 147 134 146Q130 145 125.5 145Q121 145 116 146Q111 147 109 149Q107 151 106 153Q105 155 105 157Q105 159 106 161Q107 163 109.5 166Q112 169 116 171H117V193Q113 190 109 191.5Q105 193 104 196Q103 199 105 202Q108 210 117 213Q124 216 133 213L134 212Q143 209 146 202Q147 199 145.5 196Q144 193 141 192Z"})})}function y8(e,t){let o=e[t];return o!=null?String(o):""}function Sn(e){if(!(!e||!e.name||!e.debugSource))return{sourceFile:e.debugSource.sourceFile,lineNumber:e.debugSource.lineNumber,columnNumber:e.debugSource.columnNumber,componentName:e.name}}function M8({component:e,onOpenSourceFile:t,showOpenSourceFile:o,generalLabels:a}){if(!e||!e.name)return ae("section",{id:"property-panel-selected-component",className:"property-panel-selected-component",children:ae("p",{className:"property-panel-selected-component-placeholder",id:"component-info",children:a.emptyPlaceholder})});let r=e.tagName?e.tagName.toLowerCase():"",l=r?`${e.name} > ${r}`:e.name,n=null;if(o&&e.debugSource){let{sourceFile:i,lineNumber:s,columnNumber:d}=e.debugSource,u=i.split("/").pop()||i,p=`:${s}:${d}`;n=Ge("a",{href:"#",className:"property-panel-selected-component-source",onClick:c=>{c.preventDefault(),t?.({sourceFile:i,lineNumber:s,columnNumber:d})},title:`${i}${p}`,children:[u,p]})}return ae("section",{id:"property-panel-selected-component",className:"property-panel-selected-component","aria-label":a.ariaSelectedComponent,children:Ge("div",{id:"component-info",className:"property-panel-selected-component-info",children:[ae("span",{className:"property-panel-selected-component-name",children:l}),n&&Ge("span",{className:"property-panel-selected-component-source-row",children:["\u21B3 ",n]})]})})}function S8({styles:e,computedStyles:t,hasSelection:o,onStyleChange:a,generalLabels:r,sectionLabels:l,instanceLabels:n,editorLabels:i,component:s,onImageAttributeChange:d,imageSource:u}){let p=o?"visible":"",C=s?.media?.tag==="img"?s.media:null;return ae("section",{className:"property-panel-style-properties-container"+(p?" "+p:""),"aria-label":r.ariaElementStyling,"aria-hidden":!o,children:Ge("div",{className:"property-panel-style-properties",children:[C&&ae(tt,{title:l.imageSource,children:ae(U5,{label:n.imageSource,value:C.src,onChange:c=>d("src",c),id:"design-img-src",attributes:{alt:C.alt,width:C.width,height:C.height},onAttributeChange:d,imageLabels:i?.image,...u})}),ae(tt,{title:l.background,children:ae(xa,{label:n.backgroundColor,value:e.backgroundColor||t.backgroundColor||"#ffffff",onChange:c=>a("backgroundColor",c),id:"design-bg-color"})}),Ge(tt,{title:l.spacing,children:[ae(Yt,{label:n.padding,id:"design-padding",value:e.padding,placeholder:t.padding,onChange:c=>a("padding",c),...Qt.padding,aria:i?.boxDimension}),ae(Yt,{label:n.margin,id:"design-margin",value:e.margin,placeholder:t.margin,onChange:c=>a("margin",c),...Qt.margin,allowAuto:!0,aria:i?.boxDimension})]}),Ge(tt,{title:l.border,children:[ae(Yt,{label:n.borderRadius,id:"design-border-radius",value:e.borderRadius,placeholder:t.borderRadius,onChange:c=>a("borderRadius",c),...Qt.borderRadius,aria:i?.boxDimension}),ae(Yt,{label:n.borderWeight,id:"design-border-width",value:e.borderWidth,placeholder:t.borderWidth,onChange:c=>a("borderWidth",c),...Qt.borderWidth,aria:i?.boxDimension}),ae(V9,{label:n.borderStyle,id:"design-border-style",value:e.borderStyle||t.borderStyle,onChange:c=>a("borderStyle",c),optionLabels:i?.borderStyle?.options}),ae(xa,{label:n.borderColor,value:e.borderColor||t.borderColor||"#000000",onChange:c=>a("borderColor",c),id:"design-border-color",aria:i?.color})]}),Ge(tt,{title:l.typography,children:[ae(Z5,{label:n.fontFamily,id:"design-font-family",value:e.fontFamily||t.fontFamily,onChange:c=>a("fontFamily",c),optionLabels:i?.fontFamily?.options}),ae(y1,{label:n.fontSize,id:"design-font-size",value:e.fontSize,placeholder:t.fontSize,onChange:c=>a("fontSize",c),...x1.fontSize,aria:i?.dimension}),ae($5,{label:n.fontWeight,id:"design-font-weight",value:e.fontWeight||t.fontWeight,onChange:c=>a("fontWeight",c),optionLabels:i?.fontWeight?.options}),ae(F5,{label:n.fontStyle,id:"design-font-style",value:e.fontStyle||t.fontStyle,onChange:c=>a("fontStyle",c),optionLabels:i?.fontStyle?.options}),ae(xa,{label:n.textColor,value:e.color||t.color||"#000000",onChange:c=>a("color",c),id:"design-text-color",aria:i?.color}),ae(z5,{label:n.textAlignment,id:"design-text-align",value:e.textAlign||t.textAlign,onChange:c=>a("textAlign",c),optionLabels:i?.textAlignment?.options}),ae(K5,{label:n.textFormatting,id:"design-text-decoration",value:e.textDecoration||t.textDecoration,onChange:c=>a("textDecoration",c),optionLabels:i?.textDecoration?.options}),ae(G5,{label:n.textTransform,id:"design-text-transform",value:e.textTransform||t.textTransform,onChange:c=>a("textTransform",c),optionLabels:i?.textTransform?.options}),ae(y1,{label:n.lineHeight,id:"design-line-height",value:e.lineHeight,placeholder:t.lineHeight,onChange:c=>a("lineHeight",c),...x1.lineHeight,aria:i?.dimension}),ae(y1,{label:n.letterSpacing,id:"design-letter-spacing",value:e.letterSpacing,placeholder:t.letterSpacing,onChange:c=>a("letterSpacing",c),...x1.letterSpacing,aria:i?.dimension})]}),Ge(tt,{title:l.elementDimensions,children:[ae(y1,{label:n.width,id:"design-width",value:e.width,placeholder:t.width,onChange:c=>a("width",c),...x1.width,aria:i?.dimension}),Ge("div",{className:"property-panel-row-2col",children:[ae(y1,{label:n.minWidth,id:"design-min-width",value:e.minWidth,placeholder:t.minWidth,onChange:c=>a("minWidth",c),...x1.minWidth,aria:i?.dimension}),ae(y1,{label:n.maxWidth,id:"design-max-width",value:e.maxWidth,placeholder:t.maxWidth,onChange:c=>a("maxWidth",c),...x1.maxWidth,aria:i?.dimension})]}),ae(y1,{label:n.height,id:"design-height",value:e.height,placeholder:t.height,onChange:c=>a("height",c),...x1.height,aria:i?.dimension}),Ge("div",{className:"property-panel-row-2col",children:[ae(y1,{label:n.minHeight,id:"design-min-height",value:e.minHeight,placeholder:t.minHeight,onChange:c=>a("minHeight",c),...x1.minHeight,aria:i?.dimension}),ae(y1,{label:n.maxHeight,id:"design-max-height",value:e.maxHeight,placeholder:t.maxHeight,onChange:c=>a("maxHeight",c),...x1.maxHeight,aria:i?.dimension})]}),ae(q5,{label:n.overflow,id:"design-overflow",value:e.overflow||t.overflow,onChange:c=>a("overflow",c),optionLabels:i?.overflow?.options})]})]})})}var Hn=["width","minWidth","maxWidth","height","minHeight","maxHeight","overflow","padding","margin","backgroundColor","borderWidth","borderStyle","borderColor","borderRadius","color","fontFamily","fontSize","fontWeight","fontStyle","lineHeight","letterSpacing","textAlign","textDecoration","textTransform"],Rn=Object.fromEntries(Hn.map(e=>[e,""])),Q5=Me.forwardRef(function(t,o){let{component:a,styles:r,onStyleChange:l,onTextChange:n,onHistoryStateChange:i,onAddToChatContext:s,onOpenSourceFile:d,onMediaChange:u,showAddToChatContext:p=!0,showOpenSourceFile:C=!0,labels:c,imageSource:x}=t,w=c1(I8,c),[h,M]=Me.useState(Rn),[v,T]=Me.useState(Rn),[g,O]=Me.useState(()=>new Set),P=Me.useRef(g);P.current=g;let z=Me.useRef(h);z.current=h;let S=Me.useRef(l);S.current=l;let A=Me.useRef(n);A.current=n;let j=Me.useRef(u);j.current=u;let $=Me.useRef(null);$.current||($.current=X5((D,m,f)=>S.current(D,m,f),(D,m)=>A.current?.(D,m),(D,m,f)=>j.current?.(D,m,f)));let K=$.current,B=Me.useRef(i);B.current=i,Me.useEffect(()=>{let D=f=>{B.current?.({canUndo:f.canUndo,canRedo:f.canRedo});let k=f.type==="command-undone"||f.type==="command-redone",H=f.command?.data?.property;if(k&&typeof H=="string"){let y=typeof f.appliedValue=="string"?f.appliedValue:"";M(G=>({...G,[H]:y})),O(G=>{let ee=new Set(G);return ee.add(H),ee})}},m=K.subscribe(D);return B.current?.({canUndo:K.canUndo(),canRedo:K.canRedo()}),m},[K]),Me.useImperativeHandle(o,()=>({undo:()=>K.undo(),redo:()=>K.redo(),clearHistory:()=>K.clear(),getHistoryStack:()=>K.getHistoryStack(),recordTextChange:(D,m,f)=>K.recordTextChange(D,m,f),canUndo:()=>K.canUndo(),canRedo:()=>K.canRedo()}),[K]),Me.useEffect(()=>{let D=r||{},m=P.current;M(f=>{let k={...f};for(let H of Hn){let y=D[H];y!=null&&!m.has(H)&&(k[H]=y.inline??f[H]??"")}return k}),T(f=>{let k={...f};for(let H of Hn){let y=D[H];y!=null&&(k[H]=y.computed??f[H]??"")}return k})},[r]);let N=a?`${a.name}-${a.tagName??""}-${a.debugSource?.lineNumber??""}-${a.debugSource?.columnNumber??""}`:"none";Me.useEffect(()=>{M(Rn),O(new Set)},[N]);let R=Me.useCallback((D,m)=>{l(D,m);let f=y8(z.current,D),k=Sn(a);K.recordStyleChange(D,f,m,k),M(H=>({...H,[D]:m})),O(H=>{let y=new Set(H);return y.add(D),y})},[l,K,a]),I=Me.useCallback((D,m)=>{let f=a?.media;if(!f)return;let k=a?.debugSource;u?.(f.tag,{[D]:m},k);let H=String(f[D]??"");K.recordMediaChange(f.tag,D,H,m,Sn(a))},[a,u,K]),b=!!(a&&a.name),L=h,Z=Me.useCallback(()=>{let D=Sn(a);D&&s?.(D)},[a,s]),_=b&&a&&a.tagName&&w8.has(a.tagName.toUpperCase()),F=a?.hasNonEditableText?w.general.inlineEditNonEditable:w.general.inlineEditEditable;return Ge("div",{role:"complementary","aria-label":w.general.ariaPropertyPanel,className:"property-panel-container",children:[Ge("header",{className:"property-panel-header",children:[ae("h2",{id:"design-property-panel-title",className:"property-panel-title",children:w.general.headerTitle}),b&&Ge("div",{className:"property-panel-header-actions",children:[_&&ae("span",{className:"property-panel-selected-component-action property-panel-selected-component-action-help","data-tooltip":F,"aria-label":F,children:ae(An,{width:14,height:14,style:a.hasNonEditableText?L8:void 0})}),p&&ae("button",{type:"button",className:"property-panel-selected-component-action",onClick:Z,"data-tooltip":w.general.addToChatContext,"aria-label":w.general.addToChatContext,children:ae(b8,{size:14})})]})]}),Ge("div",{className:"property-panel-content","aria-labelledby":"design-property-panel-title",children:[ae(M8,{component:a,onOpenSourceFile:d,showOpenSourceFile:C,generalLabels:w.general}),ae(S8,{styles:L,computedStyles:v,hasSelection:b,onStyleChange:R,generalLabels:w.general,sectionLabels:w.sections,instanceLabels:w.instances,editorLabels:c?.editors,component:a,onImageAttributeChange:I,imageSource:x},N)]})]})});function R8(e,t,o){if(!e)return;g8(e).render(Me.createElement(Q5,{...t,ref:o}))}export{Q5 as DesignPropertyPanel,_9 as REQUIRED_LABEL_KEYS,Te as interpolate,R8 as mountDesignPropertyPanel,xs as validateLabels};
5
5
  /*! Bundled license information:
6
6
 
7
7
  react-is/cjs/react-is.production.min.js: