@salesforce/ui-design-mode 12.10.0 → 12.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring/core/DesignPropertyPanelRoot.d.cts +2 -1
- package/dist/authoring/core/DesignPropertyPanelRoot.d.ts +2 -1
- package/dist/authoring/core/DesignPropertyPanelRoot.d.ts.map +1 -1
- package/dist/authoring/core/editors/ImageEditor.d.cts +5 -1
- package/dist/authoring/core/editors/ImageEditor.d.ts +5 -1
- package/dist/authoring/core/editors/ImageEditor.d.ts.map +1 -1
- package/dist/authoring/core/history/historyService.d.cts +2 -0
- package/dist/authoring/core/history/historyService.d.ts +2 -0
- package/dist/authoring/core/history/historyService.d.ts.map +1 -1
- package/dist/authoring/core/labels/labels.d.cts +0 -3
- package/dist/authoring/core/labels/labels.d.ts +0 -3
- package/dist/authoring/core/labels/labels.d.ts.map +1 -1
- package/dist/authoring/react/index.js +4 -4
- package/dist/authoring/react/styles.css +1 -1
- package/dist/authoring/web-component/index.d.cts +3 -2
- package/dist/authoring/web-component/index.d.ts +3 -2
- package/dist/authoring/web-component/index.d.ts.map +1 -1
- package/dist/authoring/web-component/index.js +7 -34
- package/dist/protocol/messageTypes.d.cts +7 -0
- package/dist/protocol/messageTypes.d.ts +7 -0
- package/dist/protocol/messageTypes.d.ts.map +1 -1
- package/dist/protocol/version.cjs +1 -1
- package/dist/protocol/version.js +1 -1
- package/dist/runtime/design-mode-interactions.js +3 -1
- package/dist/runtime/interactions/communicationManager.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var X5=Object.create;var lr=Object.defineProperty;var Q5=Object.getOwnPropertyDescriptor;var Y5=Object.getOwnPropertyNames;var J5=Object.getPrototypeOf,es=Object.prototype.hasOwnProperty;var ts=(e,t,o)=>t in e?lr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var ro=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}};var os=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Y5(t))!es.call(e,r)&&r!==o&&lr(e,r,{get:()=>t[r],enumerable:!(a=Q5(t,r))||a.enumerable});return e};var e9=(e,t,o)=>(o=e!=null?X5(J5(e)):{},os(t||!e||!e.__esModule?lr(o,"default",{value:e,enumerable:!0}):o,e));var vt=(e,t,o)=>ts(e,typeof t!="symbol"?t+"":t,o);var Pi=ro((_I,Hi)=>{"use strict";var j4="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Hi.exports=j4});var Di=ro((DI,_i)=>{"use strict";var K4=Pi();function Ti(){}function Vi(){}Vi.resetWarningCache=Ti;_i.exports=function(){function e(a,r,n,l,i,s){if(s!==K4){var u=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 u.name="Invariant Violation",u}}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:Vi,resetWarningCache:Ti};return o.PropTypes=o,o}});var Ei=ro((BI,Oi)=>{Oi.exports=Di()();var OI,EI});var Ai=ro(Le=>{"use strict";var Kn=Symbol.for("react.element"),Gn=Symbol.for("react.portal"),Va=Symbol.for("react.fragment"),_a=Symbol.for("react.strict_mode"),Da=Symbol.for("react.profiler"),Oa=Symbol.for("react.provider"),Ea=Symbol.for("react.context"),G4=Symbol.for("react.server_context"),Ba=Symbol.for("react.forward_ref"),Aa=Symbol.for("react.suspense"),Za=Symbol.for("react.suspense_list"),Fa=Symbol.for("react.memo"),$a=Symbol.for("react.lazy"),W4=Symbol.for("react.offscreen"),Bi;Bi=Symbol.for("react.module.reference");function I1(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Kn:switch(e=e.type,e){case Va:case Da:case _a:case Aa:case Za:return e;default:switch(e=e&&e.$$typeof,e){case G4:case Ea:case Ba:case $a:case Fa:case Oa:return e;default:return t}}case Gn:return t}}}Le.ContextConsumer=Ea;Le.ContextProvider=Oa;Le.Element=Kn;Le.ForwardRef=Ba;Le.Fragment=Va;Le.Lazy=$a;Le.Memo=Fa;Le.Portal=Gn;Le.Profiler=Da;Le.StrictMode=_a;Le.Suspense=Aa;Le.SuspenseList=Za;Le.isAsyncMode=function(){return!1};Le.isConcurrentMode=function(){return!1};Le.isContextConsumer=function(e){return I1(e)===Ea};Le.isContextProvider=function(e){return I1(e)===Oa};Le.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Kn};Le.isForwardRef=function(e){return I1(e)===Ba};Le.isFragment=function(e){return I1(e)===Va};Le.isLazy=function(e){return I1(e)===$a};Le.isMemo=function(e){return I1(e)===Fa};Le.isPortal=function(e){return I1(e)===Gn};Le.isProfiler=function(e){return I1(e)===Da};Le.isStrictMode=function(e){return I1(e)===_a};Le.isSuspense=function(e){return I1(e)===Aa};Le.isSuspenseList=function(e){return I1(e)===Za};Le.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Va||e===Da||e===_a||e===Aa||e===Za||e===W4||typeof e=="object"&&e!==null&&(e.$$typeof===$a||e.$$typeof===Fa||e.$$typeof===Oa||e.$$typeof===Ea||e.$$typeof===Ba||e.$$typeof===Bi||e.getModuleId!==void 0)};Le.typeOf=I1});var Fi=ro((ZI,Zi)=>{"use strict";Zi.exports=Ai()});import{forwardRef as Me,createElement as oe}from"react";function Se(e,t){if(e==null)return{};var o={},a=Object.keys(e),r,n;for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var as=["color"],t9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,as);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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"}))}),rs=["color"],o9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,rs);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 ns=["color"],a9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ns);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 ls=["color"],r9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ls);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 is=["color"],Y1=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,is);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 ss=["color"],n9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ss);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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"}))}),us=["color"],l9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,us);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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"}))}),ds=["color"],i9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ds);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 cs=["color"],s9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,cs);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 fs=["color"],u9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,fs);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 ps=["color"],d9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ps);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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"}))}),Cs=["color"],c9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,Cs);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 ms=["color"],f9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ms);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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"}))}),gs=["color"],p9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,gs);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 hs=["color"],C9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,hs);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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"}))});var vs=["color"],m9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,vs);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("path",{d:"M4.85355 2.14645C5.04882 2.34171 5.04882 2.65829 4.85355 2.85355L3.70711 4H9C11.4853 4 13.5 6.01472 13.5 8.5C13.5 10.9853 11.4853 13 9 13H5C4.72386 13 4.5 12.7761 4.5 12.5C4.5 12.2239 4.72386 12 5 12H9C10.933 12 12.5 10.433 12.5 8.5C12.5 6.567 10.933 5 9 5H3.70711L4.85355 6.14645C5.04882 6.34171 5.04882 6.65829 4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355L2.14645 4.85355C1.95118 4.65829 1.95118 4.34171 2.14645 4.14645L4.14645 2.14645C4.34171 1.95118 4.65829 1.95118 4.85355 2.14645Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var xs=["color"],g9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,xs);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 Ls=["color"],h9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,Ls);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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"}))}),ws=["color"],v9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ws);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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"}))}),bs=["color"],x9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,bs);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 Is=["color"],L9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,Is);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 ys=["color"],w9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ys);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("path",{d:"M4 6H11L7.5 10.5L4 6Z",fill:a}))});var Ms=["color"],b9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,Ms);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("path",{d:"M4 9H11L7.5 4.5L4 9Z",fill:a}))});var Ss=["color"],I9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,Ss);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 Rs=["color"],y9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,Rs);return oe("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),oe("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 ve from"react";import{createRoot as U8}from"react-dom/client";import M9 from"react";import{jsx as ir,jsxs as S9}from"react/jsx-runtime";function J1({title:e,defaultOpen:t=!0,children:o}){let[a,r]=M9.useState(t),n=M9.useCallback(l=>{r(l.currentTarget.open)},[]);return S9("details",{className:"property-panel-section",open:a,onToggle:n,children:[S9("summary",{className:"property-panel-section-trigger",children:[ir("span",{children:e}),ir(r9,{className:"property-panel-section-chevron",width:12,height:12,"aria-hidden":"true"})]}),ir("div",{className:"property-panel-section-content",children:o})]})}var R9=["H1","H2","H3","H4","H5","H6","P","SPAN","A","BUTTON","LABEL","DIV","LI","TD","TH","CAPTION","FIGCAPTION","BLOCKQUOTE","LEGEND","SUMMARY","DT","DD","EM","STRONG"];import M1 from"react";import*as z1 from"react";import{jsx as ks}from"react/jsx-runtime";function Tt(e,t=[]){let o=[];function a(n,l){let i=z1.createContext(l),s=o.length;o=[...o,l];let u=c=>{let{scope:p,children:m,...C}=c,I=p?.[e]?.[s]||i,f=z1.useMemo(()=>C,Object.values(C));return ks(I.Provider,{value:f,children:m})};u.displayName=n+"Provider";function d(c,p){let m=p?.[e]?.[s]||i,C=z1.useContext(m);if(C)return C;if(l!==void 0)return l;throw new Error(`\`${c}\` must be used within \`${n}\``)}return[u,d]}let r=()=>{let n=o.map(l=>z1.createContext(l));return function(i){let s=i?.[e]||n;return z1.useMemo(()=>({[`__scope${e}`]:{...i,[e]:s}}),[i,s])}};return r.scopeName=e,[a,Hs(r,...t)]}function Hs(...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(n){let l=a.reduce((i,{useScope:s,scopeName:u})=>{let c=s(n)[`__scope${u}`];return{...i,...c}},{});return z1.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return o.scopeName=t.scopeName,o}import*as V9 from"react";import*as Es from"react-dom";import*as Ae from"react";import*as Ps from"react";function k9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function H9(...e){return t=>{let o=!1,a=e.map(r=>{let n=k9(r,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let r=0;r<a.length;r++){let n=a[r];typeof n=="function"?n():k9(e[r],null)}}}}import{Fragment as kf,jsx as P9}from"react/jsx-runtime";function T9(e){let t=Ts(e),o=Ae.forwardRef((a,r)=>{let{children:n,...l}=a,i=Ae.Children.toArray(n),s=i.find(_s);if(s){let u=s.props.children,d=i.map(c=>c===s?Ae.Children.count(u)>1?Ae.Children.only(null):Ae.isValidElement(u)?u.props.children:null:c);return P9(t,{...l,ref:r,children:Ae.isValidElement(u)?Ae.cloneElement(u,void 0,d):null})}return P9(t,{...l,ref:r,children:n})});return o.displayName=`${e}.Slot`,o}function Ts(e){let t=Ae.forwardRef((o,a)=>{let{children:r,...n}=o;if(Ae.isValidElement(r)){let l=Os(r),i=Ds(n,r.props);return r.type!==Ae.Fragment&&(i.ref=a?H9(a,l):l),Ae.cloneElement(r,i)}return Ae.Children.count(r)>1?Ae.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vs=Symbol("radix.slottable");function _s(e){return Ae.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vs}function Ds(e,t){let o={...t};for(let a in t){let r=e[a],n=t[a];/^on[A-Z]/.test(a)?r&&n?o[a]=(...i)=>{let s=n(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...n}:a==="className"&&(o[a]=[r,n].filter(Boolean).join(" "))}return{...e,...o}}function Os(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 Bs}from"react/jsx-runtime";var As=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sr=As.reduce((e,t)=>{let o=T9(`Primitive.${t}`),a=V9.forwardRef((r,n)=>{let{asChild:l,...i}=r,s=l?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Bs(s,{...i,ref:n})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});import*as Ue from"react";var _f=!!(typeof window<"u"&&window.document&&window.document.createElement);function j1(e,t,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e?.(r),o===!1||!r.defaultPrevented)return t?.(r)}}import xt from"react";import*as D9 from"react";function _9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ur(...e){return t=>{let o=!1,a=e.map(r=>{let n=_9(r,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let r=0;r<a.length;r++){let n=a[r];typeof n=="function"?n():_9(e[r],null)}}}}function dr(...e){return D9.useCallback(ur(...e),e)}import*as Ze from"react";import{Fragment as Af,jsx as O9}from"react/jsx-runtime";function cr(e){let t=Zs(e),o=Ze.forwardRef((a,r)=>{let{children:n,...l}=a,i=Ze.Children.toArray(n),s=i.find($s);if(s){let u=s.props.children,d=i.map(c=>c===s?Ze.Children.count(u)>1?Ze.Children.only(null):Ze.isValidElement(u)?u.props.children:null:c);return O9(t,{...l,ref:r,children:Ze.isValidElement(u)?Ze.cloneElement(u,void 0,d):null})}return O9(t,{...l,ref:r,children:n})});return o.displayName=`${e}.Slot`,o}function Zs(e){let t=Ze.forwardRef((o,a)=>{let{children:r,...n}=o;if(Ze.isValidElement(r)){let l=Us(r),i=Ns(n,r.props);return r.type!==Ze.Fragment&&(i.ref=a?ur(a,l):l),Ze.cloneElement(r,i)}return Ze.Children.count(r)>1?Ze.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fs=Symbol("radix.slottable");function $s(e){return Ze.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fs}function Ns(e,t){let o={...t};for(let a in t){let r=e[a],n=t[a];/^on[A-Z]/.test(a)?r&&n?o[a]=(...i)=>{let s=n(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...n}:a==="className"&&(o[a]=[r,n].filter(Boolean).join(" "))}return{...e,...o}}function Us(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 fr}from"react/jsx-runtime";import Wf from"react";import{jsx as Qf}from"react/jsx-runtime";function E9(e){let t=e+"CollectionProvider",[o,a]=Tt(t),[r,n]=o(t,{collectionRef:{current:null},itemMap:new Map}),l=I=>{let{scope:f,children:S}=I,g=xt.useRef(null),R=xt.useRef(new Map).current;return fr(r,{scope:f,itemMap:R,collectionRef:g,children:S})};l.displayName=t;let i=e+"CollectionSlot",s=cr(i),u=xt.forwardRef((I,f)=>{let{scope:S,children:g}=I,R=n(i,S),v=dr(f,R.collectionRef);return fr(s,{ref:v,children:g})});u.displayName=i;let d=e+"CollectionItemSlot",c="data-radix-collection-item",p=cr(d),m=xt.forwardRef((I,f)=>{let{scope:S,children:g,...R}=I,v=xt.useRef(null),k=dr(f,v),O=n(d,S);return xt.useEffect(()=>(O.itemMap.set(v,{ref:v,...R}),()=>{O.itemMap.delete(v)})),fr(p,{[c]:"",ref:k,children:g})});m.displayName=d;function C(I){let f=n(e+"CollectionConsumer",I);return xt.useCallback(()=>{let g=f.collectionRef.current;if(!g)return[];let R=Array.from(g.querySelectorAll(`[${c}]`));return Array.from(f.itemMap.values()).sort((O,U)=>R.indexOf(O.ref.current)-R.indexOf(U.ref.current))},[f.collectionRef,f.itemMap])}return[{Provider:l,Slot:u,ItemSlot:m},C,a]}import*as A9 from"react";function B9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function pr(...e){return t=>{let o=!1,a=e.map(r=>{let n=B9(r,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let r=0;r<a.length;r++){let n=a[r];typeof n=="function"?n():B9(e[r],null)}}}}function Z9(...e){return A9.useCallback(pr(...e),e)}import*as Cr from"react";import*as F9 from"react";var Ao=globalThis?.document?F9.useLayoutEffect:()=>{};var qs=Cr[" useId ".trim().toString()]||(()=>{}),zs=0;function $9(e){let[t,o]=Cr.useState(qs());return Ao(()=>{e||o(a=>a??String(zs++))},[e]),e||(t?`radix-${t}`:"")}import*as q9 from"react";import*as Qs from"react-dom";import*as Fe from"react";import{Fragment as l6,jsx as N9}from"react/jsx-runtime";function U9(e){let t=js(e),o=Fe.forwardRef((a,r)=>{let{children:n,...l}=a,i=Fe.Children.toArray(n),s=i.find(Gs);if(s){let u=s.props.children,d=i.map(c=>c===s?Fe.Children.count(u)>1?Fe.Children.only(null):Fe.isValidElement(u)?u.props.children:null:c);return N9(t,{...l,ref:r,children:Fe.isValidElement(u)?Fe.cloneElement(u,void 0,d):null})}return N9(t,{...l,ref:r,children:n})});return o.displayName=`${e}.Slot`,o}function js(e){let t=Fe.forwardRef((o,a)=>{let{children:r,...n}=o;if(Fe.isValidElement(r)){let l=Xs(r),i=Ws(n,r.props);return r.type!==Fe.Fragment&&(i.ref=a?pr(a,l):l),Fe.cloneElement(r,i)}return Fe.Children.count(r)>1?Fe.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ks=Symbol("radix.slottable");function Gs(e){return Fe.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ks}function Ws(e,t){let o={...t};for(let a in t){let r=e[a],n=t[a];/^on[A-Z]/.test(a)?r&&n?o[a]=(...i)=>{let s=n(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...n}:a==="className"&&(o[a]=[r,n].filter(Boolean).join(" "))}return{...e,...o}}function Xs(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 Ys}from"react/jsx-runtime";var Js=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mr=Js.reduce((e,t)=>{let o=U9(`Primitive.${t}`),a=q9.forwardRef((r,n)=>{let{asChild:l,...i}=r,s=l?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Ys(s,{...i,ref:n})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});import*as Vt from"react";function z9(e){let t=Vt.useRef(e);return Vt.useEffect(()=>{t.current=e}),Vt.useMemo(()=>(...o)=>t.current?.(...o),[])}import*as h1 from"react";import*as Zo from"react";var eu=h1[" useInsertionEffect ".trim().toString()]||Ao;function Lt({prop:e,defaultProp:t,onChange:o=()=>{},caller:a}){let[r,n,l]=tu({defaultProp:t,onChange:o}),i=e!==void 0,s=i?e:r;{let d=h1.useRef(e!==void 0);h1.useEffect(()=>{let c=d.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.`),d.current=i},[i,a])}let u=h1.useCallback(d=>{if(i){let c=ou(d)?d(e):d;c!==e&&l.current?.(c)}else n(d)},[i,e,n,l]);return[s,u]}function tu({defaultProp:e,onChange:t}){let[o,a]=h1.useState(e),r=h1.useRef(o),n=h1.useRef(t);return eu(()=>{n.current=t},[t]),h1.useEffect(()=>{r.current!==o&&(n.current?.(o),r.current=o)},[o,r]),[o,a,n]}function ou(e){return typeof e=="function"}import*as Fo from"react";import{jsx as m6}from"react/jsx-runtime";var au=Fo.createContext(void 0);function $o(e){let t=Fo.useContext(au);return e||t||"ltr"}import{jsx as wt}from"react/jsx-runtime";var gr="rovingFocusGroup.onEntryFocus",ru={bubbles:!1,cancelable:!0},no="RovingFocusGroup",[hr,j9,nu]=E9(no),[lu,vr]=Tt(no,[nu]),[iu,su]=lu(no),K9=Ue.forwardRef((e,t)=>wt(hr.Provider,{scope:e.__scopeRovingFocusGroup,children:wt(hr.Slot,{scope:e.__scopeRovingFocusGroup,children:wt(uu,{...e,ref:t})})}));K9.displayName=no;var uu=Ue.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:a,loop:r=!1,dir:n,currentTabStopId:l,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:s,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...c}=e,p=Ue.useRef(null),m=Z9(t,p),C=$o(n),[I,f]=Lt({prop:l,defaultProp:i??null,onChange:s,caller:no}),[S,g]=Ue.useState(!1),R=z9(u),v=j9(o),k=Ue.useRef(!1),[O,U]=Ue.useState(0);return Ue.useEffect(()=>{let M=p.current;if(M)return M.addEventListener(gr,R),()=>M.removeEventListener(gr,R)},[R]),wt(iu,{scope:o,orientation:a,dir:C,loop:r,currentTabStopId:I,onItemFocus:Ue.useCallback(M=>f(M),[f]),onItemShiftTab:Ue.useCallback(()=>g(!0),[]),onFocusableItemAdd:Ue.useCallback(()=>U(M=>M+1),[]),onFocusableItemRemove:Ue.useCallback(()=>U(M=>M-1),[]),children:wt(mr.div,{tabIndex:S||O===0?-1:0,"data-orientation":a,...c,ref:m,style:{outline:"none",...e.style},onMouseDown:j1(e.onMouseDown,()=>{k.current=!0}),onFocus:j1(e.onFocus,M=>{let V=!k.current;if(M.target===M.currentTarget&&V&&!S){let z=new CustomEvent(gr,ru);if(M.currentTarget.dispatchEvent(z),!z.defaultPrevented){let j=v().filter(L=>L.focusable),W=j.find(L=>L.active),Z=j.find(L=>L.id===I),N=[W,Z,...j].filter(Boolean).map(L=>L.ref.current);X9(N,d)}}k.current=!1}),onBlur:j1(e.onBlur,()=>g(!1))})})}),G9="RovingFocusGroupItem",W9=Ue.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:a=!0,active:r=!1,tabStopId:n,children:l,...i}=e,s=$9(),u=n||s,d=su(G9,o),c=d.currentTabStopId===u,p=j9(o),{onFocusableItemAdd:m,onFocusableItemRemove:C,currentTabStopId:I}=d;return Ue.useEffect(()=>{if(a)return m(),()=>C()},[a,m,C]),wt(hr.ItemSlot,{scope:o,id:u,focusable:a,active:r,children:wt(mr.span,{tabIndex:c?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:j1(e.onMouseDown,f=>{a?d.onItemFocus(u):f.preventDefault()}),onFocus:j1(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:j1(e.onKeyDown,f=>{if(f.key==="Tab"&&f.shiftKey){d.onItemShiftTab();return}if(f.target!==f.currentTarget)return;let S=fu(f,d.orientation,d.dir);if(S!==void 0){if(f.metaKey||f.ctrlKey||f.altKey||f.shiftKey)return;f.preventDefault();let R=p().filter(v=>v.focusable).map(v=>v.ref.current);if(S==="last")R.reverse();else if(S==="prev"||S==="next"){S==="prev"&&R.reverse();let v=R.indexOf(f.currentTarget);R=d.loop?pu(R,v+1):R.slice(v+1)}setTimeout(()=>X9(R))}}),children:typeof l=="function"?l({isCurrentTabStop:c,hasTabStop:I!=null}):l})})});W9.displayName=G9;var du={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cu(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function fu(e,t,o){let a=cu(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return du[a]}function X9(e,t=!1){let o=document.activeElement;for(let a of e)if(a===o||(a.focus({preventScroll:t}),document.activeElement!==o))return}function pu(e,t){return e.map((o,a)=>e[(t+a)%e.length])}var Q9=K9,Y9=W9;import*as n2 from"react";import*as a2 from"react";import*as wu from"react-dom";import*as $e from"react";import*as mu from"react";function J9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function e2(...e){return t=>{let o=!1,a=e.map(r=>{let n=J9(r,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let r=0;r<a.length;r++){let n=a[r];typeof n=="function"?n():J9(e[r],null)}}}}import{Fragment as P6,jsx as t2}from"react/jsx-runtime";function o2(e){let t=gu(e),o=$e.forwardRef((a,r)=>{let{children:n,...l}=a,i=$e.Children.toArray(n),s=i.find(vu);if(s){let u=s.props.children,d=i.map(c=>c===s?$e.Children.count(u)>1?$e.Children.only(null):$e.isValidElement(u)?u.props.children:null:c);return t2(t,{...l,ref:r,children:$e.isValidElement(u)?$e.cloneElement(u,void 0,d):null})}return t2(t,{...l,ref:r,children:n})});return o.displayName=`${e}.Slot`,o}function gu(e){let t=$e.forwardRef((o,a)=>{let{children:r,...n}=o;if($e.isValidElement(r)){let l=Lu(r),i=xu(n,r.props);return r.type!==$e.Fragment&&(i.ref=a?e2(a,l):l),$e.cloneElement(r,i)}return $e.Children.count(r)>1?$e.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hu=Symbol("radix.slottable");function vu(e){return $e.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hu}function xu(e,t){let o={...t};for(let a in t){let r=e[a],n=t[a];/^on[A-Z]/.test(a)?r&&n?o[a]=(...i)=>{let s=n(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...n}:a==="className"&&(o[a]=[r,n].filter(Boolean).join(" "))}return{...e,...o}}function Lu(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 bu}from"react/jsx-runtime";var Iu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],r2=Iu.reduce((e,t)=>{let o=o2(`Primitive.${t}`),a=a2.forwardRef((r,n)=>{let{asChild:l,...i}=r,s=l?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),bu(s,{...i,ref:n})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});import{jsx as yu}from"react/jsx-runtime";var l2="Toggle",xr=n2.forwardRef((e,t)=>{let{pressed:o,defaultPressed:a,onPressedChange:r,...n}=e,[l,i]=Lt({prop:o,onChange:r,defaultProp:a??!1,caller:l2});return yu(r2.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":e.disabled?"":void 0,...n,ref:t,onClick:j1(e.onClick,()=>{e.disabled||i(!l)})})});xr.displayName=l2;import{jsx as l1}from"react/jsx-runtime";var et="ToggleGroup",[s2,G6]=Tt(et,[vr]),u2=vr(),Lr=M1.forwardRef((e,t)=>{let{type:o,...a}=e;if(o==="single")return l1(Mu,{...a,ref:t});if(o==="multiple")return l1(Su,{...a,ref:t});throw new Error(`Missing prop \`type\` expected on \`${et}\``)});Lr.displayName=et;var[d2,c2]=s2(et),Mu=M1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...n}=e,[l,i]=Lt({prop:o,defaultProp:a??"",onChange:r,caller:et});return l1(d2,{scope:e.__scopeToggleGroup,type:"single",value:M1.useMemo(()=>l?[l]:[],[l]),onItemActivate:i,onItemDeactivate:M1.useCallback(()=>i(""),[i]),children:l1(f2,{...n,ref:t})})}),Su=M1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...n}=e,[l,i]=Lt({prop:o,defaultProp:a??[],onChange:r,caller:et}),s=M1.useCallback(d=>i((c=[])=>[...c,d]),[i]),u=M1.useCallback(d=>i((c=[])=>c.filter(p=>p!==d)),[i]);return l1(d2,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:s,onItemDeactivate:u,children:l1(f2,{...n,ref:t})})});Lr.displayName=et;var[Ru,ku]=s2(et),f2=M1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,disabled:a=!1,rovingFocus:r=!0,orientation:n,dir:l,loop:i=!0,...s}=e,u=u2(o),d=$o(l),c={role:"group",dir:d,...s};return l1(Ru,{scope:o,rovingFocus:r,disabled:a,children:r?l1(Q9,{asChild:!0,...u,orientation:n,dir:d,loop:i,children:l1(sr.div,{...c,ref:t})}):l1(sr.div,{...c,ref:t})})}),No="ToggleGroupItem",p2=M1.forwardRef((e,t)=>{let o=c2(No,e.__scopeToggleGroup),a=ku(No,e.__scopeToggleGroup),r=u2(e.__scopeToggleGroup),n=o.value.includes(e.value),l=a.disabled||e.disabled,i={...e,pressed:n,disabled:l},s=M1.useRef(null);return a.rovingFocus?l1(Y9,{asChild:!0,...r,focusable:!l,active:n,ref:s,children:l1(i2,{...i,ref:t})}):l1(i2,{...i,ref:t})});p2.displayName=No;var i2=M1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,value:a,...r}=e,n=c2(No,o),l={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=n.type==="single"?l:void 0;return l1(xr,{...i,...r,ref:t,onPressedChange:s=>{s?n.onItemActivate(a):n.onItemDeactivate(a)}})}),C2=Lr,m2=p2;import Du from"react";import{jsx as Vu,jsxs as _u}from"react/jsx-runtime";var Pu={border:"none",margin:0,padding:0,minWidth:0},Tu={color:"var(--dmp-color-foreground)",fontSize:"var(--dmp-font-size-label)",display:"block",marginBottom:"5px",padding:0};function v1({label:e,id:t,className:o,children:a}){let r=`${t}-legend`;return _u("fieldset",{style:Pu,className:o,"aria-labelledby":r,children:[Vu("legend",{id:r,style:Tu,children:e}),a]})}import{jsx as wr}from"react/jsx-runtime";function D1({label:e,options:t,value:o,onChange:a,id:r="radio-group"}){let n=Du.useCallback(l=>{l&&typeof a=="function"&&a(l)},[a]);return wr(v1,{label:e,id:r,className:"radioGroupEditor-fieldset",children:wr(C2,{type:"single",value:o,onValueChange:n,className:"radioGroupEditor-root","aria-label":e,children:t.map(l=>wr(m2,{value:l.value,className:"radioGroupEditor-item","aria-label":l.label,title:l.label,children:l.icon??l.label},l.value))})})}import{jsx as lo}from"react/jsx-runtime";var h2=[{value:"none",labelKey:"none",defaultLabel:"None",icon:lo(Y1,{width:14,height:14})},{value:"solid",labelKey:"solid",defaultLabel:"Solid",icon:lo(a9,{width:14,height:14})},{value:"dashed",labelKey:"dashed",defaultLabel:"Dashed",icon:lo(t9,{width:14,height:14})},{value:"dotted",labelKey:"dotted",defaultLabel:"Dotted",icon:lo(o9,{width:14,height:14})}],g2=new Set(h2.map(e=>e.value));function Ou(e){if(!e)return"none";if(g2.has(e))return e;let t=e.split(/\s+/)[0]??"";return g2.has(t)?t:"none"}function v2({label:e="Border Style",value:t,onChange:o,id:a="border-style",optionLabels:r}){let n=h2.map(l=>({value:l.value,label:r?.[l.labelKey]??l.defaultLabel,icon:l.icon}));return lo(D1,{label:e,options:n,value:Ou(t),onChange:o,id:a})}import Ge from"react";function Oe(e,t){return e.replace(/\{(\d+)\}/g,(o,a)=>{let r=t[Number(a)];return r===void 0?o:String(r)})}function p1(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 n=o[r],l=a[r];n!==null&&typeof n=="object"&&!Array.isArray(n)?o[r]=p1(n,l):typeof l=="string"&&(o[r]=l)}return o}var x2=[{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:"general.closePanel"},{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.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.makeEqual"},{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",placeholders:[0,1]},{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.color.gradientValue"},{path:"editors.color.imageValue"},{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.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.picklist.ariaReset",placeholders:[0]},{path:"history.changeLimitTitle"},{path:"history.changeLimitBody"}];function Eu(e,t){return t.split(".").reduce((o,a)=>{if(o&&typeof o=="object")return o[a]},e)}function Bu(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 Au(e){let t=[];if(!e||typeof e!="object")return["labels is not an object"];for(let o of x2){let{path:a,placeholders:r}=o,n=Eu(e,a);if(typeof n!="string"){t.push(`missing or non-string label: ${a}`);continue}if(r){let l=Bu(n),i=[...r].sort((u,d)=>u-d);(l.length!==i.length||l.some((u,d)=>u!==i[d]))&&t.push(`placeholder mismatch at ${a}: expected {${i.join(",")}}, got {${l.join(",")}}`)}}return t}var Uo=[{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"}],S1={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}},Zu=S1.px??{min:0,max:1e4,step:1,decimals:0};function io(e){let t=e.map(o=>o.value).join("|");return new RegExp(`^(-?\\d*\\.?\\d+)\\s*(${t})$`)}var Fu=io(Uo);function i1(e,t="px",o=Fu){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 n=parseFloat(a);return isNaN(n)?{numericValue:"",unit:t}:{numericValue:n,unit:t}}function br(e,t=S1){return t[e]||Zu}function R1(e,t,o=S1){let a=br(t,o);return Math.min(a.max,Math.max(a.min,e))}function k1(e,t,o=S1){if(e===""||e==null||isNaN(e))return"";let a=br(t,o);return Number(Number(e).toFixed(a.decimals))}function qo(e,t){return e===""||e==null||isNaN(e)?"":`${e}${t}`}function zo(e,t,o,a,r=S1){let n=parseFloat(e)||0,l=br(a,r),i=o?10:1,s=(t==="ArrowUp"?1:-1)*l.step*i,u=R1(n+s,a,r);return String(k1(u,a,r))}function Ir({top:e,right:t,bottom:o,left:a}){return`${e||"0px"} ${t||"0px"} ${o||"0px"} ${a||"0px"}`}function _t(e){let t={top:"",right:"",bottom:"",left:""};if(!e||typeof e!="string")return t;let o=e.trim().split(/\s+/),[a="",r="",n="",l=""]=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:n,left:r}:{top:a,right:r,bottom:n,left:l}}function x1(...e){return Uo.filter(t=>e.includes(t.value))}var O1={width:{units:x1("px","em","rem","vw","ch","%"),icon:y9},minWidth:{units:x1("px","em","rem","vw","ch","%")},maxWidth:{units:x1("px","em","rem","vw","ch","%")},height:{units:x1("px","em","rem","vh","%"),icon:s9},minHeight:{units:x1("px","em","rem","vh","%")},maxHeight:{units:x1("px","em","rem","vh","%")},fontSize:{units:x1("px","em","rem","%","pt"),constraints:{...S1,px:{min:0,max:1e3,step:1,decimals:0},"%":{min:0,max:1e3,step:1,decimals:0}},icon:i9},lineHeight:{units:[{value:"",label:"\xD7"},{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],defaultUnit:"",constraints:{"":{min:0,max:10,step:.1,decimals:2},px:{min:0,max:1e3,step:1,decimals:2},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}},icon:C9},letterSpacing:{units:x1("px","em","rem"),constraints:{...S1,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:p9}},so={padding:{units:x1("px","em","rem","%")},margin:{units:x1("px","em","rem","%")},borderRadius:{units:x1("px","em","rem","%"),sideLabelKind:"corners"},borderWidth:{units:x1("px","em","rem")}};import{jsx as H1,jsxs as jo}from"react/jsx-runtime";var $u=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],Dt=["top","right","bottom","left"],Nu={sides:{top:"Top",right:"Right",bottom:"Bottom",left:"Left"},corners:{topLeft:"Top Left",topRight:"Top Right",bottomRight:"Bottom Right",bottomLeft:"Bottom Left"},makeEqual:"Make all values equal",ariaUnit:"{0} unit",ariaSide:"{0} {1}"};function Uu(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]}function uo(e){return typeof e=="string"&&e.trim().toLowerCase()==="auto"}function yr(e,t,o){let a={top:"",right:"",bottom:"",left:""};for(let r of Dt){let n=e[r];if(n==null||n==="")a[r]="";else if(uo(n))a[r]="auto";else{let l=i1(String(n),t,o);a[r]=l.numericValue!==""?String(l.numericValue):""}}return a}function Mr(e){let t=e.top||"";return t===(e.right||"")&&t===(e.bottom||"")&&t===(e.left||"")}function L2(e,t,o){for(let a of Dt){let r=e[a];if(r!=null&&r!==""&&r!=="0"){let n=i1(String(r),"px",t);if(n.unit&&o.has(n.unit))return n.unit}}return"px"}function qu(e,t,o){if(uo(e))return"auto";let a=parseFloat(e);if(e===""||isNaN(a))return"";let r=R1(a,t,o);return`${k1(r,t,o)}${t}`}function w2(e){if(!e)return"";let t=_t(e);return!t.top&&!t.right&&!t.bottom&&!t.left?"":Ir(t)}function co({label:e,value:t="",onChange:o,id:a="",units:r=$u,constraints:n=S1,allowAuto:l=!1,sideLabelKind:i="sides",sideIcons:s,placeholder:u="",aria:d}){let c=p1(Nu,d),p=Uu(c,i),m=Ge.useRef(o);m.current=o;let C=Ge.useMemo(()=>io(r),[r]),I=Ge.useMemo(()=>new Set(r.map(L=>L.value)),[r]),f=Ge.useMemo(()=>{let L={top:"",right:"",bottom:"",left:""};if(!u)return L;let x=_t(u),w={...L};for(let b of Dt){let P=x[b];if(!P)continue;let h=i1(P,"px",C);h.numericValue!==""&&(w[b]=String(h.numericValue))}return w},[u,C]),S=Ge.useMemo(()=>_t(t),[]),[g,R]=Ge.useState(()=>L2(S,C,I)),[v,k]=Ge.useState(()=>yr(S,g,C)),[O,U]=Ge.useState(()=>Mr(v)),M=Ge.useRef(w2(t));Ge.useEffect(()=>{if(t===M.current)return;let L=w2(t);if(L===M.current)return;M.current=L;let x=_t(t),w=L2(x,C,I);R(w);let b=yr(x,w,C);k(b),U(Mr(b))},[t,C,I]);let V=Ge.useCallback((L,x)=>{let w={top:"",right:"",bottom:"",left:""},b=!0;for(let h of Dt)w[h]=qu(L[h],x,n),w[h]!==""&&(b=!1);let P=b?"":Ir(w);P!==M.current&&(M.current=P,typeof m.current=="function"&&m.current(P))},[n]),z=Ge.useCallback((L,x)=>{k(O?{top:x,right:x,bottom:x,left:x}:b=>({...b,[L]:x}));let w=i1(x,g,C);w.numericValue!==""&&w.unit&&I.has(w.unit)&&w.unit!==g&&R(w.unit)},[O,g,C,I]),j=Ge.useCallback((L,x)=>{let w=x.clipboardData.getData("text"),b=i1(w,g,C);if(b.numericValue!==""&&b.unit&&I.has(b.unit)){x.preventDefault();let P=R1(b.numericValue,b.unit,n),h=String(k1(P,b.unit,n)),H=O?{top:h,right:h,bottom:h,left:h}:{...v,[L]:h};k(H),b.unit!==g&&R(b.unit),V(H,b.unit)}},[O,v,g,C,I,n,V]),W=Ge.useCallback(L=>{let x=v[L];if(x===""){let H=O?{top:"",right:"",bottom:"",left:""}:{...v,[L]:""};k(H),V(H,g);return}if(l&&uo(x)){let H="auto",q=O?{top:H,right:H,bottom:H,left:H}:{...v,[L]:H};k(q),V(q,g);return}let w=parseFloat(x);if(isNaN(w)){let H=_t(M.current);k(yr(H,g,C));return}let b=R1(w,g,n),P=String(k1(b,g,n)),h=O?{top:P,right:P,bottom:P,left:P}:{...v,[L]:P};k(h),V(h,g)},[v,O,g,C,n,V,l]),Z=Ge.useCallback((L,x)=>{if(x.key==="Enter"){x.currentTarget.blur();return}if(x.key==="ArrowUp"||x.key==="ArrowDown"){if(uo(v[L]))return;x.preventDefault();let w=zo(v[L],x.key,x.shiftKey,g,n);if(w===null)return;let b=O?{top:w,right:w,bottom:w,left:w}:{...v,[L]:w};k(b),V(b,g)}},[v,O,g,n,V]),D=Ge.useCallback(()=>{if(!O&&!Mr(v)){let L=v.top,x={top:L,right:L,bottom:L,left:L};k(x),V(x,g)}U(L=>!L)},[O,v,g,V]),N=Ge.useCallback(L=>{let x=L.target.value;if(!I.has(x))return;R(x);let w={top:"",right:"",bottom:"",left:""};for(let b of Dt){let P=v[b];if(uo(P))w[b]="auto";else if(P!==""){let h=parseFloat(P);if(isNaN(h))w[b]=P;else{let H=R1(h,x,n);w[b]=String(k1(H,x,n))}}else w[b]=""}k(w),V(w,x)},[v,I,n,V]);return jo(v1,{label:e,id:a,className:"boxDimensionEditor-fieldset",children:[H1("div",{className:"boxDimensionEditor-header",children:H1("div",{className:"boxDimensionEditor-controls",children:H1("select",{className:"boxDimensionEditor-unit",value:g,onChange:N,"aria-label":Oe(c.ariaUnit,[e]),children:r.map(L=>H1("option",{value:L.value,children:L.label},L.value))})})}),H1("div",{className:"boxDimensionEditor-grid",children:Dt.map((L,x)=>{let w=s&&s[x];return jo("div",{className:"boxDimensionEditor-cell",children:[H1("label",{htmlFor:`${a}-${L}`,className:"boxDimensionEditor-label",children:p[x]}),jo("div",{className:"boxDimensionEditor-input-row",children:[w&&H1("span",{className:"boxDimensionEditor-input-icon","aria-hidden":"true",children:H1(w,{size:12,width:12,height:12})}),H1("input",{id:`${a}-${L}`,type:"text",className:w?"boxDimensionEditor-input boxDimensionEditor-input--with-icon":"boxDimensionEditor-input",value:v[L],placeholder:f[L],onChange:b=>z(L,b.target.value),onPaste:b=>j(L,b),onBlur:()=>W(L),onKeyDown:b=>Z(L,b),"aria-label":Oe(c.ariaSide,[e,p[x]??""]),autoComplete:"off",spellCheck:"false"})]})]},L)})}),jo("label",{className:"boxDimensionEditor-equal",children:[H1("input",{type:"checkbox",className:"boxDimensionEditor-equal-checkbox",checked:O,onChange:D}),H1("span",{className:"boxDimensionEditor-equal-label",children:c.makeEqual})]})]})}import{forwardRef as ju,createElement as Ku}from"react";var Ko=(...e)=>e.filter((t,o,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===o).join(" ").trim();var b2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var I2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,a)=>a?a.toUpperCase():o.toLowerCase());var Sr=e=>{let t=I2(e);return t.charAt(0).toUpperCase()+t.slice(1)};import{forwardRef as zu,createElement as S2}from"react";var y2={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 M2=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var R2=zu(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:r="",children:n,iconNode:l,...i},s)=>S2("svg",{ref:s,...y2,width:t,height:t,stroke:e,strokeWidth:a?Number(o)*24/Number(t):o,className:Ko("lucide",r),...!n&&!M2(i)&&{"aria-hidden":"true"},...i},[...l.map(([u,d])=>S2(u,d)),...Array.isArray(n)?n:[n]]));var k2=(e,t)=>{let o=ju(({className:a,...r},n)=>Ku(R2,{ref:n,iconNode:t,className:Ko(`lucide-${b2(Sr(e))}`,`lucide-${e}`,a),...r}));return o.displayName=Sr(e),o};var Gu=[["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"}]],fo=k2("pipette",Gu);import ke from"react";import{useRef as Qo,useCallback as We,useEffect as Dr,useMemo as Yo,useState as Or,createContext as Wu,useContext as Xu}from"react";var H2={exports:{}},po={};var P2;function Qu(){if(P2)return po;P2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(a,r,n){var l=null;if(n!==void 0&&(l=""+n),r.key!==void 0&&(l=""+r.key),"key"in r){n={};for(var i in r)i!=="key"&&(n[i]=r[i])}else n=r;return r=n.ref,{$$typeof:e,type:a,key:l,ref:r!==void 0?r:null,props:n}}return po.Fragment=t,po.jsx=o,po.jsxs=o,po}var T2;function Yu(){return T2||(T2=1,H2.exports=Qu()),H2.exports}var Ve=Yu();function F2(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=F2(e[t]))&&(a&&(a+=" "),a+=o)}else for(o in e)e[o]&&(a&&(a+=" "),a+=o);return a}function Ju(){for(var e,t,o=0,a="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=F2(e))&&(a&&(a+=" "),a+=t);return a}var Er="-",ed=e=>{let t=od(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:r=>{let n=r.split(Er);return n[0]===""&&n.length!==1&&n.shift(),$2(n,t)||td(r)},getConflictingClassGroupIds:(r,n)=>{let l=o[r]||[];return n&&a[r]?[...l,...a[r]]:l}}},$2=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),r=a?$2(e.slice(1),a):void 0;if(r)return r;if(t.validators.length===0)return;let n=e.join(Er);return t.validators.find(({validator:l})=>l(n))?.classGroupId},V2=/^\[(.+)\]$/,td=e=>{if(V2.test(e)){let t=V2.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},od=e=>{let{theme:t,classGroups:o}=e,a={nextPart:new Map,validators:[]};for(let r in o)Hr(o[r],a,r,t);return a},Hr=(e,t,o,a)=>{e.forEach(r=>{if(typeof r=="string"){let n=r===""?t:_2(t,r);n.classGroupId=o;return}if(typeof r=="function"){if(ad(r)){Hr(r(a),t,o,a);return}t.validators.push({validator:r,classGroupId:o});return}Object.entries(r).forEach(([n,l])=>{Hr(l,_2(t,n),o,a)})})},_2=(e,t)=>{let o=e;return t.split(Er).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},ad=e=>e.isThemeGetter,rd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,r=(n,l)=>{o.set(n,l),t++,t>e&&(t=0,a=o,o=new Map)};return{get(n){let l=o.get(n);if(l!==void 0)return l;if((l=a.get(n))!==void 0)return r(n,l),l},set(n,l){o.has(n)?o.set(n,l):r(n,l)}}},Pr="!",Tr=":",nd=Tr.length,ld=e=>{let{prefix:t,experimentalParseClassName:o}=e,a=r=>{let n=[],l=0,i=0,s=0,u;for(let C=0;C<r.length;C++){let I=r[C];if(l===0&&i===0){if(I===Tr){n.push(r.slice(s,C)),s=C+nd;continue}if(I==="/"){u=C;continue}}I==="["?l++:I==="]"?l--:I==="("?i++:I===")"&&i--}let d=n.length===0?r:r.substring(s),c=id(d),p=c!==d,m=u&&u>s?u-s:void 0;return{modifiers:n,hasImportantModifier:p,baseClassName:c,maybePostfixModifierPosition:m}};if(t){let r=t+Tr,n=a;a=l=>l.startsWith(r)?n(l.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(o){let r=a;a=n=>o({className:n,parseClassName:r})}return a},id=e=>e.endsWith(Pr)?e.substring(0,e.length-1):e.startsWith(Pr)?e.substring(1):e,sd=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(n=>{n[0]==="["||t[n]?(a.push(...r.sort(),n),r=[]):r.push(n)}),a.push(...r.sort()),a}},ud=e=>({cache:rd(e.cacheSize),parseClassName:ld(e),sortModifiers:sd(e),...ed(e)}),dd=/\s+/,cd=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:n}=t,l=[],i=e.trim().split(dd),s="";for(let u=i.length-1;u>=0;u-=1){let d=i[u],{isExternal:c,modifiers:p,hasImportantModifier:m,baseClassName:C,maybePostfixModifierPosition:I}=o(d);if(c){s=d+(s.length>0?" "+s:s);continue}let f=!!I,S=a(f?C.substring(0,I):C);if(!S){if(!f){s=d+(s.length>0?" "+s:s);continue}if(S=a(C),!S){s=d+(s.length>0?" "+s:s);continue}f=!1}let g=n(p).join(":"),R=m?g+Pr:g,v=R+S;if(l.includes(v))continue;l.push(v);let k=r(S,f);for(let O=0;O<k.length;++O){let U=k[O];l.push(R+U)}s=d+(s.length>0?" "+s:s)}return s};function fd(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=N2(t))&&(a&&(a+=" "),a+=o);return a}var N2=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=N2(e[a]))&&(o&&(o+=" "),o+=t);return o};function pd(e,...t){let o,a,r,n=l;function l(s){let u=t.reduce((d,c)=>c(d),e());return o=ud(u),a=o.cache.get,r=o.cache.set,n=i,i(s)}function i(s){let u=a(s);if(u)return u;let d=cd(s,o);return r(s,d),d}return function(){return n(fd.apply(null,arguments))}}var Ne=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},U2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,q2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Cd=/^\d+\/\d+$/,md=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gd=/\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$/,hd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ot=e=>Cd.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),tt=e=>!!e&&Number.isInteger(Number(e)),Rr=e=>e.endsWith("%")&&ce(e.slice(0,-1)),K1=e=>md.test(e),Ld=()=>!0,wd=e=>gd.test(e)&&!hd.test(e),z2=()=>!1,bd=e=>vd.test(e),Id=e=>xd.test(e),yd=e=>!K(e)&&!G(e),Md=e=>Et(e,G2,z2),K=e=>U2.test(e),bt=e=>Et(e,W2,wd),kr=e=>Et(e,Pd,ce),D2=e=>Et(e,j2,z2),Sd=e=>Et(e,K2,Id),Go=e=>Et(e,X2,bd),G=e=>q2.test(e),Co=e=>Bt(e,W2),Rd=e=>Bt(e,Td),O2=e=>Bt(e,j2),kd=e=>Bt(e,G2),Hd=e=>Bt(e,K2),Wo=e=>Bt(e,X2,!0),Et=(e,t,o)=>{let a=U2.exec(e);return a?a[1]?t(a[1]):o(a[2]):!1},Bt=(e,t,o=!1)=>{let a=q2.exec(e);return a?a[1]?t(a[1]):o:!1},j2=e=>e==="position"||e==="percentage",K2=e=>e==="image"||e==="url",G2=e=>e==="length"||e==="size"||e==="bg-size",W2=e=>e==="length",Pd=e=>e==="number",Td=e=>e==="family-name",X2=e=>e==="shadow",Vd=()=>{let e=Ne("color"),t=Ne("font"),o=Ne("text"),a=Ne("font-weight"),r=Ne("tracking"),n=Ne("leading"),l=Ne("breakpoint"),i=Ne("container"),s=Ne("spacing"),u=Ne("radius"),d=Ne("shadow"),c=Ne("inset-shadow"),p=Ne("text-shadow"),m=Ne("drop-shadow"),C=Ne("blur"),I=Ne("perspective"),f=Ne("aspect"),S=Ne("ease"),g=Ne("animate"),R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...v(),G,K],O=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],M=()=>[G,K,s],V=()=>[Ot,"full","auto",...M()],z=()=>[tt,"none","subgrid",G,K],j=()=>["auto",{span:["full",tt,G,K]},tt,G,K],W=()=>[tt,"auto",G,K],Z=()=>["auto","min","max","fr",G,K],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...M()],x=()=>[Ot,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],w=()=>[e,G,K],b=()=>[...v(),O2,D2,{position:[G,K]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],h=()=>["auto","cover","contain",kd,Md,{size:[G,K]}],H=()=>[Rr,Co,bt],q=()=>["","none","full",u,G,K],A=()=>["",ce,Co,bt],F=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>[ce,Rr,O2,D2],Y=()=>["","none",C,G,K],ue=()=>["none",ce,G,K],de=()=>["none",ce,G,K],y=()=>[ce,G,K],B=()=>[Ot,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[K1],breakpoint:[K1],color:[Ld],container:[K1],"drop-shadow":[K1],ease:["in","out","in-out"],font:[yd],"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",ce],text:[K1],"text-shadow":[K1],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ot,K,G,f]}],container:["container"],columns:[{columns:[ce,K,G,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:k()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{start:V()}],end:[{end:V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[tt,"auto",G,K]}],basis:[{basis:[Ot,"full","auto",i,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,Ot,"auto","initial","none",K]}],grow:[{grow:["",ce,G,K]}],shrink:[{shrink:["",ce,G,K]}],order:[{order:[tt,"first","last","none",G,K]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":W()}],"col-end":[{"col-end":W()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":W()}],"row-end":[{"row-end":W()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:x()}],w:[{w:[i,"screen",...x()]}],"min-w":[{"min-w":[i,"screen","none",...x()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[l]},...x()]}],h:[{h:["screen","lh",...x()]}],"min-h":[{"min-h":["screen","lh","none",...x()]}],"max-h":[{"max-h":["screen","lh",...x()]}],"font-size":[{text:["base",o,Co,bt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,G,kr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Rr,K]}],"font-family":[{font:[Rd,K,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,G,K]}],"line-clamp":[{"line-clamp":[ce,"none",G,kr]}],leading:[{leading:[n,...M()]}],"list-image":[{"list-image":["none",G,K]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",G,K]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:w()}],"text-color":[{text:w()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",G,bt]}],"text-decoration-color":[{decoration:w()}],"underline-offset":[{"underline-offset":[ce,"auto",G,K]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",G,K]}],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",G,K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:b()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:h()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},tt,G,K],radial:["",G,K],conic:[tt,G,K]},Hd,Sd]}],"bg-color":[{bg:w()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:w()}],"gradient-via":[{via:w()}],"gradient-to":[{to:w()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:A()}],"border-w-x":[{"border-x":A()}],"border-w-y":[{"border-y":A()}],"border-w-s":[{"border-s":A()}],"border-w-e":[{"border-e":A()}],"border-w-t":[{"border-t":A()}],"border-w-r":[{"border-r":A()}],"border-w-b":[{"border-b":A()}],"border-w-l":[{"border-l":A()}],"divide-x":[{"divide-x":A()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":A()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:w()}],"border-color-x":[{"border-x":w()}],"border-color-y":[{"border-y":w()}],"border-color-s":[{"border-s":w()}],"border-color-e":[{"border-e":w()}],"border-color-t":[{"border-t":w()}],"border-color-r":[{"border-r":w()}],"border-color-b":[{"border-b":w()}],"border-color-l":[{"border-l":w()}],"divide-color":[{divide:w()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,G,K]}],"outline-w":[{outline:["",ce,Co,bt]}],"outline-color":[{outline:w()}],shadow:[{shadow:["","none",d,Wo,Go]}],"shadow-color":[{shadow:w()}],"inset-shadow":[{"inset-shadow":["none",c,Wo,Go]}],"inset-shadow-color":[{"inset-shadow":w()}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:w()}],"ring-offset-w":[{"ring-offset":[ce,bt]}],"ring-offset-color":[{"ring-offset":w()}],"inset-ring-w":[{"inset-ring":A()}],"inset-ring-color":[{"inset-ring":w()}],"text-shadow":[{"text-shadow":["none",p,Wo,Go]}],"text-shadow-color":[{"text-shadow":w()}],opacity:[{opacity:[ce,G,K]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"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":[ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":T()}],"mask-image-linear-to-pos":[{"mask-linear-to":T()}],"mask-image-linear-from-color":[{"mask-linear-from":w()}],"mask-image-linear-to-color":[{"mask-linear-to":w()}],"mask-image-t-from-pos":[{"mask-t-from":T()}],"mask-image-t-to-pos":[{"mask-t-to":T()}],"mask-image-t-from-color":[{"mask-t-from":w()}],"mask-image-t-to-color":[{"mask-t-to":w()}],"mask-image-r-from-pos":[{"mask-r-from":T()}],"mask-image-r-to-pos":[{"mask-r-to":T()}],"mask-image-r-from-color":[{"mask-r-from":w()}],"mask-image-r-to-color":[{"mask-r-to":w()}],"mask-image-b-from-pos":[{"mask-b-from":T()}],"mask-image-b-to-pos":[{"mask-b-to":T()}],"mask-image-b-from-color":[{"mask-b-from":w()}],"mask-image-b-to-color":[{"mask-b-to":w()}],"mask-image-l-from-pos":[{"mask-l-from":T()}],"mask-image-l-to-pos":[{"mask-l-to":T()}],"mask-image-l-from-color":[{"mask-l-from":w()}],"mask-image-l-to-color":[{"mask-l-to":w()}],"mask-image-x-from-pos":[{"mask-x-from":T()}],"mask-image-x-to-pos":[{"mask-x-to":T()}],"mask-image-x-from-color":[{"mask-x-from":w()}],"mask-image-x-to-color":[{"mask-x-to":w()}],"mask-image-y-from-pos":[{"mask-y-from":T()}],"mask-image-y-to-pos":[{"mask-y-to":T()}],"mask-image-y-from-color":[{"mask-y-from":w()}],"mask-image-y-to-color":[{"mask-y-to":w()}],"mask-image-radial":[{"mask-radial":[G,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":T()}],"mask-image-radial-to-pos":[{"mask-radial-to":T()}],"mask-image-radial-from-color":[{"mask-radial-from":w()}],"mask-image-radial-to-color":[{"mask-radial-to":w()}],"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":v()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":T()}],"mask-image-conic-to-pos":[{"mask-conic-to":T()}],"mask-image-conic-from-color":[{"mask-conic-from":w()}],"mask-image-conic-to-color":[{"mask-conic-to":w()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:b()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:h()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",G,K]}],filter:[{filter:["","none",G,K]}],blur:[{blur:Y()}],brightness:[{brightness:[ce,G,K]}],contrast:[{contrast:[ce,G,K]}],"drop-shadow":[{"drop-shadow":["","none",m,Wo,Go]}],"drop-shadow-color":[{"drop-shadow":w()}],grayscale:[{grayscale:["",ce,G,K]}],"hue-rotate":[{"hue-rotate":[ce,G,K]}],invert:[{invert:["",ce,G,K]}],saturate:[{saturate:[ce,G,K]}],sepia:[{sepia:["",ce,G,K]}],"backdrop-filter":[{"backdrop-filter":["","none",G,K]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[ce,G,K]}],"backdrop-contrast":[{"backdrop-contrast":[ce,G,K]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,G,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,G,K]}],"backdrop-invert":[{"backdrop-invert":["",ce,G,K]}],"backdrop-opacity":[{"backdrop-opacity":[ce,G,K]}],"backdrop-saturate":[{"backdrop-saturate":[ce,G,K]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,G,K]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",G,K]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ce,"initial",G,K]}],ease:[{ease:["linear","initial",S,G,K]}],delay:[{delay:[ce,G,K]}],animate:[{animate:["none",g,G,K]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[I,G,K]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":["scale-3d"],skew:[{skew:y()}],"skew-x":[{"skew-x":y()}],"skew-y":[{"skew-y":y()}],transform:[{transform:[G,K,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:B()}],"translate-x":[{"translate-x":B()}],"translate-y":[{"translate-y":B()}],"translate-z":[{"translate-z":B()}],"translate-none":["translate-none"],accent:[{accent:w()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:w()}],"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",G,K]}],"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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",G,K]}],fill:[{fill:["none",...w()]}],"stroke-w":[{stroke:[ce,Co,bt,kr]}],stroke:[{stroke:["none",...w()]}],"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"]}},_d=pd(Vd),Dd=(e,t,o)=>Math.min(Math.max(e,t),o),Xo=e=>Math.round(Dd(e,0,255)),Q2=e=>{let t=e.replace("#",""),o=parseInt(t,16);return{r:o>>16&255,g:o>>8&255,b:o&255}},Od=({r:e,g:t,b:o})=>{let a=r=>Xo(r).toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(o)}`},Vr=({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,n=o*(1-t),l=o*(1-r*t),i=o*(1-(1-r)*t),s,u,d;switch(a%6){case 0:s=o,u=i,d=n;break;case 1:s=l,u=o,d=n;break;case 2:s=n,u=o,d=i;break;case 3:s=n,u=l,d=o;break;case 4:s=i,u=n,d=o;break;case 5:s=o,u=n,d=l;break;default:s=u=d=0}return{r:Xo(s*255),g:Xo(u*255),b:Xo(d*255)}},_r=({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),n=a-r,l=0,i=a===0?0:n/a,s=a;if(n!==0)switch(a){case e:l=((t-o)/n+(t<o?6:0))/6;break;case t:l=((o-e)/n+2)/6;break;case o:l=((e-t)/n+4)/6;break}return{h:Math.round(l*360),s:Math.round(i*100),v:Math.round(s*100)}},Ed=e=>Od(Vr(e)),Bd=e=>_r(Q2(e));var E2=({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)}},B2=({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)}},Ad=e=>{let{r:t,g:o,b:a}=Q2(e);return(.299*t+.587*o+.114*a)/255>.5?"#000000":"#ffffff"};var Zd=(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 n=e.getHsla();return`hsla(${n.h}, ${n.s}%, ${n.l}%, ${n.a})`;default:Jo()}};function Fd(e){switch(e.type){case"hex":return{...Bd(e.value),a:1};case"rgb":return{..._r(e),a:1};case"rgba":return{..._r(e),a:e.a};case"hsl":return{...B2(e),a:1};case"hsla":return{...B2(e),a:1};case"hsv":return{...e,a:1};case"hsva":return{...e};default:Jo()}}function ot(e,t){let o=Fd(e);switch(t){case"hex":return Ed(o);case"rgb":return Vr(o);case"rgba":return{...Vr(o),a:o.a};case"hsl":return E2(o);case"hsla":return{...E2(o),a:o.a};case"hsv":return{h:o.h,s:o.s,v:o.v};case"hsva":return o;default:Jo()}}var It=(...e)=>_d(Ju(e)),G1=(e,t,o)=>Math.min(Math.max(e,t),o),at=e=>Math.round(e);function Jo(e){throw new Error("You should never get here.")}var rt=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 ot(this.color,"rgb")}getHsv(){return ot(this.color,"hsv")}getHsla(){return ot(this.color,"hsla")}getHsva(){return ot(this.color,"hsva")}getHex(){return ot(this.color,"hex")}getHsl(){return ot(this.color,"hsl")}getRgba(){return ot(this.color,"rgba")}format(t="hex"){return Zd(this,t)}getContrastingColor(){return new e({type:"hex",value:Ad(this.getHex())})}},A2=(e,t)=>{let o=e.getBoundingClientRect(),a,r;if("touches"in t){let u=t.touches[0]||t.changedTouches[0];a=u.clientX,r=u.clientY}else a=t.clientX,r=t.clientY;let n=a-o.left,l=r-o.top,i=G1(n/o.width,0,1),s=G1(l/o.height,0,1);return{left:i,top:s}},Br=({onMove:e,onMoveEnd:t,onKey:o,children:a,className:r,...n})=>{let l=Qo(null),i=Qo(!1),s=We(p=>{!i.current||!l.current||(p.preventDefault(),e(A2(l.current,p)))},[e]),u=We(()=>{i.current=!1,t(),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",u),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",u)},[s,t]),d=We(p=>{let m=l.current;m&&(p.preventDefault(),i.current=!0,e(A2(m,p.nativeEvent)),document.addEventListener("mousemove",s),document.addEventListener("mouseup",u),document.addEventListener("touchmove",s,{passive:!1}),document.addEventListener("touchend",u))},[e,s,u]),c=We(p=>{if(!o)return;let m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),o({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},[o]);return Dr(()=>()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",u),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",u)},[s,u]),Ve.jsx("div",{ref:l,className:It("rounded-inherit absolute inset-0 touch-none outline-none","focus:[&_.react-colorful-pointer]:scale-110",r),onTouchStart:d,onMouseDown:d,onKeyDown:c,tabIndex:0,role:"slider",...n,children:a})},Ar=({className:e,top:t=.5,left:o,color:a})=>Ve.jsx("div",{className:It("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}%`}}),$d=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=We(s=>{t({a:s.left},!1)},[t]),n=We(s=>{t({a:G1(e.a+s.left,0,1)},!0)},[e.a,t]),l=Yo(()=>new rt({type:"hsva",h:e.h,s:e.s,v:e.v,a:0}).format("hsla"),[e.h,e.s,e.v]),i=Yo(()=>new rt({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:It("relative h-full w-full",o),children:Ve.jsxs(Br,{onMove:r,onMoveEnd:a,onKey:n,"aria-label":"Alpha","aria-valuetext":`${at(e.a*100)}%`,"aria-valuenow":at(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, ${l}, ${i})`}}),Ve.jsx(Ar,{className:"z-[1]",top:.5,left:e.a,color:""})]})})},Nd=({hue:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=We(l=>{let i=at(G1(360*l.left,0,360));t({h:i},!1)},[t]),n=We(l=>{t({h:G1(e+l.left*360,0,360)},!0)},[e,t]);return Ve.jsx("div",{className:It("relative h-full w-full",o),children:Ve.jsxs(Br,{onMove:r,onMoveEnd:a,onKey:n,"aria-label":"Hue","aria-valuenow":at(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(Ar,{className:"z-[2]",top:.5,left:e/360,color:""})]})})},Ud=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=We(i=>{let s=at(G1(i.left*100,0,100)),u=at(G1(100-i.top*100,0,100));t({s,v:u},!1)},[t]),n=We(i=>{t({s:G1(e.s+i.left*100,0,100),v:G1(e.v-i.top*100,0,100)},!0)},[e.s,e.v,t]),l=`hsl(${e.h}, 100%, 50%)`;return Ve.jsx("div",{className:It("relative h-full w-full rounded-xl",o),children:Ve.jsxs(Br,{onMove:r,onMoveEnd:a,onKey:n,"aria-label":"Color","aria-valuetext":`Saturation ${at(e.s)}%, Brightness ${at(e.v)}%`,className:"rounded-inherit h-full w-full",children:[Ve.jsx("div",{className:"rounded-inherit absolute inset-0 rounded-b-none",style:{backgroundColor:l,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(Ar,{className:"z-[3]",top:1-e.v/100,left:e.s/100,color:""})]})})},Y2=Wu(null),ea=()=>{let e=Xu(Y2);if(!e)throw new Error("ColorPicker compound components must be used within a ColorPicker");return e};function Z2(e){return"type"in e?new rt(e):e}var qd=({color:e,onChange:t,className:o,children:a,defaultColor:r,...n})=>{let[l,i]=Or(Z2(e??r??{h:340,s:58,v:100,a:1,type:"hsva"})),s=Qo(!1),u=Qo(l);Dr(()=>{!s.current&&e&&(u.current=Z2(e),i(u.current))},[e]);let d=We((C,I)=>{let f=new rt({type:"hsva",...u.current.getHsva(),...C});u.current=f,i(f),s.current=!I,t?.(f)},[t]),c=We(()=>{s.current=!1},[]),p=We(async()=>{if(!("EyeDropper"in window)){console.log("EyeDropper API not supported");return}try{let C=await new window.EyeDropper().open();C.sRGBHex&&d(ot({type:"hex",value:C.sRGBHex},"hsva"),!0)}catch(C){console.log("EyeDropper cancelled or failed:",C)}},[t]),m={hsva:l.getHsva(),updateHsva:d,handleEyeDropper:p,onFinishedUpdates:c};return Ve.jsx(Y2.Provider,{value:m,children:Ve.jsx("div",{...n,className:It("relative flex h-[280px] w-[280px] cursor-default flex-col rounded-2xl bg-white shadow-lg select-none",o),children:a})})},zd=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=ea(),r=We((n,l)=>{o(n,l)},[o]);return Ve.jsx(Ud,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},jd=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=ea(),r=We((n,l)=>{o(n,l)},[o]);return Ve.jsx(Nd,{hue:t.h,onChange:r,className:e,onFinishedUpdates:a})},Kd=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=ea(),r=We((n,l)=>{o(n,l)},[o]);return Ve.jsx($d,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},Gd=({className:e,title:t="Pick color from screen",children:o})=>{let{handleEyeDropper:a}=ea(),[r,n]=Or(!1);return Dr(()=>{typeof window<"u"&&"EyeDropper"in window&&n(!0)},[]),r?Ve.jsx("button",{onClick:a,className:It("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},At=Object.assign(qd,{Saturation:zd,Hue:jd,Alpha:Kd,EyeDropper:Gd});function Wd(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:Jo()}}var J2=(e={type:"hex",value:"#ff6b9d"})=>{let[t,o]=Or(()=>{let l=typeof e=="function"?e():e;return{color:new rt(l),type:l.type}}),a=Yo(()=>Wd(t.color,t.type),[t.color,t.type]),r=Yo(()=>{let l=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:l,alpha:l.a}},[t.color]),n=We(l=>{try{let i="type"in l?new rt(l):l;o(s=>({color:i,type:s.type}))}catch(i){console.warn("Invalid color input:",l,i)}},[]);return[{colorInput:a,colorState:r},n]};import{createPortal as T4}from"react-dom";import{useRef as P1,useMemo as Xd,useEffect as Qd,useState as Fp,useCallback as $p}from"react";function e0(e,t,o,a){var r=this,n=P1(null),l=P1(0),i=P1(0),s=P1(null),u=P1([]),d=P1(),c=P1(),p=P1(e),m=P1(!0),C=P1(),I=P1();p.current=e;var f=typeof window<"u",S=!t&&t!==0&&f;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(o=o||{}).leading,R=!("trailing"in o)||!!o.trailing,v=!!o.flushOnExit&&R,k="maxWait"in o,O="debounceOnServer"in o&&!!o.debounceOnServer,U=k?Math.max(+o.maxWait||0,t):null,M=Xd(function(){var V=function(L){var x=u.current,w=d.current;return u.current=d.current=null,l.current=L,i.current=i.current||L,c.current=p.current.apply(w,x)},z=function(L,x){S&&cancelAnimationFrame(s.current),s.current=S?requestAnimationFrame(L):setTimeout(L,x)},j=function(L){if(!m.current)return!1;var x=L-n.current;return!n.current||x>=t||x<0||k&&L-l.current>=U},W=function(L){return s.current=null,R&&u.current?V(L):(u.current=d.current=null,c.current)},Z=function L(){var x=Date.now();if(g&&i.current===l.current&&D(),j(x))return W(x);if(m.current){var w=t-(x-n.current),b=k?Math.min(w,U-(x-l.current)):w;z(L,b)}},D=function(){a&&a({})},N=function(){if(f||O){var L,x=Date.now(),w=j(x);if(u.current=[].slice.call(arguments),d.current=r,n.current=x,v&&!C.current&&(C.current=function(){var b;((b=globalThis.document)==null?void 0:b.visibilityState)==="hidden"&&I.current.flush()},(L=globalThis.document)==null||L.addEventListener==null||L.addEventListener("visibilitychange",C.current)),w){if(!s.current&&m.current)return l.current=n.current,z(Z,t),g?V(n.current):c.current;if(k)return z(Z,t),V(n.current)}return s.current||z(Z,t),c.current}};return N.cancel=function(){var L=s.current;L&&(S?cancelAnimationFrame(s.current):clearTimeout(s.current)),l.current=0,u.current=n.current=d.current=s.current=null,L&&a&&a({})},N.isPending=function(){return!!s.current},N.flush=function(){return s.current?W(Date.now()):c.current},N},[g,k,t,U,R,v,S,f,O,a]);return I.current=M,Qd(function(){return m.current=!0,function(){var V;v&&I.current.flush(),C.current&&((V=globalThis.document)==null||V.removeEventListener==null||V.removeEventListener("visibilitychange",C.current),C.current=null),m.current=!1}},[v]),M}import t1 from"react";function yt(e){let t=e?.parentNode;for(;t;){if(t instanceof ShadowRoot){t=t.host;continue}if(t instanceof HTMLElement){let{overflowY:o}=getComputedStyle(t);if(o==="auto"||o==="scroll")return t}t=t.parentNode}return null}var t0='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function o0({computePosition:e,onClose:t,autoFocus:o=!0,trapFocus:a=!1}={}){let[r,n]=t1.useState(!1),[l,i]=t1.useState({top:0,left:0}),s=t1.useRef(null),u=t1.useRef(null),d=t1.useRef(!1),c=t1.useRef(e);c.current=e;let p=t1.useRef(t);p.current=t;let m=t1.useRef(a);m.current=a;let C=t1.useCallback((...g)=>{!s.current||!c.current||i(c.current(s.current,...g))},[]),I=t1.useCallback(()=>{C(),d.current=!0,n(!0)},[C]),f=t1.useCallback(()=>{p.current&&p.current(),d.current=!1,n(!1),s.current?.focus()},[]),S=t1.useCallback(()=>{d.current?f():I()},[I,f]);return t1.useEffect(()=>{if(!r)return;let g=v=>{if(v.key==="Escape"&&(v.preventDefault(),f()),m.current&&v.key==="Tab"){let k=u.current;if(!k)return;let O=Array.from(k.querySelectorAll(t0)).filter(V=>!V.hasAttribute("disabled")),U=O[0],M=O.at(-1);if(!U||!M)return;v.shiftKey&&document.activeElement===U?(v.preventDefault(),M.focus()):!v.shiftKey&&document.activeElement===M&&(v.preventDefault(),U.focus())}},R=v=>{let k=u.current,O=s.current;if(!k||!O)return;let U=typeof v.composedPath=="function"?v.composedPath():[],M=U.includes(k)||v.target instanceof Node&&k.contains(v.target),V=U.includes(O)||v.target instanceof Node&&O.contains(v.target);!M&&!V&&f()};return document.addEventListener("keydown",g),document.addEventListener("mousedown",R),document.addEventListener("touchstart",R),()=>{document.removeEventListener("keydown",g),document.removeEventListener("mousedown",R),document.removeEventListener("touchstart",R)}},[r,f]),t1.useEffect(()=>{if(!r||!o||!u.current)return;let g=u.current.querySelector(t0);g&&g.focus()},[r,o]),t1.useEffect(()=>{if(!r||!s.current)return;let g=yt(s.current);if(!g)return;let R=()=>f();return g.addEventListener("scroll",R,{passive:!0}),()=>g.removeEventListener("scroll",R)},[r,f]),{isOpen:r,open:I,close:f,toggle:S,triggerRef:s,popoverRef:u,position:l,reposition:C}}var Yd=(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}}},ta=Yd;var Jd={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},a0=Jd;var e3=e=>ta(a0[e.toLowerCase()],6),r0=e3;var t3=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,o3=e=>{let t;return(t=e.match(t3))?ta(parseInt(t[1],16),t[1].length):void 0},n0=o3;var o1="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",eC=`(?:${o1}|none)`,Mt=`${o1}%`,tC=`(?:${o1}%|none)`,mo=`(?:${o1}%|${o1})`,a3=`(?:${o1}%|${o1}|none)`,l0=`(?:${o1}(deg|grad|rad|turn)|${o1})`,oC=`(?:${o1}(deg|grad|rad|turn)|${o1}|none)`,nt="\\s*,\\s*";var aC=new RegExp("^"+a3+"$");var r3=new RegExp(`^rgba?\\(\\s*${o1}${nt}${o1}${nt}${o1}\\s*(?:,\\s*${mo}\\s*)?\\)$`),n3=new RegExp(`^rgba?\\(\\s*${Mt}${nt}${Mt}${nt}${Mt}\\s*(?:,\\s*${mo}\\s*)?\\)$`),l3=e=>{let t={mode:"rgb"},o;if(o=e.match(r3))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},i0=l3;var i3=(e,t)=>e===void 0?void 0:typeof e!="object"?St(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,oa=i3;var s3=(e="rgb")=>t=>(t=oa(t,e))!==void 0?t.mode===e?t:T1[t.mode][e]?T1[t.mode][e](t):e==="rgb"?T1[t.mode].rgb(t):T1.rgb[e](T1[t.mode].rgb(t)):void 0,C1=s3;var T1={},s0={},go=[],Zr={},u3=e=>e,he=e=>(T1[e.mode]={...T1[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{T1[t]||(T1[t]={}),T1[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=u3)}),s0[e.mode]=e,(e.parse||[]).forEach(t=>{d3(t,e.mode)}),C1(e.mode)),aa=e=>s0[e],d3=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");Zr[e]=t}else typeof e=="function"&&go.indexOf(e)<0&&go.push(e)};var Fr=/[^\x00-\x7F]|[a-zA-Z_]/,c3=/[^\x00-\x7F]|[-\w]/,_={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},ae=0;function ra(e){let t=e[ae],o=e[ae+1];return t==="-"||t==="+"?/\d/.test(o)||o==="."&&/\d/.test(e[ae+2]):t==="."?/\d/.test(o):/\d/.test(t)}function $r(e){if(ae>=e.length)return!1;let t=e[ae];if(Fr.test(t))return!0;if(t==="-"){if(e.length-ae<2)return!1;let o=e[ae+1];return!!(o==="-"||Fr.test(o))}return!1}var f3={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function ho(e){let t="";if((e[ae]==="-"||e[ae]==="+")&&(t+=e[ae++]),t+=na(e),e[ae]==="."&&/\d/.test(e[ae+1])&&(t+=e[ae++]+na(e)),(e[ae]==="e"||e[ae]==="E")&&((e[ae+1]==="-"||e[ae+1]==="+")&&/\d/.test(e[ae+2])?t+=e[ae++]+e[ae++]+na(e):/\d/.test(e[ae+1])&&(t+=e[ae++]+na(e))),$r(e)){let o=la(e);return o==="deg"||o==="rad"||o==="turn"||o==="grad"?{type:_.Hue,value:t*f3[o]}:void 0}return e[ae]==="%"?(ae++,{type:_.Percentage,value:+t}):{type:_.Number,value:+t}}function na(e){let t="";for(;/\d/.test(e[ae]);)t+=e[ae++];return t}function la(e){let t="";for(;ae<e.length&&c3.test(e[ae]);)t+=e[ae++];return t}function p3(e){let t=la(e);return e[ae]==="("?(ae++,{type:_.Function,value:t}):t==="none"?{type:_.None,value:void 0}:{type:_.Ident,value:t}}function C3(e=""){let t=e.trim(),o=[],a;for(ae=0;ae<t.length;){if(a=t[ae++],a===`
|
|
2
|
-
`||a===" "||a===" "){for(;
|
|
3
|
-
`||t[
|
|
4
|
-
`||t[ae]===" "||t[ae]===" ");)ae++;let r;if(ra(t)&&(r=ho(t),r.type!==_.Hue)){o.push({type:_.Alpha,value:r});continue}if($r(t)&&la(t)==="none"){o.push({type:_.Alpha,value:{type:_.None,value:void 0}});continue}return}if(/\d/.test(a)){ae--,o.push(ho(t));continue}if(Fr.test(a)){ae--,o.push(p3(t));continue}return}return o}function m3(e){e._i=0;let t=e[e._i++];if(!t||t.type!==_.Function||t.value!=="color"||(t=e[e._i++],t.type!==_.Ident))return;let o=Zr[t.value];if(!o)return;let a={mode:o},r=u0(e,!1);if(!r)return;let n=aa(o).channels;for(let l=0,i,s;l<n.length;l++)i=r[l],s=n[l],i.type!==_.None&&(a[s]=i.type===_.Number?i.value:i.value/100,s==="alpha"&&(a[s]=Math.max(0,Math.min(1,a[s]))));return a}function u0(e,t){let o=[],a;for(;e._i<e.length;){if(a=e[e._i++],a.type===_.None||a.type===_.Number||a.type===_.Alpha||a.type===_.Percentage||t&&a.type===_.Hue){o.push(a);continue}if(a.type===_.ParenClose){if(e._i<e.length)return;continue}return}if(!(o.length<3||o.length>4)){if(o.length===4){if(o[3].type!==_.Alpha)return;o[3]=o[3].value}return o.length===3&&o.push({type:_.None,value:void 0}),o.every(r=>r.type!==_.Alpha)?o:void 0}}function g3(e,t){e._i=0;let o=e[e._i++];if(!o||o.type!==_.Function)return;let a=u0(e,t);if(a)return a.unshift(o.value),a}var h3=e=>{if(typeof e!="string")return;let t=C3(e),o=t?g3(t,!0):void 0,a,r=0,n=go.length;for(;r<n;)if((a=go[r++](e,o))!==void 0)return a;return t?m3(t):void 0},St=h3;function v3(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let o={mode:"rgb"},[,a,r,n,l]=t;if(!(a.type===_.Hue||r.type===_.Hue||n.type===_.Hue))return a.type!==_.None&&(o.r=a.type===_.Number?a.value/255:a.value/100),r.type!==_.None&&(o.g=r.type===_.Number?r.value/255:r.value/100),n.type!==_.None&&(o.b=n.type===_.Number?n.value/255:n.value/100),l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var d0=v3;var x3=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,c0=x3;var f0=(e,t,o)=>e+o*(t-e);var L3=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},p0=e=>t=>{let o=L3(t);return a=>{let r=a*o.length,n=a>=1?o.length-1:Math.max(Math.floor(r),0),l=o[n];return l===void 0?void 0:e(l[0],l[1],r-n)}};var E=p0(f0);var fe=e=>{let t=!1,o=e.map(a=>a!==void 0?(t=!0,a):1);return t?o:e};var w3={mode:"rgb",channels:["r","g","b","alpha"],parse:[d0,n0,i0,r0,c0,"srgb"],serialize:"srgb",interpolate:{r:E,g:E,b:E,alpha:{use:E,fixup:fe}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},L1=w3;var Nr=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),b3=e=>{let t=Nr(e.r),o=Nr(e.g),a=Nr(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},Ur=b3;var qr=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),I3=({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:qr(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*o),g:qr(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*o),b:qr(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*o)};return a!==void 0&&(r.alpha=a),r},zr=I3;var jr=(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)},y3=({r:e,g:t,b:o,alpha:a})=>{let r={mode:"lrgb",r:jr(e),g:jr(t),b:jr(o)};return a!==void 0&&(r.alpha=a),r},w1=y3;var M3=e=>{let{r:t,g:o,b:a,alpha:r}=w1(e),n={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&&(n.alpha=r),n},s1=M3;var Kr=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},S3=({r:e,g:t,b:o,alpha:a},r="rgb")=>{let n={mode:r,r:Kr(e),g:Kr(t),b:Kr(o)};return a!==void 0&&(n.alpha=a),n},b1=S3;var R3=({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=b1({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},u1=R3;var k3={...L1,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>zr(s1(e)),xyz65:zr},toMode:{rgb:e=>u1(Ur(e)),xyz65:Ur}},C0=k3;var H3=e=>(e=e%360)<0?e+360:e,we=H3;var P3=(e,t)=>e.map((o,a,r)=>{if(o===void 0)return o;let n=we(o);return a===0||e[a-1]===void 0?n:t(n-we(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),[]),qe=e=>P3(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var Ee=[-.14861,1.78277,-.29227,-.90649,1.97294,0],m0=Math.PI/180,g0=180/Math.PI;var h0=Ee[3]*Ee[4],v0=Ee[1]*Ee[4],x0=Ee[1]*Ee[2]-Ee[0]*Ee[3],T3=({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=(x0*o+e*h0-t*v0)/(x0+h0-v0),n=o-r,l=(Ee[4]*(t-r)-Ee[2]*n)/Ee[3],i={mode:"cubehelix",l:r,s:r===0||r===1?void 0:Math.sqrt(n*n+l*l)/(Ee[4]*r*(1-r))};return i.s&&(i.h=Math.atan2(l,n)*g0-120),a!==void 0&&(i.alpha=a),i},L0=T3;var V3=({h:e,s:t,l:o,alpha:a})=>{let r={mode:"rgb"};e=(e===void 0?0:e+120)*m0,o===void 0&&(o=0);let n=t===void 0?0:t*o*(1-o),l=Math.cos(e),i=Math.sin(e);return r.r=o+n*(Ee[0]*l+Ee[1]*i),r.g=o+n*(Ee[2]*l+Ee[3]*i),r.b=o+n*(Ee[4]*l+Ee[5]*i),a!==void 0&&(r.alpha=a),r},w0=V3;var lt=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let o=we(e.h),a=we(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*r},b0=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let o=we(e.h),a=we(t.h);return Math.abs(a-o)>180?o-(a-360*Math.sign(a-o)):a-o},it=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let o=we(e.h),a=we(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*r};var ze=e=>{let t=e.reduce((a,r)=>{if(r!==void 0){let n=r*Math.PI/180;a.sin+=Math.sin(n),a.cos+=Math.cos(n)}return a},{sin:0,cos:0}),o=Math.atan2(t.sin,t.cos)*180/Math.PI;return o<0?360+o:o};var _3={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:L0},toMode:{rgb:w0},interpolate:{h:{use:E,fixup:qe},s:E,l:E,alpha:{use:E,fixup:fe}},difference:{h:lt},average:{h:ze}},I0=_3;var D3=({l:e,a:t,b:o,alpha:a},r="lch")=>{t===void 0&&(t=0),o===void 0&&(o=0);let n=Math.sqrt(t*t+o*o),l={mode:r,l:e,c:n};return n&&(l.h=we(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},m1=D3;var O3=({l:e,c:t,h:o,alpha:a},r="lab")=>{o===void 0&&(o=0);let n={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&&(n.alpha=a),n},g1=O3;var ia=Math.pow(29,3)/Math.pow(3,3),sa=Math.pow(6,3)/Math.pow(29,3);var Re={X:.9642956764295677,Y:1,Z:.8251046025104602},st={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},gm=Math.pow(29,3)/Math.pow(3,3),hm=Math.pow(6,3)/Math.pow(29,3);var Gr=e=>Math.pow(e,3)>sa?Math.pow(e,3):(116*e-16)/ia,E3=({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,n=t/500+r,l=r-o/200,i={mode:"xyz65",x:Gr(n)*st.X,y:Gr(r)*st.Y,z:Gr(l)*st.Z};return a!==void 0&&(i.alpha=a),i},ua=E3;var B3=e=>u1(ua(e)),ut=B3;var Wr=e=>e>sa?Math.cbrt(e):(ia*e+16)/116,A3=({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=Wr(e/st.X),n=Wr(t/st.Y),l=Wr(o/st.Z),i={mode:"lab65",l:116*n-16,a:500*(r-n),b:200*(n-l)};return a!==void 0&&(i.alpha=a),i},da=A3;var Z3=e=>{let t=da(s1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},dt=Z3;var Rt=.14444444444444443*Math.PI,Zt=Math.cos(Rt),Ft=Math.sin(Rt),ca=100/Math.log(139/100);var F3=({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/ca)-1)/.0039},n=(Math.exp(.0435*t*1*1)-1)/.075,l=n*Math.cos(o/180*Math.PI-Rt),i=n*Math.sin(o/180*Math.PI-Rt);return r.a=l*Zt-i/.83*Ft,r.b=l*Ft+i/.83*Zt,a!==void 0&&(r.alpha=a),r},xo=F3;var $3=({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*Zt+o*Ft,n=.83*(o*Zt-t*Ft),l=Math.sqrt(r*r+n*n),i={mode:"dlch",l:ca/1*Math.log(1+.0039*e),c:Math.log(1+.075*l)/(.0435*1*1)};return i.c&&(i.h=we((Math.atan2(n,r)+Rt)/Math.PI*180)),a!==void 0&&(i.alpha=a),i},Lo=$3;var y0=e=>xo(m1(e,"dlch")),M0=e=>g1(Lo(e),"dlab"),N3={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:y0,rgb:e=>ut(y0(e))},fromMode:{lab65:M0,rgb:e=>M0(dt(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:fe}}},S0=N3;var U3={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:xo,dlab:e=>g1(e,"dlab"),rgb:e=>ut(xo(e))},fromMode:{lab65:Lo,dlab:e=>m1(e,"dlch"),rgb:e=>Lo(dt(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:qe},alpha:{use:E,fixup:fe}},difference:{h:it},average:{h:ze}},R0=U3;function Qr({h:e,s:t,i:o,alpha:a}){e=we(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),n;switch(Math.floor(e/60)){case 0:n={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:n={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:n={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:n={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:n={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:n={r:o*(1+t*(3/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;default:n={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return n.mode="rgb",a!==void 0&&(n.alpha=a),n}function Yr({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),n=Math.min(e,t,o),l={mode:"hsi",s:e+t+o===0?0:1-3*n/(e+t+o),i:(e+t+o)/3};return r-n!==0&&(l.h=(r===e?(t-o)/(r-n)+(t<o)*6:r===t?(o-e)/(r-n)+2:(e-t)/(r-n)+4)*60),a!==void 0&&(l.alpha=a),l}var q3={mode:"hsi",toMode:{rgb:Qr},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Yr},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:E,fixup:qe},s:E,i:E,alpha:{use:E,fixup:fe}},difference:{h:lt},average:{h:ze}},k0=q3;function Jr({h:e,s:t,l:o,alpha:a}){e=we(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=o+t*(o<.5?o:1-o),n=r-(r-o)*2*Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r,g:n,b:2*o-r};break;case 1:l={r:n,g:r,b:2*o-r};break;case 2:l={r:2*o-r,g:r,b:n};break;case 3:l={r:2*o-r,g:n,b:r};break;case 4:l={r:n,g:2*o-r,b:r};break;case 5:l={r,g:2*o-r,b:n};break;default:l={r:2*o-r,g:2*o-r,b:2*o-r}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function en({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),n=Math.min(e,t,o),l={mode:"hsl",s:r===n?0:(r-n)/(1-Math.abs(r+n-1)),l:.5*(r+n)};return r-n!==0&&(l.h=(r===e?(t-o)/(r-n)+(t<o)*6:r===t?(o-e)/(r-n)+2:(e-t)/(r-n)+4)*60),a!==void 0&&(l.alpha=a),l}var z3=(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}},H0=z3;var j3=new RegExp(`^hsla?\\(\\s*${l0}${nt}${Mt}${nt}${Mt}\\s*(?:,\\s*${mo}\\s*)?\\)$`),K3=e=>{let t=e.match(j3);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=H0(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},P0=K3;function G3(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let o={mode:"hsl"},[,a,r,n,l]=t;if(a.type!==_.None){if(a.type===_.Percentage)return;o.h=a.value}if(r.type!==_.None){if(r.type===_.Hue)return;o.s=r.value/100}if(n.type!==_.None){if(n.type===_.Hue)return;o.l=n.value/100}return l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var T0=G3;var W3={mode:"hsl",toMode:{rgb:Jr},fromMode:{rgb:en},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[T0,P0],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:qe},s:E,l:E,alpha:{use:E,fixup:fe}},difference:{h:lt},average:{h:ze}},fa=W3;function wo({h:e,s:t,v:o,alpha:a}){e=we(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),n;switch(Math.floor(e/60)){case 0:n={r:o,g:o*(1-t*r),b:o*(1-t)};break;case 1:n={r:o*(1-t*r),g:o,b:o*(1-t)};break;case 2:n={r:o*(1-t),g:o,b:o*(1-t*r)};break;case 3:n={r:o*(1-t),g:o*(1-t*r),b:o};break;case 4:n={r:o*(1-t*r),g:o*(1-t),b:o};break;case 5:n={r:o,g:o*(1-t),b:o*(1-t*r)};break;default:n={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return n.mode="rgb",a!==void 0&&(n.alpha=a),n}function bo({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),n=Math.min(e,t,o),l={mode:"hsv",s:r===0?0:1-n/r,v:r};return r-n!==0&&(l.h=(r===e?(t-o)/(r-n)+(t<o)*6:r===t?(o-e)/(r-n)+2:(e-t)/(r-n)+4)*60),a!==void 0&&(l.alpha=a),l}var X3={mode:"hsv",toMode:{rgb:wo},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:bo},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:E,fixup:qe},s:E,v:E,alpha:{use:E,fixup:fe}},difference:{h:lt},average:{h:ze}},pa=X3;function tn({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 wo({h:e,s:o===1?1:1-t/(1-o),v:1-o,alpha:a})}function on(e){let t=bo(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 Q3(e,t){if(!t||t[0]!=="hwb")return;let o={mode:"hwb"},[,a,r,n,l]=t;if(a.type!==_.None){if(a.type===_.Percentage)return;o.h=a.value}if(r.type!==_.None){if(r.type===_.Hue)return;o.w=r.value/100}if(n.type!==_.None){if(n.type===_.Hue)return;o.b=n.value/100}return l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var V0=Q3;var Y3={mode:"hwb",toMode:{rgb:tn},fromMode:{rgb:on},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[V0],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:qe},w:E,b:E,alpha:{use:E,fixup:fe}},difference:{h:b0},average:{h:ze}},_0=Y3;var $t=.1593017578125,D0=78.84375,Nt=.8359375,Ut=18.8515625,qt=18.6875;function Ca(e){if(e<0)return 0;let t=Math.pow(e,1/D0);return 1e4*Math.pow(Math.max(0,t-Nt)/(Ut-qt*t),1/$t)}function ma(e){if(e<0)return 0;let t=Math.pow(e/1e4,$t);return Math.pow((Nt+Ut*t)/(1+qt*t),D0)}var an=e=>Math.max(e/203,0),e7=({i:e,t,p:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Ca(e+.008609037037932761*t+.11102962500302593*o),n=Ca(e-.00860903703793275*t-.11102962500302599*o),l=Ca(e+.5600313357106791*t-.32062717498731885*o),i={mode:"xyz65",x:an(2.070152218389422*r-1.3263473389671556*n+.2066510476294051*l),y:an(.3647385209748074*r+.680566024947227*n-.0453045459220346*l),z:an(-.049747207535812*r-.0492609666966138*n+1.1880659249923042*l)};return a!==void 0&&(i.alpha=a),i},rn=e7;var nn=(e=0)=>Math.max(e*203,0),t7=({x:e,y:t,z:o,alpha:a})=>{let r=nn(e),n=nn(t),l=nn(o),i=ma(.3592832590121217*r+.6976051147779502*n-.0358915932320289*l),s=ma(-.1920808463704995*r+1.1004767970374323*n+.0753748658519118*l),u=ma(.0070797844607477*r+.0748396662186366*n+.8433265453898765*l),d=.5*i+.5*s,c=1.61376953125*i-3.323486328125*s+1.709716796875*u,p=4.378173828125*i-4.24560546875*s-.132568359375*u,m={mode:"itp",i:d,t:c,p};return a!==void 0&&(m.alpha=a),m},ln=t7;var o7={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:rn,rgb:e=>u1(rn(e))},fromMode:{xyz65:ln,rgb:e=>ln(s1(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:E,t:E,p:E,alpha:{use:E,fixup:fe}}},O0=o7;var a7=134.03437499999998,r7=16295499532821565e-27,sn=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,$t);return Math.pow((Nt+Ut*t)/(1+qt*t),a7)},un=(e=0)=>Math.max(e*203,0),n7=({x:e,y:t,z:o,alpha:a})=>{e=un(e),t=un(t),o=un(o);let r=1.15*e-.15*o,n=.66*t+.34*e,l=sn(.41478972*r+.579999*n+.014648*o),i=sn(-.20151*r+1.120649*n+.0531008*o),s=sn(-.0166008*r+.2648*n+.6684799*o),u=(l+i)/2,d={mode:"jab",j:.44*u/(1-.56*u)-r7,a:3.524*l-4.066708*i+.542708*s,b:.199076*l+1.096799*i-1.295875*s};return a!==void 0&&(d.alpha=a),d},ga=n7;var l7=134.03437499999998,E0=16295499532821565e-27,dn=e=>{if(e<0)return 0;let t=Math.pow(e,1/l7);return 1e4*Math.pow((Nt-t)/(qt*t-Ut),1/$t)},cn=e=>e/203,i7=({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+E0)/(.44+.56*(e+E0)),n=dn(r+.13860504*t+.058047316*o),l=dn(r-.13860504*t-.058047316*o),i=dn(r-.096019242*t-.8118919*o),s={mode:"xyz65",x:cn(1.661373024652174*n-.914523081304348*l+.23136208173913045*i),y:cn(-.3250758611844533*n+1.571847026732543*l-.21825383453227928*i),z:cn(-.090982811*n-.31272829*l+1.5227666*i)};return a!==void 0&&(s.alpha=a),s},ha=i7;var s7=e=>{let t=ga(s1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},va=s7;var u7=e=>u1(ha(e)),xa=u7;var d7={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:va,xyz65:ga},toMode:{rgb:xa,xyz65:ha},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:E,a:E,b:E,alpha:{use:E,fixup:fe}}},B0=d7;var c7=({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),n={mode:"jch",j:e,c:r};return r&&(n.h=we(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(n.alpha=a),n},fn=c7;var f7=({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},pn=f7;var p7={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:pn,rgb:e=>xa(pn(e))},fromMode:{rgb:e=>fn(va(e)),jab:fn},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:E,fixup:qe},c:E,j:E,alpha:{use:E,fixup:fe}},difference:{h:it},average:{h:ze}},A0=p7;var ct=Math.pow(29,3)/Math.pow(3,3),zt=Math.pow(6,3)/Math.pow(29,3);var Cn=e=>Math.pow(e,3)>zt?Math.pow(e,3):(116*e-16)/ct,C7=({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,n=t/500+r,l=r-o/200,i={mode:"xyz50",x:Cn(n)*Re.X,y:Cn(r)*Re.Y,z:Cn(l)*Re.Z};return a!==void 0&&(i.alpha=a),i},jt=C7;var m7=({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=b1({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},E1=m7;var g7=e=>E1(jt(e)),La=g7;var h7=e=>{let{r:t,g:o,b:a,alpha:r}=w1(e),n={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&&(n.alpha=r),n},B1=h7;var mn=e=>e>zt?Math.cbrt(e):(ct*e+16)/116,v7=({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=mn(e/Re.X),n=mn(t/Re.Y),l=mn(o/Re.Z),i={mode:"lab",l:116*n-16,a:500*(r-n),b:200*(n-l)};return a!==void 0&&(i.alpha=a),i},Kt=v7;var x7=e=>{let t=Kt(B1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},wa=x7;function L7(e,t){if(!t||t[0]!=="lab")return;let o={mode:"lab"},[,a,r,n,l]=t;if(!(a.type===_.Hue||r.type===_.Hue||n.type===_.Hue))return a.type!==_.None&&(o.l=Math.min(Math.max(0,a.value),100)),r.type!==_.None&&(o.a=r.type===_.Number?r.value:r.value*125/100),n.type!==_.None&&(o.b=n.type===_.Number?n.value:n.value*125/100),l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var Z0=L7;var w7={mode:"lab",toMode:{xyz50:jt,rgb:La},fromMode:{xyz50:Kt,rgb:wa},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Z0],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:fe}}},Gt=w7;var b7={...Gt,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:ua,rgb:ut},fromMode:{xyz65:da,rgb:dt},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},F0=b7;function I7(e,t){if(!t||t[0]!=="lch")return;let o={mode:"lch"},[,a,r,n,l]=t;if(a.type!==_.None){if(a.type===_.Hue)return;o.l=Math.min(Math.max(0,a.value),100)}if(r.type!==_.None&&(o.c=Math.max(0,r.type===_.Number?r.value:r.value*150/100)),n.type!==_.None){if(n.type===_.Percentage)return;o.h=n.value}return l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var $0=I7;var y7={mode:"lch",toMode:{lab:g1,rgb:e=>La(g1(e))},fromMode:{rgb:e=>m1(wa(e)),lab:m1},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[$0],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:qe},c:E,l:E,alpha:{use:E,fixup:fe}},difference:{h:it},average:{h:ze}},Wt=y7;var M7={...Wt,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>g1(e,"lab65"),rgb:e=>ut(g1(e,"lab65"))},fromMode:{rgb:e=>m1(dt(e),"lch65"),lab65:e=>m1(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},N0=M7;var S7=({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),n={mode:"lchuv",l:e,c:r};return r&&(n.h=we(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(n.alpha=a),n},gn=S7;var R7=({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},hn=R7;var U0=(e,t,o)=>4*e/(e+15*t+3*o),q0=(e,t,o)=>9*t/(e+15*t+3*o),k7=U0(Re.X,Re.Y,Re.Z),H7=q0(Re.X,Re.Y,Re.Z),P7=e=>e<=zt?ct*e:116*Math.cbrt(e)-16,T7=({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=P7(t/Re.Y),n=U0(e,t,o),l=q0(e,t,o);!isFinite(n)||!isFinite(l)?r=n=l=0:(n=13*r*(n-k7),l=13*r*(l-H7));let i={mode:"luv",l:r,u:n,v:l};return a!==void 0&&(i.alpha=a),i},Io=T7;var V7=(e,t,o)=>4*e/(e+15*t+3*o),_7=(e,t,o)=>9*t/(e+15*t+3*o),D7=V7(Re.X,Re.Y,Re.Z),O7=_7(Re.X,Re.Y,Re.Z),E7=({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)+D7,n=o/(13*e)+O7,l=Re.Y*(e<=8?e/ct:Math.pow((e+16)/116,3)),i=l*(9*r)/(4*n),s=l*(12-3*r-20*n)/(4*n),u={mode:"xyz50",x:i,y:l,z:s};return a!==void 0&&(u.alpha=a),u},yo=E7;var B7=e=>gn(Io(B1(e))),A7=e=>E1(yo(hn(e))),Z7={mode:"lchuv",toMode:{luv:hn,rgb:A7},fromMode:{rgb:B7,luv:gn},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:qe},c:E,l:E,alpha:{use:E,fixup:fe}},difference:{h:it},average:{h:ze}},z0=Z7;var F7={...L1,mode:"lrgb",toMode:{rgb:b1},fromMode:{rgb:w1},parse:["srgb-linear"],serialize:"srgb-linear"},j0=F7;var $7={mode:"luv",toMode:{xyz50:yo,rgb:e=>E1(yo(e))},fromMode:{xyz50:Io,rgb:e=>Io(B1(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:fe}}},K0=$7;var N7=({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),n=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*o),l=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*o),i={mode:"oklab",l:.210454268309314*r+.7936177747023054*n-.0040720430116193*l,a:1.9779985324311684*r-2.42859224204858*n+.450593709617411*l,b:.0259040424655478*r+.7827717124575296*n-.8086757549230774*l};return a!==void 0&&(i.alpha=a),i},ba=N7;var U7=e=>{let t=ba(w1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ft=U7;var 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=Math.pow(e+.3963377773761749*t+.2158037573099136*o,3),n=Math.pow(e-.1055613458156586*t-.0638541728258133*o,3),l=Math.pow(e-.0894841775298119*t-1.2914855480194092*o,3),i={mode:"lrgb",r:4.076741636075957*r-3.3077115392580616*n+.2309699031821044*l,g:-1.2684379732850317*r+2.6097573492876887*n-.3413193760026573*l,b:-.0041960761386756*r-.7034186179359362*n+1.7076146940746117*l};return a!==void 0&&(i.alpha=a),i},A1=q7;var z7=e=>b1(A1(e)),pt=z7;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 kt(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function j7(e,t){let o,a,r,n,l,i,s,u;-1.88170328*e-.80936493*t>1?(o=1.19086277,a=1.76576728,r=.59662641,n=.75515197,l=.56771245,i=4.0767416621,s=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(o=.73956515,a=-.45954404,r=.08285427,n=.1254107,l=.14503204,i=-1.2684380046,s=2.6097574011,u=-.3413193965):(o=1.35733652,a=-.00915799,r=-1.1513021,n=-.50559606,l=.00692167,i=-.0041960863,s=-.7034186147,u=1.707614701);let d=o+a*e+r*t+n*e*e+l*e*t,c=.3963377774*e+.2158037573*t,p=-.1055613458*e-.0638541728*t,m=-.0894841775*e-1.291485548*t;{let C=1+d*c,I=1+d*p,f=1+d*m,S=C*C*C,g=I*I*I,R=f*f*f,v=3*c*C*C,k=3*p*I*I,O=3*m*f*f,U=6*c*c*C,M=6*p*p*I,V=6*m*m*f,z=i*S+s*g+u*R,j=i*v+s*k+u*O,W=i*U+s*M+u*V;d=d-z*j/(j*j-.5*z*W)}return d}function vn(e,t){let o=j7(e,t),a=A1({l:1,a:o*e,b:o*t}),r=Math.cbrt(1/Math.max(a.r,a.g,a.b)),n=r*o;return[r,n]}function K7(e,t,o,a,r,n=null){n||(n=vn(e,t));let l;if((o-r)*n[1]-(n[0]-r)*a<=0)l=n[1]*r/(a*n[0]+n[1]*(r-o));else{l=n[1]*(r-1)/(a*(n[0]-1)+n[1]*(r-o));{let i=o-r,s=a,u=.3963377774*e+.2158037573*t,d=-.1055613458*e-.0638541728*t,c=-.0894841775*e-1.291485548*t,p=i+s*u,m=i+s*d,C=i+s*c;{let I=r*(1-l)+l*o,f=l*a,S=I+f*u,g=I+f*d,R=I+f*c,v=S*S*S,k=g*g*g,O=R*R*R,U=3*p*S*S,M=3*m*g*g,V=3*C*R*R,z=6*p*p*S,j=6*m*m*g,W=6*C*C*R,Z=4.0767416621*v-3.3077115913*k+.2309699292*O-1,D=4.0767416621*U-3.3077115913*M+.2309699292*V,N=4.0767416621*z-3.3077115913*j+.2309699292*W,L=D/(D*D-.5*Z*N),x=-Z*L,w=-1.2684380046*v+2.6097574011*k-.3413193965*O-1,b=-1.2684380046*U+2.6097574011*M-.3413193965*V,P=-1.2684380046*z+2.6097574011*j-.3413193965*W,h=b/(b*b-.5*w*P),H=-w*h,q=-.0041960863*v-.7034186147*k+1.707614701*O-1,A=-.0041960863*U-.7034186147*M+1.707614701*V,F=-.0041960863*z-.7034186147*j+1.707614701*W,$=A/(A*A-.5*q*F),T=-q*$;x=L>=0?x:1e6,H=h>=0?H:1e6,T=$>=0?T:1e6,l+=Math.min(x,Math.min(H,T))}}}return l}function So(e,t,o=null){o||(o=vn(e,t));let a=o[0],r=o[1];return[r/a,r/(1-a)]}function Ia(e,t,o){let a=vn(t,o),r=K7(t,o,e,1,e,a),n=So(t,o,a),l=.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*n[0],(1-e)*n[1]),u=e*l,d=(1-e)*i,c=.9*s*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(d*d*d*d))));return u=e*.4,d=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(d*d))),c,r]}function ya(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 n=Math.sqrt(o*o+a*a);if(!n)return r.s=0,r;let[l,i,s]=Ia(t,o/n,a/n),u;if(n<i){let d=0,c=.8*l,p=1-c/i;u=(n-d)/(c+p*(n-d))*.8}else{let d=i,c=.2*i*i*1.25*1.25/l,p=1-c/(s-i);u=.8+.2*((n-d)/(c+p*(n-d)))}return u&&(r.s=u,r.h=we(Math.atan2(a,o)*180/Math.PI)),r}function Ma(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:kt(a)};if(e.alpha!==void 0&&(r.alpha=e.alpha),!o||a===1)return r.a=r.b=0,r;let n=Math.cos(t/180*Math.PI),l=Math.sin(t/180*Math.PI),[i,s,u]=Ia(r.l,n,l),d,c,p,m;o<.8?(d=1.25*o,c=0,p=.8*i,m=1-p/s):(d=5*(o-.8),c=s,p=.2*s*s*1.25*1.25/i,m=1-p/(u-s));let C=c+d*p/(1-m*d);return r.a=C*n,r.b=C*l,r}var G7={...fa,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:ya,rgb:e=>ya(ft(e))},toMode:{oklab:Ma,rgb:e=>pt(Ma(e))}},G0=G7;function Sa(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),n=r?o/r:1,l=r?a/r:1,[i,s]=So(n,l),u=.5,d=1-u/i,c=s/(r+t*s),p=c*t,m=c*r,C=kt(p),I=m*C/p,f=A1({l:C,a:n*I,b:l*I}),S=Math.cbrt(1/Math.max(f.r,f.g,f.b,0));t=t/S,r=r/S*Mo(t)/t,t=Mo(t);let g={mode:"okhsv",s:r?(u+s)*m/(s*u+s*d*m):0,v:t?t/p:0};return g.s&&(g.h=we(Math.atan2(a,o)*180/Math.PI)),e.alpha!==void 0&&(g.alpha=e.alpha),g}function Ra(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,n=Math.cos(o/180*Math.PI),l=Math.sin(o/180*Math.PI),[i,s]=So(n,l),u=.5,d=1-u/i,c=1-a*u/(u+s-s*d*a),p=a*s*u/(u+s-s*d*a),m=kt(c),C=p*m/c,I=A1({l:m,a:n*C,b:l*C}),f=Math.cbrt(1/Math.max(I.r,I.g,I.b,0)),S=kt(r*c),g=p*S/c;return t.l=S*f,t.a=g*n*f,t.b=g*l*f,t}var W7={...pa,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Sa,rgb:e=>Sa(ft(e))},toMode:{oklab:Ra,rgb:e=>pt(Ra(e))}},W0=W7;function X7(e,t){if(!t||t[0]!=="oklab")return;let o={mode:"oklab"},[,a,r,n,l]=t;if(!(a.type===_.Hue||r.type===_.Hue||n.type===_.Hue))return a.type!==_.None&&(o.l=Math.min(Math.max(0,a.type===_.Number?a.value:a.value/100),1)),r.type!==_.None&&(o.a=r.type===_.Number?r.value:r.value*.4/100),n.type!==_.None&&(o.b=n.type===_.Number?n.value:n.value*.4/100),l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var X0=X7;var Q7={...Gt,mode:"oklab",toMode:{lrgb:A1,rgb:pt},fromMode:{lrgb:ba,rgb:ft},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[X0],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}`:""})`},Q0=Q7;function Y7(e,t){if(!t||t[0]!=="oklch")return;let o={mode:"oklch"},[,a,r,n,l]=t;if(a.type!==_.None){if(a.type===_.Hue)return;o.l=Math.min(Math.max(0,a.type===_.Number?a.value:a.value/100),1)}if(r.type!==_.None&&(o.c=Math.max(0,r.type===_.Number?r.value:r.value*.4/100)),n.type!==_.None){if(n.type===_.Percentage)return;o.h=n.value}return l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var Y0=Y7;var J7={...Wt,mode:"oklch",toMode:{oklab:e=>g1(e,"oklab"),rgb:e=>pt(g1(e,"oklab"))},fromMode:{rgb:e=>m1(ft(e),"oklch"),oklab:e=>m1(e,"oklch")},parse:[Y0],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]}},J0=J7;var e4=e=>{let{r:t,g:o,b:a,alpha:r}=w1(e),n={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&&(n.alpha=r),n},xn=e4;var t4=({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=b1({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},Ln=t4;var o4={...L1,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>Ln(s1(e)),xyz65:Ln},toMode:{rgb:e=>u1(xn(e)),xyz65:xn}},ei=o4;var wn=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},a4=({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:wn(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*o),g:wn(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*o),b:wn(e*0+t*0+1.2119675456389452*o)};return a!==void 0&&(r.alpha=a),r},bn=a4;var In=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},r4=e=>{let t=In(e.r),o=In(e.g),a=In(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},yn=r4;var n4={...L1,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:bn,rgb:e=>bn(B1(e))},toMode:{xyz50:yn,rgb:e=>E1(yn(e))}},ti=n4;var oi=1.09929682680944,l4=.018053968510807,Mn=e=>{let t=Math.abs(e);return t>l4?(Math.sign(e)||1)*(oi*Math.pow(t,.45)-(oi-1)):4.5*e},i4=({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:Mn(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*o),g:Mn(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*o),b:Mn(e*.0176398574453108-t*.0427706132578085+.9421031212354739*o)};return a!==void 0&&(r.alpha=a),r},Sn=i4;var ai=1.09929682680944,s4=.018053968510807,Rn=(e=0)=>{let t=Math.abs(e);return t<s4*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+ai-1)/ai,1/.45)},u4=e=>{let t=Rn(e.r),o=Rn(e.g),a=Rn(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},kn=u4;var d4={...L1,mode:"rec2020",fromMode:{xyz65:Sn,rgb:e=>Sn(s1(e))},toMode:{xyz65:kn,rgb:e=>u1(kn(e))},parse:["rec2020"],serialize:"rec2020"},ri=d4;var W1=.0037930732552754493,ka=Math.cbrt(W1);var Hn=e=>Math.cbrt(e)-ka,c4=e=>{let{r:t,g:o,b:a,alpha:r}=w1(e),n=Hn(.3*t+.622*o+.078*a+W1),l=Hn(.23*t+.692*o+.078*a+W1),i=Hn(.2434226892454782*t+.2047674442449682*o+.5518098665095535*a+W1),s={mode:"xyb",x:(n-l)/2,y:(n+l)/2,b:i-(n+l)/2};return r!==void 0&&(s.alpha=r),s},ni=c4;var Pn=e=>Math.pow(e+ka,3),f4=({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=Pn(e+t)-W1,n=Pn(t-e)-W1,l=Pn(o+t)-W1,i=b1({r:11.031566904639861*r-9.866943908131562*n-.16462299650829934*l,g:-3.2541473810744237*r+4.418770377582723*n-.16462299650829934*l,b:-3.6588512867136815*r+2.7129230459360922*n+1.9459282407775895*l});return a!==void 0&&(i.alpha=a),i},li=f4;var p4={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:li},fromMode:{rgb:ni},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:E,y:E,b:E,alpha:{use:E,fixup:fe}}},ii=p4;var C4={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:E1,lab:Kt},fromMode:{rgb:B1,lab:jt},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:fe}}},si=C4;var m4=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 n={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&&(n.alpha=r),n},ui=m4;var g4=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 n={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&&(n.alpha=r),n},di=g4;var h4={mode:"xyz65",toMode:{rgb:u1,xyz50:ui},fromMode:{rgb:s1,xyz50:di},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:fe}}},ci=h4;var v4=({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},fi=v4;var x4=({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},pi=x4;var L4={mode:"yiq",toMode:{rgb:pi},fromMode:{rgb:fi},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:fe}}},Ci=L4;var w4=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,b4=(e=4)=>t=>typeof t=="number"?w4(t,e):t,Ro=b4;var Dw=Ro(2);var Ow=C1("rgb"),Ew=C1("hsl");var Tn=e=>{let t=oa(e);if(!t)return;let o=aa(t.mode);if(!o.serialize||typeof o.serialize=="string"){let a=`color(${o.serialize||`--${t.mode}`} `;return o.channels.forEach((r,n)=>{r!=="alpha"&&(a+=(n?" ":"")+(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 Ib=he(C0),yb=he(I0),Mb=he(S0),Sb=he(R0),Rb=he(k0),kb=he(fa),Hb=he(pa),Pb=he(_0),Tb=he(O0),Vb=he(B0),_b=he(A0),Db=he(Gt),Ob=he(F0),Eb=he(Wt),Bb=he(N0),Ab=he(z0),Zb=he(j0),Fb=he(K0),$b=he(G0),Nb=he(W0),Ub=he(Q0),qb=he(J0),zb=he(ei),jb=he(ti),Kb=he(ri),Gb=he(L1),Wb=he(ii),Xb=he(si),Qb=he(ci),Yb=he(Ci);var _n=C1("rgb"),I4=C1("hsl"),y4=C1("oklch"),M4=C1("oklab"),S4=C1("lch"),R4=C1("lab"),k4=Ro(3),Vn=null;function H4(){return Vn??(Vn=document.createElement("canvas").getContext("2d")),Vn}function mi(e){try{let t=H4();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 gi(e){if(!e||typeof e!="string")return!1;let t=e.trim();return St(t)!==void 0?!0:mi(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 n=_n(a);if(n&&"r"in n&&"g"in n&&"b"in n)return{r:Math.round(Math.min(255,Math.max(0,n.r*255))),g:Math.round(Math.min(255,Math.max(0,n.g*255))),b:Math.round(Math.min(255,Math.max(0,n.b*255))),a:n.alpha??1}}let r=mi(o);if(r){if(r.startsWith("#")){let l=r.slice(1);return{r:parseInt(l.slice(0,2),16),g:parseInt(l.slice(2,4),16),b:parseInt(l.slice(4,6),16),a:1}}let n=r.match(/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(n&&n[1]!=null&&n[2]!=null&&n[3]!=null)return{r:+n[1],g:+n[2],b:+n[3],a:n[4]!=null?+n[4]:1}}return t}var P4=new Set(["initial","inherit","unset","revert","revert-layer"]);function Ha(e){return P4.has((e??"").trim().toLowerCase())}function hi(e){let t=(e??"").trim();if(t===""||Ha(t))return!1;let o=t.toLowerCase();return o!=="currentcolor"&&!o.includes("var(")}function Xt(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 ko(e){let t=e.startsWith("#")?e.slice(1):e;return/^[0-9a-fA-F]+$/.test(t)&&[3,4,6,8].includes(t.length)}function Ho(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)),n=`#${[t,o,a].map(l=>l.toString(16).padStart(2,"0")).join("")}`;return r<1?n+Math.round(r*255).toString(16).padStart(2,"0"):n}function vi(e){return!e||typeof e!="string"?"rgb":St(e.trim())?.mode??"rgb"}function d1(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 y4(o);case"oklab":return M4(o);case"lch":return S4(o);case"lab":return R4(o);default:return o}}function Dn(e){let t=e?_n(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 On(e){if(!e)return"";let t={...e},o=t;for(let a of Object.keys(o)){let r=o[a];typeof r=="number"&&(o[a]=k4(r))}return Tn(t)}function Po(e){let t={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255},o=I4(t);return o?{h:o.h??0,s:o.s*100,l:o.l*100}:{h:0,s:0,l:0}}function En(e){let t={mode:"hsl",h:e.h,s:e.s/100,l:e.l/100},o=_n(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)}}function Bn(e){let t=(e??"").trim();return t===""||t.toLowerCase()==="none"||Ha(t)?"":t}function _1(e){return Bn(e)!==""}function Pa(e){return(e??"").trim().toLowerCase()==="text"}function V1(e){let t=[],o=0,a="";for(let r of e)r==="("?o++:r===")"&&o--,r===","&&o===0?(t.push(a.trim()),a=""):a+=r;return a.trim()!==""&&t.push(a.trim()),t}function An(e,t,o){let a=V1(e),r=V1(t.toLowerCase());if(a.length===0||r.length===0)return"";let n=o.toLowerCase();return a.filter((l,i)=>r[i%r.length]===n&&_1(l)).join(", ")}function xi(e,t){let o=V1(e);if(o.length===0)return"";let a=V1(t.toLowerCase());return o.filter((r,n)=>(a.length===0||!Pa(a[n%a.length]))&&_1(r)).join(", ")}function Zn(e,t){let o=V1(t.toLowerCase());if(o.length===0)return!1;let a=V1(e).length||1;return Pa(o[(a-1)%o.length])}function Li(e,t,o,a){let r=V1(e);if(r.length===0)return"";let n=V1(t.toLowerCase());return n.length===0?a==="unchanged"?e:r.map(()=>"none").join(", "):r.map((l,i)=>o(n[i%n.length])?"none":l).join(", ")}function wi(e,t){return Li(e,t,Pa,"unchanged")}function bi(e,t){return Li(e,t,o=>!Pa(o),"clearAll")}function Ii(e,t){let o=V1(t.toLowerCase());if(o.length===0)return t;let r=((V1(e).length||1)-1)%o.length;return o.map((n,l)=>l===r?"border-box":n).join(", ")}function Fn(e,t,o=!1){let a=(e??"").trim();return a===""||Ha(a)||a.toLowerCase()==="currentcolor"?!1:o||t==null?!0:a.toLowerCase()!==t.trim().toLowerCase()}function yi(e){let t=V1((e??"").toLowerCase());return t.length>1&&t.some(o=>o!=="border-box")}function Mi(e,t,o,a,r=_1,n="none"){if(e.trim()==="")return[];let l=(a??"").trim();if(l.toLowerCase()===n.toLowerCase())return[];let i=l||(o??"");return r(i)?[{property:t,oldValue:i,newValue:n}]:[]}import{jsx as je,jsxs as Z1}from"react/jsx-runtime";var $n=16,Qt=4,V4=245,Si=260,_4=200,D4="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%)",O4=["oklch","oklab","lch","lab","hsl"],Ri=["oklch","oklab","lch","lab"],Nn=["rgb","hsl","oklch","oklab","lch","lab"];function Un(e){let t=vi(e);return O4.includes(t)?t:"rgb"}function To(e,t){let o=Po({r:e.r,g:e.g,b:e.b}),a=d1(e,"oklch"),r=d1(e,"oklab"),n=d1(e,"lch"),l=d1(e,"lab");return{hex:Z4(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(n.l),lch_c:Math.round(n.c),lch_h:Math.round(n.h||0),lab_l:Math.round(l.l),lab_a:Math.round(l.a),lab_b:Math.round(l.b)}}function zn(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 E4(e){let t=yt(e);return t?t.getBoundingClientRect():{top:0,bottom:window.innerHeight,left:0,right:window.innerWidth}}function B4(e,t=V4){let o=e.getBoundingClientRect(),a=E4(e),r=a.bottom-o.bottom-Qt,n=o.top-a.top-Qt,i=r<t&&n>=t?o.top-t-Qt:o.bottom+Qt;i=Math.max(a.top+Qt,Math.min(i,a.bottom-t-Qt));let s=o.left;return s+Si>a.right&&(s=a.right-Si-$n),s<a.left+$n&&(s=a.left+$n),{top:i,left:s}}function jn(e){return e!=null&&typeof e=="string"?e:"#ffffff"}function qn(e){let{r:t,g:o,b:a,a:r}=Ct(jn(e));return{type:"rgba",r:t,g:o,b:a,a:r}}function A4(e,t){let o=e||Xt(t);return t.a>=1?{backgroundColor:o}:{backgroundColor:o,backgroundImage:`linear-gradient(0deg, ${o}, ${o}), ${D4}`,backgroundSize:"100% 100%, 8px 8px, 8px 8px, 8px 8px, 8px 8px",backgroundPosition:"0 0, 0 0, 0 4px, 4px -4px, -4px 0"}}function Z4(e,t){let o=typeof e=="string"?e.trim():"";return ko(o)?o:Ho(t)}var F4=e=>e.preventDefault(),$4=e=>{e.key==="Enter"&&e.currentTarget.blur()};function N4(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:n}=t,l=Po({r:o,g:a,b:r}),i={r:o,g:a,b:r,a:n/100},s=d1(i,"oklch"),u=d1(i,"oklab"),d=d1(i,"lch"),c=d1(i,"lab");return{...e,hex:Ho(i),r:o,g:a,b:r,h:Math.round(l.h),s:Math.round(l.s),l:Math.round(l.l),a:n,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(u.l*100),oklab_a:Math.round(u.a*1e3)/10,oklab_b:Math.round(u.b*1e3)/10,lch_l:Math.round(d.l),lch_c:Math.round(d.c),lch_h:Math.round(d.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 u=En({h:o.h,s:o.s,l:o.l});o.r=Math.round(u.r),o.g=Math.round(u.g),o.b=Math.round(u.b),a={r:o.r,g:o.g,b:o.b,a:o.a/100}}else{let u=zn(e.format,o);a=Dn(u),o.r=a.r,o.g=a.g,o.b=a.b}let r=Po({r:o.r,g:o.g,b:o.b}),n=d1(a,"oklch"),l=d1(a,"oklab"),i=d1(a,"lch"),s=d1(a,"lab");return{...o,hex:Ho(a),h:Math.round(r.h),s:Math.round(r.s),l:Math.round(r.l),oklch_l:Math.round(n.l*100),oklch_c:Math.round(n.c*1e3)/10,oklch_h:Math.round(n.h||0),oklab_l:Math.round(l.l*100),oklab_a:Math.round(l.a*1e3)/10,oklab_b:Math.round(l.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 U4={placeholder:"Enter color value",ariaValue:"{0} color value",ariaOpenPicker:"{0}, open color picker. Current color: {1}",ariaPicker:"{0} picker",ariaSaturation:"Saturation {0}%, brightness {1}%",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",gradientValue:"Gradient",imageValue:"Image"};function Ta({label:e,value:t,onChange:o,id:a="color",aria:r,backgroundImage:n}){let l=p1(U4,r),i=`${a}-trigger`,s=`${a}-popover`,u=jn(t),[{colorInput:d,colorState:c},p]=J2(()=>qn(u)),[m,C]=ke.useReducer(N4,u,y=>{let B=Ct(y),J=To(B,y);return{format:Un(y),...J}}),I=ke.useRef(m);I.current=m;let f=ke.useRef(null),S=ke.useRef(t),g=ke.useRef(o);g.current=o;let R=ke.useCallback(y=>{let B=I.current.format,J;if(Ri.includes(B)){let ie=d1(y,B);J=On(ie)}else if(B==="hsl"){let ie=Po({r:y.r,g:y.g,b:y.b}),be=Math.round(y.a*100)/100;J=be>=1?`hsl(${Math.round(ie.h)}, ${Math.round(ie.s)}%, ${Math.round(ie.l)}%)`:`hsla(${Math.round(ie.h)}, ${Math.round(ie.s)}%, ${Math.round(ie.l)}%, ${be})`}else J=Xt(y);J!==f.current&&(f.current=J,S.current=J,typeof g.current=="function"&&g.current(J))},[]),v=e0(R,_4),k=o0({computePosition:B4,onClose:v.flush,trapFocus:!0});ke.useEffect(()=>{let y=jn(t);if(y===S.current)return;S.current=y;let B=Ct(y);p(qn(t));let J=To(B,y),ie=Un(y);C({type:"SET_ALL",...J}),ie!==I.current.format&&C({type:"SET_FORMAT",format:ie})},[t,p]);let O=ke.useCallback(y=>{v.cancel();let B=y.target.value;if((!B||!B.startsWith("#"))&&(B="#"+B.replace(/^#+/,"")),ko(B)){p({type:"hex",value:B});let J=Ct(B),ie=To(J,B);C({type:"SET_ALL",...ie})}else C({type:"SET_HEX",hex:B})},[v,p]),U=ke.useCallback(()=>{v.cancel();let y=I.current.hex.trim();if(ko(y)){let B=Ct(y),J=To(B,y);C({type:"SET_ALL",...J}),R(B)}else{let B=I.current;C({type:"SET_HEX",hex:Ho({r:B.r,g:B.g,b:B.b,a:B.a/100})})}},[v,R]),M=ke.useMemo(()=>{switch(m.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}]}},[m.format]),V=ke.useCallback((y,B)=>{v.cancel();let J=String(B).trim(),ie=["oklch_c","oklab_a","oklab_b"].includes(y),be=J===""?0:ie?parseFloat(J):parseInt(J,10);if(Number.isNaN(be))return;let Ie=I.current,r1=M.find(Ce=>Ce.key===y),ye=0,Te=100;r1?(ye=r1.min,Te=r1.max):y==="a"?(ye=0,Te=100):y==="h"?(ye=0,Te=360):Ie.format==="rgb"&&(ye=0,Te=255);let X=Math.min(Te,Math.max(ye,be));C({type:"SET_CHANNEL",channel:y,value:X});let te={...Ie,[y]:X},ne;if(Ie.format==="rgb")ne={r:te.r,g:te.g,b:te.b,a:te.a/100};else if(Ie.format==="hsl"){let Ce=En({h:te.h,s:te.s,l:te.l});ne={r:Ce.r,g:Ce.g,b:Ce.b,a:te.a/100}}else{let Ce=zn(Ie.format,te);ne=Dn(Ce)}p({type:"rgba",...ne}),R(ne)},[v,p,R,M]),z=ke.useCallback(y=>{p(y);let B=y.getRgba();C({type:"SET_RGBA",r:Math.round(B.r),g:Math.round(B.g),b:Math.round(B.b),a:Math.round(B.a*100)}),v({r:B.r,g:B.g,b:B.b,a:B.a})},[p,v]),j=ke.useCallback(y=>{let B=y.target.closest('[role="slider"]');B instanceof HTMLElement&&B.focus()},[]);ke.useLayoutEffect(()=>{if(!k.isOpen||!k.popoverRef.current)return;let y=k.popoverRef.current.offsetHeight;y<=0||k.reposition(y)},[k.isOpen,k.reposition]);let W=c?.rgba??{r:255,g:255,b:255,a:1},Z=c?.hsva??{h:0,s:0,v:100,a:1},D=Math.round(Z.s),N=Math.round(Z.v);ke.useEffect(()=>{let y=k.popoverRef.current;if(!k.isOpen||!y)return;let B=ie=>y.querySelector(`.${ie} [role="slider"]`)??null,J=B("colorEditor-picker-saturation");J&&(J.setAttribute("aria-label",e),J.setAttribute("aria-valuetext",Oe(l.ariaSaturation,[D,N])),J.setAttribute("aria-valuenow",String(D)),J.setAttribute("aria-valuemin","0"),J.setAttribute("aria-valuemax","100")),B("colorEditor-picker-hue")?.setAttribute("aria-label",l.ariaHue),B("colorEditor-picker-alpha")?.setAttribute("aria-label",l.ariaAlphaSlider)});let x=ke.useCallback(()=>{let y=m.format,B=m.a/100;if(Ri.includes(y)){let J=zn(y,m);return On(J)}else return y==="hsl"?B>=1?`hsl(${m.h}, ${m.s}%, ${m.l}%)`:`hsla(${m.h}, ${m.s}%, ${m.l}%, ${B})`:Xt({r:m.r,g:m.g,b:m.b,a:B})},[m])(),w=Bn(n),b=w!==""&&W.a===0,P=/url\(/i.test(w)?l.imageValue:l.gradientValue,h=b?P:x,H=b?{backgroundImage:w,backgroundSize:"cover",backgroundPosition:"center"}:A4(x,W),[q,A]=ke.useState(x),F=ke.useRef(q);F.current=q,ke.useEffect(()=>{A(x)},[x]);let $=ke.useCallback(y=>{let B=y.target.value;A(B)},[]),T=ke.useCallback(()=>{v.cancel();let y=F.current.trim();if(y&&!y.startsWith("#")&&ko(y)&&(y="#"+y),!y||!gi(y)){A(x);return}let B=Ct(y),J=Xt(B),ie=Xt(Ct(x));if(J!==ie){p(qn(y));let be=To(B,y),Ie=Un(y);C({type:"SET_ALL",...be}),Ie!==I.current.format&&C({type:"SET_FORMAT",format:Ie}),y!==f.current&&(f.current=y,S.current=y,typeof g.current=="function"&&g.current(y))}else A(x)},[v,x,p]),Y=ke.useCallback(y=>{y.key==="Enter"&&y.currentTarget.blur()},[]),ue=ke.useCallback(()=>{let y=Nn.indexOf(m.format),B=Nn[(y+1)%Nn.length]??m.format;C({type:"SET_FORMAT",format:B})},[m.format]),de=ke.useMemo(()=>{let y=k.triggerRef.current;if(!y)return document.body;let B=y.getRootNode();return B instanceof ShadowRoot?B:document.body},[k.isOpen,k.triggerRef]);return je(v1,{label:e,id:a,className:"colorEditor-fieldset",children:Z1("div",{className:"colorEditor-wrapper",children:[je("button",{ref:k.triggerRef,id:i,type:"button",className:"colorEditor-swatch-only",onClick:k.toggle,"aria-expanded":k.isOpen,"aria-haspopup":"dialog","aria-controls":s,"aria-label":Oe(l.ariaOpenPicker,[e,h]),children:je("span",{style:H,"aria-hidden":"true",className:"colorEditor-swatch"})}),je("input",{type:"text",className:"colorEditor-value-input",value:b?h:q,readOnly:b,onChange:$,onBlur:T,onKeyDown:Y,"aria-label":Oe(l.ariaValue,[e]),placeholder:l.placeholder,spellCheck:"false",autoComplete:"off"}),k.isOpen&&T4(Z1("div",{ref:k.popoverRef,id:s,role:"dialog","aria-modal":"true","aria-label":Oe(l.ariaPicker,[e]),style:{top:k.position.top,left:k.position.left},onDragStart:F4,onMouseUp:j,className:"colorEditor-popover",children:[Z1(At,{color:d,onChange:z,className:"colorEditor-picker",children:[je(At.Saturation,{className:"colorEditor-picker-saturation"}),Z1("div",{className:"colorEditor-picker-toolbar",children:[je(At.EyeDropper,{title:l.ariaEyedropper,children:je(fo,{size:18,"aria-hidden":"true"})}),Z1("div",{className:"colorEditor-picker-sliders",children:[je(At.Hue,{className:"h-4 colorEditor-picker-hue"}),je(At.Alpha,{className:"h-4 colorEditor-picker-alpha"})]})]})]}),Z1("div",{className:"colorEditor-input-wrapper",children:[Z1("div",{className:"colorEditor-input-group",children:[je("input",{type:"text",value:m.hex,onChange:O,onBlur:U,onKeyDown:$4,"aria-label":l.ariaHex,className:"colorEditor-input-hex",spellCheck:"false",autoComplete:"off"}),je("label",{className:"colorEditor-input-label","aria-hidden":"true",children:"HEX"})]}),Z1("div",{className:"colorEditor-channels-wrapper",children:[Z1("div",{className:"colorEditor-input-container",children:[M.map(y=>je("div",{className:"colorEditor-input-group-no-label",children:je("input",{type:"number",min:y.min,max:y.max,step:y.step||1,value:m[y.key],onChange:B=>V(y.key,B.target.value),onBlur:B=>V(y.key,B.target.value),"aria-label":Oe(l.ariaChannel,[y.label,m.format.toUpperCase(),y.min,y.max]),"aria-valuemin":y.min,"aria-valuemax":y.max,"aria-valuenow":m[y.key],className:"colorEditor-input-rgba"})},y.key)),je("div",{className:"colorEditor-input-group-no-label",children:je("input",{type:"number",min:0,max:100,value:m.a,onChange:y=>V("a",y.target.value),onBlur:y=>V("a",y.target.value),"aria-label":l.ariaAlphaInput,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m.a,className:"colorEditor-input-rgba"})})]}),je("div",{className:"colorEditor-format-selector",children:Z1("button",{type:"button",className:"colorEditor-format-picker",onClick:ue,"aria-label":Oe(l.ariaFormatCycle,[m.format.toUpperCase()]),"aria-live":"polite",title:l.titleFormatCycle,children:[M.map(y=>je("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:y.label},y.key)),je("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:"A"})]})})]})]})]}),de)]})})}import a1 from"react";import{jsx as Yt,jsxs as z4}from"react/jsx-runtime";var q4={ariaValue:"{0} value",ariaUnit:"{0} unit"};function ki(e,t,o,a,r){let n=i1(e,o,a);if(n.numericValue!=="")return n.unit;if(t!=null&&t!==""){let l=i1(t,o,a);if(l.numericValue!==""&&r.has(l.unit))return l.unit}return o}function F1({label:e,value:t,onChange:o,units:a=Uo,constraints:r=S1,defaultUnit:n="px",placeholder:l=0,id:i="dimension",icon:s,aria:u}){let d=p1(q4,u),c=a1.useMemo(()=>new Set(a.map(D=>D.value)),[a]),p=a1.useMemo(()=>io(a),[a]),m=a1.useMemo(()=>{if(l==null||l==="")return"";if(typeof l=="number")return String(l);let D=i1(String(l),n,p);return D.numericValue!==""?String(D.numericValue):String(l)},[l,n,p]),[C,I]=a1.useState(()=>{let D=i1(t,n,p);return D.numericValue!==""?String(D.numericValue):""}),[f,S]=a1.useState(()=>ki(t,l,n,p,c)),g=a1.useRef(o);g.current=o;let R=a1.useRef(t),v=a1.useRef(l);a1.useEffect(()=>{if(t===R.current&&l===v.current)return;R.current=t,v.current=l;let D=i1(t,n,p);I(D.numericValue!==""?String(D.numericValue):""),S(ki(t,l,n,p,c))},[t,l,n,p,c]);let k=a1.useCallback((D,N)=>{let L=parseFloat(D);if(D===""||isNaN(L)){if(R.current==="")return;R.current="",typeof g.current=="function"&&g.current("");return}let x=R1(L,N,r),w=k1(x,N,r),b=qo(w,N);b!==R.current&&(R.current=b,typeof g.current=="function"&&g.current(b))},[r]),O=a1.useCallback(D=>{let N=D.target.value;I(N);let x=N.trim().match(p)?.[2];x&&c.has(x)&&x!==f&&S(x)},[p,f,c]),U=a1.useCallback(D=>{let N=D.clipboardData.getData("text"),L=i1(N,n,p);if(L.numericValue!==""&&L.unit&&c.has(L.unit)){D.preventDefault(),I(String(L.numericValue)),S(L.unit);let x=R1(L.numericValue,L.unit,r),w=k1(x,L.unit,r),b=qo(w,L.unit);R.current=b,typeof g.current=="function"&&g.current(b)}},[n,p,c,r]),M=a1.useCallback(()=>{if(C===""){k("",f);return}let D=parseFloat(C);if(isNaN(D)){let x=i1(t,n,p);I(x.numericValue!==""?String(x.numericValue):"");return}let N=R1(D,f,r),L=k1(N,f,r);I(String(L)),k(String(L),f)},[C,f,t,n,p,r,k]),V=a1.useCallback(D=>{if(D.key==="Enter"){D.currentTarget.blur();return}if(D.key==="ArrowUp"||D.key==="ArrowDown"){D.preventDefault();let N=zo(C,D.key,D.shiftKey,f,r);if(N===null)return;I(N),k(N,f)}},[C,f,r,k]),z=a1.useCallback(D=>{let N=D.target.value;if(!c.has(N))return;if(S(N),C===""){k("",N);return}let L=parseFloat(C);if(isNaN(L))return;let x=R1(L,N,r),w=k1(x,N,r);I(String(w));let b=qo(w,N);R.current=b,typeof g.current=="function"&&g.current(b)},[C,c,r,k]),j=`${i}-input`,W=`${i}-unit`,Z=a.some(D=>D.value!=="");return Yt(v1,{label:e,id:i,className:"dimensionEditor-fieldset",children:z4("div",{className:"dimensionEditor-row",children:[s&&Yt("span",{className:"dimensionEditor-icon","aria-hidden":"true",children:Yt(s,{size:14,width:14,height:14})}),Yt("input",{id:j,type:"text",className:s?"dimensionEditor-input dimensionEditor-input--with-icon":"dimensionEditor-input",value:C,placeholder:m,onChange:O,onPaste:U,onBlur:M,onKeyDown:V,"aria-label":Oe(d.ariaValue,[e]),autoComplete:"off",spellCheck:"false"}),Z&&Yt("select",{id:W,className:"dimensionEditor-unit",value:f,onChange:z,"aria-label":Oe(d.ariaUnit,[e]),children:a.map(D=>Yt("option",{value:D.value,children:D.label},D.value||"__unitless__"))})]})})}function c1(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 le(){return le=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},le.apply(null,arguments)}var ee=e9(Ei(),1),Q4=e9(Fi(),1);import*as me from"react";import{cloneElement as jI,Component as KI,useRef as y1,useCallback as pe,useEffect as $1,useMemo as Jt}from"react";var $i=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Ni=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Na=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let o=getComputedStyle(e,null);return Ni(o.overflowY,t)||Ni(o.overflowX,t)||(a=>{let r=(n=>{if(!n.ownerDocument||!n.ownerDocument.defaultView)return null;try{return n.ownerDocument.defaultView.frameElement}catch{return null}})(a);return!!r&&(r.clientHeight<a.scrollHeight||r.clientWidth<a.scrollWidth)})(e)}return!1},Ua=(e,t,o,a,r,n,l,i)=>n<e&&l>t||n>e&&l<t?0:n<=e&&i<=o||l>=t&&i>=o?n-e-a:l>t&&i<o||n<e&&i>o?l-t+r:0,X4=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)},Ui=(e,t)=>{var o,a,r,n;if(typeof document>"u")return[];let{scrollMode:l,block:i,inline:s,boundary:u,skipOverflowHiddenElements:d}=t,c=typeof u=="function"?u:L=>L!==u;if(!$i(e))throw new TypeError("Invalid target");let p=document.scrollingElement||document.documentElement,m=[],C=e;for(;$i(C)&&c(C);){if(C=X4(C),C===p){m.push(C);break}C!=null&&C===document.body&&Na(C)&&!Na(document.documentElement)||C!=null&&Na(C,d)&&m.push(C)}let I=(a=(o=window.visualViewport)==null?void 0:o.width)!=null?a:innerWidth,f=(n=(r=window.visualViewport)==null?void 0:r.height)!=null?n:innerHeight,{scrollX:S,scrollY:g}=window,{height:R,width:v,top:k,right:O,bottom:U,left:M}=e.getBoundingClientRect(),{top:V,right:z,bottom:j,left:W}=(L=>{let x=window.getComputedStyle(L);return{top:parseFloat(x.scrollMarginTop)||0,right:parseFloat(x.scrollMarginRight)||0,bottom:parseFloat(x.scrollMarginBottom)||0,left:parseFloat(x.scrollMarginLeft)||0}})(e),Z=i==="start"||i==="nearest"?k-V:i==="end"?U+j:k+R/2-V+j,D=s==="center"?M+v/2-W+z:s==="end"?O+z:M-W,N=[];for(let L=0;L<m.length;L++){let x=m[L],{height:w,width:b,top:P,right:h,bottom:H,left:q}=x.getBoundingClientRect();if(l==="if-needed"&&k>=0&&M>=0&&U<=f&&O<=I&&(x===p&&!Na(x)||k>=P&&U<=H&&M>=q&&O<=h))return N;let A=getComputedStyle(x),F=parseInt(A.borderLeftWidth,10),$=parseInt(A.borderTopWidth,10),T=parseInt(A.borderRightWidth,10),Y=parseInt(A.borderBottomWidth,10),ue=0,de=0,y="offsetWidth"in x?x.offsetWidth-x.clientWidth-F-T:0,B="offsetHeight"in x?x.offsetHeight-x.clientHeight-$-Y:0,J="offsetWidth"in x?x.offsetWidth===0?0:b/x.offsetWidth:0,ie="offsetHeight"in x?x.offsetHeight===0?0:w/x.offsetHeight:0;if(p===x)ue=i==="start"?Z:i==="end"?Z-f:i==="nearest"?Ua(g,g+f,f,$,Y,g+Z,g+Z+R,R):Z-f/2,de=s==="start"?D:s==="center"?D-I/2:s==="end"?D-I:Ua(S,S+I,I,F,T,S+D,S+D+v,v),ue=Math.max(0,ue+g),de=Math.max(0,de+S);else{ue=i==="start"?Z-P-$:i==="end"?Z-H+Y+B:i==="nearest"?Ua(P,H,w,$,Y+B,Z,Z+R,R):Z-(P+w/2)+B/2,de=s==="start"?D-q-F:s==="center"?D-(q+b/2)+y/2:s==="end"?D-h+T+y:Ua(q,h,b,F,T+y,D,D+v,v);let{scrollLeft:be,scrollTop:Ie}=x;ue=ie===0?0:Math.max(0,Math.min(Ie+ue/ie,x.scrollHeight-w/ie+B)),de=J===0?0:Math.max(0,Math.min(be+de/J,x.scrollWidth-b/J+y)),Z+=Ie-ue,D+=be-de}N.push({el:x,top:ue,left:de})}return N};var Y4=0;function Xi(){return String(Y4++)}function Do(e){var t=me.useRef(e);return t.current=e,t}function J4(){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 Wn(){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,n=new Array(r>1?r-1:0),l=1;l<r;l++)n[l-1]=arguments[l];return t.some(function(i){return i&&i.apply(void 0,[a].concat(n)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function Qi(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var n=arguments.length,l=new Array(n),i=0;i<n;i++)l[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,l)},t)}return r.cancel=a,r}var ec=Qi(function(e){Yi(e).textContent=""},500);function Yi(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 tc(e,t){if(!(!e||!t)){var o=Yi(t);o.textContent=e,ec(t)}}function oc(e){var t=e?.getElementById("a11y-status-message");t&&t.remove()}function Oo(){}var Qn=Oo;function za(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},le({},e))}function ac(e,t){if(e){var o=Ui(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});o.forEach(function(a){var r=a.el,n=a.top,l=a.left;r.scrollTop=n,r.scrollLeft=l})}}function qi(e,t,o){var a=e===t||t instanceof o.Node&&e.contains&&e.contains(t);return a}function rc(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var n=arguments.length,l=new Array(n),i=0;i<n;i++)l[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,l)},t)}return r.cancel=a,r}function _e(){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,n=new Array(r>1?r-1:0),l=1;l<r;l++)n[l-1]=arguments[l];return t.some(function(i){return i&&i.apply(void 0,[a].concat(n)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function X1(){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 nc(e,t){return e[t]!==void 0}function ja(e){var t=e.key,o=e.keyCode;return o>=37&&o<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function mt(e,t,o,a,r){r===void 0&&(r=!1);var n=o.length;if(n===0)return-1;var l=n-1;(typeof e!="number"||e<0||e>l)&&(e=t>0?-1:l+1);var i=e+t;i<0?i=r?l:0:i>l&&(i=r?0:l);var s=eo(i,t<0,o,a,r);return s===-1?e>=n?-1:e:s}function eo(e,t,o,a,r){r===void 0&&(r=!1);var n=o.length;if(t){for(var l=e;l>=0;l--)if(!a(o[l],l))return l}else for(var i=e;i<n;i++)if(!a(o[i],i))return i;return r?eo(t?n-1:0,t,o,a):-1}function zi(e,t,o,a){return a===void 0&&(a=!0),o&&t.some(function(r){return r&&(qi(r,e,o)||a&&qi(r,o.document.activeElement,o))})}function Yn(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function lc(e,t,o,a){for(var r=e.type,n={},l=Object.keys(o),i=0,s=l;i<s.length;i++){var u=s[i];ic(u,e,t,o,a),a[u]!==o[u]&&(n[u]=a[u])}t.onStateChange&&Object.keys(n).length&&t.onStateChange(le({type:r},n))}function ic(e,t,o,a,r){if(r[e]!==a[e]){var n="on"+Yn(e)+"Change",l=o[n];if(typeof l=="function"){var i=t.type;l(le({type:i},r))}}}function Ji(e,t,o,a){var r=me.useRef(null),n=me.useRef(void 0),l=Do(t),i=me.useCallback(function(p,m){n.current=m,p=za(p,l.current);var C=e(p,l.current,m),I=l.current.stateReducer(p,le({},m,{changes:C}));return le({},p,I)},[l,e]),s=me.useReducer(i,t,o),u=s[0],d=s[1],c=n.current;return me.useEffect(function(){var p,m=za((p=r.current)!=null?p:{},l.current),C=c&&r.current&&!a(m,u);C&&lc(c,l.current,m,u),r.current=u},[u,c,a,l]),[u,d]}function Jn(e,t,o,a){var r=Ji(e,t,o,a),n=r[0],l=r[1];return[za(n,t),l]}function el(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 n=o[t];if(n===void 0)throw new Error(a);return[n,t]}throw new Error(a)}function Ya(){var e=me.useRef(!0);return me.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function sc(e,t){return t.changes}var uc={environment:ee.default.shape({addEventListener:ee.default.func.isRequired,removeEventListener:ee.default.func.isRequired,document:ee.default.shape({createElement:ee.default.func.isRequired,getElementById:ee.default.func.isRequired,activeElement:ee.default.any.isRequired,body:ee.default.any.isRequired}).isRequired,Node:ee.default.func.isRequired}),itemToKey:ee.default.func,stateReducer:ee.default.func};function N1(e,t,o){var a=e["default"+Yn(t)];return a!==void 0?a:o[t]}function Ht(e,t,o){var a=e[t];if(a!==void 0)return a;var r=e["initial"+Yn(t)];return r!==void 0?r:N1(e,t,o)}var ji=Qi(function(e,t){tc(e,t)},200);function tl(e,t,o,a){var r=a?.document,n=Ya();me.useEffect(function(){if(!(!e||n||!r)){var l=e(t);ji(l,r)}},o),me.useEffect(function(){return function(){ji.cancel(),oc(r)}},[r])}var Vo=le({},uc,{getA11yStatusMessage:ee.default.func,highlightedIndex:ee.default.number,defaultHighlightedIndex:ee.default.number,initialHighlightedIndex:ee.default.number,isOpen:ee.default.bool,defaultIsOpen:ee.default.bool,initialIsOpen:ee.default.bool,selectedItem:ee.default.any,initialSelectedItem:ee.default.any,defaultSelectedItem:ee.default.any,id:ee.default.string,labelId:ee.default.string,menuId:ee.default.string,getItemId:ee.default.func,toggleButtonId:ee.default.string,onSelectedItemChange:ee.default.func,onHighlightedIndexChange:ee.default.func,onStateChange:ee.default.func,onIsOpenChange:ee.default.func,scrollIntoView:ee.default.func}),_o={itemToString:function(t){return t?String(t):""},itemToKey:function(t){return t},stateReducer:sc,scrollIntoView:ac,environment:typeof window>"u"?void 0:window},f1={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""},dc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?me.useLayoutEffect:me.useEffect;function cc(e){return/^\S{1}$/.test(e)}function e5(e){var t=Ht(e,"selectedItem",f1),o=Ht(e,"isOpen",f1),a=fc(e),r=Ht(e,"inputValue",f1);return{highlightedIndex:a<0&&t&&o?e.items.findIndex(function(n){return e.itemToKey(n)===e.itemToKey(t)}):a,isOpen:o,selectedItem:t,inputValue:r}}function Pt(e,t,o){var a=e.items,r=e.initialHighlightedIndex,n=e.defaultHighlightedIndex,l=e.isItemDisabled,i=e.itemToKey,s=t.selectedItem,u=t.highlightedIndex;return a.length===0?-1:r!==void 0&&u===r&&!l(a[r],r)?r:n!==void 0&&!l(a[n],n)?n:s?a.findIndex(function(d){return i(s)===i(d)}):o<0&&!l(a[a.length-1],a.length-1)?a.length-1:o>0&&!l(a[0],0)?0:-1}function t5(e,t,o){var a=me.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),r=me.useCallback(function(){return o.map(function(n){return n.current})},[o]);return me.useEffect(function(){if(!e)return Oo;function n(){a.current.isTouchEnd=!1,a.current.isMouseDown=!0}function l(d){a.current.isMouseDown=!1,zi(d.target,r(),e)||t()}function i(){a.current.isTouchEnd=!1,a.current.isTouchMove=!1}function s(){a.current.isTouchMove=!0}function u(d){a.current.isTouchEnd=!0,!a.current.isTouchMove&&!zi(d.target,r(),e,!1)&&t()}return e.addEventListener("mousedown",n),e.addEventListener("mouseup",l),e.addEventListener("touchstart",i),e.addEventListener("touchmove",s),e.addEventListener("touchend",u),function(){e.removeEventListener("mousedown",n),e.removeEventListener("mouseup",l),e.removeEventListener("touchstart",i),e.removeEventListener("touchmove",s),e.removeEventListener("touchend",u)}},[e,r,t]),a.current}var ol=function(){return Oo};function o5(e){var t=e.highlightedIndex,o=e.isOpen,a=e.itemRefs,r=e.getItemNodeFromIndex,n=e.menuElement,l=e.scrollIntoView,i=me.useRef(!0);return dc(function(){t<0||!o||!Object.keys(a.current).length||(i.current===!1?i.current=!0:l(r(t),n))},[t]),i}var al=Oo;function Ka(e,t,o){var a;o===void 0&&(o=!0);var r=((a=e.items)==null?void 0:a.length)&&t>=0;return le({isOpen:!1,highlightedIndex:-1},r&&le({selectedItem:e.items[t],isOpen:N1(e,"isOpen",f1),highlightedIndex:N1(e,"highlightedIndex",f1)},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 Ga(e){var t=N1(e,"highlightedIndex",f1);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function fc(e){var t=Ht(e,"highlightedIndex",f1);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function r5(e,t,o,a){var r=o.type,n;switch(r){case a.ItemMouseMove:n={highlightedIndex:o.disabled?-1:o.index};break;case a.MenuMouseLeave:n={highlightedIndex:-1};break;case a.ToggleButtonClick:case a.FunctionToggleMenu:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Pt(t,e,0)};break;case a.FunctionOpenMenu:n={isOpen:!0,highlightedIndex:Pt(t,e,0)};break;case a.FunctionCloseMenu:n={isOpen:!1};break;case a.FunctionSetHighlightedIndex:n={highlightedIndex:t.isItemDisabled(t.items[o.highlightedIndex],o.highlightedIndex)?-1:o.highlightedIndex};break;case a.FunctionSetInputValue:n={inputValue:o.inputValue};break;case a.FunctionReset:n={highlightedIndex:Ga(t),isOpen:N1(t,"isOpen",f1),selectedItem:N1(t,"selectedItem",f1),inputValue:N1(t,"inputValue",f1)};break;default:throw new Error("Reducer called without proper action type.")}return le({},e,n)}var pc=le({},Vo,{items:ee.default.array.isRequired,isItemDisabled:ee.default.func}),Cc=le({},_o,{isItemDisabled:function(){return!1}});function mc(e){for(var t=e.keysSoFar,o=e.highlightedIndex,a=e.items,r=e.itemToString,n=e.isItemDisabled,l=t.toLowerCase(),i=0;i<a.length;i++){var s=(i+o+(t.length<2?1:0))%a.length,u=a[s];if(u!==void 0&&r(u).toLowerCase().startsWith(l)&&!n(u,s))return s}return o}var qa=0,rl=1,nl=2,Wa=3,ll=4,il=5,sl=6,ul=7,dl=8,cl=9,fl=10,Xa=11,n5=12,l5=13,pl=14,i5=15,s5=16,u5=17,d5=18,Cl=19,Xn=20,c5=21,f5=Object.freeze({__proto__:null,FunctionCloseMenu:u5,FunctionOpenMenu:s5,FunctionReset:c5,FunctionSelectItem:Cl,FunctionSetHighlightedIndex:d5,FunctionSetInputValue:Xn,FunctionToggleMenu:i5,ItemClick:pl,ItemMouseMove:l5,MenuMouseLeave:n5,ToggleButtonBlur:Xa,ToggleButtonClick:qa,ToggleButtonKeyDownArrowDown:rl,ToggleButtonKeyDownArrowUp:nl,ToggleButtonKeyDownCharacter:Wa,ToggleButtonKeyDownEnd:sl,ToggleButtonKeyDownEnter:ul,ToggleButtonKeyDownEscape:ll,ToggleButtonKeyDownHome:il,ToggleButtonKeyDownPageDown:fl,ToggleButtonKeyDownPageUp:cl,ToggleButtonKeyDownSpaceButton:dl});function gc(e,t,o){var a,r=o.type,n=o.altKey,l;switch(r){case pl:l={isOpen:N1(t,"isOpen",f1),highlightedIndex:Ga(t),selectedItem:t.items[o.index]};break;case Wa:{var i=o.key,s=""+e.inputValue+i,u=!e.isOpen&&e.selectedItem?t.items.findIndex(function(m){return t.itemToKey(m)===t.itemToKey(e.selectedItem)}):e.highlightedIndex,d=mc({keysSoFar:s,highlightedIndex:u,items:t.items,itemToString:t.itemToString,isItemDisabled:t.isItemDisabled});l={inputValue:s,highlightedIndex:d,isOpen:!0}}break;case rl:{var c=e.isOpen?mt(e.highlightedIndex,1,t.items,t.isItemDisabled):n&&e.selectedItem==null?-1:Pt(t,e,1);l={highlightedIndex:c,isOpen:!0}}break;case nl:if(e.isOpen&&n)l=Ka(t,e.highlightedIndex,!1);else{var p=e.isOpen?mt(e.highlightedIndex,-1,t.items,t.isItemDisabled):Pt(t,e,-1);l={highlightedIndex:p,isOpen:!0}}break;case ul:case dl:l=Ka(t,e.highlightedIndex,!1);break;case il:l={highlightedIndex:eo(0,!1,t.items,t.isItemDisabled),isOpen:!0};break;case sl:l={highlightedIndex:eo(t.items.length-1,!0,t.items,t.isItemDisabled),isOpen:!0};break;case cl:l={highlightedIndex:mt(e.highlightedIndex,-10,t.items,t.isItemDisabled)};break;case fl:l={highlightedIndex:mt(e.highlightedIndex,10,t.items,t.isItemDisabled)};break;case ll:l={isOpen:!1,highlightedIndex:-1};break;case Xa:l=le({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&{selectedItem:t.items[e.highlightedIndex]});break;case Cl:l={selectedItem:o.selectedItem};break;default:return r5(e,t,o,f5)}return le({},e,l)}var hc=le({},me),p5=hc.useId,C5=typeof p5=="function"?vc:xc;function vc(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,n=e.toggleButtonId,l=e.inputId,i="downshift-"+p5();t||(t=i);var s=me.useMemo(function(){return{labelId:o??t+"-label",menuId:a??t+"-menu",getItemId:r??function(u){return t+"-item-"+u},toggleButtonId:n??t+"-toggle-button",inputId:l??t+"-input"}},[r,t,l,o,a,n]);return s}function xc(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,n=e.toggleButtonId,l=e.inputId,i=me.useRef(t??"downshift-"+Xi()),s=i.current,u=me.useMemo(function(){return{labelId:o??s+"-label",menuId:a??s+"-menu",getItemId:r??function(d){return s+"-item-"+d},toggleButtonId:n??s+"-toggle-button",inputId:l??s+"-input"}},[r,l,o,a,n,s]);return u}var Lc=["onClick"],wc=["onMouseLeave","refKey","ref"],bc=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],Ic=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];Ja.stateChangeTypes=f5;function Ja(e){e===void 0&&(e={}),Qn(e,Ja,pc);var t=le({},Cc,e),o=t.scrollIntoView,a=t.environment,r=t.getA11yStatusMessage,n=Jn(gc,t,e5,a5),l=n[0],i=n[1],s=l.isOpen,u=l.highlightedIndex,d=l.selectedItem,c=l.inputValue,p=y1(null),m=y1(null),C=y1({}),I=y1(null),f=C5(t),S=Do({state:l,props:t}),g=pe(function(P){return C.current[f.getItemId(P)]},[f]);tl(r,l,[s,u,d,c],a);var R=o5({menuElement:m.current,highlightedIndex:u,isOpen:s,itemRefs:C,scrollIntoView:o,getItemNodeFromIndex:g});$1(function(){return I.current=rc(function(P){P({type:Xn,inputValue:""})},500),function(){I.current.cancel()}},[]),$1(function(){c&&I.current(i)},[i,c]),al({props:t,state:l}),$1(function(){var P=Ht(t,"isOpen",f1);P&&p.current&&p.current.focus()},[]);var v=pe(function(){S.current.state.isOpen&&i({type:Xa})},[i,S]),k=Jt(function(){return[m,p]},[]),O=t5(a,v,k),U=ol("getMenuProps","getToggleButtonProps");$1(function(){s||(C.current={})},[s]);var M=Jt(function(){return{ArrowDown:function(h){h.preventDefault(),i({type:rl,altKey:h.altKey})},ArrowUp:function(h){h.preventDefault(),i({type:nl,altKey:h.altKey})},Home:function(h){h.preventDefault(),i({type:il})},End:function(h){h.preventDefault(),i({type:sl})},Escape:function(){S.current.state.isOpen&&i({type:ll})},Enter:function(h){h.preventDefault(),i({type:S.current.state.isOpen?ul:qa})},PageUp:function(h){S.current.state.isOpen&&(h.preventDefault(),i({type:cl}))},PageDown:function(h){S.current.state.isOpen&&(h.preventDefault(),i({type:fl}))}," ":function(h){h.preventDefault();var H=S.current.state;if(!H.isOpen){i({type:qa});return}H.inputValue?i({type:Wa,key:" "}):i({type:dl})}}},[i,S]),V=pe(function(){i({type:i5})},[i]),z=pe(function(){i({type:u5})},[i]),j=pe(function(){i({type:s5})},[i]),W=pe(function(P){i({type:d5,highlightedIndex:P})},[i]),Z=pe(function(P){i({type:Cl,selectedItem:P})},[i]),D=pe(function(){i({type:c5})},[i]),N=pe(function(P){i({type:Xn,inputValue:P})},[i]),L=pe(function(P){var h=P===void 0?{}:P,H=h.onClick,q=c1(h,Lc),A=function(){var $;($=p.current)==null||$.focus()};return le({id:f.labelId,htmlFor:f.toggleButtonId,onClick:_e(H,A)},q)},[f]),x=pe(function(P,h){var H,q=P===void 0?{}:P,A=q.onMouseLeave,F=q.refKey,$=F===void 0?"ref":F,T=q.ref,Y=c1(q,wc),ue=h===void 0?{}:h,de=ue.suppressRefError,y=de===void 0?!1:de,B=function(){i({type:n5})};return U("getMenuProps",y,$,m),le((H={},H[$]=X1(T,function(J){m.current=J}),H.id=f.menuId,H.role="listbox",H["aria-labelledby"]=Y&&Y["aria-label"]?void 0:""+f.labelId,H.onMouseLeave=_e(A,B),H),Y)},[i,U,f]),w=pe(function(P,h){var H,q=P===void 0?{}:P,A=q.onBlur,F=q.onClick;q.onPress;var $=q.onKeyDown,T=q.refKey,Y=T===void 0?"ref":T,ue=q.ref,de=c1(q,bc),y=h===void 0?{}:h,B=y.suppressRefError,J=B===void 0?!1:B,ie=S.current.state,be=function(){i({type:qa})},Ie=function(){ie.isOpen&&!O.isMouseDown&&i({type:Xa})},r1=function(X){var te=ja(X);te&&M[te]?M[te](X):cc(te)&&i({type:Wa,key:te})},ye=le((H={},H[Y]=X1(ue,function(Te){p.current=Te}),H["aria-activedescendant"]=ie.isOpen&&ie.highlightedIndex>-1?f.getItemId(ie.highlightedIndex):"",H["aria-controls"]=f.menuId,H["aria-expanded"]=S.current.state.isOpen,H["aria-haspopup"]="listbox",H["aria-labelledby"]=de&&de["aria-label"]?void 0:""+f.labelId,H.id=f.toggleButtonId,H.role="combobox",H.tabIndex=0,H.onBlur=_e(A,Ie),H),de);return de.disabled||(ye.onClick=_e(F,be),ye.onKeyDown=_e($,r1)),U("getToggleButtonProps",J,Y,p),ye},[i,f,S,O,U,M]),b=pe(function(P){var h,H=P===void 0?{}:P,q=H.item,A=H.index,F=H.onMouseMove,$=H.onClick,T=H.onMouseDown;H.onPress;var Y=H.refKey,ue=Y===void 0?"ref":Y,de=H.disabled,y=H.ref,B=c1(H,Ic);de!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var J=S.current,ie=J.state,be=J.props,Ie=el(q,A,be.items,"Pass either item or index to getItemProps!"),r1=Ie[0],ye=Ie[1],Te=be.isItemDisabled(r1,ye),X=function(){O.isTouchEnd||ye===ie.highlightedIndex||(R.current=!1,i({type:l5,index:ye,disabled:Te}))},te=function(){i({type:pl,index:ye})},ne=function(De){return De.preventDefault()},Ce=le((h={},h[ue]=X1(y,function(He){He&&(C.current[f.getItemId(ye)]=He)}),h["aria-disabled"]=Te,h["aria-selected"]=r1===ie.selectedItem,h.id=f.getItemId(ye),h.role="option",h),B);return Te||(Ce.onClick=_e($,te)),Ce.onMouseMove=_e(F,X),Ce.onMouseDown=_e(T,ne),Ce},[S,f,O,R,i]);return{getToggleButtonProps:w,getLabelProps:L,getMenuProps:x,getItemProps:b,toggleMenu:V,openMenu:j,closeMenu:z,setHighlightedIndex:W,selectItem:Z,reset:D,setInputValue:N,highlightedIndex:u,isOpen:s,selectedItem:d,inputValue:c}}var ml=0,gl=1,hl=2,vl=3,xl=4,Ll=5,wl=6,bl=7,Il=8,Qa=9,yl=10,m5=11,g5=12,Ml=13,h5=14,v5=15,x5=16,L5=17,w5=18,Sl=19,b5=20,I5=21,Rl=22,y5=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:Rl,FunctionCloseMenu:L5,FunctionOpenMenu:x5,FunctionReset:I5,FunctionSelectItem:Sl,FunctionSetHighlightedIndex:w5,FunctionSetInputValue:b5,FunctionToggleMenu:v5,InputBlur:Qa,InputChange:Il,InputClick:yl,InputKeyDownArrowDown:ml,InputKeyDownArrowUp:gl,InputKeyDownEnd:xl,InputKeyDownEnter:bl,InputKeyDownEscape:hl,InputKeyDownHome:vl,InputKeyDownPageDown:wl,InputKeyDownPageUp:Ll,ItemClick:Ml,ItemMouseMove:g5,MenuMouseLeave:m5,ToggleButtonClick:h5});function yc(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)),le({},t,{inputValue:a})}var Mc=le({},Vo,{items:ee.default.array.isRequired,isItemDisabled:ee.default.func,inputValue:ee.default.string,defaultInputValue:ee.default.string,initialInputValue:ee.default.string,inputId:ee.default.string,onInputValueChange:ee.default.func});function Sc(e,t,o,a){var r=y1(),n=Ji(e,t,o,a),l=n[0],i=n[1],s=Ya();return $1(function(){if(nc(t,"selectedItem")){if(!s){var u=t.itemToKey(t.selectedItem)!==t.itemToKey(r.current);u&&i({type:Rl,inputValue:t.itemToString(t.selectedItem)})}r.current=l.selectedItem===r.current?t.selectedItem:l.selectedItem}},[l.selectedItem,t.selectedItem]),[za(l,t),i]}var Rc=le({},_o,{isItemDisabled:function(){return!1}});function kc(e,t,o){var a,r=o.type,n=o.altKey,l;switch(r){case Ml:l={isOpen:N1(t,"isOpen",f1),highlightedIndex:Ga(t),selectedItem:t.items[o.index],inputValue:t.itemToString(t.items[o.index])};break;case ml:e.isOpen?l={highlightedIndex:mt(e.highlightedIndex,1,t.items,t.isItemDisabled,!0)}:l={highlightedIndex:n&&e.selectedItem==null?-1:Pt(t,e,1),isOpen:t.items.length>=0};break;case gl:e.isOpen?n?l=Ka(t,e.highlightedIndex):l={highlightedIndex:mt(e.highlightedIndex,-1,t.items,t.isItemDisabled,!0)}:l={highlightedIndex:Pt(t,e,-1),isOpen:t.items.length>=0};break;case bl:l=Ka(t,e.highlightedIndex);break;case hl:l=le({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Ll:l={highlightedIndex:mt(e.highlightedIndex,-10,t.items,t.isItemDisabled,!0)};break;case wl:l={highlightedIndex:mt(e.highlightedIndex,10,t.items,t.isItemDisabled,!0)};break;case vl:l={highlightedIndex:eo(0,!1,t.items,t.isItemDisabled)};break;case xl:l={highlightedIndex:eo(t.items.length-1,!0,t.items,t.isItemDisabled)};break;case Qa:l=le({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 Il:l={isOpen:!0,highlightedIndex:Ga(t),inputValue:o.inputValue};break;case yl:l={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Pt(t,e,0)};break;case Sl:l={selectedItem:o.selectedItem,inputValue:t.itemToString(o.selectedItem)};break;case Rl:l={inputValue:o.inputValue};break;default:return r5(e,t,o,y5)}return le({},e,l)}var Hc=["onMouseLeave","refKey","ref"],Pc=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],Tc=["onClick","onPress","refKey","ref"],Vc=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];M5.stateChangeTypes=y5;function M5(e){e===void 0&&(e={}),Qn(e,M5,Mc);var t=le({},Rc,e),o=t.items,a=t.scrollIntoView,r=t.environment,n=t.getA11yStatusMessage,l=Sc(kc,t,yc,a5),i=l[0],s=l[1],u=i.isOpen,d=i.highlightedIndex,c=i.selectedItem,p=i.inputValue,m=y1(null),C=y1({}),I=y1(null),f=y1(null),S=Ya(),g=C5(t),R=y1(),v=Do({state:i,props:t}),k=pe(function(A){return C.current[g.getItemId(A)]},[g]);tl(n,i,[u,d,c,p],r);var O=o5({menuElement:m.current,highlightedIndex:d,isOpen:u,itemRefs:C,scrollIntoView:a,getItemNodeFromIndex:k});al({props:t,state:i}),$1(function(){var A=Ht(t,"isOpen",f1);A&&I.current&&I.current.focus()},[]),$1(function(){S||(R.current=o.length)});var U=pe(function(){v.current.state.isOpen&&s({type:Qa})},[s,v]),M=Jt(function(){return[m,f,I]},[]),V=t5(r,U,M),z=ol("getInputProps","getMenuProps");$1(function(){u||(C.current={})},[u]),$1(function(){var A;!u||!(r!=null&&r.document)||!(I!=null&&(A=I.current)!=null&&A.focus)||r.document.activeElement!==I.current&&I.current.focus()},[u,r]);var j=Jt(function(){return{ArrowDown:function(F){F.preventDefault(),s({type:ml,altKey:F.altKey})},ArrowUp:function(F){F.preventDefault(),s({type:gl,altKey:F.altKey})},Home:function(F){v.current.state.isOpen&&(F.preventDefault(),s({type:vl}))},End:function(F){v.current.state.isOpen&&(F.preventDefault(),s({type:xl}))},Escape:function(F){var $=v.current.state;($.isOpen||$.inputValue||$.selectedItem||$.highlightedIndex>-1)&&(F.preventDefault(),s({type:hl}))},Enter:function(F){var $=v.current.state;!$.isOpen||F.which===229||(F.preventDefault(),s({type:bl}))},PageUp:function(F){v.current.state.isOpen&&(F.preventDefault(),s({type:Ll}))},PageDown:function(F){v.current.state.isOpen&&(F.preventDefault(),s({type:wl}))}}},[s,v]),W=pe(function(A){return le({id:g.labelId,htmlFor:g.inputId},A)},[g]),Z=pe(function(A,F){var $,T=A===void 0?{}:A,Y=T.onMouseLeave,ue=T.refKey,de=ue===void 0?"ref":ue,y=T.ref,B=c1(T,Hc),J=F===void 0?{}:F,ie=J.suppressRefError,be=ie===void 0?!1:ie;return z("getMenuProps",be,de,m),le(($={},$[de]=X1(y,function(Ie){m.current=Ie}),$.id=g.menuId,$.role="listbox",$["aria-labelledby"]=B&&B["aria-label"]?void 0:""+g.labelId,$.onMouseLeave=_e(Y,function(){s({type:m5})}),$),B)},[s,z,g]),D=pe(function(A){var F,$,T=A===void 0?{}:A,Y=T.item,ue=T.index,de=T.refKey,y=de===void 0?"ref":de,B=T.ref,J=T.onMouseMove,ie=T.onMouseDown,be=T.onClick;T.onPress;var Ie=T.disabled,r1=c1(T,Pc);Ie!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var ye=v.current,Te=ye.props,X=ye.state,te=el(Y,ue,Te.items,"Pass either item or index to getItemProps!"),ne=te[0],Ce=te[1],He=Te.isItemDisabled(ne,Ce),De="onClick",Pe=be,Be=function(){V.isTouchEnd||Ce===X.highlightedIndex||(O.current=!1,s({type:g5,index:Ce,disabled:He}))},Xe=function(){s({type:Ml,index:Ce})},Ye=function(Je){return Je.preventDefault()};return le((F={},F[y]=X1(B,function(ge){ge&&(C.current[g.getItemId(Ce)]=ge)}),F["aria-disabled"]=He,F["aria-selected"]=Ce===X.highlightedIndex,F.id=g.getItemId(Ce),F.role="option",F),!He&&($={},$[De]=_e(Pe,Xe),$),{onMouseMove:_e(J,Be),onMouseDown:_e(ie,Ye)},r1)},[s,g,v,V,O]),N=pe(function(A){var F,$=A===void 0?{}:A,T=$.onClick;$.onPress;var Y=$.refKey,ue=Y===void 0?"ref":Y,de=$.ref,y=c1($,Tc),B=v.current.state,J=function(){s({type:h5})};return le((F={},F[ue]=X1(de,function(ie){f.current=ie}),F["aria-controls"]=g.menuId,F["aria-expanded"]=B.isOpen,F.id=g.toggleButtonId,F.tabIndex=-1,F),!y.disabled&&le({},{onClick:_e(T,J)}),y)},[s,v,g]),L=pe(function(A,F){var $,T=A===void 0?{}:A,Y=T.onKeyDown,ue=T.onChange,de=T.onInput,y=T.onBlur;T.onChangeText;var B=T.onClick,J=T.refKey,ie=J===void 0?"ref":J,be=T.ref,Ie=c1(T,Vc),r1=F===void 0?{}:F,ye=r1.suppressRefError,Te=ye===void 0?!1:ye;z("getInputProps",Te,ie,I);var X=v.current.state,te=function(Ye){var ge=ja(Ye);ge&&j[ge]&&j[ge](Ye)},ne=function(Ye){s({type:Il,inputValue:Ye.target.value})},Ce=function(Ye){if(r!=null&&r.document&&X.isOpen&&!V.isMouseDown){var ge=Ye.relatedTarget===null&&r.document.activeElement!==r.document.body;s({type:Qa,selectItem:!ge})}},He=function(){s({type:yl})},De="onChange",Pe={};if(!Ie.disabled){var Be;Pe=(Be={},Be[De]=_e(ue,de,ne),Be.onKeyDown=_e(Y,te),Be.onBlur=_e(y,Ce),Be.onClick=_e(B,He),Be)}return le(($={},$[ie]=X1(be,function(Xe){I.current=Xe}),$["aria-activedescendant"]=X.isOpen&&X.highlightedIndex>-1?g.getItemId(X.highlightedIndex):"",$["aria-autocomplete"]="list",$["aria-controls"]=g.menuId,$["aria-expanded"]=X.isOpen,$["aria-labelledby"]=Ie&&Ie["aria-label"]?void 0:g.labelId,$.autoComplete="off",$.id=g.inputId,$.role="combobox",$.value=X.inputValue,$),Pe,Ie)},[s,g,r,j,v,V,z]),x=pe(function(){s({type:v5})},[s]),w=pe(function(){s({type:L5})},[s]),b=pe(function(){s({type:x5})},[s]),P=pe(function(A){s({type:w5,highlightedIndex:A})},[s]),h=pe(function(A){s({type:Sl,selectedItem:A})},[s]),H=pe(function(A){s({type:b5,inputValue:A})},[s]),q=pe(function(){s({type:I5})},[s]);return{getItemProps:D,getLabelProps:W,getMenuProps:Z,getInputProps:L,getToggleButtonProps:N,toggleMenu:x,openMenu:b,closeMenu:w,setHighlightedIndex:P,setInputValue:H,selectItem:h,reset:q,highlightedIndex:d,isOpen:u,selectedItem:c,inputValue:p}}var S5={activeIndex:-1,selectedItems:[]};function Ki(e,t){return Ht(e,t,S5)}function Gi(e,t){return N1(e,t,S5)}function _c(e){var t=Ki(e,"activeIndex"),o=Ki(e,"selectedItems");return{activeIndex:t,selectedItems:o}}function Wi(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 Dc(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var WI={stateReducer:Vo.stateReducer,itemToKey:Vo.itemToKey,environment:Vo.environment,selectedItems:ee.default.array,initialSelectedItems:ee.default.array,defaultSelectedItems:ee.default.array,getA11yStatusMessage:ee.default.func,activeIndex:ee.default.number,initialActiveIndex:ee.default.number,defaultActiveIndex:ee.default.number,onActiveIndexChange:ee.default.func,onSelectedItemsChange:ee.default.func,keyNavigationNext:ee.default.string,keyNavigationPrevious:ee.default.string},Oc={itemToKey:_o.itemToKey,stateReducer:_o.stateReducer,environment:_o.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},Ec=Oo,kl=0,Hl=1,Pl=2,Tl=3,Vl=4,_l=5,Dl=6,Ol=7,El=8,Bl=9,Al=10,Zl=11,Fl=12,Bc=Object.freeze({__proto__:null,DropdownClick:Ol,DropdownKeyDownBackspace:Dl,DropdownKeyDownNavigationPrevious:_l,FunctionAddSelectedItem:El,FunctionRemoveSelectedItem:Bl,FunctionReset:Fl,FunctionSetActiveIndex:Zl,FunctionSetSelectedItems:Al,SelectedItemClick:kl,SelectedItemKeyDownBackspace:Pl,SelectedItemKeyDownDelete:Hl,SelectedItemKeyDownNavigationNext:Tl,SelectedItemKeyDownNavigationPrevious:Vl});function Ac(e,t,o){var a=o.type,r=o.index,n=o.selectedItem,l=e.activeIndex,i=e.selectedItems,s;switch(a){case kl:s={activeIndex:r};break;case Vl:s={activeIndex:l-1<0?0:l-1};break;case Tl:s={activeIndex:l+1>=i.length?-1:l+1};break;case Pl:case Hl:{if(l<0)break;var u=l;i.length===1?u=-1:l===i.length-1&&(u=i.length-2),s=le({selectedItems:[].concat(i.slice(0,l),i.slice(l+1))},{activeIndex:u});break}case _l:s={activeIndex:i.length-1};break;case Dl:s={selectedItems:i.slice(0,i.length-1)};break;case El:s={selectedItems:[].concat(i,[n])};break;case Ol:s={activeIndex:-1};break;case Bl:{var d=l,c=i.findIndex(function(C){return t.itemToKey(C)===t.itemToKey(n)});if(c<0)break;i.length===1?d=-1:c===i.length-1&&(d=i.length-2),s={selectedItems:[].concat(i.slice(0,c),i.slice(c+1)),activeIndex:d};break}case Al:{var p=o.selectedItems;s={selectedItems:p};break}case Zl:{var m=o.activeIndex;s={activeIndex:m};break}case Fl:s={activeIndex:Gi(t,"activeIndex"),selectedItems:Gi(t,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return le({},e,s)}var Zc=["refKey","ref","onClick","onKeyDown","selectedItem","index"],Fc=["refKey","ref","onKeyDown","onClick","preventKeyAction"];R5.stateChangeTypes=Bc;function R5(e){e===void 0&&(e={}),Ec(e,R5);var t=le({},Oc,e),o=t.getA11yStatusMessage,a=t.environment,r=t.keyNavigationNext,n=t.keyNavigationPrevious,l=Jn(Ac,t,_c,Dc),i=l[0],s=l[1],u=i.activeIndex,d=i.selectedItems,c=Ya(),p=y1(null),m=y1();m.current=[];var C=Do({state:i,props:t});tl(o,i,[u,d],a),$1(function(){c||(u===-1&&p.current?p.current.focus():m.current[u]&&m.current[u].focus())},[u]),al({props:t,state:i});var I=ol("getDropdownProps"),f=Jt(function(){var V;return V={},V[n]=function(){s({type:Vl})},V[r]=function(){s({type:Tl})},V.Delete=function(){s({type:Hl})},V.Backspace=function(){s({type:Pl})},V},[s,r,n]),S=Jt(function(){var V;return V={},V[n]=function(z){Wi(z)&&s({type:_l})},V.Backspace=function(j){Wi(j)&&s({type:Dl})},V},[s,n]),g=pe(function(V){var z,j=V===void 0?{}:V,W=j.refKey,Z=W===void 0?"ref":W,D=j.ref,N=j.onClick,L=j.onKeyDown,x=j.selectedItem,w=j.index,b=c1(j,Zc),P=C.current.state,h=el(x,w,P.selectedItems,"Pass either item or index to getSelectedItemProps!"),H=h[1],q=H>-1&&H===P.activeIndex,A=function(){s({type:kl,index:H})},F=function(T){var Y=ja(T);Y&&f[Y]&&f[Y](T)};return le((z={},z[Z]=X1(D,function($){$&&m.current.push($)}),z.tabIndex=q?0:-1,z.onClick=_e(N,A),z.onKeyDown=_e(L,F),z),b)},[s,C,f]),R=pe(function(V,z){var j,W=V===void 0?{}:V,Z=W.refKey,D=Z===void 0?"ref":Z,N=W.ref,L=W.onKeyDown,x=W.onClick,w=W.preventKeyAction,b=w===void 0?!1:w,P=c1(W,Fc),h=z===void 0?{}:z,H=h.suppressRefError,q=H===void 0?!1:H;I("getDropdownProps",q,D,p);var A=function(T){var Y=ja(T);Y&&S[Y]&&S[Y](T)},F=function(){s({type:Ol})};return le((j={},j[D]=X1(N,function($){$&&(p.current=$)}),j),!b&&{onKeyDown:_e(L,A),onClick:_e(x,F)},P)},[s,S,I]),v=pe(function(V){s({type:El,selectedItem:V})},[s]),k=pe(function(V){s({type:Bl,selectedItem:V})},[s]),O=pe(function(V){s({type:Al,selectedItems:V})},[s]),U=pe(function(V){s({type:Zl,activeIndex:V})},[s]),M=pe(function(){s({type:Fl})},[s]);return{getSelectedItemProps:g,getDropdownProps:R,addSelectedItem:v,removeSelectedItem:k,setSelectedItems:O,setActiveIndex:U,reset:M,selectedItems:d,activeIndex:u}}var $l=0,Nl=1,Ul=2,ql=3,zl=4,jl=5,Kl=6,$c=Object.freeze({__proto__:null,FunctionAddItem:Kl,TagClick:$l,TagGroupKeyDownArrowLeft:Nl,TagGroupKeyDownArrowRight:Ul,TagGroupKeyDownBackspace:zl,TagGroupKeyDownDelete:ql,TagRemoveClick:jl});function Nc(e,t,o){var a=o.type,r;switch(a){case $l:r={activeIndex:o.index};break;case Nl:r={activeIndex:e.activeIndex===0?e.items.length-1:e.activeIndex-1};break;case Ul:r={activeIndex:e.activeIndex===e.items.length-1?0:e.activeIndex+1};break;case zl:case ql:{var n=[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),l=n.length===0?-1:n.length===e.activeIndex?e.activeIndex-1:e.activeIndex;r={items:[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),activeIndex:l};break}case jl:{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 Kl:{var u=[];o.index===void 0?u=[].concat(e.items,[o.item]):u=[].concat(e.items.slice(0,o.index),[o.item],e.items.slice(o.index));var d=e.activeIndex===-1?u.length-1:e.activeIndex;r={items:u,activeIndex:d};break}default:throw new Error("Invalid useTagGroup reducer action.")}return le({},e,r)}var Uc=le({},me),k5=Uc.useId,qc=typeof k5=="function"?zc:jc;function zc(e){var t=e.id,o=e.tagGroupId,a=e.getTagId,r="downshift-"+k5();t||(t=r);var n=me.useMemo(function(){return{tagGroupId:o??t+"-tag-group",getTagId:a??function(l){return t+"-tag-"+l}}},[a,t,o]);return n}function jc(e){var t=e.id,o=e.getTagId,a=e.tagGroupId,r=me.useRef(t??"downshift-"+Xi()),n=r.current,l=me.useMemo(function(){return{tagGroupId:a??n+"-tag-group",getTagId:o??function(i){return n+"-tag-"+i}}},[o,n,a]);return l}function Kc(e){var t,o,a,r,n=(t=(o=e.items)!=null?o:e.initialItems)!=null?t:[],l=(a=(r=e.activeIndex)!=null?r:e.initialActiveIndex)!=null?a:n.length===0?-1:0;return{activeIndex:l,items:n}}function Gc(e,t){return e.activeIndex===t.activeIndex&&e.items===t.items}var H5="tag-group-a11y-description";function Wc(e,t){me.useEffect(function(){if(e){var o=e.createElement("div");return o.setAttribute("id",H5),o.style.display="none",o.textContent=t,e.body.appendChild(o),function(){o.remove()}}},[t,e])}function Xc(e){return le({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 Qc(e,t,o){var a=me.useRef({}),r=me.useRef(e),n=me.useRef(t);return me.useEffect(function(){if(e!==-1&&r.current!==-1&&e!==r.current||n.current===t+1){var l;(l=a.current[o(e)])==null||l.focus()}r.current=e,n.current=t},[e,o,t]),a}var Yc={isItemDisabled:ee.default.func},Jc=["onKeyDown"],e8=["index","refKey","ref","onClick"],t8=["index","onClick"],P5=function(t){var o;t===void 0&&(t={}),Qn(t,P5,Yc);var a=Xc(t),r=Jn(Nc,a,Kc,Gc),n=r[0],l=r[1],i=n.activeIndex,s=n.items,u=Do({state:n,props:a}),d=qc({getTagId:a.getTagId,id:a.id,tagGroupId:a.tagGroupId});Wc((o=a.environment)==null?void 0:o.document,a.removeElementDescription);var c=Qc(i,s.length,d.getTagId),p=pe(function(f){var S=f??{},g=S.onKeyDown,R=c1(S,Jc),v=function(U){switch(U.key){case"ArrowLeft":l({type:Nl});break;case"ArrowRight":l({type:Ul});break;case"Delete":l({type:ql});break;case"Backspace":l({type:zl});break}},k=le({id:d.tagGroupId,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions",role:"listbox",onKeyDown:Wn(g,v)},R);return k},[l,d.tagGroupId]),m=pe(function(f){var S,g=f.index,R=f.refKey,v=R===void 0?"ref":R,k=f.ref,O=f.onClick,U=c1(f,e8);if(!Number.isInteger(g)||g<0)throw new Error("Pass correct item index to getTagProps!");var M=u.current.state,V=function(){l({type:$l,index:g})},z=d.getTagId(g);return le((S={"aria-describedby":H5},S[v]=J4(k,function(j){j&&(c.current[z]=j)}),S["aria-labelledby"]=z,S.role="option",S.id=z,S.onClick=Wn(O,V),S.tabIndex=M.activeIndex===g?0:-1,S),U)},[l,d,u,c]),C=pe(function(f){var S=f.index,g=f.onClick,R=c1(f,t8);if(!Number.isInteger(S)||S<0)throw new Error("Pass correct item index to getTagRemoveProps!");var v=function(M){M.stopPropagation(),l({type:jl,index:S})},k=d.getTagId(S),O=k+"-remove";return le({id:O,tabIndex:-1,"aria-labelledby":O+" "+k,onClick:Wn(g,v)},R)},[d,l]),I=pe(function(f,S){l({type:Kl,item:f,index:S})},[l]);return{activeIndex:i,addItem:I,getTagGroupProps:p,getTagProps:m,getTagRemoveProps:C,items:s}};P5.stateChangeTypes=$c;import to from"react";import{createPortal as o8}from"react-dom";import{jsx as Q1,jsxs as T5}from"react/jsx-runtime";var a8=260,er=4,r8=Q1(w9,{width:9,height:9}),n8=Q1(b9,{width:9,height:9}),l8={ariaReset:"Reset {0} to default"};function i8(e){let t=e.getBoundingClientRect(),o=yt(e),a=o?o.getBoundingClientRect():{top:0,bottom:window.innerHeight},r=a.bottom-t.bottom-er,n=t.top-a.top-er,l=r<a8&&n>r;return{top:l?t.top-er:t.bottom+er,left:t.left,width:t.width,openAbove:l}}function oo({label:e,options:t,selectedItem:o,onChange:a,id:r="picklist",getOptionStyle:n,triggerLabel:l,triggerMuted:i=!1,triggerStyle:s,aria:u}){let[d,c]=to.useState({top:0,left:0,width:0,openAbove:!1}),p=to.useRef(null),m=`${r}-legend`,C=p1(l8,u),I=Oe(C.ariaReset,[e]),f=to.useMemo(()=>t.filter(Z=>Z.value!==""),[t]),S=o!=null,g=()=>{p.current?.focus(),a("")},{isOpen:R,closeMenu:v,highlightedIndex:k,getToggleButtonProps:O,getMenuProps:U,getItemProps:M}=Ja({items:f,itemToString:Z=>Z?Z.label:"",selectedItem:o,onSelectedItemChange:({selectedItem:Z})=>{typeof a=="function"&&Z&&Z.value!==o?.value&&a(Z.value)},onIsOpenChange:({isOpen:Z})=>{Z&&p.current&&c(i8(p.current))},id:r,labelId:m});to.useEffect(()=>{if(!R||!p.current)return;let Z=yt(p.current);if(!Z)return;let D=()=>v();return Z.addEventListener("scroll",D,{passive:!0}),()=>Z.removeEventListener("scroll",D)},[R,v]);let V="picklistEditor-dropdown"+(R?" picklistEditor-dropdown--open":""),z=R?{top:d.top,left:d.left,width:d.width,...d.openAbove?{transform:"translateY(-100%)"}:void 0}:void 0,[j,W]=to.useState(null);return to.useLayoutEffect(()=>{let D=p.current?.getRootNode();W(D instanceof ShadowRoot?D:document.body)},[]),Q1(v1,{label:e,id:r,className:"picklistEditor-fieldset",children:T5("div",{className:"picklistEditor-wrapper",children:[T5("button",{type:"button",className:"picklistEditor-trigger",style:s,...O({ref:p}),children:[Q1("span",{className:"picklistEditor-trigger-label"+(i?" picklistEditor-trigger-label--muted":""),children:l??o?.label??"Default"}),Q1("span",{className:"picklistEditor-trigger-chevron","aria-hidden":"true",children:R?n8:r8})]}),S&&Q1("button",{type:"button",className:"picklistEditor-reset",onClick:g,"aria-label":I,title:I,children:Q1(m9,{width:14,height:14})}),o8(Q1("ul",{className:V,style:z,...U(),children:R&&f.map((Z,D)=>Q1("li",{className:"picklistEditor-option"+(k===D?" picklistEditor-option--highlighted":"")+(o?.value===Z.value?" picklistEditor-option--selected":""),style:n?n(Z):void 0,...M({item:Z,index:D}),children:Z.label},Z.value))}),j??document.body)]})})}import{jsx as c8}from"react/jsx-runtime";var s8=[{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 V5(e){return(e.split(",")[0]??"").trim().replace(/['"]/g,"")}function u8(e,t){if(!e)return null;let o=e.replace(/['"]/g,""),a=V5(e);for(let r of t){if(!r.value)continue;let n=r.value.replace(/['"]/g,"");if(o.indexOf(n)!==-1||n.indexOf(a)!==-1)return r}return null}var d8=e=>e.value?{fontFamily:e.value}:void 0;function _5({label:e="Font family",value:t,computedValue:o,options:a,onChange:r,matchOption:n=u8,id:l="font-family",aria:i}){let s=a??s8,u=n(t,s),d=t||o,c=n(d,s),p=!u,m;return c?m=c.label:d&&(m=V5(d)||void 0),c8(oo,{label:e,options:s,selectedItem:u,triggerLabel:m,triggerMuted:p,triggerStyle:d?{fontFamily:d}:void 0,onChange:r,id:l,getOptionStyle:d8,aria:i})}import{jsx as Gl}from"react/jsx-runtime";var f8=[{value:"normal",labelKey:"normal",defaultLabel:"Normal",icon:Gl(l9,{width:14,height:14})},{value:"italic",labelKey:"italic",defaultLabel:"Italic",icon:Gl(n9,{width:14,height:14})}];function D5({label:e="Font Style",value:t,onChange:o,id:a="font-style",optionLabels:r}){let n=f8.map(l=>({value:l.value,label:r?.[l.labelKey]??l.defaultLabel,icon:l.icon}));return Gl(D1,{label:e,options:n,value:t||"normal",onChange:o,id:a})}import{jsx as g8}from"react/jsx-runtime";var p8=[{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 C8(e){return p8.map(t=>{let o=e?.[t.labelKey]??t.defaultWord;return{value:t.value,label:`${o} (${t.value})`}})}function m8(e,t){if(!e)return null;let o=String(e).trim();return t.find(a=>a.value===o)??null}function O5({label:e="Font weight",value:t,computedValue:o,options:a,onChange:r,matchOption:n=m8,id:l="font-weight",optionLabels:i,aria:s}){let u=a??C8(i),d=n(t,u),c=n(t||o,u),p=!d,m=c?.label;return g8(oo,{label:e,options:u,selectedItem:d,triggerLabel:m,triggerMuted:p,onChange:r,id:l,aria:s})}import se from"react";import{createPortal as h8}from"react-dom";import{jsx as re,jsxs as Qe}from"react/jsx-runtime";var v8={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",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}"},ao=["local","url"];function x8({labels:e,workspaceName:t,folderId:o,portalTarget:a,folderItemsResult:r,contentDetail:n,thumbnailResult:l,onFetchFolderItems:i,onFetchContentDetail:s,onFetchThumbnail:u,onCancel:d,onConfirm:c}){let[p,m]=se.useState([]),[C,I]=se.useState(0),[f,S]=se.useState(!0),[g,R]=se.useState(!1),[v,k]=se.useState(null),[O,U]=se.useState(null),[M,V]=se.useState({}),[z,j]=se.useState({}),W=se.useRef(new Set),Z=se.useRef(new Set),D=se.useCallback(b=>{g||typeof i=="function"&&(R(!0),k(null),i(o,b,20))},[o,g,i]);se.useEffect(()=>{D(0)},[o]),se.useEffect(()=>{let b=P=>{P.key==="Escape"&&(P.stopPropagation(),d())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[d]);let N=se.useRef(null);se.useEffect(()=>{N.current?.focus()},[]),se.useEffect(()=>{if(!r)return;let b=(r.items??[]).map(P=>({contentKey:P.contentKey,title:P.title??e.untitled,mimeType:P.mimeType??"image/png"}));m(P=>r.page===0?b:[...P,...b]),S(!!r.hasMore),I(r.page??0),R(!1),r.error&&k(String(r.error))},[r]),se.useEffect(()=>{if(!n)return;let b=n.contentKey;if(!b||n.error)return;let P=n.url??"",h=n.mimeType??"image/png",H=n.title??"";V(q=>q[b]?q:{...q,[b]:{url:P,mimeType:h,title:H}}),P&&!Z.current.has(b)&&typeof u=="function"&&(Z.current.add(b),u(b,P,h))},[n,u]),se.useEffect(()=>{if(!l)return;let{imageId:b,thumbnailUrl:P}=l;b&&P&&j(h=>({...h,[b]:P}))},[l]);let L=se.useRef(null);se.useEffect(()=>{let b=L.current;if(!b||!f||g)return;let P=new IntersectionObserver(h=>{h.some(q=>q.isIntersecting)&&D(C+1)});return P.observe(b),()=>P.disconnect()},[f,g,C,D]);let x=se.useCallback(b=>{W.current.has(b)||typeof s=="function"&&(W.current.add(b),s(b))},[s]),w=()=>{if(!O)return;let b=M[O],P=p.find(h=>h.contentKey===O);!b||!P||c({contentKey:O,title:P.title,url:b.url,mimeType:b.mimeType||P.mimeType})};return h8(re("div",{ref:N,tabIndex:-1,className:"cmsPicker-overlay",role:"dialog","aria-modal":"true","aria-label":Oe(e.pickerTitle,[t]),onClick:b=>{b.target===b.currentTarget&&d()},children:Qe("div",{className:"cmsPicker-dialog",children:[Qe("div",{className:"cmsPicker-header",children:[re("span",{className:"cmsPicker-title",children:Oe(e.pickerTitle,[t])}),re("button",{type:"button",className:"cmsPicker-close",onClick:d,"aria-label":e.closePicker,title:e.closePicker,children:"\u2715"})]}),Qe("div",{className:"cmsPicker-body",children:[p.length===0&&g&&re("div",{className:"cmsPicker-empty",children:e.loadingImages}),p.length===0&&!g&&!v&&re("div",{className:"cmsPicker-empty",children:e.noImages}),v&&re("div",{className:"cmsPicker-empty",children:Oe(e.pickerError,[v])}),Qe("div",{className:"cmsPicker-grid",children:[p.map(b=>re(L8,{item:b,selected:O===b.contentKey,thumbnailDataUrl:z[b.contentKey],onIntersect:()=>x(b.contentKey),onClick:()=>U(b.contentKey)},b.contentKey)),f&&re("div",{className:"cmsPicker-sentinel",ref:L,children:g?e.loadingMore:""})]})]}),Qe("div",{className:"cmsPicker-footer",children:[re("button",{type:"button",className:"cmsPicker-btn",onClick:d,children:e.cancel}),re("button",{type:"button",className:"cmsPicker-btn cmsPicker-btn--primary",disabled:!O||!M[O??""],onClick:w,children:e.done})]})]})}),a)}function L8({item:e,selected:t,thumbnailDataUrl:o,onIntersect:a,onClick:r}){let n=se.useRef(null),l=se.useRef(!1);return se.useEffect(()=>{let i=n.current;if(!i||l.current)return;let s=new IntersectionObserver(u=>{u.some(c=>c.isIntersecting)&&!l.current&&(l.current=!0,a(),s.disconnect())});return s.observe(i),()=>s.disconnect()},[a]),Qe("button",{ref:n,type:"button",className:`cmsPicker-thumb${t?" cmsPicker-thumb--selected":""}`,onClick:r,title:e.title,"aria-pressed":t,children:[re("div",{className:"cmsPicker-thumb-img",children:o?re("img",{src:o,alt:e.title}):re("div",{className:"cmsPicker-thumb-placeholder","aria-hidden":"true",children:"\u2026"})}),re("span",{className:"cmsPicker-thumb-label",children:e.title})]})}function w8({labels:e,spaces:t,spacesLoading:o,selectedSpaceId:a,onSpaceSelect:r,onOpenPicker:n}){return o?re("div",{className:"imageEditor-cms",children:re("div",{className:"imageEditor-cms-loading",children:e.loadingWorkspaces})}):t.length===0?re("div",{className:"imageEditor-cms",children:re("div",{className:"imageEditor-cms-empty",children:e.noWorkspaces})}):Qe("div",{className:"imageEditor-cms",children:[Qe("div",{className:"imageEditor-cms-channel",children:[re("label",{className:"imageEditor-cms-channel-label",htmlFor:"cms-space-select",children:e.workspace}),Qe("select",{id:"cms-space-select",className:"imageEditor-input imageEditor-cms-channel-select",value:a,onChange:l=>r(l.target.value),children:[re("option",{value:"",children:e.selectWorkspace}),t.map(l=>re("option",{value:l.id,children:l.name},l.id))]})]}),re("button",{type:"button",className:"imageEditor-cms-pick-btn",onClick:n,disabled:!a,children:e.selectImage})]})}function b8({labels:e,preview:t,onPick:o,onApply:a}){return Qe("div",{className:"imageEditor-local",children:[re("button",{className:"imageEditor-local-pick",onClick:o,type:"button","aria-label":e.ariaChooseFile,"aria-haspopup":"dialog",children:e.chooseFile}),t&&Qe("div",{className:"imageEditor-local-preview",children:[re("img",{src:t.webviewUri,alt:t.fileName,className:"imageEditor-preview-thumb"}),re("span",{className:"imageEditor-local-filename",children:t.fileName}),re("button",{className:"imageEditor-local-apply",onClick:()=>a(t.devUrl||t.webviewUri),type:"button",children:e.useThisImage})]})]})}function E5({src:e,alt:t,className:o}){let[a,r]=se.useState(!1);return se.useEffect(()=>{r(!1)},[e]),a?null:re("img",{src:e,alt:t,className:o,onError:()=>r(!0)})}function I8({labels:e,input:t,onInputChange:o,onApply:a,currentUrl:r}){return Qe("div",{className:"imageEditor-url",children:[re("input",{type:"text",value:t,"aria-label":e.ariaImageUrl,placeholder:e.urlPlaceholder,className:"imageEditor-input",onChange:n=>o(n.target.value),onKeyDown:n=>{n.key==="Enter"&&t&&a(t)},onBlur:()=>{t&&t!==r&&a(t)}}),t&&re("div",{className:"imageEditor-url-preview",children:re(E5,{src:t,alt:e.previewAlt,className:"imageEditor-preview-thumb"})})]})}function y8({id:e,label:t,value:o,placeholder:a,onCommit:r}){let[n,l]=se.useState(o),i=se.useRef(r);i.current=r;let s=se.useRef(o);se.useEffect(()=>{o!==s.current&&(s.current=o,l(o))},[o]);let u=()=>{n!==o&&(s.current=n,i.current(n))};return Qe("div",{className:"imageEditor-attr",children:[re("label",{className:"imageEditor-attr-label",htmlFor:e,children:t}),re("input",{id:e,type:"text",value:n,placeholder:a,className:"imageEditor-input",onChange:d=>l(d.target.value),onKeyDown:d=>{d.key==="Enter"&&u()},onBlur:u})]})}function M8({labels:e,attributes:t,onAttributeChange:o}){return re("div",{className:"imageEditor-attrs",children:re(y8,{id:"design-img-alt",label:e.altText,value:t.alt,placeholder:e.altPlaceholder,onCommit:a=>o("alt",a)})})}function Wl({label:e,value:t,onChange:o,id:a="image",attributes:r,onAttributeChange:n,cmsSpaces:l,cmsSpacesLoading:i,onFetchCmsSpaces:s,cmsFolderItemsResult:u,onFetchCmsFolderItems:d,cmsContentDetail:c,onFetchCmsContentDetail:p,cmsThumbnailResult:m,onFetchCmsThumbnail:C,onImportCmsImage:I,cmsImportResult:f,onPickLocalFile:S,localPreview:g,imageLabels:R}){let v=p1(v8,R),k={cms:v.tabCms,local:v.tabLocal,url:v.tabUrl},[O,U]=se.useState("local"),[M,V]=se.useState(""),[z,j]=se.useState(!1),[W,Z]=se.useState(""),[D,N]=se.useState("idle"),L=se.useRef(null),x=se.useRef(null),w=se.useCallback(()=>{let T=x.current?.getRootNode();return T instanceof ShadowRoot?T:document.body},[]),b=se.useRef({}),P=se.useCallback(T=>{U(T),b.current[T]?.focus()},[]),h=se.useCallback((T,Y)=>{let ue=null;switch(T.key){case"ArrowRight":ue=(Y+1)%ao.length;break;case"ArrowLeft":ue=(Y-1+ao.length)%ao.length;break;case"Home":ue=0;break;case"End":ue=ao.length-1;break;default:return}T.preventDefault();let de=ao[ue];de&&P(de)},[P]),H=l??[],q=i??!1,A=t||"";se.useEffect(()=>{if(f)if(f.success&&f.devUrl)o(f.devUrl),N("success");else{let T=L.current?.url;T?(o(T),N("success")):N("error")}},[f,o]),se.useEffect(()=>{O==="cms"&&H.length===0&&!q&&typeof s=="function"&&s()},[O]);let F=se.useMemo(()=>H.find(T=>T.id===M)??null,[H,M]),$=se.useCallback(T=>{let Y={id:T.contentKey,title:T.title,url:T.url,thumbnailUrl:"",contentType:T.mimeType};L.current=Y,j(!1),typeof I=="function"&&Y.url?(N("importing"),I(Y)):Y.url&&o(Y.url)},[o,I]);return re(v1,{label:e,id:a,className:"imageEditor-fieldset",children:Qe("div",{ref:x,className:"imageEditor-root",children:[A&&Qe("div",{className:"imageEditor-current",children:[re(E5,{src:A,alt:"",className:"imageEditor-current-thumb"}),re("span",{className:"imageEditor-current-url",title:A,children:A.length>30?`...${A.slice(-30)}`:A}),re("button",{className:"imageEditor-clear",onClick:()=>o(""),title:v.clearImage,"aria-label":v.clearImage,type:"button",children:"\u2715"})]}),re("div",{className:"imageEditor-tabs",role:"tablist","aria-label":v.ariaTablist,children:ao.map((T,Y)=>re("button",{id:`${a}-tab-${T}`,ref:ue=>{b.current[T]=ue},role:"tab",type:"button","aria-selected":O===T,"aria-controls":`${a}-tabpanel`,tabIndex:O===T?0:-1,className:`imageEditor-tab${O===T?" imageEditor-tab--active":""}`,onClick:()=>U(T),onKeyDown:ue=>h(ue,Y),children:k[T]},T))}),Qe("div",{className:"imageEditor-tab-content",role:"tabpanel",id:`${a}-tabpanel`,"aria-labelledby":`${a}-tab-${O}`,children:[O==="cms"&&re(w8,{labels:v,spaces:H,spacesLoading:q,selectedSpaceId:M,onSpaceSelect:V,onOpenPicker:()=>j(!0)}),O==="cms"&&D==="importing"&&re("div",{className:"imageEditor-cms-loading",children:v.downloadingImage}),O==="cms"&&D==="error"&&re("div",{className:"imageEditor-cms-empty",children:v.downloadFailed}),O==="local"&&re(b8,{labels:v,preview:g,onPick:()=>S?.(),onApply:T=>o(T)}),O==="url"&&re(I8,{labels:v,input:W,onInputChange:Z,onApply:o,currentUrl:A})]}),r&&n&&re(M8,{labels:v,attributes:r,onAttributeChange:n}),z&&F&&re(x8,{labels:v,workspaceName:F.name,folderId:F.rootFolderId,portalTarget:w(),folderItemsResult:u,contentDetail:c,thumbnailResult:m,onFetchFolderItems:d,onFetchContentDetail:p,onFetchThumbnail:C,onCancel:()=>j(!1),onConfirm:$})]})})}import{jsx as k8}from"react/jsx-runtime";var S8=[{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 R8(e){return S8.map(t=>({value:t.value,label:e?.[t.labelKey]??t.defaultLabel}))}function B5(e,t){if(!e)return null;let o=String(e).trim().toLowerCase();return t.find(a=>a.value===o)??null}function A5({label:e="Content Overflow",value:t,computedValue:o,onChange:a,id:r="overflow",optionLabels:n,aria:l}){let i=R8(n),s=B5(t,i),u=B5(t||o,i),d=!s,c=u?.label;return k8(oo,{label:e,options:i,selectedItem:s,triggerLabel:c,triggerMuted:d,onChange:a,id:r,aria:l})}import{jsx as Eo}from"react/jsx-runtime";var H8=[{value:"left",labelKey:"left",defaultLabel:"Left",icon:Eo(x9,{width:14,height:14})},{value:"center",labelKey:"center",defaultLabel:"Center",icon:Eo(h9,{width:14,height:14})},{value:"right",labelKey:"right",defaultLabel:"Right",icon:Eo(L9,{width:14,height:14})},{value:"justify",labelKey:"justify",defaultLabel:"Justify",icon:Eo(v9,{width:14,height:14})}],P8={start:"left",end:"right"};function Z5({label:e="Text Align",value:t,onChange:o,id:a="text-align",optionLabels:r}){let n=P8[t||""]||t||"left",l=H8.map(i=>({value:i.value,label:r?.[i.labelKey]??i.defaultLabel,icon:i.icon}));return Eo(D1,{label:e,options:l,value:n,onChange:o,id:a})}import{jsx as tr}from"react/jsx-runtime";var F5=[{value:"none",labelKey:"none",defaultLabel:"None",icon:tr(Y1,{width:14,height:14})},{value:"underline",labelKey:"underline",defaultLabel:"Underline",icon:tr(I9,{width:14,height:14})},{value:"line-through",labelKey:"lineThrough",defaultLabel:"Line Through",icon:tr(g9,{width:14,height:14})}];function T8(e){if(!e)return"none";for(let t of F5)if(e===t.value||e.startsWith(t.value+" "))return t.value;return"none"}function $5({label:e="Text Decoration",value:t,onChange:o,id:a="text-decoration",optionLabels:r}){let n=F5.map(l=>({value:l.value,label:r?.[l.labelKey]??l.defaultLabel,icon:l.icon}));return tr(D1,{label:e,options:n,value:T8(t),onChange:o,id:a})}import{jsx as Bo}from"react/jsx-runtime";var V8=[{value:"none",labelKey:"none",defaultLabel:"None",icon:Bo(Y1,{width:14,height:14})},{value:"uppercase",labelKey:"uppercase",defaultLabel:"Uppercase",icon:Bo(f9,{width:14,height:14})},{value:"lowercase",labelKey:"lowercase",defaultLabel:"Lowercase",icon:Bo(c9,{width:14,height:14})},{value:"capitalize",labelKey:"capitalize",defaultLabel:"Capitalize",icon:Bo(d9,{width:14,height:14})}];function N5({label:e="Text Case",value:t,onChange:o,id:a="text-transform",optionLabels:r}){let n=V8.map(l=>({value:l.value,label:r?.[l.labelKey]??l.defaultLabel,icon:l.icon}));return Bo(D1,{label:e,options:n,value:t||"none",onChange:o,id:a})}var U5="textContent";var _8=e=>e!=null&&typeof e=="object"&&"property"in e,D8=e=>typeof e?.sourceFile=="string"&&e.sourceFile!==""&&e.lineNumber!=null&&e.columnNumber!=null?{sourceFile:e.sourceFile,lineNumber:e.lineNumber,columnNumber:e.columnNumber}:void 0;function q5(e){let t=[],o=new Map,a=n=>{let l=D8(n);if(!l)return;let{sourceFile:i,lineNumber:s,columnNumber:u}=l,d=`${i}\0${s}:${u}`,c=o.get(d);return c||(c={byProperty:new Map,baselineByProperty:new Map,debugSource:l},o.set(d,c),t.push(c)),c},r=(n,l,i)=>{n.baselineByProperty.has(l)||n.baselineByProperty.set(l,String(i??""))};for(let n of e){let l=n.data;if(n.type==="style"&&l?.property!=null){let i=a(l);if(i){let s=String(l.property);r(i,s,n.oldValue),i.byProperty.set(s,String(n.newValue??""))}}else if(n.type==="style-batch"&&Array.isArray(l?.changes)){let i=a(l);for(let s of l.changes)if(i&&_8(s)&&s.property!=null){let u=String(s.property);r(i,u,s.oldValue),i.byProperty.set(u,String(s.newValue??""))}}else n.type==="text"&&a(l)?.byProperty.set(U5,String(n.newValue??""))}return t.map(n=>{let l=[...n.byProperty].map(([i,s])=>({property:i,value:s})).filter(i=>i.property===U5||i.value!==""||n.baselineByProperty.get(i.property)!=="");return{debugSource:n.debugSource,commands:l}}).filter(n=>n.commands.length>0)}var gt={CHANGED:"history-changed",COMMAND_PUSHED:"command-pushed",COMMAND_UNDONE:"command-undone",COMMAND_REDONE:"command-redone",CLEARED:"history-cleared"},or=class{constructor(t={}){vt(this,"undoStack",[]);vt(this,"redoStack",[]);vt(this,"maxHistorySize");vt(this,"listeners",new Set);vt(this,"_isProcessing",!1);vt(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 n of r)try{n(a)}catch(l){console.error("[HistoryManager] Error in listener:",l)}}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.length>=this.maxHistorySize||(this.undoStack.push(t),this.redoStack=[],this._notify(gt.COMMAND_PUSHED,{command:t}),this._notify(gt.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(gt.COMMAND_UNDONE,{command:t,appliedValue:t.oldValue}),this._notify(gt.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(gt.COMMAND_REDONE,{command:t,appliedValue:t.newValue}),this._notify(gt.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(gt.CLEARED),this._notify(gt.CHANGED)}getUndoCount(){return this.undoStack.length}getMaxHistorySize(){return this.maxHistorySize}getRedoCount(){return this.redoStack.length}getUndoStackSnapshot(){return this.undoStack.map(t=>({type:t.type,oldValue:t.oldValue,newValue:t.newValue,data:t.data}))}};var O8=(e,t)=>{let o=t?e.oldValue:e.newValue;return typeof o=="string"?o:String(o??"")},ar=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",B8=e=>typeof e=="object"&&e!==null&&Array.isArray(e.changes)&&e.changes.every(t=>t!=null&&typeof t.property=="string"),A8=e=>typeof e=="object"&&e!==null&&"tag"in e&&typeof e.tag=="string"&&"attribute"in e&&typeof e.attribute=="string",z5=(e,t,o)=>{let a=new Map;return{execute:(r,n)=>{let l=O8(r,n);a.set(r.id,l);try{if(r.type==="style"&&E8(r.data)){let i=ar(r.data);return e(r.data.property,l,i),!0}else if(r.type==="style-batch"&&B8(r.data)){let i=ar(r.data);for(let s of r.data.changes)e(s.property,n?s.oldValue:s.newValue,i);return!0}else if(r.type==="text"){let i=ar(r.data);return t(l,i),!0}else if(r.type==="media"&&A8(r.data)){if(!o)return!1;let i=ar(r.data);return o(r.data.tag,{[r.data.attribute]:l},i),!0}}catch{return!1}return!1},getCurrentValue:r=>a.get(r.id)??r.newValue,canHandle:r=>r==="style"||r==="style-batch"||r==="text"||r==="media"&&typeof o=="function"}};function j5(e,t,o){let a=z5(e,t,o),r=new or({commandExecutor:a});return{recordStyleChange(n,l,i,s){let u=r.createCommand("style",l,i,{...s,property:n});r.pushCommand(u)},recordStyleBatch(n,l){if(n.length===0)return;let i=n[0],s=r.createCommand("style-batch",i.oldValue,i.newValue,{...l,changes:n});r.pushCommand(s)},recordTextChange(n,l,i){let s=r.createCommand("text",n,l,{...i});r.pushCommand(s)},recordMediaChange(n,l,i,s,u){let d=r.createCommand("media",i,s,{...u,tag:n,attribute:l});r.pushCommand(d)},undo:()=>r.undo(),redo:()=>r.redo(),canUndo:()=>r.canUndo(),canRedo:()=>r.canRedo(),subscribe:n=>r.subscribe(n),getHistoryStack:()=>r.getUndoStackSnapshot(),clear:()=>r.clear(),getUndoCount:()=>r.getUndoCount(),getMaxHistorySize:()=>r.getMaxHistorySize()}}var Xl=`url\\(\\s*(['"]?)([^'")]+)\\1\\s*\\)`,Z8=new RegExp(Xl,"i");function rr(e){let t=[],o=0,a="";for(let r of e)r==="("?o++:r===")"&&o--,r===","&&o===0?(t.push(a.trim()),a=""):a+=r;return a.trim()!==""&&t.push(a.trim()),t}function Ql(e){let t=rr((e??"").trim());for(let o=0;o<t.length;o++){let a=t[o]??"",r=Z8.exec(a);if(r?.[2])return{index:o,layer:a,path:r[2].trim()}}return null}var F8=new RegExp(Xl,"i");function $8(e,t){let o=`url("${t}")`,a=(e??"").trim();if(!_1(a))return o;let r=Ql(a),n=rr(a);return r?n.map((l,i)=>i===r.index?l.replace(F8,()=>o):l).join(", "):[o,...n].join(", ")}function N8(e){let t=(e??"").trim();if(!_1(t))return"none";let o=Ql(t);if(!o)return t;let a=rr(t);return a.splice(o.index,1),a.length===0?"none":a.join(", ")}function K5(e,t){return t.trim()===""?N8(e):$8(e,t)}import{Fragment as nf,jsx as Q,jsxs as Ke}from"react/jsx-runtime";var q8="Edit this element's text on the canvas.",z8="You can't edit this element's text because it contains dynamic content.",j8={opacity:.4},K8=new Set(R9),G8="designMode.imageSourceEditorEnabled",W8=!1;function X8(){try{let e=window.localStorage.getItem(G8);return e==null?void 0:e==="true"}catch{return}}var Q8={general:{headerTitle:"Selected Element",emptyPlaceholder:"To edit an element, select it on the canvas.",inlineEditEditable:q8,inlineEditNonEditable:z8,addToChatContext:"Add to chat as context",ariaPropertyPanel:"Property panel",ariaSelectedComponent:"Property panel for the selected element",ariaElementStyling:"Element properties",closePanel:"Close panel"},sections:{imageSource:"Image Source",background:"Background",spacing:"Layout",border:"Border",typography:"Text",elementDimensions:"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 Case",lineHeight:"Line Height",letterSpacing:"Letter Spacing",width:"Width",minWidth:"Minimum Width",maxWidth:"Maximum Width",height:"Height",minHeight:"Minimum Height",maxHeight:"Maximum Height",overflow:"Content Overflow"},history:{changeLimitTitle:"You're at the edit limit",changeLimitBody:"To continue editing, save your changes."}};function Y8({size:e=16}){return Q("svg",{width:e,height:e,viewBox:"-1 0 252 302",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:Q("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 J8({size:e=12}){return Q("svg",{width:e,height:e,viewBox:"0 0 12 12","aria-hidden":"true",style:{display:"block",flexShrink:0},children:Q("rect",{x:"1",y:"1",width:"10",height:"10",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"2.5 2"})})}function ef(e,t){let o=e[t];return o!=null?String(o):""}function Yl(e){if(!(!e||!e.name||!e.debugSource))return{sourceFile:e.debugSource.sourceFile,lineNumber:e.debugSource.lineNumber,columnNumber:e.debugSource.columnNumber,componentName:e.name,tagName:e.tagName}}function tf({component:e,onOpenSourceFile:t,showOpenSourceFile:o,showComponentName:a,generalLabels:r}){if(!e||!e.name)return Q("section",{id:"property-panel-selected-component",className:"property-panel-selected-component",children:Q("p",{className:"property-panel-selected-component-placeholder",id:"component-info",children:r.emptyPlaceholder})});let n=e.tagName?e.tagName.toLowerCase():"",l=n?`${e.name} > ${n}`:e.name,i=null;if(o&&e.debugSource){let{sourceFile:s,lineNumber:u,columnNumber:d}=e.debugSource,c=s.split("/").pop()||s,p=`:${u}:${d}`;i=Ke("a",{href:"#",className:"property-panel-selected-component-source",onClick:C=>{C.preventDefault(),t?.({sourceFile:s,lineNumber:u,columnNumber:d})},title:`${s}${p}`,children:[c,p]})}return!a&&!i?null:Q("section",{id:"property-panel-selected-component",className:"property-panel-selected-component","aria-label":r.ariaSelectedComponent,children:Ke("div",{id:"component-info",className:"property-panel-selected-component-info",children:[a&&Q("span",{className:"property-panel-selected-component-name",children:l}),i&&Ke("span",{className:"property-panel-selected-component-source-row",children:["\u21B3 ",i]})]})})}var of=ve.forwardRef(function({title:t,body:o},a){return Ke("section",{ref:a,role:"alert","aria-live":"assertive","aria-labelledby":"property-panel-change-limit-title",className:"property-panel-change-limit-message",tabIndex:-1,children:[Q("svg",{className:"property-panel-change-limit-icon",viewBox:"0 0 520 520",fill:"currentColor","aria-hidden":"true",focusable:"false",children:Q("path",{d:"M260 20a240 240 0 100 480 240 240 0 100-480m0 121c17 0 30 13 30 30s-13 30-30 30-30-13-30-30 13-30 30-30m50 210c0 5-4 9-10 9h-80c-5 0-10-3-10-9v-20c0-5 4-11 10-11 5 0 10-3 10-9v-40c0-5-4-11-10-11-5 0-10-3-10-9v-20c0-5 4-11 10-11h60c5 0 10 5 10 11v80c0 5 4 9 10 9 5 0 10 5 10 11z"})}),Ke("div",{className:"property-panel-change-limit-content",children:[Q("h2",{id:"property-panel-change-limit-title",className:"property-panel-change-limit-title",children:t}),Q("p",{className:"property-panel-change-limit-body",children:o})]})]})});function af({styles:e,computedStyles:t,inlineOrigin:o,hasSelection:a,onStyleChange:r,generalLabels:n,sectionLabels:l,instanceLabels:i,editorLabels:s,component:u,onImageAttributeChange:d,imageSource:c,imageSourceEditorEnabled:p}){let m=a?"visible":"",C=p&&u?.media?.tag==="img"?u.media:null,I=p&&u?.media?.tag==="background-image"?u.media:null,f=h=>o.has(h)?"":t[h]??"",S=e.backgroundImage||t.backgroundImage,g=e.backgroundClip||t.backgroundClip,R=An(S??"",g??"","text"),v=R!=="",k=xi(S??"",g??""),O=Zn(S??"",g??""),U=_1(k)?"rgba(0, 0, 0, 0)":"#ffffff",M=h=>hi(h)?h:void 0,V=M(e.backgroundColor),z=M(t.backgroundColor),j=M(e.color),W=M(t.color),Z=e.webkitTextFillColor||t.webkitTextFillColor,D=e.color||t.color,N=Fn(Z,D),L=M(e.borderColor),x=M(t.borderColor),w=e.borderImageSource||t.borderImageSource,b=_1(w)?w:yi(g)&&An(S??"",g||"","border-box")||void 0,P=_1(b)?"rgba(0, 0, 0, 0)":"#000000";return Q("section",{className:"property-panel-style-properties-container"+(m?" "+m:""),"aria-label":n.ariaElementStyling,"aria-hidden":!a,children:Ke("div",{className:"property-panel-style-properties",children:[Ke(J1,{title:l.typography,children:[Q(_5,{label:i.fontFamily,id:"design-font-family",value:e.fontFamily,computedValue:f("fontFamily"),onChange:h=>r("fontFamily",h),aria:s?.picklist}),Q(F1,{label:i.fontSize,id:"design-font-size",value:e.fontSize,placeholder:f("fontSize"),onChange:h=>r("fontSize",h),...O1.fontSize,aria:s?.dimension}),Q(O5,{label:i.fontWeight,id:"design-font-weight",value:e.fontWeight,computedValue:f("fontWeight"),onChange:h=>r("fontWeight",h),optionLabels:s?.fontWeight?.options,aria:s?.picklist}),Q(D5,{label:i.fontStyle,id:"design-font-style",value:e.fontStyle||t.fontStyle,onChange:h=>r("fontStyle",h),optionLabels:s?.fontStyle?.options}),Q(Ta,{label:i.textColor,value:N?Z:j||W||(v?"rgba(0, 0, 0, 0)":"#000000"),onChange:h=>r("color",h),id:"design-text-color",aria:s?.color,backgroundImage:v?R:void 0}),Q(Z5,{label:i.textAlignment,id:"design-text-align",value:e.textAlign||t.textAlign,onChange:h=>r("textAlign",h),optionLabels:s?.textAlignment?.options}),Q($5,{label:i.textFormatting,id:"design-text-decoration",value:e.textDecoration||t.textDecoration,onChange:h=>r("textDecoration",h),optionLabels:s?.textDecoration?.options}),Q(N5,{label:i.textTransform,id:"design-text-transform",value:e.textTransform||t.textTransform,onChange:h=>r("textTransform",h),optionLabels:s?.textTransform?.options}),Q(F1,{label:i.lineHeight,id:"design-line-height",value:e.lineHeight,placeholder:f("lineHeight"),onChange:h=>r("lineHeight",h),...O1.lineHeight,aria:s?.dimension}),Q(F1,{label:i.letterSpacing,id:"design-letter-spacing",value:e.letterSpacing,placeholder:f("letterSpacing"),onChange:h=>r("letterSpacing",h),...O1.letterSpacing,aria:s?.dimension})]}),Ke(J1,{title:l.spacing,children:[Q(co,{label:i.padding,id:"design-padding",value:e.padding,placeholder:f("padding"),onChange:h=>r("padding",h),...so.padding,aria:s?.boxDimension}),Q(co,{label:i.margin,id:"design-margin",value:e.margin,placeholder:f("margin"),onChange:h=>r("margin",h),...so.margin,allowAuto:!0,aria:s?.boxDimension})]}),Ke(J1,{title:l.elementDimensions,children:[Q(F1,{label:i.width,id:"design-width",value:e.width,placeholder:f("width"),onChange:h=>r("width",h),...O1.width,aria:s?.dimension}),Ke("div",{className:"property-panel-row-2col",children:[Q(F1,{label:i.minWidth,id:"design-min-width",value:e.minWidth,placeholder:f("minWidth"),onChange:h=>r("minWidth",h),...O1.minWidth,aria:s?.dimension}),Q(F1,{label:i.maxWidth,id:"design-max-width",value:e.maxWidth,placeholder:f("maxWidth"),onChange:h=>r("maxWidth",h),...O1.maxWidth,aria:s?.dimension})]}),Q(F1,{label:i.height,id:"design-height",value:e.height,placeholder:f("height"),onChange:h=>r("height",h),...O1.height,aria:s?.dimension}),Ke("div",{className:"property-panel-row-2col",children:[Q(F1,{label:i.minHeight,id:"design-min-height",value:e.minHeight,placeholder:f("minHeight"),onChange:h=>r("minHeight",h),...O1.minHeight,aria:s?.dimension}),Q(F1,{label:i.maxHeight,id:"design-max-height",value:e.maxHeight,placeholder:f("maxHeight"),onChange:h=>r("maxHeight",h),...O1.maxHeight,aria:s?.dimension})]}),Q(A5,{label:i.overflow,id:"design-overflow",value:e.overflow,computedValue:f("overflow"),onChange:h=>r("overflow",h),optionLabels:s?.overflow?.options,aria:s?.picklist})]}),Q(J1,{title:l.background,children:Q(Ta,{label:i.backgroundColor,value:O?"rgba(0, 0, 0, 0)":V||z||U,onChange:h=>r("backgroundColor",h),id:"design-bg-color",aria:s?.color,backgroundImage:k||void 0})}),Ke(J1,{title:l.border,children:[Q(co,{label:i.borderRadius,id:"design-border-radius",value:e.borderRadius,placeholder:f("borderRadius"),onChange:h=>r("borderRadius",h),...so.borderRadius,aria:s?.boxDimension}),Q(co,{label:i.borderWeight,id:"design-border-width",value:e.borderWidth,placeholder:f("borderWidth"),onChange:h=>r("borderWidth",h),...so.borderWidth,aria:s?.boxDimension}),Q(v2,{label:i.borderStyle,id:"design-border-style",value:e.borderStyle||t.borderStyle,onChange:h=>r("borderStyle",h),optionLabels:s?.borderStyle?.options}),Q(Ta,{label:i.borderColor,value:L||x||P,onChange:h=>r("borderColor",h),id:"design-border-color",aria:s?.color,backgroundImage:b})]}),C&&Q(J1,{title:l.imageSource,children:Q(Wl,{label:i.imageSource,value:C.src,onChange:h=>d("src",h),id:"design-img-src",attributes:{alt:C.alt},onAttributeChange:d,imageLabels:s?.image,...c})}),I&&Q(J1,{title:l.imageSource,children:Q(Wl,{label:i.imageSource,value:I.src,onChange:h=>r("backgroundImage",K5(S,h)),id:"design-bg-img-src",imageLabels:s?.image,...c})})]})})}var Jl=["width","minWidth","maxWidth","height","minHeight","maxHeight","overflow","padding","margin","backgroundColor","backgroundImage","backgroundClip","borderWidth","borderStyle","borderColor","borderImageSource","borderRadius","color","webkitTextFillColor","fontFamily","fontSize","fontWeight","fontStyle","lineHeight","letterSpacing","textAlign","textDecoration","textTransform"],ht=Object.fromEntries(Jl.map(e=>[e,""]));function nr(e,t,o,a){let r={...t};for(let n of Jl){let l=e[n];l!=null&&!o.has(n)&&(r[n]=l[a]??t[n]??"")}return r}function G5(e,t,o){let a=new Set(t);for(let r of Jl){if(o.has(r))continue;let n=e[r];n!=null&&(n.inline?a.add(r):a.delete(r))}return a}var W5=ve.forwardRef(function(t,o){let{component:a,styles:r,onStyleChange:n,onTextChange:l,onHistoryStateChange:i,onAddToChatContext:s,onOpenSourceFile:u,onClose:d,onMediaChange:c,showAddToChatContext:p=!0,showOpenSourceFile:m=!0,compactHeader:C=!1,labels:I,imageSource:f,imageSourceEditorEnabled:S}=t,g=ve.useMemo(()=>S??X8()??W8,[S]),R=p1(Q8,I),[v,k]=ve.useState(ht),[O,U]=ve.useState(ht),[M,V]=ve.useState(()=>new Set),[z,j]=ve.useState(()=>new Set),W=ve.useRef(v);W.current=v;let Z=ve.useRef(O);Z.current=O;let D=ve.useRef(M);D.current=M;let N=ve.useRef(z);N.current=z;let L=ve.useRef(r);L.current=r;let x=ve.useRef(new Map),w=ve.useRef(n);w.current=n;let b=ve.useRef(l);b.current=l;let P=ve.useRef(c);P.current=c;let h=ve.useRef(null);h.current||(h.current=j5((X,te,ne)=>w.current(X,te,ne,!0),(X,te)=>b.current?.(X,te),(X,te,ne)=>P.current?.(X,te,ne)));let H=h.current,q=ve.useRef(i);q.current=i;let[A,F]=ve.useState(()=>H.getUndoCount()),$=H.getMaxHistorySize(),T=ve.useRef("none");ve.useEffect(()=>{let X=ne=>{if(q.current?.({canUndo:ne.canUndo,canRedo:ne.canRedo}),F(ne.undoCount),!(ne.type==="command-undone"||ne.type==="command-redone"))return;let He=ne.type==="command-undone",De=ne.command?.data?.property,Pe=ne.command?.data?.changes,Be=[];if(typeof De=="string"?Be=[[De,typeof ne.appliedValue=="string"?ne.appliedValue:""]]:Array.isArray(Pe)&&(Be=Pe.filter(ge=>ge!=null&&typeof ge.property=="string").map(ge=>[ge.property,String((He?ge.oldValue:ge.newValue)??"")])),Be.length===0)return;let Xe=ne.command?.data,Ye=Xe&&typeof Xe.componentName=="string"?`${Xe.componentName}-${Xe.tagName??""}-${Xe.lineNumber??""}-${Xe.columnNumber??""}`:null;if(Ye!==null&&Ye!==T.current){let ge=x.current.get(Ye);if(!ge)return;let Je={...ge.styles},n1=new Set(ge.sessionEdits),U1=new Set(ge.inlineOrigin);for(let[xe,e1]of Be)Je[xe]=e1,e1===""&&U1.has(xe)?(n1.delete(xe),U1.delete(xe)):n1.add(xe);x.current.set(Ye,{...ge,styles:Je,sessionEdits:n1,inlineOrigin:U1});return}k(ge=>{let Je={...ge};for(let[n1,U1]of Be)Je[n1]=U1;return Je}),V(ge=>{let Je=new Set(ge);for(let[n1]of Be)Je.add(n1);return Je})},te=H.subscribe(X);return q.current?.({canUndo:H.canUndo(),canRedo:H.canRedo()}),F(H.getUndoCount()),te},[H]);let Y=A>=$,ue=ve.useRef(null),de=ve.useRef(!1);ve.useEffect(()=>{Y&&!de.current&&ue.current?.focus(),de.current=Y},[Y]),ve.useImperativeHandle(o,()=>({undo:()=>H.undo(),redo:()=>H.redo(),clearHistory:X=>{if(H.clear(),x.current.clear(),X?.keepSelectedStyles){let te=L.current||{},ne=new Set;k(nr(te,ht,ne,"inline")),U(nr(te,ht,ne,"computed")),j(G5(te,ne,ne))}else k(ht),U(ht),j(new Set);V(new Set),F(0)},getHistoryStack:()=>H.getHistoryStack(),getChangeSet:()=>q5(H.getHistoryStack()),recordTextChange:(X,te,ne)=>H.recordTextChange(X,te,ne),canUndo:()=>H.canUndo(),canRedo:()=>H.canRedo()}),[H]);let y=a?`${a.name}-${a.tagName??""}-${a.debugSource?.lineNumber??""}-${a.debugSource?.columnNumber??""}`:"none";T.current=y;let B=ve.useRef("none");ve.useEffect(()=>{let X=B.current,te,ne,Ce,He;if(y!==X){X!=="none"&&D.current.size>0&&x.current.set(X,{styles:W.current,computedStyles:Z.current,sessionEdits:D.current,inlineOrigin:N.current}),B.current=y;let Pe=x.current.get(y);te=Pe?Pe.styles:ht,ne=Pe?Pe.computedStyles:ht,Ce=Pe?Pe.sessionEdits:new Set,He=Pe?Pe.inlineOrigin:new Set}else te=W.current,ne=Z.current,Ce=D.current,He=N.current;let De=r||{};k(nr(De,te,Ce,"inline")),U(nr(De,ne,Ce,"computed")),V(Ce),j(G5(De,He,Ce))},[y,r]);let J=ve.useCallback((X,te)=>{let ne=ef(W.current,X),Ce=Yl(a),He=a?.debugSource?{sourceFile:a.debugSource.sourceFile,lineNumber:a.debugSource.lineNumber,columnNumber:a.debugSource.columnNumber}:void 0,De=W.current.backgroundImage||Z.current.backgroundImage||"",Pe=W.current.backgroundClip||Z.current.backgroundClip||"",Be=Zn(De,Pe),Xe=W.current.color||Z.current.color||"",Ye=!!W.current.webkitTextFillColor?.trim(),ge={property:"webkitTextFillColor",isOccluding:xe=>Fn(xe,Xe,Ye),resetValue:"currentcolor"},Je=[];X==="backgroundColor"?Je=Be?[ge]:[]:X==="borderColor"?Je=[{property:"borderImageSource"}]:X==="color"&&(Je=[ge]);let n1=Je.flatMap(({property:xe,isOccluding:e1,resetValue:q1})=>Mi(te,xe,Z.current[xe],W.current[xe],e1,q1)),U1=(xe,e1,q1)=>{q1!==e1&&n1.push({property:xe,oldValue:e1,newValue:q1})};if(te.trim()!==""&&(_1(De)||Be))if(X==="backgroundColor"){let xe=Be?Ii(De,Pe):Pe;U1("backgroundClip",Pe,xe),U1("backgroundImage",De,bi(De,xe))}else X==="color"&&U1("backgroundImage",De,wi(De,Pe));n(X,te,He);for(let xe of n1)n(xe.property,xe.newValue,He);n1.length===0?H.recordStyleChange(X,ne,te,Ce):H.recordStyleBatch([{property:X,oldValue:ne,newValue:te},...n1.map(xe=>({property:xe.property,oldValue:xe.oldValue,newValue:xe.newValue}))],Ce),k(xe=>{let e1={...xe,[X]:te};for(let q1 of n1)e1[q1.property]=q1.newValue;return e1}),X==="color"&&U(xe=>({...xe,webkitTextFillColor:te})),V(xe=>{let e1=new Set(xe);te===""&&N.current.has(X)?e1.delete(X):e1.add(X);for(let q1 of n1)e1.add(q1.property);return e1})},[n,H,a]),ie=ve.useCallback((X,te)=>{let ne=a?.media;if(!ne)return;let Ce=a?.debugSource;c?.(ne.tag,{[X]:te},Ce);let He=String(ne[X]??"");H.recordMediaChange(ne.tag,X,He,te,Yl(a))},[a,c,H]),be=!!(a&&a.name),Ie=ve.useCallback(()=>{let X=Yl(a);X&&s?.(X)},[a,s]),r1=be&&a&&a.tagName&&K8.has(a.tagName.toUpperCase()),ye=a?.hasNonEditableText?R.general.inlineEditNonEditable:R.general.inlineEditEditable,Te=a?.tagName?a.tagName.toLowerCase():a?.name;return Ke("div",{role:"complementary","aria-label":R.general.ariaPropertyPanel,className:"property-panel-container",children:[Ke("header",{className:C?"property-panel-header property-panel-header-compact":"property-panel-header",children:[C?be&&Ke("span",{className:"property-panel-selected-pill",children:[Q(J8,{size:12}),Q("span",{className:"property-panel-selected-pill-tag",children:Te})]}):Q("h2",{id:"design-property-panel-title",className:"property-panel-title",children:R.general.headerTitle}),(be||d)&&Ke("div",{className:"property-panel-header-actions",children:[be&&Ke(nf,{children:[r1&&Q("span",{className:"property-panel-selected-component-action property-panel-selected-component-action-help","data-tooltip":ye,"aria-label":ye,children:Q(u9,{width:14,height:14,style:a.hasNonEditableText?j8:void 0})}),p&&!Y&&Q("button",{type:"button",className:"property-panel-selected-component-action",onClick:Ie,"data-tooltip":R.general.addToChatContext,"aria-label":R.general.addToChatContext,children:Q(Y8,{size:14})})]}),d&&Q("button",{type:"button",className:"property-panel-selected-component-action property-panel-close",onClick:d,"data-tooltip":R.general.closePanel,"aria-label":R.general.closePanel,children:Q(Y1,{width:14,height:14,"aria-hidden":"true"})})]})]}),Ke("div",{className:"property-panel-content","aria-labelledby":C?void 0:"design-property-panel-title",children:[Q(tf,{component:a,onOpenSourceFile:u,showOpenSourceFile:m,showComponentName:!C,generalLabels:R.general}),Y?Q(of,{ref:ue,title:R.history.changeLimitTitle,body:R.history.changeLimitBody}):Q(af,{styles:v,computedStyles:O,inlineOrigin:z,hasSelection:be,onStyleChange:J,generalLabels:R.general,sectionLabels:R.sections,instanceLabels:R.instances,editorLabels:I?.editors,component:a,onImageAttributeChange:ie,imageSource:f,imageSourceEditorEnabled:g},y)]})]})});function rf(e,t,o){if(!e)return;U8(e).render(ve.createElement(W5,{...t,ref:o}))}export{W5 as DesignPropertyPanel,x2 as REQUIRED_LABEL_KEYS,Oe as interpolate,rf as mountDesignPropertyPanel,Au as validateLabels};
|
|
1
|
+
var X5=Object.create;var lr=Object.defineProperty;var Q5=Object.getOwnPropertyDescriptor;var Y5=Object.getOwnPropertyNames;var J5=Object.getPrototypeOf,es=Object.prototype.hasOwnProperty;var ts=(e,t,o)=>t in e?lr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var ro=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(o){throw t=0,o}};var os=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Y5(t))!es.call(e,r)&&r!==o&&lr(e,r,{get:()=>t[r],enumerable:!(a=Q5(t,r))||a.enumerable});return e};var e9=(e,t,o)=>(o=e!=null?X5(J5(e)):{},os(t||!e||!e.__esModule?lr(o,"default",{value:e,enumerable:!0}):o,e));var vt=(e,t,o)=>ts(e,typeof t!="symbol"?t+"":t,o);var Pi=ro((_I,Hi)=>{"use strict";var j4="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Hi.exports=j4});var Di=ro((DI,_i)=>{"use strict";var K4=Pi();function Ti(){}function Vi(){}Vi.resetWarningCache=Ti;_i.exports=function(){function e(a,r,n,l,i,s){if(s!==K4){var u=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 u.name="Invariant Violation",u}}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:Vi,resetWarningCache:Ti};return o.PropTypes=o,o}});var Ei=ro((BI,Oi)=>{Oi.exports=Di()();var OI,EI});var Ai=ro(we=>{"use strict";var Kn=Symbol.for("react.element"),Gn=Symbol.for("react.portal"),Va=Symbol.for("react.fragment"),_a=Symbol.for("react.strict_mode"),Da=Symbol.for("react.profiler"),Oa=Symbol.for("react.provider"),Ea=Symbol.for("react.context"),G4=Symbol.for("react.server_context"),Ba=Symbol.for("react.forward_ref"),Aa=Symbol.for("react.suspense"),Za=Symbol.for("react.suspense_list"),Fa=Symbol.for("react.memo"),$a=Symbol.for("react.lazy"),W4=Symbol.for("react.offscreen"),Bi;Bi=Symbol.for("react.module.reference");function I1(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Kn:switch(e=e.type,e){case Va:case Da:case _a:case Aa:case Za:return e;default:switch(e=e&&e.$$typeof,e){case G4:case Ea:case Ba:case $a:case Fa:case Oa:return e;default:return t}}case Gn:return t}}}we.ContextConsumer=Ea;we.ContextProvider=Oa;we.Element=Kn;we.ForwardRef=Ba;we.Fragment=Va;we.Lazy=$a;we.Memo=Fa;we.Portal=Gn;we.Profiler=Da;we.StrictMode=_a;we.Suspense=Aa;we.SuspenseList=Za;we.isAsyncMode=function(){return!1};we.isConcurrentMode=function(){return!1};we.isContextConsumer=function(e){return I1(e)===Ea};we.isContextProvider=function(e){return I1(e)===Oa};we.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Kn};we.isForwardRef=function(e){return I1(e)===Ba};we.isFragment=function(e){return I1(e)===Va};we.isLazy=function(e){return I1(e)===$a};we.isMemo=function(e){return I1(e)===Fa};we.isPortal=function(e){return I1(e)===Gn};we.isProfiler=function(e){return I1(e)===Da};we.isStrictMode=function(e){return I1(e)===_a};we.isSuspense=function(e){return I1(e)===Aa};we.isSuspenseList=function(e){return I1(e)===Za};we.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Va||e===Da||e===_a||e===Aa||e===Za||e===W4||typeof e=="object"&&e!==null&&(e.$$typeof===$a||e.$$typeof===Fa||e.$$typeof===Oa||e.$$typeof===Ea||e.$$typeof===Ba||e.$$typeof===Bi||e.getModuleId!==void 0)};we.typeOf=I1});var Fi=ro((ZI,Zi)=>{"use strict";Zi.exports=Ai()});import{forwardRef as Me,createElement as ae}from"react";function Se(e,t){if(e==null)return{};var o={},a=Object.keys(e),r,n;for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}var as=["color"],t9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,as);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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"}))}),rs=["color"],o9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,rs);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 ns=["color"],a9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ns);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 ls=["color"],r9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ls);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 is=["color"],Y1=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,is);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 ss=["color"],n9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ss);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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"}))}),us=["color"],l9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,us);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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"}))}),ds=["color"],i9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ds);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 cs=["color"],s9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,cs);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 fs=["color"],u9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,fs);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 ps=["color"],d9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ps);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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"}))}),Cs=["color"],c9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,Cs);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 ms=["color"],f9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ms);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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"}))}),gs=["color"],p9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,gs);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 hs=["color"],C9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,hs);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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"}))});var vs=["color"],m9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,vs);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("path",{d:"M4.85355 2.14645C5.04882 2.34171 5.04882 2.65829 4.85355 2.85355L3.70711 4H9C11.4853 4 13.5 6.01472 13.5 8.5C13.5 10.9853 11.4853 13 9 13H5C4.72386 13 4.5 12.7761 4.5 12.5C4.5 12.2239 4.72386 12 5 12H9C10.933 12 12.5 10.433 12.5 8.5C12.5 6.567 10.933 5 9 5H3.70711L4.85355 6.14645C5.04882 6.34171 5.04882 6.65829 4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355L2.14645 4.85355C1.95118 4.65829 1.95118 4.34171 2.14645 4.14645L4.14645 2.14645C4.34171 1.95118 4.65829 1.95118 4.85355 2.14645Z",fill:a,fillRule:"evenodd",clipRule:"evenodd"}))});var xs=["color"],g9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,xs);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 Ls=["color"],h9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,Ls);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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"}))}),ws=["color"],v9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ws);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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"}))}),bs=["color"],x9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,bs);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 Is=["color"],L9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,Is);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 ys=["color"],w9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,ys);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("path",{d:"M4 6H11L7.5 10.5L4 6Z",fill:a}))});var Ms=["color"],b9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,Ms);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("path",{d:"M4 9H11L7.5 4.5L4 9Z",fill:a}))});var Ss=["color"],I9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,Ss);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 Rs=["color"],y9=Me(function(e,t){var o=e.color,a=o===void 0?"currentColor":o,r=Se(e,Rs);return ae("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r,{ref:t}),ae("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 ve from"react";import{createRoot as U8}from"react-dom/client";import M9 from"react";import{jsx as ir,jsxs as S9}from"react/jsx-runtime";function J1({title:e,defaultOpen:t=!0,children:o}){let[a,r]=M9.useState(t),n=M9.useCallback(l=>{r(l.currentTarget.open)},[]);return S9("details",{className:"property-panel-section",open:a,onToggle:n,children:[S9("summary",{className:"property-panel-section-trigger",children:[ir("span",{children:e}),ir(r9,{className:"property-panel-section-chevron",width:12,height:12,"aria-hidden":"true"})]}),ir("div",{className:"property-panel-section-content",children:o})]})}var R9=["H1","H2","H3","H4","H5","H6","P","SPAN","A","BUTTON","LABEL","DIV","LI","TD","TH","CAPTION","FIGCAPTION","BLOCKQUOTE","LEGEND","SUMMARY","DT","DD","EM","STRONG"];import M1 from"react";import*as z1 from"react";import{jsx as ks}from"react/jsx-runtime";function Tt(e,t=[]){let o=[];function a(n,l){let i=z1.createContext(l),s=o.length;o=[...o,l];let u=c=>{let{scope:p,children:g,...m}=c,M=p?.[e]?.[s]||i,f=z1.useMemo(()=>m,Object.values(m));return ks(M.Provider,{value:f,children:g})};u.displayName=n+"Provider";function d(c,p){let g=p?.[e]?.[s]||i,m=z1.useContext(g);if(m)return m;if(l!==void 0)return l;throw new Error(`\`${c}\` must be used within \`${n}\``)}return[u,d]}let r=()=>{let n=o.map(l=>z1.createContext(l));return function(i){let s=i?.[e]||n;return z1.useMemo(()=>({[`__scope${e}`]:{...i,[e]:s}}),[i,s])}};return r.scopeName=e,[a,Hs(r,...t)]}function Hs(...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(n){let l=a.reduce((i,{useScope:s,scopeName:u})=>{let c=s(n)[`__scope${u}`];return{...i,...c}},{});return z1.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return o.scopeName=t.scopeName,o}import*as V9 from"react";import*as Es from"react-dom";import*as Ae from"react";import*as Ps from"react";function k9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function H9(...e){return t=>{let o=!1,a=e.map(r=>{let n=k9(r,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let r=0;r<a.length;r++){let n=a[r];typeof n=="function"?n():k9(e[r],null)}}}}import{Fragment as kf,jsx as P9}from"react/jsx-runtime";function T9(e){let t=Ts(e),o=Ae.forwardRef((a,r)=>{let{children:n,...l}=a,i=Ae.Children.toArray(n),s=i.find(_s);if(s){let u=s.props.children,d=i.map(c=>c===s?Ae.Children.count(u)>1?Ae.Children.only(null):Ae.isValidElement(u)?u.props.children:null:c);return P9(t,{...l,ref:r,children:Ae.isValidElement(u)?Ae.cloneElement(u,void 0,d):null})}return P9(t,{...l,ref:r,children:n})});return o.displayName=`${e}.Slot`,o}function Ts(e){let t=Ae.forwardRef((o,a)=>{let{children:r,...n}=o;if(Ae.isValidElement(r)){let l=Os(r),i=Ds(n,r.props);return r.type!==Ae.Fragment&&(i.ref=a?H9(a,l):l),Ae.cloneElement(r,i)}return Ae.Children.count(r)>1?Ae.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vs=Symbol("radix.slottable");function _s(e){return Ae.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vs}function Ds(e,t){let o={...t};for(let a in t){let r=e[a],n=t[a];/^on[A-Z]/.test(a)?r&&n?o[a]=(...i)=>{let s=n(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...n}:a==="className"&&(o[a]=[r,n].filter(Boolean).join(" "))}return{...e,...o}}function Os(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 Bs}from"react/jsx-runtime";var As=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],sr=As.reduce((e,t)=>{let o=T9(`Primitive.${t}`),a=V9.forwardRef((r,n)=>{let{asChild:l,...i}=r,s=l?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Bs(s,{...i,ref:n})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});import*as Ue from"react";var _f=!!(typeof window<"u"&&window.document&&window.document.createElement);function j1(e,t,{checkForDefaultPrevented:o=!0}={}){return function(r){if(e?.(r),o===!1||!r.defaultPrevented)return t?.(r)}}import xt from"react";import*as D9 from"react";function _9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ur(...e){return t=>{let o=!1,a=e.map(r=>{let n=_9(r,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let r=0;r<a.length;r++){let n=a[r];typeof n=="function"?n():_9(e[r],null)}}}}function dr(...e){return D9.useCallback(ur(...e),e)}import*as Ze from"react";import{Fragment as Af,jsx as O9}from"react/jsx-runtime";function cr(e){let t=Zs(e),o=Ze.forwardRef((a,r)=>{let{children:n,...l}=a,i=Ze.Children.toArray(n),s=i.find($s);if(s){let u=s.props.children,d=i.map(c=>c===s?Ze.Children.count(u)>1?Ze.Children.only(null):Ze.isValidElement(u)?u.props.children:null:c);return O9(t,{...l,ref:r,children:Ze.isValidElement(u)?Ze.cloneElement(u,void 0,d):null})}return O9(t,{...l,ref:r,children:n})});return o.displayName=`${e}.Slot`,o}function Zs(e){let t=Ze.forwardRef((o,a)=>{let{children:r,...n}=o;if(Ze.isValidElement(r)){let l=Us(r),i=Ns(n,r.props);return r.type!==Ze.Fragment&&(i.ref=a?ur(a,l):l),Ze.cloneElement(r,i)}return Ze.Children.count(r)>1?Ze.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fs=Symbol("radix.slottable");function $s(e){return Ze.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fs}function Ns(e,t){let o={...t};for(let a in t){let r=e[a],n=t[a];/^on[A-Z]/.test(a)?r&&n?o[a]=(...i)=>{let s=n(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...n}:a==="className"&&(o[a]=[r,n].filter(Boolean).join(" "))}return{...e,...o}}function Us(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 fr}from"react/jsx-runtime";import Wf from"react";import{jsx as Qf}from"react/jsx-runtime";function E9(e){let t=e+"CollectionProvider",[o,a]=Tt(t),[r,n]=o(t,{collectionRef:{current:null},itemMap:new Map}),l=M=>{let{scope:f,children:R}=M,C=xt.useRef(null),k=xt.useRef(new Map).current;return fr(r,{scope:f,itemMap:k,collectionRef:C,children:R})};l.displayName=t;let i=e+"CollectionSlot",s=cr(i),u=xt.forwardRef((M,f)=>{let{scope:R,children:C}=M,k=n(i,R),v=dr(f,k.collectionRef);return fr(s,{ref:v,children:C})});u.displayName=i;let d=e+"CollectionItemSlot",c="data-radix-collection-item",p=cr(d),g=xt.forwardRef((M,f)=>{let{scope:R,children:C,...k}=M,v=xt.useRef(null),H=dr(f,v),O=n(d,R);return xt.useEffect(()=>(O.itemMap.set(v,{ref:v,...k}),()=>{O.itemMap.delete(v)})),fr(p,{[c]:"",ref:H,children:C})});g.displayName=d;function m(M){let f=n(e+"CollectionConsumer",M);return xt.useCallback(()=>{let C=f.collectionRef.current;if(!C)return[];let k=Array.from(C.querySelectorAll(`[${c}]`));return Array.from(f.itemMap.values()).sort((O,N)=>k.indexOf(O.ref.current)-k.indexOf(N.ref.current))},[f.collectionRef,f.itemMap])}return[{Provider:l,Slot:u,ItemSlot:g},m,a]}import*as A9 from"react";function B9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function pr(...e){return t=>{let o=!1,a=e.map(r=>{let n=B9(r,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let r=0;r<a.length;r++){let n=a[r];typeof n=="function"?n():B9(e[r],null)}}}}function Z9(...e){return A9.useCallback(pr(...e),e)}import*as Cr from"react";import*as F9 from"react";var Ao=globalThis?.document?F9.useLayoutEffect:()=>{};var qs=Cr[" useId ".trim().toString()]||(()=>{}),zs=0;function $9(e){let[t,o]=Cr.useState(qs());return Ao(()=>{e||o(a=>a??String(zs++))},[e]),e||(t?`radix-${t}`:"")}import*as q9 from"react";import*as Qs from"react-dom";import*as Fe from"react";import{Fragment as l6,jsx as N9}from"react/jsx-runtime";function U9(e){let t=js(e),o=Fe.forwardRef((a,r)=>{let{children:n,...l}=a,i=Fe.Children.toArray(n),s=i.find(Gs);if(s){let u=s.props.children,d=i.map(c=>c===s?Fe.Children.count(u)>1?Fe.Children.only(null):Fe.isValidElement(u)?u.props.children:null:c);return N9(t,{...l,ref:r,children:Fe.isValidElement(u)?Fe.cloneElement(u,void 0,d):null})}return N9(t,{...l,ref:r,children:n})});return o.displayName=`${e}.Slot`,o}function js(e){let t=Fe.forwardRef((o,a)=>{let{children:r,...n}=o;if(Fe.isValidElement(r)){let l=Xs(r),i=Ws(n,r.props);return r.type!==Fe.Fragment&&(i.ref=a?pr(a,l):l),Fe.cloneElement(r,i)}return Fe.Children.count(r)>1?Fe.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ks=Symbol("radix.slottable");function Gs(e){return Fe.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ks}function Ws(e,t){let o={...t};for(let a in t){let r=e[a],n=t[a];/^on[A-Z]/.test(a)?r&&n?o[a]=(...i)=>{let s=n(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...n}:a==="className"&&(o[a]=[r,n].filter(Boolean).join(" "))}return{...e,...o}}function Xs(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 Ys}from"react/jsx-runtime";var Js=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mr=Js.reduce((e,t)=>{let o=U9(`Primitive.${t}`),a=q9.forwardRef((r,n)=>{let{asChild:l,...i}=r,s=l?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Ys(s,{...i,ref:n})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});import*as Vt from"react";function z9(e){let t=Vt.useRef(e);return Vt.useEffect(()=>{t.current=e}),Vt.useMemo(()=>(...o)=>t.current?.(...o),[])}import*as h1 from"react";import*as Zo from"react";var eu=h1[" useInsertionEffect ".trim().toString()]||Ao;function Lt({prop:e,defaultProp:t,onChange:o=()=>{},caller:a}){let[r,n,l]=tu({defaultProp:t,onChange:o}),i=e!==void 0,s=i?e:r;{let d=h1.useRef(e!==void 0);h1.useEffect(()=>{let c=d.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.`),d.current=i},[i,a])}let u=h1.useCallback(d=>{if(i){let c=ou(d)?d(e):d;c!==e&&l.current?.(c)}else n(d)},[i,e,n,l]);return[s,u]}function tu({defaultProp:e,onChange:t}){let[o,a]=h1.useState(e),r=h1.useRef(o),n=h1.useRef(t);return eu(()=>{n.current=t},[t]),h1.useEffect(()=>{r.current!==o&&(n.current?.(o),r.current=o)},[o,r]),[o,a,n]}function ou(e){return typeof e=="function"}import*as Fo from"react";import{jsx as m6}from"react/jsx-runtime";var au=Fo.createContext(void 0);function $o(e){let t=Fo.useContext(au);return e||t||"ltr"}import{jsx as wt}from"react/jsx-runtime";var gr="rovingFocusGroup.onEntryFocus",ru={bubbles:!1,cancelable:!0},no="RovingFocusGroup",[hr,j9,nu]=E9(no),[lu,vr]=Tt(no,[nu]),[iu,su]=lu(no),K9=Ue.forwardRef((e,t)=>wt(hr.Provider,{scope:e.__scopeRovingFocusGroup,children:wt(hr.Slot,{scope:e.__scopeRovingFocusGroup,children:wt(uu,{...e,ref:t})})}));K9.displayName=no;var uu=Ue.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:a,loop:r=!1,dir:n,currentTabStopId:l,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:s,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...c}=e,p=Ue.useRef(null),g=Z9(t,p),m=$o(n),[M,f]=Lt({prop:l,defaultProp:i??null,onChange:s,caller:no}),[R,C]=Ue.useState(!1),k=z9(u),v=j9(o),H=Ue.useRef(!1),[O,N]=Ue.useState(0);return Ue.useEffect(()=>{let S=p.current;if(S)return S.addEventListener(gr,k),()=>S.removeEventListener(gr,k)},[k]),wt(iu,{scope:o,orientation:a,dir:m,loop:r,currentTabStopId:M,onItemFocus:Ue.useCallback(S=>f(S),[f]),onItemShiftTab:Ue.useCallback(()=>C(!0),[]),onFocusableItemAdd:Ue.useCallback(()=>N(S=>S+1),[]),onFocusableItemRemove:Ue.useCallback(()=>N(S=>S-1),[]),children:wt(mr.div,{tabIndex:R||O===0?-1:0,"data-orientation":a,...c,ref:g,style:{outline:"none",...e.style},onMouseDown:j1(e.onMouseDown,()=>{H.current=!0}),onFocus:j1(e.onFocus,S=>{let V=!H.current;if(S.target===S.currentTarget&&V&&!R){let z=new CustomEvent(gr,ru);if(S.currentTarget.dispatchEvent(z),!z.defaultPrevented){let j=v().filter(L=>L.focusable),X=j.find(L=>L.active),A=j.find(L=>L.id===M),U=[X,A,...j].filter(Boolean).map(L=>L.ref.current);X9(U,d)}}H.current=!1}),onBlur:j1(e.onBlur,()=>C(!1))})})}),G9="RovingFocusGroupItem",W9=Ue.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:a=!0,active:r=!1,tabStopId:n,children:l,...i}=e,s=$9(),u=n||s,d=su(G9,o),c=d.currentTabStopId===u,p=j9(o),{onFocusableItemAdd:g,onFocusableItemRemove:m,currentTabStopId:M}=d;return Ue.useEffect(()=>{if(a)return g(),()=>m()},[a,g,m]),wt(hr.ItemSlot,{scope:o,id:u,focusable:a,active:r,children:wt(mr.span,{tabIndex:c?0:-1,"data-orientation":d.orientation,...i,ref:t,onMouseDown:j1(e.onMouseDown,f=>{a?d.onItemFocus(u):f.preventDefault()}),onFocus:j1(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:j1(e.onKeyDown,f=>{if(f.key==="Tab"&&f.shiftKey){d.onItemShiftTab();return}if(f.target!==f.currentTarget)return;let R=fu(f,d.orientation,d.dir);if(R!==void 0){if(f.metaKey||f.ctrlKey||f.altKey||f.shiftKey)return;f.preventDefault();let k=p().filter(v=>v.focusable).map(v=>v.ref.current);if(R==="last")k.reverse();else if(R==="prev"||R==="next"){R==="prev"&&k.reverse();let v=k.indexOf(f.currentTarget);k=d.loop?pu(k,v+1):k.slice(v+1)}setTimeout(()=>X9(k))}}),children:typeof l=="function"?l({isCurrentTabStop:c,hasTabStop:M!=null}):l})})});W9.displayName=G9;var du={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cu(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function fu(e,t,o){let a=cu(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return du[a]}function X9(e,t=!1){let o=document.activeElement;for(let a of e)if(a===o||(a.focus({preventScroll:t}),document.activeElement!==o))return}function pu(e,t){return e.map((o,a)=>e[(t+a)%e.length])}var Q9=K9,Y9=W9;import*as n2 from"react";import*as a2 from"react";import*as wu from"react-dom";import*as $e from"react";import*as mu from"react";function J9(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function e2(...e){return t=>{let o=!1,a=e.map(r=>{let n=J9(r,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let r=0;r<a.length;r++){let n=a[r];typeof n=="function"?n():J9(e[r],null)}}}}import{Fragment as P6,jsx as t2}from"react/jsx-runtime";function o2(e){let t=gu(e),o=$e.forwardRef((a,r)=>{let{children:n,...l}=a,i=$e.Children.toArray(n),s=i.find(vu);if(s){let u=s.props.children,d=i.map(c=>c===s?$e.Children.count(u)>1?$e.Children.only(null):$e.isValidElement(u)?u.props.children:null:c);return t2(t,{...l,ref:r,children:$e.isValidElement(u)?$e.cloneElement(u,void 0,d):null})}return t2(t,{...l,ref:r,children:n})});return o.displayName=`${e}.Slot`,o}function gu(e){let t=$e.forwardRef((o,a)=>{let{children:r,...n}=o;if($e.isValidElement(r)){let l=Lu(r),i=xu(n,r.props);return r.type!==$e.Fragment&&(i.ref=a?e2(a,l):l),$e.cloneElement(r,i)}return $e.Children.count(r)>1?$e.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hu=Symbol("radix.slottable");function vu(e){return $e.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===hu}function xu(e,t){let o={...t};for(let a in t){let r=e[a],n=t[a];/^on[A-Z]/.test(a)?r&&n?o[a]=(...i)=>{let s=n(...i);return r(...i),s}:r&&(o[a]=r):a==="style"?o[a]={...r,...n}:a==="className"&&(o[a]=[r,n].filter(Boolean).join(" "))}return{...e,...o}}function Lu(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 bu}from"react/jsx-runtime";var Iu=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],r2=Iu.reduce((e,t)=>{let o=o2(`Primitive.${t}`),a=a2.forwardRef((r,n)=>{let{asChild:l,...i}=r,s=l?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),bu(s,{...i,ref:n})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});import{jsx as yu}from"react/jsx-runtime";var l2="Toggle",xr=n2.forwardRef((e,t)=>{let{pressed:o,defaultPressed:a,onPressedChange:r,...n}=e,[l,i]=Lt({prop:o,onChange:r,defaultProp:a??!1,caller:l2});return yu(r2.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":e.disabled?"":void 0,...n,ref:t,onClick:j1(e.onClick,()=>{e.disabled||i(!l)})})});xr.displayName=l2;import{jsx as n1}from"react/jsx-runtime";var et="ToggleGroup",[s2,G6]=Tt(et,[vr]),u2=vr(),Lr=M1.forwardRef((e,t)=>{let{type:o,...a}=e;if(o==="single")return n1(Mu,{...a,ref:t});if(o==="multiple")return n1(Su,{...a,ref:t});throw new Error(`Missing prop \`type\` expected on \`${et}\``)});Lr.displayName=et;var[d2,c2]=s2(et),Mu=M1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...n}=e,[l,i]=Lt({prop:o,defaultProp:a??"",onChange:r,caller:et});return n1(d2,{scope:e.__scopeToggleGroup,type:"single",value:M1.useMemo(()=>l?[l]:[],[l]),onItemActivate:i,onItemDeactivate:M1.useCallback(()=>i(""),[i]),children:n1(f2,{...n,ref:t})})}),Su=M1.forwardRef((e,t)=>{let{value:o,defaultValue:a,onValueChange:r=()=>{},...n}=e,[l,i]=Lt({prop:o,defaultProp:a??[],onChange:r,caller:et}),s=M1.useCallback(d=>i((c=[])=>[...c,d]),[i]),u=M1.useCallback(d=>i((c=[])=>c.filter(p=>p!==d)),[i]);return n1(d2,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:s,onItemDeactivate:u,children:n1(f2,{...n,ref:t})})});Lr.displayName=et;var[Ru,ku]=s2(et),f2=M1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,disabled:a=!1,rovingFocus:r=!0,orientation:n,dir:l,loop:i=!0,...s}=e,u=u2(o),d=$o(l),c={role:"group",dir:d,...s};return n1(Ru,{scope:o,rovingFocus:r,disabled:a,children:r?n1(Q9,{asChild:!0,...u,orientation:n,dir:d,loop:i,children:n1(sr.div,{...c,ref:t})}):n1(sr.div,{...c,ref:t})})}),No="ToggleGroupItem",p2=M1.forwardRef((e,t)=>{let o=c2(No,e.__scopeToggleGroup),a=ku(No,e.__scopeToggleGroup),r=u2(e.__scopeToggleGroup),n=o.value.includes(e.value),l=a.disabled||e.disabled,i={...e,pressed:n,disabled:l},s=M1.useRef(null);return a.rovingFocus?n1(Y9,{asChild:!0,...r,focusable:!l,active:n,ref:s,children:n1(i2,{...i,ref:t})}):n1(i2,{...i,ref:t})});p2.displayName=No;var i2=M1.forwardRef((e,t)=>{let{__scopeToggleGroup:o,value:a,...r}=e,n=c2(No,o),l={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=n.type==="single"?l:void 0;return n1(xr,{...i,...r,ref:t,onPressedChange:s=>{s?n.onItemActivate(a):n.onItemDeactivate(a)}})}),C2=Lr,m2=p2;import Du from"react";import{jsx as Vu,jsxs as _u}from"react/jsx-runtime";var Pu={border:"none",margin:0,padding:0,minWidth:0},Tu={color:"var(--dmp-color-foreground)",fontSize:"var(--dmp-font-size-label)",display:"block",marginBottom:"5px",padding:0};function v1({label:e,id:t,className:o,children:a}){let r=`${t}-legend`;return _u("fieldset",{style:Pu,className:o,"aria-labelledby":r,children:[Vu("legend",{id:r,style:Tu,children:e}),a]})}import{jsx as wr}from"react/jsx-runtime";function D1({label:e,options:t,value:o,onChange:a,id:r="radio-group"}){let n=Du.useCallback(l=>{l&&typeof a=="function"&&a(l)},[a]);return wr(v1,{label:e,id:r,className:"radioGroupEditor-fieldset",children:wr(C2,{type:"single",value:o,onValueChange:n,className:"radioGroupEditor-root","aria-label":e,children:t.map(l=>wr(m2,{value:l.value,className:"radioGroupEditor-item","aria-label":l.label,title:l.label,children:l.icon??l.label},l.value))})})}import{jsx as lo}from"react/jsx-runtime";var h2=[{value:"none",labelKey:"none",defaultLabel:"None",icon:lo(Y1,{width:14,height:14})},{value:"solid",labelKey:"solid",defaultLabel:"Solid",icon:lo(a9,{width:14,height:14})},{value:"dashed",labelKey:"dashed",defaultLabel:"Dashed",icon:lo(t9,{width:14,height:14})},{value:"dotted",labelKey:"dotted",defaultLabel:"Dotted",icon:lo(o9,{width:14,height:14})}],g2=new Set(h2.map(e=>e.value));function Ou(e){if(!e)return"none";if(g2.has(e))return e;let t=e.split(/\s+/)[0]??"";return g2.has(t)?t:"none"}function v2({label:e="Border Style",value:t,onChange:o,id:a="border-style",optionLabels:r}){let n=h2.map(l=>({value:l.value,label:r?.[l.labelKey]??l.defaultLabel,icon:l.icon}));return lo(D1,{label:e,options:n,value:Ou(t),onChange:o,id:a})}import Ge from"react";function Oe(e,t){return e.replace(/\{(\d+)\}/g,(o,a)=>{let r=t[Number(a)];return r===void 0?o:String(r)})}function p1(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 n=o[r],l=a[r];n!==null&&typeof n=="object"&&!Array.isArray(n)?o[r]=p1(n,l):typeof l=="string"&&(o[r]=l)}return o}var x2=[{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:"general.closePanel"},{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.ariaImageUrl"},{path:"editors.image.urlPlaceholder"},{path:"editors.image.previewAlt"},{path:"editors.image.altText"},{path:"editors.image.altPlaceholder"},{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.makeEqual"},{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",placeholders:[0,1]},{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.color.gradientValue"},{path:"editors.color.imageValue"},{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.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.picklist.ariaReset",placeholders:[0]},{path:"history.changeLimitTitle"},{path:"history.changeLimitBody"}];function Eu(e,t){return t.split(".").reduce((o,a)=>{if(o&&typeof o=="object")return o[a]},e)}function Bu(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 Au(e){let t=[];if(!e||typeof e!="object")return["labels is not an object"];for(let o of x2){let{path:a,placeholders:r}=o,n=Eu(e,a);if(typeof n!="string"){t.push(`missing or non-string label: ${a}`);continue}if(r){let l=Bu(n),i=[...r].sort((u,d)=>u-d);(l.length!==i.length||l.some((u,d)=>u!==i[d]))&&t.push(`placeholder mismatch at ${a}: expected {${i.join(",")}}, got {${l.join(",")}}`)}}return t}var Uo=[{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"}],S1={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}},Zu=S1.px??{min:0,max:1e4,step:1,decimals:0};function io(e){let t=e.map(o=>o.value).join("|");return new RegExp(`^(-?\\d*\\.?\\d+)\\s*(${t})$`)}var Fu=io(Uo);function l1(e,t="px",o=Fu){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 n=parseFloat(a);return isNaN(n)?{numericValue:"",unit:t}:{numericValue:n,unit:t}}function br(e,t=S1){return t[e]||Zu}function R1(e,t,o=S1){let a=br(t,o);return Math.min(a.max,Math.max(a.min,e))}function k1(e,t,o=S1){if(e===""||e==null||isNaN(e))return"";let a=br(t,o);return Number(Number(e).toFixed(a.decimals))}function qo(e,t){return e===""||e==null||isNaN(e)?"":`${e}${t}`}function zo(e,t,o,a,r=S1){let n=parseFloat(e)||0,l=br(a,r),i=o?10:1,s=(t==="ArrowUp"?1:-1)*l.step*i,u=R1(n+s,a,r);return String(k1(u,a,r))}function Ir({top:e,right:t,bottom:o,left:a}){return`${e||"0px"} ${t||"0px"} ${o||"0px"} ${a||"0px"}`}function _t(e){let t={top:"",right:"",bottom:"",left:""};if(!e||typeof e!="string")return t;let o=e.trim().split(/\s+/),[a="",r="",n="",l=""]=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:n,left:r}:{top:a,right:r,bottom:n,left:l}}function x1(...e){return Uo.filter(t=>e.includes(t.value))}var O1={width:{units:x1("px","em","rem","vw","ch","%"),icon:y9},minWidth:{units:x1("px","em","rem","vw","ch","%")},maxWidth:{units:x1("px","em","rem","vw","ch","%")},height:{units:x1("px","em","rem","vh","%"),icon:s9},minHeight:{units:x1("px","em","rem","vh","%")},maxHeight:{units:x1("px","em","rem","vh","%")},fontSize:{units:x1("px","em","rem","%","pt"),constraints:{...S1,px:{min:0,max:1e3,step:1,decimals:0},"%":{min:0,max:1e3,step:1,decimals:0}},icon:i9},lineHeight:{units:[{value:"",label:"\xD7"},{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],defaultUnit:"",constraints:{"":{min:0,max:10,step:.1,decimals:2},px:{min:0,max:1e3,step:1,decimals:2},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}},icon:C9},letterSpacing:{units:x1("px","em","rem"),constraints:{...S1,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:p9}},so={padding:{units:x1("px","em","rem","%")},margin:{units:x1("px","em","rem","%")},borderRadius:{units:x1("px","em","rem","%"),sideLabelKind:"corners"},borderWidth:{units:x1("px","em","rem")}};import{jsx as H1,jsxs as jo}from"react/jsx-runtime";var $u=[{value:"px",label:"px"},{value:"em",label:"em"},{value:"rem",label:"rem"},{value:"%",label:"%"}],Dt=["top","right","bottom","left"],Nu={sides:{top:"Top",right:"Right",bottom:"Bottom",left:"Left"},corners:{topLeft:"Top Left",topRight:"Top Right",bottomRight:"Bottom Right",bottomLeft:"Bottom Left"},makeEqual:"Make all values equal",ariaUnit:"{0} unit",ariaSide:"{0} {1}"};function Uu(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]}function uo(e){return typeof e=="string"&&e.trim().toLowerCase()==="auto"}function yr(e,t,o){let a={top:"",right:"",bottom:"",left:""};for(let r of Dt){let n=e[r];if(n==null||n==="")a[r]="";else if(uo(n))a[r]="auto";else{let l=l1(String(n),t,o);a[r]=l.numericValue!==""?String(l.numericValue):""}}return a}function Mr(e){let t=e.top||"";return t===(e.right||"")&&t===(e.bottom||"")&&t===(e.left||"")}function L2(e,t,o){for(let a of Dt){let r=e[a];if(r!=null&&r!==""&&r!=="0"){let n=l1(String(r),"px",t);if(n.unit&&o.has(n.unit))return n.unit}}return"px"}function qu(e,t,o){if(uo(e))return"auto";let a=parseFloat(e);if(e===""||isNaN(a))return"";let r=R1(a,t,o);return`${k1(r,t,o)}${t}`}function w2(e){if(!e)return"";let t=_t(e);return!t.top&&!t.right&&!t.bottom&&!t.left?"":Ir(t)}function co({label:e,value:t="",onChange:o,id:a="",units:r=$u,constraints:n=S1,allowAuto:l=!1,sideLabelKind:i="sides",sideIcons:s,placeholder:u="",aria:d}){let c=p1(Nu,d),p=Uu(c,i),g=Ge.useRef(o);g.current=o;let m=Ge.useMemo(()=>io(r),[r]),M=Ge.useMemo(()=>new Set(r.map(L=>L.value)),[r]),f=Ge.useMemo(()=>{let L={top:"",right:"",bottom:"",left:""};if(!u)return L;let x=_t(u),w={...L};for(let I of Dt){let P=x[I];if(!P)continue;let h=l1(P,"px",m);h.numericValue!==""&&(w[I]=String(h.numericValue))}return w},[u,m]),R=Ge.useMemo(()=>_t(t),[]),[C,k]=Ge.useState(()=>L2(R,m,M)),[v,H]=Ge.useState(()=>yr(R,C,m)),[O,N]=Ge.useState(()=>Mr(v)),S=Ge.useRef(w2(t));Ge.useEffect(()=>{if(t===S.current)return;let L=w2(t);if(L===S.current)return;S.current=L;let x=_t(t),w=L2(x,m,M);k(w);let I=yr(x,w,m);H(I),N(Mr(I))},[t,m,M]);let V=Ge.useCallback((L,x)=>{let w={top:"",right:"",bottom:"",left:""},I=!0;for(let h of Dt)w[h]=qu(L[h],x,n),w[h]!==""&&(I=!1);let P=I?"":Ir(w);P!==S.current&&(S.current=P,typeof g.current=="function"&&g.current(P))},[n]),z=Ge.useCallback((L,x)=>{H(O?{top:x,right:x,bottom:x,left:x}:I=>({...I,[L]:x}));let w=l1(x,C,m);w.numericValue!==""&&w.unit&&M.has(w.unit)&&w.unit!==C&&k(w.unit)},[O,C,m,M]),j=Ge.useCallback((L,x)=>{let w=x.clipboardData.getData("text"),I=l1(w,C,m);if(I.numericValue!==""&&I.unit&&M.has(I.unit)){x.preventDefault();let P=R1(I.numericValue,I.unit,n),h=String(k1(P,I.unit,n)),T=O?{top:h,right:h,bottom:h,left:h}:{...v,[L]:h};H(T),I.unit!==C&&k(I.unit),V(T,I.unit)}},[O,v,C,m,M,n,V]),X=Ge.useCallback(L=>{let x=v[L];if(x===""){let T=O?{top:"",right:"",bottom:"",left:""}:{...v,[L]:""};H(T),V(T,C);return}if(l&&uo(x)){let T="auto",q=O?{top:T,right:T,bottom:T,left:T}:{...v,[L]:T};H(q),V(q,C);return}let w=parseFloat(x);if(isNaN(w)){let T=_t(S.current);H(yr(T,C,m));return}let I=R1(w,C,n),P=String(k1(I,C,n)),h=O?{top:P,right:P,bottom:P,left:P}:{...v,[L]:P};H(h),V(h,C)},[v,O,C,m,n,V,l]),A=Ge.useCallback((L,x)=>{if(x.key==="Enter"){x.currentTarget.blur();return}if(x.key==="ArrowUp"||x.key==="ArrowDown"){if(uo(v[L]))return;x.preventDefault();let w=zo(v[L],x.key,x.shiftKey,C,n);if(w===null)return;let I=O?{top:w,right:w,bottom:w,left:w}:{...v,[L]:w};H(I),V(I,C)}},[v,O,C,n,V]),D=Ge.useCallback(()=>{if(!O&&!Mr(v)){let L=v.top,x={top:L,right:L,bottom:L,left:L};H(x),V(x,C)}N(L=>!L)},[O,v,C,V]),U=Ge.useCallback(L=>{let x=L.target.value;if(!M.has(x))return;k(x);let w={top:"",right:"",bottom:"",left:""};for(let I of Dt){let P=v[I];if(uo(P))w[I]="auto";else if(P!==""){let h=parseFloat(P);if(isNaN(h))w[I]=P;else{let T=R1(h,x,n);w[I]=String(k1(T,x,n))}}else w[I]=""}H(w),V(w,x)},[v,M,n,V]);return jo(v1,{label:e,id:a,className:"boxDimensionEditor-fieldset",children:[H1("div",{className:"boxDimensionEditor-header",children:H1("div",{className:"boxDimensionEditor-controls",children:H1("select",{className:"boxDimensionEditor-unit",value:C,onChange:U,"aria-label":Oe(c.ariaUnit,[e]),children:r.map(L=>H1("option",{value:L.value,children:L.label},L.value))})})}),H1("div",{className:"boxDimensionEditor-grid",children:Dt.map((L,x)=>{let w=s&&s[x];return jo("div",{className:"boxDimensionEditor-cell",children:[H1("label",{htmlFor:`${a}-${L}`,className:"boxDimensionEditor-label",children:p[x]}),jo("div",{className:"boxDimensionEditor-input-row",children:[w&&H1("span",{className:"boxDimensionEditor-input-icon","aria-hidden":"true",children:H1(w,{size:12,width:12,height:12})}),H1("input",{id:`${a}-${L}`,type:"text",className:w?"boxDimensionEditor-input boxDimensionEditor-input--with-icon":"boxDimensionEditor-input",value:v[L],placeholder:f[L],onChange:I=>z(L,I.target.value),onPaste:I=>j(L,I),onBlur:()=>X(L),onKeyDown:I=>A(L,I),"aria-label":Oe(c.ariaSide,[e,p[x]??""]),autoComplete:"off",spellCheck:"false"})]})]},L)})}),jo("label",{className:"boxDimensionEditor-equal",children:[H1("input",{type:"checkbox",className:"boxDimensionEditor-equal-checkbox",checked:O,onChange:D}),H1("span",{className:"boxDimensionEditor-equal-label",children:c.makeEqual})]})]})}import{forwardRef as ju,createElement as Ku}from"react";var Ko=(...e)=>e.filter((t,o,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===o).join(" ").trim();var b2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var I2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,a)=>a?a.toUpperCase():o.toLowerCase());var Sr=e=>{let t=I2(e);return t.charAt(0).toUpperCase()+t.slice(1)};import{forwardRef as zu,createElement as S2}from"react";var y2={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 M2=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var R2=zu(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:r="",children:n,iconNode:l,...i},s)=>S2("svg",{ref:s,...y2,width:t,height:t,stroke:e,strokeWidth:a?Number(o)*24/Number(t):o,className:Ko("lucide",r),...!n&&!M2(i)&&{"aria-hidden":"true"},...i},[...l.map(([u,d])=>S2(u,d)),...Array.isArray(n)?n:[n]]));var k2=(e,t)=>{let o=ju(({className:a,...r},n)=>Ku(R2,{ref:n,iconNode:t,className:Ko(`lucide-${b2(Sr(e))}`,`lucide-${e}`,a),...r}));return o.displayName=Sr(e),o};var Gu=[["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"}]],fo=k2("pipette",Gu);import ke from"react";import{useRef as Qo,useCallback as We,useEffect as Dr,useMemo as Yo,useState as Or,createContext as Wu,useContext as Xu}from"react";var H2={exports:{}},po={};var P2;function Qu(){if(P2)return po;P2=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(a,r,n){var l=null;if(n!==void 0&&(l=""+n),r.key!==void 0&&(l=""+r.key),"key"in r){n={};for(var i in r)i!=="key"&&(n[i]=r[i])}else n=r;return r=n.ref,{$$typeof:e,type:a,key:l,ref:r!==void 0?r:null,props:n}}return po.Fragment=t,po.jsx=o,po.jsxs=o,po}var T2;function Yu(){return T2||(T2=1,H2.exports=Qu()),H2.exports}var Ve=Yu();function F2(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=F2(e[t]))&&(a&&(a+=" "),a+=o)}else for(o in e)e[o]&&(a&&(a+=" "),a+=o);return a}function Ju(){for(var e,t,o=0,a="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=F2(e))&&(a&&(a+=" "),a+=t);return a}var Er="-",ed=e=>{let t=od(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:r=>{let n=r.split(Er);return n[0]===""&&n.length!==1&&n.shift(),$2(n,t)||td(r)},getConflictingClassGroupIds:(r,n)=>{let l=o[r]||[];return n&&a[r]?[...l,...a[r]]:l}}},$2=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],a=t.nextPart.get(o),r=a?$2(e.slice(1),a):void 0;if(r)return r;if(t.validators.length===0)return;let n=e.join(Er);return t.validators.find(({validator:l})=>l(n))?.classGroupId},V2=/^\[(.+)\]$/,td=e=>{if(V2.test(e)){let t=V2.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},od=e=>{let{theme:t,classGroups:o}=e,a={nextPart:new Map,validators:[]};for(let r in o)Hr(o[r],a,r,t);return a},Hr=(e,t,o,a)=>{e.forEach(r=>{if(typeof r=="string"){let n=r===""?t:_2(t,r);n.classGroupId=o;return}if(typeof r=="function"){if(ad(r)){Hr(r(a),t,o,a);return}t.validators.push({validator:r,classGroupId:o});return}Object.entries(r).forEach(([n,l])=>{Hr(l,_2(t,n),o,a)})})},_2=(e,t)=>{let o=e;return t.split(Er).forEach(a=>{o.nextPart.has(a)||o.nextPart.set(a,{nextPart:new Map,validators:[]}),o=o.nextPart.get(a)}),o},ad=e=>e.isThemeGetter,rd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,a=new Map,r=(n,l)=>{o.set(n,l),t++,t>e&&(t=0,a=o,o=new Map)};return{get(n){let l=o.get(n);if(l!==void 0)return l;if((l=a.get(n))!==void 0)return r(n,l),l},set(n,l){o.has(n)?o.set(n,l):r(n,l)}}},Pr="!",Tr=":",nd=Tr.length,ld=e=>{let{prefix:t,experimentalParseClassName:o}=e,a=r=>{let n=[],l=0,i=0,s=0,u;for(let m=0;m<r.length;m++){let M=r[m];if(l===0&&i===0){if(M===Tr){n.push(r.slice(s,m)),s=m+nd;continue}if(M==="/"){u=m;continue}}M==="["?l++:M==="]"?l--:M==="("?i++:M===")"&&i--}let d=n.length===0?r:r.substring(s),c=id(d),p=c!==d,g=u&&u>s?u-s:void 0;return{modifiers:n,hasImportantModifier:p,baseClassName:c,maybePostfixModifierPosition:g}};if(t){let r=t+Tr,n=a;a=l=>l.startsWith(r)?n(l.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(o){let r=a;a=n=>o({className:n,parseClassName:r})}return a},id=e=>e.endsWith(Pr)?e.substring(0,e.length-1):e.startsWith(Pr)?e.substring(1):e,sd=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(n=>{n[0]==="["||t[n]?(a.push(...r.sort(),n),r=[]):r.push(n)}),a.push(...r.sort()),a}},ud=e=>({cache:rd(e.cacheSize),parseClassName:ld(e),sortModifiers:sd(e),...ed(e)}),dd=/\s+/,cd=(e,t)=>{let{parseClassName:o,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:n}=t,l=[],i=e.trim().split(dd),s="";for(let u=i.length-1;u>=0;u-=1){let d=i[u],{isExternal:c,modifiers:p,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:M}=o(d);if(c){s=d+(s.length>0?" "+s:s);continue}let f=!!M,R=a(f?m.substring(0,M):m);if(!R){if(!f){s=d+(s.length>0?" "+s:s);continue}if(R=a(m),!R){s=d+(s.length>0?" "+s:s);continue}f=!1}let C=n(p).join(":"),k=g?C+Pr:C,v=k+R;if(l.includes(v))continue;l.push(v);let H=r(R,f);for(let O=0;O<H.length;++O){let N=H[O];l.push(k+N)}s=d+(s.length>0?" "+s:s)}return s};function fd(){let e=0,t,o,a="";for(;e<arguments.length;)(t=arguments[e++])&&(o=N2(t))&&(a&&(a+=" "),a+=o);return a}var N2=e=>{if(typeof e=="string")return e;let t,o="";for(let a=0;a<e.length;a++)e[a]&&(t=N2(e[a]))&&(o&&(o+=" "),o+=t);return o};function pd(e,...t){let o,a,r,n=l;function l(s){let u=t.reduce((d,c)=>c(d),e());return o=ud(u),a=o.cache.get,r=o.cache.set,n=i,i(s)}function i(s){let u=a(s);if(u)return u;let d=cd(s,o);return r(s,d),d}return function(){return n(fd.apply(null,arguments))}}var Ne=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},U2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,q2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Cd=/^\d+\/\d+$/,md=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gd=/\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$/,hd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,vd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,xd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ot=e=>Cd.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),tt=e=>!!e&&Number.isInteger(Number(e)),Rr=e=>e.endsWith("%")&&ce(e.slice(0,-1)),K1=e=>md.test(e),Ld=()=>!0,wd=e=>gd.test(e)&&!hd.test(e),z2=()=>!1,bd=e=>vd.test(e),Id=e=>xd.test(e),yd=e=>!G(e)&&!W(e),Md=e=>Et(e,G2,z2),G=e=>U2.test(e),bt=e=>Et(e,W2,wd),kr=e=>Et(e,Pd,ce),D2=e=>Et(e,j2,z2),Sd=e=>Et(e,K2,Id),Go=e=>Et(e,X2,bd),W=e=>q2.test(e),Co=e=>Bt(e,W2),Rd=e=>Bt(e,Td),O2=e=>Bt(e,j2),kd=e=>Bt(e,G2),Hd=e=>Bt(e,K2),Wo=e=>Bt(e,X2,!0),Et=(e,t,o)=>{let a=U2.exec(e);return a?a[1]?t(a[1]):o(a[2]):!1},Bt=(e,t,o=!1)=>{let a=q2.exec(e);return a?a[1]?t(a[1]):o:!1},j2=e=>e==="position"||e==="percentage",K2=e=>e==="image"||e==="url",G2=e=>e==="length"||e==="size"||e==="bg-size",W2=e=>e==="length",Pd=e=>e==="number",Td=e=>e==="family-name",X2=e=>e==="shadow",Vd=()=>{let e=Ne("color"),t=Ne("font"),o=Ne("text"),a=Ne("font-weight"),r=Ne("tracking"),n=Ne("leading"),l=Ne("breakpoint"),i=Ne("container"),s=Ne("spacing"),u=Ne("radius"),d=Ne("shadow"),c=Ne("inset-shadow"),p=Ne("text-shadow"),g=Ne("drop-shadow"),m=Ne("blur"),M=Ne("perspective"),f=Ne("aspect"),R=Ne("ease"),C=Ne("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],H=()=>[...v(),W,G],O=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],S=()=>[W,G,s],V=()=>[Ot,"full","auto",...S()],z=()=>[tt,"none","subgrid",W,G],j=()=>["auto",{span:["full",tt,W,G]},tt,W,G],X=()=>[tt,"auto",W,G],A=()=>["auto","min","max","fr",W,G],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...S()],x=()=>[Ot,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],w=()=>[e,W,G],I=()=>[...v(),O2,D2,{position:[W,G]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],h=()=>["auto","cover","contain",kd,Md,{size:[W,G]}],T=()=>[Rr,Co,bt],q=()=>["","none","full",u,W,G],B=()=>["",ce,Co,bt],F=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[ce,Rr,O2,D2],ie=()=>["","none",m,W,G],de=()=>["none",ce,W,G],ue=()=>["none",ce,W,G],y=()=>[ce,W,G],b=()=>[Ot,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[K1],breakpoint:[K1],color:[Ld],container:[K1],"drop-shadow":[K1],ease:["in","out","in-out"],font:[yd],"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",ce],text:[K1],"text-shadow":[K1],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ot,G,W,f]}],container:["container"],columns:[{columns:[ce,G,W,i]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:H()}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{start:V()}],end:[{end:V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[tt,"auto",W,G]}],basis:[{basis:[Ot,"full","auto",i,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,Ot,"auto","initial","none",G]}],grow:[{grow:["",ce,W,G]}],shrink:[{shrink:["",ce,W,G]}],order:[{order:[tt,"first","last","none",W,G]}],"grid-cols":[{"grid-cols":z()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":z()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],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:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:x()}],w:[{w:[i,"screen",...x()]}],"min-w":[{"min-w":[i,"screen","none",...x()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[l]},...x()]}],h:[{h:["screen","lh",...x()]}],"min-h":[{"min-h":["screen","lh","none",...x()]}],"max-h":[{"max-h":["screen","lh",...x()]}],"font-size":[{text:["base",o,Co,bt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,W,kr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Rr,G]}],"font-family":[{font:[Rd,G,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,W,G]}],"line-clamp":[{"line-clamp":[ce,"none",W,kr]}],leading:[{leading:[n,...S()]}],"list-image":[{"list-image":["none",W,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",W,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:w()}],"text-color":[{text:w()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",W,bt]}],"text-decoration-color":[{decoration:w()}],"underline-offset":[{"underline-offset":[ce,"auto",W,G]}],"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",W,G]}],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",W,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:h()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},tt,W,G],radial:["",W,G],conic:[tt,W,G]},Hd,Sd]}],"bg-color":[{bg:w()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:w()}],"gradient-via":[{via:w()}],"gradient-to":[{to:w()}],rounded:[{rounded:q()}],"rounded-s":[{"rounded-s":q()}],"rounded-e":[{"rounded-e":q()}],"rounded-t":[{"rounded-t":q()}],"rounded-r":[{"rounded-r":q()}],"rounded-b":[{"rounded-b":q()}],"rounded-l":[{"rounded-l":q()}],"rounded-ss":[{"rounded-ss":q()}],"rounded-se":[{"rounded-se":q()}],"rounded-ee":[{"rounded-ee":q()}],"rounded-es":[{"rounded-es":q()}],"rounded-tl":[{"rounded-tl":q()}],"rounded-tr":[{"rounded-tr":q()}],"rounded-br":[{"rounded-br":q()}],"rounded-bl":[{"rounded-bl":q()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":B()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:w()}],"border-color-x":[{"border-x":w()}],"border-color-y":[{"border-y":w()}],"border-color-s":[{"border-s":w()}],"border-color-e":[{"border-e":w()}],"border-color-t":[{"border-t":w()}],"border-color-r":[{"border-r":w()}],"border-color-b":[{"border-b":w()}],"border-color-l":[{"border-l":w()}],"divide-color":[{divide:w()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,W,G]}],"outline-w":[{outline:["",ce,Co,bt]}],"outline-color":[{outline:w()}],shadow:[{shadow:["","none",d,Wo,Go]}],"shadow-color":[{shadow:w()}],"inset-shadow":[{"inset-shadow":["none",c,Wo,Go]}],"inset-shadow-color":[{"inset-shadow":w()}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:w()}],"ring-offset-w":[{"ring-offset":[ce,bt]}],"ring-offset-color":[{"ring-offset":w()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":w()}],"text-shadow":[{"text-shadow":["none",p,Wo,Go]}],"text-shadow-color":[{"text-shadow":w()}],opacity:[{opacity:[ce,W,G]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"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":[ce]}],"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":w()}],"mask-image-linear-to-color":[{"mask-linear-to":w()}],"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":w()}],"mask-image-t-to-color":[{"mask-t-to":w()}],"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":w()}],"mask-image-r-to-color":[{"mask-r-to":w()}],"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":w()}],"mask-image-b-to-color":[{"mask-b-to":w()}],"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":w()}],"mask-image-l-to-color":[{"mask-l-to":w()}],"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":w()}],"mask-image-x-to-color":[{"mask-x-to":w()}],"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":w()}],"mask-image-y-to-color":[{"mask-y-to":w()}],"mask-image-radial":[{"mask-radial":[W,G]}],"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":w()}],"mask-image-radial-to-color":[{"mask-radial-to":w()}],"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":v()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"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":w()}],"mask-image-conic-to-color":[{"mask-conic-to":w()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:h()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",W,G]}],filter:[{filter:["","none",W,G]}],blur:[{blur:ie()}],brightness:[{brightness:[ce,W,G]}],contrast:[{contrast:[ce,W,G]}],"drop-shadow":[{"drop-shadow":["","none",g,Wo,Go]}],"drop-shadow-color":[{"drop-shadow":w()}],grayscale:[{grayscale:["",ce,W,G]}],"hue-rotate":[{"hue-rotate":[ce,W,G]}],invert:[{invert:["",ce,W,G]}],saturate:[{saturate:[ce,W,G]}],sepia:[{sepia:["",ce,W,G]}],"backdrop-filter":[{"backdrop-filter":["","none",W,G]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[ce,W,G]}],"backdrop-contrast":[{"backdrop-contrast":[ce,W,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,W,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,W,G]}],"backdrop-invert":[{"backdrop-invert":["",ce,W,G]}],"backdrop-opacity":[{"backdrop-opacity":[ce,W,G]}],"backdrop-saturate":[{"backdrop-saturate":[ce,W,G]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,W,G]}],"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",W,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ce,"initial",W,G]}],ease:[{ease:["linear","initial",R,W,G]}],delay:[{delay:[ce,W,G]}],animate:[{animate:["none",C,W,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[M,W,G]}],"perspective-origin":[{"perspective-origin":H()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:y()}],"skew-x":[{"skew-x":y()}],"skew-y":[{"skew-y":y()}],transform:[{transform:[W,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:H()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:b()}],"translate-x":[{"translate-x":b()}],"translate-y":[{"translate-y":b()}],"translate-z":[{"translate-z":b()}],"translate-none":["translate-none"],accent:[{accent:w()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:w()}],"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",W,G]}],"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",W,G]}],fill:[{fill:["none",...w()]}],"stroke-w":[{stroke:[ce,Co,bt,kr]}],stroke:[{stroke:["none",...w()]}],"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"]}},_d=pd(Vd),Dd=(e,t,o)=>Math.min(Math.max(e,t),o),Xo=e=>Math.round(Dd(e,0,255)),Q2=e=>{let t=e.replace("#",""),o=parseInt(t,16);return{r:o>>16&255,g:o>>8&255,b:o&255}},Od=({r:e,g:t,b:o})=>{let a=r=>Xo(r).toString(16).padStart(2,"0");return`#${a(e)}${a(t)}${a(o)}`},Vr=({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,n=o*(1-t),l=o*(1-r*t),i=o*(1-(1-r)*t),s,u,d;switch(a%6){case 0:s=o,u=i,d=n;break;case 1:s=l,u=o,d=n;break;case 2:s=n,u=o,d=i;break;case 3:s=n,u=l,d=o;break;case 4:s=i,u=n,d=o;break;case 5:s=o,u=n,d=l;break;default:s=u=d=0}return{r:Xo(s*255),g:Xo(u*255),b:Xo(d*255)}},_r=({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),n=a-r,l=0,i=a===0?0:n/a,s=a;if(n!==0)switch(a){case e:l=((t-o)/n+(t<o?6:0))/6;break;case t:l=((o-e)/n+2)/6;break;case o:l=((e-t)/n+4)/6;break}return{h:Math.round(l*360),s:Math.round(i*100),v:Math.round(s*100)}},Ed=e=>Od(Vr(e)),Bd=e=>_r(Q2(e));var E2=({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)}},B2=({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)}},Ad=e=>{let{r:t,g:o,b:a}=Q2(e);return(.299*t+.587*o+.114*a)/255>.5?"#000000":"#ffffff"};var Zd=(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 n=e.getHsla();return`hsla(${n.h}, ${n.s}%, ${n.l}%, ${n.a})`;default:Jo()}};function Fd(e){switch(e.type){case"hex":return{...Bd(e.value),a:1};case"rgb":return{..._r(e),a:1};case"rgba":return{..._r(e),a:e.a};case"hsl":return{...B2(e),a:1};case"hsla":return{...B2(e),a:1};case"hsv":return{...e,a:1};case"hsva":return{...e};default:Jo()}}function ot(e,t){let o=Fd(e);switch(t){case"hex":return Ed(o);case"rgb":return Vr(o);case"rgba":return{...Vr(o),a:o.a};case"hsl":return E2(o);case"hsla":return{...E2(o),a:o.a};case"hsv":return{h:o.h,s:o.s,v:o.v};case"hsva":return o;default:Jo()}}var It=(...e)=>_d(Ju(e)),G1=(e,t,o)=>Math.min(Math.max(e,t),o),at=e=>Math.round(e);function Jo(e){throw new Error("You should never get here.")}var rt=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 ot(this.color,"rgb")}getHsv(){return ot(this.color,"hsv")}getHsla(){return ot(this.color,"hsla")}getHsva(){return ot(this.color,"hsva")}getHex(){return ot(this.color,"hex")}getHsl(){return ot(this.color,"hsl")}getRgba(){return ot(this.color,"rgba")}format(t="hex"){return Zd(this,t)}getContrastingColor(){return new e({type:"hex",value:Ad(this.getHex())})}},A2=(e,t)=>{let o=e.getBoundingClientRect(),a,r;if("touches"in t){let u=t.touches[0]||t.changedTouches[0];a=u.clientX,r=u.clientY}else a=t.clientX,r=t.clientY;let n=a-o.left,l=r-o.top,i=G1(n/o.width,0,1),s=G1(l/o.height,0,1);return{left:i,top:s}},Br=({onMove:e,onMoveEnd:t,onKey:o,children:a,className:r,...n})=>{let l=Qo(null),i=Qo(!1),s=We(p=>{!i.current||!l.current||(p.preventDefault(),e(A2(l.current,p)))},[e]),u=We(()=>{i.current=!1,t(),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",u),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",u)},[s,t]),d=We(p=>{let g=l.current;g&&(p.preventDefault(),i.current=!0,e(A2(g,p.nativeEvent)),document.addEventListener("mousemove",s),document.addEventListener("mouseup",u),document.addEventListener("touchmove",s,{passive:!1}),document.addEventListener("touchend",u))},[e,s,u]),c=We(p=>{if(!o)return;let g=p.which||p.keyCode;g<37||g>40||(p.preventDefault(),o({left:g===39?.05:g===37?-.05:0,top:g===40?.05:g===38?-.05:0}))},[o]);return Dr(()=>()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",u),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",u)},[s,u]),Ve.jsx("div",{ref:l,className:It("rounded-inherit absolute inset-0 touch-none outline-none","focus:[&_.react-colorful-pointer]:scale-110",r),onTouchStart:d,onMouseDown:d,onKeyDown:c,tabIndex:0,role:"slider",...n,children:a})},Ar=({className:e,top:t=.5,left:o,color:a})=>Ve.jsx("div",{className:It("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}%`}}),$d=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=We(s=>{t({a:s.left},!1)},[t]),n=We(s=>{t({a:G1(e.a+s.left,0,1)},!0)},[e.a,t]),l=Yo(()=>new rt({type:"hsva",h:e.h,s:e.s,v:e.v,a:0}).format("hsla"),[e.h,e.s,e.v]),i=Yo(()=>new rt({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:It("relative h-full w-full",o),children:Ve.jsxs(Br,{onMove:r,onMoveEnd:a,onKey:n,"aria-label":"Alpha","aria-valuetext":`${at(e.a*100)}%`,"aria-valuenow":at(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, ${l}, ${i})`}}),Ve.jsx(Ar,{className:"z-[1]",top:.5,left:e.a,color:""})]})})},Nd=({hue:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=We(l=>{let i=at(G1(360*l.left,0,360));t({h:i},!1)},[t]),n=We(l=>{t({h:G1(e+l.left*360,0,360)},!0)},[e,t]);return Ve.jsx("div",{className:It("relative h-full w-full",o),children:Ve.jsxs(Br,{onMove:r,onMoveEnd:a,onKey:n,"aria-label":"Hue","aria-valuenow":at(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(Ar,{className:"z-[2]",top:.5,left:e/360,color:""})]})})},Ud=({hsva:e,onChange:t,className:o,onFinishedUpdates:a})=>{let r=We(i=>{let s=at(G1(i.left*100,0,100)),u=at(G1(100-i.top*100,0,100));t({s,v:u},!1)},[t]),n=We(i=>{t({s:G1(e.s+i.left*100,0,100),v:G1(e.v-i.top*100,0,100)},!0)},[e.s,e.v,t]),l=`hsl(${e.h}, 100%, 50%)`;return Ve.jsx("div",{className:It("relative h-full w-full rounded-xl",o),children:Ve.jsxs(Br,{onMove:r,onMoveEnd:a,onKey:n,"aria-label":"Color","aria-valuetext":`Saturation ${at(e.s)}%, Brightness ${at(e.v)}%`,className:"rounded-inherit h-full w-full",children:[Ve.jsx("div",{className:"rounded-inherit absolute inset-0 rounded-b-none",style:{backgroundColor:l,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(Ar,{className:"z-[3]",top:1-e.v/100,left:e.s/100,color:""})]})})},Y2=Wu(null),ea=()=>{let e=Xu(Y2);if(!e)throw new Error("ColorPicker compound components must be used within a ColorPicker");return e};function Z2(e){return"type"in e?new rt(e):e}var qd=({color:e,onChange:t,className:o,children:a,defaultColor:r,...n})=>{let[l,i]=Or(Z2(e??r??{h:340,s:58,v:100,a:1,type:"hsva"})),s=Qo(!1),u=Qo(l);Dr(()=>{!s.current&&e&&(u.current=Z2(e),i(u.current))},[e]);let d=We((m,M)=>{let f=new rt({type:"hsva",...u.current.getHsva(),...m});u.current=f,i(f),s.current=!M,t?.(f)},[t]),c=We(()=>{s.current=!1},[]),p=We(async()=>{if(!("EyeDropper"in window)){console.log("EyeDropper API not supported");return}try{let m=await new window.EyeDropper().open();m.sRGBHex&&d(ot({type:"hex",value:m.sRGBHex},"hsva"),!0)}catch(m){console.log("EyeDropper cancelled or failed:",m)}},[t]),g={hsva:l.getHsva(),updateHsva:d,handleEyeDropper:p,onFinishedUpdates:c};return Ve.jsx(Y2.Provider,{value:g,children:Ve.jsx("div",{...n,className:It("relative flex h-[280px] w-[280px] cursor-default flex-col rounded-2xl bg-white shadow-lg select-none",o),children:a})})},zd=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=ea(),r=We((n,l)=>{o(n,l)},[o]);return Ve.jsx(Ud,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},jd=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=ea(),r=We((n,l)=>{o(n,l)},[o]);return Ve.jsx(Nd,{hue:t.h,onChange:r,className:e,onFinishedUpdates:a})},Kd=({className:e})=>{let{hsva:t,updateHsva:o,onFinishedUpdates:a}=ea(),r=We((n,l)=>{o(n,l)},[o]);return Ve.jsx($d,{hsva:t,onChange:r,className:e,onFinishedUpdates:a})},Gd=({className:e,title:t="Pick color from screen",children:o})=>{let{handleEyeDropper:a}=ea(),[r,n]=Or(!1);return Dr(()=>{typeof window<"u"&&"EyeDropper"in window&&n(!0)},[]),r?Ve.jsx("button",{onClick:a,className:It("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},At=Object.assign(qd,{Saturation:zd,Hue:jd,Alpha:Kd,EyeDropper:Gd});function Wd(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:Jo()}}var J2=(e={type:"hex",value:"#ff6b9d"})=>{let[t,o]=Or(()=>{let l=typeof e=="function"?e():e;return{color:new rt(l),type:l.type}}),a=Yo(()=>Wd(t.color,t.type),[t.color,t.type]),r=Yo(()=>{let l=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:l,alpha:l.a}},[t.color]),n=We(l=>{try{let i="type"in l?new rt(l):l;o(s=>({color:i,type:s.type}))}catch(i){console.warn("Invalid color input:",l,i)}},[]);return[{colorInput:a,colorState:r},n]};import{createPortal as T4}from"react-dom";import{useRef as P1,useMemo as Xd,useEffect as Qd,useState as Fp,useCallback as $p}from"react";function e0(e,t,o,a){var r=this,n=P1(null),l=P1(0),i=P1(0),s=P1(null),u=P1([]),d=P1(),c=P1(),p=P1(e),g=P1(!0),m=P1(),M=P1();p.current=e;var f=typeof window<"u",R=!t&&t!==0&&f;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var C=!!(o=o||{}).leading,k=!("trailing"in o)||!!o.trailing,v=!!o.flushOnExit&&k,H="maxWait"in o,O="debounceOnServer"in o&&!!o.debounceOnServer,N=H?Math.max(+o.maxWait||0,t):null,S=Xd(function(){var V=function(L){var x=u.current,w=d.current;return u.current=d.current=null,l.current=L,i.current=i.current||L,c.current=p.current.apply(w,x)},z=function(L,x){R&&cancelAnimationFrame(s.current),s.current=R?requestAnimationFrame(L):setTimeout(L,x)},j=function(L){if(!g.current)return!1;var x=L-n.current;return!n.current||x>=t||x<0||H&&L-l.current>=N},X=function(L){return s.current=null,k&&u.current?V(L):(u.current=d.current=null,c.current)},A=function L(){var x=Date.now();if(C&&i.current===l.current&&D(),j(x))return X(x);if(g.current){var w=t-(x-n.current),I=H?Math.min(w,N-(x-l.current)):w;z(L,I)}},D=function(){a&&a({})},U=function(){if(f||O){var L,x=Date.now(),w=j(x);if(u.current=[].slice.call(arguments),d.current=r,n.current=x,v&&!m.current&&(m.current=function(){var I;((I=globalThis.document)==null?void 0:I.visibilityState)==="hidden"&&M.current.flush()},(L=globalThis.document)==null||L.addEventListener==null||L.addEventListener("visibilitychange",m.current)),w){if(!s.current&&g.current)return l.current=n.current,z(A,t),C?V(n.current):c.current;if(H)return z(A,t),V(n.current)}return s.current||z(A,t),c.current}};return U.cancel=function(){var L=s.current;L&&(R?cancelAnimationFrame(s.current):clearTimeout(s.current)),l.current=0,u.current=n.current=d.current=s.current=null,L&&a&&a({})},U.isPending=function(){return!!s.current},U.flush=function(){return s.current?X(Date.now()):c.current},U},[C,H,t,N,k,v,R,f,O,a]);return M.current=S,Qd(function(){return g.current=!0,function(){var V;v&&M.current.flush(),m.current&&((V=globalThis.document)==null||V.removeEventListener==null||V.removeEventListener("visibilitychange",m.current),m.current=null),g.current=!1}},[v]),S}import e1 from"react";function yt(e){let t=e?.parentNode;for(;t;){if(t instanceof ShadowRoot){t=t.host;continue}if(t instanceof HTMLElement){let{overflowY:o}=getComputedStyle(t);if(o==="auto"||o==="scroll")return t}t=t.parentNode}return null}var t0='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';function o0({computePosition:e,onClose:t,autoFocus:o=!0,trapFocus:a=!1}={}){let[r,n]=e1.useState(!1),[l,i]=e1.useState({top:0,left:0}),s=e1.useRef(null),u=e1.useRef(null),d=e1.useRef(!1),c=e1.useRef(e);c.current=e;let p=e1.useRef(t);p.current=t;let g=e1.useRef(a);g.current=a;let m=e1.useCallback((...C)=>{!s.current||!c.current||i(c.current(s.current,...C))},[]),M=e1.useCallback(()=>{m(),d.current=!0,n(!0)},[m]),f=e1.useCallback(()=>{p.current&&p.current(),d.current=!1,n(!1),s.current?.focus()},[]),R=e1.useCallback(()=>{d.current?f():M()},[M,f]);return e1.useEffect(()=>{if(!r)return;let C=v=>{if(v.key==="Escape"&&(v.preventDefault(),f()),g.current&&v.key==="Tab"){let H=u.current;if(!H)return;let O=Array.from(H.querySelectorAll(t0)).filter(V=>!V.hasAttribute("disabled")),N=O[0],S=O.at(-1);if(!N||!S)return;v.shiftKey&&document.activeElement===N?(v.preventDefault(),S.focus()):!v.shiftKey&&document.activeElement===S&&(v.preventDefault(),N.focus())}},k=v=>{let H=u.current,O=s.current;if(!H||!O)return;let N=typeof v.composedPath=="function"?v.composedPath():[],S=N.includes(H)||v.target instanceof Node&&H.contains(v.target),V=N.includes(O)||v.target instanceof Node&&O.contains(v.target);!S&&!V&&f()};return document.addEventListener("keydown",C),document.addEventListener("mousedown",k),document.addEventListener("touchstart",k),()=>{document.removeEventListener("keydown",C),document.removeEventListener("mousedown",k),document.removeEventListener("touchstart",k)}},[r,f]),e1.useEffect(()=>{if(!r||!o||!u.current)return;let C=u.current.querySelector(t0);C&&C.focus()},[r,o]),e1.useEffect(()=>{if(!r||!s.current)return;let C=yt(s.current);if(!C)return;let k=()=>f();return C.addEventListener("scroll",k,{passive:!0}),()=>C.removeEventListener("scroll",k)},[r,f]),{isOpen:r,open:M,close:f,toggle:R,triggerRef:s,popoverRef:u,position:l,reposition:m}}var Yd=(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}}},ta=Yd;var Jd={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},a0=Jd;var e3=e=>ta(a0[e.toLowerCase()],6),r0=e3;var t3=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,o3=e=>{let t;return(t=e.match(t3))?ta(parseInt(t[1],16),t[1].length):void 0},n0=o3;var t1="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",eC=`(?:${t1}|none)`,Mt=`${t1}%`,tC=`(?:${t1}%|none)`,mo=`(?:${t1}%|${t1})`,a3=`(?:${t1}%|${t1}|none)`,l0=`(?:${t1}(deg|grad|rad|turn)|${t1})`,oC=`(?:${t1}(deg|grad|rad|turn)|${t1}|none)`,nt="\\s*,\\s*";var aC=new RegExp("^"+a3+"$");var r3=new RegExp(`^rgba?\\(\\s*${t1}${nt}${t1}${nt}${t1}\\s*(?:,\\s*${mo}\\s*)?\\)$`),n3=new RegExp(`^rgba?\\(\\s*${Mt}${nt}${Mt}${nt}${Mt}\\s*(?:,\\s*${mo}\\s*)?\\)$`),l3=e=>{let t={mode:"rgb"},o;if(o=e.match(r3))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},i0=l3;var i3=(e,t)=>e===void 0?void 0:typeof e!="object"?St(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,oa=i3;var s3=(e="rgb")=>t=>(t=oa(t,e))!==void 0?t.mode===e?t:T1[t.mode][e]?T1[t.mode][e](t):e==="rgb"?T1[t.mode].rgb(t):T1.rgb[e](T1[t.mode].rgb(t)):void 0,C1=s3;var T1={},s0={},go=[],Zr={},u3=e=>e,he=e=>(T1[e.mode]={...T1[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{T1[t]||(T1[t]={}),T1[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=u3)}),s0[e.mode]=e,(e.parse||[]).forEach(t=>{d3(t,e.mode)}),C1(e.mode)),aa=e=>s0[e],d3=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");Zr[e]=t}else typeof e=="function"&&go.indexOf(e)<0&&go.push(e)};var Fr=/[^\x00-\x7F]|[a-zA-Z_]/,c3=/[^\x00-\x7F]|[-\w]/,_={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},re=0;function ra(e){let t=e[re],o=e[re+1];return t==="-"||t==="+"?/\d/.test(o)||o==="."&&/\d/.test(e[re+2]):t==="."?/\d/.test(o):/\d/.test(t)}function $r(e){if(re>=e.length)return!1;let t=e[re];if(Fr.test(t))return!0;if(t==="-"){if(e.length-re<2)return!1;let o=e[re+1];return!!(o==="-"||Fr.test(o))}return!1}var f3={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function ho(e){let t="";if((e[re]==="-"||e[re]==="+")&&(t+=e[re++]),t+=na(e),e[re]==="."&&/\d/.test(e[re+1])&&(t+=e[re++]+na(e)),(e[re]==="e"||e[re]==="E")&&((e[re+1]==="-"||e[re+1]==="+")&&/\d/.test(e[re+2])?t+=e[re++]+e[re++]+na(e):/\d/.test(e[re+1])&&(t+=e[re++]+na(e))),$r(e)){let o=la(e);return o==="deg"||o==="rad"||o==="turn"||o==="grad"?{type:_.Hue,value:t*f3[o]}:void 0}return e[re]==="%"?(re++,{type:_.Percentage,value:+t}):{type:_.Number,value:+t}}function na(e){let t="";for(;/\d/.test(e[re]);)t+=e[re++];return t}function la(e){let t="";for(;re<e.length&&c3.test(e[re]);)t+=e[re++];return t}function p3(e){let t=la(e);return e[re]==="("?(re++,{type:_.Function,value:t}):t==="none"?{type:_.None,value:void 0}:{type:_.Ident,value:t}}function C3(e=""){let t=e.trim(),o=[],a;for(re=0;re<t.length;){if(a=t[re++],a===`
|
|
2
|
+
`||a===" "||a===" "){for(;re<t.length&&(t[re]===`
|
|
3
|
+
`||t[re]===" "||t[re]===" ");)re++;continue}if(a===",")return;if(a===")"){o.push({type:_.ParenClose});continue}if(a==="+"){if(re--,ra(t)){o.push(ho(t));continue}return}if(a==="-"){if(re--,ra(t)){o.push(ho(t));continue}if($r(t)){o.push({type:_.Ident,value:la(t)});continue}return}if(a==="."){if(re--,ra(t)){o.push(ho(t));continue}return}if(a==="/"){for(;re<t.length&&(t[re]===`
|
|
4
|
+
`||t[re]===" "||t[re]===" ");)re++;let r;if(ra(t)&&(r=ho(t),r.type!==_.Hue)){o.push({type:_.Alpha,value:r});continue}if($r(t)&&la(t)==="none"){o.push({type:_.Alpha,value:{type:_.None,value:void 0}});continue}return}if(/\d/.test(a)){re--,o.push(ho(t));continue}if(Fr.test(a)){re--,o.push(p3(t));continue}return}return o}function m3(e){e._i=0;let t=e[e._i++];if(!t||t.type!==_.Function||t.value!=="color"||(t=e[e._i++],t.type!==_.Ident))return;let o=Zr[t.value];if(!o)return;let a={mode:o},r=u0(e,!1);if(!r)return;let n=aa(o).channels;for(let l=0,i,s;l<n.length;l++)i=r[l],s=n[l],i.type!==_.None&&(a[s]=i.type===_.Number?i.value:i.value/100,s==="alpha"&&(a[s]=Math.max(0,Math.min(1,a[s]))));return a}function u0(e,t){let o=[],a;for(;e._i<e.length;){if(a=e[e._i++],a.type===_.None||a.type===_.Number||a.type===_.Alpha||a.type===_.Percentage||t&&a.type===_.Hue){o.push(a);continue}if(a.type===_.ParenClose){if(e._i<e.length)return;continue}return}if(!(o.length<3||o.length>4)){if(o.length===4){if(o[3].type!==_.Alpha)return;o[3]=o[3].value}return o.length===3&&o.push({type:_.None,value:void 0}),o.every(r=>r.type!==_.Alpha)?o:void 0}}function g3(e,t){e._i=0;let o=e[e._i++];if(!o||o.type!==_.Function)return;let a=u0(e,t);if(a)return a.unshift(o.value),a}var h3=e=>{if(typeof e!="string")return;let t=C3(e),o=t?g3(t,!0):void 0,a,r=0,n=go.length;for(;r<n;)if((a=go[r++](e,o))!==void 0)return a;return t?m3(t):void 0},St=h3;function v3(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let o={mode:"rgb"},[,a,r,n,l]=t;if(!(a.type===_.Hue||r.type===_.Hue||n.type===_.Hue))return a.type!==_.None&&(o.r=a.type===_.Number?a.value/255:a.value/100),r.type!==_.None&&(o.g=r.type===_.Number?r.value/255:r.value/100),n.type!==_.None&&(o.b=n.type===_.Number?n.value/255:n.value/100),l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var d0=v3;var x3=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,c0=x3;var f0=(e,t,o)=>e+o*(t-e);var L3=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},p0=e=>t=>{let o=L3(t);return a=>{let r=a*o.length,n=a>=1?o.length-1:Math.max(Math.floor(r),0),l=o[n];return l===void 0?void 0:e(l[0],l[1],r-n)}};var E=p0(f0);var fe=e=>{let t=!1,o=e.map(a=>a!==void 0?(t=!0,a):1);return t?o:e};var w3={mode:"rgb",channels:["r","g","b","alpha"],parse:[d0,n0,i0,r0,c0,"srgb"],serialize:"srgb",interpolate:{r:E,g:E,b:E,alpha:{use:E,fixup:fe}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},L1=w3;var Nr=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),b3=e=>{let t=Nr(e.r),o=Nr(e.g),a=Nr(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},Ur=b3;var qr=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),I3=({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:qr(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*o),g:qr(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*o),b:qr(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*o)};return a!==void 0&&(r.alpha=a),r},zr=I3;var jr=(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)},y3=({r:e,g:t,b:o,alpha:a})=>{let r={mode:"lrgb",r:jr(e),g:jr(t),b:jr(o)};return a!==void 0&&(r.alpha=a),r},w1=y3;var M3=e=>{let{r:t,g:o,b:a,alpha:r}=w1(e),n={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&&(n.alpha=r),n},i1=M3;var Kr=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},S3=({r:e,g:t,b:o,alpha:a},r="rgb")=>{let n={mode:r,r:Kr(e),g:Kr(t),b:Kr(o)};return a!==void 0&&(n.alpha=a),n},b1=S3;var R3=({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=b1({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},s1=R3;var k3={...L1,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>zr(i1(e)),xyz65:zr},toMode:{rgb:e=>s1(Ur(e)),xyz65:Ur}},C0=k3;var H3=e=>(e=e%360)<0?e+360:e,be=H3;var P3=(e,t)=>e.map((o,a,r)=>{if(o===void 0)return o;let n=be(o);return a===0||e[a-1]===void 0?n:t(n-be(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),[]),qe=e=>P3(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var Ee=[-.14861,1.78277,-.29227,-.90649,1.97294,0],m0=Math.PI/180,g0=180/Math.PI;var h0=Ee[3]*Ee[4],v0=Ee[1]*Ee[4],x0=Ee[1]*Ee[2]-Ee[0]*Ee[3],T3=({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=(x0*o+e*h0-t*v0)/(x0+h0-v0),n=o-r,l=(Ee[4]*(t-r)-Ee[2]*n)/Ee[3],i={mode:"cubehelix",l:r,s:r===0||r===1?void 0:Math.sqrt(n*n+l*l)/(Ee[4]*r*(1-r))};return i.s&&(i.h=Math.atan2(l,n)*g0-120),a!==void 0&&(i.alpha=a),i},L0=T3;var V3=({h:e,s:t,l:o,alpha:a})=>{let r={mode:"rgb"};e=(e===void 0?0:e+120)*m0,o===void 0&&(o=0);let n=t===void 0?0:t*o*(1-o),l=Math.cos(e),i=Math.sin(e);return r.r=o+n*(Ee[0]*l+Ee[1]*i),r.g=o+n*(Ee[2]*l+Ee[3]*i),r.b=o+n*(Ee[4]*l+Ee[5]*i),a!==void 0&&(r.alpha=a),r},w0=V3;var lt=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let o=be(e.h),a=be(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*r},b0=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let o=be(e.h),a=be(t.h);return Math.abs(a-o)>180?o-(a-360*Math.sign(a-o)):a-o},it=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let o=be(e.h),a=be(t.h),r=Math.sin((a-o+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*r};var ze=e=>{let t=e.reduce((a,r)=>{if(r!==void 0){let n=r*Math.PI/180;a.sin+=Math.sin(n),a.cos+=Math.cos(n)}return a},{sin:0,cos:0}),o=Math.atan2(t.sin,t.cos)*180/Math.PI;return o<0?360+o:o};var _3={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:L0},toMode:{rgb:w0},interpolate:{h:{use:E,fixup:qe},s:E,l:E,alpha:{use:E,fixup:fe}},difference:{h:lt},average:{h:ze}},I0=_3;var D3=({l:e,a:t,b:o,alpha:a},r="lch")=>{t===void 0&&(t=0),o===void 0&&(o=0);let n=Math.sqrt(t*t+o*o),l={mode:r,l:e,c:n};return n&&(l.h=be(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(l.alpha=a),l},m1=D3;var O3=({l:e,c:t,h:o,alpha:a},r="lab")=>{o===void 0&&(o=0);let n={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&&(n.alpha=a),n},g1=O3;var ia=Math.pow(29,3)/Math.pow(3,3),sa=Math.pow(6,3)/Math.pow(29,3);var Re={X:.9642956764295677,Y:1,Z:.8251046025104602},st={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},gm=Math.pow(29,3)/Math.pow(3,3),hm=Math.pow(6,3)/Math.pow(29,3);var Gr=e=>Math.pow(e,3)>sa?Math.pow(e,3):(116*e-16)/ia,E3=({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,n=t/500+r,l=r-o/200,i={mode:"xyz65",x:Gr(n)*st.X,y:Gr(r)*st.Y,z:Gr(l)*st.Z};return a!==void 0&&(i.alpha=a),i},ua=E3;var B3=e=>s1(ua(e)),ut=B3;var Wr=e=>e>sa?Math.cbrt(e):(ia*e+16)/116,A3=({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=Wr(e/st.X),n=Wr(t/st.Y),l=Wr(o/st.Z),i={mode:"lab65",l:116*n-16,a:500*(r-n),b:200*(n-l)};return a!==void 0&&(i.alpha=a),i},da=A3;var Z3=e=>{let t=da(i1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},dt=Z3;var Rt=.14444444444444443*Math.PI,Zt=Math.cos(Rt),Ft=Math.sin(Rt),ca=100/Math.log(139/100);var F3=({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/ca)-1)/.0039},n=(Math.exp(.0435*t*1*1)-1)/.075,l=n*Math.cos(o/180*Math.PI-Rt),i=n*Math.sin(o/180*Math.PI-Rt);return r.a=l*Zt-i/.83*Ft,r.b=l*Ft+i/.83*Zt,a!==void 0&&(r.alpha=a),r},xo=F3;var $3=({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*Zt+o*Ft,n=.83*(o*Zt-t*Ft),l=Math.sqrt(r*r+n*n),i={mode:"dlch",l:ca/1*Math.log(1+.0039*e),c:Math.log(1+.075*l)/(.0435*1*1)};return i.c&&(i.h=be((Math.atan2(n,r)+Rt)/Math.PI*180)),a!==void 0&&(i.alpha=a),i},Lo=$3;var y0=e=>xo(m1(e,"dlch")),M0=e=>g1(Lo(e),"dlab"),N3={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:y0,rgb:e=>ut(y0(e))},fromMode:{lab65:M0,rgb:e=>M0(dt(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:fe}}},S0=N3;var U3={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:xo,dlab:e=>g1(e,"dlab"),rgb:e=>ut(xo(e))},fromMode:{lab65:Lo,dlab:e=>m1(e,"dlch"),rgb:e=>Lo(dt(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:qe},alpha:{use:E,fixup:fe}},difference:{h:it},average:{h:ze}},R0=U3;function Qr({h:e,s:t,i:o,alpha:a}){e=be(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),n;switch(Math.floor(e/60)){case 0:n={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:n={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:n={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:n={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:n={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:n={r:o*(1+t*(3/(2-r)-1)),g:o*(1-t),b:o*(1+t*(3*(1-r)/(2-r)-1))};break;default:n={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return n.mode="rgb",a!==void 0&&(n.alpha=a),n}function Yr({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),n=Math.min(e,t,o),l={mode:"hsi",s:e+t+o===0?0:1-3*n/(e+t+o),i:(e+t+o)/3};return r-n!==0&&(l.h=(r===e?(t-o)/(r-n)+(t<o)*6:r===t?(o-e)/(r-n)+2:(e-t)/(r-n)+4)*60),a!==void 0&&(l.alpha=a),l}var q3={mode:"hsi",toMode:{rgb:Qr},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Yr},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:E,fixup:qe},s:E,i:E,alpha:{use:E,fixup:fe}},difference:{h:lt},average:{h:ze}},k0=q3;function Jr({h:e,s:t,l:o,alpha:a}){e=be(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=o+t*(o<.5?o:1-o),n=r-(r-o)*2*Math.abs(e/60%2-1),l;switch(Math.floor(e/60)){case 0:l={r,g:n,b:2*o-r};break;case 1:l={r:n,g:r,b:2*o-r};break;case 2:l={r:2*o-r,g:r,b:n};break;case 3:l={r:2*o-r,g:n,b:r};break;case 4:l={r:n,g:2*o-r,b:r};break;case 5:l={r,g:2*o-r,b:n};break;default:l={r:2*o-r,g:2*o-r,b:2*o-r}}return l.mode="rgb",a!==void 0&&(l.alpha=a),l}function en({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),n=Math.min(e,t,o),l={mode:"hsl",s:r===n?0:(r-n)/(1-Math.abs(r+n-1)),l:.5*(r+n)};return r-n!==0&&(l.h=(r===e?(t-o)/(r-n)+(t<o)*6:r===t?(o-e)/(r-n)+2:(e-t)/(r-n)+4)*60),a!==void 0&&(l.alpha=a),l}var z3=(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}},H0=z3;var j3=new RegExp(`^hsla?\\(\\s*${l0}${nt}${Mt}${nt}${Mt}\\s*(?:,\\s*${mo}\\s*)?\\)$`),K3=e=>{let t=e.match(j3);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=H0(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},P0=K3;function G3(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let o={mode:"hsl"},[,a,r,n,l]=t;if(a.type!==_.None){if(a.type===_.Percentage)return;o.h=a.value}if(r.type!==_.None){if(r.type===_.Hue)return;o.s=r.value/100}if(n.type!==_.None){if(n.type===_.Hue)return;o.l=n.value/100}return l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var T0=G3;var W3={mode:"hsl",toMode:{rgb:Jr},fromMode:{rgb:en},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[T0,P0],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:qe},s:E,l:E,alpha:{use:E,fixup:fe}},difference:{h:lt},average:{h:ze}},fa=W3;function wo({h:e,s:t,v:o,alpha:a}){e=be(e!==void 0?e:0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Math.abs(e/60%2-1),n;switch(Math.floor(e/60)){case 0:n={r:o,g:o*(1-t*r),b:o*(1-t)};break;case 1:n={r:o*(1-t*r),g:o,b:o*(1-t)};break;case 2:n={r:o*(1-t),g:o,b:o*(1-t*r)};break;case 3:n={r:o*(1-t),g:o*(1-t*r),b:o};break;case 4:n={r:o*(1-t*r),g:o*(1-t),b:o};break;case 5:n={r:o,g:o*(1-t),b:o*(1-t*r)};break;default:n={r:o*(1-t),g:o*(1-t),b:o*(1-t)}}return n.mode="rgb",a!==void 0&&(n.alpha=a),n}function bo({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),n=Math.min(e,t,o),l={mode:"hsv",s:r===0?0:1-n/r,v:r};return r-n!==0&&(l.h=(r===e?(t-o)/(r-n)+(t<o)*6:r===t?(o-e)/(r-n)+2:(e-t)/(r-n)+4)*60),a!==void 0&&(l.alpha=a),l}var X3={mode:"hsv",toMode:{rgb:wo},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:bo},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:E,fixup:qe},s:E,v:E,alpha:{use:E,fixup:fe}},difference:{h:lt},average:{h:ze}},pa=X3;function tn({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 wo({h:e,s:o===1?1:1-t/(1-o),v:1-o,alpha:a})}function on(e){let t=bo(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 Q3(e,t){if(!t||t[0]!=="hwb")return;let o={mode:"hwb"},[,a,r,n,l]=t;if(a.type!==_.None){if(a.type===_.Percentage)return;o.h=a.value}if(r.type!==_.None){if(r.type===_.Hue)return;o.w=r.value/100}if(n.type!==_.None){if(n.type===_.Hue)return;o.b=n.value/100}return l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var V0=Q3;var Y3={mode:"hwb",toMode:{rgb:tn},fromMode:{rgb:on},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[V0],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:qe},w:E,b:E,alpha:{use:E,fixup:fe}},difference:{h:b0},average:{h:ze}},_0=Y3;var $t=.1593017578125,D0=78.84375,Nt=.8359375,Ut=18.8515625,qt=18.6875;function Ca(e){if(e<0)return 0;let t=Math.pow(e,1/D0);return 1e4*Math.pow(Math.max(0,t-Nt)/(Ut-qt*t),1/$t)}function ma(e){if(e<0)return 0;let t=Math.pow(e/1e4,$t);return Math.pow((Nt+Ut*t)/(1+qt*t),D0)}var an=e=>Math.max(e/203,0),e7=({i:e,t,p:o,alpha:a})=>{e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=0);let r=Ca(e+.008609037037932761*t+.11102962500302593*o),n=Ca(e-.00860903703793275*t-.11102962500302599*o),l=Ca(e+.5600313357106791*t-.32062717498731885*o),i={mode:"xyz65",x:an(2.070152218389422*r-1.3263473389671556*n+.2066510476294051*l),y:an(.3647385209748074*r+.680566024947227*n-.0453045459220346*l),z:an(-.049747207535812*r-.0492609666966138*n+1.1880659249923042*l)};return a!==void 0&&(i.alpha=a),i},rn=e7;var nn=(e=0)=>Math.max(e*203,0),t7=({x:e,y:t,z:o,alpha:a})=>{let r=nn(e),n=nn(t),l=nn(o),i=ma(.3592832590121217*r+.6976051147779502*n-.0358915932320289*l),s=ma(-.1920808463704995*r+1.1004767970374323*n+.0753748658519118*l),u=ma(.0070797844607477*r+.0748396662186366*n+.8433265453898765*l),d=.5*i+.5*s,c=1.61376953125*i-3.323486328125*s+1.709716796875*u,p=4.378173828125*i-4.24560546875*s-.132568359375*u,g={mode:"itp",i:d,t:c,p};return a!==void 0&&(g.alpha=a),g},ln=t7;var o7={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:rn,rgb:e=>s1(rn(e))},fromMode:{xyz65:ln,rgb:e=>ln(i1(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:E,t:E,p:E,alpha:{use:E,fixup:fe}}},O0=o7;var a7=134.03437499999998,r7=16295499532821565e-27,sn=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,$t);return Math.pow((Nt+Ut*t)/(1+qt*t),a7)},un=(e=0)=>Math.max(e*203,0),n7=({x:e,y:t,z:o,alpha:a})=>{e=un(e),t=un(t),o=un(o);let r=1.15*e-.15*o,n=.66*t+.34*e,l=sn(.41478972*r+.579999*n+.014648*o),i=sn(-.20151*r+1.120649*n+.0531008*o),s=sn(-.0166008*r+.2648*n+.6684799*o),u=(l+i)/2,d={mode:"jab",j:.44*u/(1-.56*u)-r7,a:3.524*l-4.066708*i+.542708*s,b:.199076*l+1.096799*i-1.295875*s};return a!==void 0&&(d.alpha=a),d},ga=n7;var l7=134.03437499999998,E0=16295499532821565e-27,dn=e=>{if(e<0)return 0;let t=Math.pow(e,1/l7);return 1e4*Math.pow((Nt-t)/(qt*t-Ut),1/$t)},cn=e=>e/203,i7=({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+E0)/(.44+.56*(e+E0)),n=dn(r+.13860504*t+.058047316*o),l=dn(r-.13860504*t-.058047316*o),i=dn(r-.096019242*t-.8118919*o),s={mode:"xyz65",x:cn(1.661373024652174*n-.914523081304348*l+.23136208173913045*i),y:cn(-.3250758611844533*n+1.571847026732543*l-.21825383453227928*i),z:cn(-.090982811*n-.31272829*l+1.5227666*i)};return a!==void 0&&(s.alpha=a),s},ha=i7;var s7=e=>{let t=ga(i1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},va=s7;var u7=e=>s1(ha(e)),xa=u7;var d7={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:va,xyz65:ga},toMode:{rgb:xa,xyz65:ha},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:E,a:E,b:E,alpha:{use:E,fixup:fe}}},B0=d7;var c7=({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),n={mode:"jch",j:e,c:r};return r&&(n.h=be(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(n.alpha=a),n},fn=c7;var f7=({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},pn=f7;var p7={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:pn,rgb:e=>xa(pn(e))},fromMode:{rgb:e=>fn(va(e)),jab:fn},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:E,fixup:qe},c:E,j:E,alpha:{use:E,fixup:fe}},difference:{h:it},average:{h:ze}},A0=p7;var ct=Math.pow(29,3)/Math.pow(3,3),zt=Math.pow(6,3)/Math.pow(29,3);var Cn=e=>Math.pow(e,3)>zt?Math.pow(e,3):(116*e-16)/ct,C7=({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,n=t/500+r,l=r-o/200,i={mode:"xyz50",x:Cn(n)*Re.X,y:Cn(r)*Re.Y,z:Cn(l)*Re.Z};return a!==void 0&&(i.alpha=a),i},jt=C7;var m7=({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=b1({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},E1=m7;var g7=e=>E1(jt(e)),La=g7;var h7=e=>{let{r:t,g:o,b:a,alpha:r}=w1(e),n={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&&(n.alpha=r),n},B1=h7;var mn=e=>e>zt?Math.cbrt(e):(ct*e+16)/116,v7=({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=mn(e/Re.X),n=mn(t/Re.Y),l=mn(o/Re.Z),i={mode:"lab",l:116*n-16,a:500*(r-n),b:200*(n-l)};return a!==void 0&&(i.alpha=a),i},Kt=v7;var x7=e=>{let t=Kt(B1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},wa=x7;function L7(e,t){if(!t||t[0]!=="lab")return;let o={mode:"lab"},[,a,r,n,l]=t;if(!(a.type===_.Hue||r.type===_.Hue||n.type===_.Hue))return a.type!==_.None&&(o.l=Math.min(Math.max(0,a.value),100)),r.type!==_.None&&(o.a=r.type===_.Number?r.value:r.value*125/100),n.type!==_.None&&(o.b=n.type===_.Number?n.value:n.value*125/100),l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var Z0=L7;var w7={mode:"lab",toMode:{xyz50:jt,rgb:La},fromMode:{xyz50:Kt,rgb:wa},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Z0],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:fe}}},Gt=w7;var b7={...Gt,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:ua,rgb:ut},fromMode:{xyz65:da,rgb:dt},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},F0=b7;function I7(e,t){if(!t||t[0]!=="lch")return;let o={mode:"lch"},[,a,r,n,l]=t;if(a.type!==_.None){if(a.type===_.Hue)return;o.l=Math.min(Math.max(0,a.value),100)}if(r.type!==_.None&&(o.c=Math.max(0,r.type===_.Number?r.value:r.value*150/100)),n.type!==_.None){if(n.type===_.Percentage)return;o.h=n.value}return l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var $0=I7;var y7={mode:"lch",toMode:{lab:g1,rgb:e=>La(g1(e))},fromMode:{rgb:e=>m1(wa(e)),lab:m1},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[$0],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:qe},c:E,l:E,alpha:{use:E,fixup:fe}},difference:{h:it},average:{h:ze}},Wt=y7;var M7={...Wt,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>g1(e,"lab65"),rgb:e=>ut(g1(e,"lab65"))},fromMode:{rgb:e=>m1(dt(e),"lch65"),lab65:e=>m1(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},N0=M7;var S7=({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),n={mode:"lchuv",l:e,c:r};return r&&(n.h=be(Math.atan2(o,t)*180/Math.PI)),a!==void 0&&(n.alpha=a),n},gn=S7;var R7=({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},hn=R7;var U0=(e,t,o)=>4*e/(e+15*t+3*o),q0=(e,t,o)=>9*t/(e+15*t+3*o),k7=U0(Re.X,Re.Y,Re.Z),H7=q0(Re.X,Re.Y,Re.Z),P7=e=>e<=zt?ct*e:116*Math.cbrt(e)-16,T7=({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=P7(t/Re.Y),n=U0(e,t,o),l=q0(e,t,o);!isFinite(n)||!isFinite(l)?r=n=l=0:(n=13*r*(n-k7),l=13*r*(l-H7));let i={mode:"luv",l:r,u:n,v:l};return a!==void 0&&(i.alpha=a),i},Io=T7;var V7=(e,t,o)=>4*e/(e+15*t+3*o),_7=(e,t,o)=>9*t/(e+15*t+3*o),D7=V7(Re.X,Re.Y,Re.Z),O7=_7(Re.X,Re.Y,Re.Z),E7=({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)+D7,n=o/(13*e)+O7,l=Re.Y*(e<=8?e/ct:Math.pow((e+16)/116,3)),i=l*(9*r)/(4*n),s=l*(12-3*r-20*n)/(4*n),u={mode:"xyz50",x:i,y:l,z:s};return a!==void 0&&(u.alpha=a),u},yo=E7;var B7=e=>gn(Io(B1(e))),A7=e=>E1(yo(hn(e))),Z7={mode:"lchuv",toMode:{luv:hn,rgb:A7},fromMode:{rgb:B7,luv:gn},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:qe},c:E,l:E,alpha:{use:E,fixup:fe}},difference:{h:it},average:{h:ze}},z0=Z7;var F7={...L1,mode:"lrgb",toMode:{rgb:b1},fromMode:{rgb:w1},parse:["srgb-linear"],serialize:"srgb-linear"},j0=F7;var $7={mode:"luv",toMode:{xyz50:yo,rgb:e=>E1(yo(e))},fromMode:{xyz50:Io,rgb:e=>Io(B1(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:fe}}},K0=$7;var N7=({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),n=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*o),l=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*o),i={mode:"oklab",l:.210454268309314*r+.7936177747023054*n-.0040720430116193*l,a:1.9779985324311684*r-2.42859224204858*n+.450593709617411*l,b:.0259040424655478*r+.7827717124575296*n-.8086757549230774*l};return a!==void 0&&(i.alpha=a),i},ba=N7;var U7=e=>{let t=ba(w1(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ft=U7;var 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=Math.pow(e+.3963377773761749*t+.2158037573099136*o,3),n=Math.pow(e-.1055613458156586*t-.0638541728258133*o,3),l=Math.pow(e-.0894841775298119*t-1.2914855480194092*o,3),i={mode:"lrgb",r:4.076741636075957*r-3.3077115392580616*n+.2309699031821044*l,g:-1.2684379732850317*r+2.6097573492876887*n-.3413193760026573*l,b:-.0041960761386756*r-.7034186179359362*n+1.7076146940746117*l};return a!==void 0&&(i.alpha=a),i},A1=q7;var z7=e=>b1(A1(e)),pt=z7;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 kt(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function j7(e,t){let o,a,r,n,l,i,s,u;-1.88170328*e-.80936493*t>1?(o=1.19086277,a=1.76576728,r=.59662641,n=.75515197,l=.56771245,i=4.0767416621,s=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(o=.73956515,a=-.45954404,r=.08285427,n=.1254107,l=.14503204,i=-1.2684380046,s=2.6097574011,u=-.3413193965):(o=1.35733652,a=-.00915799,r=-1.1513021,n=-.50559606,l=.00692167,i=-.0041960863,s=-.7034186147,u=1.707614701);let d=o+a*e+r*t+n*e*e+l*e*t,c=.3963377774*e+.2158037573*t,p=-.1055613458*e-.0638541728*t,g=-.0894841775*e-1.291485548*t;{let m=1+d*c,M=1+d*p,f=1+d*g,R=m*m*m,C=M*M*M,k=f*f*f,v=3*c*m*m,H=3*p*M*M,O=3*g*f*f,N=6*c*c*m,S=6*p*p*M,V=6*g*g*f,z=i*R+s*C+u*k,j=i*v+s*H+u*O,X=i*N+s*S+u*V;d=d-z*j/(j*j-.5*z*X)}return d}function vn(e,t){let o=j7(e,t),a=A1({l:1,a:o*e,b:o*t}),r=Math.cbrt(1/Math.max(a.r,a.g,a.b)),n=r*o;return[r,n]}function K7(e,t,o,a,r,n=null){n||(n=vn(e,t));let l;if((o-r)*n[1]-(n[0]-r)*a<=0)l=n[1]*r/(a*n[0]+n[1]*(r-o));else{l=n[1]*(r-1)/(a*(n[0]-1)+n[1]*(r-o));{let i=o-r,s=a,u=.3963377774*e+.2158037573*t,d=-.1055613458*e-.0638541728*t,c=-.0894841775*e-1.291485548*t,p=i+s*u,g=i+s*d,m=i+s*c;{let M=r*(1-l)+l*o,f=l*a,R=M+f*u,C=M+f*d,k=M+f*c,v=R*R*R,H=C*C*C,O=k*k*k,N=3*p*R*R,S=3*g*C*C,V=3*m*k*k,z=6*p*p*R,j=6*g*g*C,X=6*m*m*k,A=4.0767416621*v-3.3077115913*H+.2309699292*O-1,D=4.0767416621*N-3.3077115913*S+.2309699292*V,U=4.0767416621*z-3.3077115913*j+.2309699292*X,L=D/(D*D-.5*A*U),x=-A*L,w=-1.2684380046*v+2.6097574011*H-.3413193965*O-1,I=-1.2684380046*N+2.6097574011*S-.3413193965*V,P=-1.2684380046*z+2.6097574011*j-.3413193965*X,h=I/(I*I-.5*w*P),T=-w*h,q=-.0041960863*v-.7034186147*H+1.707614701*O-1,B=-.0041960863*N-.7034186147*S+1.707614701*V,F=-.0041960863*z-.7034186147*j+1.707614701*X,$=B/(B*B-.5*q*F),Z=-q*$;x=L>=0?x:1e6,T=h>=0?T:1e6,Z=$>=0?Z:1e6,l+=Math.min(x,Math.min(T,Z))}}}return l}function So(e,t,o=null){o||(o=vn(e,t));let a=o[0],r=o[1];return[r/a,r/(1-a)]}function Ia(e,t,o){let a=vn(t,o),r=K7(t,o,e,1,e,a),n=So(t,o,a),l=.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*n[0],(1-e)*n[1]),u=e*l,d=(1-e)*i,c=.9*s*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(d*d*d*d))));return u=e*.4,d=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(d*d))),c,r]}function ya(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 n=Math.sqrt(o*o+a*a);if(!n)return r.s=0,r;let[l,i,s]=Ia(t,o/n,a/n),u;if(n<i){let d=0,c=.8*l,p=1-c/i;u=(n-d)/(c+p*(n-d))*.8}else{let d=i,c=.2*i*i*1.25*1.25/l,p=1-c/(s-i);u=.8+.2*((n-d)/(c+p*(n-d)))}return u&&(r.s=u,r.h=be(Math.atan2(a,o)*180/Math.PI)),r}function Ma(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:kt(a)};if(e.alpha!==void 0&&(r.alpha=e.alpha),!o||a===1)return r.a=r.b=0,r;let n=Math.cos(t/180*Math.PI),l=Math.sin(t/180*Math.PI),[i,s,u]=Ia(r.l,n,l),d,c,p,g;o<.8?(d=1.25*o,c=0,p=.8*i,g=1-p/s):(d=5*(o-.8),c=s,p=.2*s*s*1.25*1.25/i,g=1-p/(u-s));let m=c+d*p/(1-g*d);return r.a=m*n,r.b=m*l,r}var G7={...fa,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:ya,rgb:e=>ya(ft(e))},toMode:{oklab:Ma,rgb:e=>pt(Ma(e))}},G0=G7;function Sa(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),n=r?o/r:1,l=r?a/r:1,[i,s]=So(n,l),u=.5,d=1-u/i,c=s/(r+t*s),p=c*t,g=c*r,m=kt(p),M=g*m/p,f=A1({l:m,a:n*M,b:l*M}),R=Math.cbrt(1/Math.max(f.r,f.g,f.b,0));t=t/R,r=r/R*Mo(t)/t,t=Mo(t);let C={mode:"okhsv",s:r?(u+s)*g/(s*u+s*d*g):0,v:t?t/p:0};return C.s&&(C.h=be(Math.atan2(a,o)*180/Math.PI)),e.alpha!==void 0&&(C.alpha=e.alpha),C}function Ra(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,n=Math.cos(o/180*Math.PI),l=Math.sin(o/180*Math.PI),[i,s]=So(n,l),u=.5,d=1-u/i,c=1-a*u/(u+s-s*d*a),p=a*s*u/(u+s-s*d*a),g=kt(c),m=p*g/c,M=A1({l:g,a:n*m,b:l*m}),f=Math.cbrt(1/Math.max(M.r,M.g,M.b,0)),R=kt(r*c),C=p*R/c;return t.l=R*f,t.a=C*n*f,t.b=C*l*f,t}var W7={...pa,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Sa,rgb:e=>Sa(ft(e))},toMode:{oklab:Ra,rgb:e=>pt(Ra(e))}},W0=W7;function X7(e,t){if(!t||t[0]!=="oklab")return;let o={mode:"oklab"},[,a,r,n,l]=t;if(!(a.type===_.Hue||r.type===_.Hue||n.type===_.Hue))return a.type!==_.None&&(o.l=Math.min(Math.max(0,a.type===_.Number?a.value:a.value/100),1)),r.type!==_.None&&(o.a=r.type===_.Number?r.value:r.value*.4/100),n.type!==_.None&&(o.b=n.type===_.Number?n.value:n.value*.4/100),l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var X0=X7;var Q7={...Gt,mode:"oklab",toMode:{lrgb:A1,rgb:pt},fromMode:{lrgb:ba,rgb:ft},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[X0],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}`:""})`},Q0=Q7;function Y7(e,t){if(!t||t[0]!=="oklch")return;let o={mode:"oklch"},[,a,r,n,l]=t;if(a.type!==_.None){if(a.type===_.Hue)return;o.l=Math.min(Math.max(0,a.type===_.Number?a.value:a.value/100),1)}if(r.type!==_.None&&(o.c=Math.max(0,r.type===_.Number?r.value:r.value*.4/100)),n.type!==_.None){if(n.type===_.Percentage)return;o.h=n.value}return l.type!==_.None&&(o.alpha=Math.min(1,Math.max(0,l.type===_.Number?l.value:l.value/100))),o}var Y0=Y7;var J7={...Wt,mode:"oklch",toMode:{oklab:e=>g1(e,"oklab"),rgb:e=>pt(g1(e,"oklab"))},fromMode:{rgb:e=>m1(ft(e),"oklch"),oklab:e=>m1(e,"oklch")},parse:[Y0],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]}},J0=J7;var e4=e=>{let{r:t,g:o,b:a,alpha:r}=w1(e),n={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&&(n.alpha=r),n},xn=e4;var t4=({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=b1({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},Ln=t4;var o4={...L1,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>Ln(i1(e)),xyz65:Ln},toMode:{rgb:e=>s1(xn(e)),xyz65:xn}},ei=o4;var wn=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},a4=({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:wn(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*o),g:wn(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*o),b:wn(e*0+t*0+1.2119675456389452*o)};return a!==void 0&&(r.alpha=a),r},bn=a4;var In=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},r4=e=>{let t=In(e.r),o=In(e.g),a=In(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},yn=r4;var n4={...L1,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:bn,rgb:e=>bn(B1(e))},toMode:{xyz50:yn,rgb:e=>E1(yn(e))}},ti=n4;var oi=1.09929682680944,l4=.018053968510807,Mn=e=>{let t=Math.abs(e);return t>l4?(Math.sign(e)||1)*(oi*Math.pow(t,.45)-(oi-1)):4.5*e},i4=({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:Mn(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*o),g:Mn(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*o),b:Mn(e*.0176398574453108-t*.0427706132578085+.9421031212354739*o)};return a!==void 0&&(r.alpha=a),r},Sn=i4;var ai=1.09929682680944,s4=.018053968510807,Rn=(e=0)=>{let t=Math.abs(e);return t<s4*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+ai-1)/ai,1/.45)},u4=e=>{let t=Rn(e.r),o=Rn(e.g),a=Rn(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},kn=u4;var d4={...L1,mode:"rec2020",fromMode:{xyz65:Sn,rgb:e=>Sn(i1(e))},toMode:{xyz65:kn,rgb:e=>s1(kn(e))},parse:["rec2020"],serialize:"rec2020"},ri=d4;var W1=.0037930732552754493,ka=Math.cbrt(W1);var Hn=e=>Math.cbrt(e)-ka,c4=e=>{let{r:t,g:o,b:a,alpha:r}=w1(e),n=Hn(.3*t+.622*o+.078*a+W1),l=Hn(.23*t+.692*o+.078*a+W1),i=Hn(.2434226892454782*t+.2047674442449682*o+.5518098665095535*a+W1),s={mode:"xyb",x:(n-l)/2,y:(n+l)/2,b:i-(n+l)/2};return r!==void 0&&(s.alpha=r),s},ni=c4;var Pn=e=>Math.pow(e+ka,3),f4=({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=Pn(e+t)-W1,n=Pn(t-e)-W1,l=Pn(o+t)-W1,i=b1({r:11.031566904639861*r-9.866943908131562*n-.16462299650829934*l,g:-3.2541473810744237*r+4.418770377582723*n-.16462299650829934*l,b:-3.6588512867136815*r+2.7129230459360922*n+1.9459282407775895*l});return a!==void 0&&(i.alpha=a),i},li=f4;var p4={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:li},fromMode:{rgb:ni},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:E,y:E,b:E,alpha:{use:E,fixup:fe}}},ii=p4;var C4={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:E1,lab:Kt},fromMode:{rgb:B1,lab:jt},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:fe}}},si=C4;var m4=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 n={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&&(n.alpha=r),n},ui=m4;var g4=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 n={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&&(n.alpha=r),n},di=g4;var h4={mode:"xyz65",toMode:{rgb:s1,xyz50:ui},fromMode:{rgb:i1,xyz50:di},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:fe}}},ci=h4;var v4=({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},fi=v4;var x4=({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},pi=x4;var L4={mode:"yiq",toMode:{rgb:pi},fromMode:{rgb:fi},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:fe}}},Ci=L4;var w4=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,b4=(e=4)=>t=>typeof t=="number"?w4(t,e):t,Ro=b4;var Dw=Ro(2);var Ow=C1("rgb"),Ew=C1("hsl");var Tn=e=>{let t=oa(e);if(!t)return;let o=aa(t.mode);if(!o.serialize||typeof o.serialize=="string"){let a=`color(${o.serialize||`--${t.mode}`} `;return o.channels.forEach((r,n)=>{r!=="alpha"&&(a+=(n?" ":"")+(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 Ib=he(C0),yb=he(I0),Mb=he(S0),Sb=he(R0),Rb=he(k0),kb=he(fa),Hb=he(pa),Pb=he(_0),Tb=he(O0),Vb=he(B0),_b=he(A0),Db=he(Gt),Ob=he(F0),Eb=he(Wt),Bb=he(N0),Ab=he(z0),Zb=he(j0),Fb=he(K0),$b=he(G0),Nb=he(W0),Ub=he(Q0),qb=he(J0),zb=he(ei),jb=he(ti),Kb=he(ri),Gb=he(L1),Wb=he(ii),Xb=he(si),Qb=he(ci),Yb=he(Ci);var _n=C1("rgb"),I4=C1("hsl"),y4=C1("oklch"),M4=C1("oklab"),S4=C1("lch"),R4=C1("lab"),k4=Ro(3),Vn=null;function H4(){return Vn??(Vn=document.createElement("canvas").getContext("2d")),Vn}function mi(e){try{let t=H4();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 gi(e){if(!e||typeof e!="string")return!1;let t=e.trim();return St(t)!==void 0?!0:mi(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 n=_n(a);if(n&&"r"in n&&"g"in n&&"b"in n)return{r:Math.round(Math.min(255,Math.max(0,n.r*255))),g:Math.round(Math.min(255,Math.max(0,n.g*255))),b:Math.round(Math.min(255,Math.max(0,n.b*255))),a:n.alpha??1}}let r=mi(o);if(r){if(r.startsWith("#")){let l=r.slice(1);return{r:parseInt(l.slice(0,2),16),g:parseInt(l.slice(2,4),16),b:parseInt(l.slice(4,6),16),a:1}}let n=r.match(/rgba?\(\s*(\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(n&&n[1]!=null&&n[2]!=null&&n[3]!=null)return{r:+n[1],g:+n[2],b:+n[3],a:n[4]!=null?+n[4]:1}}return t}var P4=new Set(["initial","inherit","unset","revert","revert-layer"]);function Ha(e){return P4.has((e??"").trim().toLowerCase())}function hi(e){let t=(e??"").trim();if(t===""||Ha(t))return!1;let o=t.toLowerCase();return o!=="currentcolor"&&!o.includes("var(")}function Xt(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 ko(e){let t=e.startsWith("#")?e.slice(1):e;return/^[0-9a-fA-F]+$/.test(t)&&[3,4,6,8].includes(t.length)}function Ho(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)),n=`#${[t,o,a].map(l=>l.toString(16).padStart(2,"0")).join("")}`;return r<1?n+Math.round(r*255).toString(16).padStart(2,"0"):n}function vi(e){return!e||typeof e!="string"?"rgb":St(e.trim())?.mode??"rgb"}function u1(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 y4(o);case"oklab":return M4(o);case"lch":return S4(o);case"lab":return R4(o);default:return o}}function Dn(e){let t=e?_n(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 On(e){if(!e)return"";let t={...e},o=t;for(let a of Object.keys(o)){let r=o[a];typeof r=="number"&&(o[a]=k4(r))}return Tn(t)}function Po(e){let t={mode:"rgb",r:e.r/255,g:e.g/255,b:e.b/255},o=I4(t);return o?{h:o.h??0,s:o.s*100,l:o.l*100}:{h:0,s:0,l:0}}function En(e){let t={mode:"hsl",h:e.h,s:e.s/100,l:e.l/100},o=_n(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)}}function Bn(e){let t=(e??"").trim();return t===""||t.toLowerCase()==="none"||Ha(t)?"":t}function _1(e){return Bn(e)!==""}function Pa(e){return(e??"").trim().toLowerCase()==="text"}function V1(e){let t=[],o=0,a="";for(let r of e)r==="("?o++:r===")"&&o--,r===","&&o===0?(t.push(a.trim()),a=""):a+=r;return a.trim()!==""&&t.push(a.trim()),t}function An(e,t,o){let a=V1(e),r=V1(t.toLowerCase());if(a.length===0||r.length===0)return"";let n=o.toLowerCase();return a.filter((l,i)=>r[i%r.length]===n&&_1(l)).join(", ")}function xi(e,t){let o=V1(e);if(o.length===0)return"";let a=V1(t.toLowerCase());return o.filter((r,n)=>(a.length===0||!Pa(a[n%a.length]))&&_1(r)).join(", ")}function Zn(e,t){let o=V1(t.toLowerCase());if(o.length===0)return!1;let a=V1(e).length||1;return Pa(o[(a-1)%o.length])}function Li(e,t,o,a){let r=V1(e);if(r.length===0)return"";let n=V1(t.toLowerCase());return n.length===0?a==="unchanged"?e:r.map(()=>"none").join(", "):r.map((l,i)=>o(n[i%n.length])?"none":l).join(", ")}function wi(e,t){return Li(e,t,Pa,"unchanged")}function bi(e,t){return Li(e,t,o=>!Pa(o),"clearAll")}function Ii(e,t){let o=V1(t.toLowerCase());if(o.length===0)return t;let r=((V1(e).length||1)-1)%o.length;return o.map((n,l)=>l===r?"border-box":n).join(", ")}function Fn(e,t,o=!1){let a=(e??"").trim();return a===""||Ha(a)||a.toLowerCase()==="currentcolor"?!1:o||t==null?!0:a.toLowerCase()!==t.trim().toLowerCase()}function yi(e){let t=V1((e??"").toLowerCase());return t.length>1&&t.some(o=>o!=="border-box")}function Mi(e,t,o,a,r=_1,n="none"){if(e.trim()==="")return[];let l=(a??"").trim();if(l.toLowerCase()===n.toLowerCase())return[];let i=l||(o??"");return r(i)?[{property:t,oldValue:i,newValue:n}]:[]}import{jsx as je,jsxs as Z1}from"react/jsx-runtime";var $n=16,Qt=4,V4=245,Si=260,_4=200,D4="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%)",O4=["oklch","oklab","lch","lab","hsl"],Ri=["oklch","oklab","lch","lab"],Nn=["rgb","hsl","oklch","oklab","lch","lab"];function Un(e){let t=vi(e);return O4.includes(t)?t:"rgb"}function To(e,t){let o=Po({r:e.r,g:e.g,b:e.b}),a=u1(e,"oklch"),r=u1(e,"oklab"),n=u1(e,"lch"),l=u1(e,"lab");return{hex:Z4(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(n.l),lch_c:Math.round(n.c),lch_h:Math.round(n.h||0),lab_l:Math.round(l.l),lab_a:Math.round(l.a),lab_b:Math.round(l.b)}}function zn(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 E4(e){let t=yt(e);return t?t.getBoundingClientRect():{top:0,bottom:window.innerHeight,left:0,right:window.innerWidth}}function B4(e,t=V4){let o=e.getBoundingClientRect(),a=E4(e),r=a.bottom-o.bottom-Qt,n=o.top-a.top-Qt,i=r<t&&n>=t?o.top-t-Qt:o.bottom+Qt;i=Math.max(a.top+Qt,Math.min(i,a.bottom-t-Qt));let s=o.left;return s+Si>a.right&&(s=a.right-Si-$n),s<a.left+$n&&(s=a.left+$n),{top:i,left:s}}function jn(e){return e!=null&&typeof e=="string"?e:"#ffffff"}function qn(e){let{r:t,g:o,b:a,a:r}=Ct(jn(e));return{type:"rgba",r:t,g:o,b:a,a:r}}function A4(e,t){let o=e||Xt(t);return t.a>=1?{backgroundColor:o}:{backgroundColor:o,backgroundImage:`linear-gradient(0deg, ${o}, ${o}), ${D4}`,backgroundSize:"100% 100%, 8px 8px, 8px 8px, 8px 8px, 8px 8px",backgroundPosition:"0 0, 0 0, 0 4px, 4px -4px, -4px 0"}}function Z4(e,t){let o=typeof e=="string"?e.trim():"";return ko(o)?o:Ho(t)}var F4=e=>e.preventDefault(),$4=e=>{e.key==="Enter"&&e.currentTarget.blur()};function N4(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:n}=t,l=Po({r:o,g:a,b:r}),i={r:o,g:a,b:r,a:n/100},s=u1(i,"oklch"),u=u1(i,"oklab"),d=u1(i,"lch"),c=u1(i,"lab");return{...e,hex:Ho(i),r:o,g:a,b:r,h:Math.round(l.h),s:Math.round(l.s),l:Math.round(l.l),a:n,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(u.l*100),oklab_a:Math.round(u.a*1e3)/10,oklab_b:Math.round(u.b*1e3)/10,lch_l:Math.round(d.l),lch_c:Math.round(d.c),lch_h:Math.round(d.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 u=En({h:o.h,s:o.s,l:o.l});o.r=Math.round(u.r),o.g=Math.round(u.g),o.b=Math.round(u.b),a={r:o.r,g:o.g,b:o.b,a:o.a/100}}else{let u=zn(e.format,o);a=Dn(u),o.r=a.r,o.g=a.g,o.b=a.b}let r=Po({r:o.r,g:o.g,b:o.b}),n=u1(a,"oklch"),l=u1(a,"oklab"),i=u1(a,"lch"),s=u1(a,"lab");return{...o,hex:Ho(a),h:Math.round(r.h),s:Math.round(r.s),l:Math.round(r.l),oklch_l:Math.round(n.l*100),oklch_c:Math.round(n.c*1e3)/10,oklch_h:Math.round(n.h||0),oklab_l:Math.round(l.l*100),oklab_a:Math.round(l.a*1e3)/10,oklab_b:Math.round(l.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 U4={placeholder:"Enter color value",ariaValue:"{0} color value",ariaOpenPicker:"{0}, open color picker. Current color: {1}",ariaPicker:"{0} picker",ariaSaturation:"Saturation {0}%, brightness {1}%",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",gradientValue:"Gradient",imageValue:"Image"};function Ta({label:e,value:t,onChange:o,id:a="color",aria:r,backgroundImage:n}){let l=p1(U4,r),i=`${a}-trigger`,s=`${a}-popover`,u=jn(t),[{colorInput:d,colorState:c},p]=J2(()=>qn(u)),[g,m]=ke.useReducer(N4,u,y=>{let b=Ct(y),K=To(b,y);return{format:Un(y),...K}}),M=ke.useRef(g);M.current=g;let f=ke.useRef(null),R=ke.useRef(t),C=ke.useRef(o);C.current=o;let k=ke.useCallback(y=>{let b=M.current.format,K;if(Ri.includes(b)){let Q=u1(y,b);K=On(Q)}else if(b==="hsl"){let Q=Po({r:y.r,g:y.g,b:y.b}),xe=Math.round(y.a*100)/100;K=xe>=1?`hsl(${Math.round(Q.h)}, ${Math.round(Q.s)}%, ${Math.round(Q.l)}%)`:`hsla(${Math.round(Q.h)}, ${Math.round(Q.s)}%, ${Math.round(Q.l)}%, ${xe})`}else K=Xt(y);K!==f.current&&(f.current=K,R.current=K,typeof C.current=="function"&&C.current(K))},[]),v=e0(k,_4),H=o0({computePosition:B4,onClose:v.flush,trapFocus:!0});ke.useEffect(()=>{let y=jn(t);if(y===R.current)return;R.current=y;let b=Ct(y);p(qn(t));let K=To(b,y),Q=Un(y);m({type:"SET_ALL",...K}),Q!==M.current.format&&m({type:"SET_FORMAT",format:Q})},[t,p]);let O=ke.useCallback(y=>{v.cancel();let b=y.target.value;if((!b||!b.startsWith("#"))&&(b="#"+b.replace(/^#+/,"")),ko(b)){p({type:"hex",value:b});let K=Ct(b),Q=To(K,b);m({type:"SET_ALL",...Q})}else m({type:"SET_HEX",hex:b})},[v,p]),N=ke.useCallback(()=>{v.cancel();let y=M.current.hex.trim();if(ko(y)){let b=Ct(y),K=To(b,y);m({type:"SET_ALL",...K}),k(b)}else{let b=M.current;m({type:"SET_HEX",hex:Ho({r:b.r,g:b.g,b:b.b,a:b.a/100})})}},[v,k]),S=ke.useMemo(()=>{switch(g.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}]}},[g.format]),V=ke.useCallback((y,b)=>{v.cancel();let K=String(b).trim(),Q=["oklch_c","oklab_a","oklab_b"].includes(y),xe=K===""?0:Q?parseFloat(K):parseInt(K,10);if(Number.isNaN(xe))return;let Ie=M.current,a1=S.find(Ce=>Ce.key===y),ye=0,Te=100;a1?(ye=a1.min,Te=a1.max):y==="a"?(ye=0,Te=100):y==="h"?(ye=0,Te=360):Ie.format==="rgb"&&(ye=0,Te=255);let Y=Math.min(Te,Math.max(ye,xe));m({type:"SET_CHANNEL",channel:y,value:Y});let te={...Ie,[y]:Y},ne;if(Ie.format==="rgb")ne={r:te.r,g:te.g,b:te.b,a:te.a/100};else if(Ie.format==="hsl"){let Ce=En({h:te.h,s:te.s,l:te.l});ne={r:Ce.r,g:Ce.g,b:Ce.b,a:te.a/100}}else{let Ce=zn(Ie.format,te);ne=Dn(Ce)}p({type:"rgba",...ne}),k(ne)},[v,p,k,S]),z=ke.useCallback(y=>{p(y);let b=y.getRgba();m({type:"SET_RGBA",r:Math.round(b.r),g:Math.round(b.g),b:Math.round(b.b),a:Math.round(b.a*100)}),v({r:b.r,g:b.g,b:b.b,a:b.a})},[p,v]),j=ke.useCallback(y=>{let b=y.target.closest('[role="slider"]');b instanceof HTMLElement&&b.focus()},[]);ke.useLayoutEffect(()=>{if(!H.isOpen||!H.popoverRef.current)return;let y=H.popoverRef.current.offsetHeight;y<=0||H.reposition(y)},[H.isOpen,H.reposition]);let X=c?.rgba??{r:255,g:255,b:255,a:1},A=c?.hsva??{h:0,s:0,v:100,a:1},D=Math.round(A.s),U=Math.round(A.v);ke.useEffect(()=>{let y=H.popoverRef.current;if(!H.isOpen||!y)return;let b=Q=>y.querySelector(`.${Q} [role="slider"]`)??null,K=b("colorEditor-picker-saturation");K&&(K.setAttribute("aria-label",e),K.setAttribute("aria-valuetext",Oe(l.ariaSaturation,[D,U])),K.setAttribute("aria-valuenow",String(D)),K.setAttribute("aria-valuemin","0"),K.setAttribute("aria-valuemax","100")),b("colorEditor-picker-hue")?.setAttribute("aria-label",l.ariaHue),b("colorEditor-picker-alpha")?.setAttribute("aria-label",l.ariaAlphaSlider)});let x=ke.useCallback(()=>{let y=g.format,b=g.a/100;if(Ri.includes(y)){let K=zn(y,g);return On(K)}else return y==="hsl"?b>=1?`hsl(${g.h}, ${g.s}%, ${g.l}%)`:`hsla(${g.h}, ${g.s}%, ${g.l}%, ${b})`:Xt({r:g.r,g:g.g,b:g.b,a:b})},[g])(),w=Bn(n),I=w!==""&&X.a===0,P=/url\(/i.test(w)?l.imageValue:l.gradientValue,h=I?P:x,T=I?{backgroundImage:w,backgroundSize:"cover",backgroundPosition:"center"}:A4(x,X),[q,B]=ke.useState(x),F=ke.useRef(q);F.current=q,ke.useEffect(()=>{B(x)},[x]);let $=ke.useCallback(y=>{let b=y.target.value;B(b)},[]),Z=ke.useCallback(()=>{v.cancel();let y=F.current.trim();if(y&&!y.startsWith("#")&&ko(y)&&(y="#"+y),!y||!gi(y)){B(x);return}let b=Ct(y),K=Xt(b),Q=Xt(Ct(x));if(K!==Q){p(qn(y));let xe=To(b,y),Ie=Un(y);m({type:"SET_ALL",...xe}),Ie!==M.current.format&&m({type:"SET_FORMAT",format:Ie}),y!==f.current&&(f.current=y,R.current=y,typeof C.current=="function"&&C.current(y))}else B(x)},[v,x,p]),ie=ke.useCallback(y=>{y.key==="Enter"&&y.currentTarget.blur()},[]),de=ke.useCallback(()=>{let y=Nn.indexOf(g.format),b=Nn[(y+1)%Nn.length]??g.format;m({type:"SET_FORMAT",format:b})},[g.format]),ue=ke.useMemo(()=>{let y=H.triggerRef.current;if(!y)return document.body;let b=y.getRootNode();return b instanceof ShadowRoot?b:document.body},[H.isOpen,H.triggerRef]);return je(v1,{label:e,id:a,className:"colorEditor-fieldset",children:Z1("div",{className:"colorEditor-wrapper",children:[je("button",{ref:H.triggerRef,id:i,type:"button",className:"colorEditor-swatch-only",onClick:H.toggle,"aria-expanded":H.isOpen,"aria-haspopup":"dialog","aria-controls":s,"aria-label":Oe(l.ariaOpenPicker,[e,h]),children:je("span",{style:T,"aria-hidden":"true",className:"colorEditor-swatch"})}),je("input",{type:"text",className:"colorEditor-value-input",value:I?h:q,readOnly:I,onChange:$,onBlur:Z,onKeyDown:ie,"aria-label":Oe(l.ariaValue,[e]),placeholder:l.placeholder,spellCheck:"false",autoComplete:"off"}),H.isOpen&&T4(Z1("div",{ref:H.popoverRef,id:s,role:"dialog","aria-modal":"true","aria-label":Oe(l.ariaPicker,[e]),style:{top:H.position.top,left:H.position.left},onDragStart:F4,onMouseUp:j,className:"colorEditor-popover",children:[Z1(At,{color:d,onChange:z,className:"colorEditor-picker",children:[je(At.Saturation,{className:"colorEditor-picker-saturation"}),Z1("div",{className:"colorEditor-picker-toolbar",children:[je(At.EyeDropper,{title:l.ariaEyedropper,children:je(fo,{size:18,"aria-hidden":"true"})}),Z1("div",{className:"colorEditor-picker-sliders",children:[je(At.Hue,{className:"h-4 colorEditor-picker-hue"}),je(At.Alpha,{className:"h-4 colorEditor-picker-alpha"})]})]})]}),Z1("div",{className:"colorEditor-input-wrapper",children:[Z1("div",{className:"colorEditor-input-group",children:[je("input",{type:"text",value:g.hex,onChange:O,onBlur:N,onKeyDown:$4,"aria-label":l.ariaHex,className:"colorEditor-input-hex",spellCheck:"false",autoComplete:"off"}),je("label",{className:"colorEditor-input-label","aria-hidden":"true",children:"HEX"})]}),Z1("div",{className:"colorEditor-channels-wrapper",children:[Z1("div",{className:"colorEditor-input-container",children:[S.map(y=>je("div",{className:"colorEditor-input-group-no-label",children:je("input",{type:"number",min:y.min,max:y.max,step:y.step||1,value:g[y.key],onChange:b=>V(y.key,b.target.value),onBlur:b=>V(y.key,b.target.value),"aria-label":Oe(l.ariaChannel,[y.label,g.format.toUpperCase(),y.min,y.max]),"aria-valuemin":y.min,"aria-valuemax":y.max,"aria-valuenow":g[y.key],className:"colorEditor-input-rgba"})},y.key)),je("div",{className:"colorEditor-input-group-no-label",children:je("input",{type:"number",min:0,max:100,value:g.a,onChange:y=>V("a",y.target.value),onBlur:y=>V("a",y.target.value),"aria-label":l.ariaAlphaInput,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":g.a,className:"colorEditor-input-rgba"})})]}),je("div",{className:"colorEditor-format-selector",children:Z1("button",{type:"button",className:"colorEditor-format-picker",onClick:de,"aria-label":Oe(l.ariaFormatCycle,[g.format.toUpperCase()]),"aria-live":"polite",title:l.titleFormatCycle,children:[S.map(y=>je("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:y.label},y.key)),je("span",{className:"colorEditor-format-letter","aria-hidden":"true",children:"A"})]})})]})]})]}),ue)]})})}import o1 from"react";import{jsx as Yt,jsxs as z4}from"react/jsx-runtime";var q4={ariaValue:"{0} value",ariaUnit:"{0} unit"};function ki(e,t,o,a,r){let n=l1(e,o,a);if(n.numericValue!=="")return n.unit;if(t!=null&&t!==""){let l=l1(t,o,a);if(l.numericValue!==""&&r.has(l.unit))return l.unit}return o}function F1({label:e,value:t,onChange:o,units:a=Uo,constraints:r=S1,defaultUnit:n="px",placeholder:l=0,id:i="dimension",icon:s,aria:u}){let d=p1(q4,u),c=o1.useMemo(()=>new Set(a.map(D=>D.value)),[a]),p=o1.useMemo(()=>io(a),[a]),g=o1.useMemo(()=>{if(l==null||l==="")return"";if(typeof l=="number")return String(l);let D=l1(String(l),n,p);return D.numericValue!==""?String(D.numericValue):String(l)},[l,n,p]),[m,M]=o1.useState(()=>{let D=l1(t,n,p);return D.numericValue!==""?String(D.numericValue):""}),[f,R]=o1.useState(()=>ki(t,l,n,p,c)),C=o1.useRef(o);C.current=o;let k=o1.useRef(t),v=o1.useRef(l);o1.useEffect(()=>{if(t===k.current&&l===v.current)return;k.current=t,v.current=l;let D=l1(t,n,p);M(D.numericValue!==""?String(D.numericValue):""),R(ki(t,l,n,p,c))},[t,l,n,p,c]);let H=o1.useCallback((D,U)=>{let L=parseFloat(D);if(D===""||isNaN(L)){if(k.current==="")return;k.current="",typeof C.current=="function"&&C.current("");return}let x=R1(L,U,r),w=k1(x,U,r),I=qo(w,U);I!==k.current&&(k.current=I,typeof C.current=="function"&&C.current(I))},[r]),O=o1.useCallback(D=>{let U=D.target.value;M(U);let x=U.trim().match(p)?.[2];x&&c.has(x)&&x!==f&&R(x)},[p,f,c]),N=o1.useCallback(D=>{let U=D.clipboardData.getData("text"),L=l1(U,n,p);if(L.numericValue!==""&&L.unit&&c.has(L.unit)){D.preventDefault(),M(String(L.numericValue)),R(L.unit);let x=R1(L.numericValue,L.unit,r),w=k1(x,L.unit,r),I=qo(w,L.unit);k.current=I,typeof C.current=="function"&&C.current(I)}},[n,p,c,r]),S=o1.useCallback(()=>{if(m===""){H("",f);return}let D=parseFloat(m);if(isNaN(D)){let x=l1(t,n,p);M(x.numericValue!==""?String(x.numericValue):"");return}let U=R1(D,f,r),L=k1(U,f,r);M(String(L)),H(String(L),f)},[m,f,t,n,p,r,H]),V=o1.useCallback(D=>{if(D.key==="Enter"){D.currentTarget.blur();return}if(D.key==="ArrowUp"||D.key==="ArrowDown"){D.preventDefault();let U=zo(m,D.key,D.shiftKey,f,r);if(U===null)return;M(U),H(U,f)}},[m,f,r,H]),z=o1.useCallback(D=>{let U=D.target.value;if(!c.has(U))return;if(R(U),m===""){H("",U);return}let L=parseFloat(m);if(isNaN(L))return;let x=R1(L,U,r),w=k1(x,U,r);M(String(w));let I=qo(w,U);k.current=I,typeof C.current=="function"&&C.current(I)},[m,c,r,H]),j=`${i}-input`,X=`${i}-unit`,A=a.some(D=>D.value!=="");return Yt(v1,{label:e,id:i,className:"dimensionEditor-fieldset",children:z4("div",{className:"dimensionEditor-row",children:[s&&Yt("span",{className:"dimensionEditor-icon","aria-hidden":"true",children:Yt(s,{size:14,width:14,height:14})}),Yt("input",{id:j,type:"text",className:s?"dimensionEditor-input dimensionEditor-input--with-icon":"dimensionEditor-input",value:m,placeholder:g,onChange:O,onPaste:N,onBlur:S,onKeyDown:V,"aria-label":Oe(d.ariaValue,[e]),autoComplete:"off",spellCheck:"false"}),A&&Yt("select",{id:X,className:"dimensionEditor-unit",value:f,onChange:z,"aria-label":Oe(d.ariaUnit,[e]),children:a.map(D=>Yt("option",{value:D.value,children:D.label},D.value||"__unitless__"))})]})})}function d1(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 le(){return le=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},le.apply(null,arguments)}var ee=e9(Ei(),1),Q4=e9(Fi(),1);import*as me from"react";import{cloneElement as jI,Component as KI,useRef as y1,useCallback as pe,useEffect as $1,useMemo as Jt}from"react";var $i=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Ni=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Na=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){let o=getComputedStyle(e,null);return Ni(o.overflowY,t)||Ni(o.overflowX,t)||(a=>{let r=(n=>{if(!n.ownerDocument||!n.ownerDocument.defaultView)return null;try{return n.ownerDocument.defaultView.frameElement}catch{return null}})(a);return!!r&&(r.clientHeight<a.scrollHeight||r.clientWidth<a.scrollWidth)})(e)}return!1},Ua=(e,t,o,a,r,n,l,i)=>n<e&&l>t||n>e&&l<t?0:n<=e&&i<=o||l>=t&&i>=o?n-e-a:l>t&&i<o||n<e&&i>o?l-t+r:0,X4=e=>{let t=e.parentElement;return t??(e.getRootNode().host||null)},Ui=(e,t)=>{var o,a,r,n;if(typeof document>"u")return[];let{scrollMode:l,block:i,inline:s,boundary:u,skipOverflowHiddenElements:d}=t,c=typeof u=="function"?u:L=>L!==u;if(!$i(e))throw new TypeError("Invalid target");let p=document.scrollingElement||document.documentElement,g=[],m=e;for(;$i(m)&&c(m);){if(m=X4(m),m===p){g.push(m);break}m!=null&&m===document.body&&Na(m)&&!Na(document.documentElement)||m!=null&&Na(m,d)&&g.push(m)}let M=(a=(o=window.visualViewport)==null?void 0:o.width)!=null?a:innerWidth,f=(n=(r=window.visualViewport)==null?void 0:r.height)!=null?n:innerHeight,{scrollX:R,scrollY:C}=window,{height:k,width:v,top:H,right:O,bottom:N,left:S}=e.getBoundingClientRect(),{top:V,right:z,bottom:j,left:X}=(L=>{let x=window.getComputedStyle(L);return{top:parseFloat(x.scrollMarginTop)||0,right:parseFloat(x.scrollMarginRight)||0,bottom:parseFloat(x.scrollMarginBottom)||0,left:parseFloat(x.scrollMarginLeft)||0}})(e),A=i==="start"||i==="nearest"?H-V:i==="end"?N+j:H+k/2-V+j,D=s==="center"?S+v/2-X+z:s==="end"?O+z:S-X,U=[];for(let L=0;L<g.length;L++){let x=g[L],{height:w,width:I,top:P,right:h,bottom:T,left:q}=x.getBoundingClientRect();if(l==="if-needed"&&H>=0&&S>=0&&N<=f&&O<=M&&(x===p&&!Na(x)||H>=P&&N<=T&&S>=q&&O<=h))return U;let B=getComputedStyle(x),F=parseInt(B.borderLeftWidth,10),$=parseInt(B.borderTopWidth,10),Z=parseInt(B.borderRightWidth,10),ie=parseInt(B.borderBottomWidth,10),de=0,ue=0,y="offsetWidth"in x?x.offsetWidth-x.clientWidth-F-Z:0,b="offsetHeight"in x?x.offsetHeight-x.clientHeight-$-ie:0,K="offsetWidth"in x?x.offsetWidth===0?0:I/x.offsetWidth:0,Q="offsetHeight"in x?x.offsetHeight===0?0:w/x.offsetHeight:0;if(p===x)de=i==="start"?A:i==="end"?A-f:i==="nearest"?Ua(C,C+f,f,$,ie,C+A,C+A+k,k):A-f/2,ue=s==="start"?D:s==="center"?D-M/2:s==="end"?D-M:Ua(R,R+M,M,F,Z,R+D,R+D+v,v),de=Math.max(0,de+C),ue=Math.max(0,ue+R);else{de=i==="start"?A-P-$:i==="end"?A-T+ie+b:i==="nearest"?Ua(P,T,w,$,ie+b,A,A+k,k):A-(P+w/2)+b/2,ue=s==="start"?D-q-F:s==="center"?D-(q+I/2)+y/2:s==="end"?D-h+Z+y:Ua(q,h,I,F,Z+y,D,D+v,v);let{scrollLeft:xe,scrollTop:Ie}=x;de=Q===0?0:Math.max(0,Math.min(Ie+de/Q,x.scrollHeight-w/Q+b)),ue=K===0?0:Math.max(0,Math.min(xe+ue/K,x.scrollWidth-I/K+y)),A+=Ie-de,D+=xe-ue}U.push({el:x,top:de,left:ue})}return U};var Y4=0;function Xi(){return String(Y4++)}function Do(e){var t=me.useRef(e);return t.current=e,t}function J4(){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 Wn(){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,n=new Array(r>1?r-1:0),l=1;l<r;l++)n[l-1]=arguments[l];return t.some(function(i){return i&&i.apply(void 0,[a].concat(n)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function Qi(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var n=arguments.length,l=new Array(n),i=0;i<n;i++)l[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,l)},t)}return r.cancel=a,r}var ec=Qi(function(e){Yi(e).textContent=""},500);function Yi(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 tc(e,t){if(!(!e||!t)){var o=Yi(t);o.textContent=e,ec(t)}}function oc(e){var t=e?.getElementById("a11y-status-message");t&&t.remove()}function Oo(){}var Qn=Oo;function za(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},le({},e))}function ac(e,t){if(e){var o=Ui(e,{boundary:t,block:"nearest",scrollMode:"if-needed"});o.forEach(function(a){var r=a.el,n=a.top,l=a.left;r.scrollTop=n,r.scrollLeft=l})}}function qi(e,t,o){var a=e===t||t instanceof o.Node&&e.contains&&e.contains(t);return a}function rc(e,t){var o;function a(){o&&clearTimeout(o)}function r(){for(var n=arguments.length,l=new Array(n),i=0;i<n;i++)l[i]=arguments[i];a(),o=setTimeout(function(){o=null,e.apply(void 0,l)},t)}return r.cancel=a,r}function _e(){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,n=new Array(r>1?r-1:0),l=1;l<r;l++)n[l-1]=arguments[l];return t.some(function(i){return i&&i.apply(void 0,[a].concat(n)),a.preventDownshiftDefault||a.hasOwnProperty("nativeEvent")&&a.nativeEvent.preventDownshiftDefault})}}function X1(){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 nc(e,t){return e[t]!==void 0}function ja(e){var t=e.key,o=e.keyCode;return o>=37&&o<=40&&t.indexOf("Arrow")!==0?"Arrow"+t:t}function mt(e,t,o,a,r){r===void 0&&(r=!1);var n=o.length;if(n===0)return-1;var l=n-1;(typeof e!="number"||e<0||e>l)&&(e=t>0?-1:l+1);var i=e+t;i<0?i=r?l:0:i>l&&(i=r?0:l);var s=eo(i,t<0,o,a,r);return s===-1?e>=n?-1:e:s}function eo(e,t,o,a,r){r===void 0&&(r=!1);var n=o.length;if(t){for(var l=e;l>=0;l--)if(!a(o[l],l))return l}else for(var i=e;i<n;i++)if(!a(o[i],i))return i;return r?eo(t?n-1:0,t,o,a):-1}function zi(e,t,o,a){return a===void 0&&(a=!0),o&&t.some(function(r){return r&&(qi(r,e,o)||a&&qi(r,o.document.activeElement,o))})}function Yn(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function lc(e,t,o,a){for(var r=e.type,n={},l=Object.keys(o),i=0,s=l;i<s.length;i++){var u=s[i];ic(u,e,t,o,a),a[u]!==o[u]&&(n[u]=a[u])}t.onStateChange&&Object.keys(n).length&&t.onStateChange(le({type:r},n))}function ic(e,t,o,a,r){if(r[e]!==a[e]){var n="on"+Yn(e)+"Change",l=o[n];if(typeof l=="function"){var i=t.type;l(le({type:i},r))}}}function Ji(e,t,o,a){var r=me.useRef(null),n=me.useRef(void 0),l=Do(t),i=me.useCallback(function(p,g){n.current=g,p=za(p,l.current);var m=e(p,l.current,g),M=l.current.stateReducer(p,le({},g,{changes:m}));return le({},p,M)},[l,e]),s=me.useReducer(i,t,o),u=s[0],d=s[1],c=n.current;return me.useEffect(function(){var p,g=za((p=r.current)!=null?p:{},l.current),m=c&&r.current&&!a(g,u);m&&lc(c,l.current,g,u),r.current=u},[u,c,a,l]),[u,d]}function Jn(e,t,o,a){var r=Ji(e,t,o,a),n=r[0],l=r[1];return[za(n,t),l]}function el(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 n=o[t];if(n===void 0)throw new Error(a);return[n,t]}throw new Error(a)}function Ya(){var e=me.useRef(!0);return me.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]),e.current}function sc(e,t){return t.changes}var uc={environment:ee.default.shape({addEventListener:ee.default.func.isRequired,removeEventListener:ee.default.func.isRequired,document:ee.default.shape({createElement:ee.default.func.isRequired,getElementById:ee.default.func.isRequired,activeElement:ee.default.any.isRequired,body:ee.default.any.isRequired}).isRequired,Node:ee.default.func.isRequired}),itemToKey:ee.default.func,stateReducer:ee.default.func};function N1(e,t,o){var a=e["default"+Yn(t)];return a!==void 0?a:o[t]}function Ht(e,t,o){var a=e[t];if(a!==void 0)return a;var r=e["initial"+Yn(t)];return r!==void 0?r:N1(e,t,o)}var ji=Qi(function(e,t){tc(e,t)},200);function tl(e,t,o,a){var r=a?.document,n=Ya();me.useEffect(function(){if(!(!e||n||!r)){var l=e(t);ji(l,r)}},o),me.useEffect(function(){return function(){ji.cancel(),oc(r)}},[r])}var Vo=le({},uc,{getA11yStatusMessage:ee.default.func,highlightedIndex:ee.default.number,defaultHighlightedIndex:ee.default.number,initialHighlightedIndex:ee.default.number,isOpen:ee.default.bool,defaultIsOpen:ee.default.bool,initialIsOpen:ee.default.bool,selectedItem:ee.default.any,initialSelectedItem:ee.default.any,defaultSelectedItem:ee.default.any,id:ee.default.string,labelId:ee.default.string,menuId:ee.default.string,getItemId:ee.default.func,toggleButtonId:ee.default.string,onSelectedItemChange:ee.default.func,onHighlightedIndexChange:ee.default.func,onStateChange:ee.default.func,onIsOpenChange:ee.default.func,scrollIntoView:ee.default.func}),_o={itemToString:function(t){return t?String(t):""},itemToKey:function(t){return t},stateReducer:sc,scrollIntoView:ac,environment:typeof window>"u"?void 0:window},c1={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""},dc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?me.useLayoutEffect:me.useEffect;function cc(e){return/^\S{1}$/.test(e)}function e5(e){var t=Ht(e,"selectedItem",c1),o=Ht(e,"isOpen",c1),a=fc(e),r=Ht(e,"inputValue",c1);return{highlightedIndex:a<0&&t&&o?e.items.findIndex(function(n){return e.itemToKey(n)===e.itemToKey(t)}):a,isOpen:o,selectedItem:t,inputValue:r}}function Pt(e,t,o){var a=e.items,r=e.initialHighlightedIndex,n=e.defaultHighlightedIndex,l=e.isItemDisabled,i=e.itemToKey,s=t.selectedItem,u=t.highlightedIndex;return a.length===0?-1:r!==void 0&&u===r&&!l(a[r],r)?r:n!==void 0&&!l(a[n],n)?n:s?a.findIndex(function(d){return i(s)===i(d)}):o<0&&!l(a[a.length-1],a.length-1)?a.length-1:o>0&&!l(a[0],0)?0:-1}function t5(e,t,o){var a=me.useRef({isMouseDown:!1,isTouchMove:!1,isTouchEnd:!1}),r=me.useCallback(function(){return o.map(function(n){return n.current})},[o]);return me.useEffect(function(){if(!e)return Oo;function n(){a.current.isTouchEnd=!1,a.current.isMouseDown=!0}function l(d){a.current.isMouseDown=!1,zi(d.target,r(),e)||t()}function i(){a.current.isTouchEnd=!1,a.current.isTouchMove=!1}function s(){a.current.isTouchMove=!0}function u(d){a.current.isTouchEnd=!0,!a.current.isTouchMove&&!zi(d.target,r(),e,!1)&&t()}return e.addEventListener("mousedown",n),e.addEventListener("mouseup",l),e.addEventListener("touchstart",i),e.addEventListener("touchmove",s),e.addEventListener("touchend",u),function(){e.removeEventListener("mousedown",n),e.removeEventListener("mouseup",l),e.removeEventListener("touchstart",i),e.removeEventListener("touchmove",s),e.removeEventListener("touchend",u)}},[e,r,t]),a.current}var ol=function(){return Oo};function o5(e){var t=e.highlightedIndex,o=e.isOpen,a=e.itemRefs,r=e.getItemNodeFromIndex,n=e.menuElement,l=e.scrollIntoView,i=me.useRef(!0);return dc(function(){t<0||!o||!Object.keys(a.current).length||(i.current===!1?i.current=!0:l(r(t),n))},[t]),i}var al=Oo;function Ka(e,t,o){var a;o===void 0&&(o=!0);var r=((a=e.items)==null?void 0:a.length)&&t>=0;return le({isOpen:!1,highlightedIndex:-1},r&&le({selectedItem:e.items[t],isOpen:N1(e,"isOpen",c1),highlightedIndex:N1(e,"highlightedIndex",c1)},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 Ga(e){var t=N1(e,"highlightedIndex",c1);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function fc(e){var t=Ht(e,"highlightedIndex",c1);return t>-1&&e.isItemDisabled(e.items[t],t)?-1:t}function r5(e,t,o,a){var r=o.type,n;switch(r){case a.ItemMouseMove:n={highlightedIndex:o.disabled?-1:o.index};break;case a.MenuMouseLeave:n={highlightedIndex:-1};break;case a.ToggleButtonClick:case a.FunctionToggleMenu:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Pt(t,e,0)};break;case a.FunctionOpenMenu:n={isOpen:!0,highlightedIndex:Pt(t,e,0)};break;case a.FunctionCloseMenu:n={isOpen:!1};break;case a.FunctionSetHighlightedIndex:n={highlightedIndex:t.isItemDisabled(t.items[o.highlightedIndex],o.highlightedIndex)?-1:o.highlightedIndex};break;case a.FunctionSetInputValue:n={inputValue:o.inputValue};break;case a.FunctionReset:n={highlightedIndex:Ga(t),isOpen:N1(t,"isOpen",c1),selectedItem:N1(t,"selectedItem",c1),inputValue:N1(t,"inputValue",c1)};break;default:throw new Error("Reducer called without proper action type.")}return le({},e,n)}var pc=le({},Vo,{items:ee.default.array.isRequired,isItemDisabled:ee.default.func}),Cc=le({},_o,{isItemDisabled:function(){return!1}});function mc(e){for(var t=e.keysSoFar,o=e.highlightedIndex,a=e.items,r=e.itemToString,n=e.isItemDisabled,l=t.toLowerCase(),i=0;i<a.length;i++){var s=(i+o+(t.length<2?1:0))%a.length,u=a[s];if(u!==void 0&&r(u).toLowerCase().startsWith(l)&&!n(u,s))return s}return o}var qa=0,rl=1,nl=2,Wa=3,ll=4,il=5,sl=6,ul=7,dl=8,cl=9,fl=10,Xa=11,n5=12,l5=13,pl=14,i5=15,s5=16,u5=17,d5=18,Cl=19,Xn=20,c5=21,f5=Object.freeze({__proto__:null,FunctionCloseMenu:u5,FunctionOpenMenu:s5,FunctionReset:c5,FunctionSelectItem:Cl,FunctionSetHighlightedIndex:d5,FunctionSetInputValue:Xn,FunctionToggleMenu:i5,ItemClick:pl,ItemMouseMove:l5,MenuMouseLeave:n5,ToggleButtonBlur:Xa,ToggleButtonClick:qa,ToggleButtonKeyDownArrowDown:rl,ToggleButtonKeyDownArrowUp:nl,ToggleButtonKeyDownCharacter:Wa,ToggleButtonKeyDownEnd:sl,ToggleButtonKeyDownEnter:ul,ToggleButtonKeyDownEscape:ll,ToggleButtonKeyDownHome:il,ToggleButtonKeyDownPageDown:fl,ToggleButtonKeyDownPageUp:cl,ToggleButtonKeyDownSpaceButton:dl});function gc(e,t,o){var a,r=o.type,n=o.altKey,l;switch(r){case pl:l={isOpen:N1(t,"isOpen",c1),highlightedIndex:Ga(t),selectedItem:t.items[o.index]};break;case Wa:{var i=o.key,s=""+e.inputValue+i,u=!e.isOpen&&e.selectedItem?t.items.findIndex(function(g){return t.itemToKey(g)===t.itemToKey(e.selectedItem)}):e.highlightedIndex,d=mc({keysSoFar:s,highlightedIndex:u,items:t.items,itemToString:t.itemToString,isItemDisabled:t.isItemDisabled});l={inputValue:s,highlightedIndex:d,isOpen:!0}}break;case rl:{var c=e.isOpen?mt(e.highlightedIndex,1,t.items,t.isItemDisabled):n&&e.selectedItem==null?-1:Pt(t,e,1);l={highlightedIndex:c,isOpen:!0}}break;case nl:if(e.isOpen&&n)l=Ka(t,e.highlightedIndex,!1);else{var p=e.isOpen?mt(e.highlightedIndex,-1,t.items,t.isItemDisabled):Pt(t,e,-1);l={highlightedIndex:p,isOpen:!0}}break;case ul:case dl:l=Ka(t,e.highlightedIndex,!1);break;case il:l={highlightedIndex:eo(0,!1,t.items,t.isItemDisabled),isOpen:!0};break;case sl:l={highlightedIndex:eo(t.items.length-1,!0,t.items,t.isItemDisabled),isOpen:!0};break;case cl:l={highlightedIndex:mt(e.highlightedIndex,-10,t.items,t.isItemDisabled)};break;case fl:l={highlightedIndex:mt(e.highlightedIndex,10,t.items,t.isItemDisabled)};break;case ll:l={isOpen:!1,highlightedIndex:-1};break;case Xa:l=le({isOpen:!1,highlightedIndex:-1},e.highlightedIndex>=0&&((a=t.items)==null?void 0:a.length)&&{selectedItem:t.items[e.highlightedIndex]});break;case Cl:l={selectedItem:o.selectedItem};break;default:return r5(e,t,o,f5)}return le({},e,l)}var hc=le({},me),p5=hc.useId,C5=typeof p5=="function"?vc:xc;function vc(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,n=e.toggleButtonId,l=e.inputId,i="downshift-"+p5();t||(t=i);var s=me.useMemo(function(){return{labelId:o??t+"-label",menuId:a??t+"-menu",getItemId:r??function(u){return t+"-item-"+u},toggleButtonId:n??t+"-toggle-button",inputId:l??t+"-input"}},[r,t,l,o,a,n]);return s}function xc(e){var t=e.id,o=e.labelId,a=e.menuId,r=e.getItemId,n=e.toggleButtonId,l=e.inputId,i=me.useRef(t??"downshift-"+Xi()),s=i.current,u=me.useMemo(function(){return{labelId:o??s+"-label",menuId:a??s+"-menu",getItemId:r??function(d){return s+"-item-"+d},toggleButtonId:n??s+"-toggle-button",inputId:l??s+"-input"}},[r,l,o,a,n,s]);return u}var Lc=["onClick"],wc=["onMouseLeave","refKey","ref"],bc=["onBlur","onClick","onPress","onKeyDown","refKey","ref"],Ic=["item","index","onMouseMove","onClick","onMouseDown","onPress","refKey","disabled","ref"];Ja.stateChangeTypes=f5;function Ja(e){e===void 0&&(e={}),Qn(e,Ja,pc);var t=le({},Cc,e),o=t.scrollIntoView,a=t.environment,r=t.getA11yStatusMessage,n=Jn(gc,t,e5,a5),l=n[0],i=n[1],s=l.isOpen,u=l.highlightedIndex,d=l.selectedItem,c=l.inputValue,p=y1(null),g=y1(null),m=y1({}),M=y1(null),f=C5(t),R=Do({state:l,props:t}),C=pe(function(P){return m.current[f.getItemId(P)]},[f]);tl(r,l,[s,u,d,c],a);var k=o5({menuElement:g.current,highlightedIndex:u,isOpen:s,itemRefs:m,scrollIntoView:o,getItemNodeFromIndex:C});$1(function(){return M.current=rc(function(P){P({type:Xn,inputValue:""})},500),function(){M.current.cancel()}},[]),$1(function(){c&&M.current(i)},[i,c]),al({props:t,state:l}),$1(function(){var P=Ht(t,"isOpen",c1);P&&p.current&&p.current.focus()},[]);var v=pe(function(){R.current.state.isOpen&&i({type:Xa})},[i,R]),H=Jt(function(){return[g,p]},[]),O=t5(a,v,H),N=ol("getMenuProps","getToggleButtonProps");$1(function(){s||(m.current={})},[s]);var S=Jt(function(){return{ArrowDown:function(h){h.preventDefault(),i({type:rl,altKey:h.altKey})},ArrowUp:function(h){h.preventDefault(),i({type:nl,altKey:h.altKey})},Home:function(h){h.preventDefault(),i({type:il})},End:function(h){h.preventDefault(),i({type:sl})},Escape:function(){R.current.state.isOpen&&i({type:ll})},Enter:function(h){h.preventDefault(),i({type:R.current.state.isOpen?ul:qa})},PageUp:function(h){R.current.state.isOpen&&(h.preventDefault(),i({type:cl}))},PageDown:function(h){R.current.state.isOpen&&(h.preventDefault(),i({type:fl}))}," ":function(h){h.preventDefault();var T=R.current.state;if(!T.isOpen){i({type:qa});return}T.inputValue?i({type:Wa,key:" "}):i({type:dl})}}},[i,R]),V=pe(function(){i({type:i5})},[i]),z=pe(function(){i({type:u5})},[i]),j=pe(function(){i({type:s5})},[i]),X=pe(function(P){i({type:d5,highlightedIndex:P})},[i]),A=pe(function(P){i({type:Cl,selectedItem:P})},[i]),D=pe(function(){i({type:c5})},[i]),U=pe(function(P){i({type:Xn,inputValue:P})},[i]),L=pe(function(P){var h=P===void 0?{}:P,T=h.onClick,q=d1(h,Lc),B=function(){var $;($=p.current)==null||$.focus()};return le({id:f.labelId,htmlFor:f.toggleButtonId,onClick:_e(T,B)},q)},[f]),x=pe(function(P,h){var T,q=P===void 0?{}:P,B=q.onMouseLeave,F=q.refKey,$=F===void 0?"ref":F,Z=q.ref,ie=d1(q,wc),de=h===void 0?{}:h,ue=de.suppressRefError,y=ue===void 0?!1:ue,b=function(){i({type:n5})};return N("getMenuProps",y,$,g),le((T={},T[$]=X1(Z,function(K){g.current=K}),T.id=f.menuId,T.role="listbox",T["aria-labelledby"]=ie&&ie["aria-label"]?void 0:""+f.labelId,T.onMouseLeave=_e(B,b),T),ie)},[i,N,f]),w=pe(function(P,h){var T,q=P===void 0?{}:P,B=q.onBlur,F=q.onClick;q.onPress;var $=q.onKeyDown,Z=q.refKey,ie=Z===void 0?"ref":Z,de=q.ref,ue=d1(q,bc),y=h===void 0?{}:h,b=y.suppressRefError,K=b===void 0?!1:b,Q=R.current.state,xe=function(){i({type:qa})},Ie=function(){Q.isOpen&&!O.isMouseDown&&i({type:Xa})},a1=function(Y){var te=ja(Y);te&&S[te]?S[te](Y):cc(te)&&i({type:Wa,key:te})},ye=le((T={},T[ie]=X1(de,function(Te){p.current=Te}),T["aria-activedescendant"]=Q.isOpen&&Q.highlightedIndex>-1?f.getItemId(Q.highlightedIndex):"",T["aria-controls"]=f.menuId,T["aria-expanded"]=R.current.state.isOpen,T["aria-haspopup"]="listbox",T["aria-labelledby"]=ue&&ue["aria-label"]?void 0:""+f.labelId,T.id=f.toggleButtonId,T.role="combobox",T.tabIndex=0,T.onBlur=_e(B,Ie),T),ue);return ue.disabled||(ye.onClick=_e(F,xe),ye.onKeyDown=_e($,a1)),N("getToggleButtonProps",K,ie,p),ye},[i,f,R,O,N,S]),I=pe(function(P){var h,T=P===void 0?{}:P,q=T.item,B=T.index,F=T.onMouseMove,$=T.onClick,Z=T.onMouseDown;T.onPress;var ie=T.refKey,de=ie===void 0?"ref":ie,ue=T.disabled,y=T.ref,b=d1(T,Ic);ue!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');var K=R.current,Q=K.state,xe=K.props,Ie=el(q,B,xe.items,"Pass either item or index to getItemProps!"),a1=Ie[0],ye=Ie[1],Te=xe.isItemDisabled(a1,ye),Y=function(){O.isTouchEnd||ye===Q.highlightedIndex||(k.current=!1,i({type:l5,index:ye,disabled:Te}))},te=function(){i({type:pl,index:ye})},ne=function(De){return De.preventDefault()},Ce=le((h={},h[de]=X1(y,function(He){He&&(m.current[f.getItemId(ye)]=He)}),h["aria-disabled"]=Te,h["aria-selected"]=a1===Q.selectedItem,h.id=f.getItemId(ye),h.role="option",h),b);return Te||(Ce.onClick=_e($,te)),Ce.onMouseMove=_e(F,Y),Ce.onMouseDown=_e(Z,ne),Ce},[R,f,O,k,i]);return{getToggleButtonProps:w,getLabelProps:L,getMenuProps:x,getItemProps:I,toggleMenu:V,openMenu:j,closeMenu:z,setHighlightedIndex:X,selectItem:A,reset:D,setInputValue:U,highlightedIndex:u,isOpen:s,selectedItem:d,inputValue:c}}var ml=0,gl=1,hl=2,vl=3,xl=4,Ll=5,wl=6,bl=7,Il=8,Qa=9,yl=10,m5=11,g5=12,Ml=13,h5=14,v5=15,x5=16,L5=17,w5=18,Sl=19,b5=20,I5=21,Rl=22,y5=Object.freeze({__proto__:null,ControlledPropUpdatedSelectedItem:Rl,FunctionCloseMenu:L5,FunctionOpenMenu:x5,FunctionReset:I5,FunctionSelectItem:Sl,FunctionSetHighlightedIndex:w5,FunctionSetInputValue:b5,FunctionToggleMenu:v5,InputBlur:Qa,InputChange:Il,InputClick:yl,InputKeyDownArrowDown:ml,InputKeyDownArrowUp:gl,InputKeyDownEnd:xl,InputKeyDownEnter:bl,InputKeyDownEscape:hl,InputKeyDownHome:vl,InputKeyDownPageDown:wl,InputKeyDownPageUp:Ll,ItemClick:Ml,ItemMouseMove:g5,MenuMouseLeave:m5,ToggleButtonClick:h5});function yc(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)),le({},t,{inputValue:a})}var Mc=le({},Vo,{items:ee.default.array.isRequired,isItemDisabled:ee.default.func,inputValue:ee.default.string,defaultInputValue:ee.default.string,initialInputValue:ee.default.string,inputId:ee.default.string,onInputValueChange:ee.default.func});function Sc(e,t,o,a){var r=y1(),n=Ji(e,t,o,a),l=n[0],i=n[1],s=Ya();return $1(function(){if(nc(t,"selectedItem")){if(!s){var u=t.itemToKey(t.selectedItem)!==t.itemToKey(r.current);u&&i({type:Rl,inputValue:t.itemToString(t.selectedItem)})}r.current=l.selectedItem===r.current?t.selectedItem:l.selectedItem}},[l.selectedItem,t.selectedItem]),[za(l,t),i]}var Rc=le({},_o,{isItemDisabled:function(){return!1}});function kc(e,t,o){var a,r=o.type,n=o.altKey,l;switch(r){case Ml:l={isOpen:N1(t,"isOpen",c1),highlightedIndex:Ga(t),selectedItem:t.items[o.index],inputValue:t.itemToString(t.items[o.index])};break;case ml:e.isOpen?l={highlightedIndex:mt(e.highlightedIndex,1,t.items,t.isItemDisabled,!0)}:l={highlightedIndex:n&&e.selectedItem==null?-1:Pt(t,e,1),isOpen:t.items.length>=0};break;case gl:e.isOpen?n?l=Ka(t,e.highlightedIndex):l={highlightedIndex:mt(e.highlightedIndex,-1,t.items,t.isItemDisabled,!0)}:l={highlightedIndex:Pt(t,e,-1),isOpen:t.items.length>=0};break;case bl:l=Ka(t,e.highlightedIndex);break;case hl:l=le({isOpen:!1,highlightedIndex:-1},!e.isOpen&&{selectedItem:null,inputValue:""});break;case Ll:l={highlightedIndex:mt(e.highlightedIndex,-10,t.items,t.isItemDisabled,!0)};break;case wl:l={highlightedIndex:mt(e.highlightedIndex,10,t.items,t.isItemDisabled,!0)};break;case vl:l={highlightedIndex:eo(0,!1,t.items,t.isItemDisabled)};break;case xl:l={highlightedIndex:eo(t.items.length-1,!0,t.items,t.isItemDisabled)};break;case Qa:l=le({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 Il:l={isOpen:!0,highlightedIndex:Ga(t),inputValue:o.inputValue};break;case yl:l={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:Pt(t,e,0)};break;case Sl:l={selectedItem:o.selectedItem,inputValue:t.itemToString(o.selectedItem)};break;case Rl:l={inputValue:o.inputValue};break;default:return r5(e,t,o,y5)}return le({},e,l)}var Hc=["onMouseLeave","refKey","ref"],Pc=["item","index","refKey","ref","onMouseMove","onMouseDown","onClick","onPress","disabled"],Tc=["onClick","onPress","refKey","ref"],Vc=["onKeyDown","onChange","onInput","onBlur","onChangeText","onClick","refKey","ref"];M5.stateChangeTypes=y5;function M5(e){e===void 0&&(e={}),Qn(e,M5,Mc);var t=le({},Rc,e),o=t.items,a=t.scrollIntoView,r=t.environment,n=t.getA11yStatusMessage,l=Sc(kc,t,yc,a5),i=l[0],s=l[1],u=i.isOpen,d=i.highlightedIndex,c=i.selectedItem,p=i.inputValue,g=y1(null),m=y1({}),M=y1(null),f=y1(null),R=Ya(),C=C5(t),k=y1(),v=Do({state:i,props:t}),H=pe(function(B){return m.current[C.getItemId(B)]},[C]);tl(n,i,[u,d,c,p],r);var O=o5({menuElement:g.current,highlightedIndex:d,isOpen:u,itemRefs:m,scrollIntoView:a,getItemNodeFromIndex:H});al({props:t,state:i}),$1(function(){var B=Ht(t,"isOpen",c1);B&&M.current&&M.current.focus()},[]),$1(function(){R||(k.current=o.length)});var N=pe(function(){v.current.state.isOpen&&s({type:Qa})},[s,v]),S=Jt(function(){return[g,f,M]},[]),V=t5(r,N,S),z=ol("getInputProps","getMenuProps");$1(function(){u||(m.current={})},[u]),$1(function(){var B;!u||!(r!=null&&r.document)||!(M!=null&&(B=M.current)!=null&&B.focus)||r.document.activeElement!==M.current&&M.current.focus()},[u,r]);var j=Jt(function(){return{ArrowDown:function(F){F.preventDefault(),s({type:ml,altKey:F.altKey})},ArrowUp:function(F){F.preventDefault(),s({type:gl,altKey:F.altKey})},Home:function(F){v.current.state.isOpen&&(F.preventDefault(),s({type:vl}))},End:function(F){v.current.state.isOpen&&(F.preventDefault(),s({type:xl}))},Escape:function(F){var $=v.current.state;($.isOpen||$.inputValue||$.selectedItem||$.highlightedIndex>-1)&&(F.preventDefault(),s({type:hl}))},Enter:function(F){var $=v.current.state;!$.isOpen||F.which===229||(F.preventDefault(),s({type:bl}))},PageUp:function(F){v.current.state.isOpen&&(F.preventDefault(),s({type:Ll}))},PageDown:function(F){v.current.state.isOpen&&(F.preventDefault(),s({type:wl}))}}},[s,v]),X=pe(function(B){return le({id:C.labelId,htmlFor:C.inputId},B)},[C]),A=pe(function(B,F){var $,Z=B===void 0?{}:B,ie=Z.onMouseLeave,de=Z.refKey,ue=de===void 0?"ref":de,y=Z.ref,b=d1(Z,Hc),K=F===void 0?{}:F,Q=K.suppressRefError,xe=Q===void 0?!1:Q;return z("getMenuProps",xe,ue,g),le(($={},$[ue]=X1(y,function(Ie){g.current=Ie}),$.id=C.menuId,$.role="listbox",$["aria-labelledby"]=b&&b["aria-label"]?void 0:""+C.labelId,$.onMouseLeave=_e(ie,function(){s({type:m5})}),$),b)},[s,z,C]),D=pe(function(B){var F,$,Z=B===void 0?{}:B,ie=Z.item,de=Z.index,ue=Z.refKey,y=ue===void 0?"ref":ue,b=Z.ref,K=Z.onMouseMove,Q=Z.onMouseDown,xe=Z.onClick;Z.onPress;var Ie=Z.disabled,a1=d1(Z,Pc);Ie!==void 0&&console.warn('Passing "disabled" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');var ye=v.current,Te=ye.props,Y=ye.state,te=el(ie,de,Te.items,"Pass either item or index to getItemProps!"),ne=te[0],Ce=te[1],He=Te.isItemDisabled(ne,Ce),De="onClick",Pe=xe,Be=function(){V.isTouchEnd||Ce===Y.highlightedIndex||(O.current=!1,s({type:g5,index:Ce,disabled:He}))},Xe=function(){s({type:Ml,index:Ce})},Qe=function(Ye){return Ye.preventDefault()};return le((F={},F[y]=X1(b,function(ge){ge&&(m.current[C.getItemId(Ce)]=ge)}),F["aria-disabled"]=He,F["aria-selected"]=Ce===Y.highlightedIndex,F.id=C.getItemId(Ce),F.role="option",F),!He&&($={},$[De]=_e(Pe,Xe),$),{onMouseMove:_e(K,Be),onMouseDown:_e(Q,Qe)},a1)},[s,C,v,V,O]),U=pe(function(B){var F,$=B===void 0?{}:B,Z=$.onClick;$.onPress;var ie=$.refKey,de=ie===void 0?"ref":ie,ue=$.ref,y=d1($,Tc),b=v.current.state,K=function(){s({type:h5})};return le((F={},F[de]=X1(ue,function(Q){f.current=Q}),F["aria-controls"]=C.menuId,F["aria-expanded"]=b.isOpen,F.id=C.toggleButtonId,F.tabIndex=-1,F),!y.disabled&&le({},{onClick:_e(Z,K)}),y)},[s,v,C]),L=pe(function(B,F){var $,Z=B===void 0?{}:B,ie=Z.onKeyDown,de=Z.onChange,ue=Z.onInput,y=Z.onBlur;Z.onChangeText;var b=Z.onClick,K=Z.refKey,Q=K===void 0?"ref":K,xe=Z.ref,Ie=d1(Z,Vc),a1=F===void 0?{}:F,ye=a1.suppressRefError,Te=ye===void 0?!1:ye;z("getInputProps",Te,Q,M);var Y=v.current.state,te=function(Qe){var ge=ja(Qe);ge&&j[ge]&&j[ge](Qe)},ne=function(Qe){s({type:Il,inputValue:Qe.target.value})},Ce=function(Qe){if(r!=null&&r.document&&Y.isOpen&&!V.isMouseDown){var ge=Qe.relatedTarget===null&&r.document.activeElement!==r.document.body;s({type:Qa,selectItem:!ge})}},He=function(){s({type:yl})},De="onChange",Pe={};if(!Ie.disabled){var Be;Pe=(Be={},Be[De]=_e(de,ue,ne),Be.onKeyDown=_e(ie,te),Be.onBlur=_e(y,Ce),Be.onClick=_e(b,He),Be)}return le(($={},$[Q]=X1(xe,function(Xe){M.current=Xe}),$["aria-activedescendant"]=Y.isOpen&&Y.highlightedIndex>-1?C.getItemId(Y.highlightedIndex):"",$["aria-autocomplete"]="list",$["aria-controls"]=C.menuId,$["aria-expanded"]=Y.isOpen,$["aria-labelledby"]=Ie&&Ie["aria-label"]?void 0:C.labelId,$.autoComplete="off",$.id=C.inputId,$.role="combobox",$.value=Y.inputValue,$),Pe,Ie)},[s,C,r,j,v,V,z]),x=pe(function(){s({type:v5})},[s]),w=pe(function(){s({type:L5})},[s]),I=pe(function(){s({type:x5})},[s]),P=pe(function(B){s({type:w5,highlightedIndex:B})},[s]),h=pe(function(B){s({type:Sl,selectedItem:B})},[s]),T=pe(function(B){s({type:b5,inputValue:B})},[s]),q=pe(function(){s({type:I5})},[s]);return{getItemProps:D,getLabelProps:X,getMenuProps:A,getInputProps:L,getToggleButtonProps:U,toggleMenu:x,openMenu:I,closeMenu:w,setHighlightedIndex:P,setInputValue:T,selectItem:h,reset:q,highlightedIndex:d,isOpen:u,selectedItem:c,inputValue:p}}var S5={activeIndex:-1,selectedItems:[]};function Ki(e,t){return Ht(e,t,S5)}function Gi(e,t){return N1(e,t,S5)}function _c(e){var t=Ki(e,"activeIndex"),o=Ki(e,"selectedItems");return{activeIndex:t,selectedItems:o}}function Wi(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 Dc(e,t){return e.selectedItems===t.selectedItems&&e.activeIndex===t.activeIndex}var WI={stateReducer:Vo.stateReducer,itemToKey:Vo.itemToKey,environment:Vo.environment,selectedItems:ee.default.array,initialSelectedItems:ee.default.array,defaultSelectedItems:ee.default.array,getA11yStatusMessage:ee.default.func,activeIndex:ee.default.number,initialActiveIndex:ee.default.number,defaultActiveIndex:ee.default.number,onActiveIndexChange:ee.default.func,onSelectedItemsChange:ee.default.func,keyNavigationNext:ee.default.string,keyNavigationPrevious:ee.default.string},Oc={itemToKey:_o.itemToKey,stateReducer:_o.stateReducer,environment:_o.environment,keyNavigationNext:"ArrowRight",keyNavigationPrevious:"ArrowLeft"},Ec=Oo,kl=0,Hl=1,Pl=2,Tl=3,Vl=4,_l=5,Dl=6,Ol=7,El=8,Bl=9,Al=10,Zl=11,Fl=12,Bc=Object.freeze({__proto__:null,DropdownClick:Ol,DropdownKeyDownBackspace:Dl,DropdownKeyDownNavigationPrevious:_l,FunctionAddSelectedItem:El,FunctionRemoveSelectedItem:Bl,FunctionReset:Fl,FunctionSetActiveIndex:Zl,FunctionSetSelectedItems:Al,SelectedItemClick:kl,SelectedItemKeyDownBackspace:Pl,SelectedItemKeyDownDelete:Hl,SelectedItemKeyDownNavigationNext:Tl,SelectedItemKeyDownNavigationPrevious:Vl});function Ac(e,t,o){var a=o.type,r=o.index,n=o.selectedItem,l=e.activeIndex,i=e.selectedItems,s;switch(a){case kl:s={activeIndex:r};break;case Vl:s={activeIndex:l-1<0?0:l-1};break;case Tl:s={activeIndex:l+1>=i.length?-1:l+1};break;case Pl:case Hl:{if(l<0)break;var u=l;i.length===1?u=-1:l===i.length-1&&(u=i.length-2),s=le({selectedItems:[].concat(i.slice(0,l),i.slice(l+1))},{activeIndex:u});break}case _l:s={activeIndex:i.length-1};break;case Dl:s={selectedItems:i.slice(0,i.length-1)};break;case El:s={selectedItems:[].concat(i,[n])};break;case Ol:s={activeIndex:-1};break;case Bl:{var d=l,c=i.findIndex(function(m){return t.itemToKey(m)===t.itemToKey(n)});if(c<0)break;i.length===1?d=-1:c===i.length-1&&(d=i.length-2),s={selectedItems:[].concat(i.slice(0,c),i.slice(c+1)),activeIndex:d};break}case Al:{var p=o.selectedItems;s={selectedItems:p};break}case Zl:{var g=o.activeIndex;s={activeIndex:g};break}case Fl:s={activeIndex:Gi(t,"activeIndex"),selectedItems:Gi(t,"selectedItems")};break;default:throw new Error("Reducer called without proper action type.")}return le({},e,s)}var Zc=["refKey","ref","onClick","onKeyDown","selectedItem","index"],Fc=["refKey","ref","onKeyDown","onClick","preventKeyAction"];R5.stateChangeTypes=Bc;function R5(e){e===void 0&&(e={}),Ec(e,R5);var t=le({},Oc,e),o=t.getA11yStatusMessage,a=t.environment,r=t.keyNavigationNext,n=t.keyNavigationPrevious,l=Jn(Ac,t,_c,Dc),i=l[0],s=l[1],u=i.activeIndex,d=i.selectedItems,c=Ya(),p=y1(null),g=y1();g.current=[];var m=Do({state:i,props:t});tl(o,i,[u,d],a),$1(function(){c||(u===-1&&p.current?p.current.focus():g.current[u]&&g.current[u].focus())},[u]),al({props:t,state:i});var M=ol("getDropdownProps"),f=Jt(function(){var V;return V={},V[n]=function(){s({type:Vl})},V[r]=function(){s({type:Tl})},V.Delete=function(){s({type:Hl})},V.Backspace=function(){s({type:Pl})},V},[s,r,n]),R=Jt(function(){var V;return V={},V[n]=function(z){Wi(z)&&s({type:_l})},V.Backspace=function(j){Wi(j)&&s({type:Dl})},V},[s,n]),C=pe(function(V){var z,j=V===void 0?{}:V,X=j.refKey,A=X===void 0?"ref":X,D=j.ref,U=j.onClick,L=j.onKeyDown,x=j.selectedItem,w=j.index,I=d1(j,Zc),P=m.current.state,h=el(x,w,P.selectedItems,"Pass either item or index to getSelectedItemProps!"),T=h[1],q=T>-1&&T===P.activeIndex,B=function(){s({type:kl,index:T})},F=function(Z){var ie=ja(Z);ie&&f[ie]&&f[ie](Z)};return le((z={},z[A]=X1(D,function($){$&&g.current.push($)}),z.tabIndex=q?0:-1,z.onClick=_e(U,B),z.onKeyDown=_e(L,F),z),I)},[s,m,f]),k=pe(function(V,z){var j,X=V===void 0?{}:V,A=X.refKey,D=A===void 0?"ref":A,U=X.ref,L=X.onKeyDown,x=X.onClick,w=X.preventKeyAction,I=w===void 0?!1:w,P=d1(X,Fc),h=z===void 0?{}:z,T=h.suppressRefError,q=T===void 0?!1:T;M("getDropdownProps",q,D,p);var B=function(Z){var ie=ja(Z);ie&&R[ie]&&R[ie](Z)},F=function(){s({type:Ol})};return le((j={},j[D]=X1(U,function($){$&&(p.current=$)}),j),!I&&{onKeyDown:_e(L,B),onClick:_e(x,F)},P)},[s,R,M]),v=pe(function(V){s({type:El,selectedItem:V})},[s]),H=pe(function(V){s({type:Bl,selectedItem:V})},[s]),O=pe(function(V){s({type:Al,selectedItems:V})},[s]),N=pe(function(V){s({type:Zl,activeIndex:V})},[s]),S=pe(function(){s({type:Fl})},[s]);return{getSelectedItemProps:C,getDropdownProps:k,addSelectedItem:v,removeSelectedItem:H,setSelectedItems:O,setActiveIndex:N,reset:S,selectedItems:d,activeIndex:u}}var $l=0,Nl=1,Ul=2,ql=3,zl=4,jl=5,Kl=6,$c=Object.freeze({__proto__:null,FunctionAddItem:Kl,TagClick:$l,TagGroupKeyDownArrowLeft:Nl,TagGroupKeyDownArrowRight:Ul,TagGroupKeyDownBackspace:zl,TagGroupKeyDownDelete:ql,TagRemoveClick:jl});function Nc(e,t,o){var a=o.type,r;switch(a){case $l:r={activeIndex:o.index};break;case Nl:r={activeIndex:e.activeIndex===0?e.items.length-1:e.activeIndex-1};break;case Ul:r={activeIndex:e.activeIndex===e.items.length-1?0:e.activeIndex+1};break;case zl:case ql:{var n=[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),l=n.length===0?-1:n.length===e.activeIndex?e.activeIndex-1:e.activeIndex;r={items:[].concat(e.items.slice(0,e.activeIndex),e.items.slice(e.activeIndex+1)),activeIndex:l};break}case jl:{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 Kl:{var u=[];o.index===void 0?u=[].concat(e.items,[o.item]):u=[].concat(e.items.slice(0,o.index),[o.item],e.items.slice(o.index));var d=e.activeIndex===-1?u.length-1:e.activeIndex;r={items:u,activeIndex:d};break}default:throw new Error("Invalid useTagGroup reducer action.")}return le({},e,r)}var Uc=le({},me),k5=Uc.useId,qc=typeof k5=="function"?zc:jc;function zc(e){var t=e.id,o=e.tagGroupId,a=e.getTagId,r="downshift-"+k5();t||(t=r);var n=me.useMemo(function(){return{tagGroupId:o??t+"-tag-group",getTagId:a??function(l){return t+"-tag-"+l}}},[a,t,o]);return n}function jc(e){var t=e.id,o=e.getTagId,a=e.tagGroupId,r=me.useRef(t??"downshift-"+Xi()),n=r.current,l=me.useMemo(function(){return{tagGroupId:a??n+"-tag-group",getTagId:o??function(i){return n+"-tag-"+i}}},[o,n,a]);return l}function Kc(e){var t,o,a,r,n=(t=(o=e.items)!=null?o:e.initialItems)!=null?t:[],l=(a=(r=e.activeIndex)!=null?r:e.initialActiveIndex)!=null?a:n.length===0?-1:0;return{activeIndex:l,items:n}}function Gc(e,t){return e.activeIndex===t.activeIndex&&e.items===t.items}var H5="tag-group-a11y-description";function Wc(e,t){me.useEffect(function(){if(e){var o=e.createElement("div");return o.setAttribute("id",H5),o.style.display="none",o.textContent=t,e.body.appendChild(o),function(){o.remove()}}},[t,e])}function Xc(e){return le({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 Qc(e,t,o){var a=me.useRef({}),r=me.useRef(e),n=me.useRef(t);return me.useEffect(function(){if(e!==-1&&r.current!==-1&&e!==r.current||n.current===t+1){var l;(l=a.current[o(e)])==null||l.focus()}r.current=e,n.current=t},[e,o,t]),a}var Yc={isItemDisabled:ee.default.func},Jc=["onKeyDown"],e8=["index","refKey","ref","onClick"],t8=["index","onClick"],P5=function(t){var o;t===void 0&&(t={}),Qn(t,P5,Yc);var a=Xc(t),r=Jn(Nc,a,Kc,Gc),n=r[0],l=r[1],i=n.activeIndex,s=n.items,u=Do({state:n,props:a}),d=qc({getTagId:a.getTagId,id:a.id,tagGroupId:a.tagGroupId});Wc((o=a.environment)==null?void 0:o.document,a.removeElementDescription);var c=Qc(i,s.length,d.getTagId),p=pe(function(f){var R=f??{},C=R.onKeyDown,k=d1(R,Jc),v=function(N){switch(N.key){case"ArrowLeft":l({type:Nl});break;case"ArrowRight":l({type:Ul});break;case"Delete":l({type:ql});break;case"Backspace":l({type:zl});break}},H=le({id:d.tagGroupId,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions",role:"listbox",onKeyDown:Wn(C,v)},k);return H},[l,d.tagGroupId]),g=pe(function(f){var R,C=f.index,k=f.refKey,v=k===void 0?"ref":k,H=f.ref,O=f.onClick,N=d1(f,e8);if(!Number.isInteger(C)||C<0)throw new Error("Pass correct item index to getTagProps!");var S=u.current.state,V=function(){l({type:$l,index:C})},z=d.getTagId(C);return le((R={"aria-describedby":H5},R[v]=J4(H,function(j){j&&(c.current[z]=j)}),R["aria-labelledby"]=z,R.role="option",R.id=z,R.onClick=Wn(O,V),R.tabIndex=S.activeIndex===C?0:-1,R),N)},[l,d,u,c]),m=pe(function(f){var R=f.index,C=f.onClick,k=d1(f,t8);if(!Number.isInteger(R)||R<0)throw new Error("Pass correct item index to getTagRemoveProps!");var v=function(S){S.stopPropagation(),l({type:jl,index:R})},H=d.getTagId(R),O=H+"-remove";return le({id:O,tabIndex:-1,"aria-labelledby":O+" "+H,onClick:Wn(C,v)},k)},[d,l]),M=pe(function(f,R){l({type:Kl,item:f,index:R})},[l]);return{activeIndex:i,addItem:M,getTagGroupProps:p,getTagProps:g,getTagRemoveProps:m,items:s}};P5.stateChangeTypes=$c;import to from"react";import{createPortal as o8}from"react-dom";import{jsx as Q1,jsxs as T5}from"react/jsx-runtime";var a8=260,er=4,r8=Q1(w9,{width:9,height:9}),n8=Q1(b9,{width:9,height:9}),l8={ariaReset:"Reset {0} to default"};function i8(e){let t=e.getBoundingClientRect(),o=yt(e),a=o?o.getBoundingClientRect():{top:0,bottom:window.innerHeight},r=a.bottom-t.bottom-er,n=t.top-a.top-er,l=r<a8&&n>r;return{top:l?t.top-er:t.bottom+er,left:t.left,width:t.width,openAbove:l}}function oo({label:e,options:t,selectedItem:o,onChange:a,id:r="picklist",getOptionStyle:n,triggerLabel:l,triggerMuted:i=!1,triggerStyle:s,aria:u}){let[d,c]=to.useState({top:0,left:0,width:0,openAbove:!1}),p=to.useRef(null),g=`${r}-legend`,m=p1(l8,u),M=Oe(m.ariaReset,[e]),f=to.useMemo(()=>t.filter(A=>A.value!==""),[t]),R=o!=null,C=()=>{p.current?.focus(),a("")},{isOpen:k,closeMenu:v,highlightedIndex:H,getToggleButtonProps:O,getMenuProps:N,getItemProps:S}=Ja({items:f,itemToString:A=>A?A.label:"",selectedItem:o,onSelectedItemChange:({selectedItem:A})=>{typeof a=="function"&&A&&A.value!==o?.value&&a(A.value)},onIsOpenChange:({isOpen:A})=>{A&&p.current&&c(i8(p.current))},id:r,labelId:g});to.useEffect(()=>{if(!k||!p.current)return;let A=yt(p.current);if(!A)return;let D=()=>v();return A.addEventListener("scroll",D,{passive:!0}),()=>A.removeEventListener("scroll",D)},[k,v]);let V="picklistEditor-dropdown"+(k?" picklistEditor-dropdown--open":""),z=k?{top:d.top,left:d.left,width:d.width,...d.openAbove?{transform:"translateY(-100%)"}:void 0}:void 0,[j,X]=to.useState(null);return to.useLayoutEffect(()=>{let D=p.current?.getRootNode();X(D instanceof ShadowRoot?D:document.body)},[]),Q1(v1,{label:e,id:r,className:"picklistEditor-fieldset",children:T5("div",{className:"picklistEditor-wrapper",children:[T5("button",{type:"button",className:"picklistEditor-trigger",style:s,...O({ref:p}),children:[Q1("span",{className:"picklistEditor-trigger-label"+(i?" picklistEditor-trigger-label--muted":""),children:l??o?.label??"Default"}),Q1("span",{className:"picklistEditor-trigger-chevron","aria-hidden":"true",children:k?n8:r8})]}),R&&Q1("button",{type:"button",className:"picklistEditor-reset",onClick:C,"aria-label":M,title:M,children:Q1(m9,{width:14,height:14})}),o8(Q1("ul",{className:V,style:z,...N(),children:k&&f.map((A,D)=>Q1("li",{className:"picklistEditor-option"+(H===D?" picklistEditor-option--highlighted":"")+(o?.value===A.value?" picklistEditor-option--selected":""),style:n?n(A):void 0,...S({item:A,index:D}),children:A.label},A.value))}),j??document.body)]})})}import{jsx as c8}from"react/jsx-runtime";var s8=[{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 V5(e){return(e.split(",")[0]??"").trim().replace(/['"]/g,"")}function u8(e,t){if(!e)return null;let o=e.replace(/['"]/g,""),a=V5(e);for(let r of t){if(!r.value)continue;let n=r.value.replace(/['"]/g,"");if(o.indexOf(n)!==-1||n.indexOf(a)!==-1)return r}return null}var d8=e=>e.value?{fontFamily:e.value}:void 0;function _5({label:e="Font family",value:t,computedValue:o,options:a,onChange:r,matchOption:n=u8,id:l="font-family",aria:i}){let s=a??s8,u=n(t,s),d=t||o,c=n(d,s),p=!u,g;return c?g=c.label:d&&(g=V5(d)||void 0),c8(oo,{label:e,options:s,selectedItem:u,triggerLabel:g,triggerMuted:p,triggerStyle:d?{fontFamily:d}:void 0,onChange:r,id:l,getOptionStyle:d8,aria:i})}import{jsx as Gl}from"react/jsx-runtime";var f8=[{value:"normal",labelKey:"normal",defaultLabel:"Normal",icon:Gl(l9,{width:14,height:14})},{value:"italic",labelKey:"italic",defaultLabel:"Italic",icon:Gl(n9,{width:14,height:14})}];function D5({label:e="Font Style",value:t,onChange:o,id:a="font-style",optionLabels:r}){let n=f8.map(l=>({value:l.value,label:r?.[l.labelKey]??l.defaultLabel,icon:l.icon}));return Gl(D1,{label:e,options:n,value:t||"normal",onChange:o,id:a})}import{jsx as g8}from"react/jsx-runtime";var p8=[{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 C8(e){return p8.map(t=>{let o=e?.[t.labelKey]??t.defaultWord;return{value:t.value,label:`${o} (${t.value})`}})}function m8(e,t){if(!e)return null;let o=String(e).trim();return t.find(a=>a.value===o)??null}function O5({label:e="Font weight",value:t,computedValue:o,options:a,onChange:r,matchOption:n=m8,id:l="font-weight",optionLabels:i,aria:s}){let u=a??C8(i),d=n(t,u),c=n(t||o,u),p=!d,g=c?.label;return g8(oo,{label:e,options:u,selectedItem:d,triggerLabel:g,triggerMuted:p,onChange:r,id:l,aria:s})}import oe from"react";import{createPortal as h8}from"react-dom";import{jsx as se,jsxs as f1}from"react/jsx-runtime";var v8={tabCms:"CMS",tabLocal:"Local",tabUrl:"URL",ariaTablist:"Image source",clearImage:"Clear image",chooseFile:"Choose File...",ariaChooseFile:"Choose an image file from your computer",ariaImageUrl:"Image URL",urlPlaceholder:"https://example.com/image.png",previewAlt:"Preview",altText:"Alt Text",altPlaceholder:"Describe the image",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}"},ao=["local","url"];function x8({labels:e,workspaceName:t,folderId:o,portalTarget:a,folderItemsResult:r,contentDetail:n,thumbnailResult:l,onFetchFolderItems:i,onFetchContentDetail:s,onFetchThumbnail:u,onCancel:d,onConfirm:c}){let[p,g]=oe.useState([]),[m,M]=oe.useState(0),[f,R]=oe.useState(!0),[C,k]=oe.useState(!1),[v,H]=oe.useState(null),[O,N]=oe.useState(null),[S,V]=oe.useState({}),[z,j]=oe.useState({}),X=oe.useRef(new Set),A=oe.useRef(new Set),D=oe.useCallback(I=>{C||typeof i=="function"&&(k(!0),H(null),i(o,I,20))},[o,C,i]);oe.useEffect(()=>{D(0)},[o]),oe.useEffect(()=>{let I=P=>{P.key==="Escape"&&(P.stopPropagation(),d())};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[d]);let U=oe.useRef(null);oe.useEffect(()=>{U.current?.focus()},[]),oe.useEffect(()=>{if(!r)return;let I=(r.items??[]).map(P=>({contentKey:P.contentKey,title:P.title??e.untitled,mimeType:P.mimeType??"image/png"}));g(P=>r.page===0?I:[...P,...I]),R(!!r.hasMore),M(r.page??0),k(!1),r.error&&H(String(r.error))},[r]),oe.useEffect(()=>{if(!n)return;let I=n.contentKey;if(!I||n.error)return;let P=n.url??"",h=n.mimeType??"image/png",T=n.title??"";V(q=>q[I]?q:{...q,[I]:{url:P,mimeType:h,title:T}}),P&&!A.current.has(I)&&typeof u=="function"&&(A.current.add(I),u(I,P,h))},[n,u]),oe.useEffect(()=>{if(!l)return;let{imageId:I,thumbnailUrl:P}=l;I&&P&&j(h=>({...h,[I]:P}))},[l]);let L=oe.useRef(null);oe.useEffect(()=>{let I=L.current;if(!I||!f||C)return;let P=new IntersectionObserver(h=>{h.some(q=>q.isIntersecting)&&D(m+1)});return P.observe(I),()=>P.disconnect()},[f,C,m,D]);let x=oe.useCallback(I=>{X.current.has(I)||typeof s=="function"&&(X.current.add(I),s(I))},[s]),w=()=>{if(!O)return;let I=S[O],P=p.find(h=>h.contentKey===O);!I||!P||c({contentKey:O,title:P.title,url:I.url,mimeType:I.mimeType||P.mimeType})};return h8(se("div",{ref:U,tabIndex:-1,className:"cmsPicker-overlay",role:"dialog","aria-modal":"true","aria-label":Oe(e.pickerTitle,[t]),onClick:I=>{I.target===I.currentTarget&&d()},children:f1("div",{className:"cmsPicker-dialog",children:[f1("div",{className:"cmsPicker-header",children:[se("span",{className:"cmsPicker-title",children:Oe(e.pickerTitle,[t])}),se("button",{type:"button",className:"cmsPicker-close",onClick:d,"aria-label":e.closePicker,title:e.closePicker,children:"\u2715"})]}),f1("div",{className:"cmsPicker-body",children:[p.length===0&&C&&se("div",{className:"cmsPicker-empty",children:e.loadingImages}),p.length===0&&!C&&!v&&se("div",{className:"cmsPicker-empty",children:e.noImages}),v&&se("div",{className:"cmsPicker-empty",children:Oe(e.pickerError,[v])}),f1("div",{className:"cmsPicker-grid",children:[p.map(I=>se(L8,{item:I,selected:O===I.contentKey,thumbnailDataUrl:z[I.contentKey],onIntersect:()=>x(I.contentKey),onClick:()=>N(I.contentKey)},I.contentKey)),f&&se("div",{className:"cmsPicker-sentinel",ref:L,children:C?e.loadingMore:""})]})]}),f1("div",{className:"cmsPicker-footer",children:[se("button",{type:"button",className:"cmsPicker-btn",onClick:d,children:e.cancel}),se("button",{type:"button",className:"cmsPicker-btn cmsPicker-btn--primary",disabled:!O||!S[O??""],onClick:w,children:e.done})]})]})}),a)}function L8({item:e,selected:t,thumbnailDataUrl:o,onIntersect:a,onClick:r}){let n=oe.useRef(null),l=oe.useRef(!1);return oe.useEffect(()=>{let i=n.current;if(!i||l.current)return;let s=new IntersectionObserver(u=>{u.some(c=>c.isIntersecting)&&!l.current&&(l.current=!0,a(),s.disconnect())});return s.observe(i),()=>s.disconnect()},[a]),f1("button",{ref:n,type:"button",className:`cmsPicker-thumb${t?" cmsPicker-thumb--selected":""}`,onClick:r,title:e.title,"aria-pressed":t,children:[se("div",{className:"cmsPicker-thumb-img",children:o?se("img",{src:o,alt:e.title}):se("div",{className:"cmsPicker-thumb-placeholder","aria-hidden":"true",children:"\u2026"})}),se("span",{className:"cmsPicker-thumb-label",children:e.title})]})}function w8({labels:e,spaces:t,spacesLoading:o,selectedSpaceId:a,onSpaceSelect:r,onOpenPicker:n}){return o?se("div",{className:"imageEditor-cms",children:se("div",{className:"imageEditor-cms-loading",children:e.loadingWorkspaces})}):t.length===0?se("div",{className:"imageEditor-cms",children:se("div",{className:"imageEditor-cms-empty",children:e.noWorkspaces})}):f1("div",{className:"imageEditor-cms",children:[f1("div",{className:"imageEditor-cms-channel",children:[se("label",{className:"imageEditor-cms-channel-label",htmlFor:"cms-space-select",children:e.workspace}),f1("select",{id:"cms-space-select",className:"imageEditor-input imageEditor-cms-channel-select",value:a,onChange:l=>r(l.target.value),children:[se("option",{value:"",children:e.selectWorkspace}),t.map(l=>se("option",{value:l.id,children:l.name},l.id))]})]}),se("button",{type:"button",className:"imageEditor-cms-pick-btn",onClick:n,disabled:!a,children:e.selectImage})]})}function b8({labels:e,onPick:t}){return se("div",{className:"imageEditor-local",children:se("button",{className:"imageEditor-local-pick",onClick:t,type:"button","aria-label":e.ariaChooseFile,"aria-haspopup":"dialog",children:e.chooseFile})})}function E5({src:e,alt:t,className:o}){let[a,r]=oe.useState(!1);return oe.useEffect(()=>{r(!1)},[e]),a?null:se("img",{src:e,alt:t,className:o,onError:()=>r(!0)})}function I8({labels:e,input:t,onInputChange:o,onApply:a,currentUrl:r}){return f1("div",{className:"imageEditor-url",children:[se("input",{type:"text",value:t,"aria-label":e.ariaImageUrl,placeholder:e.urlPlaceholder,className:"imageEditor-input",onChange:n=>o(n.target.value),onKeyDown:n=>{n.key==="Enter"&&t&&a(t)},onBlur:()=>{t&&t!==r&&a(t)}}),t&&se("div",{className:"imageEditor-url-preview",children:se(E5,{src:t,alt:e.previewAlt,className:"imageEditor-preview-thumb"})})]})}function y8({id:e,label:t,value:o,placeholder:a,onCommit:r}){let[n,l]=oe.useState(o),i=oe.useRef(r);i.current=r;let s=oe.useRef(o);oe.useEffect(()=>{o!==s.current&&(s.current=o,l(o))},[o]);let u=()=>{n!==o&&(s.current=n,i.current(n))};return f1("div",{className:"imageEditor-attr",children:[se("label",{className:"imageEditor-attr-label",htmlFor:e,children:t}),se("input",{id:e,type:"text",value:n,placeholder:a,className:"imageEditor-input",onChange:d=>l(d.target.value),onKeyDown:d=>{d.key==="Enter"&&u()},onBlur:u})]})}function M8({labels:e,attributes:t,onAttributeChange:o}){return se("div",{className:"imageEditor-attrs",children:se(y8,{id:"design-img-alt",label:e.altText,value:t.alt,placeholder:e.altPlaceholder,onCommit:a=>o("alt",a)})})}function Wl({label:e,value:t,onChange:o,id:a="image",attributes:r,onAttributeChange:n,cmsSpaces:l,cmsSpacesLoading:i,onFetchCmsSpaces:s,cmsFolderItemsResult:u,onFetchCmsFolderItems:d,cmsContentDetail:c,onFetchCmsContentDetail:p,cmsThumbnailResult:g,onFetchCmsThumbnail:m,onImportCmsImage:M,cmsImportResult:f,onPickLocalFile:R,localPreview:C,imageLabels:k}){let v=p1(v8,k),H={cms:v.tabCms,local:v.tabLocal,url:v.tabUrl},[O,N]=oe.useState("local"),[S,V]=oe.useState(""),[z,j]=oe.useState(!1),X=oe.useRef(o);X.current=o;let A=oe.useRef(t);A.current=t;let D=oe.useRef(C);oe.useEffect(()=>{if(!C||C===D.current)return;D.current=C;let b=C.devUrl||C.webviewUri;b&&b!==A.current&&X.current(b)},[C]);let U=b=>b?.startsWith("data:")?"":b??"",[L,x]=oe.useState(()=>U(t)),w=oe.useRef(t??"");oe.useEffect(()=>{let b=t??"";b!==w.current&&(w.current=b,x(U(b)))},[t]);let[I,P]=oe.useState("idle"),h=oe.useRef(null),T=oe.useRef(null),q=oe.useCallback(()=>{let b=T.current?.getRootNode();return b instanceof ShadowRoot?b:document.body},[]),B=oe.useRef({}),F=oe.useCallback(b=>{N(b),B.current[b]?.focus()},[]),$=oe.useCallback((b,K)=>{let Q=null;switch(b.key){case"ArrowRight":Q=(K+1)%ao.length;break;case"ArrowLeft":Q=(K-1+ao.length)%ao.length;break;case"Home":Q=0;break;case"End":Q=ao.length-1;break;default:return}b.preventDefault();let xe=ao[Q];xe&&F(xe)},[F]),Z=l??[],ie=i??!1,de=t||"";oe.useEffect(()=>{if(f)if(f.success&&f.devUrl)o(f.devUrl),P("success");else{let b=h.current?.url;b?(o(b),P("success")):P("error")}},[f,o]),oe.useEffect(()=>{O==="cms"&&Z.length===0&&!ie&&typeof s=="function"&&s()},[O]);let ue=oe.useMemo(()=>Z.find(b=>b.id===S)??null,[Z,S]),y=oe.useCallback(b=>{let K={id:b.contentKey,title:b.title,url:b.url,thumbnailUrl:"",contentType:b.mimeType};h.current=K,j(!1),typeof M=="function"&&K.url?(P("importing"),M(K)):K.url&&o(K.url)},[o,M]);return se(v1,{label:e,id:a,className:"imageEditor-fieldset",children:f1("div",{ref:T,className:"imageEditor-root",children:[de&&f1("div",{className:"imageEditor-current",children:[se(E5,{src:de,alt:"",className:"imageEditor-current-thumb"}),se("span",{className:"imageEditor-current-url",title:de,children:de.length>30?`...${de.slice(-30)}`:de}),se("button",{className:"imageEditor-clear",onClick:()=>o(""),title:v.clearImage,"aria-label":v.clearImage,type:"button",children:"\u2715"})]}),se("div",{className:"imageEditor-tabs",role:"tablist","aria-label":v.ariaTablist,children:ao.map((b,K)=>se("button",{id:`${a}-tab-${b}`,ref:Q=>{B.current[b]=Q},role:"tab",type:"button","aria-selected":O===b,"aria-controls":`${a}-tabpanel`,tabIndex:O===b?0:-1,className:`imageEditor-tab${O===b?" imageEditor-tab--active":""}`,onClick:()=>N(b),onKeyDown:Q=>$(Q,K),children:H[b]},b))}),f1("div",{className:"imageEditor-tab-content",role:"tabpanel",id:`${a}-tabpanel`,"aria-labelledby":`${a}-tab-${O}`,children:[O==="cms"&&se(w8,{labels:v,spaces:Z,spacesLoading:ie,selectedSpaceId:S,onSpaceSelect:V,onOpenPicker:()=>j(!0)}),O==="cms"&&I==="importing"&&se("div",{className:"imageEditor-cms-loading",children:v.downloadingImage}),O==="cms"&&I==="error"&&se("div",{className:"imageEditor-cms-empty",children:v.downloadFailed}),O==="local"&&se(b8,{labels:v,onPick:()=>R?.()}),O==="url"&&se(I8,{labels:v,input:L,onInputChange:x,onApply:b=>{w.current=b,o(b)},currentUrl:de})]}),r&&n&&se(M8,{labels:v,attributes:r,onAttributeChange:n}),z&&ue&&se(x8,{labels:v,workspaceName:ue.name,folderId:ue.rootFolderId,portalTarget:q(),folderItemsResult:u,contentDetail:c,thumbnailResult:g,onFetchFolderItems:d,onFetchContentDetail:p,onFetchThumbnail:m,onCancel:()=>j(!1),onConfirm:y})]})})}import{jsx as k8}from"react/jsx-runtime";var S8=[{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 R8(e){return S8.map(t=>({value:t.value,label:e?.[t.labelKey]??t.defaultLabel}))}function B5(e,t){if(!e)return null;let o=String(e).trim().toLowerCase();return t.find(a=>a.value===o)??null}function A5({label:e="Content Overflow",value:t,computedValue:o,onChange:a,id:r="overflow",optionLabels:n,aria:l}){let i=R8(n),s=B5(t,i),u=B5(t||o,i),d=!s,c=u?.label;return k8(oo,{label:e,options:i,selectedItem:s,triggerLabel:c,triggerMuted:d,onChange:a,id:r,aria:l})}import{jsx as Eo}from"react/jsx-runtime";var H8=[{value:"left",labelKey:"left",defaultLabel:"Left",icon:Eo(x9,{width:14,height:14})},{value:"center",labelKey:"center",defaultLabel:"Center",icon:Eo(h9,{width:14,height:14})},{value:"right",labelKey:"right",defaultLabel:"Right",icon:Eo(L9,{width:14,height:14})},{value:"justify",labelKey:"justify",defaultLabel:"Justify",icon:Eo(v9,{width:14,height:14})}],P8={start:"left",end:"right"};function Z5({label:e="Text Align",value:t,onChange:o,id:a="text-align",optionLabels:r}){let n=P8[t||""]||t||"left",l=H8.map(i=>({value:i.value,label:r?.[i.labelKey]??i.defaultLabel,icon:i.icon}));return Eo(D1,{label:e,options:l,value:n,onChange:o,id:a})}import{jsx as tr}from"react/jsx-runtime";var F5=[{value:"none",labelKey:"none",defaultLabel:"None",icon:tr(Y1,{width:14,height:14})},{value:"underline",labelKey:"underline",defaultLabel:"Underline",icon:tr(I9,{width:14,height:14})},{value:"line-through",labelKey:"lineThrough",defaultLabel:"Line Through",icon:tr(g9,{width:14,height:14})}];function T8(e){if(!e)return"none";for(let t of F5)if(e===t.value||e.startsWith(t.value+" "))return t.value;return"none"}function $5({label:e="Text Decoration",value:t,onChange:o,id:a="text-decoration",optionLabels:r}){let n=F5.map(l=>({value:l.value,label:r?.[l.labelKey]??l.defaultLabel,icon:l.icon}));return tr(D1,{label:e,options:n,value:T8(t),onChange:o,id:a})}import{jsx as Bo}from"react/jsx-runtime";var V8=[{value:"none",labelKey:"none",defaultLabel:"None",icon:Bo(Y1,{width:14,height:14})},{value:"uppercase",labelKey:"uppercase",defaultLabel:"Uppercase",icon:Bo(f9,{width:14,height:14})},{value:"lowercase",labelKey:"lowercase",defaultLabel:"Lowercase",icon:Bo(c9,{width:14,height:14})},{value:"capitalize",labelKey:"capitalize",defaultLabel:"Capitalize",icon:Bo(d9,{width:14,height:14})}];function N5({label:e="Text Case",value:t,onChange:o,id:a="text-transform",optionLabels:r}){let n=V8.map(l=>({value:l.value,label:r?.[l.labelKey]??l.defaultLabel,icon:l.icon}));return Bo(D1,{label:e,options:n,value:t||"none",onChange:o,id:a})}var U5="textContent";var _8=e=>e!=null&&typeof e=="object"&&"property"in e,D8=e=>typeof e?.sourceFile=="string"&&e.sourceFile!==""&&e.lineNumber!=null&&e.columnNumber!=null?{sourceFile:e.sourceFile,lineNumber:e.lineNumber,columnNumber:e.columnNumber}:void 0;function q5(e){let t=[],o=new Map,a=n=>{let l=D8(n);if(!l)return;let{sourceFile:i,lineNumber:s,columnNumber:u}=l,d=`${i}\0${s}:${u}`,c=o.get(d);return c||(c={byProperty:new Map,baselineByProperty:new Map,debugSource:l},o.set(d,c),t.push(c)),c},r=(n,l,i)=>{n.baselineByProperty.has(l)||n.baselineByProperty.set(l,String(i??""))};for(let n of e){let l=n.data;if(n.type==="style"&&l?.property!=null){let i=a(l);if(i){let s=String(l.property);r(i,s,n.oldValue),i.byProperty.set(s,String(n.newValue??""))}}else if(n.type==="style-batch"&&Array.isArray(l?.changes)){let i=a(l);for(let s of l.changes)if(i&&_8(s)&&s.property!=null){let u=String(s.property);r(i,u,s.oldValue),i.byProperty.set(u,String(s.newValue??""))}}else n.type==="text"&&a(l)?.byProperty.set(U5,String(n.newValue??""))}return t.map(n=>{let l=[...n.byProperty].map(([i,s])=>({property:i,value:s})).filter(i=>i.property===U5||i.value!==""||n.baselineByProperty.get(i.property)!=="");return{debugSource:n.debugSource,commands:l}}).filter(n=>n.commands.length>0)}var gt={CHANGED:"history-changed",COMMAND_PUSHED:"command-pushed",COMMAND_UNDONE:"command-undone",COMMAND_REDONE:"command-redone",CLEARED:"history-cleared"},or=class{constructor(t={}){vt(this,"undoStack",[]);vt(this,"redoStack",[]);vt(this,"maxHistorySize");vt(this,"listeners",new Set);vt(this,"_isProcessing",!1);vt(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 n of r)try{n(a)}catch(l){console.error("[HistoryManager] Error in listener:",l)}}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.length>=this.maxHistorySize||(this.undoStack.push(t),this.redoStack=[],this._notify(gt.COMMAND_PUSHED,{command:t}),this._notify(gt.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(gt.COMMAND_UNDONE,{command:t,appliedValue:t.oldValue}),this._notify(gt.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(gt.COMMAND_REDONE,{command:t,appliedValue:t.newValue}),this._notify(gt.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(gt.CLEARED),this._notify(gt.CHANGED)}getUndoCount(){return this.undoStack.length}getMaxHistorySize(){return this.maxHistorySize}getRedoCount(){return this.redoStack.length}getUndoStackSnapshot(){return this.undoStack.map(t=>({type:t.type,oldValue:t.oldValue,newValue:t.newValue,data:t.data}))}};var O8=(e,t)=>{let o=t?e.oldValue:e.newValue;return typeof o=="string"?o:String(o??"")},ar=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",B8=e=>typeof e=="object"&&e!==null&&Array.isArray(e.changes)&&e.changes.every(t=>t!=null&&typeof t.property=="string"),A8=e=>typeof e=="object"&&e!==null&&"tag"in e&&typeof e.tag=="string"&&"attribute"in e&&typeof e.attribute=="string",z5=(e,t,o)=>{let a=new Map;return{execute:(r,n)=>{let l=O8(r,n);a.set(r.id,l);try{if(r.type==="style"&&E8(r.data)){let i=ar(r.data);return e(r.data.property,l,i),!0}else if(r.type==="style-batch"&&B8(r.data)){let i=ar(r.data);for(let s of r.data.changes)e(s.property,n?s.oldValue:s.newValue,i);return!0}else if(r.type==="text"){let i=ar(r.data);return t(l,i),!0}else if(r.type==="media"&&A8(r.data)){if(!o)return!1;let i=ar(r.data);return o(r.data.tag,{[r.data.attribute]:l},i),!0}}catch{return!1}return!1},getCurrentValue:r=>a.get(r.id)??r.newValue,canHandle:r=>r==="style"||r==="style-batch"||r==="text"||r==="media"&&typeof o=="function"}};function j5(e,t,o){let a=z5(e,t,o),r=new or({commandExecutor:a});return{recordStyleChange(n,l,i,s){let u=r.createCommand("style",l,i,{...s,property:n});r.pushCommand(u)},recordStyleBatch(n,l){if(n.length===0)return;let i=n[0],s=r.createCommand("style-batch",i.oldValue,i.newValue,{...l,changes:n});r.pushCommand(s)},recordTextChange(n,l,i){let s=r.createCommand("text",n,l,{...i});r.pushCommand(s)},recordMediaChange(n,l,i,s,u){let d=r.createCommand("media",i,s,{...u,tag:n,attribute:l});r.pushCommand(d)},undo:()=>r.undo(),redo:()=>r.redo(),canUndo:()=>r.canUndo(),canRedo:()=>r.canRedo(),subscribe:n=>r.subscribe(n),getHistoryStack:()=>r.getUndoStackSnapshot(),clear:()=>r.clear(),getUndoCount:()=>r.getUndoCount(),getMaxHistorySize:()=>r.getMaxHistorySize()}}var Xl=`url\\(\\s*(['"]?)([^'")]+)\\1\\s*\\)`,Z8=new RegExp(Xl,"i");function rr(e){let t=[],o=0,a="";for(let r of e)r==="("?o++:r===")"&&o--,r===","&&o===0?(t.push(a.trim()),a=""):a+=r;return a.trim()!==""&&t.push(a.trim()),t}function Ql(e){let t=rr((e??"").trim());for(let o=0;o<t.length;o++){let a=t[o]??"",r=Z8.exec(a);if(r?.[2])return{index:o,layer:a,path:r[2].trim()}}return null}var F8=new RegExp(Xl,"i");function $8(e,t){let o=`url("${t}")`,a=(e??"").trim();if(!_1(a))return o;let r=Ql(a),n=rr(a);return r?n.map((l,i)=>i===r.index?l.replace(F8,()=>o):l).join(", "):[o,...n].join(", ")}function N8(e){let t=(e??"").trim();if(!_1(t))return"none";let o=Ql(t);if(!o)return t;let a=rr(t);return a.splice(o.index,1),a.length===0?"none":a.join(", ")}function K5(e,t){return t.trim()===""?N8(e):$8(e,t)}import{Fragment as nf,jsx as J,jsxs as Ke}from"react/jsx-runtime";var q8="Edit this element's text on the canvas.",z8="You can't edit this element's text because it contains dynamic content.",j8={opacity:.4},K8=new Set(R9),G8="designMode.imageSourceEditorEnabled",W8=!1;function X8(){try{let e=window.localStorage.getItem(G8);return e==null?void 0:e==="true"}catch{return}}var Q8={general:{headerTitle:"Selected Element",emptyPlaceholder:"To edit an element, select it on the canvas.",inlineEditEditable:q8,inlineEditNonEditable:z8,addToChatContext:"Add to chat as context",ariaPropertyPanel:"Property panel",ariaSelectedComponent:"Property panel for the selected element",ariaElementStyling:"Element properties",closePanel:"Close panel"},sections:{imageSource:"Image Source",background:"Background",spacing:"Layout",border:"Border",typography:"Text",elementDimensions:"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 Case",lineHeight:"Line Height",letterSpacing:"Letter Spacing",width:"Width",minWidth:"Minimum Width",maxWidth:"Maximum Width",height:"Height",minHeight:"Minimum Height",maxHeight:"Maximum Height",overflow:"Content Overflow"},history:{changeLimitTitle:"You're at the edit limit",changeLimitBody:"To continue editing, save your changes."}};function Y8({size:e=16}){return J("svg",{width:e,height:e,viewBox:"-1 0 252 302",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:J("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 J8({size:e=12}){return J("svg",{width:e,height:e,viewBox:"0 0 12 12","aria-hidden":"true",style:{display:"block",flexShrink:0},children:J("rect",{x:"1",y:"1",width:"10",height:"10",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"2.5 2"})})}function ef(e,t){let o=e[t];return o!=null?String(o):""}function Yl(e){if(!(!e||!e.name||!e.debugSource))return{sourceFile:e.debugSource.sourceFile,lineNumber:e.debugSource.lineNumber,columnNumber:e.debugSource.columnNumber,componentName:e.name,tagName:e.tagName,...e.instanceIndex!=null?{instanceIndex:e.instanceIndex}:{}}}function tf({component:e,onOpenSourceFile:t,showOpenSourceFile:o,showComponentName:a,generalLabels:r}){if(!e||!e.name)return J("section",{id:"property-panel-selected-component",className:"property-panel-selected-component",children:J("p",{className:"property-panel-selected-component-placeholder",id:"component-info",children:r.emptyPlaceholder})});let n=e.tagName?e.tagName.toLowerCase():"",l=n?`${e.name} > ${n}`:e.name,i=null;if(o&&e.debugSource){let{sourceFile:s,lineNumber:u,columnNumber:d}=e.debugSource,c=s.split("/").pop()||s,p=`:${u}:${d}`;i=Ke("a",{href:"#",className:"property-panel-selected-component-source",onClick:m=>{m.preventDefault(),t?.({sourceFile:s,lineNumber:u,columnNumber:d})},title:`${s}${p}`,children:[c,p]})}return!a&&!i?null:J("section",{id:"property-panel-selected-component",className:"property-panel-selected-component","aria-label":r.ariaSelectedComponent,children:Ke("div",{id:"component-info",className:"property-panel-selected-component-info",children:[a&&J("span",{className:"property-panel-selected-component-name",children:l}),i&&Ke("span",{className:"property-panel-selected-component-source-row",children:["\u21B3 ",i]})]})})}var of=ve.forwardRef(function({title:t,body:o},a){return Ke("section",{ref:a,role:"alert","aria-live":"assertive","aria-labelledby":"property-panel-change-limit-title",className:"property-panel-change-limit-message",tabIndex:-1,children:[J("svg",{className:"property-panel-change-limit-icon",viewBox:"0 0 520 520",fill:"currentColor","aria-hidden":"true",focusable:"false",children:J("path",{d:"M260 20a240 240 0 100 480 240 240 0 100-480m0 121c17 0 30 13 30 30s-13 30-30 30-30-13-30-30 13-30 30-30m50 210c0 5-4 9-10 9h-80c-5 0-10-3-10-9v-20c0-5 4-11 10-11 5 0 10-3 10-9v-40c0-5-4-11-10-11-5 0-10-3-10-9v-20c0-5 4-11 10-11h60c5 0 10 5 10 11v80c0 5 4 9 10 9 5 0 10 5 10 11z"})}),Ke("div",{className:"property-panel-change-limit-content",children:[J("h2",{id:"property-panel-change-limit-title",className:"property-panel-change-limit-title",children:t}),J("p",{className:"property-panel-change-limit-body",children:o})]})]})});function af({styles:e,computedStyles:t,inlineOrigin:o,hasSelection:a,onStyleChange:r,generalLabels:n,sectionLabels:l,instanceLabels:i,editorLabels:s,component:u,onImageAttributeChange:d,imageSource:c,imageSourceEditorEnabled:p}){let g=a?"visible":"",m=p&&u?.media?.tag==="img"?u.media:null,M=p&&u?.media?.tag==="background-image"?u.media:null,f=h=>o.has(h)?"":t[h]??"",R=e.backgroundImage||t.backgroundImage,C=e.backgroundClip||t.backgroundClip,k=An(R??"",C??"","text"),v=k!=="",H=xi(R??"",C??""),O=Zn(R??"",C??""),N=_1(H)?"rgba(0, 0, 0, 0)":"#ffffff",S=h=>hi(h)?h:void 0,V=S(e.backgroundColor),z=S(t.backgroundColor),j=S(e.color),X=S(t.color),A=e.webkitTextFillColor||t.webkitTextFillColor,D=e.color||t.color,U=Fn(A,D),L=S(e.borderColor),x=S(t.borderColor),w=e.borderImageSource||t.borderImageSource,I=_1(w)?w:yi(C)&&An(R??"",C||"","border-box")||void 0,P=_1(I)?"rgba(0, 0, 0, 0)":"#000000";return J("section",{className:"property-panel-style-properties-container"+(g?" "+g:""),"aria-label":n.ariaElementStyling,"aria-hidden":!a,children:Ke("div",{className:"property-panel-style-properties",children:[Ke(J1,{title:l.typography,children:[J(_5,{label:i.fontFamily,id:"design-font-family",value:e.fontFamily,computedValue:f("fontFamily"),onChange:h=>r("fontFamily",h),aria:s?.picklist}),J(F1,{label:i.fontSize,id:"design-font-size",value:e.fontSize,placeholder:f("fontSize"),onChange:h=>r("fontSize",h),...O1.fontSize,aria:s?.dimension}),J(O5,{label:i.fontWeight,id:"design-font-weight",value:e.fontWeight,computedValue:f("fontWeight"),onChange:h=>r("fontWeight",h),optionLabels:s?.fontWeight?.options,aria:s?.picklist}),J(D5,{label:i.fontStyle,id:"design-font-style",value:e.fontStyle||t.fontStyle,onChange:h=>r("fontStyle",h),optionLabels:s?.fontStyle?.options}),J(Ta,{label:i.textColor,value:U?A:j||X||(v?"rgba(0, 0, 0, 0)":"#000000"),onChange:h=>r("color",h),id:"design-text-color",aria:s?.color,backgroundImage:v?k:void 0}),J(Z5,{label:i.textAlignment,id:"design-text-align",value:e.textAlign||t.textAlign,onChange:h=>r("textAlign",h),optionLabels:s?.textAlignment?.options}),J($5,{label:i.textFormatting,id:"design-text-decoration",value:e.textDecoration||t.textDecoration,onChange:h=>r("textDecoration",h),optionLabels:s?.textDecoration?.options}),J(N5,{label:i.textTransform,id:"design-text-transform",value:e.textTransform||t.textTransform,onChange:h=>r("textTransform",h),optionLabels:s?.textTransform?.options}),J(F1,{label:i.lineHeight,id:"design-line-height",value:e.lineHeight,placeholder:f("lineHeight"),onChange:h=>r("lineHeight",h),...O1.lineHeight,aria:s?.dimension}),J(F1,{label:i.letterSpacing,id:"design-letter-spacing",value:e.letterSpacing,placeholder:f("letterSpacing"),onChange:h=>r("letterSpacing",h),...O1.letterSpacing,aria:s?.dimension})]}),Ke(J1,{title:l.spacing,children:[J(co,{label:i.padding,id:"design-padding",value:e.padding,placeholder:f("padding"),onChange:h=>r("padding",h),...so.padding,aria:s?.boxDimension}),J(co,{label:i.margin,id:"design-margin",value:e.margin,placeholder:f("margin"),onChange:h=>r("margin",h),...so.margin,allowAuto:!0,aria:s?.boxDimension})]}),Ke(J1,{title:l.elementDimensions,children:[J(F1,{label:i.width,id:"design-width",value:e.width,placeholder:f("width"),onChange:h=>r("width",h),...O1.width,aria:s?.dimension}),Ke("div",{className:"property-panel-row-2col",children:[J(F1,{label:i.minWidth,id:"design-min-width",value:e.minWidth,placeholder:f("minWidth"),onChange:h=>r("minWidth",h),...O1.minWidth,aria:s?.dimension}),J(F1,{label:i.maxWidth,id:"design-max-width",value:e.maxWidth,placeholder:f("maxWidth"),onChange:h=>r("maxWidth",h),...O1.maxWidth,aria:s?.dimension})]}),J(F1,{label:i.height,id:"design-height",value:e.height,placeholder:f("height"),onChange:h=>r("height",h),...O1.height,aria:s?.dimension}),Ke("div",{className:"property-panel-row-2col",children:[J(F1,{label:i.minHeight,id:"design-min-height",value:e.minHeight,placeholder:f("minHeight"),onChange:h=>r("minHeight",h),...O1.minHeight,aria:s?.dimension}),J(F1,{label:i.maxHeight,id:"design-max-height",value:e.maxHeight,placeholder:f("maxHeight"),onChange:h=>r("maxHeight",h),...O1.maxHeight,aria:s?.dimension})]}),J(A5,{label:i.overflow,id:"design-overflow",value:e.overflow,computedValue:f("overflow"),onChange:h=>r("overflow",h),optionLabels:s?.overflow?.options,aria:s?.picklist})]}),J(J1,{title:l.background,children:J(Ta,{label:i.backgroundColor,value:O?"rgba(0, 0, 0, 0)":V||z||N,onChange:h=>r("backgroundColor",h),id:"design-bg-color",aria:s?.color,backgroundImage:H||void 0})}),Ke(J1,{title:l.border,children:[J(co,{label:i.borderRadius,id:"design-border-radius",value:e.borderRadius,placeholder:f("borderRadius"),onChange:h=>r("borderRadius",h),...so.borderRadius,aria:s?.boxDimension}),J(co,{label:i.borderWeight,id:"design-border-width",value:e.borderWidth,placeholder:f("borderWidth"),onChange:h=>r("borderWidth",h),...so.borderWidth,aria:s?.boxDimension}),J(v2,{label:i.borderStyle,id:"design-border-style",value:e.borderStyle||t.borderStyle,onChange:h=>r("borderStyle",h),optionLabels:s?.borderStyle?.options}),J(Ta,{label:i.borderColor,value:L||x||P,onChange:h=>r("borderColor",h),id:"design-border-color",aria:s?.color,backgroundImage:I})]}),m&&J(J1,{title:l.imageSource,children:J(Wl,{label:i.imageSource,value:m.src,onChange:h=>d("src",h),id:"design-img-src",attributes:{alt:m.alt},onAttributeChange:d,imageLabels:s?.image,...c})}),M&&J(J1,{title:l.imageSource,children:J(Wl,{label:i.imageSource,value:M.src,onChange:h=>r("backgroundImage",K5(R,h)),id:"design-bg-img-src",imageLabels:s?.image,...c})})]})})}var Jl=["width","minWidth","maxWidth","height","minHeight","maxHeight","overflow","padding","margin","backgroundColor","backgroundImage","backgroundClip","borderWidth","borderStyle","borderColor","borderImageSource","borderRadius","color","webkitTextFillColor","fontFamily","fontSize","fontWeight","fontStyle","lineHeight","letterSpacing","textAlign","textDecoration","textTransform"],ht=Object.fromEntries(Jl.map(e=>[e,""]));function nr(e,t,o,a){let r={...t};for(let n of Jl){let l=e[n];l!=null&&!o.has(n)&&(r[n]=l[a]??t[n]??"")}return r}function G5(e,t,o){let a=new Set(t);for(let r of Jl){if(o.has(r))continue;let n=e[r];n!=null&&(n.inline?a.add(r):a.delete(r))}return a}var W5=ve.forwardRef(function(t,o){let{component:a,styles:r,onStyleChange:n,onTextChange:l,onHistoryStateChange:i,onAddToChatContext:s,onOpenSourceFile:u,onClose:d,onMediaChange:c,showAddToChatContext:p=!0,showOpenSourceFile:g=!0,compactHeader:m=!1,labels:M,imageSource:f,imageSourceEditorEnabled:R}=t,C=ve.useMemo(()=>R??X8()??W8,[R]),k=p1(Q8,M),[v,H]=ve.useState(ht),[O,N]=ve.useState(ht),[S,V]=ve.useState(()=>new Set),[z,j]=ve.useState(()=>new Set),X=ve.useRef(v);X.current=v;let A=ve.useRef(O);A.current=O;let D=ve.useRef(S);D.current=S;let U=ve.useRef(z);U.current=z;let L=ve.useRef(r);L.current=r;let x=ve.useRef(new Map),w=ve.useRef(n);w.current=n;let I=ve.useRef(l);I.current=l;let P=ve.useRef(c);P.current=c;let h=ve.useRef(null);h.current||(h.current=j5((Y,te,ne)=>w.current(Y,te,ne,!0),(Y,te)=>I.current?.(Y,te),(Y,te,ne)=>P.current?.(Y,te,ne)));let T=h.current,q=ve.useRef(i);q.current=i;let[B,F]=ve.useState(()=>T.getUndoCount()),$=T.getMaxHistorySize(),Z=ve.useRef("none");ve.useEffect(()=>{let Y=ne=>{if(q.current?.({canUndo:ne.canUndo,canRedo:ne.canRedo}),F(ne.undoCount),!(ne.type==="command-undone"||ne.type==="command-redone"))return;let He=ne.type==="command-undone",De=ne.command?.data?.property,Pe=ne.command?.data?.changes,Be=[];if(typeof De=="string"?Be=[[De,typeof ne.appliedValue=="string"?ne.appliedValue:""]]:Array.isArray(Pe)&&(Be=Pe.filter(ge=>ge!=null&&typeof ge.property=="string").map(ge=>[ge.property,String((He?ge.oldValue:ge.newValue)??"")])),Be.length===0)return;let Xe=ne.command?.data,Qe=Xe&&typeof Xe.componentName=="string"?`${Xe.componentName}-${Xe.tagName??""}-${Xe.lineNumber??""}-${Xe.columnNumber??""}`:null;if(Qe!==null&&Qe!==Z.current){let ge=x.current.get(Qe);if(!ge)return;let Ye={...ge.styles},r1=new Set(ge.sessionEdits),U1=new Set(ge.inlineOrigin);for(let[Le,Je]of Be)Ye[Le]=Je,Je===""&&U1.has(Le)?(r1.delete(Le),U1.delete(Le)):r1.add(Le);x.current.set(Qe,{...ge,styles:Ye,sessionEdits:r1,inlineOrigin:U1});return}H(ge=>{let Ye={...ge};for(let[r1,U1]of Be)Ye[r1]=U1;return Ye}),V(ge=>{let Ye=new Set(ge);for(let[r1]of Be)Ye.add(r1);return Ye})},te=T.subscribe(Y);return q.current?.({canUndo:T.canUndo(),canRedo:T.canRedo()}),F(T.getUndoCount()),te},[T]);let ie=B>=$,de=ve.useRef(null),ue=ve.useRef(!1);ve.useEffect(()=>{ie&&!ue.current&&de.current?.focus(),ue.current=ie},[ie]),ve.useImperativeHandle(o,()=>({undo:()=>T.undo(),redo:()=>T.redo(),clearHistory:Y=>{if(T.clear(),x.current.clear(),Y?.keepSelectedStyles){let te=L.current||{},ne=new Set;H(nr(te,ht,ne,"inline")),N(nr(te,ht,ne,"computed")),j(G5(te,ne,ne))}else H(ht),N(ht),j(new Set);V(new Set),F(0)},getHistoryStack:()=>T.getHistoryStack(),getChangeSet:()=>q5(T.getHistoryStack()),recordTextChange:(Y,te,ne)=>T.recordTextChange(Y,te,ne),canUndo:()=>T.canUndo(),canRedo:()=>T.canRedo()}),[T]);let y=a?`${a.name}-${a.tagName??""}-${a.debugSource?.lineNumber??""}-${a.debugSource?.columnNumber??""}`:"none";Z.current=y;let b=ve.useRef("none");ve.useEffect(()=>{let Y=b.current,te,ne,Ce,He;if(y!==Y){Y!=="none"&&D.current.size>0&&x.current.set(Y,{styles:X.current,computedStyles:A.current,sessionEdits:D.current,inlineOrigin:U.current}),b.current=y;let Pe=x.current.get(y);te=Pe?Pe.styles:ht,ne=Pe?Pe.computedStyles:ht,Ce=Pe?Pe.sessionEdits:new Set,He=Pe?Pe.inlineOrigin:new Set}else te=X.current,ne=A.current,Ce=D.current,He=U.current;let De=r||{};H(nr(De,te,Ce,"inline")),N(nr(De,ne,Ce,"computed")),V(Ce),j(G5(De,He,Ce))},[y,r]);let K=ve.useCallback((Y,te)=>{let ne=ef(X.current,Y),Ce=Yl(a),He=a?.debugSource?{sourceFile:a.debugSource.sourceFile,lineNumber:a.debugSource.lineNumber,columnNumber:a.debugSource.columnNumber}:void 0,De=X.current.backgroundImage||A.current.backgroundImage||"",Pe=X.current.backgroundClip||A.current.backgroundClip||"",Be=Zn(De,Pe),Xe=X.current.color||A.current.color||"",Qe=!!X.current.webkitTextFillColor?.trim(),ge={property:"webkitTextFillColor",isOccluding:Le=>Fn(Le,Xe,Qe),resetValue:"currentcolor"},Ye=[];Y==="backgroundColor"?Ye=Be?[ge]:[]:Y==="borderColor"?Ye=[{property:"borderImageSource"}]:Y==="color"&&(Ye=[ge]);let r1=Ye.flatMap(({property:Le,isOccluding:Je,resetValue:q1})=>Mi(te,Le,A.current[Le],X.current[Le],Je,q1)),U1=(Le,Je,q1)=>{q1!==Je&&r1.push({property:Le,oldValue:Je,newValue:q1})};if(te.trim()!==""&&(_1(De)||Be))if(Y==="backgroundColor"){let Le=Be?Ii(De,Pe):Pe;U1("backgroundClip",Pe,Le),U1("backgroundImage",De,bi(De,Le))}else Y==="color"&&U1("backgroundImage",De,wi(De,Pe));n(Y,te,He);for(let Le of r1)n(Le.property,Le.newValue,He);r1.length===0?T.recordStyleChange(Y,ne,te,Ce):T.recordStyleBatch([{property:Y,oldValue:ne,newValue:te},...r1.map(Le=>({property:Le.property,oldValue:Le.oldValue,newValue:Le.newValue}))],Ce),H(Le=>{let Je={...Le,[Y]:te};for(let q1 of r1)Je[q1.property]=q1.newValue;return Je}),Y==="color"&&N(Le=>({...Le,webkitTextFillColor:te})),V(Le=>{let Je=new Set(Le);te===""&&U.current.has(Y)?Je.delete(Y):Je.add(Y);for(let q1 of r1)Je.add(q1.property);return Je})},[n,T,a]),Q=ve.useCallback((Y,te)=>{let ne=a?.media;if(!ne)return;let Ce=a?.debugSource;c?.(ne.tag,{[Y]:te},Ce);let He=String(ne[Y]??"");T.recordMediaChange(ne.tag,Y,He,te,Yl(a))},[a,c,T]),xe=!!(a&&a.name),Ie=ve.useCallback(()=>{let Y=Yl(a);Y&&s?.(Y)},[a,s]),a1=xe&&a&&a.tagName&&K8.has(a.tagName.toUpperCase()),ye=a?.hasNonEditableText?k.general.inlineEditNonEditable:k.general.inlineEditEditable,Te=a?.tagName?a.tagName.toLowerCase():a?.name;return Ke("div",{role:"complementary","aria-label":k.general.ariaPropertyPanel,className:"property-panel-container",children:[Ke("header",{className:m?"property-panel-header property-panel-header-compact":"property-panel-header",children:[m?xe&&Ke("span",{className:"property-panel-selected-pill",children:[J(J8,{size:12}),J("span",{className:"property-panel-selected-pill-tag",children:Te})]}):J("h2",{id:"design-property-panel-title",className:"property-panel-title",children:k.general.headerTitle}),(xe||d)&&Ke("div",{className:"property-panel-header-actions",children:[xe&&Ke(nf,{children:[a1&&J("span",{className:"property-panel-selected-component-action property-panel-selected-component-action-help","data-tooltip":ye,"aria-label":ye,children:J(u9,{width:14,height:14,style:a.hasNonEditableText?j8:void 0})}),p&&!ie&&J("button",{type:"button",className:"property-panel-selected-component-action",onClick:Ie,"data-tooltip":k.general.addToChatContext,"aria-label":k.general.addToChatContext,children:J(Y8,{size:14})})]}),d&&J("button",{type:"button",className:"property-panel-selected-component-action property-panel-close",onClick:d,"data-tooltip":k.general.closePanel,"aria-label":k.general.closePanel,children:J(Y1,{width:14,height:14,"aria-hidden":"true"})})]})]}),Ke("div",{className:"property-panel-content","aria-labelledby":m?void 0:"design-property-panel-title",children:[J(tf,{component:a,onOpenSourceFile:u,showOpenSourceFile:g,showComponentName:!m,generalLabels:k.general}),ie?J(of,{ref:de,title:k.history.changeLimitTitle,body:k.history.changeLimitBody}):J(af,{styles:v,computedStyles:O,inlineOrigin:z,hasSelection:xe,onStyleChange:K,generalLabels:k.general,sectionLabels:k.sections,instanceLabels:k.instances,editorLabels:M?.editors,component:a,onImageAttributeChange:Q,imageSource:f,imageSourceEditorEnabled:C},y)]})]})});function rf(e,t,o){if(!e)return;U8(e).render(ve.createElement(W5,{...t,ref:o}))}export{W5 as DesignPropertyPanel,x2 as REQUIRED_LABEL_KEYS,Oe as interpolate,rf as mountDesignPropertyPanel,Au as validateLabels};
|
|
5
5
|
/*! Bundled license information:
|
|
6
6
|
|
|
7
7
|
react-is/cjs/react-is.production.min.js:
|